scb-wc 0.1.77 → 0.1.78
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/icons.json +178 -178
- package/mvc/components/scb-button/scb-button.js +1 -1
- package/mvc/components/scb-grid/scb-grid-item.js +1 -1
- package/mvc/components/scb-grid/scb-grid.js +1 -1
- package/mvc/components/scb-header/scb-header.js +88 -62
- package/mvc/components/scb-icon-button/scb-icon-button.js +1 -1
- package/mvc/components/scb-skeleton/scb-skeleton.js +1 -1
- package/mvc/scb-logo.svg +20 -20
- package/mvc/scb.svg +13 -13
- package/package.json +2 -2
- package/scb-components/scb-header/scb-header.d.ts +5 -0
- package/scb-header/scb-header.js +82 -20
- package/scb-wc.bundle.js +221 -195
package/scb-wc.bundle.js
CHANGED
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
name="trailing-supporting-text"
|
|
384
384
|
slot="trailing-supporting-text"></slot>
|
|
385
385
|
`}onFocus(){this.tabIndex===-1&&this.dispatchEvent(Ja())}focus(){this.listItemRoot?.focus()}};bn(po),po.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0},r([g({type:Boolean,reflect:!0})],po.prototype,`disabled`,void 0),r([g({reflect:!0})],po.prototype,`type`,void 0),r([g({type:Boolean,attribute:`md-list-item`,reflect:!0})],po.prototype,`isListItem`,void 0),r([g()],po.prototype,`href`,void 0),r([g()],po.prototype,`target`,void 0),r([v(`.list-item`)],po.prototype,`listItemRoot`,void 0),C();var mo=p`:host{display:flex;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, 0.3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-list-item-one-line-container-height, 56px);padding-top:var(--md-list-item-top-space, 12px);padding-bottom:var(--md-list-item-bottom-space, 12px);padding-inline-start:var(--md-list-item-leading-space, 16px);padding-inline-end:var(--md-list-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}@media(forced-colors: active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}
|
|
386
|
-
`;i(),y();var ho=class extends po{};ho.styles=[mo],ho=r([a(`md-list-item`)],ho),bt(),Kt();var go=`important`,_o=` !`+go,vo=Wt(class extends Gt{constructor(e){if(super(e),e.type!==Ut.ATTRIBUTE||e.name!==`style`||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,n)=>{let r=e[n];return r==null?t:t+`${n=n.includes(`-`)?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,`-$&`).toLowerCase()}:${r};`}),``)}update(e,[t]){let{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let e of this.ft)t[e]??(this.ft.delete(e),e.includes(`-`)?n.removeProperty(e):n[e]=null);for(let e in t){let r=t[e];if(r!=null){this.ft.add(e);let t=typeof r==`string`&&r.endsWith(_o);e.includes(`-`)||t?n.setProperty(e,t?r.slice(0,-11):r,t?go:``):n[e]=r}}return at}});function yo(e,t){return new CustomEvent(`close-menu`,{bubbles:!0,composed:!0,detail:{initiator:e,reason:t,itemPath:[e]}})}var bo=yo;function xo(){return new Event(`deactivate-typeahead`,{bubbles:!0,composed:!0})}function So(){return new Event(`activate-typeahead`,{bubbles:!0,composed:!0})}var Co={UP:`ArrowUp`,DOWN:`ArrowDown`,RIGHT:`ArrowRight`,LEFT:`ArrowLeft`},wo={SPACE:`Space`,ENTER:`Enter`},To={CLICK_SELECTION:`click-selection`,KEYDOWN:`keydown`},Eo={ESCAPE:`Escape`,SPACE:wo.SPACE,ENTER:wo.ENTER};function Do(e){return Object.values(Eo).some(t=>t===e)}function Oo(e){return Object.values(wo).some(t=>t===e)}function ko(e,t){let n=new Event(`md-contains`,{bubbles:!0,composed:!0}),r=[],i=e=>{r=e.composedPath()};return t.addEventListener(`md-contains`,i),e.dispatchEvent(n),t.removeEventListener(`md-contains`,i),r.length>0}var Ao={NONE:`none`,LIST_ROOT:`list-root`,FIRST_ITEM:`first-item`,LAST_ITEM:`last-item`},jo={END_START:`end-start`,END_END:`end-end`,START_START:`start-start`,START_END:`start-end`},Mo=class{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:`none`},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){let{surfaceEl:e,anchorEl:t,anchorCorner:n,surfaceCorner:r,positioning:i,xOffset:a,yOffset:o,repositionStrategy:s}=this.getProperties(),c=n.toLowerCase().trim(),l=r.toLowerCase().trim();if(!e||!t)return;let u=window.innerWidth,d=window.innerHeight,f=document.createElement(`div`);f.style.opacity=`0`,f.style.position=`fixed`,f.style.display=`block`,f.style.inset=`0`,document.body.appendChild(f);let p=f.getBoundingClientRect();f.remove();let m=window.innerHeight-p.bottom,h=window.innerWidth-p.right;this.surfaceStylesInternal={display:`block`,opacity:`0`},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();let ee=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),te=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[ne,re]=l.split(`-`),[ie,ae]=c.split(`-`),oe=getComputedStyle(e).direction===`ltr`,{blockInset:se,blockOutOfBoundsCorrection:ce,surfaceBlockProperty:le}=this.calculateBlock({surfaceRect:ee,anchorRect:te,anchorBlock:ie,surfaceBlock:ne,yOffset:o,positioning:i,windowInnerHeight:d,blockScrollbarHeight:m});if(ce){let e=ne===`start`?`end`:`start`,t=ie===`start`?`end`:`start`,n=this.calculateBlock({surfaceRect:ee,anchorRect:te,anchorBlock:t,surfaceBlock:e,yOffset:o,positioning:i,windowInnerHeight:d,blockScrollbarHeight:m});ce>n.blockOutOfBoundsCorrection&&(se=n.blockInset,ce=n.blockOutOfBoundsCorrection,le=n.surfaceBlockProperty)}let{inlineInset:ue,inlineOutOfBoundsCorrection:de,surfaceInlineProperty:fe}=this.calculateInline({surfaceRect:ee,anchorRect:te,anchorInline:ae,surfaceInline:re,xOffset:a,positioning:i,isLTR:oe,windowInnerWidth:u,inlineScrollbarWidth:h});if(de){let e=re===`start`?`end`:`start`,t=ae===`start`?`end`:`start`,n=this.calculateInline({surfaceRect:ee,anchorRect:te,anchorInline:t,surfaceInline:e,xOffset:a,positioning:i,isLTR:oe,windowInnerWidth:u,inlineScrollbarWidth:h});Math.abs(de)>Math.abs(n.inlineOutOfBoundsCorrection)&&(ue=n.inlineInset,de=n.inlineOutOfBoundsCorrection,fe=n.surfaceInlineProperty)}s===`move`&&(se-=ce,ue-=de),this.surfaceStylesInternal={display:`block`,opacity:`1`,[le]:`${se}px`,[fe]:`${ue}px`},s===`resize`&&(ce&&(this.surfaceStylesInternal.height=`${ee.height-ce}px`),de&&(this.surfaceStylesInternal.width=`${ee.width-de}px`)),this.host.requestUpdate()}calculateBlock(e){let{surfaceRect:t,anchorRect:n,anchorBlock:r,surfaceBlock:i,yOffset:a,positioning:o,windowInnerHeight:s,blockScrollbarHeight:c}=e,l=+(o===`fixed`||o===`document`),u=+(o===`document`),d=+(i===`start`),f=+(i===`end`),p=(r===i?0:1)*n.height+a,m=d*n.top+f*(s-n.bottom-c),h=d*window.scrollY-f*window.scrollY,ee=Math.abs(Math.min(0,s-m-p-t.height));return{blockInset:l*m+u*h+p,blockOutOfBoundsCorrection:ee,surfaceBlockProperty:i===`start`?`inset-block-start`:`inset-block-end`}}calculateInline(e){let{isLTR:t,surfaceInline:n,anchorInline:r,anchorRect:i,surfaceRect:a,xOffset:o,positioning:s,windowInnerWidth:c,inlineScrollbarWidth:l}=e,u=+(s===`fixed`||s===`document`),d=+(s===`document`),f=+!!t,p=+!t,m=+(n===`start`),h=+(n===`end`),ee=(r===n?0:1)*i.width+o,te=m*i.left+h*(c-i.right-l),ne=m*(c-i.right-l)+h*i.left,re=f*te+p*ne,ie=m*window.scrollX-h*window.scrollX,ae=h*window.scrollX-m*window.scrollX,oe=f*ie+p*ae,se=Math.abs(Math.min(0,c-re-ee-a.width)),ce=u*re+ee+d*oe,le=n===`start`?`inset-inline-start`:`inset-inline-end`;return(s===`document`||s===`fixed`)&&(le=n===`start`&&t||n===`end`&&!t?`left`:`right`),{inlineInset:ce,inlineOutOfBoundsCorrection:se,surfaceInlineProperty:le}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){let e=this.getProperties(),t=!1;for(let[n,r]of Object.entries(e))if(t||=r!==this.lastValues[n],t)break;let n=this.lastValues.isOpen!==e.isOpen,r=!!e.anchorEl,i=!!e.surfaceEl;t&&r&&i&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):n&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:`none`},this.host.requestUpdate();let e=this.getProperties().surfaceEl;e?.popover&&e?.isConnected&&e.hidePopover()}},No={INDEX:0,ITEM:1,TEXT:2},Po=class{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer=``,this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=e=>{this.isTypingAhead?this.typeahead(e):this.beginTypeahead(e)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer=``,this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&(e.code===`Space`||e.code===`Enter`||e.code.startsWith(`Arrow`)||e.code===`Escape`||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map((e,t)=>[t,e,e.typeaheadText.trim().toLowerCase()]),this.lastActiveRecord=this.typeaheadRecords.find(e=>e[No.ITEM].tabIndex===0)??null,this.lastActiveRecord&&(this.lastActiveRecord[No.ITEM].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),e.code===`Enter`||e.code.startsWith(`Arrow`)||e.code===`Escape`){this.endTypeahead(),this.lastActiveRecord&&(this.lastActiveRecord[No.ITEM].tabIndex=-1);return}e.code===`Space`&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();let t=this.lastActiveRecord?this.lastActiveRecord[No.INDEX]:-1,n=this.typeaheadRecords.length,r=e=>(e[No.INDEX]+n-t)%n,i=this.typeaheadRecords.filter(e=>!e[No.ITEM].disabled&&e[No.TEXT].startsWith(this.typaheadBuffer)).sort((e,t)=>r(e)-r(t));if(i.length===0){clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[No.ITEM].tabIndex=-1),this.endTypeahead();return}let a=this.typaheadBuffer.length===1,o;o=this.lastActiveRecord===i[0]&&a?i[1]??i[0]:i[0],this.lastActiveRecord&&(this.lastActiveRecord[No.ITEM].tabIndex=-1),this.lastActiveRecord=o,o[No.ITEM].tabIndex=0,o[No.ITEM].focus()}};i(),At(),w(),C(),y(),Jt(),Zt(),$a(),Xa();var Fo=new Set([Za.ArrowDown,Za.ArrowUp,Za.Home,Za.End]),Io=new Set([Za.ArrowLeft,Za.ArrowRight,...Fo]);function Lo(e=document){let t=e.activeElement;for(;t&&t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}var Ro=class extends S{get openDirection(){return this.menuCorner.split(`-`)[0]===`start`?`DOWN`:`UP`}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate(`anchorElement`)}constructor(){super(),this.anchor=``,this.positioning=`absolute`,this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=200,this.anchorCorner=jo.END_START,this.menuCorner=jo.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=Ao.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=Yt(),this.listController=new Qa({isItem:e=>e.hasAttribute(`md-menu-item`),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction===`rtl`,deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>this.isSubmenu?e===(getComputedStyle(this).direction===`rtl`?Za.ArrowLeft:Za.ArrowRight)?!0:Fo.has(e):Io.has(e),wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Po(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Mo(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning===`popover`?`document`:this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!==`popover`?`move`:`resize`})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!==`document`&&this.positioning!==`fixed`&&this.positioning!==`popover`||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{let t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(ko(e.relatedTarget,this)||this.pointerPath.length!==0&&ko(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;let n=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=n},this.onOpened=async()=>{this.lastFocusedElement=Lo();let e=this.items,t=Ba(e);t&&this.defaultFocus!==Ao.NONE&&(t.item.tabIndex=-1);let n=!this.quick;switch(this.quick?this.dispatchEvent(new Event(`opening`)):n=!!await this.animateOpen(),this.defaultFocus){case Ao.FIRST_ITEM:let t=Va(e);t&&(t.tabIndex=0,t.focus(),await t.updateComplete);break;case Ao.LAST_ITEM:let n=Ha(e);n&&(n.tabIndex=0,n.focus(),await n.updateComplete);break;case Ao.LIST_ROOT:this.focus();break;default:case Ao.NONE:break}n||this.dispatchEvent(new Event(`opened`))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event(`closing`)),this.dispatchEvent(new Event(`closed`)))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;let t=e.composedPath();!this.stayOpenOnOutsideClick&&!t.includes(this)&&!t.includes(this.anchorElement)&&(this.open=!1)},this.internals.role=`menu`,this.addEventListener(`keydown`,this.handleKeydown),this.addEventListener(`keydown`,this.captureKeydown,{capture:!0}),this.addEventListener(`focusout`,this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){if(e.has(`open`)){if(this.open){this.removeAttribute(`aria-hidden`);return}this.setAttribute(`aria-hidden`,`true`)}}update(e){e.has(`open`)&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has(`positioning`)&&this.positioning===`popover`&&!this.showPopover&&(this.positioning=`fixed`),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return b`
|
|
386
|
+
`;i(),y();var ho=class extends po{};ho.styles=[mo],ho=r([a(`md-list-item`)],ho),bt(),Kt();var go=`important`,_o=` !`+go,vo=Wt(class extends Gt{constructor(e){if(super(e),e.type!==Ut.ATTRIBUTE||e.name!==`style`||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,n)=>{let r=e[n];return r==null?t:t+`${n=n.includes(`-`)?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,`-$&`).toLowerCase()}:${r};`}),``)}update(e,[t]){let{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let e of this.ft)t[e]??(this.ft.delete(e),e.includes(`-`)?n.removeProperty(e):n[e]=null);for(let e in t){let r=t[e];if(r!=null){this.ft.add(e);let t=typeof r==`string`&&r.endsWith(_o);e.includes(`-`)||t?n.setProperty(e,t?r.slice(0,-11):r,t?go:``):n[e]=r}}return at}});function yo(e,t){return new CustomEvent(`close-menu`,{bubbles:!0,composed:!0,detail:{initiator:e,reason:t,itemPath:[e]}})}var bo=yo;function xo(){return new Event(`deactivate-typeahead`,{bubbles:!0,composed:!0})}function So(){return new Event(`activate-typeahead`,{bubbles:!0,composed:!0})}var Co={UP:`ArrowUp`,DOWN:`ArrowDown`,RIGHT:`ArrowRight`,LEFT:`ArrowLeft`},wo={SPACE:`Space`,ENTER:`Enter`},To={CLICK_SELECTION:`click-selection`,KEYDOWN:`keydown`},Eo={ESCAPE:`Escape`,SPACE:wo.SPACE,ENTER:wo.ENTER};function Do(e){return Object.values(Eo).some(t=>t===e)}function Oo(e){return Object.values(wo).some(t=>t===e)}function ko(e,t){let n=new Event(`md-contains`,{bubbles:!0,composed:!0}),r=[],i=e=>{r=e.composedPath()};return t.addEventListener(`md-contains`,i),e.dispatchEvent(n),t.removeEventListener(`md-contains`,i),r.length>0}var Ao={NONE:`none`,LIST_ROOT:`list-root`,FIRST_ITEM:`first-item`,LAST_ITEM:`last-item`},jo={END_START:`end-start`,END_END:`end-end`,START_START:`start-start`,START_END:`start-end`},Mo=class{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:`none`},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){let{surfaceEl:e,anchorEl:t,anchorCorner:n,surfaceCorner:r,positioning:i,xOffset:a,yOffset:o,repositionStrategy:s}=this.getProperties(),c=n.toLowerCase().trim(),l=r.toLowerCase().trim();if(!e||!t)return;let u=window.innerWidth,d=window.innerHeight,f=document.createElement(`div`);f.style.opacity=`0`,f.style.position=`fixed`,f.style.display=`block`,f.style.inset=`0`,document.body.appendChild(f);let p=f.getBoundingClientRect();f.remove();let m=window.innerHeight-p.bottom,h=window.innerWidth-p.right;this.surfaceStylesInternal={display:`block`,opacity:`0`},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();let ee=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),te=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[ne,re]=l.split(`-`),[ie,ae]=c.split(`-`),oe=getComputedStyle(e).direction===`ltr`,{blockInset:se,blockOutOfBoundsCorrection:ce,surfaceBlockProperty:le}=this.calculateBlock({surfaceRect:ee,anchorRect:te,anchorBlock:ie,surfaceBlock:ne,yOffset:o,positioning:i,windowInnerHeight:d,blockScrollbarHeight:m});if(ce){let e=ne===`start`?`end`:`start`,t=ie===`start`?`end`:`start`,n=this.calculateBlock({surfaceRect:ee,anchorRect:te,anchorBlock:t,surfaceBlock:e,yOffset:o,positioning:i,windowInnerHeight:d,blockScrollbarHeight:m});ce>n.blockOutOfBoundsCorrection&&(se=n.blockInset,ce=n.blockOutOfBoundsCorrection,le=n.surfaceBlockProperty)}let{inlineInset:ue,inlineOutOfBoundsCorrection:de,surfaceInlineProperty:fe}=this.calculateInline({surfaceRect:ee,anchorRect:te,anchorInline:ae,surfaceInline:re,xOffset:a,positioning:i,isLTR:oe,windowInnerWidth:u,inlineScrollbarWidth:h});if(de){let e=re===`start`?`end`:`start`,t=ae===`start`?`end`:`start`,n=this.calculateInline({surfaceRect:ee,anchorRect:te,anchorInline:t,surfaceInline:e,xOffset:a,positioning:i,isLTR:oe,windowInnerWidth:u,inlineScrollbarWidth:h});Math.abs(de)>Math.abs(n.inlineOutOfBoundsCorrection)&&(ue=n.inlineInset,de=n.inlineOutOfBoundsCorrection,fe=n.surfaceInlineProperty)}s===`move`&&(se-=ce,ue-=de),this.surfaceStylesInternal={display:`block`,opacity:`1`,[le]:`${se}px`,[fe]:`${ue}px`},s===`resize`&&(ce&&(this.surfaceStylesInternal.height=`${ee.height-ce}px`),de&&(this.surfaceStylesInternal.width=`${ee.width-de}px`)),this.host.requestUpdate()}calculateBlock(e){let{surfaceRect:t,anchorRect:n,anchorBlock:r,surfaceBlock:i,yOffset:a,positioning:o,windowInnerHeight:s,blockScrollbarHeight:c}=e,l=+(o===`fixed`||o===`document`),u=+(o===`document`),d=+(i===`start`),f=+(i===`end`),p=(r===i?0:1)*n.height+a,m=d*n.top+f*(s-n.bottom-c),h=d*window.scrollY-f*window.scrollY,ee=Math.abs(Math.min(0,s-m-p-t.height));return{blockInset:l*m+u*h+p,blockOutOfBoundsCorrection:ee,surfaceBlockProperty:i===`start`?`inset-block-start`:`inset-block-end`}}calculateInline(e){let{isLTR:t,surfaceInline:n,anchorInline:r,anchorRect:i,surfaceRect:a,xOffset:o,positioning:s,windowInnerWidth:c,inlineScrollbarWidth:l}=e,u=+(s===`fixed`||s===`document`),d=+(s===`document`),f=+!!t,p=+!t,m=+(n===`start`),h=+(n===`end`),ee=(r===n?0:1)*i.width+o,te=m*i.left+h*(c-i.right-l),ne=m*(c-i.right-l)+h*i.left,re=f*te+p*ne,ie=m*window.scrollX-h*window.scrollX,ae=h*window.scrollX-m*window.scrollX,oe=f*ie+p*ae,se=Math.abs(Math.min(0,c-re-ee-a.width)),ce=u*re+ee+d*oe,le=n===`start`?`inset-inline-start`:`inset-inline-end`;return(s===`document`||s===`fixed`)&&(le=n===`start`&&t||n===`end`&&!t?`left`:`right`),{inlineInset:ce,inlineOutOfBoundsCorrection:se,surfaceInlineProperty:le}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){let e=this.getProperties(),t=!1;for(let[n,r]of Object.entries(e))if(t||=r!==this.lastValues[n],t)break;let n=this.lastValues.isOpen!==e.isOpen,r=!!e.anchorEl,i=!!e.surfaceEl;t&&r&&i&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):n&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:`none`},this.host.requestUpdate();let e=this.getProperties().surfaceEl;e?.popover&&e?.isConnected&&e.hidePopover()}},No={INDEX:0,ITEM:1,TEXT:2},Po=class{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer=``,this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=e=>{this.isTypingAhead?this.typeahead(e):this.beginTypeahead(e)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer=``,this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&(e.code===`Space`||e.code===`Enter`||e.code.startsWith(`Arrow`)||e.code===`Escape`||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map((e,t)=>[t,e,e.typeaheadText.trim().toLowerCase()]),this.lastActiveRecord=this.typeaheadRecords.find(e=>e[No.ITEM].tabIndex===0)??null,this.lastActiveRecord&&(this.lastActiveRecord[No.ITEM].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),e.code===`Enter`||e.code.startsWith(`Arrow`)||e.code===`Escape`){this.endTypeahead(),this.lastActiveRecord&&(this.lastActiveRecord[No.ITEM].tabIndex=-1);return}e.code===`Space`&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();let t=this.lastActiveRecord?this.lastActiveRecord[No.INDEX]:-1,n=this.typeaheadRecords.length,r=e=>(e[No.INDEX]+n-t)%n,i=this.typeaheadRecords.filter(e=>!e[No.ITEM].disabled&&e[No.TEXT].startsWith(this.typaheadBuffer)).sort((e,t)=>r(e)-r(t));if(i.length===0){clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[No.ITEM].tabIndex=-1),this.endTypeahead();return}let a=this.typaheadBuffer.length===1,o;o=this.lastActiveRecord===i[0]&&a?i[1]??i[0]:i[0],this.lastActiveRecord&&(this.lastActiveRecord[No.ITEM].tabIndex=-1),this.lastActiveRecord=o,o[No.ITEM].tabIndex=0,o[No.ITEM].focus()}};i(),At(),w(),C(),y(),Jt(),Zt(),$a(),Xa();var Fo=new Set([Za.ArrowDown,Za.ArrowUp,Za.Home,Za.End]),Io=new Set([Za.ArrowLeft,Za.ArrowRight,...Fo]);function Lo(e=document){let t=e.activeElement;for(;t&&t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}var A=class extends S{get openDirection(){return this.menuCorner.split(`-`)[0]===`start`?`DOWN`:`UP`}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate(`anchorElement`)}constructor(){super(),this.anchor=``,this.positioning=`absolute`,this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=200,this.anchorCorner=jo.END_START,this.menuCorner=jo.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=Ao.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=Yt(),this.listController=new Qa({isItem:e=>e.hasAttribute(`md-menu-item`),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction===`rtl`,deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>this.isSubmenu?e===(getComputedStyle(this).direction===`rtl`?Za.ArrowLeft:Za.ArrowRight)?!0:Fo.has(e):Io.has(e),wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Po(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Mo(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning===`popover`?`document`:this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!==`popover`?`move`:`resize`})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!==`document`&&this.positioning!==`fixed`&&this.positioning!==`popover`||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{let t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(ko(e.relatedTarget,this)||this.pointerPath.length!==0&&ko(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;let n=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=n},this.onOpened=async()=>{this.lastFocusedElement=Lo();let e=this.items,t=Ba(e);t&&this.defaultFocus!==Ao.NONE&&(t.item.tabIndex=-1);let n=!this.quick;switch(this.quick?this.dispatchEvent(new Event(`opening`)):n=!!await this.animateOpen(),this.defaultFocus){case Ao.FIRST_ITEM:let t=Va(e);t&&(t.tabIndex=0,t.focus(),await t.updateComplete);break;case Ao.LAST_ITEM:let n=Ha(e);n&&(n.tabIndex=0,n.focus(),await n.updateComplete);break;case Ao.LIST_ROOT:this.focus();break;default:case Ao.NONE:break}n||this.dispatchEvent(new Event(`opened`))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event(`closing`)),this.dispatchEvent(new Event(`closed`)))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;let t=e.composedPath();!this.stayOpenOnOutsideClick&&!t.includes(this)&&!t.includes(this.anchorElement)&&(this.open=!1)},this.internals.role=`menu`,this.addEventListener(`keydown`,this.handleKeydown),this.addEventListener(`keydown`,this.captureKeydown,{capture:!0}),this.addEventListener(`focusout`,this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){if(e.has(`open`)){if(this.open){this.removeAttribute(`aria-hidden`);return}this.setAttribute(`aria-hidden`,`true`)}}update(e){e.has(`open`)&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has(`positioning`)&&this.positioning===`popover`&&!this.showPopover&&(this.positioning=`fixed`),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return b`
|
|
387
387
|
<div
|
|
388
388
|
class="menu ${T(this.getSurfaceClasses())}"
|
|
389
389
|
style=${vo(this.menuPositionController.surfaceStyles)}
|
|
@@ -401,8 +401,8 @@
|
|
|
401
401
|
@activate-typeahead=${this.handleActivateTypeahead}
|
|
402
402
|
@stay-open-on-focusout=${this.handleStayOpenOnFocusout}
|
|
403
403
|
@close-on-focusout=${this.handleCloseOnFocusout}
|
|
404
|
-
@slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return b`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:this.positioning===`fixed`,"has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Do(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){let e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;let n=this.openDirection;this.dispatchEvent(new Event(`opening`)),e.classList.toggle(`animating`,!0);let r=this.openCloseAnimationSignal.start(),i=e.offsetHeight,a=n===`UP`,o=this.items,s=250/o.length,c=e.animate([{height:`0px`},{height:`${i}px`}],{duration:500,easing:Xt.EMPHASIZED}),l=t.animate([{transform:a?`translateY(-${i}px)`:``},{transform:``}],{duration:500,easing:Xt.EMPHASIZED}),u=e.animate([{opacity:0},{opacity:1}],50),d=[];for(let e=0;e<o.length;e++){let t=o[a?o.length-1-e:e],n=t.animate([{opacity:0},{opacity:1}],{duration:250,delay:s*e});t.classList.toggle(`md-menu-hidden`,!0),n.addEventListener(`finish`,()=>{t.classList.toggle(`md-menu-hidden`,!1)}),d.push([t,n])}let f=e=>{},p=new Promise(e=>{f=e});return r.addEventListener(`abort`,()=>{c.cancel(),l.cancel(),u.cancel(),d.forEach(([e,t])=>{e.classList.toggle(`md-menu-hidden`,!1),t.cancel()}),f(!0)}),c.addEventListener(`finish`,()=>{e.classList.toggle(`animating`,!1),this.openCloseAnimationSignal.finish(),f(!1)}),await p}animateClose(){let e,t=new Promise(t=>{e=t}),n=this.surfaceEl,r=this.slotEl;if(!n||!r)return e(!1),t;let i=this.openDirection===`UP`;this.dispatchEvent(new Event(`closing`)),n.classList.toggle(`animating`,!0);let a=this.openCloseAnimationSignal.start(),o=n.offsetHeight,s=this.items,c=.35,l=50/s.length,u=n.animate([{height:`${o}px`},{height:`${o*c}px`}],{duration:150,easing:Xt.EMPHASIZED_ACCELERATE}),d=r.animate([{transform:``},{transform:i?`translateY(-${o*(1-c)}px)`:``}],{duration:150,easing:Xt.EMPHASIZED_ACCELERATE}),f=n.animate([{opacity:1},{opacity:0}],{duration:50,delay:100}),p=[];for(let e=0;e<s.length;e++){let t=s[i?e:s.length-1-e],n=t.animate([{opacity:1},{opacity:0}],{duration:50,delay:50+l*e});n.addEventListener(`finish`,()=>{t.classList.toggle(`md-menu-hidden`,!0)}),p.push([t,n])}return a.addEventListener(`abort`,()=>{u.cancel(),d.cancel(),f.cancel(),p.forEach(([e,t])=>{t.cancel(),e.classList.toggle(`md-menu-hidden`,!1)}),e(!1)}),u.addEventListener(`finish`,()=>{n.classList.toggle(`animating`,!1),p.forEach(([e])=>{e.classList.toggle(`md-menu-hidden`,!1)}),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event(`closed`)),e(!0)}),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener(`click`,this.onDocumentClick,{capture:!0}),window.addEventListener(`pointerdown`,this.onWindowPointerdown),document.addEventListener(`resize`,this.onWindowResize,{passive:!0}),window.addEventListener(`resize`,this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener(`click`,this.onDocumentClick,{capture:!0}),window.removeEventListener(`pointerdown`,this.onWindowPointerdown),document.removeEventListener(`resize`,this.onWindowResize),window.removeEventListener(`resize`,this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach(e=>{e.close?.()})}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}};r([v(`.menu`)],
|
|
405
|
-
`;i(),y();var
|
|
404
|
+
@slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return b`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:this.positioning===`fixed`,"has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Do(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){let e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;let n=this.openDirection;this.dispatchEvent(new Event(`opening`)),e.classList.toggle(`animating`,!0);let r=this.openCloseAnimationSignal.start(),i=e.offsetHeight,a=n===`UP`,o=this.items,s=250/o.length,c=e.animate([{height:`0px`},{height:`${i}px`}],{duration:500,easing:Xt.EMPHASIZED}),l=t.animate([{transform:a?`translateY(-${i}px)`:``},{transform:``}],{duration:500,easing:Xt.EMPHASIZED}),u=e.animate([{opacity:0},{opacity:1}],50),d=[];for(let e=0;e<o.length;e++){let t=o[a?o.length-1-e:e],n=t.animate([{opacity:0},{opacity:1}],{duration:250,delay:s*e});t.classList.toggle(`md-menu-hidden`,!0),n.addEventListener(`finish`,()=>{t.classList.toggle(`md-menu-hidden`,!1)}),d.push([t,n])}let f=e=>{},p=new Promise(e=>{f=e});return r.addEventListener(`abort`,()=>{c.cancel(),l.cancel(),u.cancel(),d.forEach(([e,t])=>{e.classList.toggle(`md-menu-hidden`,!1),t.cancel()}),f(!0)}),c.addEventListener(`finish`,()=>{e.classList.toggle(`animating`,!1),this.openCloseAnimationSignal.finish(),f(!1)}),await p}animateClose(){let e,t=new Promise(t=>{e=t}),n=this.surfaceEl,r=this.slotEl;if(!n||!r)return e(!1),t;let i=this.openDirection===`UP`;this.dispatchEvent(new Event(`closing`)),n.classList.toggle(`animating`,!0);let a=this.openCloseAnimationSignal.start(),o=n.offsetHeight,s=this.items,c=.35,l=50/s.length,u=n.animate([{height:`${o}px`},{height:`${o*c}px`}],{duration:150,easing:Xt.EMPHASIZED_ACCELERATE}),d=r.animate([{transform:``},{transform:i?`translateY(-${o*(1-c)}px)`:``}],{duration:150,easing:Xt.EMPHASIZED_ACCELERATE}),f=n.animate([{opacity:1},{opacity:0}],{duration:50,delay:100}),p=[];for(let e=0;e<s.length;e++){let t=s[i?e:s.length-1-e],n=t.animate([{opacity:1},{opacity:0}],{duration:50,delay:50+l*e});n.addEventListener(`finish`,()=>{t.classList.toggle(`md-menu-hidden`,!0)}),p.push([t,n])}return a.addEventListener(`abort`,()=>{u.cancel(),d.cancel(),f.cancel(),p.forEach(([e,t])=>{t.cancel(),e.classList.toggle(`md-menu-hidden`,!1)}),e(!1)}),u.addEventListener(`finish`,()=>{n.classList.toggle(`animating`,!1),p.forEach(([e])=>{e.classList.toggle(`md-menu-hidden`,!1)}),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event(`closed`)),e(!0)}),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener(`click`,this.onDocumentClick,{capture:!0}),window.addEventListener(`pointerdown`,this.onWindowPointerdown),document.addEventListener(`resize`,this.onWindowResize,{passive:!0}),window.addEventListener(`resize`,this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener(`click`,this.onDocumentClick,{capture:!0}),window.removeEventListener(`pointerdown`,this.onWindowPointerdown),document.removeEventListener(`resize`,this.onWindowResize),window.removeEventListener(`resize`,this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach(e=>{e.close?.()})}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}};r([v(`.menu`)],A.prototype,`surfaceEl`,void 0),r([v(`slot`)],A.prototype,`slotEl`,void 0),r([g()],A.prototype,`anchor`,void 0),r([g()],A.prototype,`positioning`,void 0),r([g({type:Boolean})],A.prototype,`quick`,void 0),r([g({type:Boolean,attribute:`has-overflow`})],A.prototype,`hasOverflow`,void 0),r([g({type:Boolean,reflect:!0})],A.prototype,`open`,void 0),r([g({type:Number,attribute:`x-offset`})],A.prototype,`xOffset`,void 0),r([g({type:Number,attribute:`y-offset`})],A.prototype,`yOffset`,void 0),r([g({type:Number,attribute:`typeahead-delay`})],A.prototype,`typeaheadDelay`,void 0),r([g({attribute:`anchor-corner`})],A.prototype,`anchorCorner`,void 0),r([g({attribute:`menu-corner`})],A.prototype,`menuCorner`,void 0),r([g({type:Boolean,attribute:`stay-open-on-outside-click`})],A.prototype,`stayOpenOnOutsideClick`,void 0),r([g({type:Boolean,attribute:`stay-open-on-focusout`})],A.prototype,`stayOpenOnFocusout`,void 0),r([g({type:Boolean,attribute:`skip-restore-focus`})],A.prototype,`skipRestoreFocus`,void 0),r([g({attribute:`default-focus`})],A.prototype,`defaultFocus`,void 0),r([g({type:Boolean,attribute:`no-navigation-wrap`})],A.prototype,`noNavigationWrap`,void 0),r([Ae({flatten:!0})],A.prototype,`slotItems`,void 0),r([_()],A.prototype,`typeaheadActive`,void 0),C();var Ro=p`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px))}.menu{border-radius:var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px));display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit;scrollbar-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit;scrollbar-width:inherit}.item-padding{padding-block:8px}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}
|
|
405
|
+
`;i(),y();var zo=class extends A{};zo.styles=[Ro],zo=r([a(`md-menu`)],zo);var Bo=class{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(bo(this.host,{kind:To.CLICK_SELECTION}))},this.onKeydown=e=>{if(this.host.href&&e.code===`Enter`){let e=this.getInteractiveElement();e instanceof HTMLAnchorElement&&e.click()}if(e.defaultPrevented)return;let t=e.code;this.host.keepOpen&&t!==`Escape`||Do(t)&&(e.preventDefault(),this.host.dispatchEvent(bo(this.host,{kind:To.KEYDOWN,key:t})))},this.getHeadlineElements=t.getHeadlineElements,this.getSupportingTextElements=t.getSupportingTextElements,this.getDefaultElements=t.getDefaultElements,this.getInteractiveElement=t.getInteractiveElement,this.host.addController(this)}get typeaheadText(){if(this.internalTypeaheadText!==null)return this.internalTypeaheadText;let e=this.getHeadlineElements(),t=[];return e.forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.length===0&&this.getDefaultElements().forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.length===0&&this.getSupportingTextElements().forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.join(` `)}get tagName(){switch(this.host.type){case`link`:return`a`;case`button`:return`button`;default:case`menuitem`:case`option`:return`li`}}get role(){return this.host.type===`option`?`option`:`menuitem`}hostConnected(){this.host.toggleAttribute(`md-menu-item`,!0)}hostUpdate(){this.host.href&&(this.host.type=`link`)}setTypeaheadText(e){this.internalTypeaheadText=e}};i(),w(),E(),C(),y(),Jt(),da(),xn();var Vo=class extends S{constructor(){super(...arguments),this.disabled=!1,this.type=`menuitem`,this.href=``,this.target=``,this.keepOpen=!1,this.selected=!1,this.menuItemController=new Bo(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.menuItemController.typeaheadText}set typeaheadText(e){this.menuItemController.setTypeaheadText(e)}render(){return this.renderListItem(b`
|
|
406
406
|
<md-item>
|
|
407
407
|
<div slot="container">
|
|
408
408
|
${this.renderRipple()} ${this.renderFocusRing()}
|
|
@@ -441,8 +441,8 @@
|
|
|
441
441
|
<slot
|
|
442
442
|
name="trailing-supporting-text"
|
|
443
443
|
slot="trailing-supporting-text"></slot>
|
|
444
|
-
`}focus(){this.listItemRoot?.focus()}};bn(
|
|
445
|
-
`;i(),y();var
|
|
444
|
+
`}focus(){this.listItemRoot?.focus()}};bn(Vo),Vo.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0},r([g({type:Boolean,reflect:!0})],Vo.prototype,`disabled`,void 0),r([g()],Vo.prototype,`type`,void 0),r([g()],Vo.prototype,`href`,void 0),r([g()],Vo.prototype,`target`,void 0),r([g({type:Boolean,attribute:`keep-open`})],Vo.prototype,`keepOpen`,void 0),r([g({type:Boolean})],Vo.prototype,`selected`,void 0),r([v(`.list-item`)],Vo.prototype,`listItemRoot`,void 0),r([Ae({slot:`headline`})],Vo.prototype,`headlineElements`,void 0),r([Ae({slot:`supporting-text`})],Vo.prototype,`supportingTextElements`,void 0),r([Me({slot:``})],Vo.prototype,`defaultElements`,void 0),r([g({attribute:`typeahead-text`})],Vo.prototype,`typeaheadText`,null),C();var Ho=p`:host{display:flex;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item{background-color:var(--md-menu-item-container-color, transparent)}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}
|
|
445
|
+
`;i(),y();var Uo=class extends Vo{};Uo.styles=[Ho],Uo=r([a(`md-menu-item`)],Uo),i(),C(),y(),Xa();var Wo=class extends S{get item(){return this.items[0]??null}get menu(){return this.menus[0]??null}constructor(){super(),this.anchorCorner=jo.START_END,this.menuCorner=jo.START_START,this.hoverOpenDelay=400,this.hoverCloseDelay=400,this.isSubMenu=!0,this.previousOpenTimeout=0,this.previousCloseTimeout=0,this.onMouseenter=()=>{clearTimeout(this.previousOpenTimeout),clearTimeout(this.previousCloseTimeout),!this.menu?.open&&(this.hoverOpenDelay?this.previousOpenTimeout=setTimeout(()=>{this.show()},this.hoverOpenDelay):this.show())},this.onMouseleave=()=>{clearTimeout(this.previousCloseTimeout),clearTimeout(this.previousOpenTimeout),this.hoverCloseDelay?this.previousCloseTimeout=setTimeout(()=>{this.close()},this.hoverCloseDelay):this.close()},this.addEventListener(`mouseenter`,this.onMouseenter),this.addEventListener(`mouseleave`,this.onMouseleave)}render(){return b`
|
|
446
446
|
<slot
|
|
447
447
|
name="item"
|
|
448
448
|
@click=${this.onClick}
|
|
@@ -455,8 +455,8 @@
|
|
|
455
455
|
@close-menu=${this.onCloseSubmenu}
|
|
456
456
|
@slotchange=${this.onSlotchange}>
|
|
457
457
|
</slot>
|
|
458
|
-
`}firstUpdated(){this.onSlotchange()}async show(){let e=this.menu;if(!e||e.open)return;e.addEventListener(`closed`,()=>{this.item.ariaExpanded=`false`,this.dispatchEvent(So()),this.dispatchEvent(qa()),e.ariaHidden=`true`},{once:!0}),e.positioning===`document`&&(e.positioning=`absolute`),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus=`first-item`,e.removeAttribute(`aria-hidden`),e.skipRestoreFocus=!1;let t=e.open;if(e.show(),this.item.ariaExpanded=`true`,this.item.ariaHasPopup=`menu`,e.id&&this.item.setAttribute(`aria-controls`,e.id),this.dispatchEvent(qa()),this.dispatchEvent(xo()),this.item.selected=!0,!t){let t=e=>{},n=new Promise(e=>{t=e});e.addEventListener(`opened`,t,{once:!0}),await n}}async close(){let e=this.menu;if(!e||!e.open)return;this.dispatchEvent(So()),e.quick=!0,e.close(),this.dispatchEvent(qa());let t=e=>{},n=new Promise(e=>{t=e});e.addEventListener(`closed`,t,{once:!0}),await n}onSlotchange(){if(!this.item)return;this.item.ariaExpanded=`false`,this.item.ariaHasPopup=`menu`,this.menu?.id&&this.item.setAttribute(`aria-controls`,this.menu.id),this.item.keepOpen=!0;let e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden=`true`)}onClick(){this.show()}async onKeydown(e){let t=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;let n=t&&(Co.LEFT===e.code||Co.RIGHT===e.code);if((e.code===wo.SPACE||n)&&(e.preventDefault(),n&&e.stopPropagation()),!t)return;let r=this.menu;if(!r)return;let i=r.items,a=Va(i);if(a){await this.show(),a.tabIndex=0,a.focus();return}}onCloseSubmenu(e){let{itemPath:t,reason:n}=e.detail;if(t.push(this.item),this.dispatchEvent(So()),n.kind===To.KEYDOWN&&n.key===Eo.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(Ja());return}this.dispatchEvent(qa())}async onSubMenuKeydown(e){if(e.defaultPrevented)return;let{close:t,keyCode:n}=this.isSubmenuCloseKey(e.code);t&&(e.preventDefault(),(n===Co.LEFT||n===Co.RIGHT)&&e.stopPropagation(),await this.close(),za(this.menu.items),this.item?.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){let t=getComputedStyle(this).direction===`rtl`?Co.LEFT:Co.RIGHT;switch(e){case t:case wo.SPACE:case wo.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){let t=getComputedStyle(this).direction===`rtl`?Co.RIGHT:Co.LEFT;switch(e){case t:case Eo.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}};r([g({attribute:`anchor-corner`})],
|
|
459
|
-
`;i(),y();var
|
|
458
|
+
`}firstUpdated(){this.onSlotchange()}async show(){let e=this.menu;if(!e||e.open)return;e.addEventListener(`closed`,()=>{this.item.ariaExpanded=`false`,this.dispatchEvent(So()),this.dispatchEvent(qa()),e.ariaHidden=`true`},{once:!0}),e.positioning===`document`&&(e.positioning=`absolute`),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus=`first-item`,e.removeAttribute(`aria-hidden`),e.skipRestoreFocus=!1;let t=e.open;if(e.show(),this.item.ariaExpanded=`true`,this.item.ariaHasPopup=`menu`,e.id&&this.item.setAttribute(`aria-controls`,e.id),this.dispatchEvent(qa()),this.dispatchEvent(xo()),this.item.selected=!0,!t){let t=e=>{},n=new Promise(e=>{t=e});e.addEventListener(`opened`,t,{once:!0}),await n}}async close(){let e=this.menu;if(!e||!e.open)return;this.dispatchEvent(So()),e.quick=!0,e.close(),this.dispatchEvent(qa());let t=e=>{},n=new Promise(e=>{t=e});e.addEventListener(`closed`,t,{once:!0}),await n}onSlotchange(){if(!this.item)return;this.item.ariaExpanded=`false`,this.item.ariaHasPopup=`menu`,this.menu?.id&&this.item.setAttribute(`aria-controls`,this.menu.id),this.item.keepOpen=!0;let e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden=`true`)}onClick(){this.show()}async onKeydown(e){let t=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;let n=t&&(Co.LEFT===e.code||Co.RIGHT===e.code);if((e.code===wo.SPACE||n)&&(e.preventDefault(),n&&e.stopPropagation()),!t)return;let r=this.menu;if(!r)return;let i=r.items,a=Va(i);if(a){await this.show(),a.tabIndex=0,a.focus();return}}onCloseSubmenu(e){let{itemPath:t,reason:n}=e.detail;if(t.push(this.item),this.dispatchEvent(So()),n.kind===To.KEYDOWN&&n.key===Eo.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(Ja());return}this.dispatchEvent(qa())}async onSubMenuKeydown(e){if(e.defaultPrevented)return;let{close:t,keyCode:n}=this.isSubmenuCloseKey(e.code);t&&(e.preventDefault(),(n===Co.LEFT||n===Co.RIGHT)&&e.stopPropagation(),await this.close(),za(this.menu.items),this.item?.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){let t=getComputedStyle(this).direction===`rtl`?Co.LEFT:Co.RIGHT;switch(e){case t:case wo.SPACE:case wo.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){let t=getComputedStyle(this).direction===`rtl`?Co.RIGHT:Co.LEFT;switch(e){case t:case Eo.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}};r([g({attribute:`anchor-corner`})],Wo.prototype,`anchorCorner`,void 0),r([g({attribute:`menu-corner`})],Wo.prototype,`menuCorner`,void 0),r([g({type:Number,attribute:`hover-open-delay`})],Wo.prototype,`hoverOpenDelay`,void 0),r([g({type:Number,attribute:`hover-close-delay`})],Wo.prototype,`hoverCloseDelay`,void 0),r([g({type:Boolean,reflect:!0,attribute:`md-sub-menu`})],Wo.prototype,`isSubMenu`,void 0),r([Ae({slot:`item`,flatten:!0})],Wo.prototype,`items`,void 0),r([Ae({slot:`menu`,flatten:!0})],Wo.prototype,`menus`,void 0),C();var Go=p`:host{position:relative;display:flex;flex-direction:column}
|
|
459
|
+
`;i(),y();var Ko=class extends Wo{};Ko.styles=[Go],Ko=r([a(`md-sub-menu`)],Ko),i(),C(),y(),Jt(),xn();var qo=class extends S{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){let{ariaLabel:e}=this;return b`
|
|
460
460
|
<div
|
|
461
461
|
class="progress ${T(this.getRenderClasses())}"
|
|
462
462
|
role="progressbar"
|
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
aria-valuenow=${this.indeterminate?x:this.value}
|
|
467
467
|
>${this.renderIndicator()}</div
|
|
468
468
|
>
|
|
469
|
-
`}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}};bn(
|
|
469
|
+
`}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}};bn(qo),r([g({type:Number})],qo.prototype,`value`,void 0),r([g({type:Number})],qo.prototype,`max`,void 0),r([g({type:Boolean})],qo.prototype,`indeterminate`,void 0),r([g({type:Boolean,attribute:`four-color`})],qo.prototype,`fourColor`,void 0),C();var Jo=class extends qo{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){return b`
|
|
470
470
|
<svg viewBox="0 0 4800 4800">
|
|
471
471
|
<circle class="track" pathLength="100"></circle>
|
|
472
472
|
<circle
|
|
@@ -481,8 +481,8 @@
|
|
|
481
481
|
<div class="right">
|
|
482
482
|
<div class="circle"></div>
|
|
483
483
|
</div>
|
|
484
|
-
</div>`}};C();var
|
|
485
|
-
`;i(),y();var
|
|
484
|
+
</div>`}};C();var Yo=p`:host{--_active-indicator-color: var(--md-circular-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-width: var(--md-circular-progress-active-indicator-width, 10);--_four-color-active-indicator-four-color: var(--md-circular-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-circular-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-circular-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-circular-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_size: var(--md-circular-progress-size, 48px);display:inline-flex;vertical-align:middle;width:var(--_size);height:var(--_size);position:relative;align-items:center;justify-content:center;contain:strict;content-visibility:auto}.progress{flex:1;align-self:stretch;margin:4px}.progress,.spinner,.left,.right,.circle,svg,.track,.active-track{position:absolute;inset:0}svg{transform:rotate(-90deg)}circle{cx:50%;cy:50%;r:calc(50%*(1 - var(--_active-indicator-width)/100));stroke-width:calc(var(--_active-indicator-width)*1%);stroke-dasharray:100;fill:rgba(0,0,0,0)}.active-track{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1);stroke:var(--_active-indicator-color)}.track{stroke:rgba(0,0,0,0)}.progress.indeterminate{animation:linear infinite linear-rotate;animation-duration:1568.2352941176ms}.spinner{animation:infinite both rotate-arc;animation-duration:5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.left{overflow:hidden;inset:0 50% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_active-indicator-width)/100*(var(--_size) - 8px));border-color:var(--_active-indicator-color) var(--_active-indicator-color) rgba(0,0,0,0) rgba(0,0,0,0);animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:1333ms,5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.four-color .circle{animation-name:expand-arc,four-color}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:-666.5ms,0ms}@media(forced-colors: active){.active-track{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}@keyframes four-color{0%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}15%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}25%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}40%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}50%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}65%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}75%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}90%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}100%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}}
|
|
485
|
+
`;i(),y();var Xo=class extends Jo{};Xo.styles=[Yo],Xo=r([a(`md-circular-progress`)],Xo),i(),C(),y();var Zo=class extends qo{constructor(){super(...arguments),this.buffer=0}renderIndicator(){let e={transform:`scaleX(${(this.indeterminate?1:this.value/this.max)*100}%)`},t=this.buffer??0,n=t>0,r={transform:`scaleX(${(this.indeterminate||!n?1:t/this.max)*100}%)`};return b`
|
|
486
486
|
<div class="dots" ?hidden=${this.indeterminate||!n||t>=this.max||this.value>=this.max}></div>
|
|
487
487
|
<div class="inactive-track" style=${vo(r)}></div>
|
|
488
488
|
<div class="bar primary-bar" style=${vo(e)}>
|
|
@@ -491,8 +491,8 @@
|
|
|
491
491
|
<div class="bar secondary-bar">
|
|
492
492
|
<div class="bar-inner"></div>
|
|
493
493
|
</div>
|
|
494
|
-
`}};r([g({type:Number})],
|
|
495
|
-
`;i(),y();var
|
|
494
|
+
`}};r([g({type:Number})],Zo.prototype,`buffer`,void 0),C();var Qo=p`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, var(--md-sys-shape-corner-none, 0px));border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");z-index:-1}.dots[hidden]{display:none}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .primary-bar{animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate .primary-bar>.bar-inner{animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.four-color .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-color;animation-duration:2s,4s}.indeterminate .secondary-bar{animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate .secondary-bar>.bar-inner{animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.four-color .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-color;animation-duration:2s,4s}:host(:dir(rtl)){transform:scale(-1)}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(var(--_track-height) / 2 * 5))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.6714%)}100%{transform:translateX(200.611%)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.6519%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.3862%)}100%{transform:translateX(160.278%)}}@keyframes four-color{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media(forced-colors: active){:host{outline:1px solid CanvasText}.bar-inner,.dots{background-color:CanvasText}}
|
|
495
|
+
`;i(),y();var $o=class extends Zo{};$o.styles=[Qo],$o=r([a(`md-linear-progress`)],$o),i(),y();var es=Symbol(`isFocusable`),ts=Symbol(`privateIsFocusable`),ns=Symbol(`externalTabIndex`),rs=Symbol(`isUpdatingTabIndex`),is=Symbol(`updateTabIndex`);function as(e){var t,n,i;class a extends e{constructor(){super(...arguments),this[t]=!0,this[n]=null,this[i]=!1}get[es](){return this[ts]}set[es](e){this[es]!==e&&(this[ts]=e,this[is]())}connectedCallback(){super.connectedCallback(),this[is]()}attributeChangedCallback(e,t,n){if(e!==`tabindex`){super.attributeChangedCallback(e,t,n);return}if(this.requestUpdate(`tabIndex`,Number(t??-1)),!this[rs]){if(!this.hasAttribute(`tabindex`)){this[ns]=null,this[is]();return}this[ns]=this.tabIndex}}[(t=ts,n=ns,i=rs,is)](){let e=this[es]?0:-1,t=this[ns]??e;this[rs]=!0,this.tabIndex=t,this[rs]=!1}}return r([g({noAccessor:!0})],a.prototype,`tabIndex`,void 0),a}Or();var os=class extends Dr{computeValidity(e){this.radioElement||(this.radioElement=document.createElement(`input`),this.radioElement.type=`radio`,this.radioElement.name=`group`);let t=!1,n=!1;for(let{checked:r,required:i}of e)i&&(t=!0),r&&(n=!0);return this.radioElement.checked=n,this.radioElement.required=t,{validity:{valueMissing:t&&!n},validationMessage:this.radioElement.validationMessage}}equals(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.checked!==i.checked||r.required!==i.required)return!1}return!0}copy(e){return e.map(({checked:e,required:t})=>({checked:e,required:t}))}},ss=class{get controls(){let e=this.host.getAttribute(`name`);return!e||!this.root||!this.host.isConnected?[this.host]:Array.from(this.root.querySelectorAll(`[name="${e}"]`))}constructor(e){this.host=e,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=e=>{let t=e.key===`ArrowDown`,n=e.key===`ArrowUp`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`;if(!r&&!i&&!t&&!n)return;let a=this.controls;if(!a.length)return;e.preventDefault();let o=getComputedStyle(this.host).direction===`rtl`?r||t:i||t,s=a.indexOf(this.host),c=o?s+1:s-1;for(;c!==s;){c>=a.length?c=0:c<0&&(c=a.length-1);let e=a[c];if(e.hasAttribute(`disabled`)){o?c++:c--;continue}for(let t of a)t!==e&&(t.checked=!1,t.tabIndex=-1,t.blur());e.checked=!0,e.tabIndex=0,e.focus(),e.dispatchEvent(new Event(`change`,{bubbles:!0}));break}}}hostConnected(){this.root=this.host.getRootNode(),this.host.addEventListener(`keydown`,this.handleKeyDown),this.host.addEventListener(`focusin`,this.handleFocusIn),this.host.addEventListener(`focusout`,this.handleFocusOut),this.host.checked&&this.uncheckSiblings(),this.updateTabIndices()}hostDisconnected(){this.host.removeEventListener(`keydown`,this.handleKeyDown),this.host.removeEventListener(`focusin`,this.handleFocusIn),this.host.removeEventListener(`focusout`,this.handleFocusOut),this.updateTabIndices(),this.root=null}handleCheckedChange(){this.host.checked&&(this.uncheckSiblings(),this.updateTabIndices())}uncheckSiblings(){for(let e of this.controls)e!==this.host&&(e.checked=!1)}updateTabIndices(){let e=this.controls,t=e.find(e=>e.checked);if(t||this.focused){let n=t||this.host;n.tabIndex=0;for(let t of e)t!==n&&(t.tabIndex=-1);return}for(let t of e)t.tabIndex=0}};i(),w(),E(),C(),y(),Jt(),Nn(),Sr(),Tn(),Er();var cs,ls=Symbol(`checked`),us=0,ds=gr(Cr(Sn(as(S)))),fs=class extends ds{get checked(){return this[ls]}set checked(e){let t=this.checked;t!==e&&(this[ls]=e,this.requestUpdate(`checked`,t),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId=`cutout${++us}`,this[cs]=!1,this.required=!1,this.value=`on`,this.selectionController=new ss(this),this.addController(this.selectionController),this[Cn].role=`radio`,this.addEventListener(`click`,this.handleClick.bind(this)),this.addEventListener(`keydown`,this.handleKeydown.bind(this))}render(){return b`
|
|
496
496
|
<div class="container ${T({checked:this.checked})}" aria-hidden="true">
|
|
497
497
|
<md-ripple
|
|
498
498
|
part="ripple"
|
|
@@ -521,8 +521,8 @@
|
|
|
521
521
|
.value=${this.value}
|
|
522
522
|
?disabled=${this.disabled} />
|
|
523
523
|
</div>
|
|
524
|
-
`}updated(){this[Cn].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(kn(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==` `||e.defaultPrevented)&&this.click()}[(ls
|
|
525
|
-
`;i(),y();var
|
|
524
|
+
`}updated(){this[Cn].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(kn(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event(`change`,{bubbles:!0})),this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==` `||e.defaultPrevented)&&this.click()}[(cs=ls,wr)](){return this.checked?this.value:null}[Tr](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute(`checked`)}formStateRestoreCallback(e){this.checked=e===`true`}[_r](){return new os(()=>this.selectionController?this.selectionController.controls:[this])}[vr](){return this.container}};r([g({type:Boolean})],fs.prototype,`checked`,null),r([g({type:Boolean})],fs.prototype,`required`,void 0),r([g()],fs.prototype,`value`,void 0),r([v(`.container`)],fs.prototype,`container`,void 0),C();var ps=p`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}input{appearance:none;height:48px;margin:0;position:absolute;width:48px;cursor:inherit}:host([touch-target=none]) input{width:100%;height:100%}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}}
|
|
525
|
+
`;i(),y();var ms=class extends fs{};ms.styles=[ps],ms=r([a(`md-radio`)],ms),C(),Tn();var hs=Symbol(`onReportValidity`),gs=Symbol(`privateCleanupFormListeners`),_s=Symbol(`privateDoNotReportInvalid`),vs=Symbol(`privateIsSelfReportingValidity`),ys=Symbol(`privateCallOnReportValidity`);function bs(e){var t,n,r;class i extends e{constructor(...e){super(...e),this[t]=new AbortController,this[n]=!1,this[r]=!1,this.addEventListener(`invalid`,e=>{this[_s]||!e.isTrusted||this.addEventListener(`invalid`,()=>{this[ys](e)},{once:!0})},{capture:!0})}checkValidity(){this[_s]=!0;let e=super.checkValidity();return this[_s]=!1,e}reportValidity(){this[vs]=!0;let e=super.reportValidity();return e&&this[ys](null),this[vs]=!1,e}[(t=gs,n=_s,r=vs,ys)](e){let t=e?.defaultPrevented;t||(this[hs](e),!t&&e?.defaultPrevented&&(this[vs]||ws(this[Cn].form,this))&&this.focus())}[hs](e){throw Error(`Implement [onReportValidity]`)}formAssociatedCallback(e){super.formAssociatedCallback&&super.formAssociatedCallback(e),this[gs].abort(),e&&(this[gs]=new AbortController,xs(this,e,()=>{this[ys](null)},this[gs].signal))}}return i}function xs(e,t,n,r){let i=Cs(t),a=!1,o,s=!1;i.addEventListener(`before`,()=>{s=!0,o=new AbortController,a=!1,e.addEventListener(`invalid`,()=>{a=!0},{signal:o.signal})},{signal:r}),i.addEventListener(`after`,()=>{s=!1,o?.abort(),!a&&n()},{signal:r}),t.addEventListener(`submit`,()=>{s||n()},{signal:r})}var Ss=new WeakMap;function Cs(e){if(!Ss.has(e)){let t=new EventTarget;Ss.set(e,t);for(let n of[`reportValidity`,`requestSubmit`]){let r=e[n];e[n]=function(){t.dispatchEvent(new Event(`before`));let e=Reflect.apply(r,this,arguments);return t.dispatchEvent(new Event(`after`)),e}}}return Ss.get(e)}function ws(e,t){if(!e)return!0;let n;for(let t of e.elements)if(t.matches(`:invalid`)){n=t;break}return n===t}C(),Or();var Ts=class extends Dr{computeValidity(e){return this.selectControl||=document.createElement(`select`),yt(b`<option value=${e.value}></option>`,this.selectControl),this.selectControl.value=e.value,this.selectControl.required=e.required,{validity:this.selectControl.validity,validationMessage:this.selectControl.validationMessage}}equals(e,t){return e.value===t.value&&e.required===t.required}copy({value:e,required:t}){return{value:e,required:t}}};function Es(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r.selected&&t.push([r,n])}return t}i(),C(),y(),Jt(),da(),xn(),hr(),Sr(),Tn(),Er(),Xa();var Ds,Os=Symbol(`value`),ks=bs(gr(Cr(Sn(S)))),j=class extends ks{get value(){return this[Os]}set value(e){this.lastUserSetValue=e,this.select(e)}get options(){return this.menu?.items??[]}get selectedIndex(){let[e,t]=(this.getSelectedOptions()??[])[0]??[];return t??-1}set selectedIndex(e){this.lastUserSetSelectedIndex=e,this.selectIndex(e)}get selectedOptions(){return(this.getSelectedOptions()??[]).map(([e])=>e)}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText=``,this.label=``,this.noAsterisk=!1,this.supportingText=``,this.error=!1,this.menuPositioning=`popover`,this.clampMenuWidth=!1,this.typeaheadDelay=200,this.hasLeadingIcon=!1,this.displayText=``,this.menuAlign=`start`,this[Ds]=``,this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText=``,this.focused=!1,this.open=!1,this.defaultFocus=Ao.NONE,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener(`focus`,this.handleFocus.bind(this)),this.addEventListener(`blur`,this.handleBlur.bind(this))}select(e){let t=this.options.find(t=>t.value===e);t&&this.selectItem(t)}selectIndex(e){let t=this.options[e];t&&this.selectItem(t)}reset(){for(let e of this.options)e.selected=e.hasAttribute(`selected`);this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=``}[(Ds=Os,hs)](e){e?.preventDefault();let t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}update(e){if(this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open){let e=this.getBoundingClientRect();this.selectWidth=e.width}this.prevOpen=this.open,super.update(e)}render(){return b`
|
|
526
526
|
<span
|
|
527
527
|
class="select ${T(this.getRenderClasses())}"
|
|
528
528
|
@focusout=${this.handleFocusout}>
|
|
@@ -604,10 +604,10 @@
|
|
|
604
604
|
@request-deselection=${this.handleRequestDeselection}>
|
|
605
605
|
${this.renderMenuContent()}
|
|
606
606
|
</md-menu>
|
|
607
|
-
</div>`}renderMenuContent(){return b`<slot></slot>`}handleKeydown(e){if(this.open||this.disabled||!this.menu)return;let t=this.menu.typeaheadController,n=e.code===`Space`||e.code===`ArrowDown`||e.code===`ArrowUp`||e.code===`End`||e.code===`Home`||e.code===`Enter`;if(!t.isTypingAhead&&n){switch(e.preventDefault(),this.open=!0,e.code){case`Space`:case`ArrowDown`:case`Enter`:this.defaultFocus=Ao.NONE;break;case`End`:this.defaultFocus=Ao.LAST_ITEM;break;case`ArrowUp`:case`Home`:this.defaultFocus=Ao.FIRST_ITEM;break;default:break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();let{lastActiveRecord:n}=t;if(!n)return;this.labelEl?.setAttribute?.(`aria-live`,`polite`),this.selectItem(n[No.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&ko(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;let e=this.menu.items;return this.lastSelectedOptionRecords=Ds(e),this.lastSelectedOptionRecords}async getUpdateComplete(){return await this.menu?.updateComplete,super.getUpdateComplete()}updateValueAndDisplayText(){let e=this.getSelectedOptions()??[],t=!1;if(e.length){let[n]=e[0];t=this.lastSelectedOption!==n,this.lastSelectedOption=n,this[ks]=n.value,this.displayText=n.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[ks]=``,this.displayText=``;return t}async handleOpening(e){if(this.labelEl?.removeAttribute?.(`aria-live`),this.redispatchEvent(e),this.defaultFocus!==Ao.NONE)return;let t=this.menu.items,n=Ba(t)?.item,[r]=this.lastSelectedOptionRecords[0]??[null];n&&n!==r&&(n.tabIndex=-1),r??=t[0],r&&(r.tabIndex=0,r.focus())}redispatchEvent(e){mr(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){let t=e.detail.reason,n=e.detail.itemPath[0];this.open=!1;let r=!1;t.kind===`click-selection`||t.kind===`keydown`&&Oo(t.key)?r=this.selectItem(n):(n.tabIndex=-1,n.blur()),r&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([t])=>{e!==t&&(t.selected=!1)}),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){let t=e.target;this.lastSelectedOptionRecords.some(([e])=>e===t)||this.selectItem(t)}handleRequestDeselection(e){let t=e.target;this.lastSelectedOptionRecords.some(([e])=>e===t)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[wr](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){this.field?.click()}[_r](){return new Es(()=>this)}[vr](){return this.field}};bn(A),A.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0},r([g({type:Boolean})],A.prototype,`quick`,void 0),r([g({type:Boolean})],A.prototype,`required`,void 0),r([g({type:String,attribute:`error-text`})],A.prototype,`errorText`,void 0),r([g()],A.prototype,`label`,void 0),r([g({type:Boolean,attribute:`no-asterisk`})],A.prototype,`noAsterisk`,void 0),r([g({type:String,attribute:`supporting-text`})],A.prototype,`supportingText`,void 0),r([g({type:Boolean,reflect:!0})],A.prototype,`error`,void 0),r([g({attribute:`menu-positioning`})],A.prototype,`menuPositioning`,void 0),r([g({type:Boolean,attribute:`clamp-menu-width`})],A.prototype,`clampMenuWidth`,void 0),r([g({type:Number,attribute:`typeahead-delay`})],A.prototype,`typeaheadDelay`,void 0),r([g({type:Boolean,attribute:`has-leading-icon`})],A.prototype,`hasLeadingIcon`,void 0),r([g({attribute:`display-text`})],A.prototype,`displayText`,void 0),r([g({attribute:`menu-align`})],A.prototype,`menuAlign`,void 0),r([g()],A.prototype,`value`,null),r([g({type:Number,attribute:`selected-index`})],A.prototype,`selectedIndex`,null),r([_()],A.prototype,`nativeError`,void 0),r([_()],A.prototype,`nativeErrorText`,void 0),r([_()],A.prototype,`focused`,void 0),r([_()],A.prototype,`open`,void 0),r([_()],A.prototype,`defaultFocus`,void 0),r([v(`.field`)],A.prototype,`field`,void 0),r([v(`md-menu`)],A.prototype,`menu`,void 0),r([v(`#label`)],A.prototype,`labelEl`,void 0),r([Ae({slot:`leading-icon`,flatten:!0})],A.prototype,`leadingIcons`,void 0),da();var js=class extends A{constructor(){super(...arguments),this.fieldTag=oa`md-filled-field`}};C();var Ms=p`:host{--_text-field-active-indicator-color: var(--md-filled-select-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-active-indicator-height: var(--md-filled-select-text-field-active-indicator-height, 1px);--_text-field-container-color: var(--md-filled-select-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_text-field-disabled-active-indicator-color: var(--md-filled-select-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-active-indicator-height: var(--md-filled-select-text-field-disabled-active-indicator-height, 1px);--_text-field-disabled-active-indicator-opacity: var(--md-filled-select-text-field-disabled-active-indicator-opacity, 0.38);--_text-field-disabled-container-color: var(--md-filled-select-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-container-opacity: var(--md-filled-select-text-field-disabled-container-opacity, 0.04);--_text-field-disabled-input-text-color: var(--md-filled-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-filled-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-filled-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-filled-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-filled-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-filled-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-supporting-text-color: var(--md-filled-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-filled-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-filled-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-filled-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-active-indicator-color: var(--md-filled-select-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-active-indicator-color: var(--md-filled-select-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-input-text-color: var(--md-filled-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-filled-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-filled-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-supporting-text-color: var(--md-filled-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-filled-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-active-indicator-color: var(--md-filled-select-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-input-text-color: var(--md-filled-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-filled-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-filled-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-state-layer-color: var(--md-filled-select-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-state-layer-opacity: var(--md-filled-select-text-field-error-hover-state-layer-opacity, 0.08);--_text-field-error-hover-supporting-text-color: var(--md-filled-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-filled-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-filled-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-filled-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-filled-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-supporting-text-color: var(--md-filled-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-filled-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-active-indicator-color: var(--md-filled-select-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-active-indicator-height: var(--md-filled-select-text-field-focus-active-indicator-height, 3px);--_text-field-focus-input-text-color: var(--md-filled-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-filled-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-filled-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-supporting-text-color: var(--md-filled-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-filled-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-active-indicator-color: var(--md-filled-select-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-active-indicator-height: var(--md-filled-select-text-field-hover-active-indicator-height, 1px);--_text-field-hover-input-text-color: var(--md-filled-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-filled-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-filled-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-state-layer-color: var(--md-filled-select-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-state-layer-opacity: var(--md-filled-select-text-field-hover-state-layer-opacity, 0.08);--_text-field-hover-supporting-text-color: var(--md-filled-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-filled-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-filled-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-filled-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-filled-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-filled-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-filled-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-filled-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-filled-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-filled-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-filled-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-filled-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-filled-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-filled-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-filled-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-filled-select-text-field-leading-icon-size, 24px);--_text-field-supporting-text-color: var(--md-filled-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-filled-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-filled-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-filled-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-filled-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-filled-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-filled-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-filled-select-text-field-container-shape-start-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-filled-select-text-field-container-shape-start-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-filled-select-text-field-container-shape-end-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_text-field-container-shape-end-start: var(--md-filled-select-text-field-container-shape-end-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--md-filled-field-active-indicator-color: var(--_text-field-active-indicator-color);--md-filled-field-active-indicator-height: var(--_text-field-active-indicator-height);--md-filled-field-container-color: var(--_text-field-container-color);--md-filled-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-filled-field-content-color: var(--_text-field-input-text-color);--md-filled-field-content-font: var(--_text-field-input-text-font);--md-filled-field-content-line-height: var(--_text-field-input-text-line-height);--md-filled-field-content-size: var(--_text-field-input-text-size);--md-filled-field-content-weight: var(--_text-field-input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_text-field-disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_text-field-disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_text-field-disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_text-field-disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_text-field-disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_text-field-error-active-indicator-color);--md-filled-field-error-content-color: var(--_text-field-error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_text-field-error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_text-field-error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_text-field-error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_text-field-error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-filled-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_text-field-focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_text-field-focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_text-field-hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_text-field-hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_text-field-hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_text-field-hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_text-field-label-text-color);--md-filled-field-label-text-font: var(--_text-field-label-text-font);--md-filled-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-filled-field-label-text-size: var(--_text-field-label-text-size);--md-filled-field-label-text-weight: var(--_text-field-label-text-weight);--md-filled-field-leading-content-color: var(--_text-field-leading-icon-color);--md-filled-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-filled-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-filled-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-filled-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
|
|
608
|
-
`;C();var
|
|
609
|
-
`;i(),y();var Ps=class extends js{};Ps.styles=[Ns,Ms],Ps=r([a(`md-filled-select`)],Ps),da();var Fs=class extends A{constructor(){super(...arguments),this.fieldTag=oa`md-outlined-field`}};C();var Is=p`:host{--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-outlined-select-text-field-container-shape-start-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-outlined-select-text-field-container-shape-start-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-outlined-select-text-field-container-shape-end-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-start: var(--md-outlined-select-text-field-container-shape-end-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
|
|
610
|
-
`;i(),y();var
|
|
607
|
+
</div>`}renderMenuContent(){return b`<slot></slot>`}handleKeydown(e){if(this.open||this.disabled||!this.menu)return;let t=this.menu.typeaheadController,n=e.code===`Space`||e.code===`ArrowDown`||e.code===`ArrowUp`||e.code===`End`||e.code===`Home`||e.code===`Enter`;if(!t.isTypingAhead&&n){switch(e.preventDefault(),this.open=!0,e.code){case`Space`:case`ArrowDown`:case`Enter`:this.defaultFocus=Ao.NONE;break;case`End`:this.defaultFocus=Ao.LAST_ITEM;break;case`ArrowUp`:case`Home`:this.defaultFocus=Ao.FIRST_ITEM;break;default:break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();let{lastActiveRecord:n}=t;if(!n)return;this.labelEl?.setAttribute?.(`aria-live`,`polite`),this.selectItem(n[No.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&ko(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;let e=this.menu.items;return this.lastSelectedOptionRecords=Es(e),this.lastSelectedOptionRecords}async getUpdateComplete(){return await this.menu?.updateComplete,super.getUpdateComplete()}updateValueAndDisplayText(){let e=this.getSelectedOptions()??[],t=!1;if(e.length){let[n]=e[0];t=this.lastSelectedOption!==n,this.lastSelectedOption=n,this[Os]=n.value,this.displayText=n.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[Os]=``,this.displayText=``;return t}async handleOpening(e){if(this.labelEl?.removeAttribute?.(`aria-live`),this.redispatchEvent(e),this.defaultFocus!==Ao.NONE)return;let t=this.menu.items,n=Ba(t)?.item,[r]=this.lastSelectedOptionRecords[0]??[null];n&&n!==r&&(n.tabIndex=-1),r??=t[0],r&&(r.tabIndex=0,r.focus())}redispatchEvent(e){mr(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){let t=e.detail.reason,n=e.detail.itemPath[0];this.open=!1;let r=!1;t.kind===`click-selection`||t.kind===`keydown`&&Oo(t.key)?r=this.selectItem(n):(n.tabIndex=-1,n.blur()),r&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([t])=>{e!==t&&(t.selected=!1)}),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){let t=e.target;this.lastSelectedOptionRecords.some(([e])=>e===t)||this.selectItem(t)}handleRequestDeselection(e){let t=e.target;this.lastSelectedOptionRecords.some(([e])=>e===t)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[wr](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){this.field?.click()}[_r](){return new Ts(()=>this)}[vr](){return this.field}};bn(j),j.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0},r([g({type:Boolean})],j.prototype,`quick`,void 0),r([g({type:Boolean})],j.prototype,`required`,void 0),r([g({type:String,attribute:`error-text`})],j.prototype,`errorText`,void 0),r([g()],j.prototype,`label`,void 0),r([g({type:Boolean,attribute:`no-asterisk`})],j.prototype,`noAsterisk`,void 0),r([g({type:String,attribute:`supporting-text`})],j.prototype,`supportingText`,void 0),r([g({type:Boolean,reflect:!0})],j.prototype,`error`,void 0),r([g({attribute:`menu-positioning`})],j.prototype,`menuPositioning`,void 0),r([g({type:Boolean,attribute:`clamp-menu-width`})],j.prototype,`clampMenuWidth`,void 0),r([g({type:Number,attribute:`typeahead-delay`})],j.prototype,`typeaheadDelay`,void 0),r([g({type:Boolean,attribute:`has-leading-icon`})],j.prototype,`hasLeadingIcon`,void 0),r([g({attribute:`display-text`})],j.prototype,`displayText`,void 0),r([g({attribute:`menu-align`})],j.prototype,`menuAlign`,void 0),r([g()],j.prototype,`value`,null),r([g({type:Number,attribute:`selected-index`})],j.prototype,`selectedIndex`,null),r([_()],j.prototype,`nativeError`,void 0),r([_()],j.prototype,`nativeErrorText`,void 0),r([_()],j.prototype,`focused`,void 0),r([_()],j.prototype,`open`,void 0),r([_()],j.prototype,`defaultFocus`,void 0),r([v(`.field`)],j.prototype,`field`,void 0),r([v(`md-menu`)],j.prototype,`menu`,void 0),r([v(`#label`)],j.prototype,`labelEl`,void 0),r([Ae({slot:`leading-icon`,flatten:!0})],j.prototype,`leadingIcons`,void 0),da();var As=class extends j{constructor(){super(...arguments),this.fieldTag=oa`md-filled-field`}};C();var js=p`:host{--_text-field-active-indicator-color: var(--md-filled-select-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-active-indicator-height: var(--md-filled-select-text-field-active-indicator-height, 1px);--_text-field-container-color: var(--md-filled-select-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_text-field-disabled-active-indicator-color: var(--md-filled-select-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-active-indicator-height: var(--md-filled-select-text-field-disabled-active-indicator-height, 1px);--_text-field-disabled-active-indicator-opacity: var(--md-filled-select-text-field-disabled-active-indicator-opacity, 0.38);--_text-field-disabled-container-color: var(--md-filled-select-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-container-opacity: var(--md-filled-select-text-field-disabled-container-opacity, 0.04);--_text-field-disabled-input-text-color: var(--md-filled-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-filled-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-filled-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-filled-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-filled-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-filled-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-supporting-text-color: var(--md-filled-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-filled-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-filled-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-filled-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-active-indicator-color: var(--md-filled-select-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-active-indicator-color: var(--md-filled-select-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-input-text-color: var(--md-filled-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-filled-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-filled-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-supporting-text-color: var(--md-filled-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-filled-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-active-indicator-color: var(--md-filled-select-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-input-text-color: var(--md-filled-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-filled-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-filled-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-state-layer-color: var(--md-filled-select-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-state-layer-opacity: var(--md-filled-select-text-field-error-hover-state-layer-opacity, 0.08);--_text-field-error-hover-supporting-text-color: var(--md-filled-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-filled-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-filled-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-filled-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-filled-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-supporting-text-color: var(--md-filled-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-filled-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-active-indicator-color: var(--md-filled-select-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-active-indicator-height: var(--md-filled-select-text-field-focus-active-indicator-height, 3px);--_text-field-focus-input-text-color: var(--md-filled-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-filled-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-filled-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-supporting-text-color: var(--md-filled-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-filled-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-active-indicator-color: var(--md-filled-select-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-active-indicator-height: var(--md-filled-select-text-field-hover-active-indicator-height, 1px);--_text-field-hover-input-text-color: var(--md-filled-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-filled-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-filled-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-state-layer-color: var(--md-filled-select-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-state-layer-opacity: var(--md-filled-select-text-field-hover-state-layer-opacity, 0.08);--_text-field-hover-supporting-text-color: var(--md-filled-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-filled-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-filled-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-filled-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-filled-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-filled-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-filled-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-filled-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-filled-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-filled-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-filled-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-filled-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-filled-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-filled-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-filled-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-filled-select-text-field-leading-icon-size, 24px);--_text-field-supporting-text-color: var(--md-filled-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-filled-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-filled-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-filled-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-filled-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-filled-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-filled-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-filled-select-text-field-container-shape-start-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-filled-select-text-field-container-shape-start-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-filled-select-text-field-container-shape-end-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_text-field-container-shape-end-start: var(--md-filled-select-text-field-container-shape-end-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--md-filled-field-active-indicator-color: var(--_text-field-active-indicator-color);--md-filled-field-active-indicator-height: var(--_text-field-active-indicator-height);--md-filled-field-container-color: var(--_text-field-container-color);--md-filled-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-filled-field-content-color: var(--_text-field-input-text-color);--md-filled-field-content-font: var(--_text-field-input-text-font);--md-filled-field-content-line-height: var(--_text-field-input-text-line-height);--md-filled-field-content-size: var(--_text-field-input-text-size);--md-filled-field-content-weight: var(--_text-field-input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_text-field-disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_text-field-disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_text-field-disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_text-field-disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_text-field-disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_text-field-error-active-indicator-color);--md-filled-field-error-content-color: var(--_text-field-error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_text-field-error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_text-field-error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_text-field-error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_text-field-error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-filled-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_text-field-focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_text-field-focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_text-field-hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_text-field-hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_text-field-hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_text-field-hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_text-field-label-text-color);--md-filled-field-label-text-font: var(--_text-field-label-text-font);--md-filled-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-filled-field-label-text-size: var(--_text-field-label-text-size);--md-filled-field-label-text-weight: var(--_text-field-label-text-weight);--md-filled-field-leading-content-color: var(--_text-field-leading-icon-color);--md-filled-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-filled-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-filled-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-filled-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
|
|
608
|
+
`;C();var Ms=p`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu{min-width:var(--__menu-min-width);max-width:var(--__menu-max-width, inherit)}.menu-wrapper{width:0px;height:0px;max-width:inherit}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}
|
|
609
|
+
`;i(),y();var Ns=class extends As{};Ns.styles=[Ms,js],Ns=r([a(`md-filled-select`)],Ns),da();var Ps=class extends j{constructor(){super(...arguments),this.fieldTag=oa`md-outlined-field`}};C();var Fs=p`:host{--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-outlined-select-text-field-container-shape-start-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-outlined-select-text-field-container-shape-start-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-outlined-select-text-field-container-shape-end-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-start: var(--md-outlined-select-text-field-container-shape-end-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
|
|
610
|
+
`;i(),y();var Is=class extends Ps{};Is.styles=[Ms,Fs],Is=r([a(`md-outlined-select`)],Is);function Ls(){return new Event(`request-selection`,{bubbles:!0,composed:!0})}function Rs(){return new Event(`request-deselection`,{bubbles:!0,composed:!0})}var zs=class{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){return this.internalDisplayText===null?this.menuItemController.typeaheadText:this.internalDisplayText}setDisplayText(e){this.internalDisplayText=e}constructor(e,t){this.host=e,this.internalDisplayText=null,this.lastSelected=this.host.selected,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=e=>{this.menuItemController.onKeydown(e)},this.menuItemController=new Bo(e,t),e.addController(this)}hostUpdate(){this.lastSelected!==this.host.selected&&(this.host.ariaSelected=this.host.selected?`true`:`false`)}hostUpdated(){this.lastSelected!==this.host.selected&&!this.firstUpdate&&(this.host.selected?this.host.dispatchEvent(Ls()):this.host.dispatchEvent(Rs())),this.lastSelected=this.host.selected,this.firstUpdate=!1}};i(),w(),E(),C(),y(),Jt(),xn();var Bs=class extends S{constructor(){super(...arguments),this.disabled=!1,this.isMenuItem=!0,this.selected=!1,this.value=``,this.type=`option`,this.selectOptionController=new zs(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.selectOptionController.typeaheadText}set typeaheadText(e){this.selectOptionController.setTypeaheadText(e)}get displayText(){return this.selectOptionController.displayText}set displayText(e){this.selectOptionController.setDisplayText(e)}render(){return this.renderListItem(b`
|
|
611
611
|
<md-item>
|
|
612
612
|
<div slot="container">
|
|
613
613
|
${this.renderRipple()} ${this.renderFocusRing()}
|
|
@@ -645,16 +645,16 @@
|
|
|
645
645
|
<slot
|
|
646
646
|
name="trailing-supporting-text"
|
|
647
647
|
slot="trailing-supporting-text"></slot>
|
|
648
|
-
`}focus(){this.listItemRoot?.focus()}};bn(
|
|
649
|
-
`;function
|
|
648
|
+
`}focus(){this.listItemRoot?.focus()}};bn(Bs),Bs.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0},r([g({type:Boolean,reflect:!0})],Bs.prototype,`disabled`,void 0),r([g({type:Boolean,attribute:`md-menu-item`,reflect:!0})],Bs.prototype,`isMenuItem`,void 0),r([g({type:Boolean})],Bs.prototype,`selected`,void 0),r([g()],Bs.prototype,`value`,void 0),r([v(`.list-item`)],Bs.prototype,`listItemRoot`,void 0),r([Ae({slot:`headline`})],Bs.prototype,`headlineElements`,void 0),r([Ae({slot:`supporting-text`})],Bs.prototype,`supportingTextElements`,void 0),r([Me({slot:``})],Bs.prototype,`defaultElements`,void 0),r([g({attribute:`typeahead-text`})],Bs.prototype,`typeaheadText`,null),r([g({attribute:`display-text`})],Bs.prototype,`displayText`,null),i(),y();var Vs=class extends Bs{};Vs.styles=[Ho],Vs=r([a(`md-select-option`)],Vs),C();var Hs=p`@media(forced-colors: active){:host{--md-slider-active-track-color: CanvasText;--md-slider-disabled-active-track-color: GrayText;--md-slider-disabled-active-track-opacity: 1;--md-slider-disabled-handle-color: GrayText;--md-slider-disabled-inactive-track-color: GrayText;--md-slider-disabled-inactive-track-opacity: 1;--md-slider-focus-handle-color: CanvasText;--md-slider-handle-color: CanvasText;--md-slider-handle-shadow-color: Canvas;--md-slider-hover-handle-color: CanvasText;--md-slider-hover-state-layer-color: Canvas;--md-slider-hover-state-layer-opacity: 1;--md-slider-inactive-track-color: Canvas;--md-slider-label-container-color: Canvas;--md-slider-label-text-color: CanvasText;--md-slider-pressed-handle-color: CanvasText;--md-slider-pressed-state-layer-color: Canvas;--md-slider-pressed-state-layer-opacity: 1;--md-slider-with-overlap-handle-outline-color: CanvasText}.label,.label::before{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}:host(:not([disabled])) .track::before{border:1px solid var(--_active-track-color)}.tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='CanvasText'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}.tickmarks::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}:host([disabled]) .tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}}
|
|
649
|
+
`;function Us(e,t,n){return e?t(e):n?.(e)}i(),At(),w(),E(),C(),y(),Jt(),xn(),Nn(),hr(),Tn(),Er();var Ws=Cr(Sn(S)),M=class extends Ws{get nameStart(){return this.getAttribute(`name-start`)??this.name}set nameStart(e){this.setAttribute(`name-start`,e)}get nameEnd(){return this.getAttribute(`name-end`)??this.nameStart}set nameEnd(e){this.setAttribute(`name-end`,e)}get renderAriaLabelStart(){let{ariaLabel:e}=this;return this.ariaLabelStart||e&&`${e} start`||this.valueLabelStart||String(this.valueStart)}get renderAriaValueTextStart(){return this.ariaValueTextStart||this.valueLabelStart||String(this.valueStart)}get renderAriaLabelEnd(){let{ariaLabel:e}=this;return this.range?this.ariaLabelEnd||e&&`${e} end`||this.valueLabelEnd||String(this.valueEnd):e||this.valueLabel||String(this.value)}get renderAriaValueTextEnd(){if(this.range)return this.ariaValueTextEnd||this.valueLabelEnd||String(this.valueEnd);let{ariaValueText:e}=this;return e||this.valueLabel||String(this.value)}constructor(){super(),this.min=0,this.max=100,this.valueLabel=``,this.valueLabelStart=``,this.valueLabelEnd=``,this.ariaLabelStart=``,this.ariaValueTextStart=``,this.ariaLabelEnd=``,this.ariaValueTextEnd=``,this.step=1,this.ticks=!1,this.labeled=!1,this.range=!1,this.handleStartHover=!1,this.handleEndHover=!1,this.startOnTop=!1,this.handlesOverlapping=!1,this.ripplePointerId=1,this.isRedispatchingEvent=!1,this.addEventListener(`click`,e=>{!kn(e)||!this.inputEnd||(this.focus(),On(this.inputEnd))})}focus(){this.inputEnd?.focus()}willUpdate(e){this.renderValueStart=e.has(`valueStart`)?this.valueStart:this.inputStart?.valueAsNumber;let t=e.has(`valueEnd`)&&this.range||e.has(`value`);this.renderValueEnd=t?this.range?this.valueEnd:this.value:this.inputEnd?.valueAsNumber,e.get(`handleStartHover`)===void 0?e.get(`handleEndHover`)!==void 0&&this.toggleRippleHover(this.rippleEnd,this.handleEndHover):this.toggleRippleHover(this.rippleStart,this.handleStartHover)}updated(e){if(this.range&&(this.renderValueStart=this.inputStart.valueAsNumber),this.renderValueEnd=this.inputEnd.valueAsNumber,this.range){let e=(this.max-this.min)/3;if(this.valueStart===void 0){this.inputStart.valueAsNumber=this.min+e;let t=this.inputStart.valueAsNumber;this.valueStart=this.renderValueStart=t}if(this.valueEnd===void 0){this.inputEnd.valueAsNumber=this.min+2*e;let t=this.inputEnd.valueAsNumber;this.valueEnd=this.renderValueEnd=t}}else this.value??=this.renderValueEnd;if(e.has(`range`)||e.has(`renderValueStart`)||e.has(`renderValueEnd`)||this.isUpdatePending){let e=this.handleStart?.querySelector(`.handleNub`),t=this.handleEnd?.querySelector(`.handleNub`);this.handlesOverlapping=Ks(e,t)}this.performUpdate()}render(){let e=this.step===0?1:this.step,t=Math.max(this.max-this.min,e),n=this.range?((this.renderValueStart??this.min)-this.min)/t:0,r=((this.renderValueEnd??this.min)-this.min)/t,i={"--_start-fraction":String(n),"--_end-fraction":String(r),"--_tick-count":String(t/e)},a={ranged:this.range},o=this.valueLabelStart||String(this.renderValueStart),s=(this.range?this.valueLabelEnd:this.valueLabel)||String(this.renderValueEnd),c={start:!0,value:this.renderValueStart,ariaLabel:this.renderAriaLabelStart,ariaValueText:this.renderAriaValueTextStart,ariaMin:this.min,ariaMax:this.valueEnd??this.max},l={start:!1,value:this.renderValueEnd,ariaLabel:this.renderAriaLabelEnd,ariaValueText:this.renderAriaValueTextEnd,ariaMin:this.range?this.valueStart??this.min:this.min,ariaMax:this.max},u={start:!0,hover:this.handleStartHover,label:o},d={start:!1,hover:this.handleEndHover,label:s},f={hover:this.handleStartHover||this.handleEndHover};return b` <div
|
|
650
650
|
class="container ${T(a)}"
|
|
651
651
|
style=${vo(i)}>
|
|
652
|
-
${
|
|
652
|
+
${Us(this.range,()=>this.renderInput(c))}
|
|
653
653
|
${this.renderInput(l)} ${this.renderTrack()}
|
|
654
654
|
<div class="handleContainerPadded">
|
|
655
655
|
<div class="handleContainerBlock">
|
|
656
656
|
<div class="handleContainer ${T(f)}">
|
|
657
|
-
${
|
|
657
|
+
${Us(this.range,()=>this.renderHandle(u))}
|
|
658
658
|
${this.renderHandle(d)}
|
|
659
659
|
</div>
|
|
660
660
|
</div>
|
|
@@ -674,7 +674,7 @@
|
|
|
674
674
|
<div class="handleNub">
|
|
675
675
|
<md-elevation part="elevation"></md-elevation>
|
|
676
676
|
</div>
|
|
677
|
-
${
|
|
677
|
+
${Us(this.labeled,()=>this.renderLabel(n))}
|
|
678
678
|
</div>`}renderInput({start:e,value:t,ariaLabel:n,ariaValueText:r,ariaMin:i,ariaMax:a}){let o=e?`start`:`end`;return b`<input
|
|
679
679
|
type="range"
|
|
680
680
|
class="${T({start:e,end:!e})}"
|
|
@@ -698,8 +698,8 @@
|
|
|
698
698
|
.value=${String(t)}
|
|
699
699
|
.tabIndex=${+!!e}
|
|
700
700
|
aria-label=${n||x}
|
|
701
|
-
aria-valuetext=${r} />`}async toggleRippleHover(e,t){let n=await e;n&&(t?n.handlePointerenter(new PointerEvent(`pointerenter`,{isPrimary:!0,pointerId:this.ripplePointerId})):n.handlePointerleave(new PointerEvent(`pointerleave`,{isPrimary:!0,pointerId:this.ripplePointerId})))}handleFocus(e){this.updateOnTop(e.target)}startAction(e){let t=e.target,n=t===this.inputStart?this.inputEnd:this.inputStart;this.action={canFlip:e.type===`pointerdown`,flipped:!1,target:t,fixed:n,values:new Map([[t,t.valueAsNumber],[n,n?.valueAsNumber]])}}finishAction(e){this.action=void 0}handleKeydown(e){this.startAction(e)}handleKeyup(e){this.finishAction(e)}handleDown(e){this.startAction(e),this.ripplePointerId=e.pointerId;let t=e.target===this.inputStart;this.handleStartHover=!this.disabled&&t&&!!this.handleStart,this.handleEndHover=!this.disabled&&!t&&!!this.handleEnd}async handleUp(e){if(!this.action)return;let{target:t,values:n,flipped:r}=this.action;await new Promise(requestAnimationFrame),t!==void 0&&(t.focus(),r&&t.valueAsNumber!==n.get(t)&&t.dispatchEvent(new Event(`change`,{bubbles:!0}))),this.finishAction(e)}handleMove(e){this.handleStartHover=!this.disabled&&Ks(e,this.handleStart),this.handleEndHover=!this.disabled&&Ks(e,this.handleEnd)}handleEnter(e){this.handleMove(e)}handleLeave(){this.handleStartHover=!1,this.handleEndHover=!1}updateOnTop(e){this.startOnTop=e.classList.contains(`start`)}needsClamping(){if(!this.action)return!1;let{target:e,fixed:t}=this.action;return e===this.inputStart?e.valueAsNumber>t.valueAsNumber:e.valueAsNumber<t.valueAsNumber}isActionFlipped(){let{action:e}=this;if(!e)return!1;let{target:t,fixed:n,values:r}=e;return e.canFlip&&r.get(t)===r.get(n)&&this.needsClamping()&&(e.canFlip=!1,e.flipped=!0,e.target=n,e.fixed=t),e.flipped}flipAction(){if(!this.action)return!1;let{target:e,fixed:t,values:n}=this.action,r=e.valueAsNumber!==t.valueAsNumber;return e.valueAsNumber=t.valueAsNumber,t.valueAsNumber=n.get(t),r}clampAction(){if(!this.needsClamping()||!this.action)return!1;let{target:e,fixed:t}=this.action;return e.valueAsNumber=t.valueAsNumber,!0}handleInput(e){if(this.isRedispatchingEvent)return;let t=!1,n=!1;this.range&&(this.isActionFlipped()&&(t=!0,n=this.flipAction()),this.clampAction()&&(t=!0,n=!1));let r=e.target;this.updateOnTop(r),this.range?(this.valueStart=this.inputStart.valueAsNumber,this.valueEnd=this.inputEnd.valueAsNumber):this.value=this.inputEnd.valueAsNumber,t&&e.stopPropagation(),n&&(this.isRedispatchingEvent=!0,mr(r,e),this.isRedispatchingEvent=!1)}handleChange(e){let t=e.target,{target:n,values:r}=this.action??{};n&&n.valueAsNumber===r.get(t)||mr(this,e),this.finishAction(e)}[wr](){if(this.range){let e=new FormData;return e.append(this.nameStart,String(this.valueStart)),e.append(this.nameEnd,String(this.valueEnd)),e}return String(this.value)}formResetCallback(){if(this.range){let e=this.getAttribute(`value-start`);this.valueStart=e===null?void 0:Number(e);let t=this.getAttribute(`value-end`);this.valueEnd=t===null?void 0:Number(t);return}let e=this.getAttribute(`value`);this.value=e===null?void 0:Number(e)}formStateRestoreCallback(e){if(Array.isArray(e)){let[[,t],[,n]]=e;this.valueStart=Number(t),this.valueEnd=Number(n),this.range=!0;return}this.value=Number(e),this.range=!1}};bn(j),j.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0},r([g({type:Number})],j.prototype,`min`,void 0),r([g({type:Number})],j.prototype,`max`,void 0),r([g({type:Number})],j.prototype,`value`,void 0),r([g({type:Number,attribute:`value-start`})],j.prototype,`valueStart`,void 0),r([g({type:Number,attribute:`value-end`})],j.prototype,`valueEnd`,void 0),r([g({attribute:`value-label`})],j.prototype,`valueLabel`,void 0),r([g({attribute:`value-label-start`})],j.prototype,`valueLabelStart`,void 0),r([g({attribute:`value-label-end`})],j.prototype,`valueLabelEnd`,void 0),r([g({attribute:`aria-label-start`})],j.prototype,`ariaLabelStart`,void 0),r([g({attribute:`aria-valuetext-start`})],j.prototype,`ariaValueTextStart`,void 0),r([g({attribute:`aria-label-end`})],j.prototype,`ariaLabelEnd`,void 0),r([g({attribute:`aria-valuetext-end`})],j.prototype,`ariaValueTextEnd`,void 0),r([g({type:Number})],j.prototype,`step`,void 0),r([g({type:Boolean})],j.prototype,`ticks`,void 0),r([g({type:Boolean})],j.prototype,`labeled`,void 0),r([g({type:Boolean})],j.prototype,`range`,void 0),r([v(`input.start`)],j.prototype,`inputStart`,void 0),r([v(`.handle.start`)],j.prototype,`handleStart`,void 0),r([Oe(`md-ripple.start`)],j.prototype,`rippleStart`,void 0),r([v(`input.end`)],j.prototype,`inputEnd`,void 0),r([v(`.handle.end`)],j.prototype,`handleEnd`,void 0),r([Oe(`md-ripple.end`)],j.prototype,`rippleEnd`,void 0),r([_()],j.prototype,`handleStartHover`,void 0),r([_()],j.prototype,`handleEndHover`,void 0),r([_()],j.prototype,`startOnTop`,void 0),r([_()],j.prototype,`handlesOverlapping`,void 0),r([_()],j.prototype,`renderValueStart`,void 0),r([_()],j.prototype,`renderValueEnd`,void 0);function Ks({x:e,y:t},n){if(!n)return!1;let{top:r,left:i,bottom:a,right:o}=n.getBoundingClientRect();return e>=i&&e<=o&&t>=r&&t<=a}function qs(e,t){if(!(e&&t))return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return!(n.top>r.bottom||n.right<r.left||n.bottom<r.top||n.left>r.right)}C();var Js=p`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)}
|
|
702
|
-
`;i(),y();var
|
|
701
|
+
aria-valuetext=${r} />`}async toggleRippleHover(e,t){let n=await e;n&&(t?n.handlePointerenter(new PointerEvent(`pointerenter`,{isPrimary:!0,pointerId:this.ripplePointerId})):n.handlePointerleave(new PointerEvent(`pointerleave`,{isPrimary:!0,pointerId:this.ripplePointerId})))}handleFocus(e){this.updateOnTop(e.target)}startAction(e){let t=e.target,n=t===this.inputStart?this.inputEnd:this.inputStart;this.action={canFlip:e.type===`pointerdown`,flipped:!1,target:t,fixed:n,values:new Map([[t,t.valueAsNumber],[n,n?.valueAsNumber]])}}finishAction(e){this.action=void 0}handleKeydown(e){this.startAction(e)}handleKeyup(e){this.finishAction(e)}handleDown(e){this.startAction(e),this.ripplePointerId=e.pointerId;let t=e.target===this.inputStart;this.handleStartHover=!this.disabled&&t&&!!this.handleStart,this.handleEndHover=!this.disabled&&!t&&!!this.handleEnd}async handleUp(e){if(!this.action)return;let{target:t,values:n,flipped:r}=this.action;await new Promise(requestAnimationFrame),t!==void 0&&(t.focus(),r&&t.valueAsNumber!==n.get(t)&&t.dispatchEvent(new Event(`change`,{bubbles:!0}))),this.finishAction(e)}handleMove(e){this.handleStartHover=!this.disabled&&Gs(e,this.handleStart),this.handleEndHover=!this.disabled&&Gs(e,this.handleEnd)}handleEnter(e){this.handleMove(e)}handleLeave(){this.handleStartHover=!1,this.handleEndHover=!1}updateOnTop(e){this.startOnTop=e.classList.contains(`start`)}needsClamping(){if(!this.action)return!1;let{target:e,fixed:t}=this.action;return e===this.inputStart?e.valueAsNumber>t.valueAsNumber:e.valueAsNumber<t.valueAsNumber}isActionFlipped(){let{action:e}=this;if(!e)return!1;let{target:t,fixed:n,values:r}=e;return e.canFlip&&r.get(t)===r.get(n)&&this.needsClamping()&&(e.canFlip=!1,e.flipped=!0,e.target=n,e.fixed=t),e.flipped}flipAction(){if(!this.action)return!1;let{target:e,fixed:t,values:n}=this.action,r=e.valueAsNumber!==t.valueAsNumber;return e.valueAsNumber=t.valueAsNumber,t.valueAsNumber=n.get(t),r}clampAction(){if(!this.needsClamping()||!this.action)return!1;let{target:e,fixed:t}=this.action;return e.valueAsNumber=t.valueAsNumber,!0}handleInput(e){if(this.isRedispatchingEvent)return;let t=!1,n=!1;this.range&&(this.isActionFlipped()&&(t=!0,n=this.flipAction()),this.clampAction()&&(t=!0,n=!1));let r=e.target;this.updateOnTop(r),this.range?(this.valueStart=this.inputStart.valueAsNumber,this.valueEnd=this.inputEnd.valueAsNumber):this.value=this.inputEnd.valueAsNumber,t&&e.stopPropagation(),n&&(this.isRedispatchingEvent=!0,mr(r,e),this.isRedispatchingEvent=!1)}handleChange(e){let t=e.target,{target:n,values:r}=this.action??{};n&&n.valueAsNumber===r.get(t)||mr(this,e),this.finishAction(e)}[wr](){if(this.range){let e=new FormData;return e.append(this.nameStart,String(this.valueStart)),e.append(this.nameEnd,String(this.valueEnd)),e}return String(this.value)}formResetCallback(){if(this.range){let e=this.getAttribute(`value-start`);this.valueStart=e===null?void 0:Number(e);let t=this.getAttribute(`value-end`);this.valueEnd=t===null?void 0:Number(t);return}let e=this.getAttribute(`value`);this.value=e===null?void 0:Number(e)}formStateRestoreCallback(e){if(Array.isArray(e)){let[[,t],[,n]]=e;this.valueStart=Number(t),this.valueEnd=Number(n),this.range=!0;return}this.value=Number(e),this.range=!1}};bn(M),M.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0},r([g({type:Number})],M.prototype,`min`,void 0),r([g({type:Number})],M.prototype,`max`,void 0),r([g({type:Number})],M.prototype,`value`,void 0),r([g({type:Number,attribute:`value-start`})],M.prototype,`valueStart`,void 0),r([g({type:Number,attribute:`value-end`})],M.prototype,`valueEnd`,void 0),r([g({attribute:`value-label`})],M.prototype,`valueLabel`,void 0),r([g({attribute:`value-label-start`})],M.prototype,`valueLabelStart`,void 0),r([g({attribute:`value-label-end`})],M.prototype,`valueLabelEnd`,void 0),r([g({attribute:`aria-label-start`})],M.prototype,`ariaLabelStart`,void 0),r([g({attribute:`aria-valuetext-start`})],M.prototype,`ariaValueTextStart`,void 0),r([g({attribute:`aria-label-end`})],M.prototype,`ariaLabelEnd`,void 0),r([g({attribute:`aria-valuetext-end`})],M.prototype,`ariaValueTextEnd`,void 0),r([g({type:Number})],M.prototype,`step`,void 0),r([g({type:Boolean})],M.prototype,`ticks`,void 0),r([g({type:Boolean})],M.prototype,`labeled`,void 0),r([g({type:Boolean})],M.prototype,`range`,void 0),r([v(`input.start`)],M.prototype,`inputStart`,void 0),r([v(`.handle.start`)],M.prototype,`handleStart`,void 0),r([Oe(`md-ripple.start`)],M.prototype,`rippleStart`,void 0),r([v(`input.end`)],M.prototype,`inputEnd`,void 0),r([v(`.handle.end`)],M.prototype,`handleEnd`,void 0),r([Oe(`md-ripple.end`)],M.prototype,`rippleEnd`,void 0),r([_()],M.prototype,`handleStartHover`,void 0),r([_()],M.prototype,`handleEndHover`,void 0),r([_()],M.prototype,`startOnTop`,void 0),r([_()],M.prototype,`handlesOverlapping`,void 0),r([_()],M.prototype,`renderValueStart`,void 0),r([_()],M.prototype,`renderValueEnd`,void 0);function Gs({x:e,y:t},n){if(!n)return!1;let{top:r,left:i,bottom:a,right:o}=n.getBoundingClientRect();return e>=i&&e<=o&&t>=r&&t<=a}function Ks(e,t){if(!(e&&t))return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return!(n.top>r.bottom||n.right<r.left||n.bottom<r.top||n.left>r.right)}C();var qs=p`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)}
|
|
702
|
+
`;i(),y();var Js=class extends M{};Js.styles=[qs,Hs],Js=r([a(`md-slider`)],Js);function Ys(e,t){let n=e[Zs];if(!n)throw Error(`'${e.type}' event needs setupDispatchHooks().`);n.addEventListener(`after`,t)}function Xs(e,...t){let n=Qs.get(e);n||(n=new Set,Qs.set(e,n));for(let r of t){if(n.has(r))continue;let t=!1;e.addEventListener(r,n=>{if(t)return;n.stopImmediatePropagation();let r=Reflect.construct(n.constructor,[n.type,n]),i=new EventTarget;r[Zs]=i,t=!0;let a=e.dispatchEvent(r);t=!1,a||n.preventDefault(),i.dispatchEvent(new Event(`after`))},{capture:!0}),n.add(r)}}var Zs,Qs,$s=t((()=>{Zs=Symbol(`dispatchHooks`),Qs=new WeakMap})),ec,tc,nc=t((()=>{i(),w(),E(),C(),y(),Jt(),xn(),$s(),Nn(),hr(),Sr(),Tn(),Er(),Ar(),ec=gr(Cr(Sn(S))),tc=class extends ec{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value=`on`,this.addEventListener(`click`,e=>{!kn(e)||!this.input||(this.focus(),On(this.input))}),Xs(this,`keydown`),this.addEventListener(`keydown`,e=>{Ys(e,()=>{e.defaultPrevented||e.key!==`Enter`||this.disabled||!this.input||this.input.click()})})}render(){return b`
|
|
703
703
|
<div class="switch ${T(this.getRenderClasses())}">
|
|
704
704
|
<input
|
|
705
705
|
id="switch"
|
|
@@ -743,8 +743,8 @@
|
|
|
743
743
|
d="M6.4 19.2 4.8 17.6 10.4 12 4.8 6.4 6.4 4.8 12 10.4 17.6 4.8 19.2 6.4 13.6 12 19.2 17.6 17.6 19.2 12 13.6Z" />
|
|
744
744
|
</svg>
|
|
745
745
|
</slot>
|
|
746
|
-
`}renderTouchTarget(){return b`<span class="touch"></span>`}shouldShowIcons(){return this.icons||this.showOnlySelectedIcon}handleInput(e){let t=e.target;this.selected=t.checked}handleChange(e){mr(this,e)}[wr](){return this.selected?this.value:null}[Tr](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute(`selected`)}formStateRestoreCallback(e){this.selected=e===`true`}[_r](){return new kr(()=>({checked:this.selected,required:this.required}))}[vr](){return this.input}},bn(nc),nc.shadowRootOptions={mode:`open`,delegatesFocus:!0},r([g({type:Boolean})],nc.prototype,`selected`,void 0),r([g({type:Boolean})],nc.prototype,`icons`,void 0),r([g({type:Boolean,attribute:`show-only-selected-icon`})],nc.prototype,`showOnlySelectedIcon`,void 0),r([g({type:Boolean})],nc.prototype,`required`,void 0),r([g()],nc.prototype,`value`,void 0),r([v(`input`)],nc.prototype,`input`,void 0)})),ic,ac=t((()=>{C(),ic=p`@layer styles, hcm;@layer styles{:host{display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-switch-track-height, 32px))/2) 0px}md-focus-ring{--md-focus-ring-shape-start-start: var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-start-end: var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-end: var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-start: var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}.switch{align-items:center;display:inline-flex;flex-shrink:0;position:relative;width:var(--md-switch-track-width, 52px);height:var(--md-switch-track-height, 32px);border-start-start-radius:var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}input{appearance:none;height:48px;outline:none;margin:0;position:absolute;width:100%;z-index:1;cursor:inherit}:host([touch-target=none]) input{display:none}}@layer styles{.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.disabled .track::before,.disabled .track::after{transition:none;opacity:var(--md-switch-disabled-track-opacity, 0.12)}.disabled .track::before{background-clip:content-box}.selected .track::before{background-color:var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4))}.selected:hover .track::before{background-color:var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4))}.selected:focus-within .track::before{background-color:var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4))}.selected:active .track::before{background-color:var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4))}.selected.disabled .track{background-clip:border-box}.selected.disabled .track::before{background-color:var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20))}.unselected .track::before{background-color:var(--md-switch-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-track-outline-color, var(--md-sys-color-outline, #79747e));border-style:solid;border-width:var(--md-switch-track-outline-width, 2px)}.unselected:hover .track::before{background-color:var(--md-switch-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-hover-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:focus-visible .track::before{background-color:var(--md-switch-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-focus-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:active .track::before{background-color:var(--md-switch-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-pressed-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected.disabled .track::before{background-color:var(--md-switch-disabled-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-disabled-track-outline-color, var(--md-sys-color-on-surface, #1d1b20))}}@layer hcm{@media(forced-colors: active){.selected .track::before{background:ButtonText;border-color:ButtonText}.disabled .track::before{border-color:GrayText;opacity:1}.disabled.selected .track::before{background:GrayText}}}@layer styles{.handle-container{display:flex;place-content:center;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.selected .handle-container{margin-inline-start:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.unselected .handle-container{margin-inline-end:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--md-switch-handle-shape-start-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-handle-shape-start-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-handle-shape-end-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-handle-shape-end-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));height:var(--md-switch-handle-height, 16px);width:var(--md-switch-handle-width, 16px);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.disabled .handle,.disabled .handle::before{transition:none}.selected .handle{height:var(--md-switch-selected-handle-height, 24px);width:var(--md-switch-selected-handle-width, 24px)}.handle.with-icon{height:var(--md-switch-with-icon-handle-height, 24px);width:var(--md-switch-with-icon-handle-width, 24px)}.selected:not(.disabled):active .handle,.unselected:not(.disabled):active .handle{height:var(--md-switch-pressed-handle-height, 28px);width:var(--md-switch-pressed-handle-width, 28px);transition-timing-function:linear;transition-duration:100ms}.selected .handle::before{background-color:var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff))}.selected:hover .handle::before{background-color:var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:focus-within .handle::before{background-color:var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:active .handle::before{background-color:var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected.disabled .handle::before{background-color:var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));opacity:var(--md-switch-disabled-selected-handle-opacity, 1)}.unselected .handle::before{background-color:var(--md-switch-handle-color, var(--md-sys-color-outline, #79747e))}.unselected:hover .handle::before{background-color:var(--md-switch-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:focus-within .handle::before{background-color:var(--md-switch-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:active .handle::before{background-color:var(--md-switch-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected.disabled .handle::before{background-color:var(--md-switch-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-handle-opacity, 0.38)}md-ripple{border-radius:var(--md-switch-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-switch-state-layer-size, 40px);inset:unset;width:var(--md-switch-state-layer-size, 40px)}.selected md-ripple{--md-ripple-hover-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12)}.unselected md-ripple{--md-ripple-hover-color: var(--md-switch-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-color: var(--md-switch-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-switch-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-pressed-state-layer-opacity, 0.12)}}@layer hcm{@media(forced-colors: active){.unselected .handle::before{background:ButtonText}.disabled .handle::before{opacity:1}.disabled.unselected .handle::before{background:GrayText}}}@layer styles{.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;fill:currentColor;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.disabled .icon{transition:none}.selected .icon--on,.unselected .icon--off{opacity:1}.unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--md-switch-icon-size, 16px);height:var(--md-switch-icon-size, 16px);color:var(--md-switch-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:hover .icon--off{color:var(--md-switch-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:focus-within .icon--off{color:var(--md-switch-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:active .icon--off{color:var(--md-switch-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected.disabled .icon--off{color:var(--md-switch-disabled-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));opacity:var(--md-switch-disabled-icon-opacity, 0.38)}.icon--on{width:var(--md-switch-selected-icon-size, 16px);height:var(--md-switch-selected-icon-size, 16px);color:var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:hover .icon--on{color:var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:focus-within .icon--on{color:var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:active .icon--on{color:var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected.disabled .icon--on{color:var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon--off{fill:Canvas}.icon--on{fill:ButtonText}.disabled.unselected .icon--off,.disabled.selected .icon--on{opacity:1}.disabled .icon--on{fill:GrayText}}}
|
|
747
|
-
`})),oc
|
|
746
|
+
`}renderTouchTarget(){return b`<span class="touch"></span>`}shouldShowIcons(){return this.icons||this.showOnlySelectedIcon}handleInput(e){let t=e.target;this.selected=t.checked}handleChange(e){mr(this,e)}[wr](){return this.selected?this.value:null}[Tr](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute(`selected`)}formStateRestoreCallback(e){this.selected=e===`true`}[_r](){return new kr(()=>({checked:this.selected,required:this.required}))}[vr](){return this.input}},bn(tc),tc.shadowRootOptions={mode:`open`,delegatesFocus:!0},r([g({type:Boolean})],tc.prototype,`selected`,void 0),r([g({type:Boolean})],tc.prototype,`icons`,void 0),r([g({type:Boolean,attribute:`show-only-selected-icon`})],tc.prototype,`showOnlySelectedIcon`,void 0),r([g({type:Boolean})],tc.prototype,`required`,void 0),r([g()],tc.prototype,`value`,void 0),r([v(`input`)],tc.prototype,`input`,void 0)})),rc,ic=t((()=>{C(),rc=p`@layer styles, hcm;@layer styles{:host{display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-switch-track-height, 32px))/2) 0px}md-focus-ring{--md-focus-ring-shape-start-start: var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-start-end: var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-end: var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-start: var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}.switch{align-items:center;display:inline-flex;flex-shrink:0;position:relative;width:var(--md-switch-track-width, 52px);height:var(--md-switch-track-height, 32px);border-start-start-radius:var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}input{appearance:none;height:48px;outline:none;margin:0;position:absolute;width:100%;z-index:1;cursor:inherit}:host([touch-target=none]) input{display:none}}@layer styles{.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.disabled .track::before,.disabled .track::after{transition:none;opacity:var(--md-switch-disabled-track-opacity, 0.12)}.disabled .track::before{background-clip:content-box}.selected .track::before{background-color:var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4))}.selected:hover .track::before{background-color:var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4))}.selected:focus-within .track::before{background-color:var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4))}.selected:active .track::before{background-color:var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4))}.selected.disabled .track{background-clip:border-box}.selected.disabled .track::before{background-color:var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20))}.unselected .track::before{background-color:var(--md-switch-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-track-outline-color, var(--md-sys-color-outline, #79747e));border-style:solid;border-width:var(--md-switch-track-outline-width, 2px)}.unselected:hover .track::before{background-color:var(--md-switch-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-hover-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:focus-visible .track::before{background-color:var(--md-switch-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-focus-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:active .track::before{background-color:var(--md-switch-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-pressed-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected.disabled .track::before{background-color:var(--md-switch-disabled-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-disabled-track-outline-color, var(--md-sys-color-on-surface, #1d1b20))}}@layer hcm{@media(forced-colors: active){.selected .track::before{background:ButtonText;border-color:ButtonText}.disabled .track::before{border-color:GrayText;opacity:1}.disabled.selected .track::before{background:GrayText}}}@layer styles{.handle-container{display:flex;place-content:center;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.selected .handle-container{margin-inline-start:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.unselected .handle-container{margin-inline-end:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--md-switch-handle-shape-start-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-handle-shape-start-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-handle-shape-end-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-handle-shape-end-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));height:var(--md-switch-handle-height, 16px);width:var(--md-switch-handle-width, 16px);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.disabled .handle,.disabled .handle::before{transition:none}.selected .handle{height:var(--md-switch-selected-handle-height, 24px);width:var(--md-switch-selected-handle-width, 24px)}.handle.with-icon{height:var(--md-switch-with-icon-handle-height, 24px);width:var(--md-switch-with-icon-handle-width, 24px)}.selected:not(.disabled):active .handle,.unselected:not(.disabled):active .handle{height:var(--md-switch-pressed-handle-height, 28px);width:var(--md-switch-pressed-handle-width, 28px);transition-timing-function:linear;transition-duration:100ms}.selected .handle::before{background-color:var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff))}.selected:hover .handle::before{background-color:var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:focus-within .handle::before{background-color:var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:active .handle::before{background-color:var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected.disabled .handle::before{background-color:var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));opacity:var(--md-switch-disabled-selected-handle-opacity, 1)}.unselected .handle::before{background-color:var(--md-switch-handle-color, var(--md-sys-color-outline, #79747e))}.unselected:hover .handle::before{background-color:var(--md-switch-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:focus-within .handle::before{background-color:var(--md-switch-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:active .handle::before{background-color:var(--md-switch-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected.disabled .handle::before{background-color:var(--md-switch-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-handle-opacity, 0.38)}md-ripple{border-radius:var(--md-switch-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-switch-state-layer-size, 40px);inset:unset;width:var(--md-switch-state-layer-size, 40px)}.selected md-ripple{--md-ripple-hover-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12)}.unselected md-ripple{--md-ripple-hover-color: var(--md-switch-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-color: var(--md-switch-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-switch-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-pressed-state-layer-opacity, 0.12)}}@layer hcm{@media(forced-colors: active){.unselected .handle::before{background:ButtonText}.disabled .handle::before{opacity:1}.disabled.unselected .handle::before{background:GrayText}}}@layer styles{.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;fill:currentColor;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.disabled .icon{transition:none}.selected .icon--on,.unselected .icon--off{opacity:1}.unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--md-switch-icon-size, 16px);height:var(--md-switch-icon-size, 16px);color:var(--md-switch-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:hover .icon--off{color:var(--md-switch-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:focus-within .icon--off{color:var(--md-switch-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:active .icon--off{color:var(--md-switch-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected.disabled .icon--off{color:var(--md-switch-disabled-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));opacity:var(--md-switch-disabled-icon-opacity, 0.38)}.icon--on{width:var(--md-switch-selected-icon-size, 16px);height:var(--md-switch-selected-icon-size, 16px);color:var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:hover .icon--on{color:var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:focus-within .icon--on{color:var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:active .icon--on{color:var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected.disabled .icon--on{color:var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon--off{fill:Canvas}.icon--on{fill:ButtonText}.disabled.unselected .icon--off,.disabled.selected .icon--on{opacity:1}.disabled .icon--on{fill:GrayText}}}
|
|
747
|
+
`})),ac,oc=t((()=>{i(),y(),nc(),ic(),ac=class extends tc{},ac.styles=[rc],ac=r([a(`md-switch`)],ac)}));oc(),i(),At(),w(),E(),C(),y(),Jt(),Zt();var sc,cc=Symbol(`indicator`),lc=Symbol(`animateIndicator`),uc=as(S),dc=class extends uc{get selected(){return this.active}set selected(e){this.active=e}constructor(){super(),this.isTab=!0,this.active=!1,this.hasIcon=!1,this.iconOnly=!1,this.fullWidthIndicator=!1,this.internals=this.attachInternals(),this.internals.role=`tab`,this.addEventListener(`keydown`,this.handleKeydown.bind(this))}render(){let e=b`<div class="indicator"></div>`;return b`<div
|
|
748
748
|
class="button"
|
|
749
749
|
role="presentation"
|
|
750
750
|
@click=${this.handleContentClick}>
|
|
@@ -759,19 +759,19 @@
|
|
|
759
759
|
${this.fullWidthIndicator?x:e}
|
|
760
760
|
</div>
|
|
761
761
|
${this.fullWidthIndicator?e:x}
|
|
762
|
-
</div>`}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(cc
|
|
763
|
-
`;C();var
|
|
764
|
-
`;i(),y();var
|
|
765
|
-
`;i(),y();var
|
|
762
|
+
</div>`}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(sc=cc,lc)](e){if(!this[cc])return;this[cc].getAnimations().forEach(e=>{e.cancel()});let t=this.getKeyframes(e);t!==null&&this[cc].animate(t,{duration:250,easing:Xt.EMPHASIZED})}getKeyframes(e){let t=fc();if(!this.active)return t?[{opacity:1},{transform:`none`}]:null;let n={},r=e[cc]?.getBoundingClientRect()??{},i=r.left,a=r.width,o=this[cc].getBoundingClientRect(),s=o.left,c=a/o.width;return!t&&i!==void 0&&s!==void 0&&!isNaN(c)?n.transform=`translateX(${(i-s).toFixed(4)}px) scaleX(${c.toFixed(4)})`:n.opacity=0,[n,{transform:`none`}]}handleSlotChange(){this.iconOnly=!1;for(let e of this.assignedDefaultNodes){let t=e.nodeType===Node.TEXT_NODE&&!!e.wholeText.match(/\S/);if(e.nodeType===Node.ELEMENT_NODE||t)return}this.iconOnly=!0}handleIconSlotChange(){this.hasIcon=this.assignedIcons.length>0}};r([g({type:Boolean,reflect:!0,attribute:`md-tab`})],dc.prototype,`isTab`,void 0),r([g({type:Boolean,reflect:!0})],dc.prototype,`active`,void 0),r([g({type:Boolean})],dc.prototype,`selected`,null),r([g({type:Boolean,attribute:`has-icon`})],dc.prototype,`hasIcon`,void 0),r([g({type:Boolean,attribute:`icon-only`})],dc.prototype,`iconOnly`,void 0),r([v(`.indicator`)],dc.prototype,sc,void 0),r([_()],dc.prototype,`fullWidthIndicator`,void 0),r([Me({flatten:!0})],dc.prototype,`assignedDefaultNodes`,void 0),r([Ae({slot:`icon`,flatten:!0})],dc.prototype,`assignedIcons`,void 0);function fc(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}i(),y();var pc=class extends dc{constructor(){super(...arguments),this.inlineIcon=!1}getContentClasses(){return{...super.getContentClasses(),stacked:!this.inlineIcon}}};r([g({type:Boolean,attribute:`inline-icon`})],pc.prototype,`inlineIcon`,void 0),C();var mc=p`:host{--_active-indicator-color: var(--md-primary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--md-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--md-primary-tab-active-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--md-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--md-primary-tab-active-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--md-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--md-primary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-primary-tab-container-elevation, 0);--_container-height: var(--md-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--md-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--md-primary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--md-primary-tab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-primary-tab-active-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--md-primary-tab-active-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_active-icon-color: var(--md-primary-tab-active-icon-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--md-primary-tab-active-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-primary-tab-icon-size, 24px);--_focus-icon-color: var(--md-primary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-primary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-color: var(--md-primary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-primary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-primary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-primary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-primary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-primary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--md-primary-tab-active-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--md-primary-tab-active-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-label-text-color: var(--md-primary-tab-active-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--md-primary-tab-active-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-label-text-color: var(--md-primary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-primary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-color: var(--md-primary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-primary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-primary-tab-container-shape-start-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-primary-tab-container-shape-start-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-primary-tab-container-shape-end-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-primary-tab-container-shape-end-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)}
|
|
763
|
+
`;C();var hc=p`:host{display:inline-flex;align-items:center;justify-content:center;outline:none;padding:0 16px;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:middle;user-select:none;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);color:var(--_label-text-color);z-index:0;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);--md-elevation-level: var(--_container-elevation)}md-focus-ring{--md-focus-ring-shape: 8px}:host([active]) md-focus-ring{margin-bottom:calc(var(--_active-indicator-height) + 1px)}.button::before{background:var(--_container-color);content:"";inset:0;position:absolute;z-index:-1}.button::before,md-ripple,md-elevation{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start)}.content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;height:var(--_container-height);gap:8px}.indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_active-indicator-color);border-radius:var(--_active-indicator-shape);height:var(--_active-indicator-height);inset:auto 0 0 0;opacity:0}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_icon-color);font-size:var(--_icon-size);width:var(--_icon-size);height:var(--_icon-size)}:host(:hover){color:var(--_hover-label-text-color);cursor:pointer}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus){color:var(--_focus-label-text-color)}:host(:focus) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active){color:var(--_pressed-label-text-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([active]) .indicator{opacity:1}:host([active]){color:var(--_active-label-text-color);--md-ripple-hover-color: var(--_active-hover-state-layer-color);--md-ripple-hover-opacity: var(--_active-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_active-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_active-pressed-state-layer-opacity)}:host([active]) ::slotted([slot=icon]){color:var(--_active-icon-color)}:host([active]:hover){color:var(--_active-hover-label-text-color)}:host([active]:hover) ::slotted([slot=icon]){color:var(--_active-hover-icon-color)}:host([active]:focus){color:var(--_active-focus-label-text-color)}:host([active]:focus) ::slotted([slot=icon]){color:var(--_active-focus-icon-color)}:host([active]:active){color:var(--_active-pressed-label-text-color)}:host([active]:active) ::slotted([slot=icon]){color:var(--_active-pressed-icon-color)}:host,::slotted(*){white-space:nowrap}@media(forced-colors: active){.indicator{background:CanvasText}}
|
|
764
|
+
`;i(),y();var gc=class extends pc{};gc.styles=[hc,mc],gc=r([a(`md-primary-tab`)],gc);var _c=class extends dc{constructor(){super(...arguments),this.fullWidthIndicator=!0}};C();var vc=p`:host{--_active-indicator-color: var(--md-secondary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--md-secondary-tab-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-secondary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-secondary-tab-container-elevation, 0);--_container-height: var(--md-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--md-secondary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-secondary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-secondary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--md-secondary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-secondary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-secondary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-secondary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-secondary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-secondary-tab-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--md-secondary-tab-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--md-secondary-tab-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-secondary-tab-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--md-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--md-secondary-tab-active-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--md-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--md-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--md-secondary-tab-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-secondary-tab-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--md-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--md-secondary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--md-secondary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-secondary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-size: var(--md-secondary-tab-icon-size, 24px);--_icon-color: var(--md-secondary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-secondary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-secondary-tab-container-shape-start-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-secondary-tab-container-shape-start-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-secondary-tab-container-shape-end-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-secondary-tab-container-shape-end-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}
|
|
765
|
+
`;i(),y();var yc=class extends _c{};yc.styles=[hc,vc],yc=r([a(`md-secondary-tab`)],yc),i(),C(),y();var bc=class extends S{get activeTab(){return this.tabs.find(e=>e.active)??null}set activeTab(e){e&&this.activateTab(e)}get activeTabIndex(){return this.tabs.findIndex(e=>e.active)}set activeTabIndex(e){let t=()=>{let t=this.tabs[e];t&&this.activateTab(t)};if(!this.slotElement){this.updateComplete.then(t);return}t()}get focusedTab(){return this.tabs.find(e=>e.matches(`:focus-within`))}constructor(){super(),this.autoActivate=!1,this.internals=this.attachInternals(),this.internals.role=`tablist`,this.addEventListener(`keydown`,this.handleKeydown.bind(this)),this.addEventListener(`keyup`,this.handleKeyup.bind(this)),this.addEventListener(`focusout`,this.handleFocusout.bind(this))}async scrollToTab(e){await this.updateComplete;let{tabs:t}=this;if(e??=this.activeTab,!e||!t.includes(e)||!this.tabsScrollerElement)return;for(let e of this.tabs)await e.updateComplete;let n=e.offsetLeft,r=e.offsetWidth,i=this.scrollLeft,a=this.offsetWidth,o=n-48,s=n+r-a+48,c=Math.min(o,Math.max(s,i)),l=this.focusedTab?`auto`:`instant`;this.tabsScrollerElement.scrollTo({behavior:l,top:0,left:c})}render(){return b`
|
|
766
766
|
<div class="tabs">
|
|
767
767
|
<slot
|
|
768
768
|
@slotchange=${this.handleSlotChange}
|
|
769
769
|
@click=${this.handleTabClick}></slot>
|
|
770
770
|
</div>
|
|
771
771
|
<md-divider part="divider"></md-divider>
|
|
772
|
-
`}async handleTabClick(e){let t=e.target;await 0,!(e.defaultPrevented||!
|
|
773
|
-
`;i(),y();var wc=class extends xc{};wc.styles=[Cc],wc=r([a(`md-tabs`)],wc),C();var Tc=p`:host{--_active-indicator-color: var(--md-filled-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-text-field-active-indicator-height, 1px);--_caret-color: var(--md-filled-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-color: var(--md-filled-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-active-indicator-color: var(--md-filled-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-text-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-text-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-text-field-disabled-container-opacity, 0.04);--_disabled-input-text-color: var(--md-filled-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-filled-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-filled-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filled-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-filled-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filled-text-field-disabled-trailing-icon-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-active-indicator-color: var(--md-filled-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-caret-color: var(--md-filled-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-filled-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-filled-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-filled-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-filled-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-input-text-color: var(--md-filled-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-filled-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-text-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-filled-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-filled-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-filled-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-filled-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-filled-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-text-field-focus-active-indicator-height, 3px);--_focus-input-text-color: var(--md-filled-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-filled-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-filled-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-text-field-hover-active-indicator-height, 1px);--_hover-input-text-color: var(--md-filled-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-text-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-icon-color: var(--md-filled-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-text-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filled-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-filled-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-filled-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-filled-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-filled-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-filled-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-filled-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-filled-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-filled-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-filled-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-filled-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-filled-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-filled-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-filled-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-filled-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-filled-text-field-leading-icon-size, 24px);--_supporting-text-color: var(--md-filled-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-filled-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-filled-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-filled-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-filled-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-filled-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-filled-text-field-container-shape-start-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-filled-text-field-container-shape-start-end, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-filled-text-field-container-shape-end-end, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-filled-text-field-container-shape-end-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_leading-space: var(--md-filled-text-field-leading-space, 16px);--_trailing-space: var(--md-filled-text-field-trailing-space, 16px);--_top-space: var(--md-filled-text-field-top-space, 16px);--_bottom-space: var(--md-filled-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-filled-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-filled-text-field-input-text-suffix-leading-space, 2px);--_with-label-top-space: var(--md-filled-text-field-with-label-top-space, 8px);--_with-label-bottom-space: var(--md-filled-text-field-with-label-bottom-space, 8px);--_focus-caret-color: var(--md-filled-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--md-filled-field-active-indicator-color: var(--_active-indicator-color);--md-filled-field-active-indicator-height: var(--_active-indicator-height);--md-filled-field-bottom-space: var(--_bottom-space);--md-filled-field-container-color: var(--_container-color);--md-filled-field-container-shape-end-end: var(--_container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_container-shape-start-start);--md-filled-field-content-color: var(--_input-text-color);--md-filled-field-content-font: var(--_input-text-font);--md-filled-field-content-line-height: var(--_input-text-line-height);--md-filled-field-content-size: var(--_input-text-size);--md-filled-field-content-weight: var(--_input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_error-active-indicator-color);--md-filled-field-error-content-color: var(--_error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_error-label-text-color);--md-filled-field-error-leading-content-color: var(--_error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_label-text-color);--md-filled-field-label-text-font: var(--_label-text-font);--md-filled-field-label-text-line-height: var(--_label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_label-text-populated-size);--md-filled-field-label-text-size: var(--_label-text-size);--md-filled-field-label-text-weight: var(--_label-text-weight);--md-filled-field-leading-content-color: var(--_leading-icon-color);--md-filled-field-leading-space: var(--_leading-space);--md-filled-field-supporting-text-color: var(--_supporting-text-color);--md-filled-field-supporting-text-font: var(--_supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_supporting-text-size);--md-filled-field-supporting-text-weight: var(--_supporting-text-weight);--md-filled-field-top-space: var(--_top-space);--md-filled-field-trailing-content-color: var(--_trailing-icon-color);--md-filled-field-trailing-space: var(--_trailing-space);--md-filled-field-with-label-bottom-space: var(--_with-label-bottom-space);--md-filled-field-with-label-top-space: var(--_with-label-top-space)}
|
|
774
|
-
`;bt();var{I:
|
|
772
|
+
`}async handleTabClick(e){let t=e.target;await 0,!(e.defaultPrevented||!xc(t)||t.active)&&this.activateTab(t)}activateTab(e){let{tabs:t}=this,n=this.activeTab;if(!(!t.includes(e)||n===e)){for(let n of t)n.active=n===e;if(n){if(!this.dispatchEvent(new Event(`change`,{bubbles:!0,cancelable:!0}))){for(let e of t)e.active=e===n;return}e[lc](n)}this.updateFocusableTab(e),this.scrollToTab(e)}}updateFocusableTab(e){for(let t of this.tabs)t.tabIndex=t===e?0:-1}async handleKeydown(e){await 0;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Home`,i=e.key===`End`;if(e.defaultPrevented||!t&&!n&&!r&&!i)return;let{tabs:a}=this;if(a.length<2)return;e.preventDefault();let o;if(r||i)o=r?0:a.length-1;else{let e=getComputedStyle(this).direction===`rtl`?t:n,{focusedTab:r}=this;if(!r)o=e?0:a.length-1;else{let t=this.tabs.indexOf(r);o=e?t+1:t-1,o>=a.length?o=0:o<0&&(o=a.length-1)}}let s=a[o];s.focus(),this.autoActivate?this.activateTab(s):this.updateFocusableTab(s)}handleKeyup(){this.scrollToTab(this.focusedTab??this.activeTab)}handleFocusout(){if(this.matches(`:focus-within`))return;let{activeTab:e}=this;e&&this.updateFocusableTab(e)}handleSlotChange(){let e=this.tabs[0];!this.activeTab&&e&&this.activateTab(e),this.scrollToTab(this.activeTab)}};r([Ae({flatten:!0,selector:`[md-tab]`})],bc.prototype,`tabs`,void 0),r([g({type:Number,attribute:`active-tab-index`})],bc.prototype,`activeTabIndex`,null),r([g({type:Boolean,attribute:`auto-activate`})],bc.prototype,`autoActivate`,void 0),r([v(`.tabs`)],bc.prototype,`tabsScrollerElement`,void 0),r([v(`slot`)],bc.prototype,`slotElement`,void 0);function xc(e){return e instanceof HTMLElement&&e.hasAttribute(`md-tab`)}C();var Sc=p`:host{box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;position:relative}:host([hidden]){display:none}:host::-webkit-scrollbar{display:none}.tabs{align-items:end;display:flex;height:100%;overflow:inherit;scroll-behavior:inherit;scrollbar-width:inherit;justify-content:space-between;width:100%}::slotted(*){flex:1}::slotted([active]){z-index:1}
|
|
773
|
+
`;i(),y();var Cc=class extends bc{};Cc.styles=[Sc],Cc=r([a(`md-tabs`)],Cc),C();var wc=p`:host{--_active-indicator-color: var(--md-filled-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-text-field-active-indicator-height, 1px);--_caret-color: var(--md-filled-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-color: var(--md-filled-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-active-indicator-color: var(--md-filled-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-text-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-text-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-text-field-disabled-container-opacity, 0.04);--_disabled-input-text-color: var(--md-filled-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-filled-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-filled-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filled-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-filled-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filled-text-field-disabled-trailing-icon-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-active-indicator-color: var(--md-filled-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-caret-color: var(--md-filled-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-filled-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-filled-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-filled-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-filled-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-input-text-color: var(--md-filled-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-filled-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-text-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-filled-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-filled-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-filled-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-filled-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-filled-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-text-field-focus-active-indicator-height, 3px);--_focus-input-text-color: var(--md-filled-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-filled-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-filled-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-text-field-hover-active-indicator-height, 1px);--_hover-input-text-color: var(--md-filled-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-text-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-icon-color: var(--md-filled-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-text-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filled-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-filled-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-filled-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-filled-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-filled-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-filled-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-filled-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-filled-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-filled-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-filled-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-filled-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-filled-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-filled-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-filled-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-filled-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-filled-text-field-leading-icon-size, 24px);--_supporting-text-color: var(--md-filled-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-filled-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-filled-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-filled-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-filled-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-filled-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-filled-text-field-container-shape-start-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-filled-text-field-container-shape-start-end, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-filled-text-field-container-shape-end-end, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-filled-text-field-container-shape-end-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_leading-space: var(--md-filled-text-field-leading-space, 16px);--_trailing-space: var(--md-filled-text-field-trailing-space, 16px);--_top-space: var(--md-filled-text-field-top-space, 16px);--_bottom-space: var(--md-filled-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-filled-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-filled-text-field-input-text-suffix-leading-space, 2px);--_with-label-top-space: var(--md-filled-text-field-with-label-top-space, 8px);--_with-label-bottom-space: var(--md-filled-text-field-with-label-bottom-space, 8px);--_focus-caret-color: var(--md-filled-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--md-filled-field-active-indicator-color: var(--_active-indicator-color);--md-filled-field-active-indicator-height: var(--_active-indicator-height);--md-filled-field-bottom-space: var(--_bottom-space);--md-filled-field-container-color: var(--_container-color);--md-filled-field-container-shape-end-end: var(--_container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_container-shape-start-start);--md-filled-field-content-color: var(--_input-text-color);--md-filled-field-content-font: var(--_input-text-font);--md-filled-field-content-line-height: var(--_input-text-line-height);--md-filled-field-content-size: var(--_input-text-size);--md-filled-field-content-weight: var(--_input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_error-active-indicator-color);--md-filled-field-error-content-color: var(--_error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_error-label-text-color);--md-filled-field-error-leading-content-color: var(--_error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_label-text-color);--md-filled-field-label-text-font: var(--_label-text-font);--md-filled-field-label-text-line-height: var(--_label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_label-text-populated-size);--md-filled-field-label-text-size: var(--_label-text-size);--md-filled-field-label-text-weight: var(--_label-text-weight);--md-filled-field-leading-content-color: var(--_leading-icon-color);--md-filled-field-leading-space: var(--_leading-space);--md-filled-field-supporting-text-color: var(--_supporting-text-color);--md-filled-field-supporting-text-font: var(--_supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_supporting-text-size);--md-filled-field-supporting-text-weight: var(--_supporting-text-weight);--md-filled-field-top-space: var(--_top-space);--md-filled-field-trailing-content-color: var(--_trailing-icon-color);--md-filled-field-trailing-space: var(--_trailing-space);--md-filled-field-with-label-bottom-space: var(--_with-label-bottom-space);--md-filled-field-with-label-top-space: var(--_with-label-top-space)}
|
|
774
|
+
`;bt();var{I:Tc}=_t,Ec=e=>e.strings===void 0,Dc={},Oc=(e,t=Dc)=>e._$AH=t;bt(),Kt();var kc=Wt(class extends Gt{constructor(e){if(super(e),e.type!==Ut.PROPERTY&&e.type!==Ut.ATTRIBUTE&&e.type!==Ut.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ec(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===at||t===x)return t;let n=e.element,r=e.name;if(e.type===Ut.PROPERTY){if(t===n[r])return at}else if(e.type===Ut.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return at}else if(e.type===Ut.ATTRIBUTE&&n.getAttribute(r)===t+``)return at;return Oc(e),t}}),Ac={fromAttribute(e){return e??``},toAttribute(e){return e||null}};Or();var jc=class extends Dr{computeValidity({state:e,renderedControl:t}){let n=t;Mc(e)&&!n?(n=this.inputControl||document.createElement(`input`),this.inputControl=n):n||(n=this.textAreaControl||document.createElement(`textarea`),this.textAreaControl=n);let r=Mc(e)?n:null;if(r&&(r.type=e.type),n.value!==e.value&&(n.value=e.value),n.required=e.required,r){let t=e;t.pattern?r.pattern=t.pattern:r.removeAttribute(`pattern`),t.min?r.min=t.min:r.removeAttribute(`min`),t.max?r.max=t.max:r.removeAttribute(`max`),t.step?r.step=t.step:r.removeAttribute(`step`)}return(e.minLength??-1)>-1?n.setAttribute(`minlength`,String(e.minLength)):n.removeAttribute(`minlength`),(e.maxLength??-1)>-1?n.setAttribute(`maxlength`,String(e.maxLength)):n.removeAttribute(`maxlength`),{validity:n.validity,validationMessage:n.validationMessage}}equals({state:e},{state:t}){let n=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return!Mc(e)||!Mc(t)?n:n&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step}copy({state:e}){return{state:Mc(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){let{type:t,pattern:n,min:r,max:i,step:a}=e;return{...this.copySharedState(e),type:t,pattern:n,min:r,max:i,step:a}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:n,maxLength:r}){return{value:e,required:t,minLength:n,maxLength:r}}};function Mc(e){return e.type!==`textarea`}i(),C(),y(),Jt(),da(),xn(),hr(),Sr(),Tn(),Er();var Nc=bs(gr(Cr(Sn(S)))),N=class extends Nc{constructor(){super(...arguments),this.error=!1,this.errorText=``,this.label=``,this.noAsterisk=!1,this.required=!1,this.value=``,this.prefixText=``,this.suffixText=``,this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText=``,this.textDirection=``,this.rows=2,this.cols=20,this.inputMode=``,this.max=``,this.maxLength=-1,this.min=``,this.minLength=-1,this.noSpinner=!1,this.pattern=``,this.placeholder=``,this.readOnly=!1,this.multiple=!1,this.step=``,this.type=`text`,this.autocomplete=``,this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=``}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){let e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){let t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){let e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){let t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,n){this.getInputOrTextarea().setSelectionRange(e,t,n)}stepDown(e){let t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){let t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute(`value`)??``,this.nativeError=!1,this.nativeErrorText=``}attributeChangedCallback(e,t,n){e===`value`&&this.dirty||super.attributeChangedCallback(e,t,n)}render(){return b`
|
|
775
775
|
<span class="text-field ${T({disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:this.type===`textarea`,"no-spinner":this.noSpinner})}">
|
|
776
776
|
${this.renderField()}
|
|
777
777
|
</span>
|
|
@@ -821,7 +821,7 @@
|
|
|
821
821
|
?required=${this.required}
|
|
822
822
|
rows=${this.rows}
|
|
823
823
|
cols=${this.cols}
|
|
824
|
-
.value=${
|
|
824
|
+
.value=${kc(this.value)}
|
|
825
825
|
@change=${this.redispatchEvent}
|
|
826
826
|
@focus=${this.handleFocusChange}
|
|
827
827
|
@blur=${this.handleFocusChange}
|
|
@@ -851,7 +851,7 @@
|
|
|
851
851
|
?multiple=${this.multiple}
|
|
852
852
|
step=${this.step||x}
|
|
853
853
|
type=${this.type}
|
|
854
|
-
.value=${
|
|
854
|
+
.value=${kc(this.value)}
|
|
855
855
|
@change=${this.redispatchEvent}
|
|
856
856
|
@focus=${this.handleFocusChange}
|
|
857
857
|
@blur=${this.handleFocusChange}
|
|
@@ -859,9 +859,9 @@
|
|
|
859
859
|
@select=${this.redispatchEvent} />
|
|
860
860
|
${o}
|
|
861
861
|
</div>
|
|
862
|
-
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?b`<span class="${T({suffix:t,prefix:!t})}">${e}</span>`:x}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){this.focused=this.inputOrTextarea?.matches(`:focus`)??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){mr(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type===`textarea`?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[wr](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[_r](){return new
|
|
863
|
-
`;i(),y(),da();var Lc=class extends Fc{constructor(){super(...arguments),this.fieldTag=oa`md-filled-field`}};Lc.styles=[Ic,Tc],Lc=r([a(`md-filled-text-field`)],Lc),C();var Rc=p`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space)}
|
|
864
|
-
`;da();var
|
|
862
|
+
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?b`<span class="${T({suffix:t,prefix:!t})}">${e}</span>`:x}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){this.focused=this.inputOrTextarea?.matches(`:focus`)??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){mr(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type===`textarea`?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[wr](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[_r](){return new jc(()=>({state:this,renderedControl:this.inputOrTextarea}))}[vr](){return this.inputOrTextarea}[hs](e){e?.preventDefault();let t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}};bn(N),N.shadowRootOptions={...S.shadowRootOptions,delegatesFocus:!0},r([g({type:Boolean,reflect:!0})],N.prototype,`error`,void 0),r([g({attribute:`error-text`})],N.prototype,`errorText`,void 0),r([g()],N.prototype,`label`,void 0),r([g({type:Boolean,attribute:`no-asterisk`})],N.prototype,`noAsterisk`,void 0),r([g({type:Boolean,reflect:!0})],N.prototype,`required`,void 0),r([g()],N.prototype,`value`,void 0),r([g({attribute:`prefix-text`})],N.prototype,`prefixText`,void 0),r([g({attribute:`suffix-text`})],N.prototype,`suffixText`,void 0),r([g({type:Boolean,attribute:`has-leading-icon`})],N.prototype,`hasLeadingIcon`,void 0),r([g({type:Boolean,attribute:`has-trailing-icon`})],N.prototype,`hasTrailingIcon`,void 0),r([g({attribute:`supporting-text`})],N.prototype,`supportingText`,void 0),r([g({attribute:`text-direction`})],N.prototype,`textDirection`,void 0),r([g({type:Number})],N.prototype,`rows`,void 0),r([g({type:Number})],N.prototype,`cols`,void 0),r([g({reflect:!0})],N.prototype,`inputMode`,void 0),r([g()],N.prototype,`max`,void 0),r([g({type:Number})],N.prototype,`maxLength`,void 0),r([g()],N.prototype,`min`,void 0),r([g({type:Number})],N.prototype,`minLength`,void 0),r([g({type:Boolean,attribute:`no-spinner`})],N.prototype,`noSpinner`,void 0),r([g()],N.prototype,`pattern`,void 0),r([g({reflect:!0,converter:Ac})],N.prototype,`placeholder`,void 0),r([g({type:Boolean,reflect:!0})],N.prototype,`readOnly`,void 0),r([g({type:Boolean,reflect:!0})],N.prototype,`multiple`,void 0),r([g()],N.prototype,`step`,void 0),r([g({reflect:!0})],N.prototype,`type`,void 0),r([g({reflect:!0})],N.prototype,`autocomplete`,void 0),r([_()],N.prototype,`dirty`,void 0),r([_()],N.prototype,`focused`,void 0),r([_()],N.prototype,`nativeError`,void 0),r([_()],N.prototype,`nativeErrorText`,void 0),r([v(`.input`)],N.prototype,`inputOrTextarea`,void 0),r([v(`.field`)],N.prototype,`field`,void 0),r([Ae({slot:`leading-icon`})],N.prototype,`leadingIcons`,void 0),r([Ae({slot:`trailing-icon`})],N.prototype,`trailingIcons`,void 0),da();var Pc=class extends N{constructor(){super(...arguments),this.fieldTag=oa`md-filled-field`}};C();var Fc=p`:host{display:inline-flex;outline:none;resize:both;text-align:start;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}.icon{color:currentColor;display:flex;fill:currentColor}.icon ::slotted(*){display:flex}[hasstart] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[hasend] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}
|
|
863
|
+
`;i(),y(),da();var Ic=class extends Pc{constructor(){super(...arguments),this.fieldTag=oa`md-filled-field`}};Ic.styles=[Fc,wc],Ic=r([a(`md-filled-text-field`)],Ic),C();var Lc=p`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space)}
|
|
864
|
+
`;da();var Rc=class extends N{constructor(){super(...arguments),this.fieldTag=oa`md-outlined-field`}};i(),y(),da();var zc=class extends Rc{constructor(){super(...arguments),this.fieldTag=oa`md-outlined-field`}};zc.styles=[Fc,Lc],zc=r([a(`md-outlined-text-field`)],zc),At(),w(),E(),Yn(),tr(),sr(),pr(),Lr(),Xr(),ri(),bi(),At(),w(),k(),xa(),Ea(),ja(),Ia(),so(),E(),oc();function P(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var F=t((()=>{})),Bc,Vc=t((()=>{C(),y(),F(),Bc=class extends S{constructor(...e){super(...e),this.open=!1}static{this.styles=p`
|
|
865
865
|
:host {
|
|
866
866
|
display: block;
|
|
867
867
|
width: var(--scb-chevron-size, 24px);
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
>
|
|
902
902
|
<polyline class="chevron-shape" points="7 10 12 15 17 10"></polyline>
|
|
903
903
|
</svg>
|
|
904
|
-
`}},
|
|
904
|
+
`}},P([g({type:Boolean,reflect:!0})],Bc.prototype,`open`,void 0),Bc=P([a(`scb-chevron`)],Bc)}));C(),y(),w(),k(),E(),Vc(),F();var Hc,Uc=class extends S{static{Hc=this}constructor(...e){super(...e),this.open=!1,this.title=``,this.content=``,this.overline=``,this.supportingText=``,this.leading=!1,this.leadingVariant=``,this.leadingIcon=``,this.imgHrefImage=``,this.avatarLabel=``,this.avatarAlt=``,this.avatarVariant=`icon`,this.avatarSrc=``,this.density=0,this._unique=Hc._uid(),this._ignoreNextNativeTitleAttrChange=!1,this._onSummaryClick=e=>{e.preventDefault();let t=!this.open;this.closest(`scb-accordion`)?.onItemToggled?.(this,t),this.setOpen(t)},this._onToggle=e=>{let t=e.currentTarget;t.open||=!0,this._applyInertByOpen()}}static{this._uidPrefix=`uid-${Math.random().toString(36).slice(2)}`}static{this._uidSeq=0}static _uid(){return globalThis.crypto?.randomUUID?.()??`${Hc._uidPrefix}-${++Hc._uidSeq}`}static get observedAttributes(){let e=super.observedAttributes||[];return e.includes(`title`)?e:[...e,`title`]}attributeChangedCallback(e,t,n){if(e===`title`&&this._ignoreNextNativeTitleAttrChange){this._ignoreNextNativeTitleAttrChange=!1;return}super.attributeChangedCallback(e,t,n),e===`title`&&n!==null&&(this._ignoreNextNativeTitleAttrChange=!0,this.removeAttribute(`title`))}firstUpdated(){this._applyInertByOpen()}static{this.styles=[p`
|
|
905
905
|
:host {
|
|
906
906
|
display: block;
|
|
907
907
|
position: relative;
|
|
@@ -1111,7 +1111,7 @@
|
|
|
1111
1111
|
</details>
|
|
1112
1112
|
|
|
1113
1113
|
<md-focus-ring for=${t} inward></md-focus-ring>
|
|
1114
|
-
`}};
|
|
1114
|
+
`}};P([g({type:Boolean,reflect:!0})],Uc.prototype,`open`,void 0),P([g({type:String})],Uc.prototype,`title`,void 0),P([g({type:String})],Uc.prototype,`content`,void 0),P([g({type:String,attribute:`overline`})],Uc.prototype,`overline`,void 0),P([g({type:String,attribute:`supporting-text`})],Uc.prototype,`supportingText`,void 0),P([g({type:Boolean})],Uc.prototype,`leading`,void 0),P([g({type:String,attribute:`leading-variant`,reflect:!0})],Uc.prototype,`leadingVariant`,void 0),P([g({type:String,attribute:`leading-icon`})],Uc.prototype,`leadingIcon`,void 0),P([g({type:String,attribute:`img-href-image`,reflect:!0})],Uc.prototype,`imgHrefImage`,void 0),P([g({type:String,attribute:`avatar-label`})],Uc.prototype,`avatarLabel`,void 0),P([g({type:String,attribute:`avatar-alt`})],Uc.prototype,`avatarAlt`,void 0),P([g({type:String,attribute:`avatar-variant`})],Uc.prototype,`avatarVariant`,void 0),P([g({type:String,attribute:`avatar-src`})],Uc.prototype,`avatarSrc`,void 0),P([g({type:Number,reflect:!0})],Uc.prototype,`density`,void 0),Uc=Hc=P([a(`scb-accordion-item`)],Uc);var Wc=n({ScbButton:()=>I}),I,Gc=t((()=>{C(),y(),Yn(),sr(),tr(),pr(),k(),F(),I=class extends S{constructor(...e){super(...e),this.variant=`filled`,this.size=`medium`,this.type=`button`,this.label=`Button`,this.trailingIcon=!1,this.icon=``,this.iconFilled=!1,this.disabled=!1,this.fullWidth=!1,this.href=``,this.target=``,this.rel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__hasDefaultSlotContent=!1}__getMdHost(){return this.renderRoot.querySelector(`md-filled-button, md-outlined-button, md-filled-tonal-button, md-text-button`)}__getInnerNativeButton(e){return e?.shadowRoot?.querySelector(`button`)??null}__handleDefaultSlotChange(e){let t=e.target.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():e.nodeType===Node.ELEMENT_NODE);this.__hasDefaultSlotContent!==t&&(this.__hasDefaultSlotContent=t,this.requestUpdate()),this.updateComplete.then(()=>this.__syncAriaToInner())}__syncAriaToInner(){let e=this.__getMdHost(),t=this.__getInnerNativeButton(e);if(!e||!t)return;let n=(this.getAttribute(`aria-label`)||``).trim(),r=(e.getAttribute(`aria-label`)||``).trim(),i=this.label.trim()===``&&!this.__hasDefaultSlotContent?(this.icon||``).trim():``,a=n||r||i;a?t.setAttribute(`aria-label`,a):t.removeAttribute(`aria-label`);let o=this.getAttribute(`aria-controls`);o===null?t.removeAttribute(`aria-controls`):t.setAttribute(`aria-controls`,o);let s=this.getAttribute(`aria-expanded`);s===null?t.removeAttribute(`aria-expanded`):t.setAttribute(`aria-expanded`,s),e.removeAttribute(`aria-label`),e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-expanded`),this.removeAttribute(`aria-expanded`),this.__ariaObserver?.disconnect(),this.__ariaObserver=new MutationObserver(e=>{let t=this.__getMdHost(),n=this.__getInnerNativeButton(t);if(!(!t||!n)){for(let r of e){if(r.type!==`attributes`||!r.attributeName)continue;let e=r.attributeName,i=this.getAttribute(e);if(e===`aria-label`){let e=(t.getAttribute(`aria-label`)||``).trim(),r=(i||e||(this.label.trim()===``&&!this.__hasDefaultSlotContent?(this.icon||``).trim():``)).trim();r?n.setAttribute(`aria-label`,r):n.removeAttribute(`aria-label`),t.removeAttribute(`aria-label`)}else (e===`aria-controls`||e===`aria-expanded`)&&(i===null?n.removeAttribute(e):n.setAttribute(e,i),e===`aria-expanded`&&this.removeAttribute(`aria-expanded`))}t.removeAttribute(`aria-label`),t.removeAttribute(`aria-controls`),t.removeAttribute(`aria-expanded`)}}),this.__ariaObserver.observe(this,{attributes:!0,attributeFilter:[`aria-label`,`aria-controls`,`aria-expanded`]})}firstUpdated(){(this.type===`submit`||this.type===`reset`)&&this.addEventListener(`click`,()=>{if(!this.disabled){let e=this.closest(`form`);e&&(this.type===`submit`&&e.requestSubmit(),this.type===`reset`&&e.reset())}}),this.__syncAriaToInner(),this.#e()}updated(e){(e.has(`variant`)||e.has(`label`)||e.has(`icon`))&&this.__syncAriaToInner(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}disconnectedCallback(){this.__ariaObserver?.disconnect(),super.disconnectedCallback()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-button-spacing-block-start`,t):this.style.removeProperty(`--scb-button-spacing-block-start`),n?this.style.setProperty(`--scb-button-spacing-block-end`,n):this.style.removeProperty(`--scb-button-spacing-block-end`),r?this.style.setProperty(`--scb-button-spacing-inline-start`,r):this.style.removeProperty(`--scb-button-spacing-inline-start`),i?this.style.setProperty(`--scb-button-spacing-inline-end`,i):this.style.removeProperty(`--scb-button-spacing-inline-end`)}static get styles(){return p`
|
|
1115
1115
|
/* Gör hosten stretchbar i t.ex. flex/grid */
|
|
1116
1116
|
:host {
|
|
1117
1117
|
display: inline-flex;
|
|
@@ -1384,7 +1384,7 @@
|
|
|
1384
1384
|
${i}
|
|
1385
1385
|
${e&&this.trailingIcon?t:x}
|
|
1386
1386
|
</md-text-button>
|
|
1387
|
-
`;default:return b``}}},
|
|
1387
|
+
`;default:return b``}}},P([g({type:String,reflect:!0})],I.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],I.prototype,`size`,void 0),P([g({type:String,reflect:!0})],I.prototype,`type`,void 0),P([g({type:String})],I.prototype,`label`,void 0),P([g({type:Boolean,attribute:`trailing-icon`})],I.prototype,`trailingIcon`,void 0),P([g({type:String})],I.prototype,`icon`,void 0),P([g({type:Boolean,attribute:`icon-filled`,reflect:!0})],I.prototype,`iconFilled`,void 0),P([g({type:Boolean,reflect:!0})],I.prototype,`disabled`,void 0),P([g({type:Boolean,attribute:`full-width`,reflect:!0})],I.prototype,`fullWidth`,void 0),P([g({type:String})],I.prototype,`href`,void 0),P([g({type:String})],I.prototype,`target`,void 0),P([g({type:String})],I.prototype,`rel`,void 0),P([g({type:String,reflect:!0})],I.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],I.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],I.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],I.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],I.prototype,`spacingRight`,void 0),I=P([a(`scb-button`)],I)}));C(),y(),Gc(),F();var Kc=class extends S{constructor(...e){super(...e),this.singleOpen=!1,this.showCloseAll=!1,this.size=`large`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
|
|
1388
1388
|
:host {
|
|
1389
1389
|
display: block;
|
|
1390
1390
|
margin-block-start: var(--scb-accordion-spacing-block-start, 0);
|
|
@@ -1427,7 +1427,7 @@
|
|
|
1427
1427
|
|
|
1428
1428
|
<slot @slotchange=${this.#r}></slot>
|
|
1429
1429
|
</div>
|
|
1430
|
-
`}firstUpdated(){this.#a(),this.#i()}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#a(),e.has(`singleOpen`)&&this.#i()}_getDirectItems(){return Array.from(this.children).filter(e=>e.tagName===`SCB-ACCORDION-ITEM`)}#e(){let e=this._getDirectItems();return e.length>0&&e.every(e=>e.open)}#t(){if(this.singleOpen||!this.showCloseAll)return;let e=this._getDirectItems(),t=e.length>0&&e.every(e=>e.open);e.forEach(e=>e.setOpen(!t))}onItemToggled(e,t){if(this.singleOpen&&t){this._getDirectItems().forEach(t=>{t!==e&&t.setOpen(!1)});return}!this.singleOpen&&this.showCloseAll&&this.requestUpdate()}#n(){this.singleOpen||this.showCloseAll&&this.requestUpdate()}#r(){if(this.singleOpen){this.#i();return}this.showCloseAll&&this.requestUpdate()}#i(){if(!this.singleOpen)return;let e=this._getDirectItems().filter(e=>e.open);e.length<=1||e.slice(1).forEach(e=>e.setOpen(!1))}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#a(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-accordion-spacing-block-start`,t):this.style.removeProperty(`--scb-accordion-spacing-block-start`),n?this.style.setProperty(`--scb-accordion-spacing-block-end`,n):this.style.removeProperty(`--scb-accordion-spacing-block-end`),r?this.style.setProperty(`--scb-accordion-spacing-inline-start`,r):this.style.removeProperty(`--scb-accordion-spacing-inline-start`),i?this.style.setProperty(`--scb-accordion-spacing-inline-end`,i):this.style.removeProperty(`--scb-accordion-spacing-inline-end`)}};
|
|
1430
|
+
`}firstUpdated(){this.#a(),this.#i()}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#a(),e.has(`singleOpen`)&&this.#i()}_getDirectItems(){return Array.from(this.children).filter(e=>e.tagName===`SCB-ACCORDION-ITEM`)}#e(){let e=this._getDirectItems();return e.length>0&&e.every(e=>e.open)}#t(){if(this.singleOpen||!this.showCloseAll)return;let e=this._getDirectItems(),t=e.length>0&&e.every(e=>e.open);e.forEach(e=>e.setOpen(!t))}onItemToggled(e,t){if(this.singleOpen&&t){this._getDirectItems().forEach(t=>{t!==e&&t.setOpen(!1)});return}!this.singleOpen&&this.showCloseAll&&this.requestUpdate()}#n(){this.singleOpen||this.showCloseAll&&this.requestUpdate()}#r(){if(this.singleOpen){this.#i();return}this.showCloseAll&&this.requestUpdate()}#i(){if(!this.singleOpen)return;let e=this._getDirectItems().filter(e=>e.open);e.length<=1||e.slice(1).forEach(e=>e.setOpen(!1))}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#a(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-accordion-spacing-block-start`,t):this.style.removeProperty(`--scb-accordion-spacing-block-start`),n?this.style.setProperty(`--scb-accordion-spacing-block-end`,n):this.style.removeProperty(`--scb-accordion-spacing-block-end`),r?this.style.setProperty(`--scb-accordion-spacing-inline-start`,r):this.style.removeProperty(`--scb-accordion-spacing-inline-start`),i?this.style.setProperty(`--scb-accordion-spacing-inline-end`,i):this.style.removeProperty(`--scb-accordion-spacing-inline-end`)}};P([g({type:Boolean,attribute:`single-open`,reflect:!0})],Kc.prototype,`singleOpen`,void 0),P([g({type:Boolean,attribute:`show-close-all`,reflect:!0})],Kc.prototype,`showCloseAll`,void 0),P([g({type:String,reflect:!0})],Kc.prototype,`size`,void 0),P([g({type:String,reflect:!0})],Kc.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Kc.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Kc.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Kc.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Kc.prototype,`spacingRight`,void 0),Kc=P([a(`scb-accordion`)],Kc);var qc,Jc=t((()=>{C(),y(),F(),qc=class extends S{constructor(...e){super(...e),this.orientation=`vertical`,this.disabled=!1,this.size=`medium`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.#e=()=>{let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()===`scb-checkbox`);for(let e of t){this.disabled?e.setAttribute(`disabled`,``):e.removeAttribute(`disabled`),this.orientation===`horizontal`?e.setAttribute(`orientation`,`horizontal`):e.removeAttribute(`orientation`);let t=e.hasAttribute(`data-size-from-group`);this.size===`medium`?t&&(e.removeAttribute(`size`),e.removeAttribute(`data-size-from-group`)):(!e.hasAttribute(`size`)||t)&&(e.setAttribute(`size`,this.size),e.setAttribute(`data-size-from-group`,``))}}}static{this.styles=p`
|
|
1431
1431
|
:host {
|
|
1432
1432
|
display: block;
|
|
1433
1433
|
/* Vertikal standard-spacing mellan items i gruppen */
|
|
@@ -1459,7 +1459,7 @@
|
|
|
1459
1459
|
<div class="g" role="group" aria-disabled=${String(this.disabled)} style=${`--_dir:${e}`}>
|
|
1460
1460
|
<slot @slotchange=${this.#e}></slot>
|
|
1461
1461
|
</div>
|
|
1462
|
-
`}firstUpdated(){this.#t(),this.#e()}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#t(),(e.has(`disabled`)||e.has(`orientation`)||e.has(`size`))&&this.#e()}#e;#t(){let e=this.#n(this.spacing),t=this.#n(this.spacingTop)??e,n=this.#n(this.spacingBottom)??e,r=this.#n(this.spacingLeft),i=this.#n(this.spacingRight);t?this.style.setProperty(`--scb-checkbox-group-spacing-block-start`,t):this.style.removeProperty(`--scb-checkbox-group-spacing-block-start`),n?this.style.setProperty(`--scb-checkbox-group-spacing-block-end`,n):this.style.removeProperty(`--scb-checkbox-group-spacing-block-end`),r?this.style.setProperty(`--scb-checkbox-group-spacing-inline-start`,r):this.style.removeProperty(`--scb-checkbox-group-spacing-inline-start`),i?this.style.setProperty(`--scb-checkbox-group-spacing-inline-end`,i):this.style.removeProperty(`--scb-checkbox-group-spacing-inline-end`)}#n(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}},
|
|
1462
|
+
`}firstUpdated(){this.#t(),this.#e()}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#t(),(e.has(`disabled`)||e.has(`orientation`)||e.has(`size`))&&this.#e()}#e;#t(){let e=this.#n(this.spacing),t=this.#n(this.spacingTop)??e,n=this.#n(this.spacingBottom)??e,r=this.#n(this.spacingLeft),i=this.#n(this.spacingRight);t?this.style.setProperty(`--scb-checkbox-group-spacing-block-start`,t):this.style.removeProperty(`--scb-checkbox-group-spacing-block-start`),n?this.style.setProperty(`--scb-checkbox-group-spacing-block-end`,n):this.style.removeProperty(`--scb-checkbox-group-spacing-block-end`),r?this.style.setProperty(`--scb-checkbox-group-spacing-inline-start`,r):this.style.removeProperty(`--scb-checkbox-group-spacing-inline-start`),i?this.style.setProperty(`--scb-checkbox-group-spacing-inline-end`,i):this.style.removeProperty(`--scb-checkbox-group-spacing-inline-end`)}#n(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}},P([g({type:String,reflect:!0})],qc.prototype,`orientation`,void 0),P([g({type:Boolean,reflect:!0})],qc.prototype,`disabled`,void 0),P([g({type:String,reflect:!0})],qc.prototype,`size`,void 0),P([g({type:String,reflect:!0})],qc.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],qc.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],qc.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],qc.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],qc.prototype,`spacingRight`,void 0),qc=P([a(`scb-checkbox-group`)],qc)})),Yc=n({ScbCheckbox:()=>nl}),Xc,Zc,Qc,$c,el,tl,nl,rl=t((()=>{C(),y(),Lr(),w(),Jc(),F(),Xc=!1,Zc=0,Qc=e=>{e.metaKey||e.altKey||e.ctrlKey||(Xc=!0)},$c=()=>{Xc=!1},el=()=>{Zc===0&&(window.addEventListener(`keydown`,Qc,!0),window.addEventListener(`pointerdown`,$c,!0),window.addEventListener(`mousedown`,$c,!0),window.addEventListener(`touchstart`,$c,!0)),Zc+=1},tl=()=>{Zc=Math.max(0,Zc-1),Zc===0&&(window.removeEventListener(`keydown`,Qc,!0),window.removeEventListener(`pointerdown`,$c,!0),window.removeEventListener(`mousedown`,$c,!0),window.removeEventListener(`touchstart`,$c,!0))},nl=class extends S{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.disabled=!1,this.indeterminate=!1,this.checked=!1,this.required=!1,this.size=`medium`,this.label=``,this.supportingText=``,this.ariaLabel=``,this.name=``,this.value=`on`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formResetHandler=null,this._initialChecked=!1,this._customValidationMessage=``,this._checkboxId=``,this._showOuterFocusRing=!1,this.#n=()=>{this.disabled||this.label?.trim()&&Xc&&this.#e(!0)},this.#r=()=>{this.#e(!1)},this.#i=()=>{this.#e(!1)},`attachInternals`in this&&(this._internals=this.attachInternals())}#e(e){this._showOuterFocusRing!==e&&(this._showOuterFocusRing=e,this.requestUpdate())}#t(){let e=!!this.label?.trim();this.toggleAttribute(`data-has-label`,e),e||this.#e(!1)}#n;#r;#i;connectedCallback(){super.connectedCallback(),el(),this._checkboxId=this.id||`scb-checkbox-${Math.random().toString(36).slice(2,11)}`,this._initialChecked=this.checked,this.#t(),this.addEventListener(`focusin`,this.#n),this.addEventListener(`focusout`,this.#r),this.addEventListener(`pointerdown`,this.#i,!0),this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.checked=this._initialChecked,this.indeterminate=!1,this.__syncFormValue()},this._form.addEventListener(`reset`,this._formResetHandler,!0)),this.__syncFormValue()}disconnectedCallback(){super.disconnectedCallback(),tl(),this.removeEventListener(`focusin`,this.#n),this.removeEventListener(`focusout`,this.#r),this.removeEventListener(`pointerdown`,this.#i,!0),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0)}firstUpdated(){let e=this.shadowRoot?.querySelector(`md-checkbox`);e&&e.addEventListener(`change`,()=>{let t=e,n=!!t.checked,r=!!t.indeterminate;this.checked=n,this.indeterminate=r,this.dispatchEvent(new CustomEvent(`change`,{detail:{checked:n,indeterminate:r},bubbles:!0,composed:!0}))}),(this.shadowRoot?.querySelector(`label.wrap`))?.addEventListener(`click`,e=>{if(!this.disabled&&!e.composedPath().some(e=>{let t=e;return t?.tagName?.toLowerCase?.()===`md-checkbox`||t?.classList?.contains(`box-wrap`)})){e.preventDefault();let t=this.shadowRoot.querySelector(`md-checkbox`);t&&(t.checked=!t.checked,t.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})))}}),this.__syncInnerAria(),this.__syncValidity(),this.#a()}updated(e){super.updated(e),e.has(`disabled`)&&(this.toggleAttribute(`aria-disabled`,this.disabled),this.disabled&&this.#e(!1)),(e.has(`label`)||e.has(`supportingText`)||e.has(`ariaLabel`))&&this.__syncInnerAria(),e.has(`label`)&&this.#t(),(e.has(`checked`)||e.has(`disabled`)||e.has(`value`))&&this.__syncFormValue(),(e.has(`checked`)||e.has(`disabled`)||e.has(`required`))&&this.__syncValidity(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#a()}formDisabledCallback(e){this.disabled=e}__syncInnerAria(){let e=this.shadowRoot?.querySelector(`md-checkbox`)?.shadowRoot;if(!e)return;let t=e.querySelector(`[role="checkbox"]`)||e.querySelector(`input[type="checkbox"]`);if(!t)return;let n=!!this.label?.trim(),r=n?`${this._checkboxId}-label`:``,i=this.supportingText?`${this._checkboxId}-supporting-text`:``;n&&r?(t.setAttribute(`aria-labelledby`,r),t.removeAttribute(`aria-label`)):(t.removeAttribute(`aria-labelledby`),this.ariaLabel?.trim()?t.setAttribute(`aria-label`,this.ariaLabel.trim()):t.removeAttribute(`aria-label`)),i?t.setAttribute(`aria-describedby`,i):t.removeAttribute(`aria-describedby`)}__getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required&&!this.checked?`Markera det här fältet.`:``}__syncValidity(){let e=this.shadowRoot?.querySelector(`md-checkbox`),t=this.disabled?``:this.__getValidationMessage();this._internals&&(t?this._internals.setValidity({valueMissing:!0},t,e??void 0):this._internals.setValidity({})),this.toggleAttribute(`aria-invalid`,!!t)}checkValidity(){return!this.__getValidationMessage()}reportValidity(){return this.__syncValidity(),this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=e,this.__syncValidity()}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this.__getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}__syncFormValue(){if(!this._internals)return;let e=this.disabled||!this.checked?null:this.value;this._internals.setFormValue(e)}#a(){let e=this.#o(this.spacing),t=this.#o(this.spacingTop)??e,n=this.#o(this.spacingBottom)??e,r=this.#o(this.spacingLeft),i=this.#o(this.spacingRight);t?this.style.setProperty(`--scb-checkbox-spacing-block-start`,t):this.style.removeProperty(`--scb-checkbox-spacing-block-start`),n?this.style.setProperty(`--scb-checkbox-spacing-block-end`,n):this.style.removeProperty(`--scb-checkbox-spacing-block-end`),r?this.style.setProperty(`--scb-checkbox-spacing-inline-start`,r):this.style.removeProperty(`--scb-checkbox-spacing-inline-start`),i?this.style.setProperty(`--scb-checkbox-spacing-inline-end`,i):this.style.removeProperty(`--scb-checkbox-spacing-inline-end`)}#o(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}static{this.styles=p`
|
|
1463
1463
|
:host {
|
|
1464
1464
|
display: inline-grid;
|
|
1465
1465
|
grid-template-columns: auto;
|
|
@@ -1600,7 +1600,7 @@
|
|
|
1600
1600
|
</div>`:x}
|
|
1601
1601
|
</label>
|
|
1602
1602
|
<slot></slot>
|
|
1603
|
-
`}},
|
|
1603
|
+
`}},P([g({type:Boolean,reflect:!0})],nl.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0})],nl.prototype,`indeterminate`,void 0),P([g({type:Boolean,reflect:!0})],nl.prototype,`checked`,void 0),P([g({type:Boolean,reflect:!0})],nl.prototype,`required`,void 0),P([g({type:String,reflect:!0})],nl.prototype,`size`,void 0),P([g({type:String})],nl.prototype,`label`,void 0),P([g({type:String,attribute:`supporting-text`})],nl.prototype,`supportingText`,void 0),P([g({type:String,reflect:!0,attribute:`aria-label`})],nl.prototype,`ariaLabel`,void 0),P([g({type:String})],nl.prototype,`name`,void 0),P([g({type:String})],nl.prototype,`value`,void 0),P([g({type:String,reflect:!0})],nl.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],nl.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],nl.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],nl.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],nl.prototype,`spacingRight`,void 0),nl=P([a(`scb-checkbox`)],nl)})),il=n({ScbSwitch:()=>al}),al,ol=t((()=>{C(),y(),oc(),F(),al=class extends S{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.label=``,this.ariaLabel=``,this.icons=!1,this.selected=!1,this.required=!1,this.disabled=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.name=``,this.value=`on`,this._form=null,this._formResetHandler=null,this._initialSelected=!1,this._customValidationMessage=``,`attachInternals`in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._initialSelected=this.selected,this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.selected=this._initialSelected,this.__syncFormValue()},this._form.addEventListener(`reset`,this._formResetHandler,!0)),this.__syncFormValue()}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),super.disconnectedCallback()}static{this.styles=p`
|
|
1604
1604
|
:host {
|
|
1605
1605
|
display: block;
|
|
1606
1606
|
/* Vertikalt avstånd styrs av spacing-attributen via CSS-variabler */
|
|
@@ -1658,7 +1658,7 @@
|
|
|
1658
1658
|
<span class="switch-label">${this.label}</span>
|
|
1659
1659
|
${n}
|
|
1660
1660
|
</label>
|
|
1661
|
-
`:n}},
|
|
1661
|
+
`:n}},P([g({type:String})],al.prototype,`label`,void 0),P([g({type:String,reflect:!0,attribute:`aria-label`})],al.prototype,`ariaLabel`,void 0),P([g({type:Boolean,reflect:!0})],al.prototype,`icons`,void 0),P([g({type:Boolean,reflect:!0})],al.prototype,`selected`,void 0),P([g({type:Boolean,reflect:!0})],al.prototype,`required`,void 0),P([g({type:Boolean,reflect:!0})],al.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0,attribute:`full-width`})],al.prototype,`fullWidth`,void 0),P([g({type:String,reflect:!0})],al.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],al.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],al.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],al.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],al.prototype,`spacingRight`,void 0),P([g({type:String})],al.prototype,`name`,void 0),P([g({type:String})],al.prototype,`value`,void 0),al=P([a(`scb-switch`)],al)})),L,sl=t((()=>{C(),y(),w(),E(),F(),L=class extends S{constructor(...e){super(...e),this.type=`text`,this.href=``,this.itemHref=``,this.target=``,this.disabled=!1,this.label=``,this.supportingText=``,this.overline=``,this.leading=!1,this.leadingVariant=``,this.leadingIcon=``,this.avatarLabel=``,this.avatarAlt=``,this.avatarVariant=`icon`,this.avatarSrc=``,this.imgHrefImage=``,this.trailing=!1,this.trailingVariant=``,this.trailingIcon=``,this.trailingSwitchLabel=``,this.trailingSwitchWidth=``,this.trailingSwitchSelected=!1,this.density=0,this.noDivider=!1,this.#e=!1,this.#t=!1,this.#n=!1,this.onRowClick=()=>{if(this.type===`link`&&(this.href||this.itemHref))return;let e=this.shadowRoot?.querySelector(`scb-checkbox`),t=this.shadowRoot?.querySelector(`scb-switch`);if(e&&(e.checked=!e.checked),t){let e=!this.trailingSwitchSelected;t.selected=e,this.#i(e,!0)}},this.#a=e=>{let t=e.detail?.selected,n=typeof t==`boolean`?t:e.currentTarget?.selected??!1;this.#i(n,!0)},this.#o=e=>{if(!e.defaultPrevented&&(e.key===`Enter`||e.key===` `)){if(this.type===`link`){let t=this.shadowRoot?.querySelector(`a[href]`);if(t){e.preventDefault(),t.click();return}}e.preventDefault(),this.onRowClick()}}}#e;#t;#n;static get styles(){return p`
|
|
1662
1662
|
:host {
|
|
1663
1663
|
border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
|
|
1664
1664
|
margin-bottom: calc(var(--stroke-border, 1px) * -1);
|
|
@@ -1809,7 +1809,7 @@
|
|
|
1809
1809
|
</div>
|
|
1810
1810
|
|
|
1811
1811
|
<md-focus-ring></md-focus-ring>
|
|
1812
|
-
`}},
|
|
1812
|
+
`}},P([g({type:String,reflect:!0,attribute:`type`})],L.prototype,`type`,void 0),P([g({type:String})],L.prototype,`href`,void 0),P([g({type:String,attribute:`item-href`})],L.prototype,`itemHref`,void 0),P([g({type:String,attribute:`target`})],L.prototype,`target`,void 0),P([g({type:Boolean,attribute:`disabled`})],L.prototype,`disabled`,void 0),P([g({type:String,reflect:!0})],L.prototype,`label`,void 0),P([g({type:String,attribute:`supporting-text`})],L.prototype,`supportingText`,void 0),P([g({type:String,attribute:`overline`})],L.prototype,`overline`,void 0),P([g({type:Boolean})],L.prototype,`leading`,void 0),P([g({type:String,attribute:`leading-variant`,reflect:!0})],L.prototype,`leadingVariant`,void 0),P([g({type:String,attribute:`leading-icon`})],L.prototype,`leadingIcon`,void 0),P([g({type:String,attribute:`avatar-label`})],L.prototype,`avatarLabel`,void 0),P([g({type:String,attribute:`avatar-alt`})],L.prototype,`avatarAlt`,void 0),P([g({type:String,attribute:`avatar-variant`})],L.prototype,`avatarVariant`,void 0),P([g({type:String,attribute:`avatar-src`})],L.prototype,`avatarSrc`,void 0),P([g({type:String,reflect:!0,attribute:`img-href-image`})],L.prototype,`imgHrefImage`,void 0),P([g({type:Boolean})],L.prototype,`trailing`,void 0),P([g({type:String,attribute:`trailing-variant`,reflect:!0})],L.prototype,`trailingVariant`,void 0),P([g({type:String,attribute:`trailing-icon`})],L.prototype,`trailingIcon`,void 0),P([g({type:String,attribute:`trailing-switch-label`})],L.prototype,`trailingSwitchLabel`,void 0),P([g({type:String,attribute:`trailing-switch-width`})],L.prototype,`trailingSwitchWidth`,void 0),P([g({type:Boolean,attribute:`trailing-switch-selected`,reflect:!0})],L.prototype,`trailingSwitchSelected`,void 0),P([g({type:Number,reflect:!0})],L.prototype,`density`,void 0),P([g({type:Boolean,attribute:`no-divider`,reflect:!0})],L.prototype,`noDivider`,void 0),L=P([a(`scb-list-item`)],L)})),cl=n({ScbList:()=>ll}),ll,ul=t((()=>{C(),y(),sl(),F(),ll=class extends S{constructor(...e){super(...e),this.#e=!1,this.noDivider=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onSlotChange=()=>this._setupItems()}#e;async firstUpdated(){this.#e||=(await Promise.resolve().then(()=>(so(),ao)),!0),this._setupItems(),this._applySpacing()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this._applySpacing()}_getItems(){return(this._slotEl?.assignedElements({flatten:!0})??[]).filter(e=>e instanceof HTMLElement)}_setupItems(){this._getItems().forEach((e,t)=>{e.hasAttribute(`role`)||e.setAttribute(`role`,`listitem`),e.setAttribute(`tabindex`,t===0?`0`:`-1`)});let e=this.renderRoot?.querySelector(`md-list`);e&&!e.hasAttribute(`data-kbd`)&&(e.setAttribute(`data-kbd`,`true`),e.addEventListener(`keydown`,e=>this._onKeyDown(e)))}_onKeyDown(e){let t=this._getItems();if(!t.length)return;let n=t.findIndex(e=>e.getAttribute(`tabindex`)===`0`),r=e=>{let n=(e%t.length+t.length)%t.length;t.forEach(e=>e.setAttribute(`tabindex`,`-1`));let r=t[n];r.setAttribute(`tabindex`,`0`),r.focus()};switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),r(n<0?0:n+1);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),r(n<0?0:n-1);break;case`Home`:e.preventDefault(),r(0);break;case`End`:e.preventDefault(),r(t.length-1);break;default:break}}_mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){let e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,n=this._mapSpacingToken(this.spacingBottom)??e,r=this._mapSpacingToken(this.spacingLeft),i=this._mapSpacingToken(this.spacingRight);t?this.style.marginBlockStart=t:this.style.removeProperty(`margin-block-start`),n?this.style.marginBlockEnd=n:this.style.removeProperty(`margin-block-end`),r?this.style.marginInlineStart=r:this.style.removeProperty(`margin-inline-start`),i?this.style.marginInlineEnd=i:this.style.removeProperty(`margin-inline-end`)}static{this.styles=[p`
|
|
1813
1813
|
:host {
|
|
1814
1814
|
display: block;
|
|
1815
1815
|
--scb-list-bg: transparent;
|
|
@@ -1833,7 +1833,7 @@
|
|
|
1833
1833
|
<md-list role="list" @slotchange=${this._onSlotChange}>
|
|
1834
1834
|
<slot></slot>
|
|
1835
1835
|
</md-list>
|
|
1836
|
-
`}},
|
|
1836
|
+
`}},P([g({type:Boolean,attribute:`no-divider`,reflect:!0})],ll.prototype,`noDivider`,void 0),P([g({type:String,reflect:!0})],ll.prototype,`spacing`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-top`})],ll.prototype,`spacingTop`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-bottom`})],ll.prototype,`spacingBottom`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-left`})],ll.prototype,`spacingLeft`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-right`})],ll.prototype,`spacingRight`,void 0),P([v(`slot`)],ll.prototype,`_slotEl`,void 0),ll=P([a(`scb-list`)],ll)})),dl=n({ScbIconButton:()=>R}),R,fl=t((()=>{C(),y(),k(),F(),R=class extends S{constructor(...e){super(...e),this.icon=`home`,this.ariaLabel=``,this.variant=`standard`,this.size=`medium`,this.shape=`round`,this.toggle=!1,this.selected=!1,this.toggleofficon=`add`,this.toggleonicon=`remove`,this.disabled=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.href=``,this.target=``,this.rel=``,this.__filledValue=!1,this.__loadedVariants=new Set,this.__iconLoaded=!1,this.__lastMdHost=null,this.__onInnerChange=()=>{let e=!!this.__getMdHost()?.selected;this.toggle&&(this.selected=e),this.dispatchEvent(new CustomEvent(`change`,{detail:{selected:e},bubbles:!0,composed:!0}))}}get filled(){return this.__filledValue}set filled(e){let t=!!e,n=this.__filledValue;n!==t&&(this.__filledValue=t,this.requestUpdate(`filled`,n),this.requestUpdate(`iconFilled`,n))}get iconFilled(){return this.__filledValue}set iconFilled(e){let t=!!e,n=this.__filledValue;n!==t&&(this.__filledValue=t,this.requestUpdate(`iconFilled`,n),this.requestUpdate(`filled`,n))}async firstUpdated(){await this.__ensureDepsLoaded(),await this.updateComplete,this.__attachChangeListener(),this.__syncTitleAndAria(),this.#e()}updated(e){if(super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e(),e.has(`variant`)){this.__ensureDepsLoaded().then(()=>{queueMicrotask(()=>{this.__attachChangeListener(),this.__syncTitleAndAria()})});return}(e.has(`toggle`)||e.has(`icon`)||e.has(`toggleofficon`)||e.has(`toggleonicon`)||e.has(`selected`)||e.has(`disabled`)||e.has(`ariaLabel`))&&queueMicrotask(()=>{this.__attachChangeListener(),this.__syncTitleAndAria()})}disconnectedCallback(){this.__lastMdHost?.removeEventListener?.(`change`,this.__onInnerChange),this.__lastMdHost=null,super.disconnectedCallback()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case`filled`:await Promise.resolve().then(()=>(xa(),ya));break;case`outlined`:await Promise.resolve().then(()=>(Ia(),Pa));break;case`filled-tonal`:await Promise.resolve().then(()=>(Ea(),wa));break;default:await Promise.resolve().then(()=>(ja(),ka));break}this.__loadedVariants.add(this.variant)}this.__iconLoaded||=(await Promise.resolve().then(()=>(k(),ea)),!0)}__getMdHost(){return this.renderRoot.querySelector(`md-filled-icon-button, md-outlined-icon-button, md-filled-tonal-icon-button, md-icon-button`)}__attachChangeListener(){let e=this.__getMdHost();e&&e!==this.__lastMdHost&&(this.__lastMdHost?.removeEventListener?.(`change`,this.__onInnerChange),e.addEventListener(`change`,this.__onInnerChange),this.__lastMdHost=e),this.toggle&&e&&`selected`in e&&(e.selected=this.selected)}__syncTitleAndAria(){let e=this.__getMdHost();if(!e)return;let t=(this.getAttribute(`title`)||``).trim(),n=(this.ariaLabel||this.getAttribute(`aria-label`)||``).trim(),r=this.getAttribute(`aria-controls`),i=this.getAttribute(`aria-expanded`),a=n||t||this.icon.trim()||void 0;a?e.setAttribute(`aria-label`,a):e.removeAttribute(`aria-label`),r===null?e.removeAttribute(`aria-controls`):e.setAttribute(`aria-controls`,r),i===null?e.removeAttribute(`aria-expanded`):e.setAttribute(`aria-expanded`,i)}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-icon-button-spacing-block-start`,t):this.style.removeProperty(`--scb-icon-button-spacing-block-start`),n?this.style.setProperty(`--scb-icon-button-spacing-block-end`,n):this.style.removeProperty(`--scb-icon-button-spacing-block-end`),r?this.style.setProperty(`--scb-icon-button-spacing-inline-start`,r):this.style.removeProperty(`--scb-icon-button-spacing-inline-start`),i?this.style.setProperty(`--scb-icon-button-spacing-inline-end`,i):this.style.removeProperty(`--scb-icon-button-spacing-inline-end`)}static{this.styles=p`
|
|
1837
1837
|
:host {
|
|
1838
1838
|
display: inline-flex;
|
|
1839
1839
|
margin-block-start: var(--scb-icon-button-spacing-block-start, 0);
|
|
@@ -2002,7 +2002,7 @@
|
|
|
2002
2002
|
<md-icon-button ?disabled=${this.disabled} href=${this.href||x} target=${this.target||x} rel=${this.rel||x}>
|
|
2003
2003
|
${e}
|
|
2004
2004
|
</md-icon-button>
|
|
2005
|
-
`}}render(){return this.__renderMd()}}
|
|
2005
|
+
`}}render(){return this.__renderMd()}},P([g({type:String})],R.prototype,`icon`,void 0),P([g({type:Boolean,reflect:!0})],R.prototype,`filled`,null),P([g({type:Boolean,attribute:`icon-filled`,reflect:!0})],R.prototype,`iconFilled`,null),P([g({type:String,attribute:`aria-label`})],R.prototype,`ariaLabel`,void 0),P([g({type:String})],R.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],R.prototype,`size`,void 0),P([g({type:String,reflect:!0})],R.prototype,`shape`,void 0),P([g({type:Boolean,reflect:!0})],R.prototype,`toggle`,void 0),P([g({type:Boolean,reflect:!0})],R.prototype,`selected`,void 0),P([g({type:String})],R.prototype,`toggleofficon`,void 0),P([g({type:String})],R.prototype,`toggleonicon`,void 0),P([g({type:Boolean,reflect:!0})],R.prototype,`disabled`,void 0),P([g({type:String,reflect:!0})],R.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],R.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],R.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],R.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],R.prototype,`spacingRight`,void 0),P([g({type:String})],R.prototype,`href`,void 0),P([g({type:String})],R.prototype,`target`,void 0),P([g({type:String})],R.prototype,`rel`,void 0),R=P([a(`scb-icon-button`)],R)}));ul(),fl(),bt();var pl=e=>e??x;C(),y(),F();var ml,hl=()=>{customElements.get(`md-focus-ring`)||(ml??=Promise.resolve().then(()=>(w(),Vt)).then(()=>void 0))},gl=class extends S{constructor(...e){super(...e),this.href=``,this.disabled=!1,this.ariaLabel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.#t=e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())}}static{this.styles=p`
|
|
2006
2006
|
:host {
|
|
2007
2007
|
display: inline-block;
|
|
2008
2008
|
position: relative;
|
|
@@ -2058,17 +2058,17 @@
|
|
|
2058
2058
|
`}firstUpdated(){this.#e()}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-link-spacing-block-start`,t):this.style.removeProperty(`--scb-link-spacing-block-start`),n?this.style.setProperty(`--scb-link-spacing-block-end`,n):this.style.removeProperty(`--scb-link-spacing-block-end`),r?this.style.setProperty(`--scb-link-spacing-inline-start`,r):this.style.removeProperty(`--scb-link-spacing-inline-start`),i?this.style.setProperty(`--scb-link-spacing-inline-end`,i):this.style.removeProperty(`--scb-link-spacing-inline-end`)}render(){let e=this.target===`_blank`&&!this.rel?`noopener noreferrer`:this.rel;return b`
|
|
2059
2059
|
<a
|
|
2060
2060
|
part="anchor"
|
|
2061
|
-
href=${
|
|
2062
|
-
target=${
|
|
2063
|
-
rel=${
|
|
2064
|
-
download=${
|
|
2061
|
+
href=${pl(this.disabled?void 0:this.href||void 0)}
|
|
2062
|
+
target=${pl(this.target)}
|
|
2063
|
+
rel=${pl(e)}
|
|
2064
|
+
download=${pl(this.download)}
|
|
2065
2065
|
aria-disabled=${this.disabled?`true`:`false`}
|
|
2066
|
-
aria-label=${
|
|
2067
|
-
@focusin=${
|
|
2066
|
+
aria-label=${pl(this.ariaLabel||void 0)}
|
|
2067
|
+
@focusin=${hl}
|
|
2068
2068
|
@click=${this.#t}
|
|
2069
2069
|
><slot></slot></a>
|
|
2070
2070
|
<md-focus-ring aria-hidden="true"></md-focus-ring>
|
|
2071
|
-
`}#t};
|
|
2071
|
+
`}#t};P([g({type:String,reflect:!0})],gl.prototype,`href`,void 0),P([g({type:String,reflect:!0})],gl.prototype,`target`,void 0),P([g({type:String,reflect:!0})],gl.prototype,`rel`,void 0),P([g({type:String,reflect:!0})],gl.prototype,`download`,void 0),P([g({type:Boolean,reflect:!0})],gl.prototype,`disabled`,void 0),P([g({type:String,attribute:`aria-label`})],gl.prototype,`ariaLabel`,void 0),P([g({type:String,reflect:!0})],gl.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],gl.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],gl.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],gl.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],gl.prototype,`spacingRight`,void 0),gl=P([a(`scb-link`)],gl),C(),y(),F();var z=class extends S{static{this.formAssociated=!0}constructor(){super(),this.variant=`assist`,this.staticVariant=`filled`,this.label=``,this.icon=``,this.disabled=!1,this.elevated=!1,this.removable=!1,this.selected=!1,this.disableToggle=!1,this.href=``,this.target=``,this.name=``,this.value=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.size=`medium`,this._internals=null,this.__loadedVariants=new Set,this.__chipSetLoaded=!1,this.__iconLoaded=!1,this._onFilterClick=e=>{if(this.disableToggle){let t=e.currentTarget;t&&(t.selected=this.selected),e.preventDefault();return}this._toggleSelected()},`attachInternals`in this&&(this._internals=this.attachInternals())}updated(e){super.updated(e),(e.has(`variant`)||e.has(`icon`))&&this.__ensureDepsLoaded(),e.has(`disabled`)&&(this.toggleAttribute(`aria-disabled`,this.disabled),this.dispatchEvent(new CustomEvent(`disabled-changed`,{detail:{disabled:this.disabled},bubbles:!0,composed:!0}))),e.has(`variant`)&&this.dispatchEvent(new CustomEvent(`variant-changed`,{detail:{variant:this.variant},bubbles:!0,composed:!0})),e.has(`staticVariant`)&&this.dispatchEvent(new CustomEvent(`static-variant-changed`,{detail:{staticVariant:this.staticVariant},bubbles:!0,composed:!0})),e.has(`label`)&&this.dispatchEvent(new CustomEvent(`label-changed`,{detail:{label:this.label},bubbles:!0,composed:!0})),e.has(`elevated`)&&this.dispatchEvent(new CustomEvent(`elevated-changed`,{detail:{elevated:this.elevated},bubbles:!0,composed:!0})),e.has(`icon`)&&this.dispatchEvent(new CustomEvent(`icon-changed`,{detail:{icon:this.icon},bubbles:!0,composed:!0})),e.has(`size`)&&this.dispatchEvent(new CustomEvent(`size-changed`,{detail:{size:this.size},bubbles:!0,composed:!0})),(e.has(`selected`)||e.has(`disabled`)||e.has(`variant`)||e.has(`value`)||e.has(`name`))&&this._updateFormValue(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}firstUpdated(){this.__ensureDepsLoaded(),this.#e(),this._updateFormValue()}async __ensureDepsLoaded(){let e=this.variant===`assist`||this.variant===`filter`?this.variant:null;if(e&&!this.__loadedVariants.has(e)){switch(e){case`assist`:await Promise.resolve().then(()=>(Xr(),Jr));break;case`filter`:await Promise.resolve().then(()=>(bi(),vi));break}this.__loadedVariants.add(e)}e&&!this._insideChipSet&&!this.__chipSetLoaded&&(await Promise.resolve().then(()=>(ri(),ti)),this.__chipSetLoaded=!0),this.icon&&!this.__iconLoaded&&(await Promise.resolve().then(()=>(k(),ea)),this.__iconLoaded=!0)}static{this.styles=p`
|
|
2072
2072
|
:host {
|
|
2073
2073
|
display: inline-block;
|
|
2074
2074
|
margin-block-start: var(--scb-chip-spacing-block-start, 0);
|
|
@@ -2171,7 +2171,7 @@
|
|
|
2171
2171
|
>
|
|
2172
2172
|
${e}
|
|
2173
2173
|
</md-filter-chip>
|
|
2174
|
-
`;default:return b``}}_toggleSelected(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent(`selected-changed`,{detail:{selected:this.selected},bubbles:!0,composed:!0})),this._updateFormValue()}_onRemove(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(`remove`,{detail:{label:this.label},bubbles:!0,composed:!0}))}_forward(e){this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail,bubbles:!0,composed:!0}))}_updateFormValue(){if(!this._internals)return;if(!(this.variant===`filter`&&this.selected&&!this.disabled&&this.name)){this._internals.setFormValue(null),this._internals.setValidity({});return}let e=this.value||this.label||``;this._internals.setFormValue(e,this.name),this._internals.setValidity({})}formDisabledCallback(e){this.disabled=e}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop),n=this.mapSpacingToken(this.spacingBottom),r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight),a=t??e,o=n??e;a?this.style.setProperty(`--scb-chip-spacing-block-start`,a):this.style.removeProperty(`--scb-chip-spacing-block-start`),o?this.style.setProperty(`--scb-chip-spacing-block-end`,o):this.style.removeProperty(`--scb-chip-spacing-block-end`),r?this.style.setProperty(`--scb-chip-spacing-inline-start`,r):this.style.removeProperty(`--scb-chip-spacing-inline-start`),i?this.style.setProperty(`--scb-chip-spacing-inline-end`,i):this.style.removeProperty(`--scb-chip-spacing-inline-end`)}};
|
|
2174
|
+
`;default:return b``}}_toggleSelected(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent(`selected-changed`,{detail:{selected:this.selected},bubbles:!0,composed:!0})),this._updateFormValue()}_onRemove(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(`remove`,{detail:{label:this.label},bubbles:!0,composed:!0}))}_forward(e){this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail,bubbles:!0,composed:!0}))}_updateFormValue(){if(!this._internals)return;if(!(this.variant===`filter`&&this.selected&&!this.disabled&&this.name)){this._internals.setFormValue(null),this._internals.setValidity({});return}let e=this.value||this.label||``;this._internals.setFormValue(e,this.name),this._internals.setValidity({})}formDisabledCallback(e){this.disabled=e}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop),n=this.mapSpacingToken(this.spacingBottom),r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight),a=t??e,o=n??e;a?this.style.setProperty(`--scb-chip-spacing-block-start`,a):this.style.removeProperty(`--scb-chip-spacing-block-start`),o?this.style.setProperty(`--scb-chip-spacing-block-end`,o):this.style.removeProperty(`--scb-chip-spacing-block-end`),r?this.style.setProperty(`--scb-chip-spacing-inline-start`,r):this.style.removeProperty(`--scb-chip-spacing-inline-start`),i?this.style.setProperty(`--scb-chip-spacing-inline-end`,i):this.style.removeProperty(`--scb-chip-spacing-inline-end`)}};P([g({type:String,reflect:!0})],z.prototype,`variant`,void 0),P([g({type:String,reflect:!0,attribute:`static-variant`})],z.prototype,`staticVariant`,void 0),P([g({type:String})],z.prototype,`label`,void 0),P([g({type:String})],z.prototype,`icon`,void 0),P([g({type:Boolean,reflect:!0})],z.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0})],z.prototype,`elevated`,void 0),P([g({type:Boolean,reflect:!0})],z.prototype,`removable`,void 0),P([g({type:Boolean,reflect:!0})],z.prototype,`selected`,void 0),P([g({type:Boolean,reflect:!0,attribute:`disable-toggle`})],z.prototype,`disableToggle`,void 0),P([g({type:String})],z.prototype,`href`,void 0),P([g({type:String})],z.prototype,`target`,void 0),P([g({type:String})],z.prototype,`name`,void 0),P([g({type:String})],z.prototype,`value`,void 0),P([g({type:String,reflect:!0})],z.prototype,`spacing`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-top`})],z.prototype,`spacingTop`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-bottom`})],z.prototype,`spacingBottom`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-left`})],z.prototype,`spacingLeft`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-right`})],z.prototype,`spacingRight`,void 0),P([g({type:String,reflect:!0})],z.prototype,`size`,void 0),z=P([a(`scb-chip`)],z),C(),y(),F();var _l=class extends S{constructor(...e){super(...e),this.src=``,this.alt=``,this.label=``,this.size=`medium`,this.shape=`circular`,this.iconName=``,this.variant=`image`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._imgError=!1,this._hasIconSlot=!1,this._onImgLoad=()=>{this._imgError=!1,this.dispatchEvent(new CustomEvent(`image-load`,{bubbles:!0,composed:!0}))},this._onImgError=()=>{this._imgError=!0,this.dispatchEvent(new CustomEvent(`image-error`,{bubbles:!0,composed:!0}))},this._onIconSlotChange=e=>{let t=e.currentTarget;this._hasIconSlot=(t.assignedNodes({flatten:!0})||[]).length>0}}static{this.styles=p`
|
|
2175
2175
|
:host {
|
|
2176
2176
|
display: inline-block;
|
|
2177
2177
|
vertical-align: middle;
|
|
@@ -2280,7 +2280,7 @@
|
|
|
2280
2280
|
<div class="container" part="container" role="img" aria-label=${e??x}>
|
|
2281
2281
|
${this.variant===`icon`?n:r}
|
|
2282
2282
|
</div>
|
|
2283
|
-
`}};
|
|
2283
|
+
`}};P([g({type:String})],_l.prototype,`src`,void 0),P([g({type:String})],_l.prototype,`alt`,void 0),P([g({type:String})],_l.prototype,`label`,void 0),P([g({type:String,reflect:!0})],_l.prototype,`size`,void 0),P([g({type:String,reflect:!0})],_l.prototype,`shape`,void 0),P([g({type:String,attribute:`icon-name`,reflect:!0})],_l.prototype,`iconName`,void 0),P([g({type:String,reflect:!0})],_l.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],_l.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],_l.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],_l.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],_l.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],_l.prototype,`spacingRight`,void 0),P([_()],_l.prototype,`_imgError`,void 0),P([_()],_l.prototype,`_hasIconSlot`,void 0),_l=P([a(`scb-avatar`)],_l),bt(),Kt();var vl=class extends Gt{constructor(e){if(super(e),this.it=x,e.type!==Ut.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===x||e==null)return this._t=void 0,this.it=e;if(e===at)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};vl.directiveName=`unsafeHTML`,vl.resultType=1;var yl=Wt(vl);C(),y(),Gc(),k(),F();var bl=0,xl=class extends S{constructor(...e){super(...e),this.variant=`plain`,this.arrow=null,this.supportingtext=``,this.label=``,this.trigger=`hover`,this.position=`top`,this.open=!1,this.delay=.25,this.offset=0,this.maxWidth=`300px`,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition=`top`,this._tooltipId=`scb-tooltip-${++bl}`,this._onTriggerMouseEnter=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerFocus=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTooltipMouseEnter=()=>{this._hasTooltipContent()&&(this.trigger===`hover`||this.trigger===`hover-click`)&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTooltipMouseLeave=()=>{(this.trigger===`hover`||this.trigger===`hover-click`)&&(this._hoverActive=!1,this._clickActive||this._setOpenState(!1))},this._onTriggerClick=()=>{this._hasTooltipContent()&&(this._clickActive=!this._clickActive,this._clickActive?this._setOpenState(!0):this._hoverActive||this._setOpenState(!1))}}static{this.styles=p`
|
|
2284
2284
|
:host {
|
|
2285
2285
|
position: relative;
|
|
2286
2286
|
display: inline-block;
|
|
@@ -2451,7 +2451,7 @@
|
|
|
2451
2451
|
<div class="scb-tooltip-text-container">
|
|
2452
2452
|
<label class="scb-tooltip-label">${this.label}</label>
|
|
2453
2453
|
<span class="scb-tooltip-supporting-text">
|
|
2454
|
-
${
|
|
2454
|
+
${yl(this.supportingtext)}
|
|
2455
2455
|
</span>
|
|
2456
2456
|
</div>
|
|
2457
2457
|
<div class="scb-tooltip-button-container">
|
|
@@ -2469,13 +2469,13 @@
|
|
|
2469
2469
|
>
|
|
2470
2470
|
<div class="scb-tooltip-container">
|
|
2471
2471
|
<span class="scb-tooltip-supporting-text">
|
|
2472
|
-
${
|
|
2472
|
+
${yl(this.supportingtext)}
|
|
2473
2473
|
</span>
|
|
2474
2474
|
</div>
|
|
2475
2475
|
${t}
|
|
2476
2476
|
</div>
|
|
2477
2477
|
<slot @slotchange=${this._onDefaultSlotChange}></slot>
|
|
2478
|
-
`:b`<slot @slotchange=${this._onDefaultSlotChange}></slot>`}};
|
|
2478
|
+
`:b`<slot @slotchange=${this._onDefaultSlotChange}></slot>`}};P([g({type:String,reflect:!0})],xl.prototype,`variant`,void 0),P([g({type:Boolean,reflect:!0})],xl.prototype,`arrow`,void 0),P([g({type:String,attribute:`supporting-text`})],xl.prototype,`supportingtext`,void 0),P([g({type:String})],xl.prototype,`label`,void 0),P([g({type:String,reflect:!0})],xl.prototype,`trigger`,void 0),P([g({type:String,reflect:!0})],xl.prototype,`position`,void 0),P([g({type:Boolean,reflect:!0})],xl.prototype,`open`,void 0),P([g({type:Number,reflect:!0})],xl.prototype,`delay`,void 0),P([g({type:Number,reflect:!0})],xl.prototype,`offset`,void 0),P([g({type:String,reflect:!0,attribute:`max-width`})],xl.prototype,`maxWidth`,void 0),xl=P([a(`scb-tooltip`)],xl),C(),y(),w(),Gc(),F();var Sl,Cl=[`standard`,`list`,`social`,`link`,`action`,`container`],B={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},V=class extends S{static{Sl=this}constructor(...e){super(...e),this.__managedSocialAttributes=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`]),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=e=>{let t=e.currentTarget.closest(`.media`);t&&t.classList.add(`is-loaded`)},this.__onKeyDown=e=>{let t=this.__effectiveHref();(e.key===`Enter`||e.key===` `)&&t&&(e.preventDefault(),this.__navigate(t,e))},this.__handleHrefNavigation=e=>{let t=this.__effectiveHref();t&&(e.target.closest(`a`)||this.__navigate(t,e))}}static{this.__iconLoaded=!1}static{this.__rippleLoaded=!1}static{this.styles=p`
|
|
2479
2479
|
:host {
|
|
2480
2480
|
display: block;
|
|
2481
2481
|
container-type: inline-size;
|
|
@@ -3109,7 +3109,7 @@
|
|
|
3109
3109
|
.scb-card.filled-alternative .content.list ::slotted(scb-list) {
|
|
3110
3110
|
--scb-list-bg: var(--md-sys-color-surface-container, #EEF3FF);
|
|
3111
3111
|
}
|
|
3112
|
-
`}attributeChangedCallback(e,t,n){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(e)||super.attributeChangedCallback(e,t,n)}get likeButton(){return this.cardType===`social`?this.renderRoot.querySelector(`.likes scb-icon-button`):null}__calcAspectWH(e){let t=(e||``).trim();if(!t)return{w:600,h:400};let n=t.includes(`/`)?t.split(`/`):t.includes(`:`)?t.split(`:`):t.includes(`x`)?t.split(`x`):null;if(n&&n.length===2){let e=Number(n[0]),t=Number(n[1]);if(e>0&&t>0)return{w:e,h:t}}let r=Number(t);return isFinite(r)&&r>0?{w:1e3,h:Math.round(1e3/r)}:{w:600,h:400}}__noWrapText(e){return(e??``).replace(/ /g,`\xA0`).replace(/-/g,`‑`)}__decodeHtmlEntities(e){let t=document.createElement(`textarea`);return t.innerHTML=e,t.value}__normalizePlainText(e){let t=String(e??``);for(let e=0;e<5;e+=1){let e=this.__decodeHtmlEntities(t);if(e===t)break;t=e}return t.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi,` `).replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim()}get#e(){return this.cardTitle||this.title}get cardType(){let e=(this.type||`standard`).toLowerCase();return
|
|
3112
|
+
`}attributeChangedCallback(e,t,n){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(e)||super.attributeChangedCallback(e,t,n)}get likeButton(){return this.cardType===`social`?this.renderRoot.querySelector(`.likes scb-icon-button`):null}__calcAspectWH(e){let t=(e||``).trim();if(!t)return{w:600,h:400};let n=t.includes(`/`)?t.split(`/`):t.includes(`:`)?t.split(`:`):t.includes(`x`)?t.split(`x`):null;if(n&&n.length===2){let e=Number(n[0]),t=Number(n[1]);if(e>0&&t>0)return{w:e,h:t}}let r=Number(t);return isFinite(r)&&r>0?{w:1e3,h:Math.round(1e3/r)}:{w:600,h:400}}__noWrapText(e){return(e??``).replace(/ /g,`\xA0`).replace(/-/g,`‑`)}__decodeHtmlEntities(e){let t=document.createElement(`textarea`);return t.innerHTML=e,t.value}__normalizePlainText(e){let t=String(e??``);for(let e=0;e<5;e+=1){let e=this.__decodeHtmlEntities(t);if(e===t)break;t=e}return t.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi,` `).replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim()}get#e(){return this.cardTitle||this.title}get cardType(){let e=(this.type||`standard`).toLowerCase();return Cl.includes(e)?e:`standard`}__dispatchLikeEvent(e,t){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:t})),this.dispatchEvent(new CustomEvent(e.replace(`-`,``),{bubbles:!0,composed:!0,detail:t}))}__dispatchSocialActionEvent(e,t){this.dispatchEvent(new CustomEvent(`social-${e}`,{bubbles:!0,composed:!0,detail:{action:e,originalEvent:t}}))}__dispatchCardNavigate(e,t){let n={href:e,originalEvent:t},r=new CustomEvent(`card-navigate`,{bubbles:!0,composed:!0,cancelable:!0,detail:n});if(this.dispatchEvent(r),r.defaultPrevented)return!1;let i=new CustomEvent(`cardnavigate`,{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(i),!i.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__navigate(e,t){e&&this.__dispatchCardNavigate(e,t)&&window.open(e,`_self`)}__hasSlottedContent(e){return Array.from(this.children).some(t=>t.getAttribute(`slot`)===e)}__mediaTemplate(){if(this.__hasSlottedContent(`media`))return b`
|
|
3113
3113
|
<div class="media">
|
|
3114
3114
|
<slot name="media"></slot>
|
|
3115
3115
|
</div>
|
|
@@ -3330,7 +3330,7 @@
|
|
|
3330
3330
|
${pe(!!a)}
|
|
3331
3331
|
${me()}
|
|
3332
3332
|
</div>
|
|
3333
|
-
`)}}updated(e){super.updated(e),e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),e.has(`type`)&&(this.cardType===`list`?this.setAttribute(`data-density`,`-2`):this.removeAttribute(`data-density`)),this.mediaFit&&this.mediaFit!==`cover`?this.style.setProperty(`--scb-card-media-fit`,this.mediaFit):this.style.removeProperty(`--scb-card-media-fit`),this.mediaPosition&&this.mediaPosition!==`center`?this.style.setProperty(`--scb-card-media-position`,this.mediaPosition):this.style.removeProperty(`--scb-card-media-position`),this.__syncSocialAttributes(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#t(),(e.has(`innerPadding`)||e.has(`paddingTop`)||e.has(`paddingBottom`)||e.has(`paddingLeft`)||e.has(`paddingRight`))&&this.#n()}async firstUpdated(e){
|
|
3333
|
+
`)}}updated(e){super.updated(e),e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),e.has(`type`)&&(this.cardType===`list`?this.setAttribute(`data-density`,`-2`):this.removeAttribute(`data-density`)),this.mediaFit&&this.mediaFit!==`cover`?this.style.setProperty(`--scb-card-media-fit`,this.mediaFit):this.style.removeProperty(`--scb-card-media-fit`),this.mediaPosition&&this.mediaPosition!==`center`?this.style.setProperty(`--scb-card-media-position`,this.mediaPosition):this.style.removeProperty(`--scb-card-media-position`),this.__syncSocialAttributes(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#t(),(e.has(`innerPadding`)||e.has(`paddingTop`)||e.has(`paddingBottom`)||e.has(`paddingLeft`)||e.has(`paddingRight`))&&this.#n()}async firstUpdated(e){Sl.__iconLoaded||(await Promise.resolve().then(()=>(k(),ea)),Sl.__iconLoaded=!0),Sl.__rippleLoaded||(await Promise.resolve().then(()=>(E(),hn)),Sl.__rippleLoaded=!0),this.#t(),this.#n(),this.__syncSocialAttributes()}};P([g({type:String,reflect:!0,converter:B})],V.prototype,`type`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`variant`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`direction`,void 0),P([g({type:String,reflect:!0})],V.prototype,`size`,void 0),P([g({type:String,attribute:`media-type`})],V.prototype,`mediaType`,void 0),P([g({type:String,attribute:`media-href`})],V.prototype,`mediaHref`,void 0),P([g({type:String,attribute:`media-alt`})],V.prototype,`mediaAlt`,void 0),P([g({type:String,attribute:`media-srcset`})],V.prototype,`mediaSrcset`,void 0),P([g({type:String,attribute:`media-sizes`})],V.prototype,`mediaSizes`,void 0),P([g({type:String,attribute:`media-loading`})],V.prototype,`mediaLoading`,void 0),P([g({type:String,attribute:`media-decoding`})],V.prototype,`mediaDecoding`,void 0),P([g({type:String,attribute:`media-fetchpriority`})],V.prototype,`mediaFetchPriority`,void 0),P([g({type:String,attribute:`media-fit`})],V.prototype,`mediaFit`,void 0),P([g({type:String,attribute:`media-position`})],V.prototype,`mediaPosition`,void 0),P([g({type:String,attribute:`media-width`})],V.prototype,`mediaWidth`,void 0),P([g({type:String,attribute:`media-height`})],V.prototype,`mediaHeight`,void 0),P([g({type:String,attribute:`media-aspect`})],V.prototype,`mediaAspect`,void 0),P([g({type:Boolean,attribute:`media-placeholder`})],V.prototype,`mediaPlaceholder`,void 0),P([g({type:String,attribute:`card-href`,reflect:!0,converter:B})],V.prototype,`cardHref`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`href`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`title`,void 0),P([g({type:String,attribute:`card-title`,reflect:!0,converter:B})],V.prototype,`cardTitle`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`subtitle`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`vignette`,void 0),P([g({type:String,attribute:`vignette-variant`,converter:B})],V.prototype,`vignetteVariant`,void 0),P([g({type:String,attribute:`vignette-spacing`,reflect:!0,converter:B})],V.prototype,`vignetteSpacing`,void 0),P([g({type:String,attribute:`vignette-spacing-top`,reflect:!0,converter:B})],V.prototype,`vignetteSpacingTop`,void 0),P([g({type:String,attribute:`vignette-spacing-bottom`,reflect:!0,converter:B})],V.prototype,`vignetteSpacingBottom`,void 0),P([g({type:String,attribute:`vignette-spacing-left`,reflect:!0,converter:B})],V.prototype,`vignetteSpacingLeft`,void 0),P([g({type:String,attribute:`vignette-spacing-right`,reflect:!0,converter:B})],V.prototype,`vignetteSpacingRight`,void 0),P([g({type:String,attribute:`supporting-text`,reflect:!0,converter:B})],V.prototype,`supportingText`,void 0),P([g({type:Date,reflect:!0})],V.prototype,`date`,void 0),P([g({type:String,attribute:`social-comments-text`})],V.prototype,`commentsText`,void 0),P([g({type:Number,attribute:`social-comments`})],V.prototype,`comments`,void 0),P([g({type:Boolean,attribute:`social-comments-disabled`})],V.prototype,`commentsDisabled`,void 0),P([g({type:String,attribute:`social-comments-href`})],V.prototype,`commentsHref`,void 0),P([g({type:String,attribute:`social-likes-text`})],V.prototype,`likesText`,void 0),P([g({type:Number,attribute:`social-likes`})],V.prototype,`likes`,void 0),P([g({type:Boolean,attribute:`social-likes-disabled`})],V.prototype,`likesDisabled`,void 0),P([g({type:String,attribute:`social-likes-hover-content`})],V.prototype,`likesHoverContent`,void 0),P([g({type:Boolean,attribute:`social-has-liked`})],V.prototype,`hasLiked`,void 0),P([g({type:Boolean,attribute:`social-likes-interactive`})],V.prototype,`likesInteractive`,void 0),P([g({type:Boolean,attribute:`social-author`})],V.prototype,`author`,void 0),P([g({type:String,attribute:`social-author-text`})],V.prototype,`authorText`,void 0),P([g({type:String,attribute:`social-author-href`})],V.prototype,`authorHref`,void 0),P([g({type:Boolean,attribute:`social-reply-enabled`})],V.prototype,`replyEnabled`,void 0),P([g({type:Boolean,attribute:`social-edit-enabled`})],V.prototype,`editEnabled`,void 0),P([g({type:Boolean,attribute:`social-delete-enabled`})],V.prototype,`deleteEnabled`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`sizing`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`width`,void 0),P([g({type:String,reflect:!0,attribute:`max-width`,converter:B})],V.prototype,`maxWidth`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`height`,void 0),P([g({type:String,reflect:!0,attribute:`max-height`,converter:B})],V.prototype,`maxHeight`,void 0),P([g({type:String,reflect:!0,converter:B})],V.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0,converter:B})],V.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0,converter:B})],V.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0,converter:B})],V.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0,converter:B})],V.prototype,`spacingRight`,void 0),P([g({type:String,attribute:`padding`,reflect:!0,converter:B})],V.prototype,`innerPadding`,void 0),P([g({type:String,attribute:`padding-top`,reflect:!0,converter:B})],V.prototype,`paddingTop`,void 0),P([g({type:String,attribute:`padding-bottom`,reflect:!0,converter:B})],V.prototype,`paddingBottom`,void 0),P([g({type:String,attribute:`padding-left`,reflect:!0,converter:B})],V.prototype,`paddingLeft`,void 0),P([g({type:String,attribute:`padding-right`,reflect:!0,converter:B})],V.prototype,`paddingRight`,void 0),V=Sl=P([a(`scb-card`)],V);var wl=class extends V{constructor(){super(),this.type=`list`}get cardType(){return`list`}};wl=P([a(`scb-list-card`)],wl);var Tl=class extends V{constructor(){super(),this.type=`link`}get cardType(){return`link`}};Tl=P([a(`scb-link-card`)],Tl);var El=class extends V{constructor(){super(),this.type=`action`}get cardType(){return`action`}};El=P([a(`scb-action-card`)],El);var Dl=class extends V{constructor(){super(),this.type=`social`}get cardType(){return`social`}};Dl=P([a(`scb-social-card`)],Dl);var Ol=class extends V{constructor(){super(),this.type=`container`}get cardType(){return`container`}};Ol=P([a(`scb-container-card`)],Ol);var kl=n({ScbSearch:()=>jl}),Al,jl,Ml=t((()=>{C(),y(),E(),k(),w(),F(),Al=0,jl=class extends S{static{this.formAssociated=!0}async _ensureListDepsLoaded(){this._listDepsLoaded||(this._listDepsPromise??=Promise.resolve().then(()=>(ul(),cl)).then(()=>{this._listDepsLoaded=!0}),await this._listDepsPromise)}_ensureListDepsWhenNeeded(){let e=(this.value??``).trim().length>0;!this._inputFocused||!e||!this._hasSuggestions||this._ensureListDepsLoaded().then(()=>this.requestUpdate())}constructor(){super(),this._internals=null,this.supportingText=``,this.value=``,this.name=``,this.disabled=!1,this.required=!1,this.autocomplete=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.size=`large`,this.fullScreen=!1,this._inputFocused=!1,this._visibleSuggestions=0,this._listDepsLoaded=!1,this._activeIndex=-1,this._listboxId=`scb-search-listbox-${++Al}`,this._kbMode=!1,this._valueOnFocus=``,this._lastChangeValue=``,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key===`Tab`&&(this._kbShouldShowRing=!0,this._inputFocused&&this._updateInputRingVisibility())},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&this._updateInputRingVisibility()},this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialValue=``,this._customValidationMessage=``,this._listScrollHandler=()=>{let e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
|
|
3334
3334
|
:host {
|
|
3335
3335
|
display: flex;
|
|
3336
3336
|
flex-direction: column;
|
|
@@ -3621,7 +3621,7 @@
|
|
|
3621
3621
|
</scb-list>
|
|
3622
3622
|
<md-focus-ring id="optionRing" class="option-ring"></md-focus-ring>
|
|
3623
3623
|
`:x}
|
|
3624
|
-
`}formDisabledCallback(e){this.disabled=e}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required&&!(this.value??``).trim()?`Fyll i det här fältet.`:``}_syncValidity(){let e=this._inputEl(),t=this.disabled?``:this._getValidationMessage();e&&(e.setCustomValidity(t),e.setAttribute(`aria-invalid`,t?`true`:`false`)),this._internals&&(t?this._internals.setValidity({valueMissing:!0},t,e??void 0):this._internals.setValidity({})),this.toggleAttribute(`aria-invalid`,!!t)}checkValidity(){return!this._getValidationMessage()}reportValidity(){this._syncValidity();let e=this._inputEl();return e?e.reportValidity():this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=e,this._syncValidity()}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}submit(){let e=this._getActiveItem(),t={value:this.value};e&&(t.active=this._itemPayload(e)),this._dispatchSubmit(t)}focus(e){let t=this._inputEl();if(t){t.focus(e);return}this.updateComplete.then(()=>this._inputEl()?.focus(e))}blur(){this._inputEl()?.blur()}get _hasSuggestions(){return this._visibleSuggestions>=0?this._visibleSuggestions>0:Array.from(this.getElementsByTagName(`scb-list-item`)).some(e=>!e.hasAttribute(`hidden`)&&e.style.display!==`none`)}_onSlotChange(){this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded()}_onInput(e){e.stopPropagation();let t=e.target;this.value=t.value,this._syncFormValue(),this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded(),this._activeIndex=-1,this._kbMode=!1,this._updateComboboxA11y();let n={value:this.value};this.dispatchEvent(new CustomEvent(`scb-search-input`,{detail:n,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchinput`,{detail:n,bubbles:!0,composed:!0})),this._dispatchStandardInput()}_onNativeChange(e){e.stopPropagation()}_onFocus(){this.disabled||(this._valueOnFocus=this.value??``,this._inputFocused=!0,this._updateInputRingVisibility(),this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded(),this._updateComboboxA11y(),this.requestUpdate())}_onBlur(){setTimeout(()=>{this._inputFocused=!1,this._activeIndex=-1,this._kbMode=!1,this._updateInputRingVisibility(),this._updateComboboxA11y(),this._hideOptionRing(),this._valueOnFocus!==(this.value??``)&&this._dispatchStandardChangeIfNeeded(),this.requestUpdate()},100)}_updateInputRingVisibility(){let e=this.renderRoot?.querySelector(`.ripple-wrapper`);e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute(`data-kb-focus`,`true`):e.removeAttribute(`data-kb-focus`))}_handleKey(e){if(this.disabled||!this._inputEl())return;let t=this._getVisibleItems(),n=(this.value??``).trim().length>0,r=this._inputFocused&&n&&t.length>0,i=e.key,a=e.keyCode,o=i===`ArrowDown`||i===`Down`||a===40,s=i===`ArrowUp`||i===`Up`||a===38,c=i===`Home`||a===36,l=i===`End`||a===35,u=i===`Enter`||a===13,d=i===`Escape`||i===`Esc`||a===27;if(o){if(!r)return;e.preventDefault(),this._kbMode=!0,this._moveActive(t,1);return}if(s){if(!r)return;e.preventDefault(),this._kbMode=!0,this._moveActive(t,-1);return}if(c){if(!r)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=t.length?0:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(l){if(!r)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=t.length?t.length-1:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(u){if(!r){let t=this._internals?.form??this._form??this.closest(`form`);t?(e.preventDefault(),this.reportValidity()&&t.requestSubmit()):this.submit();return}e.preventDefault();let t=this._getActiveItem();if(t){let e=t.getAttribute(`label`)||``;this.value=e,this._syncFormValue(),this._dispatchStandardInput(),this._dispatchSubmit({value:this.value,active:this._itemPayload(t)}),this._visibleSuggestions=0,this._activeIndex=-1,this._kbMode=!1,this._hideOptionRing(),this.requestUpdate()}else this.submit();return}if(d){e.preventDefault(),this._clearInput();return}}_clearInput(){if(this.disabled)return;this.value=``,this._activeIndex=-1,this._kbMode=!1;let e=this._inputEl();e&&(e.value=``,e.focus()),this._filterSuggestions(``),this._updateComboboxA11y(),this._hideOptionRing(),this._syncFormValue(),this._dispatchStandardInput(),this.dispatchEvent(new CustomEvent(`scb-search-clear`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchclear`,{bubbles:!0,composed:!0})),this._dispatchStandardChangeIfNeeded()}_filterSuggestions(e){let t=(e??``).trim().toLowerCase(),n=Array.from(this.querySelectorAll(`scb-list-item`)),r=0;for(let e of n){let n=`${(e.getAttribute(`label`)||``).toLowerCase()} ${(e.getAttribute(`supporting-text`)||``).toLowerCase()}`.trim();t!==``&&n.includes(t)?(e.removeAttribute(`hidden`),r++):e.setAttribute(`hidden`,``),this._ensureOptionA11y(e)}this._visibleSuggestions=r,this._activeIndex>=r&&(this._activeIndex=-1),this._updateComboboxA11y(),this.requestUpdate()}_inputEl(){return this.renderRoot?.querySelector(`#searchInput`)??null}_listEl(){return this.renderRoot?.querySelector(`scb-list.suggestion-list`)??null}_ringEl(){return this.renderRoot?.querySelector(`#optionRing`)??null}_getVisibleItems(){return Array.from(this.querySelectorAll(`scb-list-item`)).filter(e=>!e.hasAttribute(`hidden`)&&e.style.display!==`none`)}_getActiveItem(){let e=this._getVisibleItems();return this._activeIndex<0||this._activeIndex>=e.length?null:e[this._activeIndex]??null}_moveActive(e,t){if(!e.length){this._activeIndex=-1,this._updateComboboxA11y(),this._hideOptionRing();return}let n=this._activeIndex+t;this._activeIndex===-1?n=t>0?0:e.length-1:(n<0&&(n=0),n>=e.length&&(n=e.length-1)),this._activeIndex=n,this._updateComboboxA11y(),this._scrollActiveIntoView()}_scrollActiveIntoView(){let e=this._getActiveItem();e&&e.scrollIntoView({block:`nearest`})}_itemPayload(e){return{label:e.getAttribute(`label`)||``,supportingText:e.getAttribute(`supporting-text`)||``,href:e.getAttribute(`href`)||``,type:e.getAttribute(`type`)||``,id:e.id||``}}_ensureListboxA11y(){let e=this._listEl();e&&(e.id||=this._listboxId,e.setAttribute(`role`,`listbox`),e.setAttribute(`aria-label`,`Sökförslag`)),Array.from(this.querySelectorAll(`scb-list-item`)).forEach(e=>this._ensureOptionA11y(e))}_ensureOptionA11y(e){e.id||=`${this._listboxId}-opt-${Math.random().toString(36).slice(2,8)}`,e.setAttribute(`role`,`option`),e.setAttribute(`tabindex`,`-1`)}_updateComboboxA11y(){let e=this._inputEl();if(!e)return;let t=this._getVisibleItems(),n=(this.value??``).trim().length>0,r=this._inputFocused&&n&&t.length>0;e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-controls`,this._listboxId),e.setAttribute(`aria-expanded`,String(r));let i=r?this._getActiveItem():null;i?.id?e.setAttribute(`aria-activedescendant`,i.id):e.removeAttribute(`aria-activedescendant`),this._kbMode&&i&&r?this._positionOptionRing(i):this._hideOptionRing()}_positionOptionRing(e){let t=this._ringEl(),n=this._listEl();if(!t||!n)return;let r=this.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.top-r.top,o=i.left-r.left,s=i.width,c=i.height;t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.width=`${s}px`,t.style.height=`${c}px`,t.setAttribute(`data-show`,`true`)}_hideOptionRing(){let e=this._ringEl();e&&e.removeAttribute(`data-show`)}_onWindowResize(){let e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)}_attachListScrollListener(){let e=this._listEl();!e||this._listWithHandler===e||(this._detachListScrollListener(),e.addEventListener(`scroll`,this._listScrollHandler,{passive:!0}),this._listWithHandler=e)}_detachListScrollListener(){this._listWithHandler&&=(this._listWithHandler.removeEventListener(`scroll`,this._listScrollHandler),void 0)}_dispatchStandardInput(){this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}_dispatchStandardChangeIfNeeded(){let e=this.value??``;e!==this._lastChangeValue&&(this._lastChangeValue=e,this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})))}_dispatchSubmit(e){this.dispatchEvent(new CustomEvent(`scb-search-submit`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchsubmit`,{detail:e,bubbles:!0,composed:!0})),this._dispatchStandardChangeIfNeeded()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-search-spacing-block-start`,t):this.style.removeProperty(`--scb-search-spacing-block-start`),n?this.style.setProperty(`--scb-search-spacing-block-end`,n):this.style.removeProperty(`--scb-search-spacing-block-end`),r?this.style.setProperty(`--scb-search-spacing-inline-start`,r):this.style.removeProperty(`--scb-search-spacing-inline-start`),i?this.style.setProperty(`--scb-search-spacing-inline-end`,i):this.style.removeProperty(`--scb-search-spacing-inline-end`)}_syncFormValue(){if(!this._internals)return;let e=this.disabled?null:this.value;this._internals.setFormValue(e)}},N([g({type:String,attribute:`trailing-icon`})],kl.prototype,`trailingIcon`,void 0),N([g({type:String,attribute:`supporting-text`})],kl.prototype,`supportingText`,void 0),N([g({type:String})],kl.prototype,`value`,void 0),N([g({type:String,reflect:!0})],kl.prototype,`name`,void 0),N([g({type:Boolean,reflect:!0})],kl.prototype,`disabled`,void 0),N([g({type:Boolean,reflect:!0})],kl.prototype,`required`,void 0),N([g({type:Boolean,reflect:!0})],kl.prototype,`autocomplete`,void 0),N([g({type:String,reflect:!0})],kl.prototype,`spacing`,void 0),N([g({type:String,attribute:`spacing-top`,reflect:!0})],kl.prototype,`spacingTop`,void 0),N([g({type:String,attribute:`spacing-bottom`,reflect:!0})],kl.prototype,`spacingBottom`,void 0),N([g({type:String,attribute:`spacing-left`,reflect:!0})],kl.prototype,`spacingLeft`,void 0),N([g({type:String,attribute:`spacing-right`,reflect:!0})],kl.prototype,`spacingRight`,void 0),N([g({type:String,reflect:!0})],kl.prototype,`size`,void 0),N([g({type:Boolean,attribute:`full-screen`,reflect:!0})],kl.prototype,`fullScreen`,void 0),N([_()],kl.prototype,`_listDepsLoaded`,void 0),kl=N([a(`scb-search`)],kl)}));C(),y(),Gc(),Al(),P();var jl=class extends S{constructor(...e){super(...e),this.title=``,this.appBarTitle=``,this.type=`default`,this.position=`default`,this.searchSupportingText=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__titleResizeRaf=0}static{this.styles=[p`
|
|
3624
|
+
`}formDisabledCallback(e){this.disabled=e}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required&&!(this.value??``).trim()?`Fyll i det här fältet.`:``}_syncValidity(){let e=this._inputEl(),t=this.disabled?``:this._getValidationMessage();e&&(e.setCustomValidity(t),e.setAttribute(`aria-invalid`,t?`true`:`false`)),this._internals&&(t?this._internals.setValidity({valueMissing:!0},t,e??void 0):this._internals.setValidity({})),this.toggleAttribute(`aria-invalid`,!!t)}checkValidity(){return!this._getValidationMessage()}reportValidity(){this._syncValidity();let e=this._inputEl();return e?e.reportValidity():this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=e,this._syncValidity()}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}submit(){let e=this._getActiveItem(),t={value:this.value};e&&(t.active=this._itemPayload(e)),this._dispatchSubmit(t)}focus(e){let t=this._inputEl();if(t){t.focus(e);return}this.updateComplete.then(()=>this._inputEl()?.focus(e))}blur(){this._inputEl()?.blur()}get _hasSuggestions(){return this._visibleSuggestions>=0?this._visibleSuggestions>0:Array.from(this.getElementsByTagName(`scb-list-item`)).some(e=>!e.hasAttribute(`hidden`)&&e.style.display!==`none`)}_onSlotChange(){this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded()}_onInput(e){e.stopPropagation();let t=e.target;this.value=t.value,this._syncFormValue(),this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded(),this._activeIndex=-1,this._kbMode=!1,this._updateComboboxA11y();let n={value:this.value};this.dispatchEvent(new CustomEvent(`scb-search-input`,{detail:n,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchinput`,{detail:n,bubbles:!0,composed:!0})),this._dispatchStandardInput()}_onNativeChange(e){e.stopPropagation()}_onFocus(){this.disabled||(this._valueOnFocus=this.value??``,this._inputFocused=!0,this._updateInputRingVisibility(),this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded(),this._updateComboboxA11y(),this.requestUpdate())}_onBlur(){setTimeout(()=>{this._inputFocused=!1,this._activeIndex=-1,this._kbMode=!1,this._updateInputRingVisibility(),this._updateComboboxA11y(),this._hideOptionRing(),this._valueOnFocus!==(this.value??``)&&this._dispatchStandardChangeIfNeeded(),this.requestUpdate()},100)}_updateInputRingVisibility(){let e=this.renderRoot?.querySelector(`.ripple-wrapper`);e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute(`data-kb-focus`,`true`):e.removeAttribute(`data-kb-focus`))}_handleKey(e){if(this.disabled||!this._inputEl())return;let t=this._getVisibleItems(),n=(this.value??``).trim().length>0,r=this._inputFocused&&n&&t.length>0,i=e.key,a=e.keyCode,o=i===`ArrowDown`||i===`Down`||a===40,s=i===`ArrowUp`||i===`Up`||a===38,c=i===`Home`||a===36,l=i===`End`||a===35,u=i===`Enter`||a===13,d=i===`Escape`||i===`Esc`||a===27;if(o){if(!r)return;e.preventDefault(),this._kbMode=!0,this._moveActive(t,1);return}if(s){if(!r)return;e.preventDefault(),this._kbMode=!0,this._moveActive(t,-1);return}if(c){if(!r)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=t.length?0:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(l){if(!r)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=t.length?t.length-1:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(u){if(!r){let t=this._internals?.form??this._form??this.closest(`form`);t?(e.preventDefault(),this.reportValidity()&&t.requestSubmit()):this.submit();return}e.preventDefault();let t=this._getActiveItem();if(t){let e=t.getAttribute(`label`)||``;this.value=e,this._syncFormValue(),this._dispatchStandardInput(),this._dispatchSubmit({value:this.value,active:this._itemPayload(t)}),this._visibleSuggestions=0,this._activeIndex=-1,this._kbMode=!1,this._hideOptionRing(),this.requestUpdate()}else this.submit();return}if(d){e.preventDefault(),this._clearInput();return}}_clearInput(){if(this.disabled)return;this.value=``,this._activeIndex=-1,this._kbMode=!1;let e=this._inputEl();e&&(e.value=``,e.focus()),this._filterSuggestions(``),this._updateComboboxA11y(),this._hideOptionRing(),this._syncFormValue(),this._dispatchStandardInput(),this.dispatchEvent(new CustomEvent(`scb-search-clear`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchclear`,{bubbles:!0,composed:!0})),this._dispatchStandardChangeIfNeeded()}_filterSuggestions(e){let t=(e??``).trim().toLowerCase(),n=Array.from(this.querySelectorAll(`scb-list-item`)),r=0;for(let e of n){let n=`${(e.getAttribute(`label`)||``).toLowerCase()} ${(e.getAttribute(`supporting-text`)||``).toLowerCase()}`.trim();t!==``&&n.includes(t)?(e.removeAttribute(`hidden`),r++):e.setAttribute(`hidden`,``),this._ensureOptionA11y(e)}this._visibleSuggestions=r,this._activeIndex>=r&&(this._activeIndex=-1),this._updateComboboxA11y(),this.requestUpdate()}_inputEl(){return this.renderRoot?.querySelector(`#searchInput`)??null}_listEl(){return this.renderRoot?.querySelector(`scb-list.suggestion-list`)??null}_ringEl(){return this.renderRoot?.querySelector(`#optionRing`)??null}_getVisibleItems(){return Array.from(this.querySelectorAll(`scb-list-item`)).filter(e=>!e.hasAttribute(`hidden`)&&e.style.display!==`none`)}_getActiveItem(){let e=this._getVisibleItems();return this._activeIndex<0||this._activeIndex>=e.length?null:e[this._activeIndex]??null}_moveActive(e,t){if(!e.length){this._activeIndex=-1,this._updateComboboxA11y(),this._hideOptionRing();return}let n=this._activeIndex+t;this._activeIndex===-1?n=t>0?0:e.length-1:(n<0&&(n=0),n>=e.length&&(n=e.length-1)),this._activeIndex=n,this._updateComboboxA11y(),this._scrollActiveIntoView()}_scrollActiveIntoView(){let e=this._getActiveItem();e&&e.scrollIntoView({block:`nearest`})}_itemPayload(e){return{label:e.getAttribute(`label`)||``,supportingText:e.getAttribute(`supporting-text`)||``,href:e.getAttribute(`href`)||``,type:e.getAttribute(`type`)||``,id:e.id||``}}_ensureListboxA11y(){let e=this._listEl();e&&(e.id||=this._listboxId,e.setAttribute(`role`,`listbox`),e.setAttribute(`aria-label`,`Sökförslag`)),Array.from(this.querySelectorAll(`scb-list-item`)).forEach(e=>this._ensureOptionA11y(e))}_ensureOptionA11y(e){e.id||=`${this._listboxId}-opt-${Math.random().toString(36).slice(2,8)}`,e.setAttribute(`role`,`option`),e.setAttribute(`tabindex`,`-1`)}_updateComboboxA11y(){let e=this._inputEl();if(!e)return;let t=this._getVisibleItems(),n=(this.value??``).trim().length>0,r=this._inputFocused&&n&&t.length>0;e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-controls`,this._listboxId),e.setAttribute(`aria-expanded`,String(r));let i=r?this._getActiveItem():null;i?.id?e.setAttribute(`aria-activedescendant`,i.id):e.removeAttribute(`aria-activedescendant`),this._kbMode&&i&&r?this._positionOptionRing(i):this._hideOptionRing()}_positionOptionRing(e){let t=this._ringEl(),n=this._listEl();if(!t||!n)return;let r=this.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.top-r.top,o=i.left-r.left,s=i.width,c=i.height;t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.width=`${s}px`,t.style.height=`${c}px`,t.setAttribute(`data-show`,`true`)}_hideOptionRing(){let e=this._ringEl();e&&e.removeAttribute(`data-show`)}_onWindowResize(){let e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)}_attachListScrollListener(){let e=this._listEl();!e||this._listWithHandler===e||(this._detachListScrollListener(),e.addEventListener(`scroll`,this._listScrollHandler,{passive:!0}),this._listWithHandler=e)}_detachListScrollListener(){this._listWithHandler&&=(this._listWithHandler.removeEventListener(`scroll`,this._listScrollHandler),void 0)}_dispatchStandardInput(){this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}_dispatchStandardChangeIfNeeded(){let e=this.value??``;e!==this._lastChangeValue&&(this._lastChangeValue=e,this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})))}_dispatchSubmit(e){this.dispatchEvent(new CustomEvent(`scb-search-submit`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchsubmit`,{detail:e,bubbles:!0,composed:!0})),this._dispatchStandardChangeIfNeeded()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-search-spacing-block-start`,t):this.style.removeProperty(`--scb-search-spacing-block-start`),n?this.style.setProperty(`--scb-search-spacing-block-end`,n):this.style.removeProperty(`--scb-search-spacing-block-end`),r?this.style.setProperty(`--scb-search-spacing-inline-start`,r):this.style.removeProperty(`--scb-search-spacing-inline-start`),i?this.style.setProperty(`--scb-search-spacing-inline-end`,i):this.style.removeProperty(`--scb-search-spacing-inline-end`)}_syncFormValue(){if(!this._internals)return;let e=this.disabled?null:this.value;this._internals.setFormValue(e)}},P([g({type:String,attribute:`trailing-icon`})],jl.prototype,`trailingIcon`,void 0),P([g({type:String,attribute:`supporting-text`})],jl.prototype,`supportingText`,void 0),P([g({type:String})],jl.prototype,`value`,void 0),P([g({type:String,reflect:!0})],jl.prototype,`name`,void 0),P([g({type:Boolean,reflect:!0})],jl.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0})],jl.prototype,`required`,void 0),P([g({type:Boolean,reflect:!0})],jl.prototype,`autocomplete`,void 0),P([g({type:String,reflect:!0})],jl.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],jl.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],jl.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],jl.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],jl.prototype,`spacingRight`,void 0),P([g({type:String,reflect:!0})],jl.prototype,`size`,void 0),P([g({type:Boolean,attribute:`full-screen`,reflect:!0})],jl.prototype,`fullScreen`,void 0),P([_()],jl.prototype,`_listDepsLoaded`,void 0),jl=P([a(`scb-search`)],jl)}));C(),y(),fl(),Gc(),Ml(),F();var Nl=class extends S{constructor(...e){super(...e),this.title=``,this.appBarTitle=``,this.type=`default`,this.position=`default`,this.searchSupportingText=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__titleResizeRaf=0}static{this.styles=[p`
|
|
3625
3625
|
:host {
|
|
3626
3626
|
display: block;
|
|
3627
3627
|
font-family: var(--brand-font, Inter, Arial, sans-serif);
|
|
@@ -3786,7 +3786,7 @@
|
|
|
3786
3786
|
<slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
|
|
3787
3787
|
</div>
|
|
3788
3788
|
</header>
|
|
3789
|
-
`}}};
|
|
3789
|
+
`}}};P([g({type:String,reflect:!0})],Nl.prototype,`title`,void 0),P([g({type:String,attribute:`app-bar-title`,reflect:!0})],Nl.prototype,`appBarTitle`,void 0),P([g({type:String,reflect:!0})],Nl.prototype,`type`,void 0),P([g({type:String,reflect:!0})],Nl.prototype,`position`,void 0),P([g({type:String,attribute:`search-supporting-text`,reflect:!0})],Nl.prototype,`searchSupportingText`,void 0),P([g({type:String,reflect:!0})],Nl.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Nl.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Nl.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Nl.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Nl.prototype,`spacingRight`,void 0),Nl=P([a(`scb-app-bar`)],Nl),C(),y(),F();var Pl=class extends S{constructor(...e){super(...e),this._slotClickHandler=e=>{let t=this.shadowRoot?.querySelector(`slot`),n=e.target;n&&n!==t&&n.dispatchEvent(new CustomEvent(`hide-badge`,{bubbles:!0,composed:!0}))},this.autoHide=!1,this.sizing=`fit-content`,this.position=`relative`,this.positionTop=0,this.positionRight=void 0,this.positionSide=`right`,this.positionLeft=void 0,this.value=``,this.label=``,this.hidden=!1,this.variant=`dot`,this._badgeVisible=!0,this._onHideBadge=()=>{this._badgeVisible=!1,this.requestUpdate()}}static{this.styles=p`
|
|
3790
3790
|
:host {
|
|
3791
3791
|
display: block;
|
|
3792
3792
|
position: relative;
|
|
@@ -3865,7 +3865,7 @@
|
|
|
3865
3865
|
aria-label="${this.variant,o}"
|
|
3866
3866
|
aria-hidden="${this.variant===`dot`&&!this.label?`true`:`false`}">${this.variant===`dot`?``:r}</div>
|
|
3867
3867
|
</div>
|
|
3868
|
-
`}};
|
|
3868
|
+
`}};P([g({type:Boolean,reflect:!0,attribute:`auto-hide`})],Pl.prototype,`autoHide`,void 0),P([g({type:String,reflect:!0})],Pl.prototype,`sizing`,void 0),P([g({type:String,reflect:!0})],Pl.prototype,`position`,void 0),P([g({type:String,attribute:`position-top`})],Pl.prototype,`positionTop`,void 0),P([g({type:String,attribute:`position-right`})],Pl.prototype,`positionRight`,void 0),P([g({type:String,reflect:!0,attribute:`position-side`})],Pl.prototype,`positionSide`,void 0),P([g({type:String,attribute:`position-left`})],Pl.prototype,`positionLeft`,void 0),P([g({type:String,reflect:!0})],Pl.prototype,`value`,void 0),P([g({type:String,reflect:!0})],Pl.prototype,`label`,void 0),P([g({type:Boolean,reflect:!0})],Pl.prototype,`hidden`,void 0),P([g({type:String,reflect:!0})],Pl.prototype,`variant`,void 0),Pl=P([a(`scb-badge`)],Pl),C(),y(),F();var Fl=class extends S{constructor(...e){super(...e),this.label=``,this.isCurrent=!1,this.href=``}connectedCallback(){if(super.connectedCallback(),this.hasAttribute(`current`)&&!this.hasAttribute(`is-current`)&&(this.isCurrent=!0),!this.href){let e=this.getAttribute(`href`);e&&(this.href=e)}}static get styles(){return p`
|
|
3869
3869
|
.breadcrumb-separator {
|
|
3870
3870
|
margin: var(--spacing-0) var(--spacing-3);
|
|
3871
3871
|
color: var(--md-sys-color-on-surface);
|
|
@@ -3878,7 +3878,7 @@
|
|
|
3878
3878
|
`}getLabelContent(){return this.label||b`<slot></slot>`}updated(e){e.has(`isCurrent`)&&(this.dispatchEvent(new CustomEvent(`current-changed`,{detail:{isCurrent:this.isCurrent},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`currentchanged`,{detail:{isCurrent:this.isCurrent,value:this.isCurrent},bubbles:!0,composed:!0})))}render(){let e=this.getLabelContent();switch(!0){case this.isCurrent:return b`<span class="breadcrumb-current">${e}</span>`;default:return b`
|
|
3879
3879
|
<scb-link href="${this.href||this.getAttribute(`href`)||``}">${e}</scb-link>
|
|
3880
3880
|
<span class="breadcrumb-separator">/</span>
|
|
3881
|
-
`}}};
|
|
3881
|
+
`}}};P([g({type:String})],Fl.prototype,`label`,void 0),P([g({type:Boolean,attribute:`is-current`,reflect:!0})],Fl.prototype,`isCurrent`,void 0),P([g({type:String,attribute:`item-href`})],Fl.prototype,`href`,void 0),Fl=P([a(`scb-breadcrumb-item`)],Fl),C(),y(),F();var Il,Ll=()=>{customElements.get(`md-focus-ring`)||(Il??=Promise.resolve().then(()=>(w(),Vt)).then(()=>void 0))},Rl=class extends S{constructor(...e){super(...e),this.showAll=!1,this.currentIndex=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static get styles(){return p`
|
|
3882
3882
|
:host {
|
|
3883
3883
|
display: block;
|
|
3884
3884
|
box-sizing: border-box;
|
|
@@ -3981,7 +3981,7 @@
|
|
|
3981
3981
|
aria-label="Visa alla"
|
|
3982
3982
|
role="button"
|
|
3983
3983
|
tabindex="0"
|
|
3984
|
-
@focusin=${
|
|
3984
|
+
@focusin=${Ll}
|
|
3985
3985
|
@click=${this._onEllipsisClick}
|
|
3986
3986
|
@keydown=${e=>{(e.key===`Enter`||e.key===` `)&&this._onEllipsisClick()}}
|
|
3987
3987
|
>
|
|
@@ -3998,12 +3998,12 @@
|
|
|
3998
3998
|
</span>
|
|
3999
3999
|
`})}
|
|
4000
4000
|
</div>
|
|
4001
|
-
`}};
|
|
4001
|
+
`}};P([g({type:Boolean,attribute:`show-all`,reflect:!0})],Rl.prototype,`showAll`,void 0),P([g({type:Number,attribute:`current-index`,reflect:!0})],Rl.prototype,`currentIndex`,void 0),P([g({type:String,reflect:!0})],Rl.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Rl.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Rl.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Rl.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Rl.prototype,`spacingRight`,void 0),Rl=P([a(`scb-breadcrumb`)],Rl),C(),y(),F();var zl=class extends S{constructor(...e){super(...e),this.title=``,this.description=``,this.startDate=``,this.endDate=``,this.href=``}get date(){return this.startDate}set date(e){let t=(e??``)+``;t!==this.startDate&&(this.startDate=t)}static get observedAttributes(){return[...super.observedAttributes??[],`date`]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`date`&&(this.date=n??``)}static{this.styles=p`
|
|
4002
4002
|
:host {
|
|
4003
4003
|
display: block;
|
|
4004
4004
|
}
|
|
4005
4005
|
`}updated(e){super.updated?.(e),(e.has(`title`)||e.has(`description`)||e.has(`startDate`)||e.has(`endDate`)||e.has(`href`))&&this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}render(){return b`
|
|
4006
|
-
`}};
|
|
4006
|
+
`}};P([g({type:String})],zl.prototype,`title`,void 0),P([g({type:String})],zl.prototype,`description`,void 0),P([g({type:String,attribute:`start-date`})],zl.prototype,`startDate`,void 0),P([g({type:String,attribute:`end-date`})],zl.prototype,`endDate`,void 0),P([g({type:String})],zl.prototype,`href`,void 0),zl=P([a(`scb-calendar-event`)],zl);var Bl,Vl=t((()=>{C(),y(),F(),Bl=class extends S{constructor(...e){super(...e),this.variant=`thin`,this.direction=`horizontal`,this.inset=`none`,this.overlay=!1,this.anchor=`end`,this.spacing=void 0}static{this.styles=p`
|
|
4007
4007
|
:host {
|
|
4008
4008
|
--scb-divider-color: var(--md-sys-color-outline-variant);
|
|
4009
4009
|
--scb-divider-thickness: 1px;
|
|
@@ -4071,7 +4071,7 @@
|
|
|
4071
4071
|
:host([overlay][direction='vertical'][anchor='start']) {
|
|
4072
4072
|
left: calc(var(--scb-divider-gap) / -2);
|
|
4073
4073
|
}
|
|
4074
|
-
`}firstUpdated(){this.#e()}updated(e){e.has(`spacing`)&&this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing);e?this.style.setProperty(`--scb-divider-spacing-orth`,e):this.style.removeProperty(`--scb-divider-spacing-orth`)}render(){return b``}},
|
|
4074
|
+
`}firstUpdated(){this.#e()}updated(e){e.has(`spacing`)&&this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing);e?this.style.setProperty(`--scb-divider-spacing-orth`,e):this.style.removeProperty(`--scb-divider-spacing-orth`)}render(){return b``}},P([g({type:String,reflect:!0})],Bl.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],Bl.prototype,`direction`,void 0),P([g({type:String,reflect:!0})],Bl.prototype,`inset`,void 0),P([g({type:Boolean,reflect:!0})],Bl.prototype,`overlay`,void 0),P([g({type:String,reflect:!0})],Bl.prototype,`anchor`,void 0),P([g({type:String,reflect:!0})],Bl.prototype,`spacing`,void 0),Bl=P([a(`scb-divider`)],Bl)}));C(),y(),fl(),Gc(),k(),E(),w(),Vl(),F();var Hl=class extends S{constructor(...e){super(...e),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,`April`),this.lang==`sv`?`Maj`:`May`,this.lang==`sv`?`Juni`:`June`,this.lang==`sv`?`Juli`:`July`,this.lang==`sv`?`Augusti`:`August`,(this.lang,`September`),this.lang==`sv`?`Oktober`:`October`,(this.lang,`November`),(this.lang,`December`)],this._outsideClickHandler=e=>{this.open&&(e.composedPath().includes(this)||this._close())},this._prevMonth=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();t===0?this._currentDate=new Date(e-1,11,1):this._currentDate=new Date(e,t-1,1)},this._prevYear=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e-1,t,1)},this._nextMonth=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();t===11?this._currentDate=new Date(e+1,0,1):this._currentDate=new Date(e,t+1,1)},this._nextYear=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e+1,t,1)},this._onTimeChange=e=>{let[t,n]=e.target.value.split(`:`),r=parseInt(t,10),i=parseInt(n,10);this._selectedHour=isNaN(r)?0:Math.max(0,Math.min(23,r)),this._selectedMinute=isNaN(i)?0:Math.max(0,Math.min(59,i)),this._fireDateTimeChange()},this._close=()=>{this.open=!1,this.dispatchEvent(new CustomEvent(`datepicker-closed`,{bubbles:!0,composed:!0}))}}_isRenderedInsideDialog(){let e=this.getRootNode(),t=e instanceof ShadowRoot?e.host:null;return t instanceof HTMLElement&&t.closest(`scb-dialog`)?!0:!!this.closest(`scb-dialog`)}_positionPopupWithinViewport(){if(!this.open)return;let e=this.renderRoot.querySelector(`.datepicker-popup`);if(!e)return;let t=this.parentElement?.getBoundingClientRect();if(!t)return;let n=window.innerWidth,r=window.innerHeight,i=Math.max(220,n-this._viewportMargin*2);if(this._isRenderedInsideDialog()){let a=Math.min(e.offsetWidth||380,i),o=e.offsetHeight||420,s=(n-a)/2,c=(r-o)/2,l=s-t.left,u=c-t.top;this.style.setProperty(`--scb-datepicker-position`,`absolute`),this.style.setProperty(`--scb-datepicker-top`,`${u}px`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),this.style.setProperty(`--scb-datepicker-left`,`${l}px`),this.style.setProperty(`--scb-datepicker-transform`,`none`),this.style.setProperty(`--scb-datepicker-computed-width`,`${a}px`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(220,r-this._viewportMargin*2)}px`);return}let a=Math.min(e.offsetWidth||380,i),o=e.offsetHeight||420,s=Math.min(Math.max(t.left,this._viewportMargin),n-this._viewportMargin-a)-t.left,c=r-t.bottom-this._viewportMargin,l=t.top-this._viewportMargin,u=c<o+this._popupOffset&&l>c;this.style.setProperty(`--scb-datepicker-position`,`absolute`),this.style.setProperty(`--scb-datepicker-computed-width`,`${a}px`),this.style.setProperty(`--scb-datepicker-left`,`0`),this.style.setProperty(`--scb-datepicker-transform`,`translateX(${s}px)`),u?(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,l-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,c-this._popupOffset)}px`))}static{this.styles=[p`
|
|
4075
4075
|
:host {
|
|
4076
4076
|
--scb-datepicker-width: 380px;
|
|
4077
4077
|
--scb-datepicker-z-index: 1100;
|
|
@@ -4366,7 +4366,7 @@
|
|
|
4366
4366
|
`:``}
|
|
4367
4367
|
</div>
|
|
4368
4368
|
</div>
|
|
4369
|
-
`}_getMonthDays(e,t){let n=new Date(Date.UTC(e,t,1)),r=new Date(Date.UTC(e,t+1,0)),i=[],a=[],o=n.getUTCDay(),s=o===0?6:o-1;for(let e=0;e<s;e++)a.push(null);for(let n=1;n<=r.getUTCDate();n++){let r=new Date(Date.UTC(e,t,n));a.push(r),a.length===7&&(i.push(a),a=[])}if(a.length){for(;a.length<7;)a.push(null);i.push(a)}return i}_toggleMonthDropdown(){this._showMonthDropdown=!this._showMonthDropdown,this._showMonthDropdown&&(this._showYearDropdown=!1,setTimeout(()=>{let e=this.renderRoot.querySelector(`#selected-month`);e&&e.scrollIntoView({block:`center`})},0))}_toggleYearDropdown(){this._showYearDropdown=!this._showYearDropdown,this._showYearDropdown&&(this._showMonthDropdown=!1,setTimeout(()=>{let e=this.renderRoot.querySelector(`#selected-year`);e&&e.scrollIntoView({block:`center`})},0))}_onMonthChangeCustom(e){let t=this._currentDate.getFullYear();this._currentDate=new Date(t,e,1),this._showMonthDropdown=!1}_onYearChangeCustom(e){let t=this._currentDate.getMonth();this._currentDate=new Date(e,t,1),this._showYearDropdown=!1}_isToday(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}_isSelected(e){return this._selectedDate&&e.getDate()===this._selectedDate.getDate()&&e.getMonth()===this._selectedDate.getMonth()&&e.getFullYear()===this._selectedDate.getFullYear()}_selectDate(e){if(this._selectedDate=e,this.variant===`datetime-local`){let t=new Date(e);t.setHours(this._selectedHour??0,this._selectedMinute??0,0,0),this._selectedHour=t.getHours(),this._selectedMinute=t.getMinutes();let n=e=>e.toString().padStart(2,`0`),r=`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`;this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:r},bubbles:!0,composed:!0}))}else{let t=e.toISOString().slice(0,10);this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:t},bubbles:!0,composed:!0}))}}_fireDateTimeChange(){if(this.variant===`datetime-local`&&this._selectedDate){let e=new Date(this._selectedDate);e.setHours(this._selectedHour??0,this._selectedMinute??0,0,0);let t=e=>e.toString().padStart(2,`0`),n=`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}`;this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:n},bubbles:!0,composed:!0}))}}};
|
|
4369
|
+
`}_getMonthDays(e,t){let n=new Date(Date.UTC(e,t,1)),r=new Date(Date.UTC(e,t+1,0)),i=[],a=[],o=n.getUTCDay(),s=o===0?6:o-1;for(let e=0;e<s;e++)a.push(null);for(let n=1;n<=r.getUTCDate();n++){let r=new Date(Date.UTC(e,t,n));a.push(r),a.length===7&&(i.push(a),a=[])}if(a.length){for(;a.length<7;)a.push(null);i.push(a)}return i}_toggleMonthDropdown(){this._showMonthDropdown=!this._showMonthDropdown,this._showMonthDropdown&&(this._showYearDropdown=!1,setTimeout(()=>{let e=this.renderRoot.querySelector(`#selected-month`);e&&e.scrollIntoView({block:`center`})},0))}_toggleYearDropdown(){this._showYearDropdown=!this._showYearDropdown,this._showYearDropdown&&(this._showMonthDropdown=!1,setTimeout(()=>{let e=this.renderRoot.querySelector(`#selected-year`);e&&e.scrollIntoView({block:`center`})},0))}_onMonthChangeCustom(e){let t=this._currentDate.getFullYear();this._currentDate=new Date(t,e,1),this._showMonthDropdown=!1}_onYearChangeCustom(e){let t=this._currentDate.getMonth();this._currentDate=new Date(e,t,1),this._showYearDropdown=!1}_isToday(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}_isSelected(e){return this._selectedDate&&e.getDate()===this._selectedDate.getDate()&&e.getMonth()===this._selectedDate.getMonth()&&e.getFullYear()===this._selectedDate.getFullYear()}_selectDate(e){if(this._selectedDate=e,this.variant===`datetime-local`){let t=new Date(e);t.setHours(this._selectedHour??0,this._selectedMinute??0,0,0),this._selectedHour=t.getHours(),this._selectedMinute=t.getMinutes();let n=e=>e.toString().padStart(2,`0`),r=`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`;this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:r},bubbles:!0,composed:!0}))}else{let t=e.toISOString().slice(0,10);this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:t},bubbles:!0,composed:!0}))}}_fireDateTimeChange(){if(this.variant===`datetime-local`&&this._selectedDate){let e=new Date(this._selectedDate);e.setHours(this._selectedHour??0,this._selectedMinute??0,0,0);let t=e=>e.toString().padStart(2,`0`),n=`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}`;this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:n},bubbles:!0,composed:!0}))}}};P([_()],Hl.prototype,`_currentDate`,void 0),P([_()],Hl.prototype,`_selectedDate`,void 0),P([_()],Hl.prototype,`_showMonthDropdown`,void 0),P([_()],Hl.prototype,`_showYearDropdown`,void 0),P([g({type:String})],Hl.prototype,`variant`,void 0),P([g({type:String})],Hl.prototype,`lang`,void 0),P([g({type:String})],Hl.prototype,`selectedValue`,void 0),P([g({type:Boolean})],Hl.prototype,`open`,void 0),P([_()],Hl.prototype,`_selectedHour`,void 0),P([_()],Hl.prototype,`_selectedMinute`,void 0),Hl=P([a(`scb-datepicker`)],Hl),C(),y(),k(),E(),w(),fl(),F();var H=class extends S{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this._inputFocused=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key===`Tab`&&(this._kbShouldShowRing=!0,this._inputFocused&&this.#o())},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&this.#o()},this._hasRenderedOnce=!1,this._boundField=null,this._onFieldInput=()=>{let e=this._boundField;if(!e)return;let t=e;if(this.value=t.value,this._internals){let e=this.disabled?null:this.value;this._internals.setFormValue(e)}this.#n(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0}))},this._onFieldChange=()=>{this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))},this._onFieldSelect=()=>{this.dispatchEvent(new Event(`select`,{bubbles:!0,composed:!0}))},this._onFieldFocus=()=>{this._inputFocused=!0,this.#o()},this._onFieldBlur=()=>{this._inputFocused=!1,this.#o()},this.type=`text`,this.label=``,this.supportingText=``,this.errorText=``,this.leadingIcon=``,this.name=``,this.pattern=``,this.value=``,this.underLabel=``,this.error=!1,this.disabled=!1,this.required=!1,this.size=`large`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue=``,this._inputId=``,this._showDatepicker=!1,this._toggleDatepicker=()=>{this._showDatepicker=!this._showDatepicker},this._onDateSelected=e=>{if(this.value=e.detail.value,this._showDatepicker=!1,this._internals){let e=this.disabled?null:this.value;this._internals.setFormValue(e)}this.#n(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0}))},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=[p`
|
|
4370
4370
|
:host {
|
|
4371
4371
|
--scb-textfield-number-max-width: 280px;
|
|
4372
4372
|
--scb-textfield-text-max-width: 400px;
|
|
@@ -4960,7 +4960,7 @@
|
|
|
4960
4960
|
<md-focus-ring class="input-ring"></md-focus-ring>
|
|
4961
4961
|
</div>
|
|
4962
4962
|
</div>
|
|
4963
|
-
`}firstUpdated(e){super.firstUpdated(e),this._initialValue=this.value,this._internals&&this.value&&this._internals.setFormValue(this.value),this.#r(),this.#e()}updated(e){if(super.updated(e),this.toggleAttribute(`aria-disabled`,this.disabled),e.has(`size`)&&this._syncDensityForSize(),this._internals&&(e.has(`value`)||e.has(`disabled`))){let e=this.disabled?null:this.value;this._internals.setFormValue(e)}e.has(`type`)&&(this.#r(),this._hasRenderedOnce&&this.#a()),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e(),this._hasRenderedOnce=!0}formDisabledCallback(e){this.disabled=e}connectedCallback(){super.connectedCallback(),this._syncDensityForSize(),this._inputId=this.id||`scb-textfield-${Math.random().toString(36).substr(2,9)}`,this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form=this.closest(`form`),this._form&&(this._form.addEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler=()=>{this.value=this._initialValue;let e=this.shadowRoot?.querySelector(`.scb-textfield`);e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=this._initialValue),this.error=!1},this._form.addEventListener(`reset`,this._formResetHandler,!0)),window.addEventListener(`keydown`,this._onGlobalKeydown,!0),window.addEventListener(`pointerdown`,this._onGlobalPointerDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formSubmitHandler&&(this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0)),this.#i(),window.removeEventListener(`keydown`,this._onGlobalKeydown,!0),window.removeEventListener(`pointerdown`,this._onGlobalPointerDown,!0)}reportValidity(){return this.#n(!0)}_onClearClick(){let e=this.shadowRoot?.querySelector(`.scb-textfield`);if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){if(e.value=``,this.value=``,this._internals){let e=this.disabled?null:this.value;this._internals.setFormValue(e),this._internals.setValidity({})}this.error=!1,e.setCustomValidity(``),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0})),e.focus()}}#e(){let e=this.#t(this.spacing),t=this.#t(this.spacingTop)??e,n=this.#t(this.spacingBottom)??e,r=this.#t(this.spacingLeft),i=this.#t(this.spacingRight);t?this.style.setProperty(`--scb-textfield-spacing-block-start`,t):this.style.removeProperty(`--scb-textfield-spacing-block-start`),n?this.style.setProperty(`--scb-textfield-spacing-block-end`,n):this.style.removeProperty(`--scb-textfield-spacing-block-end`),r?this.style.setProperty(`--scb-textfield-spacing-inline-start`,r):this.style.removeProperty(`--scb-textfield-spacing-inline-start`),i?this.style.setProperty(`--scb-textfield-spacing-inline-end`,i):this.style.removeProperty(`--scb-textfield-spacing-inline-end`)}#t(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#n(e=!1){let t=this.shadowRoot?.querySelector(`.scb-textfield`);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return!0;let n=this.errorText||`Ogiltig inmatning.`,r=``;if(t.setCustomValidity(``),this.required&&!t.value)r=n,t.setCustomValidity(r);else if(this.pattern&&t.value)try{new RegExp(this.pattern).test(t.value)||(r=n,t.setCustomValidity(r))}catch{t.setCustomValidity(``)}let i=e?t.reportValidity():t.checkValidity();if(this.error=!i,this._internals)if(i)this._internals.setValidity({});else{let e=r||t.validationMessage||n;this._internals.setValidity({customError:!0},e,t)}return i}#r(){let e=this.shadowRoot?.querySelector(`.scb-textfield`);e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&this._boundField!==e&&(this.#i(),this._boundField=e,this.type!==`time`&&e.addEventListener(`input`,this._onFieldInput),e.addEventListener(`change`,this._onFieldChange),e.addEventListener(`select`,this._onFieldSelect),e.addEventListener(`focus`,this._onFieldFocus),e.addEventListener(`blur`,this._onFieldBlur))}#i(){let e=this._boundField;e&&(e.removeEventListener(`input`,this._onFieldInput),e.removeEventListener(`change`,this._onFieldChange),e.removeEventListener(`select`,this._onFieldSelect),e.removeEventListener(`focus`,this._onFieldFocus),e.removeEventListener(`blur`,this._onFieldBlur),this._boundField=null)}#a(){this._showDatepicker=!1;let e=this.shadowRoot?.querySelector(`.scb-textfield`);if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=``,e.setCustomValidity(``)),this.value=``,this.error=!1,this._internals){let e=this.disabled?null:``;this._internals.setFormValue(e),this._internals.setValidity({})}}#o(){let e=this.renderRoot?.querySelector(`.ripple-wrapper`);e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute(`data-kb-focus`,`true`):e.removeAttribute(`data-kb-focus`))}};
|
|
4963
|
+
`}firstUpdated(e){super.firstUpdated(e),this._initialValue=this.value,this._internals&&this.value&&this._internals.setFormValue(this.value),this.#r(),this.#e()}updated(e){if(super.updated(e),this.toggleAttribute(`aria-disabled`,this.disabled),e.has(`size`)&&this._syncDensityForSize(),this._internals&&(e.has(`value`)||e.has(`disabled`))){let e=this.disabled?null:this.value;this._internals.setFormValue(e)}e.has(`type`)&&(this.#r(),this._hasRenderedOnce&&this.#a()),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e(),this._hasRenderedOnce=!0}formDisabledCallback(e){this.disabled=e}connectedCallback(){super.connectedCallback(),this._syncDensityForSize(),this._inputId=this.id||`scb-textfield-${Math.random().toString(36).substr(2,9)}`,this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form=this.closest(`form`),this._form&&(this._form.addEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler=()=>{this.value=this._initialValue;let e=this.shadowRoot?.querySelector(`.scb-textfield`);e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=this._initialValue),this.error=!1},this._form.addEventListener(`reset`,this._formResetHandler,!0)),window.addEventListener(`keydown`,this._onGlobalKeydown,!0),window.addEventListener(`pointerdown`,this._onGlobalPointerDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formSubmitHandler&&(this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0)),this.#i(),window.removeEventListener(`keydown`,this._onGlobalKeydown,!0),window.removeEventListener(`pointerdown`,this._onGlobalPointerDown,!0)}reportValidity(){return this.#n(!0)}_onClearClick(){let e=this.shadowRoot?.querySelector(`.scb-textfield`);if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){if(e.value=``,this.value=``,this._internals){let e=this.disabled?null:this.value;this._internals.setFormValue(e),this._internals.setValidity({})}this.error=!1,e.setCustomValidity(``),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0})),e.focus()}}#e(){let e=this.#t(this.spacing),t=this.#t(this.spacingTop)??e,n=this.#t(this.spacingBottom)??e,r=this.#t(this.spacingLeft),i=this.#t(this.spacingRight);t?this.style.setProperty(`--scb-textfield-spacing-block-start`,t):this.style.removeProperty(`--scb-textfield-spacing-block-start`),n?this.style.setProperty(`--scb-textfield-spacing-block-end`,n):this.style.removeProperty(`--scb-textfield-spacing-block-end`),r?this.style.setProperty(`--scb-textfield-spacing-inline-start`,r):this.style.removeProperty(`--scb-textfield-spacing-inline-start`),i?this.style.setProperty(`--scb-textfield-spacing-inline-end`,i):this.style.removeProperty(`--scb-textfield-spacing-inline-end`)}#t(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#n(e=!1){let t=this.shadowRoot?.querySelector(`.scb-textfield`);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return!0;let n=this.errorText||`Ogiltig inmatning.`,r=``;if(t.setCustomValidity(``),this.required&&!t.value)r=n,t.setCustomValidity(r);else if(this.pattern&&t.value)try{new RegExp(this.pattern).test(t.value)||(r=n,t.setCustomValidity(r))}catch{t.setCustomValidity(``)}let i=e?t.reportValidity():t.checkValidity();if(this.error=!i,this._internals)if(i)this._internals.setValidity({});else{let e=r||t.validationMessage||n;this._internals.setValidity({customError:!0},e,t)}return i}#r(){let e=this.shadowRoot?.querySelector(`.scb-textfield`);e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&this._boundField!==e&&(this.#i(),this._boundField=e,this.type!==`time`&&e.addEventListener(`input`,this._onFieldInput),e.addEventListener(`change`,this._onFieldChange),e.addEventListener(`select`,this._onFieldSelect),e.addEventListener(`focus`,this._onFieldFocus),e.addEventListener(`blur`,this._onFieldBlur))}#i(){let e=this._boundField;e&&(e.removeEventListener(`input`,this._onFieldInput),e.removeEventListener(`change`,this._onFieldChange),e.removeEventListener(`select`,this._onFieldSelect),e.removeEventListener(`focus`,this._onFieldFocus),e.removeEventListener(`blur`,this._onFieldBlur),this._boundField=null)}#a(){this._showDatepicker=!1;let e=this.shadowRoot?.querySelector(`.scb-textfield`);if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=``,e.setCustomValidity(``)),this.value=``,this.error=!1,this._internals){let e=this.disabled?null:``;this._internals.setFormValue(e),this._internals.setValidity({})}}#o(){let e=this.renderRoot?.querySelector(`.ripple-wrapper`);e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute(`data-kb-focus`,`true`):e.removeAttribute(`data-kb-focus`))}};P([g({type:String,reflect:!0})],H.prototype,`type`,void 0),P([g({type:String})],H.prototype,`label`,void 0),P([g({type:String,attribute:`supporting-text`})],H.prototype,`supportingText`,void 0),P([g({type:String,attribute:`error-text`})],H.prototype,`errorText`,void 0),P([g({type:String,attribute:`leading-icon`})],H.prototype,`leadingIcon`,void 0),P([g({type:String})],H.prototype,`name`,void 0),P([g({type:String})],H.prototype,`pattern`,void 0),P([g({type:String,attribute:`value`})],H.prototype,`value`,void 0),P([g({type:String})],H.prototype,`underLabel`,void 0),P([g({type:Boolean,reflect:!0})],H.prototype,`error`,void 0),P([g({type:Boolean,reflect:!0})],H.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0})],H.prototype,`required`,void 0),P([g({type:String,reflect:!0})],H.prototype,`size`,void 0),P([g({type:String,reflect:!0})],H.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],H.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],H.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],H.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],H.prototype,`spacingRight`,void 0),P([_()],H.prototype,`_showDatepicker`,void 0),H=P([a(`scb-textfield`)],H),rl(),C(),y(),F();var Ul=class extends S{static{this.formAssociated=!0}constructor(){super(),this.name=``,this.orientation=`vertical`,this.disabled=!1,this.required=!1,this.deselectable=!1,this.size=`medium`,this.ariaLabel=null,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.value=``,this._internals=null,this._form=null,this._formResetHandler=null,this._initialValue=``,this._customValidationMessage=``,this.#e=()=>{let e=this.shadowRoot?.querySelector(`slot`);return e?e.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()===`scb-radio-button`):[]},this.#t=()=>{let e=this.#e();if(!e.length)return;let t=null;for(let n of e){let e=n;this.name&&n.setAttribute(`name`,this.name),this.disabled?n.setAttribute(`disabled`,``):n.removeAttribute(`disabled`),this.orientation===`horizontal`?n.setAttribute(`orientation`,`horizontal`):n.removeAttribute(`orientation`);let r=n.hasAttribute(`data-size-from-group`);this.deselectable?n.setAttribute(`deselectable`,``):n.removeAttribute(`deselectable`),this.size===`medium`?r&&(n.removeAttribute(`size`),n.removeAttribute(`data-size-from-group`)):(!n.hasAttribute(`size`)||r)&&(n.setAttribute(`size`,this.size),n.setAttribute(`data-size-from-group`,``));let i=e.value??n.getAttribute(`value`)??``,a=typeof e.checked==`boolean`?e.checked:n.hasAttribute(`checked`);if(this.value){let t=String(i)===this.value;t&&!a?e.checked=!0:!t&&a&&(e.checked=!1)}else a&&t===null&&(t=String(i))}!this.value&&t!==null&&(this.value=t)},this.#n=e=>{e.target!==this&&e.composedPath().find(e=>e?.tagName?.toLowerCase()===`scb-radio-button`)&&(e.stopImmediatePropagation(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})))},this.#r=e=>{if(e.target===this)return;let t=e.composedPath().find(e=>e?.tagName?.toLowerCase()===`scb-radio-button`);if(!t)return;e.stopImmediatePropagation();let n=t?.checked===!0,r=n?t?.value??t?.getAttribute?.(`value`)??e.target?.value??``:``;this.value=String(r??``);let i={value:String(r??``),checked:n,originalIsTrusted:e?.isTrusted===!0};this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scb-change`,{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbchange`,{detail:i,bubbles:!0,composed:!0}))},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
|
|
4964
4964
|
:host {
|
|
4965
4965
|
display: block;
|
|
4966
4966
|
|
|
@@ -5002,7 +5002,7 @@
|
|
|
5002
5002
|
>
|
|
5003
5003
|
<slot @slotchange=${this.#t}></slot>
|
|
5004
5004
|
</div>
|
|
5005
|
-
`}firstUpdated(){this.#o(),this.#t(),this.addEventListener(`input`,this.#n),this.addEventListener(`change`,this.#r),this._initialValue=this.value,this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.requestUpdate(),this.#t(),this.__syncFormValue(),this.#a()},this._form.addEventListener(`reset`,this._formResetHandler,!0)),this.__syncFormValue(),this.#a()}disconnectedCallback(){this.removeEventListener(`input`,this.#n),this.removeEventListener(`change`,this.#r),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),super.disconnectedCallback()}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#o(),(e.has(`name`)||e.has(`disabled`)||e.has(`orientation`)||e.has(`size`)||e.has(`deselectable`)||e.has(`required`)||e.has(`value`))&&this.#t(),(e.has(`value`)||e.has(`disabled`)||e.has(`name`))&&this.__syncFormValue(),(e.has(`value`)||e.has(`disabled`)||e.has(`required`))&&this.#a()}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??``}get willValidate(){return this._internals?.willValidate??!this.disabled}get labels(){return this._internals?.labels}checkValidity(){return this._internals?.checkValidity()??!this.#i()}reportValidity(){return this._internals?.reportValidity()??!this.#i()}setCustomValidity(e){this._customValidationMessage=String(e??``),this.#a()}formDisabledCallback(e){this.disabled=e,this.#a()}#e;#t;#n;#r;#i(){return this.disabled?!1:this._customValidationMessage?!0:this.required&&!this.value.trim()}#a(){if(!this._internals)return;let e=!this.disabled&&this.required&&!this.value.trim(),t=this._customValidationMessage||(e?`Välj ett alternativ.`:``);this._internals.setValidity(e?{valueMissing:!0}:{},t,this.shadowRoot?.querySelector(`.g`)??void 0)}__syncFormValue(){if(!this._internals)return;let e=typeof this.name==`string`&&this.name.trim()!==``,t=typeof this.value==`string`&&this.value.trim()!==``,n=this.disabled||!e||!t?null:this.value;this._internals.setFormValue(n)}#o(){let e=this.#s(this.spacing),t=this.#s(this.spacingTop)??e,n=this.#s(this.spacingBottom)??e,r=this.#s(this.spacingLeft),i=this.#s(this.spacingRight);t?this.style.setProperty(`--scb-radio-group-spacing-block-start`,t):this.style.removeProperty(`--scb-radio-group-spacing-block-start`),n?this.style.setProperty(`--scb-radio-group-spacing-block-end`,n):this.style.removeProperty(`--scb-radio-group-spacing-block-end`),r?this.style.setProperty(`--scb-radio-group-spacing-inline-start`,r):this.style.removeProperty(`--scb-radio-group-spacing-inline-start`),i?this.style.setProperty(`--scb-radio-group-spacing-inline-end`,i):this.style.removeProperty(`--scb-radio-group-spacing-inline-end`)}#s(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};
|
|
5005
|
+
`}firstUpdated(){this.#o(),this.#t(),this.addEventListener(`input`,this.#n),this.addEventListener(`change`,this.#r),this._initialValue=this.value,this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.requestUpdate(),this.#t(),this.__syncFormValue(),this.#a()},this._form.addEventListener(`reset`,this._formResetHandler,!0)),this.__syncFormValue(),this.#a()}disconnectedCallback(){this.removeEventListener(`input`,this.#n),this.removeEventListener(`change`,this.#r),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),super.disconnectedCallback()}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#o(),(e.has(`name`)||e.has(`disabled`)||e.has(`orientation`)||e.has(`size`)||e.has(`deselectable`)||e.has(`required`)||e.has(`value`))&&this.#t(),(e.has(`value`)||e.has(`disabled`)||e.has(`name`))&&this.__syncFormValue(),(e.has(`value`)||e.has(`disabled`)||e.has(`required`))&&this.#a()}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??``}get willValidate(){return this._internals?.willValidate??!this.disabled}get labels(){return this._internals?.labels}checkValidity(){return this._internals?.checkValidity()??!this.#i()}reportValidity(){return this._internals?.reportValidity()??!this.#i()}setCustomValidity(e){this._customValidationMessage=String(e??``),this.#a()}formDisabledCallback(e){this.disabled=e,this.#a()}#e;#t;#n;#r;#i(){return this.disabled?!1:this._customValidationMessage?!0:this.required&&!this.value.trim()}#a(){if(!this._internals)return;let e=!this.disabled&&this.required&&!this.value.trim(),t=this._customValidationMessage||(e?`Välj ett alternativ.`:``);this._internals.setValidity(e?{valueMissing:!0}:{},t,this.shadowRoot?.querySelector(`.g`)??void 0)}__syncFormValue(){if(!this._internals)return;let e=typeof this.name==`string`&&this.name.trim()!==``,t=typeof this.value==`string`&&this.value.trim()!==``,n=this.disabled||!e||!t?null:this.value;this._internals.setFormValue(n)}#o(){let e=this.#s(this.spacing),t=this.#s(this.spacingTop)??e,n=this.#s(this.spacingBottom)??e,r=this.#s(this.spacingLeft),i=this.#s(this.spacingRight);t?this.style.setProperty(`--scb-radio-group-spacing-block-start`,t):this.style.removeProperty(`--scb-radio-group-spacing-block-start`),n?this.style.setProperty(`--scb-radio-group-spacing-block-end`,n):this.style.removeProperty(`--scb-radio-group-spacing-block-end`),r?this.style.setProperty(`--scb-radio-group-spacing-inline-start`,r):this.style.removeProperty(`--scb-radio-group-spacing-inline-start`),i?this.style.setProperty(`--scb-radio-group-spacing-inline-end`,i):this.style.removeProperty(`--scb-radio-group-spacing-inline-end`)}#s(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};P([g({type:String})],Ul.prototype,`name`,void 0),P([g({type:String,reflect:!0})],Ul.prototype,`orientation`,void 0),P([g({type:Boolean,reflect:!0})],Ul.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0})],Ul.prototype,`required`,void 0),P([g({type:Boolean,reflect:!0})],Ul.prototype,`deselectable`,void 0),P([g({type:String,reflect:!0})],Ul.prototype,`size`,void 0),P([g({type:String,attribute:`aria-label`})],Ul.prototype,`ariaLabel`,void 0),P([g({type:String,reflect:!0})],Ul.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Ul.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Ul.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Ul.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Ul.prototype,`spacingRight`,void 0),P([g({type:String,reflect:!0})],Ul.prototype,`value`,void 0),Ul=P([a(`scb-radio-group`)],Ul),C(),y(),w(),F();var Wl=!1,Gl=0,Kl=e=>{e.metaKey||e.altKey||e.ctrlKey||(Wl=!0)},ql=()=>{Wl=!1},Jl=()=>{Gl===0&&(window.addEventListener(`keydown`,Kl,!0),window.addEventListener(`pointerdown`,ql,!0),window.addEventListener(`mousedown`,ql,!0),window.addEventListener(`touchstart`,ql,!0)),Gl+=1},Yl=()=>{Gl=Math.max(0,Gl-1),Gl===0&&(window.removeEventListener(`keydown`,Kl,!0),window.removeEventListener(`pointerdown`,ql,!0),window.removeEventListener(`mousedown`,ql,!0),window.removeEventListener(`touchstart`,ql,!0))},Xl=class extends S{constructor(...e){super(...e),this.disabled=!1,this.checked=!1,this.name=``,this.value=``,this.size=`medium`,this.deselectable=!1,this.label=``,this.supportingText=``,this.ariaLabel=``,this._radioId=``,this._showOuterFocusRing=!1,this.#n=()=>{this.disabled||this.label?.trim()&&Wl&&this.#e(!0)},this.#r=()=>{this.#e(!1)},this.#i=()=>{this.#e(!1)},this._onClick=e=>{if(this.disabled)return;e.preventDefault(),e.stopPropagation();let t=this.deselectable?!this.checked:!0;t!==this.checked&&(this.checked=t,this.#a(),this.checked&&this.dispatchEvent(new CustomEvent(`scb-radio-change`,{detail:{name:this.name,source:this},bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`change`,{detail:{checked:this.checked,value:this.checked?this.value:``},bubbles:!0,composed:!0})))},this._onRadioChange=e=>{e.detail.name===this.name&&e.detail.source!==this&&(this.checked=!1)}}#e(e){this._showOuterFocusRing!==e&&(this._showOuterFocusRing=e,this.requestUpdate())}#t(){let e=!!this.label?.trim();this.toggleAttribute(`data-has-label`,e),e||this.#e(!1)}#n;#r;#i;connectedCallback(){super.connectedCallback(),Jl(),this._radioId=this.id||`scb-radio-${Math.random().toString(36).substr(2,9)}`,this.#t(),this.addEventListener(`focusin`,this.#n),this.addEventListener(`focusout`,this.#r),this.addEventListener(`pointerdown`,this.#i,!0),document.addEventListener(`scb-radio-change`,this._onRadioChange)}disconnectedCallback(){super.disconnectedCallback(),Yl(),this.removeEventListener(`focusin`,this.#n),this.removeEventListener(`focusout`,this.#r),this.removeEventListener(`pointerdown`,this.#i,!0),document.removeEventListener(`scb-radio-change`,this._onRadioChange)}firstUpdated(){this.__syncInnerAria(),this.#a()}updated(e){super.updated(e),e.has(`disabled`)&&(this.toggleAttribute(`aria-disabled`,this.disabled),this.disabled&&this.#e(!1)),(e.has(`label`)||e.has(`supportingText`)||e.has(`ariaLabel`))&&this.__syncInnerAria(),e.has(`label`)&&this.#t(),e.has(`checked`)&&this.#a()}#a(){let e=this.shadowRoot?.querySelector(`md-radio`);e&&(e.checked=this.checked,this.checked?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}__syncInnerAria(){let e=this.shadowRoot?.querySelector(`md-radio`)?.shadowRoot;if(!e)return;let t=e.querySelector(`[role="radio"]`)||e.querySelector(`input[type="radio"]`);if(!t)return;let n=!!this.label?.trim(),r=n?`${this._radioId}-label`:``,i=this.supportingText?`${this._radioId}-supporting-text`:``;n&&r?(t.setAttribute(`aria-labelledby`,r),t.removeAttribute(`aria-label`)):(t.removeAttribute(`aria-labelledby`),this.ariaLabel?.trim()?t.setAttribute(`aria-label`,this.ariaLabel.trim()):t.removeAttribute(`aria-label`)),i?t.setAttribute(`aria-describedby`,i):t.removeAttribute(`aria-describedby`)}static{this.styles=p`
|
|
5006
5006
|
/* layout med inline-grid */
|
|
5007
5007
|
:host {
|
|
5008
5008
|
display: inline-grid;
|
|
@@ -5134,7 +5134,7 @@
|
|
|
5134
5134
|
</div>`:x}
|
|
5135
5135
|
</label>
|
|
5136
5136
|
<slot></slot>
|
|
5137
|
-
`}};
|
|
5137
|
+
`}};P([g({type:Boolean,reflect:!0})],Xl.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0})],Xl.prototype,`checked`,void 0),P([g({type:String,reflect:!0})],Xl.prototype,`name`,void 0),P([g({type:String,reflect:!0})],Xl.prototype,`value`,void 0),P([g({type:String,reflect:!0})],Xl.prototype,`size`,void 0),P([g({type:Boolean,reflect:!0})],Xl.prototype,`deselectable`,void 0),P([g({type:String})],Xl.prototype,`label`,void 0),P([g({type:String,attribute:`supporting-text`})],Xl.prototype,`supportingText`,void 0),P([g({type:String,attribute:`aria-label`})],Xl.prototype,`ariaLabel`,void 0),Xl=P([a(`scb-radio-button`)],Xl),C(),y(),Gc(),fl(),ol(),k(),F();var Zl={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},U=class extends S{constructor(...e){super(...e),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant=`basic`,this.label=``,this.icon=``,this.supportingText=``,this.okButton=`OK`,this.cancelButton=`Avbryt`,this.deleteButton=`Delete`,this.confirmButton=`Ta bort`,this.denyButton=`Avbryt`,this.resetButton=`Återställ`,this.submitButton=`Spara`,this.formId=``,this.formAction=``,this.formMethod=``,this.__lastTriggerEl=null,this.__scrollLocked=!1,this.__onDocumentClick=e=>{this.__getActionFromEvent(e)===`toggle`&&(this.__setOpen(!this.open),e.stopPropagation())},this.__onDocumentKeydown=e=>{this.open&&e.key===`Escape`&&(this.__fire(`esc`),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire(`scrim`),this.__setOpen(!1))},this.__onOk=()=>{this.__fire(`ok`),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire(`cancel`),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire(`confirm`),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire(`deny`),this.__setOpen(!1)},this.__onReset=()=>{let e=this.shadowRoot?.querySelector(`form`);e instanceof HTMLFormElement&&(this.__clearGeneratedFormValues(e),e.reset()),(this.shadowRoot?.querySelector(`slot`)?.assignedElements({flatten:!0})??[]).forEach(e=>{let t=e.tagName;t===`SCB-TEXTFIELD`&&(e.value=``),t===`SCB-CHECKBOX`&&(e.checked=!1),t===`SCB-RADIO-BUTTON`&&(e.checked=!1),t===`SCB-SWITCH`&&(e.selected=!1),t===`SCB-CHIP`&&(e.selected=!1)}),this.__fire(`reset`)},this.__onSubmit=()=>{let e=this.shadowRoot?.querySelector(`form`);if(e instanceof HTMLFormElement){if(this.__syncSlottedFormValues(e),!this.__validateFormAndSlottedFields(e))return;e.requestSubmit()}this.__fire(`submit`),this.__setOpen(!1)},this.__onKeydownTrap=e=>{if(!this.open||e.key!==`Tab`)return;let t=Array.from(this.shadowRoot.querySelectorAll(`button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`));if(!t.length)return;let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(r.focus(),e.preventDefault()):!e.shiftKey&&document.activeElement===r&&(n.focus(),e.preventDefault())}}static{this.styles=p`
|
|
5138
5138
|
:host {
|
|
5139
5139
|
display:block;
|
|
5140
5140
|
position:relative;
|
|
@@ -5398,7 +5398,7 @@
|
|
|
5398
5398
|
>
|
|
5399
5399
|
${this.renderBody(e,t)}
|
|
5400
5400
|
</div>
|
|
5401
|
-
`}};
|
|
5401
|
+
`}};P([g({type:Boolean,reflect:!0,converter:Zl})],U.prototype,`open`,void 0),P([g({type:String,attribute:`max-w`,reflect:!0})],U.prototype,`maxW`,void 0),P([g({type:String,attribute:`max-h`,reflect:!0})],U.prototype,`maxH`,void 0),P([g({type:Number,attribute:`z-index`,reflect:!0})],U.prototype,`zIndex`,void 0),P([g({type:Boolean,attribute:!1})],U.prototype,`inSb`,void 0),P([g({type:Boolean,attribute:`scrim-close`,converter:Zl})],U.prototype,`scrimClose`,void 0),P([g({type:String,reflect:!0})],U.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],U.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],U.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],U.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],U.prototype,`spacingRight`,void 0),P([g({type:String})],U.prototype,`variant`,void 0),P([g({type:String})],U.prototype,`label`,void 0),P([g({type:String})],U.prototype,`icon`,void 0),P([g({type:String,attribute:`supporting-text`})],U.prototype,`supportingText`,void 0),P([g({type:String,attribute:`ok-button`})],U.prototype,`okButton`,void 0),P([g({type:String,attribute:`cancel-button`})],U.prototype,`cancelButton`,void 0),P([g({type:String,attribute:`delete-button`})],U.prototype,`deleteButton`,void 0),P([g({type:String,attribute:`confirm-button`})],U.prototype,`confirmButton`,void 0),P([g({type:String,attribute:`deny-button`})],U.prototype,`denyButton`,void 0),P([g({type:String,attribute:`reset-button`})],U.prototype,`resetButton`,void 0),P([g({type:String,attribute:`submit-button`})],U.prototype,`submitButton`,void 0),P([g({type:String,attribute:`form-id`})],U.prototype,`formId`,void 0),P([g({type:String,attribute:`form-action`})],U.prototype,`formAction`,void 0),P([g({type:String,attribute:`form-method`})],U.prototype,`formMethod`,void 0),U=P([a(`scb-dialog`)],U),C(),y(),fl(),ul(),w(),F();var Ql={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},$l=class extends S{constructor(...e){super(...e),this._lastActiveDay=null,this.lang=`sv`,this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate=``,this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=e=>{let t=Array.from(this.shadowRoot?.querySelectorAll(`.calendar-day.has-event`)??[]),n=this.shadowRoot?.activeElement,r=n&&t.includes(n)?n:document.activeElement,i=t.indexOf(r);if(i===-1)return;let a=i,o=this.disableWeekend?5:7;switch(e.key){case`ArrowRight`:a=i+1<t.length?i+1:i;break;case`ArrowLeft`:a=i-1>=0?i-1:i;break;case`ArrowDown`:a=i+o<t.length?i+o:i;break;case`ArrowUp`:a=i-o>=0?i-o:i;break;default:return}a!==i&&(e.preventDefault(),t[a].focus())},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{this._lastActiveDay?.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(e){let t=(e??``)+``;t!==this.selectedDate&&(this.selectedDate=t)}static get observedAttributes(){return[...super.observedAttributes??[],`value`]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`value`&&(this.value=n??``)}static{this.styles=p`
|
|
5402
5402
|
:host {
|
|
5403
5403
|
display: block;
|
|
5404
5404
|
margin-block-start: var(--scb-calendar-spacing-block-start, 0);
|
|
@@ -5565,7 +5565,7 @@
|
|
|
5565
5565
|
</scb-list>
|
|
5566
5566
|
</scb-dialog>
|
|
5567
5567
|
`:``}
|
|
5568
|
-
`}};
|
|
5568
|
+
`}};P([g({type:String})],$l.prototype,`lang`,void 0),P([g({type:Boolean,attribute:`disable-weekend`,reflect:!0,converter:Ql})],$l.prototype,`disableWeekend`,void 0),P([g({type:Boolean,attribute:`public-holidays`,converter:Ql})],$l.prototype,`publicHolidays`,void 0),P([g({type:Number,attribute:`display-year`,reflect:!0})],$l.prototype,`displayYear`,void 0),P([g({type:Number,attribute:`display-month`,reflect:!0})],$l.prototype,`displayMonth`,void 0),P([g({type:String,attribute:`selected-date`,reflect:!0})],$l.prototype,`selectedDate`,void 0),P([g({attribute:!1})],$l.prototype,`events`,void 0),P([g({type:String,attribute:`events-json`})],$l.prototype,`eventsJson`,void 0),P([g({type:String,reflect:!0})],$l.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],$l.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],$l.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],$l.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],$l.prototype,`spacingRight`,void 0),$l=P([a(`scb-calendar`)],$l),C(),y(),w(),F();var eu,tu={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},W=class extends S{static{eu=this}constructor(...e){super(...e),this.variant=`default`,this.size=`medium`,this.date=null,this.direction=`horizontal`,this.title=``,this.calendarCardTitle=``,this.subtitle=``,this.supportingText=``,this.cardHref=``,this.cardHrefNav=``,this.showMedia=null,this.mediaWidth=``,this.mediaHeight=``,this.mediaAspect=``,this.width=``,this.maxWidth=``,this.minWidth=``,this.height=``,this.maxHeight=``,this.minHeight=``,this.sizing=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.__iconLoaded=!1}static{this.__rippleLoaded=!1}__hasSlottedContent(e){return!!this.querySelector(`[slot="${e}"]`)}__getSlottedText(e){return this.querySelector(`[slot="${e}"]`)?.textContent?.trim()??``}get#e(){return this.__getSlottedText(`heading`)||this.calendarCardTitle||this.title}get#t(){return this.__getSlottedText(`subtitle`)||this.subtitle}get#n(){return this.#e||this.#t||`Kalenderkort`}async firstUpdated(){eu.__iconLoaded||(await Promise.resolve().then(()=>(k(),ea)),eu.__iconLoaded=!0),eu.__rippleLoaded||(await Promise.resolve().then(()=>(E(),hn)),eu.__rippleLoaded=!0),this.__applyInnerSizing(),this.#i()}static{this.styles=p`
|
|
5569
5569
|
:host {
|
|
5570
5570
|
display: block;
|
|
5571
5571
|
position: relative;
|
|
@@ -5933,7 +5933,7 @@
|
|
|
5933
5933
|
</div>
|
|
5934
5934
|
</div>
|
|
5935
5935
|
${this.cardHref?b`<md-focus-ring></md-focus-ring>`:``}
|
|
5936
|
-
`}#r(){let e={day:1,month:`Jan`};if(!this.date)return e;let t=this.date instanceof Date?this.date:(()=>{let e=new Date(String(this.date));return Number.isNaN(e.getTime())?null:e})();if(!t)return e;let n=t.getDate(),r=new Intl.DateTimeFormat(`sv-SE`,{month:`short`}).format(t).replace(`.`,``).trim();return{day:n,month:r.charAt(0).toUpperCase()+r.slice(1)}}__applyInnerSizing(){let e=this.renderRoot.querySelector(`.calendar-card`);e&&(this.width&&this.width.trim()!==``?(e.style.inlineSize=`100%`,e.style.maxInlineSize=`100%`):(e.style.removeProperty(`inline-size`),e.style.removeProperty(`max-inline-size`)),this.height&&this.height.trim()!==``||this.sizing===`stretch`?e.style.blockSize=`100%`:e.style.removeProperty(`block-size`),this.maxHeight&&this.maxHeight.trim()!==``?e.style.maxBlockSize=`100%`:e.style.removeProperty(`max-block-size`))}_onKeyDown(e){(e.key===`Enter`||e.key===` `)&&this.cardHref&&(window.open(this.cardHref,`_self`),e.preventDefault())}_handleHrefNavigation(){this.cardHref&&(this.cardHrefNav===`tab`?window.open(this.cardHref,`_blank`):this.cardHrefNav===`window`?window.open(this.cardHref,`_blank`,`noopener,noreferrer,width=800,height=600`):window.open(this.cardHref,`_self`))}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#i(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-calendar-card-spacing-block-start`,t):this.style.removeProperty(`--scb-calendar-card-spacing-block-start`),n?this.style.setProperty(`--scb-calendar-card-spacing-block-end`,n):this.style.removeProperty(`--scb-calendar-card-spacing-block-end`),r?this.style.setProperty(`--scb-calendar-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-calendar-card-spacing-inline-start`),i?this.style.setProperty(`--scb-calendar-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-calendar-card-spacing-inline-end`)}updated(e){e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`minWidth`)&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty(`min-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),e.has(`minHeight`)&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty(`min-block-size`)),(e.has(`width`)||e.has(`height`)||e.has(`maxHeight`)||e.has(`sizing`))&&this.__applyInnerSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#i()}};
|
|
5936
|
+
`}#r(){let e={day:1,month:`Jan`};if(!this.date)return e;let t=this.date instanceof Date?this.date:(()=>{let e=new Date(String(this.date));return Number.isNaN(e.getTime())?null:e})();if(!t)return e;let n=t.getDate(),r=new Intl.DateTimeFormat(`sv-SE`,{month:`short`}).format(t).replace(`.`,``).trim();return{day:n,month:r.charAt(0).toUpperCase()+r.slice(1)}}__applyInnerSizing(){let e=this.renderRoot.querySelector(`.calendar-card`);e&&(this.width&&this.width.trim()!==``?(e.style.inlineSize=`100%`,e.style.maxInlineSize=`100%`):(e.style.removeProperty(`inline-size`),e.style.removeProperty(`max-inline-size`)),this.height&&this.height.trim()!==``||this.sizing===`stretch`?e.style.blockSize=`100%`:e.style.removeProperty(`block-size`),this.maxHeight&&this.maxHeight.trim()!==``?e.style.maxBlockSize=`100%`:e.style.removeProperty(`max-block-size`))}_onKeyDown(e){(e.key===`Enter`||e.key===` `)&&this.cardHref&&(window.open(this.cardHref,`_self`),e.preventDefault())}_handleHrefNavigation(){this.cardHref&&(this.cardHrefNav===`tab`?window.open(this.cardHref,`_blank`):this.cardHrefNav===`window`?window.open(this.cardHref,`_blank`,`noopener,noreferrer,width=800,height=600`):window.open(this.cardHref,`_self`))}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#i(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-calendar-card-spacing-block-start`,t):this.style.removeProperty(`--scb-calendar-card-spacing-block-start`),n?this.style.setProperty(`--scb-calendar-card-spacing-block-end`,n):this.style.removeProperty(`--scb-calendar-card-spacing-block-end`),r?this.style.setProperty(`--scb-calendar-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-calendar-card-spacing-inline-start`),i?this.style.setProperty(`--scb-calendar-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-calendar-card-spacing-inline-end`)}updated(e){e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`minWidth`)&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty(`min-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),e.has(`minHeight`)&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty(`min-block-size`)),(e.has(`width`)||e.has(`height`)||e.has(`maxHeight`)||e.has(`sizing`))&&this.__applyInnerSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#i()}};P([g({type:String,reflect:!0})],W.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],W.prototype,`size`,void 0),P([g({type:String,attribute:`date`})],W.prototype,`date`,void 0),P([g({type:String,reflect:!0})],W.prototype,`direction`,void 0),P([g({type:String,reflect:!0,converter:tu})],W.prototype,`title`,void 0),P([g({type:String,attribute:`calendar-card-title`,reflect:!0,converter:tu})],W.prototype,`calendarCardTitle`,void 0),P([g({type:String,reflect:!0,converter:tu})],W.prototype,`subtitle`,void 0),P([g({type:String,attribute:`supporting-text`,reflect:!0,converter:tu})],W.prototype,`supportingText`,void 0),P([g({type:String,attribute:`card-href`})],W.prototype,`cardHref`,void 0),P([g({type:String,attribute:`card-href-nav`})],W.prototype,`cardHrefNav`,void 0),P([g({type:Boolean,reflect:!0,attribute:`show-media`})],W.prototype,`showMedia`,void 0),P([g({type:String,attribute:`media-width`})],W.prototype,`mediaWidth`,void 0),P([g({type:String,attribute:`media-height`})],W.prototype,`mediaHeight`,void 0),P([g({type:String,attribute:`media-aspect`})],W.prototype,`mediaAspect`,void 0),P([g({type:String,reflect:!0})],W.prototype,`width`,void 0),P([g({type:String,reflect:!0,attribute:`max-width`})],W.prototype,`maxWidth`,void 0),P([g({type:String,attribute:`min-width`})],W.prototype,`minWidth`,void 0),P([g({type:String,reflect:!0})],W.prototype,`height`,void 0),P([g({type:String,reflect:!0,attribute:`max-height`})],W.prototype,`maxHeight`,void 0),P([g({type:String,attribute:`min-height`})],W.prototype,`minHeight`,void 0),P([g({type:String,reflect:!0,converter:tu})],W.prototype,`sizing`,void 0),P([g({type:String,reflect:!0})],W.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],W.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],W.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],W.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],W.prototype,`spacingRight`,void 0),W=eu=P([a(`scb-calendar-card`)],W),C(),y(),Gc(),F();var nu=class extends S{constructor(...e){super(...e),this._contentId=`scb-collapse-content-${Math.random().toString(36).substr(2,9)}`,this.variant=`elements`,this.collapsedHeight=40,this.visibleElements=1,this.expanded=!1,this._elementCount=0,this.expandButtonLabel=`Mer`,this.collapseButtonLabel=`Mindre`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.itemsGap=void 0,this._contentHeight=0,this.#r=0,this.#i=0,this.#o=0,this.#s=0}get _regionLabel(){return`${this.expanded?this.collapseButtonLabel:this.expandButtonLabel} – ${this._contentId}`}static{this.styles=p`
|
|
5937
5937
|
:host {
|
|
5938
5938
|
display: block;
|
|
5939
5939
|
box-sizing: border-box;
|
|
@@ -6019,7 +6019,7 @@
|
|
|
6019
6019
|
>
|
|
6020
6020
|
</scb-button>
|
|
6021
6021
|
`:``}
|
|
6022
|
-
`}}};
|
|
6022
|
+
`}}};P([g({type:String})],nu.prototype,`variant`,void 0),P([g({type:Number,attribute:`collapsed-height`,reflect:!0})],nu.prototype,`collapsedHeight`,void 0),P([g({type:Number,attribute:`visible-elements`,reflect:!0})],nu.prototype,`visibleElements`,void 0),P([g({type:Boolean,reflect:!0})],nu.prototype,`expanded`,void 0),P([g({type:String,attribute:`expand-button-label`,reflect:!0})],nu.prototype,`expandButtonLabel`,void 0),P([g({type:String,attribute:`collapse-button-label`,reflect:!0})],nu.prototype,`collapseButtonLabel`,void 0),P([g({type:String,reflect:!0})],nu.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],nu.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],nu.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],nu.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],nu.prototype,`spacingRight`,void 0),P([g({type:String,attribute:`items-gap`,reflect:!0})],nu.prototype,`itemsGap`,void 0),nu=P([a(`scb-collapse`)],nu),C(),y(),Gc(),F();var ru={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},iu=class extends S{constructor(...e){super(...e),this.open=!0,this.autoRemove=!0,this.title=``,this.supportingText=``,this.ariaLabel=`Cookie-inställningar`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._updateButtonWidth=()=>{let e=window.innerWidth<=480,t=this.shadowRoot.querySelector(`slot[name="buttons"]`);t&&t.assignedElements().forEach(t=>{e?t.setAttribute(`full-width`,``):t.removeAttribute(`full-width`)})}}static{this.styles=p`
|
|
6023
6023
|
:host {
|
|
6024
6024
|
position: var(--scb-cookies-consent-position, fixed);
|
|
6025
6025
|
width: var(--scb-cookies-consent-width, 100%);
|
|
@@ -6096,7 +6096,7 @@
|
|
|
6096
6096
|
<slot name="buttons"></slot>
|
|
6097
6097
|
</div>
|
|
6098
6098
|
</div>
|
|
6099
|
-
`:null}};
|
|
6099
|
+
`:null}};P([g({type:Boolean,reflect:!0,converter:ru})],iu.prototype,`open`,void 0),P([g({type:Boolean,attribute:`auto-remove`,reflect:!0,converter:ru})],iu.prototype,`autoRemove`,void 0),P([g({type:String,reflect:!0})],iu.prototype,`title`,void 0),P([g({type:String,attribute:`supporting-text`,reflect:!0})],iu.prototype,`supportingText`,void 0),P([g({type:String,attribute:`aria-label`,reflect:!0})],iu.prototype,`ariaLabel`,void 0),P([g({type:String,reflect:!0})],iu.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],iu.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],iu.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],iu.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],iu.prototype,`spacingRight`,void 0),iu=P([a(`scb-cookies-consent`)],iu);var au=n({ScbDrawer:()=>su}),G,ou,su,cu=t((()=>{C(),y(),Vl(),F(),ou={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},su=class extends S{static{G=this}constructor(...e){super(...e),this.floating=!0,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.__effectiveSide=`left`,this.__lastTriggerEl=null,this.__lastTriggerWasAriaControls=!1,this.__onDocumentClick=e=>{let t=this.__getActionFromEvent(e);if(t){t===`open`&&this.__setOpen(!0),t===`close`&&this.__setOpen(!1),t===`toggle`&&this.__setOpen(!this.open),e.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(e.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=e=>{if(this.open){if(e.key===`Escape`){this.__setOpen(!1);return}if(this.overlay&&e.key===`Tab`){let t=this.__getFocusable();if(t.length===0)return;let n=t[0],r=t[t.length-1],i=document.activeElement;e.shiftKey?(i===n||!i||!this.contains(i))&&(e.preventDefault(),r.focus()):(i===r||!i||!this.contains(i))&&(e.preventDefault(),n.focus())}}}}static{this.__overlayEl=null}static{this.__overlayStack=[]}static{this.__lockedCount=0}static{this.__prevDocOverflow=null}static{this.__prevBodyOverflow=null}static{this.__prevDocPaddingRight=null}static{this.__prevBodyPaddingRight=null}static __ensureOverlayStyles(){if(typeof document>`u`||document.getElementById(`scb-drawer-overlay-styles`))return;let e=document.createElement(`style`);e.id=`scb-drawer-overlay-styles`,e.textContent=`
|
|
6100
6100
|
.scb-drawer-global-overlay {
|
|
6101
6101
|
position: fixed;
|
|
6102
6102
|
inset: 0;
|
|
@@ -6113,7 +6113,7 @@
|
|
|
6113
6113
|
@media (prefers-reduced-motion: reduce) {
|
|
6114
6114
|
.scb-drawer-global-overlay { transition: none; }
|
|
6115
6115
|
}
|
|
6116
|
-
`,document.head.appendChild(e)}static __ensureOverlay(){if(typeof document>`u`||
|
|
6116
|
+
`,document.head.appendChild(e)}static __ensureOverlay(){if(typeof document>`u`||G.__overlayEl)return;G.__ensureOverlayStyles();let e=document.createElement(`div`);e.className=`scb-drawer-global-overlay`,e.addEventListener(`pointerdown`,()=>{let e=G.__overlayStack[G.__overlayStack.length-1];e&&e.closeOnOverlay&&e.__setOpen(!1)},{passive:!0}),document.body.appendChild(e),G.__overlayEl=e}static __showOverlay(e){G.__ensureOverlay(),G.__overlayEl&&(G.__overlayStack.includes(e)||G.__overlayStack.push(e),G.__overlayEl.classList.add(`is-visible`))}static __hideOverlay(e){let t=G.__overlayStack.indexOf(e);t>=0&&G.__overlayStack.splice(t,1),G.__overlayStack.length===0&&G.__overlayEl&&G.__overlayEl.classList.remove(`is-visible`)}static __lockScrollEnable(){if(!(typeof document>`u`)){if(G.__lockedCount===0){G.__prevDocOverflow=document.documentElement.style.overflow||``,G.__prevBodyOverflow=document.body.style.overflow||``,G.__prevDocPaddingRight=document.documentElement.style.paddingRight||``,G.__prevBodyPaddingRight=document.body.style.paddingRight||``;let e=Math.max(0,window.innerWidth-document.documentElement.clientWidth);if(e>0){let t=Number.parseFloat(getComputedStyle(document.documentElement).paddingRight||`0`),n=Number.parseFloat(getComputedStyle(document.body).paddingRight||`0`);document.documentElement.style.paddingRight=`${t+e}px`,document.body.style.paddingRight=`${n+e}px`}document.documentElement.style.overflow=`hidden`,document.body.style.overflow=`hidden`}G.__lockedCount++}}static __lockScrollDisable(){typeof document>`u`||(G.__lockedCount=Math.max(0,G.__lockedCount-1),G.__lockedCount===0&&(document.documentElement.style.overflow=G.__prevDocOverflow??``,document.body.style.overflow=G.__prevBodyOverflow??``,document.documentElement.style.paddingRight=G.__prevDocPaddingRight??``,document.body.style.paddingRight=G.__prevBodyPaddingRight??``))}static{this.styles=p`
|
|
6117
6117
|
:host {
|
|
6118
6118
|
display: block;
|
|
6119
6119
|
color: var(--md-sys-color-on-surface);
|
|
@@ -6223,7 +6223,7 @@
|
|
|
6223
6223
|
>
|
|
6224
6224
|
<div class="panel"><slot></slot></div>
|
|
6225
6225
|
</div>
|
|
6226
|
-
`}connectedCallback(){super.connectedCallback(),this.__syncEffectiveSide(new Map),document.addEventListener(`click`,this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),this.overlay&&(
|
|
6226
|
+
`}connectedCallback(){super.connectedCallback(),this.__syncEffectiveSide(new Map),document.addEventListener(`click`,this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),this.overlay&&(G.__hideOverlay(this),this.lockScroll&&G.__lockScrollDisable()),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;let t=e.composedPath();for(let e of t)if(e instanceof Element){if(e.getAttribute(`data-drawer-open`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1,`open`;if(e.getAttribute(`data-drawer-close`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1,`close`;if(e.getAttribute(`data-drawer-toggle`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1,`toggle`;if(e.getAttribute(`aria-controls`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!0,`toggle`}return null}__getFocusable(){let e=new Set,t=t=>{t.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`).forEach(t=>e.add(t))};return t(this),t(this.renderRoot),Array.from(e).filter(e=>!e.hasAttribute(`disabled`)&&e.tabIndex>=0)}__setOpen(e){this.open=e}__syncLastTriggerExpanded(e){this.__lastTriggerEl&&this.__lastTriggerWasAriaControls&&this.__lastTriggerEl.getAttribute(`aria-controls`)===this.id&&this.__lastTriggerEl.setAttribute(`aria-expanded`,String(e))}__syncEffectiveSide(e){let t=this.left&&this.right,n;n=t?e.has(`left`)&&this.left&&!e.has(`right`)?`left`:`right`:this.right?`right`:`left`,this.__effectiveSide!==n&&(this.__effectiveSide=n),this.getAttribute(`data-side`)!==n&&this.setAttribute(`data-side`,n)}willUpdate(e){this.__syncEffectiveSide(e)}updated(e){if(e.has(`open`)){let t=!!e.get(`open`);this.__applyOpenSideEffects(t,this.open)}}__applyOpenSideEffects(e,t){t&&!e?(this.__syncLastTriggerExpanded(!0),this.floating&&this.overlay&&(G.__showOverlay(this),this.lockScroll&&G.__lockScrollEnable()),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),this.updateComplete.then(()=>{this.__getFocusable()[0]?.focus?.()}),this.dispatchEvent(new CustomEvent(`scb-drawer-opened`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbdraweropened`,{bubbles:!0,composed:!0}))):!t&&e&&(this.__syncLastTriggerExpanded(!1),this.floating&&this.overlay&&(G.__hideOverlay(this),this.lockScroll&&G.__lockScrollDisable()),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),this.__lastTriggerEl?.focus?.(),this.dispatchEvent(new CustomEvent(`scb-drawer-closed`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbdrawerclosed`,{bubbles:!0,composed:!0})))}},P([g({type:Boolean,reflect:!0,converter:ou})],su.prototype,`floating`,void 0),P([g({type:Boolean,reflect:!0,converter:ou})],su.prototype,`left`,void 0),P([g({type:Boolean,reflect:!0,converter:ou})],su.prototype,`right`,void 0),P([g({type:Boolean,reflect:!0,converter:ou})],su.prototype,`open`,void 0),P([g({type:Boolean,reflect:!0,converter:ou})],su.prototype,`overlay`,void 0),P([g({type:Boolean,reflect:!0,attribute:`lock-scroll`,converter:ou})],su.prototype,`lockScroll`,void 0),P([g({type:Boolean,reflect:!0,attribute:`close-on-overlay`,converter:ou})],su.prototype,`closeOnOverlay`,void 0),P([g({type:Boolean,reflect:!0,converter:ou})],su.prototype,`modal`,void 0),su=G=P([a(`scb-drawer`)],su)}));cu(),C(),y(),Gc(),F();var K=class extends S{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.type=`default`,this.name=``,this.multiple=!1,this.label=``,this.supportingText=``,this.metaText=``,this.buttonLabel=``,this.replaceButtonLabel=``,this.removeButtonLabel=``,this.previewEyebrow=``,this.emptyPreviewTitle=``,this.emptyPreviewMeta=``,this.accept=``,this.hidePreview=!1,this.showExistingPreview=!1,this.disabled=!1,this.previewSrc=``,this.previewAlt=``,this.previewTitle=``,this.previewMeta=``,this.existingValue=``,this.existingValueName=``,this.removeValueName=``,this._isDragOver=!1,this._selectedPreviewKind=`empty`,this._selectedPreviewSrc=``,this._selectedPreviewAlt=``,this._selectedPreviewTitle=``,this._selectedPreviewMeta=``,this._selectedPreviewItems=[],this._markedForRemoval=!1,this._dragDepth=0,this._previewSource=`external`,this._form=null,this._formDataHandler=null,`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
|
|
6227
6227
|
:host {
|
|
6228
6228
|
display: block;
|
|
6229
6229
|
width: 100%;
|
|
@@ -6777,7 +6777,7 @@
|
|
|
6777
6777
|
|
|
6778
6778
|
${this._renderSelectedImageCards()}
|
|
6779
6779
|
</div>
|
|
6780
|
-
`}};
|
|
6780
|
+
`}};P([g({type:String,reflect:!0})],K.prototype,`type`,void 0),P([g({type:String})],K.prototype,`name`,void 0),P([g({type:Boolean,reflect:!0})],K.prototype,`multiple`,void 0),P([g({type:String})],K.prototype,`label`,void 0),P([g({type:String,attribute:`supporting-text`})],K.prototype,`supportingText`,void 0),P([g({type:String,attribute:`meta-text`})],K.prototype,`metaText`,void 0),P([g({type:String,attribute:`button-label`})],K.prototype,`buttonLabel`,void 0),P([g({type:String,attribute:`replace-button-label`})],K.prototype,`replaceButtonLabel`,void 0),P([g({type:String,attribute:`remove-button-label`})],K.prototype,`removeButtonLabel`,void 0),P([g({type:String,attribute:`preview-eyebrow`})],K.prototype,`previewEyebrow`,void 0),P([g({type:String,attribute:`empty-preview-title`})],K.prototype,`emptyPreviewTitle`,void 0),P([g({type:String,attribute:`empty-preview-meta`})],K.prototype,`emptyPreviewMeta`,void 0),P([g({type:String})],K.prototype,`accept`,void 0),P([g({type:Boolean,attribute:`hide-preview`,reflect:!0})],K.prototype,`hidePreview`,void 0),P([g({type:Boolean,attribute:`show-existing-preview`,reflect:!0})],K.prototype,`showExistingPreview`,void 0),P([g({type:Boolean,reflect:!0})],K.prototype,`disabled`,void 0),P([g({type:String,attribute:`preview-src`})],K.prototype,`previewSrc`,void 0),P([g({type:String,attribute:`preview-alt`})],K.prototype,`previewAlt`,void 0),P([g({type:String,attribute:`preview-title`})],K.prototype,`previewTitle`,void 0),P([g({type:String,attribute:`preview-meta`})],K.prototype,`previewMeta`,void 0),P([g({type:String,attribute:`existing-value`})],K.prototype,`existingValue`,void 0),P([g({type:String,attribute:`existing-value-name`})],K.prototype,`existingValueName`,void 0),P([g({type:String,attribute:`remove-value-name`})],K.prototype,`removeValueName`,void 0),P([_()],K.prototype,`_isDragOver`,void 0),P([_()],K.prototype,`_selectedPreviewKind`,void 0),P([_()],K.prototype,`_selectedPreviewSrc`,void 0),P([_()],K.prototype,`_selectedPreviewAlt`,void 0),P([_()],K.prototype,`_selectedPreviewTitle`,void 0),P([_()],K.prototype,`_selectedPreviewMeta`,void 0),P([_()],K.prototype,`_selectedPreviewItems`,void 0),P([_()],K.prototype,`_markedForRemoval`,void 0),K=P([a(`scb-drop-zone`)],K);var lu,uu=t((()=>{C(),y(),Vl(),k(),E(),w(),F(),lu=class extends S{constructor(...e){super(...e),this.label=``,this.hasSubMenu=!1,this.openLeft=!1,this.divider=!1,this.leadingIcon=``,this.trailingIcon=``,this.itemHref=``,this.href=``,this._observedSubMenu=null,this._syncSubMenuFlags=()=>{let e=this.nextElementSibling,t=!!(e&&e.tagName===`SCB-OPTIONS-SUB-MENU`),n=!!(t&&e.hasAttribute(`open-left`));t!==this.hasSubMenu&&(this.hasSubMenu=t),n!==this.openLeft&&(this.openLeft=n);let r=t?e:null;r!==this._observedSubMenu&&(this._subMenuAttrObserver?.disconnect(),this._subMenuAttrObserver=void 0,this._observedSubMenu=r,r&&(this._subMenuAttrObserver=new MutationObserver(()=>this._syncSubMenuFlags()),this._subMenuAttrObserver.observe(r,{attributes:!0,attributeFilter:[`open-left`]})))},this.handleClick=e=>{this._effectiveHref?this._navigateToHref(e):this._toggleSubMenu()},this._onBlur=e=>{let t=this.closest(`scb-options-sub-menu`);if(t&&t.open){let n=e.relatedTarget;(!n||!t.contains(n))&&(t.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0})))}},this._onFocus=()=>{let e=this.nextElementSibling;this.classList.contains(`open-submenu`)&&(e&&e.tagName===`SCB-OPTIONS-SUB-MENU`&&e.hasAttribute(`open`)||this.classList.remove(`open-submenu`))},this._onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){e.preventDefault(),this.handleClick(e);return}if(e.key===`ArrowDown`){e.preventDefault();let t=this.nextElementSibling;for(;t&&t.tagName!==`SCB-OPTIONS-MENU-ITEM`;)t=t.nextElementSibling;t&&(t.shadowRoot?.querySelector(`li`))?.focus();return}if(e.key===`ArrowUp`){e.preventDefault();let t=this.previousElementSibling;for(;t&&t.tagName!==`SCB-OPTIONS-MENU-ITEM`;)t=t.previousElementSibling;t&&(t.shadowRoot?.querySelector(`li`))?.focus();return}if(e.key===`ArrowRight`){e.preventDefault();let t=this.nextElementSibling;t&&t.tagName===`SCB-OPTIONS-SUB-MENU`&&(t.hasAttribute(`open`)||(this._toggleSubMenu(),t.dispatchEvent(new CustomEvent(`show-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`showsubmenu`,{bubbles:!0,composed:!0}))),setTimeout(()=>{let e=t.querySelector(`scb-options-menu-item`);e&&(e.shadowRoot?.querySelector(`li`))?.focus()},0));return}if(e.key===`ArrowLeft`){e.preventDefault();let t=this.nextElementSibling;if(t&&t.tagName===`SCB-OPTIONS-SUB-MENU`&&t.hasAttribute(`open`)){this._toggleSubMenu(),t.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0}));return}let n=this.closest(`scb-options-sub-menu`);if(n){let e=n.previousElementSibling;e&&e.tagName===`SCB-OPTIONS-MENU-ITEM`&&(e.shadowRoot?.querySelector(`li`))?.focus()}return}}}static{this.styles=p`
|
|
6781
6781
|
:host {
|
|
6782
6782
|
display: block;
|
|
6783
6783
|
}
|
|
@@ -6842,7 +6842,7 @@
|
|
|
6842
6842
|
<md-ripple></md-ripple>
|
|
6843
6843
|
`}
|
|
6844
6844
|
</li>
|
|
6845
|
-
`}_navigateToHref(e){let t=this._effectiveHref;if(!t)return;let n={href:t},r=!this.dispatchEvent(new CustomEvent(`item-navigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))||!this.dispatchEvent(new CustomEvent(`itemnavigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}));e.preventDefault(),e.stopPropagation(),r||(window.location.href=t)}_toggleSubMenu(){let e=this.nextElementSibling;e&&e.tagName===`SCB-OPTIONS-SUB-MENU`&&(this.classList.toggle(`open-submenu`),e.hasAttribute(`open`)?(e.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0}))):(e.dispatchEvent(new CustomEvent(`show-submenu`,{bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent(`showsubmenu`,{bubbles:!0,composed:!0}))))}},
|
|
6845
|
+
`}_navigateToHref(e){let t=this._effectiveHref;if(!t)return;let n={href:t},r=!this.dispatchEvent(new CustomEvent(`item-navigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))||!this.dispatchEvent(new CustomEvent(`itemnavigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}));e.preventDefault(),e.stopPropagation(),r||(window.location.href=t)}_toggleSubMenu(){let e=this.nextElementSibling;e&&e.tagName===`SCB-OPTIONS-SUB-MENU`&&(this.classList.toggle(`open-submenu`),e.hasAttribute(`open`)?(e.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0}))):(e.dispatchEvent(new CustomEvent(`show-submenu`,{bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent(`showsubmenu`,{bubbles:!0,composed:!0}))))}},P([g({type:String})],lu.prototype,`label`,void 0),P([g({type:Boolean})],lu.prototype,`hasSubMenu`,void 0),P([g({type:Boolean})],lu.prototype,`openLeft`,void 0),P([g({type:Boolean})],lu.prototype,`divider`,void 0),P([g({type:String,attribute:`leading-icon`})],lu.prototype,`leadingIcon`,void 0),P([g({type:String,attribute:`trailing-icon`})],lu.prototype,`trailingIcon`,void 0),P([g({type:String,attribute:`item-href`})],lu.prototype,`itemHref`,void 0),P([g({type:String})],lu.prototype,`href`,void 0),lu=P([a(`scb-options-menu-item`)],lu)})),du,fu=t((()=>{C(),y(),F(),du=class extends S{constructor(...e){super(...e),this.open=!1,this._show=()=>{this.setAttribute(`open`,``),this.open=!0},this._hide=e=>{this.removeAttribute(`open`),this.open=!1,e&&e.stopPropagation()}}static{this.styles=p`
|
|
6846
6846
|
:host {
|
|
6847
6847
|
display: block;
|
|
6848
6848
|
position: relative;
|
|
@@ -6875,7 +6875,7 @@
|
|
|
6875
6875
|
<div role="menu" class="submenu${this.open?` open`:``}">
|
|
6876
6876
|
<slot></slot>
|
|
6877
6877
|
</div>
|
|
6878
|
-
`}},
|
|
6878
|
+
`}},P([g({type:Boolean,reflect:!0})],du.prototype,`open`,void 0),du=P([a(`scb-options-sub-menu`)],du)})),pu,mu=t((()=>{C(),y(),uu(),fu(),F(),pu=class extends S{constructor(...e){super(...e),this.open=!1,this.size=`large`,this.inSb=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__lastTriggerEl=null,this.__onViewportChange=()=>{this.open&&this.__positionToTrigger()},this.__onDocumentClick=e=>{let t=this.__getActionFromEvent(e);if(t){t===`open`&&(this.__setOpen(!0),this.dispatchEvent(new CustomEvent(`open`,{bubbles:!0,composed:!0}))),t===`close`&&(this.__setOpen(!1),this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))),t===`toggle`&&(this.__setOpen(!this.open),this.dispatchEvent(new CustomEvent(`toggle`,{bubbles:!0,composed:!0}))),e.stopPropagation();return}if(!this.inSb&&this.open&&!this.isClickInScbMenu(e)){this.__setOpen(!1);return}},this.__onDocumentKeydown=e=>{if(this.open&&e.key===`Escape`){this.__setOpen(!1);return}}}static{this.styles=p`
|
|
6879
6879
|
:host {
|
|
6880
6880
|
position: absolute;
|
|
6881
6881
|
display: block;
|
|
@@ -6962,7 +6962,7 @@
|
|
|
6962
6962
|
>
|
|
6963
6963
|
<slot></slot>
|
|
6964
6964
|
</div>
|
|
6965
|
-
`}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this.__onDocumentClick,!1),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),window.addEventListener(`resize`,this.__onViewportChange,{passive:!0}),window.addEventListener(`scroll`,this.__onViewportChange,{passive:!0,capture:!0})}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),window.removeEventListener(`resize`,this.__onViewportChange),window.removeEventListener(`scroll`,this.__onViewportChange,!0),super.disconnectedCallback()}__setOpen(e){this.open=e}__getActionFromEvent(e){if(!this.id)return null;let t=e.composedPath();for(let e of t)if(e instanceof Element){if(e.getAttribute(`data-menu-open`)===this.id)return this.__lastTriggerEl=e,`open`;if(e.getAttribute(`data-menu-close`)===this.id)return this.__lastTriggerEl=e,`close`;if(e.getAttribute(`data-menu-toggle`)===this.id||e.getAttribute(`aria-controls`)===this.id)return this.__lastTriggerEl=e,`toggle`}return null}isClickInScbMenu(e){return e.composedPath().some(e=>e instanceof Element&&(e.tagName===`SCB-OPTIONS-MENU`||e.tagName===`SCB-OPTIONS-SUB-MENU`))}updated(e){e.has(`open`)&&(this.__applyOpenSideEffects(),this.open?this.dispatchEvent(new CustomEvent(`open`,{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing()}__applyOpenSideEffects(){this.__updateTriggersExpanded(),this.open?this.__positionToTrigger():this.__restoreFocusToTrigger()}__positionToTrigger(){if(!this.open||!this.__lastTriggerEl)return;let e=this.__lastTriggerEl,t=this.shadowRoot?.querySelector(`.scb-options-menu-panel`);t&&requestAnimationFrame(()=>{if(!this.open)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=n.left,s=n.bottom+4,c=r.width,l=r.height;o+c>i-8&&(o=Math.max(8,i-8-c)),o<8&&(o=8);let u=`top`;if(s+l>a-8){let e=n.top-4-l;e>=8&&(s=e,u=`bottom`)}this.style.position=`fixed`,this.style.left=`${Math.round(o)}px`,this.style.top=`${Math.round(s)}px`,this.style.setProperty(`--scb-options-menu-transform-origin`,u)})}__restoreFocusToTrigger(){this.__lastTriggerEl&&requestAnimationFrame(()=>{this.__lastTriggerEl?.focus?.()})}__updateTriggersExpanded(){if(!this.id)return;let e=String(this.open),t=t=>{t.getAttribute(`aria-controls`)===this.id&&t.setAttribute(`aria-expanded`,e)};this.__lastTriggerEl&&t(this.__lastTriggerEl),document.querySelectorAll(`[aria-controls="${this.id}"], [data-menu-open="${this.id}"], [data-menu-close="${this.id}"], [data-menu-toggle="${this.id}"]`).forEach(t)}__applySpacing(){let e=this.__mapSpacingToken(this.spacing),t=this.__mapSpacingToken(this.spacingTop)??e,n=this.__mapSpacingToken(this.spacingBottom)??e,r=this.__mapSpacingToken(this.spacingLeft),i=this.__mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-options-menu-spacing-block-start`,t):this.style.removeProperty(`--scb-options-menu-spacing-block-start`),n?this.style.setProperty(`--scb-options-menu-spacing-block-end`,n):this.style.removeProperty(`--scb-options-menu-spacing-block-end`),r?this.style.setProperty(`--scb-options-menu-spacing-inline-start`,r):this.style.removeProperty(`--scb-options-menu-spacing-inline-start`),i?this.style.setProperty(`--scb-options-menu-spacing-inline-end`,i):this.style.removeProperty(`--scb-options-menu-spacing-inline-end`)}__mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}},
|
|
6965
|
+
`}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this.__onDocumentClick,!1),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),window.addEventListener(`resize`,this.__onViewportChange,{passive:!0}),window.addEventListener(`scroll`,this.__onViewportChange,{passive:!0,capture:!0})}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),window.removeEventListener(`resize`,this.__onViewportChange),window.removeEventListener(`scroll`,this.__onViewportChange,!0),super.disconnectedCallback()}__setOpen(e){this.open=e}__getActionFromEvent(e){if(!this.id)return null;let t=e.composedPath();for(let e of t)if(e instanceof Element){if(e.getAttribute(`data-menu-open`)===this.id)return this.__lastTriggerEl=e,`open`;if(e.getAttribute(`data-menu-close`)===this.id)return this.__lastTriggerEl=e,`close`;if(e.getAttribute(`data-menu-toggle`)===this.id||e.getAttribute(`aria-controls`)===this.id)return this.__lastTriggerEl=e,`toggle`}return null}isClickInScbMenu(e){return e.composedPath().some(e=>e instanceof Element&&(e.tagName===`SCB-OPTIONS-MENU`||e.tagName===`SCB-OPTIONS-SUB-MENU`))}updated(e){e.has(`open`)&&(this.__applyOpenSideEffects(),this.open?this.dispatchEvent(new CustomEvent(`open`,{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing()}__applyOpenSideEffects(){this.__updateTriggersExpanded(),this.open?this.__positionToTrigger():this.__restoreFocusToTrigger()}__positionToTrigger(){if(!this.open||!this.__lastTriggerEl)return;let e=this.__lastTriggerEl,t=this.shadowRoot?.querySelector(`.scb-options-menu-panel`);t&&requestAnimationFrame(()=>{if(!this.open)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=n.left,s=n.bottom+4,c=r.width,l=r.height;o+c>i-8&&(o=Math.max(8,i-8-c)),o<8&&(o=8);let u=`top`;if(s+l>a-8){let e=n.top-4-l;e>=8&&(s=e,u=`bottom`)}this.style.position=`fixed`,this.style.left=`${Math.round(o)}px`,this.style.top=`${Math.round(s)}px`,this.style.setProperty(`--scb-options-menu-transform-origin`,u)})}__restoreFocusToTrigger(){this.__lastTriggerEl&&requestAnimationFrame(()=>{this.__lastTriggerEl?.focus?.()})}__updateTriggersExpanded(){if(!this.id)return;let e=String(this.open),t=t=>{t.getAttribute(`aria-controls`)===this.id&&t.setAttribute(`aria-expanded`,e)};this.__lastTriggerEl&&t(this.__lastTriggerEl),document.querySelectorAll(`[aria-controls="${this.id}"], [data-menu-open="${this.id}"], [data-menu-close="${this.id}"], [data-menu-toggle="${this.id}"]`).forEach(t)}__applySpacing(){let e=this.__mapSpacingToken(this.spacing),t=this.__mapSpacingToken(this.spacingTop)??e,n=this.__mapSpacingToken(this.spacingBottom)??e,r=this.__mapSpacingToken(this.spacingLeft),i=this.__mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-options-menu-spacing-block-start`,t):this.style.removeProperty(`--scb-options-menu-spacing-block-start`),n?this.style.setProperty(`--scb-options-menu-spacing-block-end`,n):this.style.removeProperty(`--scb-options-menu-spacing-block-end`),r?this.style.setProperty(`--scb-options-menu-spacing-inline-start`,r):this.style.removeProperty(`--scb-options-menu-spacing-inline-start`),i?this.style.setProperty(`--scb-options-menu-spacing-inline-end`,i):this.style.removeProperty(`--scb-options-menu-spacing-inline-end`)}__mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}},P([g({type:Boolean,reflect:!0})],pu.prototype,`open`,void 0),P([g({type:String,reflect:!0})],pu.prototype,`size`,void 0),P([g({type:Boolean,attribute:!1})],pu.prototype,`inSb`,void 0),P([g({type:String,reflect:!0})],pu.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],pu.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],pu.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],pu.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],pu.prototype,`spacingRight`,void 0),pu=P([a(`scb-options-menu`)],pu)})),hu=n({ScbDropdown:()=>q}),gu,q,_u=t((()=>{C(),y(),w(),k(),Gc(),Vc(),mu(),F(),gu=()=>{if(typeof window>`u`||typeof document>`u`||!(`customElements`in window)||document.head.querySelector(`style[data-scb-dropdown-pre-upgrade]`))return;let e=document.createElement(`style`);e.setAttribute(`data-scb-dropdown-pre-upgrade`,``),e.textContent=`
|
|
6966
6966
|
scb-dropdown:not(:defined) {
|
|
6967
6967
|
display: inline-block;
|
|
6968
6968
|
position: relative;
|
|
@@ -6986,7 +6986,7 @@
|
|
|
6986
6986
|
scb-dropdown:not(:defined) > * {
|
|
6987
6987
|
display: none;
|
|
6988
6988
|
}
|
|
6989
|
-
`,document.head.appendChild(e);let t=e=>{let t=String(e??``).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t},n=e=>{let n=t(e.getAttribute(`spacing`)),r=t(e.getAttribute(`spacing-top`))??n,i=t(e.getAttribute(`spacing-bottom`))??n,a=t(e.getAttribute(`spacing-left`)),o=t(e.getAttribute(`spacing-right`));r?e.style.setProperty(`--scb-dropdown-spacing-block-start`,r):e.style.removeProperty(`--scb-dropdown-spacing-block-start`),i?e.style.setProperty(`--scb-dropdown-spacing-block-end`,i):e.style.removeProperty(`--scb-dropdown-spacing-block-end`),a?e.style.setProperty(`--scb-dropdown-spacing-inline-start`,a):e.style.removeProperty(`--scb-dropdown-spacing-inline-start`),o?e.style.setProperty(`--scb-dropdown-spacing-inline-end`,o):e.style.removeProperty(`--scb-dropdown-spacing-inline-end`)};document.querySelectorAll(`scb-dropdown`).forEach(n);let r=new MutationObserver(e=>{for(let t of e){if(t.type===`attributes`){let e=t.target;e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-dropdown`&&n(e);continue}if(t.type===`childList`){let e=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let t of e)if(t instanceof HTMLElement){if(t.tagName.toLowerCase()===`scb-dropdown`){n(t);continue}t.querySelectorAll?.(`scb-dropdown`).forEach(e=>{e instanceof HTMLElement&&n(e)})}}}});r.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`spacing`,`spacing-top`,`spacing-bottom`,`spacing-left`,`spacing-right`]}),customElements.whenDefined(`scb-dropdown`).then(()=>{r.disconnect()})},
|
|
6989
|
+
`,document.head.appendChild(e);let t=e=>{let t=String(e??``).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t},n=e=>{let n=t(e.getAttribute(`spacing`)),r=t(e.getAttribute(`spacing-top`))??n,i=t(e.getAttribute(`spacing-bottom`))??n,a=t(e.getAttribute(`spacing-left`)),o=t(e.getAttribute(`spacing-right`));r?e.style.setProperty(`--scb-dropdown-spacing-block-start`,r):e.style.removeProperty(`--scb-dropdown-spacing-block-start`),i?e.style.setProperty(`--scb-dropdown-spacing-block-end`,i):e.style.removeProperty(`--scb-dropdown-spacing-block-end`),a?e.style.setProperty(`--scb-dropdown-spacing-inline-start`,a):e.style.removeProperty(`--scb-dropdown-spacing-inline-start`),o?e.style.setProperty(`--scb-dropdown-spacing-inline-end`,o):e.style.removeProperty(`--scb-dropdown-spacing-inline-end`)};document.querySelectorAll(`scb-dropdown`).forEach(n);let r=new MutationObserver(e=>{for(let t of e){if(t.type===`attributes`){let e=t.target;e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-dropdown`&&n(e);continue}if(t.type===`childList`){let e=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let t of e)if(t instanceof HTMLElement){if(t.tagName.toLowerCase()===`scb-dropdown`){n(t);continue}t.querySelectorAll?.(`scb-dropdown`).forEach(e=>{e instanceof HTMLElement&&n(e)})}}}});r.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`spacing`,`spacing-top`,`spacing-bottom`,`spacing-left`,`spacing-right`]}),customElements.whenDefined(`scb-dropdown`).then(()=>{r.disconnect()})},gu(),q=class extends S{constructor(...e){super(...e),this.label=`Dropdown`,this.variant=`filled`,this.size=`medium`,this.open=!1,this.disabled=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.menuGap=`3`,this.width=null,this.minWidth=null,this.maxWidth=null,this.dataIndex=null,this.ariaCurrent=null,this._slottedMenuEl=null,this._openSettledTimer=null,this._menuCloseTimer=null,this._panelResizeObserver=null,this._panelHeightSyncRaf=null,this._onDocumentClickBound=e=>{if(!this.open)return;let t=e.composedPath(),n=t.find(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-dropdown`);if(n&&n!==this){this.open=!1;return}t.includes(this)||(this.open=!1)},this._onDocumentKeydownBound=e=>{this.open&&e.key===`Escape`&&(this.open=!1)},this._onSlottedMenuOpen=()=>{this.open||=!0},this._onSlottedMenuClose=()=>{this.open&&=!1},this._onSlotChange=()=>{this._syncSlottedMenu(),this._applyPanelSizing(),this._applyInertByOpen(),this.requestUpdate()},this._onTriggerClick=e=>{this.hasAttribute(`as-tab`)||e.stopPropagation(),!this.disabled&&(this.open=!this.open)}}static{this.styles=p`
|
|
6990
6990
|
:host {
|
|
6991
6991
|
display: inline-block;
|
|
6992
6992
|
position: relative;
|
|
@@ -7272,7 +7272,7 @@
|
|
|
7272
7272
|
</div>
|
|
7273
7273
|
</div>
|
|
7274
7274
|
</div>
|
|
7275
|
-
`}},
|
|
7275
|
+
`}},P([g({type:String})],q.prototype,`label`,void 0),P([g({type:String})],q.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],q.prototype,`size`,void 0),P([g({type:Boolean,reflect:!0})],q.prototype,`open`,void 0),P([g({type:Boolean,reflect:!0})],q.prototype,`disabled`,void 0),P([g({type:String,reflect:!0})],q.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],q.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],q.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],q.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],q.prototype,`spacingRight`,void 0),P([g({type:String,attribute:`menu-gap`})],q.prototype,`menuGap`,void 0),P([g({type:String})],q.prototype,`width`,void 0),P([g({type:String,attribute:`min-width`})],q.prototype,`minWidth`,void 0),P([g({type:String,attribute:`max-width`})],q.prototype,`maxWidth`,void 0),P([g({type:String,attribute:`data-index`})],q.prototype,`dataIndex`,void 0),P([g({type:String,attribute:`aria-current`})],q.prototype,`ariaCurrent`,void 0),P([v(`[data-scb-dropdown-trigger]`)],q.prototype,`_triggerEl`,void 0),P([v(`slot`)],q.prototype,`_slotEl`,void 0),P([v(`.panel-surface`)],q.prototype,`_panelSurfaceEl`,void 0),P([v(`.panel-inner`)],q.prototype,`_panelInnerEl`,void 0),q=P([a(`scb-dropdown`)],q)}));_u(),C(),y(),k(),F();var vu=class extends S{constructor(...e){super(...e),this.icon=`edit`,this.label=`Redigera`,this.ariaLabel=`Redigera`,this.size=`small`,this.type=`regular`,this.disabled=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.#e=e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())},this.#t=e=>{this.disabled&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopImmediatePropagation())}}static{this.styles=p`
|
|
7276
7276
|
:host {
|
|
7277
7277
|
display: inline-block;
|
|
7278
7278
|
|
|
@@ -7379,7 +7379,7 @@
|
|
|
7379
7379
|
>
|
|
7380
7380
|
${this.icon?b`<md-icon slot="icon">${this.icon}</md-icon>`:x}
|
|
7381
7381
|
</md-fab>
|
|
7382
|
-
`}render(){return this.__renderMd()}};
|
|
7382
|
+
`}render(){return this.__renderMd()}};P([g({type:String})],vu.prototype,`icon`,void 0),P([g({type:String})],vu.prototype,`label`,void 0),P([g({type:String,attribute:`aria-label`})],vu.prototype,`ariaLabel`,void 0),P([g({type:String,reflect:!0})],vu.prototype,`size`,void 0),P([g({type:String,reflect:!0})],vu.prototype,`type`,void 0),P([g({type:Boolean,reflect:!0})],vu.prototype,`disabled`,void 0),P([g({type:String,reflect:!0})],vu.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],vu.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],vu.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],vu.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],vu.prototype,`spacingRight`,void 0),vu=P([a(`scb-fab`)],vu),C(),y(),F();var yu=class extends S{constructor(...e){super(...e),this.title=``,this.factCardTitle=``,this.subtitle=``,this.supportingText=``,this.__hasHeading=!1,this.__hasSubtitle=!1,this.__hasSupportingText=!1,this.__hasLinks=!1}get#e(){return this.factCardTitle||this.title}static{this.styles=p`
|
|
7383
7383
|
:host {
|
|
7384
7384
|
display: flex;
|
|
7385
7385
|
flex-direction: column;
|
|
@@ -7467,7 +7467,7 @@
|
|
|
7467
7467
|
<div class="content links" ?hidden=${!this.__hasLinks}>
|
|
7468
7468
|
<slot @slotchange=${()=>this.__syncSlot(`default`)}></slot>
|
|
7469
7469
|
</div>
|
|
7470
|
-
`}firstUpdated(){this.__syncAllSlots()}__syncAllSlots(){this.__syncSlot(`heading`),this.__syncSlot(`subtitle`),this.__syncSlot(`supporting-text`),this.__syncSlot(`default`)}__syncSlot(e){let t=e===`default`?`slot:not([name])`:`slot[name="${e}"]`,n=!!this.renderRoot.querySelector(t)?.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():!0);if(e===`heading`){this.__hasHeading=n;return}if(e===`subtitle`){this.__hasSubtitle=n;return}if(e===`supporting-text`){this.__hasSupportingText=n;return}this.__hasLinks=n}};
|
|
7470
|
+
`}firstUpdated(){this.__syncAllSlots()}__syncAllSlots(){this.__syncSlot(`heading`),this.__syncSlot(`subtitle`),this.__syncSlot(`supporting-text`),this.__syncSlot(`default`)}__syncSlot(e){let t=e===`default`?`slot:not([name])`:`slot[name="${e}"]`,n=!!this.renderRoot.querySelector(t)?.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():!0);if(e===`heading`){this.__hasHeading=n;return}if(e===`subtitle`){this.__hasSubtitle=n;return}if(e===`supporting-text`){this.__hasSupportingText=n;return}this.__hasLinks=n}};P([g({type:String,reflect:!0,attribute:`title`})],yu.prototype,`title`,void 0),P([g({type:String,reflect:!0,attribute:`fact-card-title`})],yu.prototype,`factCardTitle`,void 0),P([g({type:String,reflect:!0,attribute:`subtitle`})],yu.prototype,`subtitle`,void 0),P([g({type:String,reflect:!0,attribute:`supporting-text`})],yu.prototype,`supportingText`,void 0),P([_()],yu.prototype,`__hasHeading`,void 0),P([_()],yu.prototype,`__hasSubtitle`,void 0),P([_()],yu.prototype,`__hasSupportingText`,void 0),P([_()],yu.prototype,`__hasLinks`,void 0),yu=P([a(`scb-fact-card-content`)],yu),C(),y(),fl(),F();var bu,xu={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},J=class extends S{static{bu=this}constructor(...e){super(...e),this.__onCloseClick=e=>{e.stopPropagation(),this.__setOpen(!1)},this.variant=`filled`,this.size=`large`,this.title=``,this.subtitle=``,this.supportingText=``,this.icon=``,this.showCloseButton=!1,this.__hasIconSlot=!1,this.open=!0,this.__lastTriggerEl=null,this.sizing=``,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.__onIconSlotChange=()=>{let e=this.renderRoot.querySelector(`slot[name="icon"]`);this.__hasIconSlot=!!e?.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():!0)}}static{this.__iconLoaded=!1}static{this.__instances=new Map}static{this.__docListenerAttached=!1}static __handleDocClick(e){let t=e.composedPath();for(let e of t){if(!(e instanceof Element))continue;let t=e.getAttribute(`data-fact-card-toggle`)||e.getAttribute(`aria-controls`);if(!t)continue;let n=bu.__instances.get(t);if(!n){bu.__instances.delete(t);continue}n.__lastTriggerEl=e,n.__setOpen(!n.open);break}}static __ensureDocListener(){bu.__docListenerAttached||(document.addEventListener(`click`,bu.__handleDocClick,!0),bu.__docListenerAttached=!0)}static __maybeRemoveDocListener(){bu.__docListenerAttached&&bu.__instances.size===0&&(document.removeEventListener(`click`,bu.__handleDocClick,!0),bu.__docListenerAttached=!1)}connectedCallback(){super.connectedCallback(),this.id&&bu.__instances.set(this.id,this),bu.__ensureDocListener()}disconnectedCallback(){this.id&&bu.__instances.delete(this.id),bu.__maybeRemoveDocListener(),super.disconnectedCallback()}updated(e){e.has(`open`)&&this.__updateTriggersExpanded(),e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute(`aria-controls`)&&e.setAttribute(`aria-expanded`,String(this.open))})}__setOpen(e){let t=this.open;t!==e&&(this.open=e,this.dispatchEvent(new CustomEvent(`openchange`,{bubbles:!0,composed:!0,detail:{open:this.open}})),e&&!t?this.dispatchEvent(new CustomEvent(`open`,{bubbles:!0,composed:!0})):!e&&t&&this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0})))}static{this.styles=p`
|
|
7471
7471
|
:host {
|
|
7472
7472
|
--scb-fact-card-icon-overhang: 40px;
|
|
7473
7473
|
display: block;
|
|
@@ -7699,9 +7699,9 @@
|
|
|
7699
7699
|
</div>
|
|
7700
7700
|
</div>
|
|
7701
7701
|
</div>
|
|
7702
|
-
`}async firstUpdated(){this.#e(),
|
|
7702
|
+
`}async firstUpdated(){this.#e(),bu.__iconLoaded||(await Promise.resolve().then(()=>(k(),ea)),bu.__iconLoaded=!0)}__hasLightDomSlot(e){return Array.from(this.children).some(t=>t.getAttribute(`slot`)===e)}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop),n=this.mapSpacingToken(this.spacingBottom),r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight),a=t??e,o=n??e;a?this.style.setProperty(`--scb-fact-card-spacing-block-start`,a):this.style.removeProperty(`--scb-fact-card-spacing-block-start`),o?this.style.setProperty(`--scb-fact-card-spacing-block-end`,o):this.style.removeProperty(`--scb-fact-card-spacing-block-end`),r?this.style.setProperty(`--scb-fact-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-fact-card-spacing-inline-start`),i?this.style.setProperty(`--scb-fact-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-fact-card-spacing-inline-end`)}};P([g({type:String})],J.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],J.prototype,`size`,void 0),P([g({type:String,attribute:`title`})],J.prototype,`title`,void 0),P([g({type:String,attribute:`subtitle`})],J.prototype,`subtitle`,void 0),P([g({type:String,attribute:`supporting-text`})],J.prototype,`supportingText`,void 0),P([g({type:String})],J.prototype,`icon`,void 0),P([g({type:Boolean,attribute:`show-close-button`})],J.prototype,`showCloseButton`,void 0),P([_()],J.prototype,`__hasIconSlot`,void 0),P([g({type:Boolean,reflect:!0})],J.prototype,`open`,void 0),P([g({type:String,reflect:!0,converter:xu})],J.prototype,`sizing`,void 0),P([g({type:String,reflect:!0})],J.prototype,`width`,void 0),P([g({type:String,reflect:!0,attribute:`max-width`})],J.prototype,`maxWidth`,void 0),P([g({type:String,reflect:!0})],J.prototype,`height`,void 0),P([g({type:String,reflect:!0,attribute:`max-height`})],J.prototype,`maxHeight`,void 0),P([g({type:String,reflect:!0})],J.prototype,`spacing`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-top`})],J.prototype,`spacingTop`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-bottom`})],J.prototype,`spacingBottom`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-left`})],J.prototype,`spacingLeft`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-right`})],J.prototype,`spacingRight`,void 0),J=bu=P([a(`scb-fact-card`)],J),C(),y(),F();var Su=class extends S{constructor(...e){super(...e),this.title=``}static{this.styles=p`
|
|
7703
7703
|
:host { display: none; }
|
|
7704
|
-
`}render(){return b`<slot></slot>`}};
|
|
7704
|
+
`}render(){return b`<slot></slot>`}};P([g({type:String,reflect:!0})],Su.prototype,`title`,void 0),Su=P([a(`scb-footer-section`)],Su);var Cu=n({ScbGridItem:()=>Tu}),wu,Tu,Eu=t((()=>{C(),y(),F(),wu={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Tu=class extends S{constructor(...e){super(...e),this.fit=!1}static{this.styles=p`
|
|
7705
7705
|
:host {
|
|
7706
7706
|
box-sizing: border-box;
|
|
7707
7707
|
display: block;
|
|
@@ -7732,7 +7732,7 @@
|
|
|
7732
7732
|
block-size: 100%;
|
|
7733
7733
|
inline-size: 100%;
|
|
7734
7734
|
}
|
|
7735
|
-
`}firstUpdated(){this.#e()}updated(){this.#e()}#e(){this.#t(`--col-span`,this.hasAttribute(`col-span`)?String(this.colSpan):null),this.#t(`--col-span-compact`,this.hasAttribute(`col-span-compact`)?String(this.colSpanCompact):null),this.#t(`--col-span-medium`,this.hasAttribute(`col-span-medium`)?String(this.colSpanMedium):null),this.#t(`--col-span-expanded`,this.hasAttribute(`col-span-expanded`)?String(this.colSpanExpanded):null),this.#t(`--row-rule`,this.hasAttribute(`row-span`)?`span ${this.rowSpan}`:null),this.#t(`--row-rule-compact`,this.hasAttribute(`row-span-compact`)?`span ${this.rowSpanCompact}`:null),this.#t(`--row-rule-medium`,this.hasAttribute(`row-span-medium`)?`span ${this.rowSpanMedium}`:null),this.#t(`--row-rule-expanded`,this.hasAttribute(`row-span-expanded`)?`span ${this.rowSpanExpanded}`:null),this.align?(this.style.setProperty(`--scb-grid-item-align`,this.align),this.style.setProperty(`align-self`,this.align)):(this.style.setProperty(`--scb-grid-item-align`,`initial`),this.style.removeProperty(`align-self`)),this.justify?(this.style.setProperty(`--scb-grid-item-justify`,this.justify),this.style.setProperty(`justify-self`,this.justify)):(this.style.setProperty(`--scb-grid-item-justify`,`initial`),this.style.removeProperty(`justify-self`))}#t(e,t){this.style.setProperty(e,t===null||t===``?`initial`:t)}render(){return b`<slot></slot>`}}
|
|
7735
|
+
`}firstUpdated(){this.#e()}updated(){this.#e()}#e(){this.#t(`--col-span`,this.hasAttribute(`col-span`)?String(this.colSpan):null),this.#t(`--col-span-compact`,this.hasAttribute(`col-span-compact`)?String(this.colSpanCompact):null),this.#t(`--col-span-medium`,this.hasAttribute(`col-span-medium`)?String(this.colSpanMedium):null),this.#t(`--col-span-expanded`,this.hasAttribute(`col-span-expanded`)?String(this.colSpanExpanded):null),this.#t(`--row-rule`,this.hasAttribute(`row-span`)?`span ${this.rowSpan}`:null),this.#t(`--row-rule-compact`,this.hasAttribute(`row-span-compact`)?`span ${this.rowSpanCompact}`:null),this.#t(`--row-rule-medium`,this.hasAttribute(`row-span-medium`)?`span ${this.rowSpanMedium}`:null),this.#t(`--row-rule-expanded`,this.hasAttribute(`row-span-expanded`)?`span ${this.rowSpanExpanded}`:null),this.align?(this.style.setProperty(`--scb-grid-item-align`,this.align),this.style.setProperty(`align-self`,this.align)):(this.style.setProperty(`--scb-grid-item-align`,`initial`),this.style.removeProperty(`align-self`)),this.justify?(this.style.setProperty(`--scb-grid-item-justify`,this.justify),this.style.setProperty(`justify-self`,this.justify)):(this.style.setProperty(`--scb-grid-item-justify`,`initial`),this.style.removeProperty(`justify-self`))}#t(e,t){this.style.setProperty(e,t===null||t===``?`initial`:t)}render(){return b`<slot></slot>`}},P([g({type:Number,attribute:`col-span`,reflect:!0})],Tu.prototype,`colSpan`,void 0),P([g({type:Number,attribute:`col-span-compact`,reflect:!0})],Tu.prototype,`colSpanCompact`,void 0),P([g({type:Number,attribute:`col-span-medium`,reflect:!0})],Tu.prototype,`colSpanMedium`,void 0),P([g({type:Number,attribute:`col-span-expanded`,reflect:!0})],Tu.prototype,`colSpanExpanded`,void 0),P([g({type:Number,attribute:`row-span`,reflect:!0})],Tu.prototype,`rowSpan`,void 0),P([g({type:Number,attribute:`row-span-compact`,reflect:!0})],Tu.prototype,`rowSpanCompact`,void 0),P([g({type:Number,attribute:`row-span-medium`,reflect:!0})],Tu.prototype,`rowSpanMedium`,void 0),P([g({type:Number,attribute:`row-span-expanded`,reflect:!0})],Tu.prototype,`rowSpanExpanded`,void 0),P([g({type:String,reflect:!0})],Tu.prototype,`align`,void 0),P([g({type:String,reflect:!0})],Tu.prototype,`justify`,void 0),P([g({type:Boolean,reflect:!0,converter:wu})],Tu.prototype,`fit`,void 0),Tu=P([a(`scb-grid-item`)],Tu)})),Du,Ou,ku=t((()=>{C(),y(),F(),Du={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Ou=class extends S{constructor(...e){super(...e),this.direction=`column`,this.gap=``,this.rowGap=``,this.columnGap=``,this.align=`stretch`,this.justify=`start`,this.wrap=!1,this.inline=!1}static{this.styles=p`
|
|
7736
7736
|
:host {
|
|
7737
7737
|
box-sizing: border-box;
|
|
7738
7738
|
display: block;
|
|
@@ -7764,7 +7764,7 @@
|
|
|
7764
7764
|
:host([direction="row"]) ::slotted(*) {
|
|
7765
7765
|
flex: var(--scb-stack-item-flex, 0 0 auto);
|
|
7766
7766
|
}
|
|
7767
|
-
`}firstUpdated(){this.#e()}updated(){this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};let t=e.trim().split(/\s+/);if(t.length===1){let e=this.mapSpacingToken(t[0]);return{row:e,col:e}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}#e(){this.style.setProperty(`--scb-stack-direction`,this.direction);let e=`var(--spacing-5, 16px)`,t=this.parseGapShorthand(this.gap),n=this.mapSpacingToken(this.rowGap)??t.row??e,r=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty(`--scb-stack-gap`,`${n}`),this.style.setProperty(`--scb-stack-row-gap`,n),this.style.setProperty(`--scb-stack-column-gap`,r),this.style.setProperty(`--scb-stack-align`,{start:`flex-start`,center:`center`,end:`flex-end`,stretch:`stretch`,baseline:`baseline`}[this.align]??`stretch`),this.style.setProperty(`--scb-stack-justify`,{start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`}[this.justify]??`flex-start`),this.style.setProperty(`--scb-stack-wrap`,this.wrap?`wrap`:`nowrap`)}render(){return b`<div class="base"><slot></slot></div>`}}
|
|
7767
|
+
`}firstUpdated(){this.#e()}updated(){this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};let t=e.trim().split(/\s+/);if(t.length===1){let e=this.mapSpacingToken(t[0]);return{row:e,col:e}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}#e(){this.style.setProperty(`--scb-stack-direction`,this.direction);let e=`var(--spacing-5, 16px)`,t=this.parseGapShorthand(this.gap),n=this.mapSpacingToken(this.rowGap)??t.row??e,r=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty(`--scb-stack-gap`,`${n}`),this.style.setProperty(`--scb-stack-row-gap`,n),this.style.setProperty(`--scb-stack-column-gap`,r),this.style.setProperty(`--scb-stack-align`,{start:`flex-start`,center:`center`,end:`flex-end`,stretch:`stretch`,baseline:`baseline`}[this.align]??`stretch`),this.style.setProperty(`--scb-stack-justify`,{start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`}[this.justify]??`flex-start`),this.style.setProperty(`--scb-stack-wrap`,this.wrap?`wrap`:`nowrap`)}render(){return b`<div class="base"><slot></slot></div>`}},P([g({type:String,reflect:!0})],Ou.prototype,`direction`,void 0),P([g({type:String,reflect:!0})],Ou.prototype,`gap`,void 0),P([g({type:String,attribute:`row-gap`,reflect:!0})],Ou.prototype,`rowGap`,void 0),P([g({type:String,attribute:`column-gap`,reflect:!0})],Ou.prototype,`columnGap`,void 0),P([g({type:String,reflect:!0})],Ou.prototype,`align`,void 0),P([g({type:String,reflect:!0})],Ou.prototype,`justify`,void 0),P([g({type:Boolean,reflect:!0,converter:Du})],Ou.prototype,`wrap`,void 0),P([g({type:Boolean,reflect:!0,converter:Du})],Ou.prototype,`inline`,void 0),Ou=P([a(`scb-stack`)],Ou)})),Au=n({ScbGrid:()=>ju}),ju,Mu=t((()=>{C(),y(),Eu(),ku(),F(),ju=class extends S{constructor(...e){super(...e),this.colsCompact=4,this.colsMedium=8,this.colsExpanded=12,this.gap=``,this.rowGap=``,this.columnGap=``,this.alignItems=`stretch`,this.justifyItems=`stretch`,this.paddingInline=``,this.paddingBlock=``,this.maxWidth=``,this.autoRows=``}static{this.styles=p`
|
|
7768
7768
|
:host {
|
|
7769
7769
|
box-sizing: border-box;
|
|
7770
7770
|
display: block;
|
|
@@ -7862,7 +7862,7 @@
|
|
|
7862
7862
|
}
|
|
7863
7863
|
}
|
|
7864
7864
|
}
|
|
7865
|
-
`}firstUpdated(){this.#e()}updated(){this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};let t=e.trim().split(/\s+/);if(t.length===1){let e=this.mapSpacingToken(t[0]);return{row:e,col:e}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}#e(){this.style.setProperty(`--scb-grid-cols-compact`,String(this.colsCompact)),this.style.setProperty(`--scb-grid-cols-medium`,String(this.colsMedium)),this.style.setProperty(`--scb-grid-cols-expanded`,String(this.colsExpanded));let e=`var(--spacing-7, 24px)`,t=this.parseGapShorthand(this.gap),n=this.mapSpacingToken(this.rowGap)??t.row??e,r=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty(`--scb-grid-row-gap`,n),this.style.setProperty(`--scb-grid-column-gap`,r),this.style.setProperty(`--scb-grid-gap`,`${n} ${r}`),this.style.setProperty(`--scb-grid-align-items`,this.alignItems),this.style.setProperty(`--scb-grid-justify-items`,this.justifyItems);let i=this.mapSpacingToken(this.paddingInline),a=this.mapSpacingToken(this.paddingBlock);this.style.setProperty(`--scb-grid-max-width`,this.maxWidth||`1440px`),this.style.setProperty(`--scb-grid-padding-inline`,i??`0`),this.style.setProperty(`--scb-grid-padding-block`,a??`0`),this.style.setProperty(`--scb-grid-auto-rows`,this.autoRows||`auto`)}render(){return b`<div class="grid"><slot></slot></div>`}}
|
|
7865
|
+
`}firstUpdated(){this.#e()}updated(){this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};let t=e.trim().split(/\s+/);if(t.length===1){let e=this.mapSpacingToken(t[0]);return{row:e,col:e}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}#e(){this.style.setProperty(`--scb-grid-cols-compact`,String(this.colsCompact)),this.style.setProperty(`--scb-grid-cols-medium`,String(this.colsMedium)),this.style.setProperty(`--scb-grid-cols-expanded`,String(this.colsExpanded));let e=`var(--spacing-7, 24px)`,t=this.parseGapShorthand(this.gap),n=this.mapSpacingToken(this.rowGap)??t.row??e,r=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty(`--scb-grid-row-gap`,n),this.style.setProperty(`--scb-grid-column-gap`,r),this.style.setProperty(`--scb-grid-gap`,`${n} ${r}`),this.style.setProperty(`--scb-grid-align-items`,this.alignItems),this.style.setProperty(`--scb-grid-justify-items`,this.justifyItems);let i=this.mapSpacingToken(this.paddingInline),a=this.mapSpacingToken(this.paddingBlock);this.style.setProperty(`--scb-grid-max-width`,this.maxWidth||`1440px`),this.style.setProperty(`--scb-grid-padding-inline`,i??`0`),this.style.setProperty(`--scb-grid-padding-block`,a??`0`),this.style.setProperty(`--scb-grid-auto-rows`,this.autoRows||`auto`)}render(){return b`<div class="grid"><slot></slot></div>`}},P([g({type:Number,attribute:`cols-compact`,reflect:!0})],ju.prototype,`colsCompact`,void 0),P([g({type:Number,attribute:`cols-medium`,reflect:!0})],ju.prototype,`colsMedium`,void 0),P([g({type:Number,attribute:`cols-expanded`,reflect:!0})],ju.prototype,`colsExpanded`,void 0),P([g({type:String,reflect:!0})],ju.prototype,`gap`,void 0),P([g({type:String,attribute:`row-gap`,reflect:!0})],ju.prototype,`rowGap`,void 0),P([g({type:String,attribute:`column-gap`,reflect:!0})],ju.prototype,`columnGap`,void 0),P([g({type:String,attribute:`align-items`,reflect:!0})],ju.prototype,`alignItems`,void 0),P([g({type:String,attribute:`justify-items`,reflect:!0})],ju.prototype,`justifyItems`,void 0),P([g({type:String,attribute:`padding-inline`,reflect:!0})],ju.prototype,`paddingInline`,void 0),P([g({type:String,attribute:`padding-block`,reflect:!0})],ju.prototype,`paddingBlock`,void 0),P([g({type:String,attribute:`max-width`,reflect:!0})],ju.prototype,`maxWidth`,void 0),P([g({type:String,attribute:`auto-rows`,reflect:!0})],ju.prototype,`autoRows`,void 0),ju=P([a(`scb-grid`)],ju)}));C(),y(),Mu(),Eu(),F();var Nu={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Pu=class extends S{constructor(...e){super(...e),this.maxWidth=`1440px`,this.deferPaint=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.sections=[],this.description=`Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.`,this.#e=null,this.#t=``,this.#r=!1}#e;#t;#n;#r;static{this.styles=p`
|
|
7866
7866
|
:host {
|
|
7867
7867
|
display: block;
|
|
7868
7868
|
color: var(--p-100);
|
|
@@ -8090,7 +8090,7 @@
|
|
|
8090
8090
|
</div>
|
|
8091
8091
|
</div>
|
|
8092
8092
|
</footer>
|
|
8093
|
-
`}};
|
|
8093
|
+
`}};P([g({type:String,attribute:`max-width`,reflect:!0,converter:{fromAttribute:e=>{if(e==null)return`1440px`;let t=e.trim();return t===``?`1440px`:/^\d+$/.test(t)?`${t}px`:t}}})],Pu.prototype,`maxWidth`,void 0),P([g({type:Boolean,reflect:!0,attribute:`defer-paint`,converter:Nu})],Pu.prototype,`deferPaint`,void 0),P([g({type:String,reflect:!0})],Pu.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Pu.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Pu.prototype,`spacingBottom`,void 0),P([g({type:Array})],Pu.prototype,`sections`,void 0),P([g({type:String})],Pu.prototype,`description`,void 0),Pu=P([a(`scb-footer`)],Pu),C(),y(),fl(),Gc(),w(),F();var Fu=class extends S{constructor(...e){super(...e),this.variant=`standard`,this.width=`100%`,this.showScrollbar=!1,this.rightScrollButtonLabel=`Scrolla höger`,this.leftScrollButtonLabel=`Scrolla vänster`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.contentFlex=!1,this.internalGap=``,this._canScrollLeft=!1,this._canScrollRight=!1,this.updateScrollButtons=()=>{let e=this.scrollerEl||this.shadowRoot?.querySelector(`.scb-horizontal-scroller`);if(!e){this._canScrollLeft&&=!1,this._canScrollRight&&=!1,this.removeAttribute(`data-scroll-left`),this.removeAttribute(`data-scroll-right`);return}let t=e.scrollLeft>0,n=e.scrollLeft+e.clientWidth<e.scrollWidth-1;this._canScrollLeft!==t&&(this._canScrollLeft=t),this._canScrollRight!==n&&(this._canScrollRight=n),t?this.setAttribute(`data-scroll-left`,``):this.removeAttribute(`data-scroll-left`),n?this.setAttribute(`data-scroll-right`,``):this.removeAttribute(`data-scroll-right`)},this.lastScrollLeft=0,this.isScrolling=!1,this.scrollEndTimeout=null,this.scrollerEl=null,this.slotEl=null,this.sizeObserver=null,this.resizeRaf=null,this.handleScroll=()=>{let e=this.shadowRoot?.querySelector(`.scb-horizontal-scroller`);e&&(this.updateScrollButtons(),this.dispatchCustomEventWithAlias(`scb-scroll`,{scrollLeft:e.scrollLeft}),this.isScrolling||(this.isScrolling=!0,this.dispatchCustomEventWithAlias(`scb-scroll-start`,{scrollLeft:e.scrollLeft})),clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=setTimeout(()=>{this.isScrolling=!1,this.dispatchCustomEventWithAlias(`scb-scroll-end`,{scrollLeft:e.scrollLeft})},120),e.scrollLeft>this.lastScrollLeft?this.dispatchCustomEventWithAlias(`scb-scroll-right`,{scrollLeft:e.scrollLeft}):e.scrollLeft<this.lastScrollLeft&&this.dispatchCustomEventWithAlias(`scb-scroll-left`,{scrollLeft:e.scrollLeft}),this.lastScrollLeft=e.scrollLeft)},this.handleWheel=e=>{let t=this.scrollerEl||this.shadowRoot?.querySelector(`.scb-horizontal-scroller`);if(!t||e.deltaY===0)return;let n=t.scrollLeft,r=n>0,i=n+t.clientWidth<t.scrollWidth-1;!r&&!i||(t.scrollLeft+=e.deltaY,t.scrollLeft!==n&&e.preventDefault())}}static{this.styles=p`
|
|
8094
8094
|
:host {
|
|
8095
8095
|
display: flex;
|
|
8096
8096
|
position: relative;
|
|
@@ -8285,7 +8285,7 @@
|
|
|
8285
8285
|
@click="${()=>this.doScrollBy(this.getScrollStep())}"
|
|
8286
8286
|
></scb-icon-button>
|
|
8287
8287
|
`:``}
|
|
8288
|
-
`}}};
|
|
8288
|
+
`}}};P([g({type:String,reflect:!0})],Fu.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],Fu.prototype,`width`,void 0),P([g({type:Boolean,reflect:!0,attribute:`show-scrollbar`})],Fu.prototype,`showScrollbar`,void 0),P([g({type:String,reflect:!0,attribute:`right-scroll-button-label`})],Fu.prototype,`rightScrollButtonLabel`,void 0),P([g({type:String,reflect:!0,attribute:`left-scroll-button-label`})],Fu.prototype,`leftScrollButtonLabel`,void 0),P([g({type:String,reflect:!0})],Fu.prototype,`spacing`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-top`})],Fu.prototype,`spacingTop`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-bottom`})],Fu.prototype,`spacingBottom`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-left`})],Fu.prototype,`spacingLeft`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-right`})],Fu.prototype,`spacingRight`,void 0),P([g({type:Boolean,reflect:!0,attribute:`content-flex`})],Fu.prototype,`contentFlex`,void 0),P([g({type:String,reflect:!0,attribute:`internal-gap`})],Fu.prototype,`internalGap`,void 0),P([_()],Fu.prototype,`_canScrollLeft`,void 0),P([_()],Fu.prototype,`_canScrollRight`,void 0),Fu=P([a(`scb-horizontal-scroller`)],Fu),C(),y(),F();var Iu,Lu=class extends S{static{Iu=this}constructor(...e){super(...e),this.open=!1,this.variant=`scrim`,this.isStatic=!1,this.ariaLabel=``,this.__lastTriggerEl=null,this.#r=e=>{this.isStatic||this.#n(e)||this.#t()},this.#i=e=>{this.open&&e.key===`Escape`&&this.#t()}}static{this.__instances=new Map}static{this.__docListenerAttached=!1}static __handleDocClick(e){let t=e.composedPath();for(let e of t){if(!(e instanceof Element))continue;let t=e.getAttribute(`data-overlay-open`),n=e.getAttribute(`data-overlay-close`),r=e.getAttribute(`data-overlay-toggle`),i=e.getAttribute(`aria-controls`),a=t||n||r||i;if(!a)continue;let o=Iu.__instances.get(a);if(!o){Iu.__instances.delete(a);continue}o.__lastTriggerEl=e,t?o.#e(!0):n?o.#e(!1):o.#e(!o.open);break}}static __ensureDocListener(){Iu.__docListenerAttached||(document.addEventListener(`click`,Iu.__handleDocClick,!0),Iu.__docListenerAttached=!0)}static __maybeRemoveDocListener(){!Iu.__docListenerAttached||Iu.__instances.size>0||(document.removeEventListener(`click`,Iu.__handleDocClick,!0),Iu.__docListenerAttached=!1)}static{this.styles=p`
|
|
8289
8289
|
:host {
|
|
8290
8290
|
position: fixed;
|
|
8291
8291
|
inset: 0;
|
|
@@ -8333,7 +8333,7 @@
|
|
|
8333
8333
|
<slot></slot>
|
|
8334
8334
|
</div>
|
|
8335
8335
|
</div>
|
|
8336
|
-
`:x}connectedCallback(){super.connectedCallback(),this.id&&
|
|
8336
|
+
`:x}connectedCallback(){super.connectedCallback(),this.id&&Iu.__instances.set(this.id,this),Iu.__ensureDocListener(),window.addEventListener(`keydown`,this.#i)}updated(e){e.has(`open`)&&this.#a()}disconnectedCallback(){this.id&&Iu.__instances.delete(this.id),Iu.__maybeRemoveDocListener(),window.removeEventListener(`keydown`,this.#i),super.disconnectedCallback()}};P([g({type:Boolean,reflect:!0})],Lu.prototype,`open`,void 0),P([g({type:String,reflect:!0})],Lu.prototype,`variant`,void 0),P([g({type:Boolean,reflect:!0,attribute:`static`})],Lu.prototype,`isStatic`,void 0),P([g({type:String,attribute:`aria-label`})],Lu.prototype,`ariaLabel`,void 0),Lu=Iu=P([a(`scb-overlay`)],Lu),C(),y(),F();var Ru={fromAttribute(e){return e===null?!0:e.toLowerCase()!==`false`},toAttribute(e){return e?``:`false`}},zu=class extends S{constructor(...e){super(...e),this.variant=`default`,this.enableClickCarousel=!0,this.overlayOpen=!1,this.overlayIndex=0,this.overlayImages=[],this.#e=[],this.#t=e=>{e.key===`Escape`&&this.overlayOpen&&this.#d()},this.#n=()=>{this.#c()},this.#r=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;t instanceof HTMLElement&&t.setAttribute(`data-scb-gallery-hover`,``)},this.#i=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;t instanceof HTMLElement&&t.removeAttribute(`data-scb-gallery-hover`)},this.#a=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;if(!(t instanceof HTMLElement))return;let n=t.getAttribute(`data-scb-gallery-slide-index`);if(n==null)return;let r=Number(n);Number.isFinite(r)&&this.#u(r)},this.#d=()=>{this.overlayOpen=!1}}#e;static{this.styles=p`
|
|
8337
8337
|
:host {
|
|
8338
8338
|
display: block;
|
|
8339
8339
|
--scb-gallery-grid-gap: var(--spacing-4, 12px);
|
|
@@ -8463,15 +8463,15 @@
|
|
|
8463
8463
|
</div>
|
|
8464
8464
|
</scb-overlay>
|
|
8465
8465
|
`:``}
|
|
8466
|
-
`}};
|
|
8466
|
+
`}};P([g({type:String,reflect:!0})],zu.prototype,`variant`,void 0),P([g({type:Boolean,reflect:!0,attribute:`enable-carousel`,converter:Ru})],zu.prototype,`enableClickCarousel`,void 0),P([_()],zu.prototype,`overlayOpen`,void 0),P([_()],zu.prototype,`overlayIndex`,void 0),P([_()],zu.prototype,`overlayImages`,void 0),zu=P([a(`scb-gallery-grid`)],zu);var Bu=class extends HTMLElement{get label(){return this.getAttribute(`label`)??``}set label(e){this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??void 0}set icon(e){e==null||e===``?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}connectedCallback(){this.style.display=`none`}};customElements.define(`scb-header-menu-group`,Bu),C(),y(),F();var Vu=class extends S{constructor(...e){super(...e),this.label=``,this.href=``}static{this.styles=p`
|
|
8467
8467
|
:host {
|
|
8468
8468
|
display: none !important;
|
|
8469
8469
|
}
|
|
8470
|
-
`}render(){return b`<slot></slot>`}};
|
|
8470
|
+
`}render(){return b`<slot></slot>`}};P([g({type:String})],Vu.prototype,`label`,void 0),P([g({type:String})],Vu.prototype,`href`,void 0),P([g({type:String})],Vu.prototype,`icon`,void 0),Vu=P([a(`scb-header-menu-item`)],Vu),C(),y(),F();var Hu=class extends S{constructor(...e){super(...e),this.label=``,this.href=``,this.drawerId=``}static{this.styles=p`
|
|
8471
8471
|
:host {
|
|
8472
8472
|
display: none !important;
|
|
8473
8473
|
}
|
|
8474
|
-
`}render(){return b`<slot></slot>`}};
|
|
8474
|
+
`}render(){return b`<slot></slot>`}};P([g({type:String})],Hu.prototype,`label`,void 0),P([g({type:String})],Hu.prototype,`href`,void 0),P([g({type:String,attribute:`drawer-id`})],Hu.prototype,`drawerId`,void 0),Hu=P([a(`scb-header-tab`)],Hu);var Uu=class extends HTMLElement{static get observedAttributes(){return[`role`]}get label(){return this.getAttribute(`label`)??``}set label(e){this.setAttribute(`label`,e)}get href(){return this.getAttribute(`href`)??`#`}set href(e){this.setAttribute(`href`,e)}get target(){return this.getAttribute(`target`)??void 0}set target(e){e==null?this.removeAttribute(`target`):this.setAttribute(`target`,e)}connectedCallback(){this.#e()}attributeChangedCallback(e){e===`role`&&this.#e()}#e(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`aria-hidden`,`true`),this.style.display=`none`}};customElements.define(`scb-header-utility`,Uu);var Wu,Gu,Ku,qu=t((()=>{C(),y(),Vc(),F(),Gu={fromAttribute:e=>e==null?!1:!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},Ku=class extends S{static{Wu=this}constructor(...e){super(...e),this.label=``,this.selected=!1,this.noHighlightSelected=!1,this.leadingIcon=``,this.itemHref=``,this.hasChildren=!1,this.loading=!1,this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=e=>{e&&e.stopPropagation(),this.__isExpandable&&this.__setExpanded(!this.expanded)},this._onButtonClick=e=>{e.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=e=>{let t=Array.from(this.closest(`scb-sub-menu, scb-menu`)?.querySelectorAll(`scb-menu-item`)||[]),n=t.indexOf(this);switch(e.key){case`ArrowDown`:e.preventDefault(),((t[n+1]||t[0]).shadowRoot?.querySelector(`.scb-menu-label-text`))?.focus();break;case`ArrowUp`:e.preventDefault(),((t[n-1]||t[t.length-1]).shadowRoot?.querySelector(`.scb-menu-label-text`))?.focus();break;case`Home`:e.preventDefault(),(t[0].shadowRoot?.querySelector(`.scb-menu-label-text`))?.focus();break;case`End`:e.preventDefault(),(t[t.length-1].shadowRoot?.querySelector(`.scb-menu-label-text`))?.focus();break}}}static{this.__rippleLoaded=!1}static{this.__iconLoaded=!1}static{this.__focusRingLoaded=!1}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}get __isExpandable(){return this.hasSlotContent||this.hasChildren}async __ensureDepsLoaded(){Wu.__rippleLoaded||(await Promise.resolve().then(()=>(E(),hn)),Wu.__rippleLoaded=!0),Wu.__focusRingLoaded||(await Promise.resolve().then(()=>(w(),Vt)),Wu.__focusRingLoaded=!0),this.leadingIcon&&!Wu.__iconLoaded&&(await Promise.resolve().then(()=>(k(),ea)),Wu.__iconLoaded=!0)}static{this.styles=p`
|
|
8475
8475
|
:host {
|
|
8476
8476
|
/* Animationtokens */
|
|
8477
8477
|
--scb-menu-sub-transition-duration: var(--scb-motion-duration-quick, 150ms);
|
|
@@ -8721,7 +8721,7 @@
|
|
|
8721
8721
|
</div>
|
|
8722
8722
|
</div>
|
|
8723
8723
|
</div>
|
|
8724
|
-
`}},
|
|
8724
|
+
`}},P([g({type:String})],Ku.prototype,`label`,void 0),P([g({type:Boolean,reflect:!0})],Ku.prototype,`selected`,void 0),P([g({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Ku.prototype,`noHighlightSelected`,void 0),P([g({type:String,attribute:`leading-icon`})],Ku.prototype,`leadingIcon`,void 0),P([g({type:String,attribute:`item-href`})],Ku.prototype,`itemHref`,void 0),P([g({type:Boolean,attribute:`has-children`,reflect:!0,converter:Gu})],Ku.prototype,`hasChildren`,void 0),P([g({type:Boolean,reflect:!0,converter:Gu})],Ku.prototype,`loading`,void 0),P([_()],Ku.prototype,`hasSlotContent`,void 0),P([g({type:Boolean,reflect:!0})],Ku.prototype,`expanded`,void 0),Ku=Wu=P([a(`scb-menu-item`)],Ku)})),Ju,Yu=t((()=>{C(),y(),Vl(),F(),Ju=class extends S{constructor(...e){super(...e),this.label=``}static{this.styles=p`
|
|
8725
8725
|
:host {
|
|
8726
8726
|
color: var(--md-sys-color-on-surface);
|
|
8727
8727
|
font-family: var(--brand-font);
|
|
@@ -8762,7 +8762,7 @@
|
|
|
8762
8762
|
<div class="scb-menu-label">${this.label}</div>
|
|
8763
8763
|
</div>
|
|
8764
8764
|
`:``}
|
|
8765
|
-
`}},
|
|
8765
|
+
`}},P([g({type:String})],Ju.prototype,`label`,void 0),Ju=P([a(`scb-menu-section`)],Ju)})),Xu,Zu=t((()=>{C(),y(),F(),Xu=class extends S{constructor(...e){super(...e),this.label=``,this._onGlobalSelect=e=>{let t=e;this.querySelectorAll(`scb-menu-item`).forEach(e=>e.selected=!1),this.contains(t.detail.item)&&(t.detail.item.selected=!0)}}static{this.styles=p`
|
|
8766
8766
|
:host {
|
|
8767
8767
|
display: block;
|
|
8768
8768
|
width: 100%;
|
|
@@ -8771,7 +8771,7 @@
|
|
|
8771
8771
|
<nav aria-label="${this.label}">
|
|
8772
8772
|
<slot></slot>
|
|
8773
8773
|
</nav>
|
|
8774
|
-
`}},
|
|
8774
|
+
`}},P([g({type:String})],Xu.prototype,`label`,void 0),Xu=P([a(`scb-sub-menu`)],Xu)})),Qu=n({ScbMenu:()=>Y}),Y,$u=t((()=>{C(),y(),Vl(),qu(),Yu(),Zu(),F(),Y=class extends S{constructor(...e){super(...e),this.label=``,this.subLabel=``,this.noHighlightSelected=!1,this.elevation=!1,this.lazySrc=``,this.lazyIdParam=`id`,this.lazyChildrenField=``,this.lazyIdField=`id`,this.lazyLabelField=`label`,this.lazyHrefField=`href`,this.lazyHasChildrenField=`hasChildren`,this.lazyHasLinkField=`hasLink`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._lazyCache=new Map,this._onGlobalSelect=e=>{let t=e;this.querySelectorAll(`scb-menu-item`).forEach(e=>{e.selected=!1,this.noHighlightSelected?e.setAttribute(`no-highlight-selected`,``):e.removeAttribute(`no-highlight-selected`)}),this.contains(t.detail.item)&&(t.detail.item.selected=!0)},this._onMenuExpand=e=>{this._loadLazyChildren(e)}}static{this.styles=p`
|
|
8775
8775
|
:host {
|
|
8776
8776
|
display: block;
|
|
8777
8777
|
color: var(--md-sys-color-on-surface);
|
|
@@ -8856,7 +8856,44 @@
|
|
|
8856
8856
|
<slot></slot>
|
|
8857
8857
|
</div>
|
|
8858
8858
|
</nav>
|
|
8859
|
-
`}firstUpdated(e){super.firstUpdated(e),this.#e()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-menu-spacing-block-start`,t):this.style.removeProperty(`--scb-menu-spacing-block-start`),n?this.style.setProperty(`--scb-menu-spacing-block-end`,n):this.style.removeProperty(`--scb-menu-spacing-block-end`),r?this.style.setProperty(`--scb-menu-spacing-inline-start`,r):this.style.removeProperty(`--scb-menu-spacing-inline-start`),i?this.style.setProperty(`--scb-menu-spacing-inline-end`,i):this.style.removeProperty(`--scb-menu-spacing-inline-end`)}connectedCallback(){super.connectedCallback(),window.addEventListener(`scb-menu-select`,this._onGlobalSelect),this.addEventListener(`scb-menu-expand`,this._onMenuExpand)}disconnectedCallback(){window.removeEventListener(`scb-menu-select`,this._onGlobalSelect),this.removeEventListener(`scb-menu-expand`,this._onMenuExpand),super.disconnectedCallback()}async _loadLazyChildren(e){if(!this.lazySrc)return;let t=e.detail?.item;if(!t||!this.contains(t)||!e.detail?.expanded||t.hasAttribute(`data-loaded`)||!t.hasAttribute(`has-children`)||e.detail?.lazy===!1||this._hasSubMenu(t))return;let n=t.getAttribute(`data-node-id`)??t.dataset.nodeId;if(n){this._setItemLoading(t,!0),t.removeAttribute(`data-load-error`);try{let e=await this._fetchLazyChildren(n),r=this._createSubMenu(t,e);t.appendChild(r),t.setAttribute(`data-loaded`,``),this.dispatchEvent(new CustomEvent(`scb-menu-lazy-load`,{bubbles:!0,composed:!0,detail:{item:t,nodeId:n,children:e}}))}catch(e){t.setAttribute(`data-load-error`,``),this.dispatchEvent(new CustomEvent(`scb-menu-lazy-error`,{bubbles:!0,composed:!0,detail:{item:t,nodeId:n,error:e}}))}finally{this._setItemLoading(t,!1)}}}_setItemLoading(e,t){e.loading=t,e.toggleAttribute(`loading`,t),t?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`)}_hasSubMenu(e){return Array.from(e.children).some(e=>e.tagName===`SCB-SUB-MENU`)}_createSubMenu(e,t){let n=document.createElement(`scb-sub-menu`);n.setAttribute(`label`,e.getAttribute(`label`)??``);for(let e of t)n.appendChild(this._createLazyMenuItem(e));return n}_createLazyMenuItem(e){let t=document.createElement(`scb-menu-item`),n=this._getRecordValue(e,this.lazyIdField,[`id`,`Id`]),r=this._getRecordValue(e,this.lazyLabelField,[`label`,`Label`,`name`,`Name`]),i=this._getRecordValue(e,this.lazyHrefField,[`href`,`Href`,`url`,`Url`]),a=this._toBoolean(this._getRecordValue(e,this.lazyHasChildrenField,[`hasChildren`,`HasChildren`])),o=this._getRecordValue(e,this.lazyHasLinkField,[`hasLink`,`HasLink`]),s=o==null?!!i:this._toBoolean(o);return r!=null&&t.setAttribute(`label`,String(r)),n!=null&&t.setAttribute(`data-node-id`,String(n)),a&&t.setAttribute(`has-children`,``),s&&i!=null&&String(i).trim()&&t.setAttribute(`item-href`,String(i)),t}async _fetchLazyChildren(e){let t=`${this.lazySrc}|${this.lazyIdParam}|${e}`,n=this._lazyCache.get(t);return n||(n=fetch(this._createLazyUrl(e),{credentials:`same-origin`}).then(async e=>{if(!e.ok)throw Error(`Kunde inte ladda menybarn (${e.status}).`);let t=await e.json();return this._normalizeChildren(t)}).catch(e=>{throw this._lazyCache.delete(t),e}),this._lazyCache.set(t,n)),n}_createLazyUrl(e){if(this.lazySrc.includes(`{id}`))return this.lazySrc.split(`{id}`).join(encodeURIComponent(e));let t=new URL(this.lazySrc,document.baseURI);return this.lazyIdParam&&t.searchParams.set(this.lazyIdParam,e),t.toString()}_normalizeChildren(e){let t=Array.isArray(e)?e:this._getRecordValue(e,this.lazyChildrenField,[`children`,`Children`,`items`,`Items`,`data`,`Data`]);return Array.isArray(t)?t.filter(e=>!!e&&typeof e==`object`&&!Array.isArray(e)):[]}_getRecordValue(e,t,n=[]){if(!e||typeof e!=`object`||Array.isArray(e))return;let r=e,i=[t,...n].filter(Boolean);for(let e of i){if(e in r)return r[e];let t=Object.keys(r).find(t=>t.toLowerCase()===e.toLowerCase());if(t)return r[t]}}_toBoolean(e){return typeof e==`boolean`?e:typeof e==`number`?e!==0:typeof e==`string`?!/^(false|0|off|no|nej)$/i.test(e.trim()):!!e}},
|
|
8859
|
+
`}firstUpdated(e){super.firstUpdated(e),this.#e()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-menu-spacing-block-start`,t):this.style.removeProperty(`--scb-menu-spacing-block-start`),n?this.style.setProperty(`--scb-menu-spacing-block-end`,n):this.style.removeProperty(`--scb-menu-spacing-block-end`),r?this.style.setProperty(`--scb-menu-spacing-inline-start`,r):this.style.removeProperty(`--scb-menu-spacing-inline-start`),i?this.style.setProperty(`--scb-menu-spacing-inline-end`,i):this.style.removeProperty(`--scb-menu-spacing-inline-end`)}connectedCallback(){super.connectedCallback(),window.addEventListener(`scb-menu-select`,this._onGlobalSelect),this.addEventListener(`scb-menu-expand`,this._onMenuExpand)}disconnectedCallback(){window.removeEventListener(`scb-menu-select`,this._onGlobalSelect),this.removeEventListener(`scb-menu-expand`,this._onMenuExpand),super.disconnectedCallback()}async _loadLazyChildren(e){if(!this.lazySrc)return;let t=e.detail?.item;if(!t||!this.contains(t)||!e.detail?.expanded||t.hasAttribute(`data-loaded`)||!t.hasAttribute(`has-children`)||e.detail?.lazy===!1||this._hasSubMenu(t))return;let n=t.getAttribute(`data-node-id`)??t.dataset.nodeId;if(n){this._setItemLoading(t,!0),t.removeAttribute(`data-load-error`);try{let e=await this._fetchLazyChildren(n),r=this._createSubMenu(t,e);t.appendChild(r),t.setAttribute(`data-loaded`,``),this.dispatchEvent(new CustomEvent(`scb-menu-lazy-load`,{bubbles:!0,composed:!0,detail:{item:t,nodeId:n,children:e}}))}catch(e){t.setAttribute(`data-load-error`,``),this.dispatchEvent(new CustomEvent(`scb-menu-lazy-error`,{bubbles:!0,composed:!0,detail:{item:t,nodeId:n,error:e}}))}finally{this._setItemLoading(t,!1)}}}_setItemLoading(e,t){e.loading=t,e.toggleAttribute(`loading`,t),t?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`)}_hasSubMenu(e){return Array.from(e.children).some(e=>e.tagName===`SCB-SUB-MENU`)}_createSubMenu(e,t){let n=document.createElement(`scb-sub-menu`);n.setAttribute(`label`,e.getAttribute(`label`)??``);for(let e of t)n.appendChild(this._createLazyMenuItem(e));return n}_createLazyMenuItem(e){let t=document.createElement(`scb-menu-item`),n=this._getRecordValue(e,this.lazyIdField,[`id`,`Id`]),r=this._getRecordValue(e,this.lazyLabelField,[`label`,`Label`,`name`,`Name`]),i=this._getRecordValue(e,this.lazyHrefField,[`href`,`Href`,`url`,`Url`]),a=this._toBoolean(this._getRecordValue(e,this.lazyHasChildrenField,[`hasChildren`,`HasChildren`])),o=this._getRecordValue(e,this.lazyHasLinkField,[`hasLink`,`HasLink`]),s=o==null?!!i:this._toBoolean(o);return r!=null&&t.setAttribute(`label`,String(r)),n!=null&&t.setAttribute(`data-node-id`,String(n)),a&&t.setAttribute(`has-children`,``),s&&i!=null&&String(i).trim()&&t.setAttribute(`item-href`,String(i)),t}async _fetchLazyChildren(e){let t=`${this.lazySrc}|${this.lazyIdParam}|${e}`,n=this._lazyCache.get(t);return n||(n=fetch(this._createLazyUrl(e),{credentials:`same-origin`}).then(async e=>{if(!e.ok)throw Error(`Kunde inte ladda menybarn (${e.status}).`);let t=await e.json();return this._normalizeChildren(t)}).catch(e=>{throw this._lazyCache.delete(t),e}),this._lazyCache.set(t,n)),n}_createLazyUrl(e){if(this.lazySrc.includes(`{id}`))return this.lazySrc.split(`{id}`).join(encodeURIComponent(e));let t=new URL(this.lazySrc,document.baseURI);return this.lazyIdParam&&t.searchParams.set(this.lazyIdParam,e),t.toString()}_normalizeChildren(e){let t=Array.isArray(e)?e:this._getRecordValue(e,this.lazyChildrenField,[`children`,`Children`,`items`,`Items`,`data`,`Data`]);return Array.isArray(t)?t.filter(e=>!!e&&typeof e==`object`&&!Array.isArray(e)):[]}_getRecordValue(e,t,n=[]){if(!e||typeof e!=`object`||Array.isArray(e))return;let r=e,i=[t,...n].filter(Boolean);for(let e of i){if(e in r)return r[e];let t=Object.keys(r).find(t=>t.toLowerCase()===e.toLowerCase());if(t)return r[t]}}_toBoolean(e){return typeof e==`boolean`?e:typeof e==`number`?e!==0:typeof e==`string`?!/^(false|0|off|no|nej)$/i.test(e.trim()):!!e}},P([g({type:String})],Y.prototype,`label`,void 0),P([g({type:String,attribute:`sub-label`})],Y.prototype,`subLabel`,void 0),P([g({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Y.prototype,`noHighlightSelected`,void 0),P([g({type:Boolean,reflect:!0})],Y.prototype,`elevation`,void 0),P([g({type:String,attribute:`lazy-src`})],Y.prototype,`lazySrc`,void 0),P([g({type:String,attribute:`lazy-id-param`})],Y.prototype,`lazyIdParam`,void 0),P([g({type:String,attribute:`lazy-children-field`})],Y.prototype,`lazyChildrenField`,void 0),P([g({type:String,attribute:`lazy-id-field`})],Y.prototype,`lazyIdField`,void 0),P([g({type:String,attribute:`lazy-label-field`})],Y.prototype,`lazyLabelField`,void 0),P([g({type:String,attribute:`lazy-href-field`})],Y.prototype,`lazyHrefField`,void 0),P([g({type:String,attribute:`lazy-has-children-field`})],Y.prototype,`lazyHasChildrenField`,void 0),P([g({type:String,attribute:`lazy-has-link-field`})],Y.prototype,`lazyHasLinkField`,void 0),P([g({type:String,reflect:!0})],Y.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Y.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Y.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Y.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Y.prototype,`spacingRight`,void 0),Y=P([a(`scb-menu`)],Y)})),ed=n({ScbSkeleton:()=>td}),td,nd=t((()=>{C(),y(),F(),td=class extends S{constructor(...e){super(...e),this.variant=`rectangular`,this.width=`100%`,this.height=`100%`,this.borderSize=`small`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
|
|
8860
|
+
:host {
|
|
8861
|
+
display: inline-block;
|
|
8862
|
+
max-width: var(--scb-skeleton-width);
|
|
8863
|
+
width: 100%;
|
|
8864
|
+
height: var(--scb-skeleton-height);
|
|
8865
|
+
|
|
8866
|
+
margin-block-start: var(--scb-skeleton-spacing-block-start, 0);
|
|
8867
|
+
margin-block-end: var(--scb-skeleton-spacing-block-end, 0);
|
|
8868
|
+
margin-inline-start: var(--scb-skeleton-spacing-inline-start, 0);
|
|
8869
|
+
margin-inline-end: var(--scb-skeleton-spacing-inline-end, 0);
|
|
8870
|
+
}
|
|
8871
|
+
.skeleton {
|
|
8872
|
+
background: linear-gradient(90deg, var(--md-sys-color-surface-container-high) 25%, var(--md-sys-color-surface-container-highest) 50%, var(--md-sys-color-surface-container-high) 75%);
|
|
8873
|
+
background-size: 200% 100%;
|
|
8874
|
+
animation: skeleton-loading 3.2s infinite linear;
|
|
8875
|
+
width: 100%;
|
|
8876
|
+
height: 100%;
|
|
8877
|
+
}
|
|
8878
|
+
.rounded {
|
|
8879
|
+
border-radius: var(--scb-skeleton-border-size);
|
|
8880
|
+
}
|
|
8881
|
+
.circle {
|
|
8882
|
+
border-radius: 50%;
|
|
8883
|
+
}
|
|
8884
|
+
@keyframes skeleton-loading {
|
|
8885
|
+
0% {
|
|
8886
|
+
background-position: 200% 0;
|
|
8887
|
+
}
|
|
8888
|
+
100% {
|
|
8889
|
+
background-position: -200% 0;
|
|
8890
|
+
}
|
|
8891
|
+
}
|
|
8892
|
+
`}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-skeleton-spacing-block-start`,t):this.style.removeProperty(`--scb-skeleton-spacing-block-start`),n?this.style.setProperty(`--scb-skeleton-spacing-block-end`,n):this.style.removeProperty(`--scb-skeleton-spacing-block-end`),r?this.style.setProperty(`--scb-skeleton-spacing-inline-start`,r):this.style.removeProperty(`--scb-skeleton-spacing-inline-start`),i?this.style.setProperty(`--scb-skeleton-spacing-inline-end`,i):this.style.removeProperty(`--scb-skeleton-spacing-inline-end`)}firstUpdated(e){super.firstUpdated(e),this.applySpacing()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing()}render(){return this.style.setProperty(`--scb-skeleton-width`,this.width),this.style.setProperty(`--scb-skeleton-height`,this.height),this.variant===`rounded`&&this.style.setProperty(`--scb-skeleton-border-size`,this.borderSize===`small`?`8px`:this.borderSize===`medium`?`16px`:this.borderSize===`large`?`24px`:`8px`),b`
|
|
8893
|
+
<div
|
|
8894
|
+
class="skeleton${this.variant===`circular`?` circle`:``} ${this.variant===`rounded`?` rounded`:``}"
|
|
8895
|
+
><slot></slot></div>
|
|
8896
|
+
`}},P([g({type:String})],td.prototype,`variant`,void 0),P([g({type:String})],td.prototype,`width`,void 0),P([g({type:String})],td.prototype,`height`,void 0),P([g({type:String,attribute:`border-size`})],td.prototype,`borderSize`,void 0),P([g({type:String,reflect:!0})],td.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],td.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],td.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],td.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],td.prototype,`spacingRight`,void 0),td=P([a(`scb-skeleton`)],td)}));C(),y(),F();var rd,id=0;(()=>{if(typeof window>`u`||typeof document>`u`||!(`customElements`in window)||document.head.querySelector(`style[data-scb-header-pre-upgrade]`))return;let e=document.createElement(`style`);e.setAttribute(`data-scb-header-pre-upgrade`,``),e.textContent=`
|
|
8860
8897
|
scb-header:not(:defined),
|
|
8861
8898
|
scb-header[data-upgrading] {
|
|
8862
8899
|
display: block;
|
|
@@ -8907,7 +8944,7 @@
|
|
|
8907
8944
|
);
|
|
8908
8945
|
}
|
|
8909
8946
|
}
|
|
8910
|
-
`,document.head.appendChild(e);let t=e=>{let t=String(e??``).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t},n=e=>{let t=String(e??``).trim();if(!t)return!1;try{let e=JSON.parse(t);return Array.isArray(e)&&e.length>0}catch{return!1}},r=e=>e!=null&&!/^(false|0|off|no)$/i.test(e.trim()),i=e=>{for(let t of Array.from(e.children)){let e=t.tagName.toLowerCase();if(e===`scb-header-tab`||e===`scb-dropdown`)return!0}return!1},a=e=>{i(e)||n(e.getAttribute(`tabs`))||r(e.getAttribute(`reserve-tabs`))||r(e.getAttribute(`layout-pending`))?e.setAttribute(`data-pre-has-tabs`,``):e.removeAttribute(`data-pre-has-tabs`);let a=t(e.getAttribute(`spacing`)),o=t(e.getAttribute(`spacing-top`))??a,s=t(e.getAttribute(`spacing-bottom`))??a;o?e.style.setProperty(`--scb-header-spacing-block-start`,o):e.style.removeProperty(`--scb-header-spacing-block-start`),s?e.style.setProperty(`--scb-header-spacing-block-end`,s):e.style.removeProperty(`--scb-header-spacing-block-end`);let c=(e.getAttribute(`logo-width`)??``).trim();c?e.style.setProperty(`--scb-header-pre-logo-w`,c):e.style.removeProperty(`--scb-header-pre-logo-w`);let l=(e.getAttribute(`logo-height`)??``).trim();l?e.style.setProperty(`--scb-header-pre-logo-img-h`,l):e.style.removeProperty(`--scb-header-pre-logo-img-h`);let u=(e.getAttribute(`search-height`)??``).trim();u?e.style.setProperty(`--scb-header-pre-control-size`,u):e.style.removeProperty(`--scb-header-pre-control-size`)};document.querySelectorAll(`scb-header`).forEach(a);let o=new MutationObserver(e=>{for(let t of e){if(t.type===`attributes`){let e=t.target;e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-header`&&a(e);continue}if(t.type===`childList`){let e=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let t of e){if(!(t instanceof HTMLElement))continue;if(t.tagName.toLowerCase()===`scb-header`){a(t);continue}let e=t.closest?.(`scb-header`);e&&a(e)}}}});o.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(()=>{o.disconnect()})})();var Yu={fromAttribute:e=>e==null?!0:!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},Xu={fromAttribute:e=>e==null?!1:!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},Zu={fromAttribute:e=>e===`small`||e===`large`?e:`medium`,toAttribute:e=>{let t=String(e??``);return t===`small`||t===`large`?t:null}},Y=class extends S{static{qu=this}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=e=>{let t=e.detail;this.dispatchEvent(new CustomEvent(`scb-menu-select`,{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbmenuselect`,{detail:t,bubbles:!0,composed:!0}));let n=t?.item,r=typeof t?.href==`string`?t.href:typeof t?.itemHref==`string`?t.itemHref:typeof t?.item_href==`string`?t.item_href:``,i=n?n.getAttribute(`item-href`)??n.getAttribute(`href`)??``:``;String(r||i||``).trim()&&this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._slotWatchers=[],this._harvestPending=!1,this._harvest=(e={})=>{let t=Array.from(this.children),n=[],r=[],i=[],a=-1,o=!1,s=e=>({label:e.getAttribute(`label`)??``,href:e.getAttribute(`href`)??void 0,icon:e.getAttribute(`icon`)??void 0}),c=e=>{e.hasAttribute(`role`)&&e.removeAttribute(`role`),e.getAttribute(`aria-hidden`)!==`true`&&e.setAttribute(`aria-hidden`,`true`)};for(let e of t){let t=e.tagName.toLowerCase();if(t===`scb-header-tab`){let t=e.getAttribute(`label`)??``,r=e.getAttribute(`href`),i=r&&r.trim()!==``?r:void 0;(e.hasAttribute(`selected`)||e.getAttribute(`selected`)===`true`||e.getAttribute(`active`)===`true`||e.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length),n.push({kind:`tab`,label:t,href:i});continue}if(t===`scb-badge`){let t=e.querySelector(`scb-dropdown`);if(t){o=!0;let r=t.getAttribute(`label`)??``;(t.hasAttribute(`selected`)||t.getAttribute(`selected`)===`true`||t.getAttribute(`active`)===`true`||t.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length);let i=`scb-header-tab-${n.length}`;e.getAttribute(`slot`)!==i&&e.setAttribute(`slot`,i),t.hasAttribute(`slot`)&&t.removeAttribute(`slot`),t.hasAttribute(`as-tab`)||t.setAttribute(`as-tab`,``),n.push({kind:`dropdown`,slotName:i,label:r});continue}}if(t===`scb-dropdown`){o=!0;let t=e.getAttribute(`label`)??``;(e.hasAttribute(`selected`)||e.getAttribute(`selected`)===`true`||e.getAttribute(`active`)===`true`||e.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length);let r=`scb-header-tab-${n.length}`;e.getAttribute(`slot`)!==r&&e.setAttribute(`slot`,r),e.hasAttribute(`as-tab`)||e.setAttribute(`as-tab`,``),n.push({kind:`dropdown`,slotName:r,label:t});continue}if(t===`scb-header-utility`){c(e),r.push({label:e.getAttribute(`label`)??``,href:e.getAttribute(`href`)??`#`,target:e.getAttribute(`target`)??void 0});continue}if(t===`scb-header-menu-group`){let t={label:e.getAttribute(`label`)??``,icon:e.getAttribute(`icon`)??void 0,children:[]};e.querySelectorAll(`scb-header-menu-item`).forEach(e=>t.children.push(s(e))),i.push(t);continue}t===`scb-header-menu-item`&&i.push(s(e))}let l=!this._sameNavItems(this._slotNavItems,n),u=!this._sameUtilityItems(this._slotUtils,r),d=!this._sameMenuNodes(this._slotMenu,i);l&&(this._slotNavItems=n),u&&(this._slotUtils=r),d&&(this._slotMenu=i),o&&this._ensureDropdownReady(),!this.hasAttribute(`active-tab`)&&a>=0&&this.activeTab!==a&&(this.activeTab=a),(e.scheduleMeasure??!0)&&queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{if(this.layoutPending)return;let e=this._top,t=this._logoGroup;if(!e||!t)return;let n=window.innerWidth,r=e.clientWidth,i=this._overflows(this._util),a=this._tabsOverflows(),o=n<this.BP_MD||i||a;this._collapsed?!o&&r>=this._unlockAtWidth&&this._setCollapsed(!1):o&&(this._unlockAtWidth=r+this._HYST,this._setCollapsed(!0));let s=!1;if(this.showSearch&&n>=this.BP_SM&&n<this.BP_MD&&this._searchWrap){let i=getComputedStyle(this._searchWrap),a=Math.max(this._num(i.minWidth,this._tokenPx(`--scb-header-search-min`,250)),this._tokenPx(`--scb-header-search-min`,250)),o=this._num(getComputedStyle(e).gap,this._tokenPx(`--spacing-7`,24)),c=this.showDrawer&&(this.alwaysShowMenuButton||n<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx(`--icon-size-extra-extra-large`,48):0;s=t.getBoundingClientRect().width+o+a+o+c+8>r+.5}this._setHideSearch(s);let c=!1;if(this.showDrawer&&(this.alwaysShowMenuButton||n<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){let t=this._num(getComputedStyle(e).gap,this._tokenPx(`--spacing-7`,24)),n=this._menuBtn?.getBoundingClientRect().width||this._tokenPx(`--icon-size-extra-extra-large`,48),i=(this._logoGroup?.getBoundingClientRect().width||0)+t+n;this._hideLogoText?c=!(r>=this._logoTextUnlockAt):i>r+.5&&(c=!0,this._logoTextUnlockAt=r+this._HYST)}else c=!1,this._logoTextUnlockAt=0;this._setHideLogoText(c)},this._onGlobalFocusRingKeydown=e=>{e.key===`Tab`&&(this.toggleAttribute(`data-keyboard-focus`,!0),this._ensureFocusRingReady())},this._onGlobalFocusRingPointerDown=()=>{this.removeAttribute(`data-keyboard-focus`)},this._onLocalFocusIn=e=>{let t=e.composedPath()[0];t instanceof HTMLElement&&t.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 e=>{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&&(e.stopPropagation(),await this._ensureDrawerReady(),await this.updateComplete,this._openDrawerNow()))},this._onMobileSearchToggle=()=>{let e=!this._mobileSearchOpen;this._setMobileSearchOpen(e),e&&this.updateComplete.then(()=>{this.renderRoot.querySelector(`.mobile-search-panel .header-search-input`)?.focus?.()})},this._onTabClick=e=>{let t=e.currentTarget;if(!t)return;let n=t.tagName.toLowerCase()===`a`;if(n&&(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))return;let r=t.getAttribute(`data-index`),i=r==null?0:Number(r),a=this._getNavItems()[i];if(a?.kind===`dropdown`)return;this.activeTab=i;let o=a?.kind===`tab`?a.href??``:``,s=new CustomEvent(`tab-change`,{detail:{index:i,href:o},bubbles:!0,composed:!0,cancelable:!0}),c=new CustomEvent(`tabchange`,{detail:{index:i,href:o},bubbles:!0,composed:!0,cancelable:!0});!(this.dispatchEvent(s)&&this.dispatchEvent(c))&&n&&e.preventDefault()},this._onDropdownTabActivate=e=>{let t=e.detail?.dataIndex,n=typeof t==`number`?t:typeof t==`string`?Number(t):this._readTabIndexFromEvent(e);if(n==null||!Number.isFinite(n))return;let r=this._getNavItems();n<0||n>=r.length||r[n]?.kind===`dropdown`&&(this.activeTab=n,this.dispatchEvent(new CustomEvent(`tab-change`,{detail:{index:n,href:``},bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent(`tabchange`,{detail:{index:n,href:``},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=e=>{let t=e.key;if(t!==`ArrowLeft`&&t!==`ArrowRight`&&t!==`Home`&&t!==`End`)return;let n=this._getNavItems();if(!n.length)return;let r=this._readTabIndexFromEvent(e);if(r==null)return;let i=Math.max(0,Math.min(n.length-1,r));t===`ArrowRight`?i=(i+1)%n.length:t===`ArrowLeft`?i=(i-1+n.length)%n.length:t===`Home`?i=0:t===`End`&&(i=n.length-1),e.preventDefault(),this._focusTabAtIndex(i)},this._onNativeSearchInput=e=>{let t=e.currentTarget;this._emitSearchInput(t?.value??``)},this._onNativeSearchSubmit=e=>{e.preventDefault();let t=e.currentTarget?.querySelector(`.header-search-input`);this._emitSearchChange(t?.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=e=>{e.preventDefault(),this._onSearchClear(),this.updateComplete.then(()=>{let t=(e.currentTarget?.closest(`form`))?.querySelector(`.header-search-input`);t&&(t.value=``),t?.focus()})};let e=++Ju;this._drawerId=`scb-header-drawer-${e}`,this._searchId=`scb-header-search-${e}`}static{this._JSON_ARRAY={fromAttribute:e=>{if(e==null||e===``)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute:e=>e==null?null:JSON.stringify(e)}}requestLayout(){this.layoutPending||(this.setAttribute(`data-layout-settling`,``),this.updateComplete.then(()=>{this.isConnected&&(this._measure(),this.removeAttribute(`data-layout-settling`))}))}static{this.BP_SM_DEFAULT=600}static{this.BP_MD_DEFAULT=840}get _HYST(){return this._tokenPx(`--spacing-11`,64)}get BP_SM(){return this._tokenPx(`--bp-sm`,qu.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx(`--bp-md`,qu.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}static{this.styles=p`
|
|
8947
|
+
`,document.head.appendChild(e);let t=e=>{let t=String(e??``).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t},n=e=>{let t=String(e??``).trim();if(!t)return!1;try{let e=JSON.parse(t);return Array.isArray(e)&&e.length>0}catch{return!1}},r=e=>e!=null&&!/^(false|0|off|no)$/i.test(e.trim()),i=e=>{for(let t of Array.from(e.children)){let e=t.tagName.toLowerCase();if(e===`scb-header-tab`||e===`scb-dropdown`)return!0}return!1},a=e=>{i(e)||n(e.getAttribute(`tabs`))||r(e.getAttribute(`reserve-tabs`))||r(e.getAttribute(`layout-pending`))?e.setAttribute(`data-pre-has-tabs`,``):e.removeAttribute(`data-pre-has-tabs`);let a=t(e.getAttribute(`spacing`)),o=t(e.getAttribute(`spacing-top`))??a,s=t(e.getAttribute(`spacing-bottom`))??a;o?e.style.setProperty(`--scb-header-spacing-block-start`,o):e.style.removeProperty(`--scb-header-spacing-block-start`),s?e.style.setProperty(`--scb-header-spacing-block-end`,s):e.style.removeProperty(`--scb-header-spacing-block-end`);let c=(e.getAttribute(`logo-width`)??``).trim();c?e.style.setProperty(`--scb-header-pre-logo-w`,c):e.style.removeProperty(`--scb-header-pre-logo-w`);let l=(e.getAttribute(`logo-height`)??``).trim();l?e.style.setProperty(`--scb-header-pre-logo-img-h`,l):e.style.removeProperty(`--scb-header-pre-logo-img-h`);let u=(e.getAttribute(`search-height`)??``).trim();u?e.style.setProperty(`--scb-header-pre-control-size`,u):e.style.removeProperty(`--scb-header-pre-control-size`)};document.querySelectorAll(`scb-header`).forEach(a);let o=new MutationObserver(e=>{for(let t of e){if(t.type===`attributes`){let e=t.target;e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-header`&&a(e);continue}if(t.type===`childList`){let e=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let t of e){if(!(t instanceof HTMLElement))continue;if(t.tagName.toLowerCase()===`scb-header`){a(t);continue}let e=t.closest?.(`scb-header`);e&&a(e)}}}});o.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(()=>{o.disconnect()})})();var ad={fromAttribute:e=>e==null?!0:!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},od={fromAttribute:e=>e==null?!1:!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},sd={fromAttribute:e=>e===`small`||e===`large`?e:`medium`,toAttribute:e=>{let t=String(e??``);return t===`small`||t===`large`?t:null}},X=class extends S{static{rd=this}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=e=>{let t=e.detail;this.dispatchEvent(new CustomEvent(`scb-menu-select`,{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbmenuselect`,{detail:t,bubbles:!0,composed:!0}));let n=t?.item,r=typeof t?.href==`string`?t.href:typeof t?.itemHref==`string`?t.itemHref:typeof t?.item_href==`string`?t.item_href:``,i=n?n.getAttribute(`item-href`)??n.getAttribute(`href`)??``:``;String(r||i||``).trim()&&this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._slotWatchers=[],this._harvestPending=!1,this._harvest=(e={})=>{let t=Array.from(this.children),n=[],r=[],i=[],a=-1,o=!1,s=e=>({label:e.getAttribute(`label`)??``,href:e.getAttribute(`href`)??void 0,icon:e.getAttribute(`icon`)??void 0}),c=e=>{e.hasAttribute(`role`)&&e.removeAttribute(`role`),e.hasAttribute(`hidden`)||e.setAttribute(`hidden`,``),e.getAttribute(`aria-hidden`)!==`true`&&e.setAttribute(`aria-hidden`,`true`)};for(let e of t){let t=e.tagName.toLowerCase();if(this._isDrawerCloseNode(e)){this._syncDrawerCloseNode(e);continue}if(t===`scb-header-tab`){c(e);let t=e.getAttribute(`label`)??``,r=e.getAttribute(`href`),i=r&&r.trim()!==``?r:void 0;(e.hasAttribute(`selected`)||e.getAttribute(`selected`)===`true`||e.getAttribute(`active`)===`true`||e.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length),n.push({kind:`tab`,label:t,href:i});continue}if(t===`scb-badge`){let t=e.querySelector(`scb-dropdown`);if(t){o=!0;let r=t.getAttribute(`label`)??``;(t.hasAttribute(`selected`)||t.getAttribute(`selected`)===`true`||t.getAttribute(`active`)===`true`||t.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length);let i=`scb-header-tab-${n.length}`;e.getAttribute(`slot`)!==i&&e.setAttribute(`slot`,i),t.hasAttribute(`slot`)&&t.removeAttribute(`slot`),t.hasAttribute(`as-tab`)||t.setAttribute(`as-tab`,``),n.push({kind:`dropdown`,slotName:i,label:r});continue}}if(t===`scb-dropdown`){o=!0;let t=e.getAttribute(`label`)??``;(e.hasAttribute(`selected`)||e.getAttribute(`selected`)===`true`||e.getAttribute(`active`)===`true`||e.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length);let r=`scb-header-tab-${n.length}`;e.getAttribute(`slot`)!==r&&e.setAttribute(`slot`,r),e.hasAttribute(`as-tab`)||e.setAttribute(`as-tab`,``),n.push({kind:`dropdown`,slotName:r,label:t});continue}if(t===`scb-header-utility`){c(e),r.push({label:e.getAttribute(`label`)??``,href:e.getAttribute(`href`)??`#`,target:e.getAttribute(`target`)??void 0});continue}if(t===`scb-header-menu-group`){c(e);let t={label:e.getAttribute(`label`)??``,icon:e.getAttribute(`icon`)??void 0,children:[]};e.querySelectorAll(`scb-header-menu-item`).forEach(e=>t.children.push(s(e))),i.push(t);continue}if(t===`scb-header-menu-item`){c(e),i.push(s(e));continue}e.hasAttribute(`slot`)||c(e)}let l=!this._sameNavItems(this._slotNavItems,n),u=!this._sameUtilityItems(this._slotUtils,r),d=!this._sameMenuNodes(this._slotMenu,i);l&&(this._slotNavItems=n),u&&(this._slotUtils=r),d&&(this._slotMenu=i),o&&this._ensureDropdownReady(),!this.hasAttribute(`active-tab`)&&a>=0&&this.activeTab!==a&&(this.activeTab=a),(e.scheduleMeasure??!0)&&queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{if(this.layoutPending)return;let e=this._top,t=this._logoGroup;if(!e||!t)return;let n=window.innerWidth,r=e.clientWidth,i=this._overflows(this._util),a=this._tabsOverflows(),o=n<this.BP_MD||i||a;this._collapsed?!o&&r>=this._unlockAtWidth&&this._setCollapsed(!1):o&&(this._unlockAtWidth=r+this._HYST,this._setCollapsed(!0));let s=!1;if(this.showSearch&&n>=this.BP_SM&&n<this.BP_MD&&this._searchWrap){let i=getComputedStyle(this._searchWrap),a=Math.max(this._num(i.minWidth,this._tokenPx(`--scb-header-search-min`,250)),this._tokenPx(`--scb-header-search-min`,250)),o=this._num(getComputedStyle(e).gap,this._tokenPx(`--spacing-7`,24)),c=this.showDrawer&&(this.alwaysShowMenuButton||n<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx(`--icon-size-extra-extra-large`,48):0;s=t.getBoundingClientRect().width+o+a+o+c+8>r+.5}this._setHideSearch(s);let c=!1;if(this.showDrawer&&(this.alwaysShowMenuButton||n<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){let t=this._num(getComputedStyle(e).gap,this._tokenPx(`--spacing-7`,24)),n=this._menuBtn?.getBoundingClientRect().width||this._tokenPx(`--icon-size-extra-extra-large`,48),i=(this._logoGroup?.getBoundingClientRect().width||0)+t+n;this._hideLogoText?c=!(r>=this._logoTextUnlockAt):i>r+.5&&(c=!0,this._logoTextUnlockAt=r+this._HYST)}else c=!1,this._logoTextUnlockAt=0;this._setHideLogoText(c)},this._onGlobalFocusRingKeydown=e=>{e.key===`Tab`&&(this.toggleAttribute(`data-keyboard-focus`,!0),this._ensureFocusRingReady())},this._onGlobalFocusRingPointerDown=()=>{this.removeAttribute(`data-keyboard-focus`)},this._onLocalFocusIn=e=>{let t=e.composedPath()[0];t instanceof HTMLElement&&t.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 e=>{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&&(e.stopPropagation(),await this._ensureDrawerReady(),await this.updateComplete,this._openDrawerNow()))},this._onMobileSearchToggle=()=>{let e=!this._mobileSearchOpen;this._setMobileSearchOpen(e),e&&this.updateComplete.then(()=>{this.renderRoot.querySelector(`.mobile-search-panel .header-search-input`)?.focus?.()})},this._onTabClick=e=>{let t=e.currentTarget;if(!t)return;let n=t.tagName.toLowerCase()===`a`;if(n&&(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))return;let r=t.getAttribute(`data-index`),i=r==null?0:Number(r),a=this._getNavItems()[i];if(a?.kind===`dropdown`)return;this.activeTab=i;let o=a?.kind===`tab`?a.href??``:``,s=new CustomEvent(`tab-change`,{detail:{index:i,href:o},bubbles:!0,composed:!0,cancelable:!0}),c=new CustomEvent(`tabchange`,{detail:{index:i,href:o},bubbles:!0,composed:!0,cancelable:!0});!(this.dispatchEvent(s)&&this.dispatchEvent(c))&&n&&e.preventDefault()},this._onDropdownTabActivate=e=>{let t=e.detail?.dataIndex,n=typeof t==`number`?t:typeof t==`string`?Number(t):this._readTabIndexFromEvent(e);if(n==null||!Number.isFinite(n))return;let r=this._getNavItems();n<0||n>=r.length||r[n]?.kind===`dropdown`&&(this.activeTab=n,this.dispatchEvent(new CustomEvent(`tab-change`,{detail:{index:n,href:``},bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent(`tabchange`,{detail:{index:n,href:``},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=e=>{let t=e.key;if(t!==`ArrowLeft`&&t!==`ArrowRight`&&t!==`Home`&&t!==`End`)return;let n=this._getNavItems();if(!n.length)return;let r=this._readTabIndexFromEvent(e);if(r==null)return;let i=Math.max(0,Math.min(n.length-1,r));t===`ArrowRight`?i=(i+1)%n.length:t===`ArrowLeft`?i=(i-1+n.length)%n.length:t===`Home`?i=0:t===`End`&&(i=n.length-1),e.preventDefault(),this._focusTabAtIndex(i)},this._onNativeSearchInput=e=>{let t=e.currentTarget;this._emitSearchInput(t?.value??``)},this._onNativeSearchSubmit=e=>{e.preventDefault();let t=e.currentTarget?.querySelector(`.header-search-input`);this._emitSearchChange(t?.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=e=>{e.preventDefault(),this._onSearchClear(),this.updateComplete.then(()=>{let t=(e.currentTarget?.closest(`form`))?.querySelector(`.header-search-input`);t&&(t.value=``),t?.focus()})};let e=++id;this._drawerId=`scb-header-drawer-${e}`,this._searchId=`scb-header-search-${e}`}static{this._JSON_ARRAY={fromAttribute:e=>{if(e==null||e===``)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute:e=>e==null?null:JSON.stringify(e)}}requestLayout(){this.layoutPending||(this.setAttribute(`data-layout-settling`,``),this.updateComplete.then(()=>{this.isConnected&&(this._measure(),this.removeAttribute(`data-layout-settling`))}))}static{this.BP_SM_DEFAULT=600}static{this.BP_MD_DEFAULT=840}get _HYST(){return this._tokenPx(`--spacing-11`,64)}get BP_SM(){return this._tokenPx(`--bp-sm`,rd.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx(`--bp-md`,rd.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}static{this.styles=p`
|
|
8911
8948
|
:host {
|
|
8912
8949
|
display: block;
|
|
8913
8950
|
margin-block-start: var(--scb-header-spacing-block-start, 0);
|
|
@@ -9699,6 +9736,23 @@
|
|
|
9699
9736
|
border: 0;
|
|
9700
9737
|
}
|
|
9701
9738
|
|
|
9739
|
+
.drawer-close {
|
|
9740
|
+
box-sizing: border-box;
|
|
9741
|
+
display: flex;
|
|
9742
|
+
justify-content: flex-end;
|
|
9743
|
+
padding-block-start: var(--spacing-4, 12px);
|
|
9744
|
+
padding-inline: var(--spacing-4, 12px);
|
|
9745
|
+
background: var(--md-sys-color-surface-container-lowest);
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9748
|
+
.drawer-close[hidden] {
|
|
9749
|
+
display: none;
|
|
9750
|
+
}
|
|
9751
|
+
|
|
9752
|
+
.drawer-close ::slotted(*) {
|
|
9753
|
+
flex: 0 0 auto;
|
|
9754
|
+
}
|
|
9755
|
+
|
|
9702
9756
|
.divider {
|
|
9703
9757
|
border-bottom: var(--stroke-border, 1px) solid
|
|
9704
9758
|
var(--md-sys-color-outline-variant, #e0e0e0);
|
|
@@ -9709,7 +9763,7 @@
|
|
|
9709
9763
|
:host([data-hide-logo-text]) .logo-text {
|
|
9710
9764
|
display: none;
|
|
9711
9765
|
}
|
|
9712
|
-
`}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(e=>e.disconnect()),this._slotWatchers=[];let e=[`label`,`href`,`icon`,`target`,`selected`,`aria-current`,`active`,`role`],t=t=>{let n=new MutationObserver(e=>{this._scheduleHarvest()});this._slotWatchers.push(n),n.observe(t,{attributes:!0,attributeFilter:e})},n=()=>{this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[];let e=Array.from(this.children);for(let r of e){let e=r.tagName.toLowerCase();if((e===`scb-header-tab`||e===`scb-dropdown`||e===`scb-header-utility`||e===`scb-header-menu-item`||e===`scb-header-menu-group`||e===`scb-badge`)&&t(r),e===`scb-badge`){let e=r,i=new MutationObserver(e=>{n(),this._scheduleHarvest()});this._slotWatchers.push(i),i.observe(e,{childList:!0});let a=e.querySelector(`scb-dropdown`);a&&t(a);continue}if(e===`scb-header-menu-group`){let e=r,i=new MutationObserver(e=>{n(),this._scheduleHarvest()});this._slotWatchers.push(i),i.observe(e,{childList:!0,subtree:!0}),e.querySelectorAll(`scb-header-menu-item`).forEach(e=>t(e))}}},r=new MutationObserver(e=>{let t=!1;for(let n of e)if(n.type===`childList`){t=!0;break}t&&n(),this._scheduleHarvest()});this._slotMo=r,r.observe(this,{childList:!0}),n()}_sameNavItems(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.kind!==i.kind||r.label!==i.label)return!1;if(r.kind===`tab`&&i.kind===`tab`){if((r.href??``)!==(i.href??``))return!1}else if(r.kind===`dropdown`&&i.kind===`dropdown`&&r.slotName!==i.slotName)return!1}return!0}_sameUtilityItems(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.label!==i.label||r.href!==i.href||(r.target??``)!==(i.target??``))return!1}return!0}_sameMenuNodes(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.label!==i.label||(r.href??``)!==(i.href??``)||(r.icon??``)!==(i.icon??``)||!this._sameMenuNodes(r.children??[],i.children??[]))return!1}return!0}_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){let n=Number.parseFloat(String(e??``).trim());return Number.isFinite(n)?n:t}_tokenPx(e,t){let n=getComputedStyle(this);return this._num(n.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(){let e=this._tabsNav;if(!e||!this._visible(e))return!1;let t=Array.from(e.querySelectorAll(`.tab-wrap`));if(t.length===0)return!1;let n=e.getBoundingClientRect(),r=n.left;for(let e of t){let t=e.getBoundingClientRect();t.width<=0||t.right>r&&(r=t.right)}return r-n.left>n.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()});let 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;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){let e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,n=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty(`--scb-header-spacing-block-start`,t):this.style.removeProperty(`--scb-header-spacing-block-start`),n?this.style.setProperty(`--scb-header-spacing-block-end`,n):this.style.removeProperty(`--scb-header-spacing-block-end`)}_syncLandmarkAttributes(){let e=this.renderRoot.querySelector(`.header-landmark`);if(!e)return;if(!this.banner){e.removeAttribute(`role`),e.removeAttribute(`aria-label`);return}e.setAttribute(`role`,`banner`);let t=(this.bannerLabel??``).trim();t?e.setAttribute(`aria-label`,t):e.removeAttribute(`aria-label`)}_applyLogoSizing(){let e=(this.logoWidth??``).trim(),t=(this.logoHeight??``).trim(),n=(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`),n?this.style.setProperty(`--scb-header-logo-img-aspect-ratio`,n):this.style.removeProperty(`--scb-header-logo-img-aspect-ratio`)}_closeDrawerNow(){let e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1)}_openDrawerNow(){let e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0)}_ensureFocusRingReady(){customElements.get(`md-focus-ring`)||(this._focusRingImportPromise??=Promise.resolve().then(()=>(w(),Vt)).then(()=>void 0),this._focusRingImportPromise)}async _ensureDrawerReady(){this._drawerReady||=(this._drawerImportPromise??=Promise.all([Promise.resolve().then(()=>(ou(),ru)),Promise.resolve().then(()=>(Ku(),Gu)),Promise.resolve().then(()=>(Al(),Dl))]).then(()=>void 0),await this._drawerImportPromise,!0)}async _ensureDropdownReady(){customElements.get(`scb-dropdown`)||(this._dropdownImportPromise??=Promise.resolve().then(()=>(hu(),pu)).then(()=>void 0),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){let 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;let n=this._getDropdownForSlot(e.slotName);if(!n)return;let r=String(t);n.getAttribute(`data-index`)!==r&&n.setAttribute(`data-index`,r),n.hasAttribute(`as-tab`)||n.setAttribute(`as-tab`,``);let i=this.size,a=n;a?.size!==i&&(a.size=i),t===this.activeTab?n.getAttribute(`aria-current`)!==`page`&&n.setAttribute(`aria-current`,`page`):n.hasAttribute(`aria-current`)&&n.removeAttribute(`aria-current`)})}_readTabIndexFromEvent(e){let t=e.composedPath?e.composedPath():[];for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-index`);if(t==null)continue;let n=Number(t);if(Number.isFinite(n))return n}return null}_focusTabAtIndex(e){let 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?.()}}_renderMenuNodes(e){return!e||e.length===0?b``:b`${e.map(e=>this._renderMenuNode(e))}`}_renderMenuNode(e){let t=Array.isArray(e.children)&&e.children.length>0,n=(e.href??``).trim(),r=(e.icon??``).trim(),i=t?b`
|
|
9766
|
+
`}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(e=>e.disconnect()),this._slotWatchers=[];let e=[`label`,`href`,`icon`,`target`,`selected`,`aria-current`,`active`,`role`],t=t=>{let n=new MutationObserver(e=>{this._scheduleHarvest()});this._slotWatchers.push(n),n.observe(t,{attributes:!0,attributeFilter:e})},n=()=>{this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[];let e=Array.from(this.children);for(let r of e){let e=r.tagName.toLowerCase();if((e===`scb-header-tab`||e===`scb-dropdown`||e===`scb-header-utility`||e===`scb-header-menu-item`||e===`scb-header-menu-group`||e===`scb-badge`)&&t(r),e===`scb-badge`){let e=r,i=new MutationObserver(e=>{n(),this._scheduleHarvest()});this._slotWatchers.push(i),i.observe(e,{childList:!0});let a=e.querySelector(`scb-dropdown`);a&&t(a);continue}if(e===`scb-header-menu-group`){let e=r,i=new MutationObserver(e=>{n(),this._scheduleHarvest()});this._slotWatchers.push(i),i.observe(e,{childList:!0,subtree:!0}),e.querySelectorAll(`scb-header-menu-item`).forEach(e=>t(e))}}},r=new MutationObserver(e=>{let t=!1;for(let n of e)if(n.type===`childList`){t=!0;break}t&&n(),this._scheduleHarvest()});this._slotMo=r,r.observe(this,{childList:!0}),n()}_sameNavItems(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.kind!==i.kind||r.label!==i.label)return!1;if(r.kind===`tab`&&i.kind===`tab`){if((r.href??``)!==(i.href??``))return!1}else if(r.kind===`dropdown`&&i.kind===`dropdown`&&r.slotName!==i.slotName)return!1}return!0}_sameUtilityItems(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.label!==i.label||r.href!==i.href||(r.target??``)!==(i.target??``))return!1}return!0}_sameMenuNodes(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.label!==i.label||(r.href??``)!==(i.href??``)||(r.icon??``)!==(i.icon??``)||!this._sameMenuNodes(r.children??[],i.children??[]))return!1}return!0}_isDrawerCloseNode(e){let t=e.tagName.toLowerCase(),n=e.getAttribute(`slot`);if(n===`drawer-close`)return!0;if(n||t!==`scb-icon-button`)return!1;let r=(e.getAttribute(`icon`)??``).trim().toLowerCase(),i=(e.getAttribute(`aria-label`)??``).trim().toLowerCase();return r===`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(let 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){let n=Number.parseFloat(String(e??``).trim());return Number.isFinite(n)?n:t}_tokenPx(e,t){let n=getComputedStyle(this);return this._num(n.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(){let e=this._tabsNav;if(!e||!this._visible(e))return!1;let t=Array.from(e.querySelectorAll(`.tab-wrap`));if(t.length===0)return!1;let n=e.getBoundingClientRect(),r=n.left;for(let e of t){let t=e.getBoundingClientRect();t.width<=0||t.right>r&&(r=t.right)}return r-n.left>n.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()});let 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;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){let e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,n=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty(`--scb-header-spacing-block-start`,t):this.style.removeProperty(`--scb-header-spacing-block-start`),n?this.style.setProperty(`--scb-header-spacing-block-end`,n):this.style.removeProperty(`--scb-header-spacing-block-end`)}_syncLandmarkAttributes(){let e=this.renderRoot.querySelector(`.header-landmark`);if(!e)return;if(!this.banner){e.removeAttribute(`role`),e.removeAttribute(`aria-label`);return}e.setAttribute(`role`,`banner`);let t=(this.bannerLabel??``).trim();t?e.setAttribute(`aria-label`,t):e.removeAttribute(`aria-label`)}_applyLogoSizing(){let e=(this.logoWidth??``).trim(),t=(this.logoHeight??``).trim(),n=(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`),n?this.style.setProperty(`--scb-header-logo-img-aspect-ratio`,n):this.style.removeProperty(`--scb-header-logo-img-aspect-ratio`)}_closeDrawerNow(){let e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1)}_openDrawerNow(){let e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0)}_ensureFocusRingReady(){customElements.get(`md-focus-ring`)||(this._focusRingImportPromise??=Promise.resolve().then(()=>(w(),Vt)).then(()=>void 0),this._focusRingImportPromise)}async _ensureDrawerReady(){this._drawerReady||(this._drawerImportPromise??=Promise.all([Promise.resolve().then(()=>(cu(),au)),Promise.resolve().then(()=>($u(),Qu)),Promise.resolve().then(()=>(Ml(),kl)),this._ensureDrawerSlotComponentsReady()]).then(()=>void 0),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`)?Promise.resolve().then(()=>(Gc(),Wc)):Promise.resolve(),this._drawerSlotContains(`scb-icon-button`)?Promise.resolve().then(()=>(fl(),dl)):Promise.resolve(),this._drawerSlotContains(`scb-skeleton`)?Promise.resolve().then(()=>(nd(),ed)):Promise.resolve(),this._drawerSlotContains(`scb-grid`)?Promise.resolve().then(()=>(Mu(),Au)):Promise.resolve(),this._drawerSlotContains(`scb-grid-item`)?Promise.resolve().then(()=>(Eu(),Cu)):Promise.resolve()])}async _ensureDropdownReady(){customElements.get(`scb-dropdown`)||(this._dropdownImportPromise??=Promise.resolve().then(()=>(_u(),hu)).then(()=>void 0),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){let 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;let n=this._getDropdownForSlot(e.slotName);if(!n)return;let r=String(t);n.getAttribute(`data-index`)!==r&&n.setAttribute(`data-index`,r),n.hasAttribute(`as-tab`)||n.setAttribute(`as-tab`,``);let i=this.size,a=n;a?.size!==i&&(a.size=i),t===this.activeTab?n.getAttribute(`aria-current`)!==`page`&&n.setAttribute(`aria-current`,`page`):n.hasAttribute(`aria-current`)&&n.removeAttribute(`aria-current`)})}_readTabIndexFromEvent(e){let t=e.composedPath?e.composedPath():[];for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-index`);if(t==null)continue;let n=Number(t);if(Number.isFinite(n))return n}return null}_focusTabAtIndex(e){let 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?.()}}_renderMenuNodes(e){return!e||e.length===0?b``:b`${e.map(e=>this._renderMenuNode(e))}`}_renderMenuNode(e){let t=Array.isArray(e.children)&&e.children.length>0,n=(e.href??``).trim(),r=(e.icon??``).trim(),i=t?b`
|
|
9713
9767
|
<scb-sub-menu label=${e.label}>
|
|
9714
9768
|
${e.children.map(e=>this._renderMenuNode(e))}
|
|
9715
9769
|
</scb-sub-menu>
|
|
@@ -9791,7 +9845,7 @@
|
|
|
9791
9845
|
</button>
|
|
9792
9846
|
`:x}
|
|
9793
9847
|
</form>
|
|
9794
|
-
`}render(){let e=this._getNavItems(),t=this._slotUtils.length?this._slotUtils:this.utilityItems,n=this._slotMenu.length?this._slotMenu:this.menuData??[],r=this.logoText||this.logotypeText,i=this.logoAlt||r||`Gå till startsidan`,a=this.querySelector(`[slot="drawer-menu"]`)!==null;this._syncFlags(t.length===0,!this.showSearch);let
|
|
9848
|
+
`}render(){let e=this._getNavItems(),t=this._slotUtils.length?this._slotUtils:this.utilityItems,n=this._slotMenu.length?this._slotMenu:this.menuData??[],r=this.logoText||this.logotypeText,i=this.logoAlt||r||`Gå till startsidan`,a=this.querySelector(`[slot="drawer-menu"]`)!==null,o=this.querySelector(`[slot="drawer-close"]`)!==null;this._syncFlags(t.length===0,!this.showSearch);let s=this.searchHeight&&this.searchHeight.trim()?`--scb-search-height:${this.searchHeight.trim()}`:``,c=e.length>0||this.reserveTabs||this.layoutPending,l=(this.reserveTabs||this.layoutPending)&&(this.layoutPending||e.length===0),u=this.showDrawer&&(!this.deferDrawer||this._drawerReady),d=typeof window<`u`&&window.innerWidth>=this.BP_MD,f=this.showDrawer&&(d?this.alwaysShowMenuButton||this._collapsed:!0),p=f&&!d,m=f&&d,h=(this.searchButtonLabel??``).trim()||`Sök`,ee=this.showSearch&&!this._mobileSearchOpen;return b`
|
|
9795
9849
|
<slot
|
|
9796
9850
|
id="data-slot"
|
|
9797
9851
|
@slotchange=${()=>{this._harvest(),this._attachSlotObservers()}}
|
|
@@ -9833,28 +9887,28 @@
|
|
|
9833
9887
|
</nav>
|
|
9834
9888
|
|
|
9835
9889
|
${this.showSearch?b`
|
|
9836
|
-
<div class="search" style=${
|
|
9837
|
-
${this._renderSearchForm(
|
|
9890
|
+
<div class="search" style=${s}>
|
|
9891
|
+
${this._renderSearchForm(h,s)}
|
|
9838
9892
|
</div>
|
|
9839
9893
|
`:x}
|
|
9840
|
-
${
|
|
9894
|
+
${ee?b`
|
|
9841
9895
|
<button
|
|
9842
9896
|
type="button"
|
|
9843
9897
|
class="mobile-search-trigger header-icon-button"
|
|
9844
|
-
aria-label=${
|
|
9845
|
-
title=${
|
|
9898
|
+
aria-label=${h}
|
|
9899
|
+
title=${h}
|
|
9846
9900
|
@click=${this._onMobileSearchToggle}
|
|
9847
9901
|
>
|
|
9848
9902
|
<span class="header-symbol" aria-hidden="true">search</span>
|
|
9849
9903
|
<md-focus-ring aria-hidden="true"></md-focus-ring>
|
|
9850
9904
|
</button>
|
|
9851
9905
|
`:x}
|
|
9852
|
-
${
|
|
9906
|
+
${p?this._renderMenuButton(``,!0):x}
|
|
9853
9907
|
</div>
|
|
9854
9908
|
|
|
9855
9909
|
${this.showSearch&&this._mobileSearchOpen?b`
|
|
9856
|
-
<div class="mobile-search-panel" style=${
|
|
9857
|
-
${this._renderSearchForm(
|
|
9910
|
+
<div class="mobile-search-panel" style=${s}>
|
|
9911
|
+
${this._renderSearchForm(h,s,!1,!0)}
|
|
9858
9912
|
<button
|
|
9859
9913
|
type="button"
|
|
9860
9914
|
class="mobile-search-close header-icon-button"
|
|
@@ -9872,8 +9926,8 @@
|
|
|
9872
9926
|
</div>
|
|
9873
9927
|
|
|
9874
9928
|
<div class="header-grid-item">
|
|
9875
|
-
<div class=${
|
|
9876
|
-
${
|
|
9929
|
+
<div class=${c||m?`tabs-row`:`tabs-row tabs-row--empty`}>
|
|
9930
|
+
${c?l?b`
|
|
9877
9931
|
<div class="tabs-inset">
|
|
9878
9932
|
<div class="tabs-nav tabs-nav--skeleton" aria-hidden="true">
|
|
9879
9933
|
${this._renderTabSkeletons()}
|
|
@@ -9922,14 +9976,14 @@
|
|
|
9922
9976
|
</div>
|
|
9923
9977
|
`:x:x}
|
|
9924
9978
|
|
|
9925
|
-
${
|
|
9979
|
+
${m?this._renderMenuButton(`menu-trigger--tabs-right`):x}
|
|
9926
9980
|
</div>
|
|
9927
9981
|
</div>
|
|
9928
9982
|
</div>
|
|
9929
9983
|
<div class="divider" role="presentation"></div>
|
|
9930
9984
|
</div>
|
|
9931
9985
|
|
|
9932
|
-
${
|
|
9986
|
+
${u?b`
|
|
9933
9987
|
<scb-drawer
|
|
9934
9988
|
id=${this._drawerId}
|
|
9935
9989
|
floating
|
|
@@ -9942,7 +9996,16 @@
|
|
|
9942
9996
|
@scb-drawer-closed=${this._onDrawerClosed}
|
|
9943
9997
|
@scb-menu-select=${this._onMenuSelect}
|
|
9944
9998
|
>
|
|
9945
|
-
|
|
9999
|
+
${o?b`
|
|
10000
|
+
<div class="drawer-close">
|
|
10001
|
+
<slot
|
|
10002
|
+
name="drawer-close"
|
|
10003
|
+
@slotchange=${this._ensureDrawerSlotComponentsReady}
|
|
10004
|
+
></slot>
|
|
10005
|
+
</div>
|
|
10006
|
+
`:x}
|
|
10007
|
+
|
|
10008
|
+
<slot name="drawer-menu" @slotchange=${this._ensureDrawerSlotComponentsReady}></slot>
|
|
9946
10009
|
|
|
9947
10010
|
${a?x:b`
|
|
9948
10011
|
<scb-menu
|
|
@@ -10009,7 +10072,7 @@
|
|
|
10009
10072
|
</clipPath>
|
|
10010
10073
|
</defs>
|
|
10011
10074
|
</svg>
|
|
10012
|
-
`}};
|
|
10075
|
+
`}};P([g({type:String,attribute:`max-width`})],X.prototype,`maxWidth`,void 0),P([g({type:String,reflect:!0})],X.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],X.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],X.prototype,`spacingBottom`,void 0),P([g({type:String,reflect:!0,converter:sd})],X.prototype,`size`,void 0),P([g({type:String,attribute:`logo-text`})],X.prototype,`logoText`,void 0),P([g({type:String,attribute:`logotype-text`})],X.prototype,`logotypeText`,void 0),P([g({type:String,attribute:`logo-alt`})],X.prototype,`logoAlt`,void 0),P([g({type:String,attribute:`logo-href`})],X.prototype,`logoHref`,void 0),P([g({type:String,attribute:`logo-src`})],X.prototype,`logoSrc`,void 0),P([g({type:String,attribute:`logo-width`})],X.prototype,`logoWidth`,void 0),P([g({type:String,attribute:`logo-height`})],X.prototype,`logoHeight`,void 0),P([g({type:String,attribute:`logo-aspect-ratio`})],X.prototype,`logoAspectRatio`,void 0),P([g({type:Boolean,attribute:`logo-invert-dm`,reflect:!0,converter:od})],X.prototype,`logoInvertDm`,void 0),P([g({type:Boolean,reflect:!0})],X.prototype,`banner`,void 0),P([g({type:String,attribute:`banner-label`})],X.prototype,`bannerLabel`,void 0),P([g({type:Array,attribute:`tabs`,converter:X._JSON_ARRAY})],X.prototype,`tabs`,void 0),P([g({type:Number,attribute:`active-tab`})],X.prototype,`activeTab`,void 0),P([g({type:Boolean,attribute:`reserve-tabs`,reflect:!0,converter:od})],X.prototype,`reserveTabs`,void 0),P([g({type:Number,attribute:`reserve-tabs-count`})],X.prototype,`reserveTabsCount`,void 0),P([g({type:String,attribute:`reserve-tabs-widths`})],X.prototype,`reserveTabsWidths`,void 0),P([g({type:Boolean,attribute:`layout-pending`,reflect:!0,converter:od})],X.prototype,`layoutPending`,void 0),P([g({type:Array,attribute:`utility-items`,converter:X._JSON_ARRAY})],X.prototype,`utilityItems`,void 0),P([g({type:String,attribute:`search-placeholder`})],X.prototype,`searchPlaceholder`,void 0),P([g({type:String,attribute:`search-button-label`})],X.prototype,`searchButtonLabel`,void 0),P([g({type:String,attribute:`menu-label`})],X.prototype,`menuLabel`,void 0),P([g({type:String,attribute:`menu-button-label`})],X.prototype,`menuButtonLabel`,void 0),P([g({type:String,attribute:`menu-sub-label`})],X.prototype,`menuSubLabel`,void 0),P([g({type:String,attribute:`menu-section-label`})],X.prototype,`menuSectionLabel`,void 0),P([g({type:String,attribute:`menu-search-placeholder`})],X.prototype,`menuSearchPlaceholder`,void 0),P([g({type:Array,attribute:`menu-data`,converter:X._JSON_ARRAY})],X.prototype,`menuData`,void 0),P([g({type:Boolean,attribute:`defer-drawer`,reflect:!0,converter:od})],X.prototype,`deferDrawer`,void 0),P([g({type:Boolean,attribute:`show-drawer`,reflect:!0,converter:ad})],X.prototype,`showDrawer`,void 0),P([g({type:Boolean,attribute:`always-show-menu-button`,reflect:!0,converter:od})],X.prototype,`alwaysShowMenuButton`,void 0),P([g({type:Boolean,attribute:`show-search`,reflect:!0,converter:ad})],X.prototype,`showSearch`,void 0),P([g({type:Boolean,attribute:`include-utility-in-menu`,reflect:!0,converter:od})],X.prototype,`includeUtilityInMenu`,void 0),P([g({type:Boolean,attribute:`drawer-overlay`,reflect:!0,converter:ad})],X.prototype,`drawerOverlay`,void 0),P([g({type:String,attribute:`search-max`})],X.prototype,`searchMax`,void 0),P([g({type:String,attribute:`search-min`})],X.prototype,`searchMin`,void 0),P([g({type:String,attribute:`search-height`})],X.prototype,`searchHeight`,void 0),P([g({type:String,attribute:`search-text`,reflect:!0})],X.prototype,`searchText`,void 0),P([_()],X.prototype,`_drawerId`,void 0),P([_()],X.prototype,`_menuExpanded`,void 0),P([_()],X.prototype,`_searchId`,void 0),P([_()],X.prototype,`_drawerReady`,void 0),P([_()],X.prototype,`_mobileSearchOpen`,void 0),P([_()],X.prototype,`_slotNavItems`,void 0),P([_()],X.prototype,`_slotUtils`,void 0),P([_()],X.prototype,`_slotMenu`,void 0),P([_()],X.prototype,`_collapsed`,void 0),P([_()],X.prototype,`_hideLogoText`,void 0),X=rd=P([a(`scb-header`)],X),C(),y(),w(),F();var cd,ld={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},ud=class extends S{static{cd=this}constructor(...e){super(...e),this.keyfigure=0,this.subtitle=``,this.supportingText=``,this.cardHref=``,this.href=``,this.icon=``,this.size=`large`,this.unit=``,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.sizing=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__onKeyDown=e=>{let t=this.__effectiveHref;(e.key===`Enter`||e.key===` `)&&t&&(e.preventDefault(),this.__navigate(t,e))},this.__handleHrefNavigation=e=>{let t=this.__effectiveHref;t&&(e.target.closest(`a`)||this.__navigate(t,e))}}static{this.__iconLoaded=!1}static{this.__rippleLoaded=!1}static{this.styles=p`
|
|
10013
10076
|
:host {
|
|
10014
10077
|
display: block;
|
|
10015
10078
|
box-sizing: border-box;
|
|
@@ -10212,7 +10275,7 @@
|
|
|
10212
10275
|
--scb-keyfigure-card-value-line-height: var(--md-sys-typescale-display-medium-line-height, 42px);
|
|
10213
10276
|
--scb-keyfigure-card-value-letter-spacing: var(--md-sys-typescale-display-medium-tracking, -0.6px);
|
|
10214
10277
|
}
|
|
10215
|
-
`}formatNumber(e){if(typeof e==`number`)return e.toLocaleString(`sv-SE`).replace(/\u00A0/g,` `);let t=Number(e);return Number.isNaN(t)?String(e):t.toLocaleString(`sv-SE`).replace(/\u00A0/g,` `)}async firstUpdated(){
|
|
10278
|
+
`}formatNumber(e){if(typeof e==`number`)return e.toLocaleString(`sv-SE`).replace(/\u00A0/g,` `);let t=Number(e);return Number.isNaN(t)?String(e):t.toLocaleString(`sv-SE`).replace(/\u00A0/g,` `)}async firstUpdated(){cd.__iconLoaded||(await Promise.resolve().then(()=>(k(),ea)),cd.__iconLoaded=!0),cd.__rippleLoaded||(await Promise.resolve().then(()=>(E(),hn)),cd.__rippleLoaded=!0),this.__applyInnerSizing(),this.#e()}get __effectiveHref(){return(this.cardHref||this.href||``).trim()}__hasSlottedContent(e){return Array.from(this.children).some(t=>t.getAttribute(`slot`)===e)}__slottedText(e){return Array.from(this.children).filter(t=>t.getAttribute(`slot`)===e).map(e=>e.textContent?.trim()??``).filter(Boolean).join(` `)}render(){let e=this.__effectiveHref,t=!!e,n=this.formatNumber(this.keyfigure),r=(this.unit||``).trim(),i=r?`${n} ${r}`:n,a=this.__hasSlottedContent(`icon`),o=this.__hasSlottedContent(`subtitle`),s=this.__hasSlottedContent(`supporting-text`),c=o?this.__slottedText(`subtitle`):this.subtitle,l=this.supportingText,u=o||!!c,d=s||!!l;return b`
|
|
10216
10279
|
<div
|
|
10217
10280
|
class="scb-keyfigure-card ${t?`clickable`:``} ${this.size}"
|
|
10218
10281
|
role=${t?`link`:`group`}
|
|
@@ -10248,7 +10311,7 @@
|
|
|
10248
10311
|
</div>
|
|
10249
10312
|
|
|
10250
10313
|
${t?b`<md-focus-ring></md-focus-ring>`:``}
|
|
10251
|
-
`}__applyInnerSizing(){let e=this.renderRoot.querySelector(`.scb-keyfigure-card`);e&&(this.width&&this.width.trim()!==``?(e.style.inlineSize=`100%`,e.style.maxInlineSize=`100%`):(e.style.removeProperty(`inline-size`),e.style.removeProperty(`max-inline-size`)),this.height&&this.height.trim()!==``||this.sizing===`stretch`?e.style.blockSize=`100%`:e.style.removeProperty(`block-size`),this.maxHeight&&this.maxHeight.trim()!==``?e.style.maxBlockSize=`100%`:e.style.removeProperty(`max-block-size`))}updated(e){super.updated(e),e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),(e.has(`width`)||e.has(`height`)||e.has(`maxHeight`)||e.has(`sizing`))&&this.__applyInnerSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-keyfigure-card-spacing-block-start`,t):this.style.removeProperty(`--scb-keyfigure-card-spacing-block-start`),n?this.style.setProperty(`--scb-keyfigure-card-spacing-block-end`,n):this.style.removeProperty(`--scb-keyfigure-card-spacing-block-end`),r?this.style.setProperty(`--scb-keyfigure-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-keyfigure-card-spacing-inline-start`),i?this.style.setProperty(`--scb-keyfigure-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-keyfigure-card-spacing-inline-end`)}__dispatchNavigateEvents(e,t){let n={href:e},r=new CustomEvent(`card-navigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}),i=new CustomEvent(`cardnavigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(r)&&this.dispatchEvent(i)}__navigate(e,t){this.__dispatchNavigateEvents(e,t)&&(window.location.href=e)}};
|
|
10314
|
+
`}__applyInnerSizing(){let e=this.renderRoot.querySelector(`.scb-keyfigure-card`);e&&(this.width&&this.width.trim()!==``?(e.style.inlineSize=`100%`,e.style.maxInlineSize=`100%`):(e.style.removeProperty(`inline-size`),e.style.removeProperty(`max-inline-size`)),this.height&&this.height.trim()!==``||this.sizing===`stretch`?e.style.blockSize=`100%`:e.style.removeProperty(`block-size`),this.maxHeight&&this.maxHeight.trim()!==``?e.style.maxBlockSize=`100%`:e.style.removeProperty(`max-block-size`))}updated(e){super.updated(e),e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),(e.has(`width`)||e.has(`height`)||e.has(`maxHeight`)||e.has(`sizing`))&&this.__applyInnerSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-keyfigure-card-spacing-block-start`,t):this.style.removeProperty(`--scb-keyfigure-card-spacing-block-start`),n?this.style.setProperty(`--scb-keyfigure-card-spacing-block-end`,n):this.style.removeProperty(`--scb-keyfigure-card-spacing-block-end`),r?this.style.setProperty(`--scb-keyfigure-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-keyfigure-card-spacing-inline-start`),i?this.style.setProperty(`--scb-keyfigure-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-keyfigure-card-spacing-inline-end`)}__dispatchNavigateEvents(e,t){let n={href:e},r=new CustomEvent(`card-navigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}),i=new CustomEvent(`cardnavigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(r)&&this.dispatchEvent(i)}__navigate(e,t){this.__dispatchNavigateEvents(e,t)&&(window.location.href=e)}};P([g({attribute:`keyfigure`})],ud.prototype,`keyfigure`,void 0),P([g({type:String,attribute:`subtitle`})],ud.prototype,`subtitle`,void 0),P([g({type:String,attribute:`supporting-text`})],ud.prototype,`supportingText`,void 0),P([g({type:String,attribute:`card-href`})],ud.prototype,`cardHref`,void 0),P([g({type:String,attribute:`href`})],ud.prototype,`href`,void 0),P([g({type:String})],ud.prototype,`icon`,void 0),P([g({type:String,reflect:!0})],ud.prototype,`size`,void 0),P([g({type:String})],ud.prototype,`unit`,void 0),P([g({type:String,reflect:!0})],ud.prototype,`width`,void 0),P([g({type:String,reflect:!0,attribute:`max-width`})],ud.prototype,`maxWidth`,void 0),P([g({type:String,reflect:!0})],ud.prototype,`height`,void 0),P([g({type:String,reflect:!0,attribute:`max-height`})],ud.prototype,`maxHeight`,void 0),P([g({type:String,reflect:!0,converter:ld})],ud.prototype,`sizing`,void 0),P([g({type:String,reflect:!0})],ud.prototype,`spacing`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-top`})],ud.prototype,`spacingTop`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-bottom`})],ud.prototype,`spacingBottom`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-left`})],ud.prototype,`spacingLeft`,void 0),P([g({type:String,reflect:!0,attribute:`spacing-right`})],ud.prototype,`spacingRight`,void 0),ud=cd=P([a(`scb-keyfigure-card`)],ud),$u(),C(),y(),F();var dd=class extends S{constructor(...e){super(...e),this.href=``,this.dataHref=``,this.disabled=!1,this.__onClick=e=>{if(e.defaultPrevented)return;if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}let t=(this.href||``).trim();if(t){if(t.startsWith(`#`)){typeof window<`u`&&(window.location.hash=t.slice(1));return}if((this.getAttribute(`target`)||``).trim()===`_blank`){window.open(t,`_blank`,`noopener,noreferrer`);return}window.location.href=t}},this.__onKeyDown=e=>{if(!this.disabled){if(e.key===`Enter`){e.preventDefault(),this.click();return}e.key===` `&&e.preventDefault()}},this.__onKeyUp=e=>{this.disabled||e.key===` `&&(e.preventDefault(),this.click())}}static{this.styles=p`
|
|
10252
10315
|
:host {
|
|
10253
10316
|
display: inline-flex;
|
|
10254
10317
|
align-items: center;
|
|
@@ -10275,7 +10338,7 @@
|
|
|
10275
10338
|
.label {
|
|
10276
10339
|
pointer-events: none;
|
|
10277
10340
|
}
|
|
10278
|
-
`}connectedCallback(){super.connectedCallback(),this.addEventListener(`click`,this.__onClick),this.addEventListener(`keydown`,this.__onKeyDown),this.addEventListener(`keyup`,this.__onKeyUp),this.__syncA11y()}disconnectedCallback(){this.removeEventListener(`click`,this.__onClick),this.removeEventListener(`keydown`,this.__onKeyDown),this.removeEventListener(`keyup`,this.__onKeyUp),super.disconnectedCallback()}updated(){this.__syncA11y()}__syncA11y(){let e=!!(this.href||``).trim();if(this.disabled){this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1,this.removeAttribute(`role`);return}this.removeAttribute(`aria-disabled`),this.tabIndex=0,this.setAttribute(`role`,e?`link`:`button`)}render(){return b`<span class="label"><slot></slot></span>`}};
|
|
10341
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener(`click`,this.__onClick),this.addEventListener(`keydown`,this.__onKeyDown),this.addEventListener(`keyup`,this.__onKeyUp),this.__syncA11y()}disconnectedCallback(){this.removeEventListener(`click`,this.__onClick),this.removeEventListener(`keydown`,this.__onKeyDown),this.removeEventListener(`keyup`,this.__onKeyUp),super.disconnectedCallback()}updated(){this.__syncA11y()}__syncA11y(){let e=!!(this.href||``).trim();if(this.disabled){this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1,this.removeAttribute(`role`);return}this.removeAttribute(`aria-disabled`),this.tabIndex=0,this.setAttribute(`role`,e?`link`:`button`)}render(){return b`<span class="label"><slot></slot></span>`}};P([g({type:String})],dd.prototype,`href`,void 0),P([g({type:String,attribute:`data-href`})],dd.prototype,`dataHref`,void 0),P([g({type:Boolean,reflect:!0})],dd.prototype,`disabled`,void 0),dd=P([a(`scb-nav-item`)],dd),C(),y(),E(),w(),F();var fd={fromAttribute(e){return e===null?!1:e.toLowerCase()!==`false`}},pd=class extends S{constructor(...e){super(...e),this.label=``,this.activeHref=``,this.activateOnClick=!0,this.sticky=!1,this.stickyTop=`0px`,this.stickyZIndex=5,this.stickyBackground=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__autoAriaLabel=!1,this.__itemIdPrefix=`scb-nav-${Math.random().toString(36).slice(2)}`,this.__itemIdCounter=0,this.__onSlotChange=async()=>{await this.__decorateItems(),this.__applyActiveHref()},this.__onClick=e=>{let t=e.composedPath().find(e=>e instanceof HTMLElement&&(e.tagName===`A`||e.tagName===`BUTTON`||e.tagName===`SCB-NAV-ITEM`));if(!t)return;let n=this.__getItemHref(t);this.dispatchEvent(new CustomEvent(`scb-nav-select`,{bubbles:!0,composed:!0,detail:{item:t,href:n}})),this.dispatchEvent(new CustomEvent(`scbnavselect`,{bubbles:!0,composed:!0,detail:{item:t,href:n}})),this.activateOnClick&&n&&(this.activeHref=n)}}static{this.styles=p`
|
|
10279
10342
|
:host {
|
|
10280
10343
|
display: block;
|
|
10281
10344
|
color: var(--md-sys-color-on-surface);
|
|
@@ -10380,7 +10443,7 @@
|
|
|
10380
10443
|
<slot @slotchange=${this.__onSlotChange}></slot>
|
|
10381
10444
|
</div>
|
|
10382
10445
|
</div>
|
|
10383
|
-
`}};
|
|
10446
|
+
`}};P([g({type:String})],pd.prototype,`label`,void 0),P([g({type:String,attribute:`active-href`})],pd.prototype,`activeHref`,void 0),P([g({type:Boolean,attribute:`activate-on-click`,converter:fd})],pd.prototype,`activateOnClick`,void 0),P([g({type:Boolean,reflect:!0})],pd.prototype,`sticky`,void 0),P([g({type:String,attribute:`sticky-top`})],pd.prototype,`stickyTop`,void 0),P([g({type:Number,attribute:`sticky-z-index`})],pd.prototype,`stickyZIndex`,void 0),P([g({type:String,attribute:`sticky-background`})],pd.prototype,`stickyBackground`,void 0),P([g({type:String,reflect:!0})],pd.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],pd.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],pd.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],pd.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],pd.prototype,`spacingRight`,void 0),pd=P([a(`scb-nav`)],pd),C(),y(),k(),w(),fl(),F();var md={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Z=class extends S{constructor(...e){super(...e),this.variant=`success`,this.direction=`horizontal`,this.size=`large`,this.title=``,this.notificationCardTitle=``,this.subtitle=``,this.supportingText=``,this.open=!1,this.linkText=``,this.linkHref=`#`,this.href=``,this.showIcon=!1,this.showCloseButton=!1,this.sizing=``,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__hasHeading=!1,this.__hasSubtitle=!1,this.__hasSupportingText=!1,this.__hasFooter=!1,this.__hasIcon=!1,this._closeNotification=()=>{this.open=!1;let e=new CustomEvent(`openchange`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e);let t=new CustomEvent(`notification-close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t);let n=new CustomEvent(`close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(n);let r=new CustomEvent(`Close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(r)},this.__syncSlots=()=>{this.__hasHeading=this.__slotHasContent(`heading`),this.__hasSubtitle=this.__slotHasContent(`subtitle`),this.__hasSupportingText=this.__slotHasContent(`supporting-text`),this.__hasFooter=this.__slotHasContent(`footer`),this.__hasIcon=this.__slotHasContent(`icon`)}}get#e(){return this.notificationCardTitle||this.title}static{this.styles=[p`
|
|
10384
10447
|
:host {
|
|
10385
10448
|
display: block;
|
|
10386
10449
|
position: relative;
|
|
@@ -10780,7 +10843,7 @@
|
|
|
10780
10843
|
`:null}
|
|
10781
10844
|
</div>
|
|
10782
10845
|
<md-focus-ring></md-focus-ring>
|
|
10783
|
-
`}};
|
|
10846
|
+
`}};P([g({type:String,reflect:!0})],Z.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],Z.prototype,`direction`,void 0),P([g({type:String,reflect:!0})],Z.prototype,`size`,void 0),P([g({type:String})],Z.prototype,`title`,void 0),P([g({type:String,attribute:`notification-card-title`})],Z.prototype,`notificationCardTitle`,void 0),P([g({type:String})],Z.prototype,`subtitle`,void 0),P([g({type:String,attribute:`supporting-text`})],Z.prototype,`supportingText`,void 0),P([g({type:Boolean,reflect:!0})],Z.prototype,`open`,void 0),P([g({type:String,attribute:`link-text`})],Z.prototype,`linkText`,void 0),P([g({type:String,attribute:`link-href`})],Z.prototype,`linkHref`,void 0),P([g({type:String})],Z.prototype,`href`,void 0),P([g({type:Boolean,attribute:`show-icon`})],Z.prototype,`showIcon`,void 0),P([g({type:Boolean,attribute:`show-close-button`})],Z.prototype,`showCloseButton`,void 0),P([g({type:String,reflect:!0,converter:md})],Z.prototype,`sizing`,void 0),P([g({type:String,reflect:!0})],Z.prototype,`width`,void 0),P([g({type:String,reflect:!0,attribute:`max-width`})],Z.prototype,`maxWidth`,void 0),P([g({type:String,reflect:!0})],Z.prototype,`height`,void 0),P([g({type:String,reflect:!0,attribute:`max-height`})],Z.prototype,`maxHeight`,void 0),P([g({type:Boolean,reflect:!0,attribute:`full-height`})],Z.prototype,`fullHeight`,void 0),P([g({type:Boolean,reflect:!0,attribute:`full-width`})],Z.prototype,`fullWidth`,void 0),P([g({type:String})],Z.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`})],Z.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`})],Z.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`})],Z.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`})],Z.prototype,`spacingRight`,void 0),P([_()],Z.prototype,`__hasHeading`,void 0),P([_()],Z.prototype,`__hasSubtitle`,void 0),P([_()],Z.prototype,`__hasSupportingText`,void 0),P([_()],Z.prototype,`__hasFooter`,void 0),P([_()],Z.prototype,`__hasIcon`,void 0),Z=P([a(`scb-notification-card`)],Z),C(),y(),Gc(),fl(),k(),w(),F();var hd=class extends S{constructor(...e){super(...e),this.variant=`icon-text`,this.alignment=`start`,this.page=1,this.totalPages=0,this.pagingHref=``,this.baseUri=``,this.paginationAriaLabel=`Paginering`,this.currentAriaLabel=`Nuvarande sida, `,this.pagingNumberAriaLabel=`Gå till sida `,this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}static{this.styles=[p`
|
|
10784
10847
|
:host {
|
|
10785
10848
|
display: block;
|
|
10786
10849
|
width: 100%;
|
|
@@ -11111,7 +11174,7 @@
|
|
|
11111
11174
|
</div>
|
|
11112
11175
|
</div>
|
|
11113
11176
|
</nav>
|
|
11114
|
-
`}};
|
|
11177
|
+
`}};P([g({type:String})],hd.prototype,`variant`,void 0),P([g({type:String})],hd.prototype,`alignment`,void 0),P([g({type:Number})],hd.prototype,`page`,void 0),P([g({type:Number,attribute:`total-pages`})],hd.prototype,`totalPages`,void 0),P([g({type:String,attribute:`paging-href`})],hd.prototype,`pagingHref`,void 0),P([g({type:String,attribute:`base-uri`})],hd.prototype,`baseUri`,void 0),P([g({type:String,attribute:`pagination-aria-label`})],hd.prototype,`paginationAriaLabel`,void 0),P([g({type:String,attribute:`current-aria-label`})],hd.prototype,`currentAriaLabel`,void 0),P([g({type:String,attribute:`paging-number-aria-label`})],hd.prototype,`pagingNumberAriaLabel`,void 0),P([g({type:Boolean})],hd.prototype,`isNarrow`,void 0),P([g({type:String})],hd.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`})],hd.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`})],hd.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`})],hd.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`})],hd.prototype,`spacingRight`,void 0),hd=P([a(`scb-pagination`)],hd),C(),y(),F();var gd={fromAttribute(e){return e===null?!1:e.toLowerCase()!==`false`}},_d=class extends S{constructor(...e){super(...e),this.id=``,this.type=`circular`,this.progress=25,this.isStatic=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._isSyncingAria=!1,this._defaultAriaLabelApplied=!1,this._defaultAriaValueTextApplied=!1}static{this.styles=[p`
|
|
11115
11178
|
|
|
11116
11179
|
.circular {
|
|
11117
11180
|
display: flex;
|
|
@@ -11197,7 +11260,7 @@
|
|
|
11197
11260
|
</div>
|
|
11198
11261
|
`}
|
|
11199
11262
|
</div>
|
|
11200
|
-
`}};
|
|
11263
|
+
`}};P([g({type:String})],_d.prototype,`id`,void 0),P([g({type:String,reflect:!0})],_d.prototype,`type`,void 0),P([g({type:Number,reflect:!0})],_d.prototype,`progress`,void 0),P([g({type:Boolean,attribute:`is-static`,converter:gd})],_d.prototype,`isStatic`,void 0),P([g({type:String,reflect:!0})],_d.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],_d.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],_d.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],_d.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],_d.prototype,`spacingRight`,void 0),_d=P([a(`scb-progress-indicator`)],_d),E(),C(),y(),w(),F();var vd=class extends S{constructor(...e){super(...e),this.width=`100%`,this.active=!1,this.disabled=!1,this.href=``,this.label=``,this.position=`top`,this._stepId=`scb-step-${Math.random().toString(36).slice(2)}`}static{this.styles=p`
|
|
11201
11264
|
:host {
|
|
11202
11265
|
display: block;
|
|
11203
11266
|
width: var(--progress-step-width, 100%);
|
|
@@ -11343,7 +11406,7 @@
|
|
|
11343
11406
|
`}
|
|
11344
11407
|
${this.disabled?``:b`<md-focus-ring for="${this._stepId}"></md-focus-ring>`}
|
|
11345
11408
|
${this.label&&!this.disabled?b`<div class="tooltip ${this.position===`bottom`?`bottom`:`top`}">${this.label}</div>`:``}
|
|
11346
|
-
`}};
|
|
11409
|
+
`}};P([g({type:String})],vd.prototype,`width`,void 0),P([g({type:Boolean,reflect:!0})],vd.prototype,`active`,void 0),P([g({type:Boolean,reflect:!0})],vd.prototype,`disabled`,void 0),P([g({type:String,reflect:!0})],vd.prototype,`href`,void 0),P([g({type:String})],vd.prototype,`label`,void 0),P([g({type:String})],vd.prototype,`position`,void 0),P([_()],vd.prototype,`_stepId`,void 0),vd=P([a(`scb-progress-step`)],vd),C(),y(),F();var yd=class extends S{constructor(...e){super(...e),this.progressWidth=23,this.height=`normal`,this.position=`top`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
|
|
11347
11410
|
:host {
|
|
11348
11411
|
display: block;
|
|
11349
11412
|
width: 100%;
|
|
@@ -11397,14 +11460,14 @@
|
|
|
11397
11460
|
position: relative;
|
|
11398
11461
|
gap: 0;
|
|
11399
11462
|
}
|
|
11400
|
-
`}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-progress-stepper-spacing-block-start`,t):this.style.removeProperty(`--scb-progress-stepper-spacing-block-start`),n?this.style.setProperty(`--scb-progress-stepper-spacing-block-end`,n):this.style.removeProperty(`--scb-progress-stepper-spacing-block-end`),r?this.style.setProperty(`--scb-progress-stepper-spacing-inline-start`,r):this.style.removeProperty(`--scb-progress-stepper-spacing-inline-start`),i?this.style.setProperty(`--scb-progress-stepper-spacing-inline-end`,i):this.style.removeProperty(`--scb-progress-stepper-spacing-inline-end`)}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing();let t=this.shadowRoot?.querySelector(`slot`);if(!t)return;e.has(`progressWidth`)&&t.dispatchEvent(new Event(`slotchange`));let n=t.assignedElements({flatten:!0}),r=this.progressWidth,i=0;n.forEach((e,t)=>{if(e instanceof
|
|
11463
|
+
`}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-progress-stepper-spacing-block-start`,t):this.style.removeProperty(`--scb-progress-stepper-spacing-block-start`),n?this.style.setProperty(`--scb-progress-stepper-spacing-block-end`,n):this.style.removeProperty(`--scb-progress-stepper-spacing-block-end`),r?this.style.setProperty(`--scb-progress-stepper-spacing-inline-start`,r):this.style.removeProperty(`--scb-progress-stepper-spacing-inline-start`),i?this.style.setProperty(`--scb-progress-stepper-spacing-inline-end`,i):this.style.removeProperty(`--scb-progress-stepper-spacing-inline-end`)}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing();let t=this.shadowRoot?.querySelector(`slot`);if(!t)return;e.has(`progressWidth`)&&t.dispatchEvent(new Event(`slotchange`));let n=t.assignedElements({flatten:!0}),r=this.progressWidth,i=0;n.forEach((e,t)=>{if(e instanceof vd){let a=typeof e.width==`string`?parseFloat(e.width.replace(`%`,``)):Number(e.width);i+=a,this.position==`bottom`?e.setAttribute(`position`,`bottom`):e.setAttribute(`position`,`top`),i<=r+2?e.setAttribute(`active`,`true`):e.removeAttribute(`active`),t===n.length-1?e.classList.add(`last-step`):e.classList.remove(`last-step`)}})}render(){return b`
|
|
11401
11464
|
<div class="progress-bar">
|
|
11402
11465
|
<div class="progress-bar__fill" style="width: ${this.progressWidth}%;"></div>
|
|
11403
11466
|
</div>
|
|
11404
11467
|
<div class="progress-container">
|
|
11405
11468
|
<slot></slot>
|
|
11406
11469
|
</div>
|
|
11407
|
-
`}};
|
|
11470
|
+
`}};P([g({type:Number,reflect:!0,attribute:`progress-width`})],yd.prototype,`progressWidth`,void 0),P([g({type:String,reflect:!0})],yd.prototype,`height`,void 0),P([g({type:String,reflect:!0})],yd.prototype,`position`,void 0),P([g({type:String,reflect:!0})],yd.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],yd.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],yd.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],yd.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],yd.prototype,`spacingRight`,void 0),yd=P([a(`scb-progress-stepper`)],yd),C(),y(),F();var bd=class extends S{constructor(...e){super(...e),this.navSelector=``,this.offsetTop=0,this.offsetBottom=0,this.updateHash=!0,this.activeId=``,this.layout=``,this.sidebarNavWidth=`320px`,this.sidebarHeight=`560px`,this.stackHeight=``,this.sidebarNavTop=`0px`,this.contentPadding=`0px`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__navEl=null,this.__contentEl=null,this.__contentShellEl=null,this.__links=[],this.__observer=null,this.__fallbackScrollRoot=null,this.__entries=new Map,this.__rafId=null,this.__scrollRafId=null,this.__hashAllowUpdates=!1,this.__hashBaselineReady=!1,this.__hashBaselinePos=0,this.__hashBaselineRafId=null,this.__hashScrollRoot=null,this.__hashSuspend=!1,this.__hashInitialApplied=!1,this.__onHashScrollBound=()=>this.__onHashScroll(),this.__scrollAnimSeq=0,this.__syncingActiveId=!1,this.__slotsResolvedOnce=!1,this.__motionMeasureEl=null,this.__focusableRafId=null,this.__autoOffsetTop=0,this.__autoOffsetRafId=null,this.__navResizeObserver=null,this.__onNavClickBound=e=>this.__onNavClick(e),this.__onScrollFallbackBound=()=>this.__updateActiveFromRects(),this.__onResizeBound=()=>{this.__requestActiveRecalc(),this.__requestAutoOffsetMeasure()},this.__onSlotChange=()=>{let e=this.__navEl;this.__teardown(),this.__resolveSlots(),this.__requestEnsureContentFocusable(),this.__navEl&&this.__navEl.addEventListener(`click`,this.__onNavClickBound,!0),(e!==this.__navEl||!this.__links.length)&&this.__collectLinks(),this.__requestAutoOffsetMeasure(),this.__rebuildObserver(),this.__attachHashScrollRoot(),this.__applyInitialHashIfAny(),!this.__hashInitialApplied&&this.activeId&&this.__applyActiveId(this.activeId,{updateHash:!1,scrollToTarget:!1}),this.__slotsResolvedOnce=!0}}static{this.properties={navSelector:{type:String,attribute:`nav-selector`},offsetTop:{type:Number,attribute:`offset-top`},offsetBottom:{type:Number,attribute:`offset-bottom`},updateHash:{type:Boolean,attribute:`update-hash`,converter:{fromAttribute:e=>{if(e===null)return!0;let t=e.trim().toLowerCase();return!(t===`false`||t===`0`||t===`no`)},toAttribute:e=>e?``:null}},activeId:{type:String,attribute:`active-id`,reflect:!0},layout:{type:String,reflect:!0},sidebarNavWidth:{type:String,attribute:`sidebar-nav-width`},sidebarHeight:{type:String,attribute:`sidebar-height`},stackHeight:{type:String,attribute:`stack-height`},sidebarNavTop:{type:String,attribute:`sidebar-nav-top`},contentPadding:{type:String,attribute:`content-padding`},spacing:{type:String,reflect:!0},spacingTop:{type:String,attribute:`spacing-top`,reflect:!0},spacingBottom:{type:String,attribute:`spacing-bottom`,reflect:!0},spacingLeft:{type:String,attribute:`spacing-left`,reflect:!0},spacingRight:{type:String,attribute:`spacing-right`,reflect:!0}}}static{this.styles=p`
|
|
11408
11471
|
:host {
|
|
11409
11472
|
display: contents;
|
|
11410
11473
|
}
|
|
@@ -11482,7 +11545,7 @@
|
|
|
11482
11545
|
`}return b`
|
|
11483
11546
|
<slot name="nav" @slotchange=${this.__onSlotChange}></slot>
|
|
11484
11547
|
<slot name="content" @slotchange=${this.__onSlotChange}></slot>
|
|
11485
|
-
`}};
|
|
11548
|
+
`}};bd=P([a(`scb-scrollspy`)],bd),C(),y(),k(),w(),E(),F();var xd=class extends S{constructor(...e){super(...e),this.label=``,this.value=``,this.selected=!1,this.icon=``,this.href=``,this.disabled=!1,this.onHostKeydown=e=>{if(!this.href||this.isEffectivelyDisabled||e.code!==`Space`&&e.code!==`Enter`&&e.code!==`NumpadEnter`)return;let t=this.shadowRoot?.querySelector(`a[href]`);t&&(e.preventDefault(),e.stopPropagation(),t.click())}}get isEffectivelyDisabled(){let e=this.parentElement?.hasAttribute?.(`disabled`);return this.disabled||!!e}get hasDefaultSlotContent(){return Array.from(this.childNodes).some(e=>e.nodeType===1?!0:e.nodeType===3?(e.textContent??``).trim()!==``:!1)}static{this.styles=p`
|
|
11486
11549
|
.segmented-item {
|
|
11487
11550
|
display: flex;
|
|
11488
11551
|
gap: var(--spacing-3);
|
|
@@ -11555,7 +11618,7 @@
|
|
|
11555
11618
|
${this.selected?t&&n?b`<md-icon>check</md-icon>`:t?b`<md-icon>check</md-icon><md-icon>${this.icon}</md-icon>`:b`<md-icon>check</md-icon>`:t?b`<md-icon>${this.icon}</md-icon>`:``}
|
|
11556
11619
|
${n?b`<span>${r}</span>`:``}
|
|
11557
11620
|
<md-focus-ring inward></md-focus-ring>
|
|
11558
|
-
`;return this.href?b`<a class="${i}" href="${this.href}" aria-disabled="${e?`true`:`false`}" tabindex="-1">${a}</a>`:b`<div class="${i}" aria-disabled="${e?`true`:`false`}">${a}</div>`}updateInteractiveAttributes(){this.setAttribute(`tabindex`,this.disabled?`-1`:`0`),this.setAttribute(`role`,this.href?`link`:`button`)}firstUpdated(){this.addEventListener(`keydown`,this.onHostKeydown),this.updateInteractiveAttributes()}disconnectedCallback(){this.removeEventListener(`keydown`,this.onHostKeydown),super.disconnectedCallback()}updated(e){super.updated(e),(e.has(`disabled`)||e.has(`href`))&&this.updateInteractiveAttributes()}};
|
|
11621
|
+
`;return this.href?b`<a class="${i}" href="${this.href}" aria-disabled="${e?`true`:`false`}" tabindex="-1">${a}</a>`:b`<div class="${i}" aria-disabled="${e?`true`:`false`}">${a}</div>`}updateInteractiveAttributes(){this.setAttribute(`tabindex`,this.disabled?`-1`:`0`),this.setAttribute(`role`,this.href?`link`:`button`)}firstUpdated(){this.addEventListener(`keydown`,this.onHostKeydown),this.updateInteractiveAttributes()}disconnectedCallback(){this.removeEventListener(`keydown`,this.onHostKeydown),super.disconnectedCallback()}updated(e){super.updated(e),(e.has(`disabled`)||e.has(`href`))&&this.updateInteractiveAttributes()}};P([g({type:String,reflect:!0})],xd.prototype,`label`,void 0),P([g({type:String,reflect:!0})],xd.prototype,`value`,void 0),P([g({type:Boolean,reflect:!0})],xd.prototype,`selected`,void 0),P([g({type:String,reflect:!0})],xd.prototype,`icon`,void 0),P([g({type:String,reflect:!0})],xd.prototype,`href`,void 0),P([g({type:Boolean,reflect:!0})],xd.prototype,`disabled`,void 0),xd=P([a(`scb-segmented-item`)],xd),C(),y(),F();var Sd=class extends S{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.variant=`single-select`,this.value=``,this.values=[],this.disabled=!1,this.required=!1,this.name=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formResetHandler=null,this._initialValue=``,this._initialValues=[],this._customValidationMessage=``,`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
|
|
11559
11622
|
:host {
|
|
11560
11623
|
--scb-segmented-button-width: 100%;
|
|
11561
11624
|
--scb-segmented-button-height: 48px;
|
|
@@ -11586,7 +11649,7 @@
|
|
|
11586
11649
|
::slotted([role='button']:first-child .segmented-item) {
|
|
11587
11650
|
border-left: 1px solid var(--md-sys-color-outline);
|
|
11588
11651
|
}
|
|
11589
|
-
`}connectedCallback(){super.connectedCallback(),this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.values=Array.isArray(this._initialValues)?[...this._initialValues]:[],this.updateSegments(),this._syncFormValue()},this._form.addEventListener(`reset`,this._formResetHandler,!0))}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),super.disconnectedCallback()}firstUpdated(){this._initialValue=this.value,this._initialValues=Array.isArray(this.values)?[...this.values]:[],this.updateSegments();let e=this.shadowRoot?.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>{this.updateSegments()}),e.addEventListener(`click`,e=>this.onSlotClick(e)),e.addEventListener(`focus`,()=>{this.dispatchEvent(new CustomEvent(`focus`,{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener(`blur`,()=>{this.dispatchEvent(new CustomEvent(`blur`,{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener(`keydown`,e=>{if(e.code===`Space`||e.code===`Enter`||e.code===`NumpadEnter`){let t=e.target;if(t&&t.closest){let n=t.closest(`scb-segmented-item`);n&&!n.hasAttribute(`disabled`)&&!this.disabled&&(this.onSlotClick(e),e.preventDefault())}}})),this._syncFormValue(),this._syncValidity(),this.#t()}updated(e){super.updated(e),this.updateSegments(),(e.has(`value`)||e.has(`values`)||e.has(`disabled`)||e.has(`variant`)||e.has(`name`))&&(this._syncFormValue(),this._syncValidity()),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#t()}onSlotClick(e){let t=e.target;if(!t||!t.closest)return;let n=t.closest(`scb-segmented-item`);if(!n||this.disabled||n.hasAttribute(`disabled`))return;let r=n.getAttribute(`value`)||``;r&&(this.variant===`multi-select`?(this.values.indexOf(r)===-1?this.values=[...this.values,r]:this.values=this.values.filter(e=>e!==r),this.dispatchEvent(new CustomEvent(`change`,{detail:{values:this.values},bubbles:!0,composed:!0})),this.updateSegments()):r!==this.value&&(this.value=r,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r},bubbles:!0,composed:!0})),this.updateSegments()),this.#e(e,n))}#e(e,t){!(e instanceof MouseEvent)||e.detail===0||queueMicrotask(()=>{document.activeElement===t&&t.blur()})}updateSegments(){let e=this.shadowRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{if(e.tagName===`SCB-SEGMENTED-ITEM`){let t=e.getAttribute(`value`)||``;if(t){let n=!1;n=this.variant===`multi-select`?!!this.values&&this.values.includes(t):t===this.value,e.setAttribute(`aria-pressed`,n?`true`:`false`),n?e.setAttribute(`selected`,`true`):e.removeAttribute(`selected`)}this.disabled&&e.setAttribute(`disabled`,`true`)}})}formDisabledCallback(e){this.disabled=e}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required?this.variant===`multi-select`?this.values.length===0?`Välj minst ett alternativ.`:``:this.value?``:`Välj ett alternativ.`:``}_syncValidity(){if(!this._internals)return;let e=this.disabled?``:this._getValidationMessage();e?(this._internals.setValidity({valueMissing:!0},e),this.setAttribute(`aria-invalid`,`true`)):(this._internals.setValidity({}),this.removeAttribute(`aria-invalid`))}checkValidity(){return!this._getValidationMessage()}reportValidity(){return this._syncValidity(),this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=e,this._syncValidity()}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}_syncFormValue(){if(this._internals){if(this.disabled||!this.name){this._internals.setFormValue(null);return}if(this.variant===`multi-select`){if(!this.values||this.values.length===0){this._internals.setFormValue(null);return}let e=new FormData;for(let t of this.values)e.append(this.name,t);this._internals.setFormValue(e)}else{if(!this.value){this._internals.setFormValue(null);return}this._internals.setFormValue(this.value)}}}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#t(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-segmented-button-spacing-block-start`,t):this.style.removeProperty(`--scb-segmented-button-spacing-block-start`),n?this.style.setProperty(`--scb-segmented-button-spacing-block-end`,n):this.style.removeProperty(`--scb-segmented-button-spacing-block-end`),r?this.style.setProperty(`--scb-segmented-button-spacing-inline-start`,r):this.style.removeProperty(`--scb-segmented-button-spacing-inline-start`),i?this.style.setProperty(`--scb-segmented-button-spacing-inline-end`,i):this.style.removeProperty(`--scb-segmented-button-spacing-inline-end`)}render(){return b`<slot></slot>`}};
|
|
11652
|
+
`}connectedCallback(){super.connectedCallback(),this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.values=Array.isArray(this._initialValues)?[...this._initialValues]:[],this.updateSegments(),this._syncFormValue()},this._form.addEventListener(`reset`,this._formResetHandler,!0))}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),super.disconnectedCallback()}firstUpdated(){this._initialValue=this.value,this._initialValues=Array.isArray(this.values)?[...this.values]:[],this.updateSegments();let e=this.shadowRoot?.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>{this.updateSegments()}),e.addEventListener(`click`,e=>this.onSlotClick(e)),e.addEventListener(`focus`,()=>{this.dispatchEvent(new CustomEvent(`focus`,{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener(`blur`,()=>{this.dispatchEvent(new CustomEvent(`blur`,{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener(`keydown`,e=>{if(e.code===`Space`||e.code===`Enter`||e.code===`NumpadEnter`){let t=e.target;if(t&&t.closest){let n=t.closest(`scb-segmented-item`);n&&!n.hasAttribute(`disabled`)&&!this.disabled&&(this.onSlotClick(e),e.preventDefault())}}})),this._syncFormValue(),this._syncValidity(),this.#t()}updated(e){super.updated(e),this.updateSegments(),(e.has(`value`)||e.has(`values`)||e.has(`disabled`)||e.has(`variant`)||e.has(`name`))&&(this._syncFormValue(),this._syncValidity()),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#t()}onSlotClick(e){let t=e.target;if(!t||!t.closest)return;let n=t.closest(`scb-segmented-item`);if(!n||this.disabled||n.hasAttribute(`disabled`))return;let r=n.getAttribute(`value`)||``;r&&(this.variant===`multi-select`?(this.values.indexOf(r)===-1?this.values=[...this.values,r]:this.values=this.values.filter(e=>e!==r),this.dispatchEvent(new CustomEvent(`change`,{detail:{values:this.values},bubbles:!0,composed:!0})),this.updateSegments()):r!==this.value&&(this.value=r,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r},bubbles:!0,composed:!0})),this.updateSegments()),this.#e(e,n))}#e(e,t){!(e instanceof MouseEvent)||e.detail===0||queueMicrotask(()=>{document.activeElement===t&&t.blur()})}updateSegments(){let e=this.shadowRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{if(e.tagName===`SCB-SEGMENTED-ITEM`){let t=e.getAttribute(`value`)||``;if(t){let n=!1;n=this.variant===`multi-select`?!!this.values&&this.values.includes(t):t===this.value,e.setAttribute(`aria-pressed`,n?`true`:`false`),n?e.setAttribute(`selected`,`true`):e.removeAttribute(`selected`)}this.disabled&&e.setAttribute(`disabled`,`true`)}})}formDisabledCallback(e){this.disabled=e}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required?this.variant===`multi-select`?this.values.length===0?`Välj minst ett alternativ.`:``:this.value?``:`Välj ett alternativ.`:``}_syncValidity(){if(!this._internals)return;let e=this.disabled?``:this._getValidationMessage();e?(this._internals.setValidity({valueMissing:!0},e),this.setAttribute(`aria-invalid`,`true`)):(this._internals.setValidity({}),this.removeAttribute(`aria-invalid`))}checkValidity(){return!this._getValidationMessage()}reportValidity(){return this._syncValidity(),this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=e,this._syncValidity()}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}_syncFormValue(){if(this._internals){if(this.disabled||!this.name){this._internals.setFormValue(null);return}if(this.variant===`multi-select`){if(!this.values||this.values.length===0){this._internals.setFormValue(null);return}let e=new FormData;for(let t of this.values)e.append(this.name,t);this._internals.setFormValue(e)}else{if(!this.value){this._internals.setFormValue(null);return}this._internals.setFormValue(this.value)}}}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#t(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-segmented-button-spacing-block-start`,t):this.style.removeProperty(`--scb-segmented-button-spacing-block-start`),n?this.style.setProperty(`--scb-segmented-button-spacing-block-end`,n):this.style.removeProperty(`--scb-segmented-button-spacing-block-end`),r?this.style.setProperty(`--scb-segmented-button-spacing-inline-start`,r):this.style.removeProperty(`--scb-segmented-button-spacing-inline-start`),i?this.style.setProperty(`--scb-segmented-button-spacing-inline-end`,i):this.style.removeProperty(`--scb-segmented-button-spacing-inline-end`)}render(){return b`<slot></slot>`}};P([g({type:String,reflect:!0})],Sd.prototype,`variant`,void 0),P([g({type:String,reflect:!0})],Sd.prototype,`value`,void 0),P([g({type:Array})],Sd.prototype,`values`,void 0),P([g({type:Boolean,reflect:!0})],Sd.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0})],Sd.prototype,`required`,void 0),P([g({type:String,reflect:!0})],Sd.prototype,`name`,void 0),P([g({type:String,reflect:!0})],Sd.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Sd.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Sd.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Sd.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Sd.prototype,`spacingRight`,void 0),Sd=P([a(`scb-segmented-button`)],Sd),C(),y(),k(),E(),w(),F();var Cd=class extends S{constructor(...e){super(...e),this.value=``,this.disabled=!1,this.showCheckbox=!1,this.checked=!1,this.showRadio=!1,this.label=``,this.noHighlightSelected=!1}static{this.styles=p`
|
|
11590
11653
|
:host {
|
|
11591
11654
|
display: block;
|
|
11592
11655
|
outline: none;
|
|
@@ -11646,7 +11709,7 @@
|
|
|
11646
11709
|
<div class="label">${this.label?this.label:b`<slot></slot>`}</div>
|
|
11647
11710
|
<md-focus-ring inward></md-focus-ring>
|
|
11648
11711
|
</div>
|
|
11649
|
-
`}};
|
|
11712
|
+
`}};P([g({type:String})],Cd.prototype,`value`,void 0),P([g({type:Boolean,reflect:!0})],Cd.prototype,`disabled`,void 0),P([g({type:Boolean})],Cd.prototype,`showCheckbox`,void 0),P([g({type:Boolean})],Cd.prototype,`checked`,void 0),P([g({type:Boolean})],Cd.prototype,`showRadio`,void 0),P([g({type:String})],Cd.prototype,`label`,void 0),P([g({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Cd.prototype,`noHighlightSelected`,void 0),Cd=P([a(`scb-select-option`)],Cd),C(),y(),Vc(),w(),F();var Q=class extends S{static{this.formAssociated=!0}constructor(){super(),this._optionsObserver=null,this._internals=null,this.focusedIndex=-1,this.variant=`single-select`,this.value=``,this.values=[],this.disabled=!1,this.required=!1,this.open=!1,this.label=``,this.name=``,this.placeholder=``,this.supportingText=``,this.withRadiobuttons=!1,this.noHighlightSelected=!1,this.size=`large`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.zIndex=void 0,this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialValue=``,this._initialValues=[],this._customValidationMessage=``,this._onDocumentClick=e=>{this.open&&(e.composedPath().includes(this)||this._setOpen(!1))},this._onSlotClick=e=>{let t=this.shadowRoot?.querySelector(`slot`);if(!t)return;let n=t.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()===`scb-select-option`),r=e.composedPath(),i=n.find(e=>r.includes(e));i&&(this._selectOption(i),e.stopPropagation())},this._onKeyDown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this._toggleOpen())},this._onOptionKeyDown=e=>{if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=this.shadowRoot?.querySelector(`slot`);if(!t)return;let n=t.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()===`scb-select-option`),r=e.composedPath(),i=n.find(e=>r.includes(e));i&&this._selectOption(i)}},`attachInternals`in this&&(this._internals=this.attachInternals())}_syncDensityForSize(){this.size===`extra-small`?this.setAttribute(`data-density`,`-5`):this.size===`small`?this.setAttribute(`data-density`,`-4`):this.size===`medium`?this.setAttribute(`data-density`,`-2`):this.removeAttribute(`data-density`)}static{this.styles=p`
|
|
11650
11713
|
:host {
|
|
11651
11714
|
display: flex;
|
|
11652
11715
|
flex-direction: column;
|
|
@@ -11922,51 +11985,14 @@
|
|
|
11922
11985
|
</div>
|
|
11923
11986
|
<div
|
|
11924
11987
|
class="${this._hasMoreThanFourOptions()?`options options--scroll`:`options`}"
|
|
11925
|
-
style=${
|
|
11988
|
+
style=${pl(this.zIndex?`z-index: ${this.zIndex};`:void 0)}
|
|
11926
11989
|
@click=${this._onSlotClick}
|
|
11927
11990
|
@keydown=${this._onOptionKeyDown}
|
|
11928
11991
|
>
|
|
11929
11992
|
<slot @slotchange="${()=>{this.requestUpdate()}}"></slot>
|
|
11930
11993
|
</div>
|
|
11931
11994
|
</div>
|
|
11932
|
-
`}};
|
|
11933
|
-
:host {
|
|
11934
|
-
display: inline-block;
|
|
11935
|
-
max-width: var(--scb-skeleton-width);
|
|
11936
|
-
width: 100%;
|
|
11937
|
-
height: var(--scb-skeleton-height);
|
|
11938
|
-
|
|
11939
|
-
margin-block-start: var(--scb-skeleton-spacing-block-start, 0);
|
|
11940
|
-
margin-block-end: var(--scb-skeleton-spacing-block-end, 0);
|
|
11941
|
-
margin-inline-start: var(--scb-skeleton-spacing-inline-start, 0);
|
|
11942
|
-
margin-inline-end: var(--scb-skeleton-spacing-inline-end, 0);
|
|
11943
|
-
}
|
|
11944
|
-
.skeleton {
|
|
11945
|
-
background: linear-gradient(90deg, var(--md-sys-color-surface-container-high) 25%, var(--md-sys-color-surface-container-highest) 50%, var(--md-sys-color-surface-container-high) 75%);
|
|
11946
|
-
background-size: 200% 100%;
|
|
11947
|
-
animation: skeleton-loading 3.2s infinite linear;
|
|
11948
|
-
width: 100%;
|
|
11949
|
-
height: 100%;
|
|
11950
|
-
}
|
|
11951
|
-
.rounded {
|
|
11952
|
-
border-radius: var(--scb-skeleton-border-size);
|
|
11953
|
-
}
|
|
11954
|
-
.circle {
|
|
11955
|
-
border-radius: 50%;
|
|
11956
|
-
}
|
|
11957
|
-
@keyframes skeleton-loading {
|
|
11958
|
-
0% {
|
|
11959
|
-
background-position: 200% 0;
|
|
11960
|
-
}
|
|
11961
|
-
100% {
|
|
11962
|
-
background-position: -200% 0;
|
|
11963
|
-
}
|
|
11964
|
-
}
|
|
11965
|
-
`}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-skeleton-spacing-block-start`,t):this.style.removeProperty(`--scb-skeleton-spacing-block-start`),n?this.style.setProperty(`--scb-skeleton-spacing-block-end`,n):this.style.removeProperty(`--scb-skeleton-spacing-block-end`),r?this.style.setProperty(`--scb-skeleton-spacing-inline-start`,r):this.style.removeProperty(`--scb-skeleton-spacing-inline-start`),i?this.style.setProperty(`--scb-skeleton-spacing-inline-end`,i):this.style.removeProperty(`--scb-skeleton-spacing-inline-end`)}firstUpdated(e){super.firstUpdated(e),this.applySpacing()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing()}render(){return this.style.setProperty(`--scb-skeleton-width`,this.width),this.style.setProperty(`--scb-skeleton-height`,this.height),this.variant===`rounded`&&this.style.setProperty(`--scb-skeleton-border-size`,this.borderSize===`small`?`8px`:this.borderSize===`medium`?`16px`:this.borderSize===`large`?`24px`:`8px`),b`
|
|
11966
|
-
<div
|
|
11967
|
-
class="skeleton${this.variant===`circular`?` circle`:``} ${this.variant===`rounded`?` rounded`:``}"
|
|
11968
|
-
><slot></slot></div>
|
|
11969
|
-
`}};N([g({type:String})],pd.prototype,`variant`,void 0),N([g({type:String})],pd.prototype,`width`,void 0),N([g({type:String})],pd.prototype,`height`,void 0),N([g({type:String,attribute:`border-size`})],pd.prototype,`borderSize`,void 0),N([g({type:String,reflect:!0})],pd.prototype,`spacing`,void 0),N([g({type:String,attribute:`spacing-top`,reflect:!0})],pd.prototype,`spacingTop`,void 0),N([g({type:String,attribute:`spacing-bottom`,reflect:!0})],pd.prototype,`spacingBottom`,void 0),N([g({type:String,attribute:`spacing-left`,reflect:!0})],pd.prototype,`spacingLeft`,void 0),N([g({type:String,attribute:`spacing-right`,reflect:!0})],pd.prototype,`spacingRight`,void 0),pd=N([a(`scb-skeleton`)],pd),C(),y(),P();var md=class extends S{constructor(...e){super(...e),this.ticks=!1,this.step=5,this.value=20,this.range=!1,this.valueStart=0,this.valueEnd=100,this.min=0,this.max=100,this.labeled=!0,this.disabled=!1,this.name=``}static{this.styles=p`
|
|
11995
|
+
`}};P([g({type:String})],Q.prototype,`variant`,void 0),P([g({type:String})],Q.prototype,`value`,void 0),P([g({type:Array})],Q.prototype,`values`,void 0),P([g({type:Boolean})],Q.prototype,`disabled`,void 0),P([g({type:Boolean,reflect:!0})],Q.prototype,`required`,void 0),P([g({type:Boolean,reflect:!0})],Q.prototype,`open`,void 0),P([g({type:String})],Q.prototype,`label`,void 0),P([g({type:String})],Q.prototype,`name`,void 0),P([g({type:String})],Q.prototype,`placeholder`,void 0),P([g({type:String,attribute:`supporting-text`})],Q.prototype,`supportingText`,void 0),P([g({type:Boolean,attribute:`with-radiobuttons`})],Q.prototype,`withRadiobuttons`,void 0),P([g({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Q.prototype,`noHighlightSelected`,void 0),P([g({type:String,reflect:!0})],Q.prototype,`size`,void 0),P([g({type:String,reflect:!0})],Q.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Q.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Q.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Q.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Q.prototype,`spacingRight`,void 0),P([g({type:String,attribute:`z-index`})],Q.prototype,`zIndex`,void 0),Q=P([a(`scb-select`)],Q),nd(),C(),y(),F();var wd=class extends S{constructor(...e){super(...e),this.ticks=!1,this.step=5,this.value=20,this.range=!1,this.valueStart=0,this.valueEnd=100,this.min=0,this.max=100,this.labeled=!0,this.disabled=!1,this.name=``}static{this.styles=p`
|
|
11970
11996
|
:host {
|
|
11971
11997
|
display: block;
|
|
11972
11998
|
}
|
|
@@ -11992,7 +12018,7 @@
|
|
|
11992
12018
|
@input=${this._onInput}
|
|
11993
12019
|
@change=${this._onChange}
|
|
11994
12020
|
></md-slider>
|
|
11995
|
-
`}};
|
|
12021
|
+
`}};P([g({type:Boolean})],wd.prototype,`ticks`,void 0),P([g({type:Number})],wd.prototype,`step`,void 0),P([g({type:Number,reflect:!0})],wd.prototype,`value`,void 0),P([g({type:Boolean})],wd.prototype,`range`,void 0),P([g({type:Number,attribute:`value-start`})],wd.prototype,`valueStart`,void 0),P([g({type:Number,attribute:`value-end`})],wd.prototype,`valueEnd`,void 0),P([g({type:Number,reflect:!0})],wd.prototype,`min`,void 0),P([g({type:Number,reflect:!0})],wd.prototype,`max`,void 0),P([g({type:Boolean})],wd.prototype,`labeled`,void 0),P([g({type:String,attribute:`value-label`})],wd.prototype,`valueLabel`,void 0),P([g({type:String,attribute:`value-label-start`})],wd.prototype,`valueLabelStart`,void 0),P([g({type:String,attribute:`value-label-end`})],wd.prototype,`valueLabelEnd`,void 0),P([g({type:Boolean,reflect:!0})],wd.prototype,`disabled`,void 0),P([g({type:String,reflect:!0})],wd.prototype,`name`,void 0),P([g({type:String,attribute:`name-start`,reflect:!0})],wd.prototype,`nameStart`,void 0),P([g({type:String,attribute:`name-end`,reflect:!0})],wd.prototype,`nameEnd`,void 0),wd=P([a(`scb-slider`)],wd),C(),y(),fl(),Gc(),F();var Td=class extends S{constructor(...e){super(...e),this.message=``,this.open=!1,this.actionText=``,this.showClose=!1,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
|
|
11996
12022
|
:host {
|
|
11997
12023
|
position: relative;
|
|
11998
12024
|
display: block;
|
|
@@ -12119,7 +12145,7 @@
|
|
|
12119
12145
|
`:``}
|
|
12120
12146
|
`}
|
|
12121
12147
|
</div>
|
|
12122
|
-
`}};
|
|
12148
|
+
`}};P([g({type:String})],Td.prototype,`message`,void 0),P([g({type:Boolean,reflect:!0})],Td.prototype,`open`,void 0),P([g({type:String,attribute:`action-text`})],Td.prototype,`actionText`,void 0),P([g({type:Boolean,attribute:`show-close`})],Td.prototype,`showClose`,void 0),P([g({type:Boolean,reflect:!0})],Td.prototype,`fixed`,void 0),P([g({type:Boolean})],Td.prototype,`fadeout`,void 0),P([g({type:Boolean,attribute:`with-longer-action`})],Td.prototype,`withLongerAction`,void 0),P([g({type:String,reflect:!0})],Td.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Td.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Td.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Td.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Td.prototype,`spacingRight`,void 0),Td=P([a(`scb-snackbar`)],Td),C(),y(),k(),F();var Ed=class extends S{constructor(...e){super(...e),this.status=``,this.label=``,this.showIcon=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
|
|
12123
12149
|
:host {
|
|
12124
12150
|
display: inline-block;
|
|
12125
12151
|
border-radius: var(--md-sys-shape-corner-full);
|
|
@@ -12163,7 +12189,7 @@
|
|
|
12163
12189
|
`}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-status-pill-spacing-block-start`,t):this.style.removeProperty(`--scb-status-pill-spacing-block-start`),n?this.style.setProperty(`--scb-status-pill-spacing-block-end`,n):this.style.removeProperty(`--scb-status-pill-spacing-block-end`),r?this.style.setProperty(`--scb-status-pill-spacing-inline-start`,r):this.style.removeProperty(`--scb-status-pill-spacing-inline-start`),i?this.style.setProperty(`--scb-status-pill-spacing-inline-end`,i):this.style.removeProperty(`--scb-status-pill-spacing-inline-end`)}connectedCallback(){super.connectedCallback(),this.applySpacing()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing()}render(){return b`
|
|
12164
12190
|
${this.showIcon?this.status===`success`?b`<md-icon>check_circle</md-icon>`:this.status===`warning`?b`<md-icon>warning</md-icon>`:this.status===`error`?b`<md-icon>error</md-icon>`:``:``}
|
|
12165
12191
|
<span class="label">${this.label}</span>
|
|
12166
|
-
`}};
|
|
12192
|
+
`}};P([g({type:String})],Ed.prototype,`status`,void 0),P([g({type:String})],Ed.prototype,`label`,void 0),P([g({type:Boolean,attribute:`show-icon`})],Ed.prototype,`showIcon`,void 0),P([g({type:String,reflect:!0})],Ed.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Ed.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Ed.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Ed.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Ed.prototype,`spacingRight`,void 0),Ed=P([a(`scb-status-pill`)],Ed),C(),y(),k(),E(),w(),F();var Dd=class extends S{constructor(...e){super(...e),this.label=``,this.subLabel=``,this.symbolVariant=`number`,this.number=0,this.active=!1,this.completed=!1,this.changeOnCompleted=!1,this.islast=!1,this.variant=`horizontal`,this.widthWeight=1,this.icon=``}static{this.styles=p`
|
|
12167
12193
|
:host {
|
|
12168
12194
|
font-family: var(--brand-font);
|
|
12169
12195
|
--scb-step-slide-from-x: 0px;
|
|
@@ -12401,7 +12427,7 @@
|
|
|
12401
12427
|
</div>
|
|
12402
12428
|
<md-focus-ring></md-focus-ring>
|
|
12403
12429
|
</div>
|
|
12404
|
-
`}}};
|
|
12430
|
+
`}}};P([g({type:String,reflect:!0})],Dd.prototype,`label`,void 0),P([g({type:String,reflect:!0,attribute:`sub-label`})],Dd.prototype,`subLabel`,void 0),P([g({type:String,reflect:!0,attribute:`symbol-variant`})],Dd.prototype,`symbolVariant`,void 0),P([g({type:Number,reflect:!0})],Dd.prototype,`number`,void 0),P([g({type:Boolean,reflect:!0})],Dd.prototype,`active`,void 0),P([g({type:Boolean,reflect:!0})],Dd.prototype,`completed`,void 0),P([g({type:Boolean,reflect:!0,attribute:`change-on-completed`})],Dd.prototype,`changeOnCompleted`,void 0),P([g({type:Boolean,reflect:!0})],Dd.prototype,`islast`,void 0),P([g({type:String,reflect:!0})],Dd.prototype,`variant`,void 0),P([g({type:Number,reflect:!0,attribute:`width-weight`})],Dd.prototype,`widthWeight`,void 0),P([g({type:String})],Dd.prototype,`icon`,void 0),Dd=P([a(`scb-step`)],Dd),C(),y(),F();var Od=class extends S{constructor(...e){super(...e),this.type=``,this.label=``,this.changeOnCompleted=!1,this.variant=`horizontal`,this.symbolVariant=`number`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.activeIndex=0,this.#t=0,this._onKeyNav=e=>{let t=this._getSteps(),n=this.activeIndex,r=n;e.detail.key===`ArrowRight`?r=n<t.length-1?n+1:0:e.detail.key===`ArrowLeft`&&(r=n>0?n-1:t.length-1),r!==n&&(this._onStepClick(r),setTimeout(()=>{let e=t[r].shadowRoot?.querySelector(`.scb-step-content`);e&&`focus`in e&&typeof e.focus==`function`&&e.focus()},0))},this._onStepContainerClick=e=>{let t=this._getSteps(),n=e.composedPath(),r=t.findIndex(e=>n.includes(e));r!==-1&&this._onStepClick(r)},this._onSlotChange=()=>{let e=this._getSteps();if(e.length===0){this.activeIndex=0;return}this.activeIndex>e.length-1?this.activeIndex=e.length-1:this.activeIndex<0&&(this.activeIndex=0),this._updateSteps(),this.#i()}}#e;#t;static{this.styles=p`
|
|
12405
12431
|
:host {
|
|
12406
12432
|
--scb-stepper-width: 100%;
|
|
12407
12433
|
--scb-stepper-height: 100%;
|
|
@@ -12539,7 +12565,7 @@
|
|
|
12539
12565
|
>
|
|
12540
12566
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
12541
12567
|
</div>
|
|
12542
|
-
`}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<`u`&&(this.#e=new ResizeObserver(()=>{this.#i()}),this.#e.observe(this))}disconnectedCallback(){this.#e&&=(this.#e.disconnect(),void 0),this.#t&&=(cancelAnimationFrame(this.#t),0),super.disconnectedCallback()}#n(){let e=this.#r(this.spacing),t=this.#r(this.spacingTop)??e,n=this.#r(this.spacingBottom)??e,r=this.#r(this.spacingLeft),i=this.#r(this.spacingRight);t?this.style.setProperty(`--scb-stepper-spacing-block-start`,t):this.style.removeProperty(`--scb-stepper-spacing-block-start`),n?this.style.setProperty(`--scb-stepper-spacing-block-end`,n):this.style.removeProperty(`--scb-stepper-spacing-block-end`),r?this.style.setProperty(`--scb-stepper-spacing-inline-start`,r):this.style.removeProperty(`--scb-stepper-spacing-inline-start`),i?this.style.setProperty(`--scb-stepper-spacing-inline-end`,i):this.style.removeProperty(`--scb-stepper-spacing-inline-end`)}#r(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#i(){this.#t||=requestAnimationFrame(()=>{this.#t=0,this.#a()})}#a(){let e=this._getSteps();e.length!==0&&e.forEach(e=>{let t=e.shadowRoot;if(!t)return;let n=t.querySelector(`.label`),r=t.querySelector(`.scb-step-content`);if(!n)return;if(this.variant!==`horizontal`){n.style.removeProperty(`max-width`),n.style.removeProperty(`white-space`),n.style.removeProperty(`word-break`),n.style.removeProperty(`overflow-wrap`);return}n.style.maxWidth=`none`,n.style.whiteSpace=`nowrap`,n.style.wordBreak=`normal`,n.style.overflowWrap=`normal`;let i=r?.clientWidth??e.clientWidth;i>0&&n.scrollWidth>i&&(n.style.maxWidth=`100%`,n.style.whiteSpace=`normal`,n.style.wordBreak=`break-word`,n.style.overflowWrap=`anywhere`)})}};
|
|
12568
|
+
`}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<`u`&&(this.#e=new ResizeObserver(()=>{this.#i()}),this.#e.observe(this))}disconnectedCallback(){this.#e&&=(this.#e.disconnect(),void 0),this.#t&&=(cancelAnimationFrame(this.#t),0),super.disconnectedCallback()}#n(){let e=this.#r(this.spacing),t=this.#r(this.spacingTop)??e,n=this.#r(this.spacingBottom)??e,r=this.#r(this.spacingLeft),i=this.#r(this.spacingRight);t?this.style.setProperty(`--scb-stepper-spacing-block-start`,t):this.style.removeProperty(`--scb-stepper-spacing-block-start`),n?this.style.setProperty(`--scb-stepper-spacing-block-end`,n):this.style.removeProperty(`--scb-stepper-spacing-block-end`),r?this.style.setProperty(`--scb-stepper-spacing-inline-start`,r):this.style.removeProperty(`--scb-stepper-spacing-inline-start`),i?this.style.setProperty(`--scb-stepper-spacing-inline-end`,i):this.style.removeProperty(`--scb-stepper-spacing-inline-end`)}#r(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#i(){this.#t||=requestAnimationFrame(()=>{this.#t=0,this.#a()})}#a(){let e=this._getSteps();e.length!==0&&e.forEach(e=>{let t=e.shadowRoot;if(!t)return;let n=t.querySelector(`.label`),r=t.querySelector(`.scb-step-content`);if(!n)return;if(this.variant!==`horizontal`){n.style.removeProperty(`max-width`),n.style.removeProperty(`white-space`),n.style.removeProperty(`word-break`),n.style.removeProperty(`overflow-wrap`);return}n.style.maxWidth=`none`,n.style.whiteSpace=`nowrap`,n.style.wordBreak=`normal`,n.style.overflowWrap=`normal`;let i=r?.clientWidth??e.clientWidth;i>0&&n.scrollWidth>i&&(n.style.maxWidth=`100%`,n.style.whiteSpace=`normal`,n.style.wordBreak=`break-word`,n.style.overflowWrap=`anywhere`)})}};P([g({type:String,reflect:!0})],Od.prototype,`type`,void 0),P([g({type:String,reflect:!0})],Od.prototype,`label`,void 0),P([g({type:Boolean,reflect:!0,attribute:`change-on-completed`})],Od.prototype,`changeOnCompleted`,void 0),P([g({type:String})],Od.prototype,`variant`,void 0),P([g({type:String,reflect:!0,attribute:`symbol-variant`})],Od.prototype,`symbolVariant`,void 0),P([g({type:String,reflect:!0})],Od.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Od.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Od.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Od.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Od.prototype,`spacingRight`,void 0),P([g({type:Number,reflect:!0,attribute:`active-index`})],Od.prototype,`activeIndex`,void 0),Od=P([a(`scb-stepper`)],Od),C(),y(),fl(),F();var kd=96,Ad=32,jd=class extends S{constructor(...e){super(...e),this.dataSorting=!1,this.columnWidthMode=`auto`,this._sortedColumn=null,this._sortDirection=`asc`,this._columnWidthFrame=null,this._onSlotChange=()=>{this._attachThListeners()}}static{this.styles=p`
|
|
12543
12569
|
:host {
|
|
12544
12570
|
display: block;
|
|
12545
12571
|
color: var(--md-sys-color-on-surface);
|
|
@@ -12589,7 +12615,7 @@
|
|
|
12589
12615
|
<div class="scb-table-scroll-wrapper">
|
|
12590
12616
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
12591
12617
|
</div>
|
|
12592
|
-
`}firstUpdated(){let e=this.shadowRoot?.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners())}updated(e){e.has(`dataSorting`)&&(this.dataSorting||(this._sortedColumn=null,this._sortDirection=`asc`),this._attachThListeners()),e.has(`columnWidthMode`)&&this._queueColumnWidthUpdate()}disconnectedCallback(){super.disconnectedCallback(),this._columnWidthFrame!==null&&(cancelAnimationFrame(this._columnWidthFrame),this._columnWidthFrame=null)}_getTbody(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e,n=t.tagName.toLowerCase()===`tbody`?t:t.querySelector(`tbody`);if(n)return n}return null}_getTables(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return[];let t=e.assignedNodes({flatten:!0}),n=[];return t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e;t.tagName.toLowerCase()===`table`&&n.push(t),n.push(...Array.from(t.querySelectorAll(`table`)))}}),n}_attachThListeners(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[],a=[];t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(n.push(...e.querySelectorAll(`thead`)),r.push(...e.querySelectorAll(`th`)),i.push(...e.querySelectorAll(`td`)),a.push(...e.querySelectorAll(`tr`)))}),n.forEach(e=>{e.style.borderTop=`1px solid var(--md-sys-color-on-surface)`}),r.forEach((e,t)=>{e.style.textAlign=`left`,e.style.padding=`12px`,e.style.position=`relative`,e.style.backgroundColor=`var(--md-sys-color-surface)`,e.style.fontFamily=`var(--md-sys-typescale-label-medium-font)`,e.style.fontSize=`var(--md-sys-typescale-label-medium-size)`,e.style.lineHeight=`var(--md-sys-typescale-label-medium-line-height)`,e.style.fontWeight=` var(--weight-bold)`,e.style.letterSpacing=`var(--md-sys-typescale-label-medium-tracking)`,e.style.verticalAlign=`bottom`,e.style.borderRight=`1px solid var(--md-sys-color-on-surface)`,e.style.borderBottom=`1px solid var(--md-sys-color-on-surface)`,e.style.overflowWrap=`normal`,e.style.wordBreak=`normal`,e.style.hyphens=`manual`;let n=(e.textContent??``).replace(/\s+/g,` `).trim();for(;e.firstChild;)e.removeChild(e.firstChild);let r=document.createElement(`p`);if(r.textContent=n,r.style.margin=`0`,this.dataSorting){let n=document.createElement(`scb-icon-button`);n.className=`scb-sort-icon`,n.onclick=()=>this._onThClick(t),n.setAttribute(`variant`,`standard`),n.setAttribute(`size`,`small`),n.style.alignSelf=`end`,this._sortedColumn===t?(n.setAttribute(`variant`,`filled-tonal`),n.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(n.setAttribute(`icon`,`swap_horiz`),n.style.transform+=` rotate(90deg)`);let i=document.createElement(`div`);i.style.display=`flex`,i.style.gap=`8px`,i.style.flexWrap=`nowrap`,i.style.alignItems=`center`,i.appendChild(r),i.appendChild(n),e.appendChild(i)}else e.appendChild(r)}),i.forEach(e=>{e.style.padding=`12px`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--md-sys-color-outline-variant)`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--md-sys-color-surface)`,e.style.fontFamily=`var(--md-sys-typescale-body-medium-font)`,e.style.fontSize=`var(--md-sys-typescale-body-medium-size)`,e.style.lineHeight=`var(--md-sys-typescale-body-medium-line-height)`,e.style.fontWeight=`var(--md-sys-typescale-body-medium-weight)`,e.style.letterSpacing=`var(--md-sys-typescale-body-medium-tracking)`,e.style.borderRight=`1px solid var(--md-sys-color-on-surface)`,e.style.borderBottom=`1px solid var(--md-sys-color-on-surface)`,e.style.overflowWrap=`normal`,e.style.wordBreak=`normal`,e.style.hyphens=`manual`}),a.forEach(e=>{let t=Array.from(e.cells);t.forEach((e,n)=>{e.style.borderRight=n===t.length-1?`none`:`1px solid var(--md-sys-color-on-surface)`})});let o=this._getTbody();o&&Array.from(o.querySelectorAll(`tr`)).forEach((e,t)=>{let n=t%2==0?`var(--md-sys-color-surface-container)`:`var(--md-sys-color-surface)`;Array.from(e.cells).forEach(e=>{e.style.backgroundColor=n})}),this._queueColumnWidthUpdate()}_queueColumnWidthUpdate(){this._columnWidthFrame!==null&&cancelAnimationFrame(this._columnWidthFrame),this._columnWidthFrame=requestAnimationFrame(()=>{this._columnWidthFrame=null,this._applyColumnWidthMode()})}_applyColumnWidthMode(){this._getTables().forEach(e=>{if(this._removeGeneratedColGroup(e),e.style.tableLayout=``,e.style.width=``,e.style.minWidth=``,e.style.maxWidth=``,this.columnWidthMode!==`header`)return;let t=Array.from(e.querySelectorAll(`thead tr`)),n=t[t.length-1];if(!n)return;let r=Array.from(n.cells).map((t,n)=>{let r=this._measureCellContentWidth(t),i=this._measureColumnReadableBodyWidth(e,n),a=Math.max(r,i);return`${Math.ceil(a>0?Math.max(a,
|
|
12618
|
+
`}firstUpdated(){let e=this.shadowRoot?.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners())}updated(e){e.has(`dataSorting`)&&(this.dataSorting||(this._sortedColumn=null,this._sortDirection=`asc`),this._attachThListeners()),e.has(`columnWidthMode`)&&this._queueColumnWidthUpdate()}disconnectedCallback(){super.disconnectedCallback(),this._columnWidthFrame!==null&&(cancelAnimationFrame(this._columnWidthFrame),this._columnWidthFrame=null)}_getTbody(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e,n=t.tagName.toLowerCase()===`tbody`?t:t.querySelector(`tbody`);if(n)return n}return null}_getTables(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return[];let t=e.assignedNodes({flatten:!0}),n=[];return t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e;t.tagName.toLowerCase()===`table`&&n.push(t),n.push(...Array.from(t.querySelectorAll(`table`)))}}),n}_attachThListeners(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[],a=[];t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(n.push(...e.querySelectorAll(`thead`)),r.push(...e.querySelectorAll(`th`)),i.push(...e.querySelectorAll(`td`)),a.push(...e.querySelectorAll(`tr`)))}),n.forEach(e=>{e.style.borderTop=`1px solid var(--md-sys-color-on-surface)`}),r.forEach((e,t)=>{e.style.textAlign=`left`,e.style.padding=`12px`,e.style.position=`relative`,e.style.backgroundColor=`var(--md-sys-color-surface)`,e.style.fontFamily=`var(--md-sys-typescale-label-medium-font)`,e.style.fontSize=`var(--md-sys-typescale-label-medium-size)`,e.style.lineHeight=`var(--md-sys-typescale-label-medium-line-height)`,e.style.fontWeight=` var(--weight-bold)`,e.style.letterSpacing=`var(--md-sys-typescale-label-medium-tracking)`,e.style.verticalAlign=`bottom`,e.style.borderRight=`1px solid var(--md-sys-color-on-surface)`,e.style.borderBottom=`1px solid var(--md-sys-color-on-surface)`,e.style.overflowWrap=`normal`,e.style.wordBreak=`normal`,e.style.hyphens=`manual`;let n=(e.textContent??``).replace(/\s+/g,` `).trim();for(;e.firstChild;)e.removeChild(e.firstChild);let r=document.createElement(`p`);if(r.textContent=n,r.style.margin=`0`,this.dataSorting){let n=document.createElement(`scb-icon-button`);n.className=`scb-sort-icon`,n.onclick=()=>this._onThClick(t),n.setAttribute(`variant`,`standard`),n.setAttribute(`size`,`small`),n.style.alignSelf=`end`,this._sortedColumn===t?(n.setAttribute(`variant`,`filled-tonal`),n.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(n.setAttribute(`icon`,`swap_horiz`),n.style.transform+=` rotate(90deg)`);let i=document.createElement(`div`);i.style.display=`flex`,i.style.gap=`8px`,i.style.flexWrap=`nowrap`,i.style.alignItems=`center`,i.appendChild(r),i.appendChild(n),e.appendChild(i)}else e.appendChild(r)}),i.forEach(e=>{e.style.padding=`12px`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--md-sys-color-outline-variant)`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--md-sys-color-surface)`,e.style.fontFamily=`var(--md-sys-typescale-body-medium-font)`,e.style.fontSize=`var(--md-sys-typescale-body-medium-size)`,e.style.lineHeight=`var(--md-sys-typescale-body-medium-line-height)`,e.style.fontWeight=`var(--md-sys-typescale-body-medium-weight)`,e.style.letterSpacing=`var(--md-sys-typescale-body-medium-tracking)`,e.style.borderRight=`1px solid var(--md-sys-color-on-surface)`,e.style.borderBottom=`1px solid var(--md-sys-color-on-surface)`,e.style.overflowWrap=`normal`,e.style.wordBreak=`normal`,e.style.hyphens=`manual`}),a.forEach(e=>{let t=Array.from(e.cells);t.forEach((e,n)=>{e.style.borderRight=n===t.length-1?`none`:`1px solid var(--md-sys-color-on-surface)`})});let o=this._getTbody();o&&Array.from(o.querySelectorAll(`tr`)).forEach((e,t)=>{let n=t%2==0?`var(--md-sys-color-surface-container)`:`var(--md-sys-color-surface)`;Array.from(e.cells).forEach(e=>{e.style.backgroundColor=n})}),this._queueColumnWidthUpdate()}_queueColumnWidthUpdate(){this._columnWidthFrame!==null&&cancelAnimationFrame(this._columnWidthFrame),this._columnWidthFrame=requestAnimationFrame(()=>{this._columnWidthFrame=null,this._applyColumnWidthMode()})}_applyColumnWidthMode(){this._getTables().forEach(e=>{if(this._removeGeneratedColGroup(e),e.style.tableLayout=``,e.style.width=``,e.style.minWidth=``,e.style.maxWidth=``,this.columnWidthMode!==`header`)return;let t=Array.from(e.querySelectorAll(`thead tr`)),n=t[t.length-1];if(!n)return;let r=Array.from(n.cells).map((t,n)=>{let r=this._measureCellContentWidth(t),i=this._measureColumnReadableBodyWidth(e,n),a=Math.max(r,i);return`${Math.ceil(a>0?Math.max(a,kd):0)}px`}),i=r.reduce((e,t)=>e+parseFloat(t),0);this._applyGeneratedColGroup(e,r),e.style.tableLayout=`fixed`,e.style.width=`${Math.ceil(i)}px`,e.style.minWidth=`${Math.ceil(i)}px`,e.style.maxWidth=`none`})}_applyGeneratedColGroup(e,t){let n=document.createElement(`colgroup`);n.setAttribute(`data-scb-generated-column-widths`,`true`),t.forEach(e=>{let t=document.createElement(`col`);t.style.width=e,t.style.minWidth=e,n.appendChild(t)}),e.insertBefore(n,e.firstChild)}_removeGeneratedColGroup(e){e.querySelector(`colgroup[data-scb-generated-column-widths="true"]`)?.remove()}_measureCellContentWidth(e){let t=e.firstElementChild?.cloneNode(!0)??document.createElement(`span`);e.firstElementChild||(t.textContent=e.textContent??``);let n=window.getComputedStyle(e),r=document.createElement(`div`);r.style.position=`absolute`,r.style.left=`-99999px`,r.style.top=`0`,r.style.visibility=`hidden`,r.style.pointerEvents=`none`,r.style.width=`max-content`,r.style.maxWidth=`none`,r.style.whiteSpace=`nowrap`,r.style.fontFamily=n.fontFamily,r.style.fontSize=n.fontSize,r.style.fontWeight=n.fontWeight,r.style.lineHeight=n.lineHeight,r.style.letterSpacing=n.letterSpacing,t instanceof HTMLElement&&(t.style.width=`max-content`,t.style.maxWidth=`none`,t.style.whiteSpace=`nowrap`),r.appendChild(t),document.body.appendChild(r);let i=parseFloat(n.paddingLeft||`0`),a=parseFloat(n.paddingRight||`0`),o=parseFloat(n.borderLeftWidth||`0`),s=parseFloat(n.borderRightWidth||`0`),c=r.getBoundingClientRect().width+i+a+o+s;return document.body.removeChild(r),c}_measureColumnReadableBodyWidth(e,t){return Array.from(e.querySelectorAll(`tbody tr`)).reduce((e,n)=>{let r=n.cells[t];if(!r)return e;let i=(r.textContent??``).replace(/\s+/g,` `).trim().split(` `).filter(Boolean).reduce((e,t)=>Math.max(e,this._measureCellTextWidth(r,t)),0),a=i>0?i+Ad:0;return Math.max(e,a)},0)}_measureCellTextWidth(e,t){let n=window.getComputedStyle(e),r=document.createElement(`span`);r.textContent=t,r.style.position=`absolute`,r.style.left=`-99999px`,r.style.top=`0`,r.style.visibility=`hidden`,r.style.pointerEvents=`none`,r.style.whiteSpace=`nowrap`,r.style.fontFamily=n.fontFamily,r.style.fontSize=n.fontSize,r.style.fontWeight=n.fontWeight,r.style.lineHeight=n.lineHeight,r.style.letterSpacing=n.letterSpacing,document.body.appendChild(r);let i=parseFloat(n.paddingLeft||`0`),a=parseFloat(n.paddingRight||`0`),o=parseFloat(n.borderLeftWidth||`0`),s=parseFloat(n.borderRightWidth||`0`),c=r.getBoundingClientRect().width+i+a+o+s;return document.body.removeChild(r),c}_onThClick(e){this.dataSorting&&(this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners(),this.dispatchEvent(new CustomEvent(`tablesortchange`,{detail:{sortedColumn:this._sortedColumn,sortDirection:this._sortDirection},bubbles:!0,composed:!0})))}_sortTable(e,t){let n=this._getTbody();if(!n)return;let r=Array.from(n.querySelectorAll(`tr`));r.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)}),r.forEach(e=>n.appendChild(e))}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}};P([g({type:Boolean,attribute:`data-sorting`})],jd.prototype,`dataSorting`,void 0),P([g({type:String,attribute:`column-width-mode`})],jd.prototype,`columnWidthMode`,void 0),jd=P([a(`scb-table`)],jd),C(),y(),fl(),Ml(),F();var Md=class extends S{constructor(...e){super(...e),this.searchTerm=``,this.pagination=!1,this.filteringSearch=!1,this.noScroll=!1,this.pageSize=10,this.currentPage=1,this.totalRows=0,this._sortedColumn=null,this._sortDirection=`asc`,this._filteredRows=null,this._tbodyObserver=null,this._observedTbody=null,this._pendingTableRefresh=!1,this._suppressTbodyObserver=!1,this._onSlotChange=()=>{this._attachTbodyObserver(),this._refreshFromTableContent()},this._onPaginationChange=e=>{let t=e.detail;t&&typeof t.page==`number`&&this._changePage(t.page)}}static{this.styles=p`
|
|
12593
12619
|
:host {
|
|
12594
12620
|
display: block;
|
|
12595
12621
|
color: var(--md-sys-color-on-surface);
|
|
@@ -12664,17 +12690,17 @@
|
|
|
12664
12690
|
></scb-pagination>
|
|
12665
12691
|
`:``}
|
|
12666
12692
|
</div>
|
|
12667
|
-
`}_onSearchInput(e){let t=e.target.value;this.searchTerm=t,this._filterTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0}))}_filterTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r=n,i=Array.from(r.querySelectorAll(`tr`)),a=this.searchTerm.trim().toLowerCase();if(!a)this._filteredRows=null,i.forEach(e=>e.style.display=``),this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this.pagination&&this._paginateTable(),this._sortedColumn!==null&&this._sortTable(this._sortedColumn,this._sortDirection);else{this._filteredRows=i.filter(e=>this._getRowSearchText(e).toLowerCase().includes(a)),i.forEach(e=>e.style.display=`none`);let e=this._filteredRows;this._sortedColumn!==null&&(e=[...e],e.sort((e,t)=>{let n=this._getCellSortableValue(e.children[this._sortedColumn]),r=this._getCellSortableValue(t.children[this._sortedColumn]);return this._compareCellValues(n,r,this._sortDirection)}),this._filteredRows=e),this.totalRows=this._filteredRows.length,this._ensureCurrentPageWithinBounds(),this.pagination?this._paginateTable():this._filteredRows.forEach(e=>e.style.display=``)}}firstUpdated(){let e=this.shadowRoot.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners(),this._attachTbodyObserver(),this._refreshFromTableContent())}updated(e){super.updated(e),(e.has(`searchTerm`)||e.has(`currentPage`)||e.has(`pageSize`)||e.has(`filteringSearch`)||e.has(`pagination`))&&this.updateComplete.then(()=>{this.isConnected&&this._refreshFromTableContent()})}_disconnectTbodyObserver(){this._tbodyObserver&&=(this._tbodyObserver.disconnect(),null),this._observedTbody=null}_attachTbodyObserver(){let e=this._getTbody();if(!e){this._disconnectTbodyObserver();return}this._observedTbody!==e&&(this._disconnectTbodyObserver(),this._observedTbody=e,this._tbodyObserver=new MutationObserver(()=>{this._suppressTbodyObserver||this._scheduleTableRefresh()}),this._tbodyObserver.observe(e,{childList:!0,subtree:!0,characterData:!0}))}_scheduleTableRefresh(){this._pendingTableRefresh||(this._pendingTableRefresh=!0,queueMicrotask(()=>{this._pendingTableRefresh=!1,this._refreshFromTableContent()}))}_refreshFromTableContent(){if(this._attachTbodyObserver(),this.filteringSearch){this._filterTable();return}if(this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this._sortedColumn!==null){this._sortTable(this._sortedColumn,this._sortDirection);return}this.pagination&&this._paginateTable()}_ensureCurrentPageWithinBounds(){let e=Math.max(1,Math.ceil(this.totalRows/this.pageSize)),t=Math.min(Math.max(1,this.currentPage),e);t!==this.currentPage&&(this.currentPage=t)}_getTbody(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);if(t)return t}return null}_attachThListeners(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[];t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(n.push(...e.querySelectorAll(`th`)),r.push(...e.querySelectorAll(`td`)),i.push(...e.querySelectorAll(`tr`)))}),n.forEach((e,t)=>{e.style.textAlign=`left`,e.style.padding=`16px 0px 16px 32px`,e.style.position=`relative`,e.style.backgroundColor=`var(--md-sys-color-surface)`,e.style.fontFamily=`var(--md-sys-typescale-label-medium-font)`,e.style.fontSize=`var(--md-sys-typescale-label-medium-size)`,e.style.lineHeight=`var(--md-sys-typescale-label-medium-line-height)`,e.style.fontWeight=`var(--md-sys-typescale-label-medium-weight)`,e.style.letterSpacing=`var(--md-sys-typescale-label-medium-tracking)`,e.style.verticalAlign=`bottom`;let n=e.firstChild;if(n&&n.nodeType===Node.TEXT_NODE&&n.textContent?.trim()||n&&n.nodeType===Node.ELEMENT_NODE&&n.tagName.toLowerCase()!==`p`){let i=document.createElement(`p`);i.textContent=n.textContent?n.textContent.trim():``,i.style.margin=`0`,e.replaceChild(i,n),e.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>e.remove());let a=document.createElement(`scb-icon-button`);a.className=`scb-sort-icon`,a.onclick=()=>this._onThClick(t),a.setAttribute(`variant`,`standard`),a.setAttribute(`size`,`small`),this._sortedColumn===t?(a.setAttribute(`variant`,`filled-tonal`),a.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(a.setAttribute(`icon`,`swap_horiz`),a.style.transform+=` rotate(90deg)`,a.style.alignSelf=`end`);var r=document.createElement(`div`);r.style.display=`flex`,r.style.gap=`8px`,r.style.flexWrap=`nowrap`,r.style.alignItems=`center`,r.appendChild(i),r.appendChild(a),e.appendChild(r)}}),r.forEach(e=>{e.style.padding=`16px 0px 16px 32px`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--md-sys-color-outline-variant)`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--md-sys-color-surface)`,e.style.fontFamily=`var(--md-sys-typescale-body-medium-font)`,e.style.fontSize=`var(--md-sys-typescale-body-medium-size)`,e.style.lineHeight=`var(--md-sys-typescale-body-medium-line-height)`,e.style.fontWeight=`var(--md-sys-typescale-body-medium-weight)`,e.style.letterSpacing=`var(--md-sys-typescale-body-medium-tracking)`}),i.forEach((e,t)=>{t%2==1&&e.querySelectorAll(`td`).forEach(e=>{e.style.backgroundColor=`var(--scb-background-row)`});let n=e.querySelectorAll(`th`);n.length>0&&n.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`24px`),t===n.length-1?e.style.paddingRight=`24px`:e.style.paddingRight=``});let r=e.querySelectorAll(`td`);r.length>0&&r.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`24px`),t===r.length-1?e.style.paddingRight=`24px`:e.style.paddingRight=``})}),this.pagination&&this._paginateTable()}_onThClick(e){this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners()}_sortTable(e,t){let n=this.shadowRoot.querySelector(`slot`);if(!n)return;let r=n.assignedNodes({flatten:!0}),i=null;if(r.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(i=t)}}),!i)return;let a;a=this._filteredRows?[...this._filteredRows]:Array.from(i.querySelectorAll(`tr`)),a.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)});let o=this._tbodyObserver!==null;o&&this._disconnectTbodyObserver();try{a.forEach(e=>i.appendChild(e))}finally{o&&this._attachTbodyObserver()}this._filteredRows&&(this._filteredRows=a,this.totalRows=this._filteredRows.length),this.pagination&&this._paginateTable()}_getRowSearchText(e){return Array.from(e.cells).map(e=>this._getCellSortableValue(e)).join(` `)}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}_updateTotalRows(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),n&&(this.totalRows=n.querySelectorAll(`tr`).length,this._ensureCurrentPageWithinBounds())}_paginateTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r;r=this._filteredRows?this._filteredRows:Array.from(n.querySelectorAll(`tr`)),Array.from(n.querySelectorAll(`tr`)).forEach(e=>e.style.display=`none`);let i=(this.currentPage-1)*this.pageSize,a=i+this.pageSize;r.slice(i,a).forEach(e=>e.style.display=``)}_changePage(e){let t=Math.ceil(this.totalRows/this.pageSize);e<1||e>t||(this.currentPage=e,this._paginateTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0})),this.requestUpdate())}};N([g({type:String})],Sd.prototype,`searchTerm`,void 0),N([g({type:Boolean,attribute:`with-pagination`})],Sd.prototype,`pagination`,void 0),N([g({type:Boolean,attribute:`with-filtering-search`})],Sd.prototype,`filteringSearch`,void 0),N([g({type:Boolean,attribute:`no-scroll`})],Sd.prototype,`noScroll`,void 0),N([g({type:Number,attribute:`page-size`})],Sd.prototype,`pageSize`,void 0),N([g({type:Number})],Sd.prototype,`currentPage`,void 0),N([g({type:Number})],Sd.prototype,`totalRows`,void 0),Sd=N([a(`scb-table-advanced`)],Sd),y(),C(),k(),P();var Cd=class extends _c{constructor(...e){super(...e),this.iconOnly=!1,this.inlineIcon=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.setAttribute(`aria-selected`,this.active?`true`:`false`),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[..._c.styles,p`
|
|
12693
|
+
`}_onSearchInput(e){let t=e.target.value;this.searchTerm=t,this._filterTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0}))}_filterTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r=n,i=Array.from(r.querySelectorAll(`tr`)),a=this.searchTerm.trim().toLowerCase();if(!a)this._filteredRows=null,i.forEach(e=>e.style.display=``),this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this.pagination&&this._paginateTable(),this._sortedColumn!==null&&this._sortTable(this._sortedColumn,this._sortDirection);else{this._filteredRows=i.filter(e=>this._getRowSearchText(e).toLowerCase().includes(a)),i.forEach(e=>e.style.display=`none`);let e=this._filteredRows;this._sortedColumn!==null&&(e=[...e],e.sort((e,t)=>{let n=this._getCellSortableValue(e.children[this._sortedColumn]),r=this._getCellSortableValue(t.children[this._sortedColumn]);return this._compareCellValues(n,r,this._sortDirection)}),this._filteredRows=e),this.totalRows=this._filteredRows.length,this._ensureCurrentPageWithinBounds(),this.pagination?this._paginateTable():this._filteredRows.forEach(e=>e.style.display=``)}}firstUpdated(){let e=this.shadowRoot.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners(),this._attachTbodyObserver(),this._refreshFromTableContent())}updated(e){super.updated(e),(e.has(`searchTerm`)||e.has(`currentPage`)||e.has(`pageSize`)||e.has(`filteringSearch`)||e.has(`pagination`))&&this.updateComplete.then(()=>{this.isConnected&&this._refreshFromTableContent()})}_disconnectTbodyObserver(){this._tbodyObserver&&=(this._tbodyObserver.disconnect(),null),this._observedTbody=null}_attachTbodyObserver(){let e=this._getTbody();if(!e){this._disconnectTbodyObserver();return}this._observedTbody!==e&&(this._disconnectTbodyObserver(),this._observedTbody=e,this._tbodyObserver=new MutationObserver(()=>{this._suppressTbodyObserver||this._scheduleTableRefresh()}),this._tbodyObserver.observe(e,{childList:!0,subtree:!0,characterData:!0}))}_scheduleTableRefresh(){this._pendingTableRefresh||(this._pendingTableRefresh=!0,queueMicrotask(()=>{this._pendingTableRefresh=!1,this._refreshFromTableContent()}))}_refreshFromTableContent(){if(this._attachTbodyObserver(),this.filteringSearch){this._filterTable();return}if(this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this._sortedColumn!==null){this._sortTable(this._sortedColumn,this._sortDirection);return}this.pagination&&this._paginateTable()}_ensureCurrentPageWithinBounds(){let e=Math.max(1,Math.ceil(this.totalRows/this.pageSize)),t=Math.min(Math.max(1,this.currentPage),e);t!==this.currentPage&&(this.currentPage=t)}_getTbody(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);if(t)return t}return null}_attachThListeners(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[];t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(n.push(...e.querySelectorAll(`th`)),r.push(...e.querySelectorAll(`td`)),i.push(...e.querySelectorAll(`tr`)))}),n.forEach((e,t)=>{e.style.textAlign=`left`,e.style.padding=`16px 0px 16px 32px`,e.style.position=`relative`,e.style.backgroundColor=`var(--md-sys-color-surface)`,e.style.fontFamily=`var(--md-sys-typescale-label-medium-font)`,e.style.fontSize=`var(--md-sys-typescale-label-medium-size)`,e.style.lineHeight=`var(--md-sys-typescale-label-medium-line-height)`,e.style.fontWeight=`var(--md-sys-typescale-label-medium-weight)`,e.style.letterSpacing=`var(--md-sys-typescale-label-medium-tracking)`,e.style.verticalAlign=`bottom`;let n=e.firstChild;if(n&&n.nodeType===Node.TEXT_NODE&&n.textContent?.trim()||n&&n.nodeType===Node.ELEMENT_NODE&&n.tagName.toLowerCase()!==`p`){let i=document.createElement(`p`);i.textContent=n.textContent?n.textContent.trim():``,i.style.margin=`0`,e.replaceChild(i,n),e.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>e.remove());let a=document.createElement(`scb-icon-button`);a.className=`scb-sort-icon`,a.onclick=()=>this._onThClick(t),a.setAttribute(`variant`,`standard`),a.setAttribute(`size`,`small`),this._sortedColumn===t?(a.setAttribute(`variant`,`filled-tonal`),a.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(a.setAttribute(`icon`,`swap_horiz`),a.style.transform+=` rotate(90deg)`,a.style.alignSelf=`end`);var r=document.createElement(`div`);r.style.display=`flex`,r.style.gap=`8px`,r.style.flexWrap=`nowrap`,r.style.alignItems=`center`,r.appendChild(i),r.appendChild(a),e.appendChild(r)}}),r.forEach(e=>{e.style.padding=`16px 0px 16px 32px`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--md-sys-color-outline-variant)`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--md-sys-color-surface)`,e.style.fontFamily=`var(--md-sys-typescale-body-medium-font)`,e.style.fontSize=`var(--md-sys-typescale-body-medium-size)`,e.style.lineHeight=`var(--md-sys-typescale-body-medium-line-height)`,e.style.fontWeight=`var(--md-sys-typescale-body-medium-weight)`,e.style.letterSpacing=`var(--md-sys-typescale-body-medium-tracking)`}),i.forEach((e,t)=>{t%2==1&&e.querySelectorAll(`td`).forEach(e=>{e.style.backgroundColor=`var(--scb-background-row)`});let n=e.querySelectorAll(`th`);n.length>0&&n.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`24px`),t===n.length-1?e.style.paddingRight=`24px`:e.style.paddingRight=``});let r=e.querySelectorAll(`td`);r.length>0&&r.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`24px`),t===r.length-1?e.style.paddingRight=`24px`:e.style.paddingRight=``})}),this.pagination&&this._paginateTable()}_onThClick(e){this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners()}_sortTable(e,t){let n=this.shadowRoot.querySelector(`slot`);if(!n)return;let r=n.assignedNodes({flatten:!0}),i=null;if(r.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(i=t)}}),!i)return;let a;a=this._filteredRows?[...this._filteredRows]:Array.from(i.querySelectorAll(`tr`)),a.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)});let o=this._tbodyObserver!==null;o&&this._disconnectTbodyObserver();try{a.forEach(e=>i.appendChild(e))}finally{o&&this._attachTbodyObserver()}this._filteredRows&&(this._filteredRows=a,this.totalRows=this._filteredRows.length),this.pagination&&this._paginateTable()}_getRowSearchText(e){return Array.from(e.cells).map(e=>this._getCellSortableValue(e)).join(` `)}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}_updateTotalRows(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),n&&(this.totalRows=n.querySelectorAll(`tr`).length,this._ensureCurrentPageWithinBounds())}_paginateTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r;r=this._filteredRows?this._filteredRows:Array.from(n.querySelectorAll(`tr`)),Array.from(n.querySelectorAll(`tr`)).forEach(e=>e.style.display=`none`);let i=(this.currentPage-1)*this.pageSize,a=i+this.pageSize;r.slice(i,a).forEach(e=>e.style.display=``)}_changePage(e){let t=Math.ceil(this.totalRows/this.pageSize);e<1||e>t||(this.currentPage=e,this._paginateTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0})),this.requestUpdate())}};P([g({type:String})],Md.prototype,`searchTerm`,void 0),P([g({type:Boolean,attribute:`with-pagination`})],Md.prototype,`pagination`,void 0),P([g({type:Boolean,attribute:`with-filtering-search`})],Md.prototype,`filteringSearch`,void 0),P([g({type:Boolean,attribute:`no-scroll`})],Md.prototype,`noScroll`,void 0),P([g({type:Number,attribute:`page-size`})],Md.prototype,`pageSize`,void 0),P([g({type:Number})],Md.prototype,`currentPage`,void 0),P([g({type:Number})],Md.prototype,`totalRows`,void 0),Md=P([a(`scb-table-advanced`)],Md),y(),C(),k(),F();var Nd=class extends gc{constructor(...e){super(...e),this.iconOnly=!1,this.inlineIcon=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.setAttribute(`aria-selected`,this.active?`true`:`false`),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...gc.styles,p`
|
|
12668
12694
|
/* Icon-only: dölj textslot */
|
|
12669
12695
|
:host([icon-only]) slot:not([name='icon']) {
|
|
12670
12696
|
display: none;
|
|
12671
12697
|
}
|
|
12672
|
-
`]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};
|
|
12698
|
+
`]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};P([g({type:String})],Nd.prototype,`icon`,null),P([g({type:Boolean,reflect:!0,attribute:`icon-only`})],Nd.prototype,`iconOnly`,void 0),P([g({type:Boolean,reflect:!0,attribute:`inline-icon`})],Nd.prototype,`inlineIcon`,void 0),Nd=P([a(`scb-primary-tab`)],Nd),y(),C(),k(),F();var Pd=class extends yc{constructor(...e){super(...e),this.iconOnly=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){if(super.firstUpdated(e),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...yc.styles,p`
|
|
12673
12699
|
/* Icon-only: göm all text utom slot="icon" */
|
|
12674
12700
|
:host([icon-only]) slot:not([name='icon']) {
|
|
12675
12701
|
display: none;
|
|
12676
12702
|
}
|
|
12677
|
-
`]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};
|
|
12703
|
+
`]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};P([g({type:String})],Pd.prototype,`icon`,null),P([g({type:Boolean,reflect:!0,attribute:`icon-only`})],Pd.prototype,`iconOnly`,void 0),Pd=P([a(`scb-secondary-tab`)],Pd),y(),C(),F();var Fd=class extends Cc{constructor(...e){super(...e),this.ariaLabel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._isDispatching=!1,this._onChange=e=>{if(!e.composed&&!this._isDispatching){e.stopPropagation(),this._isDispatching=!0;let t=e.target.activeTabIndex;this.dispatchEvent(new CustomEvent(`change`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`tabschange`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this._isDispatching=!1}}}static{this.styles=[...Cc.styles,p`
|
|
12678
12704
|
:host {
|
|
12679
12705
|
/*Containerfärg */
|
|
12680
12706
|
--md-primary-tab-container-color: var(--md-sys-color-surface);
|
|
@@ -12701,7 +12727,7 @@
|
|
|
12701
12727
|
margin-inline-start: var(--scb-tabs-spacing-inline-start, 0);
|
|
12702
12728
|
margin-inline-end: var(--scb-tabs-spacing-inline-end, 0);
|
|
12703
12729
|
}
|
|
12704
|
-
`]}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tablist`)}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`change`,this._onChange),this.#e()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}#e(){let e=this.#t(this.spacing),t=this.#t(this.spacingTop)??e,n=this.#t(this.spacingBottom)??e,r=this.#t(this.spacingLeft),i=this.#t(this.spacingRight);t?this.style.setProperty(`--scb-tabs-spacing-block-start`,t):this.style.removeProperty(`--scb-tabs-spacing-block-start`),n?this.style.setProperty(`--scb-tabs-spacing-block-end`,n):this.style.removeProperty(`--scb-tabs-spacing-block-end`),r?this.style.setProperty(`--scb-tabs-spacing-inline-start`,r):this.style.removeProperty(`--scb-tabs-spacing-inline-start`),i?this.style.setProperty(`--scb-tabs-spacing-inline-end`,i):this.style.removeProperty(`--scb-tabs-spacing-inline-end`)}#t(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};
|
|
12730
|
+
`]}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tablist`)}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`change`,this._onChange),this.#e()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}#e(){let e=this.#t(this.spacing),t=this.#t(this.spacingTop)??e,n=this.#t(this.spacingBottom)??e,r=this.#t(this.spacingLeft),i=this.#t(this.spacingRight);t?this.style.setProperty(`--scb-tabs-spacing-block-start`,t):this.style.removeProperty(`--scb-tabs-spacing-block-start`),n?this.style.setProperty(`--scb-tabs-spacing-block-end`,n):this.style.removeProperty(`--scb-tabs-spacing-block-end`),r?this.style.setProperty(`--scb-tabs-spacing-inline-start`,r):this.style.removeProperty(`--scb-tabs-spacing-inline-start`),i?this.style.setProperty(`--scb-tabs-spacing-inline-end`,i):this.style.removeProperty(`--scb-tabs-spacing-inline-end`)}#t(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};P([g({type:String,reflect:!0,attribute:`aria-label`})],Fd.prototype,`ariaLabel`,void 0),P([g({type:String,reflect:!0})],Fd.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Fd.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Fd.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Fd.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Fd.prototype,`spacingRight`,void 0),Fd=P([a(`scb-tabs`)],Fd),C(),y(),Vl(),Vc(),w(),k(),E(),F();var Id,Ld=class extends S{static{Id=this}constructor(...e){super(...e),this.expanded=!1,this.size=`medium`,this.label=``,this.supportingText=``,this.itemHref=`#`,this.noDivider=!1,this._unique=Id._uid(),this._overflowVisibleTimer=null,this._slotHasContent=!1,this._trailingSlotHasContent=!1,this._onSlotChange=()=>{let e=this.renderRoot.querySelector(`slot:not([name])`),t=!!e&&e.assignedElements({flatten:!0}).length>0;this._slotHasContent!==t&&(this._slotHasContent=t,this.requestUpdate()),!this._slotHasContent&&this.expanded&&(this.expanded=!1),this._applyInertByExpanded()},this._toggleAccordion=()=>{if(!this._slotHasContent)return;let e=!this.expanded;this.setExpanded(e)},this._onKeyDown=e=>{let t=this.closest(`scb-toc`),n=Array.from(t?.querySelectorAll(`scb-toc-item`)||[]).map(e=>({host:e,label:e.renderRoot.querySelector(`.toc-item-label`)||null})).filter(e=>!!e.label),r=n.findIndex(e=>e.host===this);if(r<0)return;let i=e.currentTarget?.classList?.contains(`toc-chevron-button`)??!1;switch(e.key){case`Enter`:case` `:if(!i)return;e.preventDefault(),this._toggleAccordion();break;case`ArrowDown`:e.preventDefault(),r<n.length-1&&n[r+1].label.focus();break;case`ArrowUp`:e.preventDefault(),r>0&&n[r-1].label.focus();break;case`Home`:e.preventDefault(),n.length&&n[0].label.focus();break;case`End`:e.preventDefault(),n.length&&n[n.length-1].label.focus();break}}}setExpanded(e){this.expanded!==e&&(this.expanded=e)}static{this._uidPrefix=`uid-${Math.random().toString(36).slice(2)}`}static{this._uidSeq=0}static _uid(){return globalThis.crypto?.randomUUID?.()??`${Id._uidPrefix}-${++Id._uidSeq}`}static{this.styles=[p`
|
|
12705
12731
|
:host {
|
|
12706
12732
|
display: block;
|
|
12707
12733
|
--scb-toc-transition-duration: var(--motion-duration-short, 150ms);
|
|
@@ -13003,7 +13029,7 @@
|
|
|
13003
13029
|
|
|
13004
13030
|
${this.noDivider?``:b`<scb-divider></scb-divider>`}
|
|
13005
13031
|
</div>
|
|
13006
|
-
`}};
|
|
13032
|
+
`}};P([g({type:Boolean,reflect:!0})],Ld.prototype,`expanded`,void 0),P([g({type:String,reflect:!0})],Ld.prototype,`size`,void 0),P([g({type:String,reflect:!0})],Ld.prototype,`label`,void 0),P([g({type:String,attribute:`supporting-text`})],Ld.prototype,`supportingText`,void 0),P([g({type:String,attribute:`item-href`})],Ld.prototype,`itemHref`,void 0),P([g({type:Boolean,attribute:`no-divider`})],Ld.prototype,`noDivider`,void 0),Ld=Id=P([a(`scb-toc-item`)],Ld),C(),y(),F();var Rd=class extends S{constructor(...e){super(...e),this.singleOpen=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=[p`
|
|
13007
13033
|
:host {
|
|
13008
13034
|
display: block;
|
|
13009
13035
|
/* Vertikalt avstånd styrs av spacing-attributen via CSS-variabler */
|
|
@@ -13021,8 +13047,8 @@
|
|
|
13021
13047
|
<div class="scb-toc-list" role="list">
|
|
13022
13048
|
<slot @slotchange=${this.#t}></slot>
|
|
13023
13049
|
</div>
|
|
13024
|
-
`}_getDirectItems(){return Array.from(this.children).filter(e=>e.tagName===`SCB-TOC-ITEM`)}#e(e){if(!this.singleOpen)return;let t=e;if(!t.detail?.expanded)return;let n=t.target;!n||n.tagName!==`SCB-TOC-ITEM`||this._getDirectItems().forEach(e=>{e!==n&&e.expanded&&e.setExpanded(!1)})}#t(){this.singleOpen&&this.#n()}#n(){if(!this.singleOpen)return;let e=this._getDirectItems().filter(e=>e.expanded);e.length<=1||e.slice(1).forEach(e=>e.setExpanded(!1))}#r(){let e=this.#i(this.spacing),t=this.#i(this.spacingTop)??e,n=this.#i(this.spacingBottom)??e,r=this.#i(this.spacingLeft),i=this.#i(this.spacingRight);t?this.style.setProperty(`--scb-toc-spacing-block-start`,t):this.style.removeProperty(`--scb-toc-spacing-block-start`),n?this.style.setProperty(`--scb-toc-spacing-block-end`,n):this.style.removeProperty(`--scb-toc-spacing-block-end`),r?this.style.setProperty(`--scb-toc-spacing-inline-start`,r):this.style.removeProperty(`--scb-toc-spacing-inline-start`),i?this.style.setProperty(`--scb-toc-spacing-inline-end`,i):this.style.removeProperty(`--scb-toc-spacing-inline-end`)}#i(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};
|
|
13025
|
-
`)}`;return new Blob([i],{type:`text/csv;charset=utf-8;`})}async function
|
|
13050
|
+
`}_getDirectItems(){return Array.from(this.children).filter(e=>e.tagName===`SCB-TOC-ITEM`)}#e(e){if(!this.singleOpen)return;let t=e;if(!t.detail?.expanded)return;let n=t.target;!n||n.tagName!==`SCB-TOC-ITEM`||this._getDirectItems().forEach(e=>{e!==n&&e.expanded&&e.setExpanded(!1)})}#t(){this.singleOpen&&this.#n()}#n(){if(!this.singleOpen)return;let e=this._getDirectItems().filter(e=>e.expanded);e.length<=1||e.slice(1).forEach(e=>e.setExpanded(!1))}#r(){let e=this.#i(this.spacing),t=this.#i(this.spacingTop)??e,n=this.#i(this.spacingBottom)??e,r=this.#i(this.spacingLeft),i=this.#i(this.spacingRight);t?this.style.setProperty(`--scb-toc-spacing-block-start`,t):this.style.removeProperty(`--scb-toc-spacing-block-start`),n?this.style.setProperty(`--scb-toc-spacing-block-end`,n):this.style.removeProperty(`--scb-toc-spacing-block-end`),r?this.style.setProperty(`--scb-toc-spacing-inline-start`,r):this.style.removeProperty(`--scb-toc-spacing-inline-start`),i?this.style.setProperty(`--scb-toc-spacing-inline-end`,i):this.style.removeProperty(`--scb-toc-spacing-inline-end`)}#i(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};P([g({type:Boolean,attribute:`single-open`,reflect:!0})],Rd.prototype,`singleOpen`,void 0),P([g({type:String,reflect:!0})],Rd.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],Rd.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],Rd.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],Rd.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],Rd.prototype,`spacingRight`,void 0),Rd=P([a(`scb-toc`)],Rd);var zd=e=>{let t=getComputedStyle(e).backgroundColor;return t&&t!==`rgba(0, 0, 0, 0)`?t:`#ffffff`};function Bd({lang:e,title:t}){let n=e===`en`?`visualization`:`visualisering`;return(t||n).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||n}function Vd(e,t){let n=t===`csv`?e.lang===`en`?`-table`:`-tabell`:``;return`${Bd(e)}${n}.${t}`}function Hd(e=document){return e}function Ud(e=document){let t=Hd(e);return t.fullscreenElement||t.webkitFullscreenElement||null}function Wd(e){return!!(e.requestFullscreen||e.webkitRequestFullscreen)}async function Gd(e,t=document){if(!Wd(e))return;let n=Hd(t),r=Ud(t);if(r===e){n.exitFullscreen?await n.exitFullscreen():n.webkitExitFullscreen&&await n.webkitExitFullscreen();return}r&&(n.exitFullscreen?await n.exitFullscreen():n.webkitExitFullscreen&&await n.webkitExitFullscreen()),e.requestFullscreen?await e.requestFullscreen():e.webkitRequestFullscreen&&await e.webkitRequestFullscreen()}async function Kd(e,t=document){let n=t.createElement(`iframe`);n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.right=`0`,n.style.bottom=`0`,n.style.width=`0`,n.style.height=`0`,n.style.border=`0`,n.style.visibility=`hidden`,t.body.appendChild(n);let r=()=>{n.remove()},i=n.contentDocument,a=n.contentWindow;if(!i||!a){r();return}i.open(),i.write(e),i.close();let o=Array.from(i.images||[]);await Promise.all(o.map(e=>e.complete?Promise.resolve():new Promise(t=>{e.addEventListener(`load`,()=>t(null),{once:!0}),e.addEventListener(`error`,()=>t(null),{once:!0})})));let s=()=>{a.removeEventListener(`afterprint`,s),r()};a.addEventListener(`afterprint`,s,{once:!0}),setTimeout(()=>{a.focus(),a.print(),setTimeout(r,1e3)},50)}async function qd(e,t){e.setAttribute(`data-scb-viz-force-light`,``),await new Promise(e=>requestAnimationFrame(()=>e(null)));try{return await t()}finally{e.removeAttribute(`data-scb-viz-force-light`)}}function Jd(e,t){let n=t===`en`?`,`:`;`,r=e=>`"${String(e??``).replace(/\r?\n/g,` `).replace(/"/g,`""`)}"`,i=`\uFEFF${e.map(e=>e.map(r).join(n)).join(`\r
|
|
13051
|
+
`)}`;return new Blob([i],{type:`text/csv;charset=utf-8;`})}async function Yd(e,t,n){let r=await Qd(e,t);return r?rf(r,n===`jpeg`?`image/jpeg`:`image/png`,n===`jpeg`?.92:void 0):null}async function Xd(e,t,n){let r=await Qd(e,t);return r?r.toDataURL(n===`jpeg`?`image/jpeg`:`image/png`,n===`jpeg`?.92:void 0):null}function Zd(e,t,n=document){let r=URL.createObjectURL(e),i=n.createElement(`a`);i.href=r,i.download=t,n.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}async function Qd(e,t){let n=zd(t);if(e instanceof HTMLCanvasElement){let t=e.width||Math.round(e.getBoundingClientRect().width),r=e.height||Math.round(e.getBoundingClientRect().height);if(!t||!r)return null;let i=document.createElement(`canvas`);i.width=t,i.height=r;let a=i.getContext(`2d`);return a?(a.fillStyle=n,a.fillRect(0,0,t,r),a.drawImage(e,0,0,t,r),i):null}if(e instanceof HTMLImageElement){let t=e.naturalWidth||e.width,r=e.naturalHeight||e.height;return!t||!r?null:tf(e.currentSrc||e.src,t,r,n)}let{width:r,height:i,serialized:a}=$d(e);if(!r||!i||!a)return null;let o=new Blob([a],{type:`image/svg+xml;charset=utf-8`}),s=URL.createObjectURL(o);try{return await tf(s,r,i,n)}finally{URL.revokeObjectURL(s)}}function $d(e){let t=e.cloneNode(!0),n=e.getBoundingClientRect(),r=e.viewBox?.baseVal,i=Math.round(r?.width||n.width||Number(e.getAttribute(`width`))||0),a=Math.round(r?.height||n.height||Number(e.getAttribute(`height`))||0);return t.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),t.setAttribute(`xmlns:xlink`,`http://www.w3.org/1999/xlink`),!t.getAttribute(`width`)&&i&&t.setAttribute(`width`,String(i)),!t.getAttribute(`height`)&&a&&t.setAttribute(`height`,String(a)),!t.getAttribute(`viewBox`)&&i&&a&&t.setAttribute(`viewBox`,`0 0 ${i} ${a}`),ef(e,t),t.querySelectorAll(`.highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point`).forEach(e=>e.remove()),{width:i,height:a,serialized:new XMLSerializer().serializeToString(t)}}function ef(e,t){let n=getComputedStyle(e),r=``;for(let e=0;e<n.length;e+=1){let t=n[e],i=n.getPropertyValue(t);i&&(r+=`${t}:${i};`)}r&&t.setAttribute(`style`,r);let i=Array.from(e.children),a=Array.from(t.children);for(let e=0;e<i.length;e+=1){let t=i[e],n=a[e];t&&n&&ef(t,n)}}async function tf(e,t,n,r){let i=Math.max(1,Math.min(2,window.devicePixelRatio||1)),a=Math.max(1,Math.round(t)),o=Math.max(1,Math.round(n)),s=document.createElement(`canvas`);s.width=Math.max(1,Math.round(a*i)),s.height=Math.max(1,Math.round(o*i));let c=s.getContext(`2d`);if(!c)return null;let l=await nf(e);return l?(c.scale(i,i),c.fillStyle=r,c.fillRect(0,0,a,o),c.drawImage(l,0,0,a,o),s):null}function nf(e){return new Promise(t=>{let n=new Image;n.crossOrigin=`anonymous`,n.onload=()=>t(n),n.onerror=()=>t(null),n.src=e})}function rf(e,t,n){return new Promise(r=>{e.toBlob(e=>r(e),t,n)})}function af(e,t){return`<table class="scb-viz-print-table">${e.headers.length?`<thead><tr>${e.headers.map((n,r)=>`<th scope="col" class="${e.alignments[r]===`right`?`align-right`:`align-left`}"><span class="scb-viz-print-table-heading-text">${n.html||t(n.text)}</span></th>`).join(``)}</tr></thead>`:``}${`<tbody>${e.rows.map((n,r)=>{let i=e.rowHeaderRows[r]===!0;return`<tr>${n.map((n,r)=>{let a=e.alignments[r]===`right`?`align-right`:`align-left`,o=n.html||t(n.text);return r===0&&i?`<th scope="row" class="${a}">${o}</th>`:`<td class="${a}">${o}</td>`}).join(``)}</tr>`}).join(``)}</tbody>`}</table>`}function of(e){let t=[];if(e.description&&t.push(`
|
|
13026
13052
|
<section class="print-section">
|
|
13027
13053
|
<h2>${e.escapeHtml(e.descriptionLabel)}</h2>
|
|
13028
13054
|
<div class="body-text-rich">${e.renderRichTextHtml(e.description)}</div>
|
|
@@ -13049,7 +13075,7 @@
|
|
|
13049
13075
|
<h2>${e.escapeHtml(e.moreAboutStatsLabel)}</h2>
|
|
13050
13076
|
${n.join(``)}
|
|
13051
13077
|
</section>
|
|
13052
|
-
`)}return t.join(``)}function
|
|
13078
|
+
`)}return t.join(``)}function sf(e){let t=e.escapeHtml;return`<!doctype html>
|
|
13053
13079
|
<html lang="${t(e.lang||`sv`)}">
|
|
13054
13080
|
<head>
|
|
13055
13081
|
<meta charset="utf-8">
|
|
@@ -13119,7 +13145,7 @@
|
|
|
13119
13145
|
${e.footerHtml||``}
|
|
13120
13146
|
</article>
|
|
13121
13147
|
</body>
|
|
13122
|
-
</html>`}var
|
|
13148
|
+
</html>`}var cf=(e,t,n=`1.25`)=>{let r=document.createElementNS(e,`path`);return r.setAttribute(`d`,t),r.setAttribute(`class`,`scb-viz-highcharts-pattern__mark`),r.setAttribute(`stroke-width`,n),r.setAttribute(`stroke-linecap`,`square`),r},lf=(e,t,n,r)=>{let i=document.createElementNS(e,`circle`);return i.setAttribute(`cx`,t),i.setAttribute(`cy`,n),i.setAttribute(`r`,r),i.setAttribute(`class`,`scb-viz-highcharts-pattern__mark--dot`),i},uf=(e,t,n,r,i)=>{let a=document.createElementNS(e,`rect`);return a.setAttribute(`x`,t),a.setAttribute(`y`,n),a.setAttribute(`width`,r),a.setAttribute(`height`,i),a.setAttribute(`class`,`scb-viz-highcharts-pattern__mark--square`),a},df={dashStyles:[`Solid`,`ShortDash`,`ShortDot`,`ShortDashDot`,`ShortDashDotDot`,`Dot`,`LongDash`,`LongDashDot`,`Dash`,`DashDot`],markerSymbols:[`circle`,`diamond`,`square`,`triangle`,`triangle-down`],defaultPatternKind:`grid`,patterns:[{kind:`diagonal`,appendMarks:(e,t)=>{e.appendChild(cf(t,`M-2,8 l10,-10 M0,10 l10,-10 M8,12 l4,-4`))}},{kind:`dots`,appendMarks:(e,t)=>{e.appendChild(lf(t,`2`,`2`,`1.2`)),e.appendChild(lf(t,`7`,`7`,`1.2`))}},{kind:`cross`,appendMarks:(e,t)=>{e.appendChild(cf(t,`M0,0 L10,10 M10,0 L0,10`))}},{kind:`vertical`,appendMarks:(e,t)=>{e.appendChild(cf(t,`M2,0 L2,10 M7,0 L7,10`))}},{kind:`horizontal`,appendMarks:(e,t)=>{e.appendChild(cf(t,`M0,2 L10,2 M0,7 L10,7`))}},{kind:`grid`,appendMarks:(e,t)=>{e.appendChild(cf(t,`M0,0 L10,0 M0,5 L10,5 M0,10 L10,10`,`1`))}},{kind:`diagonal-reverse`,appendMarks:(e,t)=>{e.appendChild(cf(t,`M0,0 L10,10 M-2,2 L8,12 M2,-2 L12,8`))}},{kind:`dots-dense`,appendMarks:(e,t)=>{e.appendChild(lf(t,`2`,`2`,`1`)),e.appendChild(lf(t,`7`,`2`,`1`)),e.appendChild(lf(t,`2`,`7`,`1`)),e.appendChild(lf(t,`7`,`7`,`1`))}},{kind:`checker`,appendMarks:(e,t)=>{e.appendChild(uf(t,`0`,`0`,`4`,`4`)),e.appendChild(uf(t,`5`,`5`,`4`,`4`))}},{kind:`zigzag`,appendMarks:(e,t)=>{e.appendChild(cf(t,`M-2,8 L2,4 L6,8 L10,4 L14,8 M-2,3 L2,-1 L6,3 L10,-1 L14,3`))}}]};function ff(){return df.patterns.map(({kind:e})=>e)}function pf(e){return df.patterns.find(({kind:t})=>t===e)||df.patterns.find(({kind:e})=>e===df.defaultPatternKind)||df.patterns[0]}function mf(e,t,n){let r=pf(n);return r?.appendMarks(e,t),r?.kind||n}function hf(e){let t=df.dashStyles,n=df.markerSymbols,r=ff();return{dashStyle:t[e%t.length],markerSymbol:n[e%n.length],patternKind:r[e%r.length]}}function gf(e){return hf(e)}function _f(e,t){let n=``,r=t&&t.options&&typeof t.options==`object`?t.options:{},i=t&&t.userOptions&&typeof t.userOptions==`object`?t.userOptions:{},a=e&&e.options&&typeof e.options==`object`?e.options:{},o=a.custom&&typeof a.custom==`object`?a.custom:{},s=e&&e.custom&&typeof e.custom==`object`?e.custom:{};return r.chart&&typeof r.chart.id==`string`?n=r.chart.id:i.chart&&typeof i.chart.id==`string`&&(n=i.chart.id),n=String(n||``).trim().toLowerCase(),n===`grouped-column`||n===`grouped-bar`||r.custom&&r.custom.scbVizGroupedClustered===!0||o.scbVizGroupedCategory===!0||o.scbVizGroupedCategoryLegend===!0||s.scbVizGroupedCategory===!0||s.scbVizGroupedCategoryLegend===!0||e&&e._scbVizGroupedCategoryLegendItem===!0?!0:vf(e)}function vf(e){return Array.isArray(e?.points)&&e.points.some(e=>{let t=e&&e.custom&&typeof e.custom==`object`?e.custom:{};return typeof t.scbVizGroup==`string`&&t.scbVizGroup.trim()})}function yf(e){let t=[e?.colorIndex,e?.options?.colorIndex,e?.userOptions?.colorIndex,e?.series?.colorIndex,e?.series?.options?.colorIndex].find(e=>Number.isInteger(e));return Number.isInteger(t)?Number(t):null}function bf(e){return!e||typeof e!=`object`?{indexByKey:{},nextIndex:0}:((!e.scbVizGroupedSeriesDifferentiationStore||typeof e.scbVizGroupedSeriesDifferentiationStore!=`object`)&&(e.scbVizGroupedSeriesDifferentiationStore={indexByKey:{},nextIndex:0}),e.scbVizGroupedSeriesDifferentiationStore)}function xf(e,t){let n=yf(e);if(Number.isInteger(n))return`color:${n}`;let r=e?.custom&&typeof e.custom==`object`&&typeof e.custom.scbVizGroup==`string`?e.custom.scbVizGroup.trim():``;if(r)return`group:${r}`;let i=typeof e?.name==`string`?e.name.trim():``;if(i)return`name:${i}`;let a=typeof e?.series?.name==`string`?e.series.name.trim():``;return a?`series:${a}`:`fallback:${t}`}function Sf(e,t,n){let r=yf(e);if(typeof r==`number`&&Number.isInteger(r))return r;let i=bf(t),a=xf(e,n);return Object.prototype.hasOwnProperty.call(i.indexByKey,a)||(i.indexByKey[a]=i.nextIndex,i.nextIndex+=1),i.indexByKey[a]}function Cf(e,t,n){let r=Sf(e,t,n);return{variantIndex:r,...gf(r)}}function wf(e){return e.getCurrentPrintableView()!==`diagram`||!e.chart?.series?.length||!e.isHighchartsStyledMode(e.chart)?!1:e.chart.series.some(t=>e.getSeriesDifferentiationGroup(t,e.chart)!==null)}function Tf(e){let t=e?.element??e;return t instanceof SVGElement?t:null}function Ef(e){return!!(e?.styledMode||e?.renderer?.styledMode||e?.options?.chart?.styledMode)}function Df(e){if(e?.container instanceof SVGSVGElement)return e.container;let t=e?.renderTo?.querySelector(`svg`)??e?.container?.querySelector?.(`svg`);return t instanceof SVGSVGElement?t:null}function Of(e,t){let n=Tf(e);return Array.from(n?.classList??[]).find(e=>/^highcharts-color-\d+$/.test(e))??`highcharts-color-${t}`}function kf(e,t){let n=Tf(e);n&&(n.setAttribute(`data-scb-viz-role`,t.role),t.dashStyle?n.setAttribute(`data-scb-viz-dash-style`,t.dashStyle):n.removeAttribute(`data-scb-viz-dash-style`),t.patternKind?n.setAttribute(`data-scb-viz-pattern-kind`,t.patternKind):n.removeAttribute(`data-scb-viz-pattern-kind`))}function Af(e){let t=Tf(e);t&&(t.removeAttribute(`data-scb-viz-role`),t.removeAttribute(`data-scb-viz-dash-style`),t.removeAttribute(`data-scb-viz-pattern-kind`))}function jf(e,t){let n=Tf(e);if(!n||!t)return;let r=Array.from(n.classList).find(e=>/^highcharts-color-\d+$/.test(e));r!==t&&(r&&(n.classList.remove(r),n.setAttribute(`data-scb-viz-prev-color-class`,r)),n.classList.add(t),n.setAttribute(`data-scb-viz-added-color-class`,t))}function Mf(e){let t=Tf(e);if(!t)return;let n=t.getAttribute(`data-scb-viz-added-color-class`),r=t.getAttribute(`data-scb-viz-prev-color-class`);n&&(t.classList.remove(n),t.removeAttribute(`data-scb-viz-added-color-class`)),r&&(t.classList.add(r),t.removeAttribute(`data-scb-viz-prev-color-class`))}function Nf(e){let t=[],n=[],r=Tf(e?.legendItem?.group),i=(e,t)=>{let n=Tf(t);!n||e.includes(n)||e.push(n)};if(i(t,e?.legendLine),i(t,e?.legendItem?.line),i(n,e?.legendSymbol),i(n,e?.legendItem?.symbol),i(n,e?.legendArea),i(n,e?.legendItem?.area),r){let e=r.querySelector(`.highcharts-graph, .highcharts-legend-graph, line`);e&&i(t,e),r.querySelectorAll(`rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path`).forEach(e=>{i(n,e)})}return{graphTargets:t,fillTargets:n.filter(e=>!t.includes(e))}}function Pf(e,t,n){let r=Df(e);if(!r)return;let i=`http://www.w3.org/2000/svg`,a=r.querySelector(`defs`);a instanceof SVGDefsElement||(a=document.createElementNS(i,`defs`),r.insertBefore(a,r.firstChild));let o=`scb-viz-pattern-${t}-${n}`;if(a.querySelector(`#${o}`))return;let s=document.createElementNS(i,`pattern`);s.setAttribute(`id`,o),s.setAttribute(`patternUnits`,`userSpaceOnUse`),s.setAttribute(`width`,`10`),s.setAttribute(`height`,`10`),s.classList.add(t);let c=document.createElementNS(i,`rect`);c.setAttribute(`x`,`0`),c.setAttribute(`y`,`0`),c.setAttribute(`width`,`10`),c.setAttribute(`height`,`10`),c.setAttribute(`class`,`scb-viz-highcharts-pattern__background`),s.appendChild(c),mf(s,i,n),a.appendChild(s)}function Ff(e){return e&&typeof e==`object`&&`html`in e&&`text`in e?{html:typeof e.html==`string`?e.html:``,text:typeof e.text==`string`?e.text:``}:{html:``,text:e==null?``:String(e)}}function If(e){if(!e)return;let t=e.assignedElements({flatten:!0}),n=[];t.forEach(e=>{if(e.tagName===`TABLE`){n.push(e);return}e.querySelectorAll(`table`).forEach(e=>n.push(e))});let r=n[0];if(!r)return;let i=[],a=[],o=[],s=e=>e?(e.textContent??``).replace(/\s+/g,` `).trim():``,c=e=>e?{html:(e.innerHTML??``).trim(),text:s(e)}:{html:``,text:``},l=r.querySelector(`thead tr`);l&&Array.from(l.querySelectorAll(`th, td`)).forEach(e=>{i.push(c(e))});let u=Array.from(r.querySelectorAll(`tbody tr`)),d=u.length>0?u:Array.from(r.querySelectorAll(`tr`)).filter(e=>e.closest(`thead`)===null);if(d.forEach(e=>{let t=Array.from(e.querySelectorAll(`th, td`));if(t.length===0)return;o.push(t[0].tagName===`TH`&&e.closest(`thead`)===null&&e.closest(`tfoot`)===null);let n=[];t.forEach(e=>n.push(c(e))),a.push(n)}),!l&&a.length>0){let e=a[0],t=d[0],n=Array.from(t?.querySelectorAll(`th, td`)??[]);n.length>0&&n.every(e=>e.tagName===`TH`)&&t?.closest(`tbody`)===null&&(i.splice(0,i.length,...e),a.shift(),o.shift())}return{headers:i.length>0?i:void 0,rows:a,rowHeaderRows:o.length>0?o:void 0}}function Lf(e,t){let n=Math.max(e.headers?.length??0,...e.rows.map(e=>e.length)),r=[];for(let i=0;i<n;i+=1){if(i===0){r.push(`left`);continue}let n=e.rows.map(e=>Ff(e[i]).text).filter(e=>e!==``&&e!=null),a=n.length>0&&n.every(e=>t(e)!==null);r.push(a?`right`:`left`)}return r}function Rf(e,t){let n=t.normalizeCell??Ff,r=t.formatCell??(e=>n(e)),i=t.inferAlignments(e),a=Math.max(e.headers?.length??0,...e.rows.map(e=>e.length));return{alignments:i,colCount:a,headers:(e.headers??[]).map(e=>n(e)),rows:e.rows.map(e=>{let t=e.map((e,t)=>r(e,t,i));for(;t.length<a;)t.push({html:``,text:``});return t}),rowHeaderRows:e.rowHeaderRows??[]}}function zf(e,t=Ff){let n=[];return e.headers?.length&&n.push(e.headers.map(e=>t(e).text)),e.rows.forEach(e=>{n.push(e.map(e=>t(e).text))}),n}Kt();var Bf=class extends vl{};Bf.directiveName=`unsafeSVG`,Bf.resultType=2;var Vf=Wt(Bf);C(),y(),Vl(),fl(),F();var Hf=`<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
13123
13149
|
viewBox="0 0 727.3 87.3" style="enable-background:new 0 0 727.3 87.3;" xml:space="preserve" fill="currentColor">
|
|
13124
13150
|
<style type="text/css">
|
|
13125
13151
|
.st0{clip-path:url(#SVGID_00000118375311472882578510000008414848687067442345_);}
|
|
@@ -13234,7 +13260,7 @@
|
|
|
13234
13260
|
<path d="M688.2,24.4h5.8v6h-5.8V24.4z M688.2,36.6h5.8v30.1h-5.8V36.6z"/>
|
|
13235
13261
|
<path d="M701.8,24.4h5.8v26.3h0.1l11.2-14.1h7l-10,11.7l11.4,18.3H720l-7.7-14l-4.6,5.4v8.7h-5.8V24.4H701.8z"/>
|
|
13236
13262
|
</svg>
|
|
13237
|
-
`,
|
|
13263
|
+
`,Uf=0,$=class extends S{constructor(...e){super(...e),this.variant=`Standard`,this.selectedChip=`Diagram`,this.title=``,this.subtitle=``,this.description=``,this.comment=``,this.source=``,this.footnote=``,this.lang=`sv`,this.imageHref=``,this.officialStatistics=!1,this.disableToggle=!1,this.contentMaxWidth=``,this.containerMaxWidth=``,this.contentHeight=``,this.toggleHeightMode=`stable`,this._actionsMenuOpen=!1,this._seriesDifferentiationEnabled=!1,this._isFullscreen=!1,this._seriesDifferentiationSnapshots=new WeakMap,this._diagramReflowFrame=0,this._chartConfigSyncFrame=0,this._fullscreenDiagramSizingFrame=0,this._fullscreenDiagramHeight=``,this._instanceId=`scb-viz-${++Uf}`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onDocumentFullscreenChange=()=>{this._syncFullscreenState()},this._onWindowResize=()=>{this._isFullscreen&&this.#c()},this._onToggleFullscreenClick=async()=>{this._closeActionsMenu(),await this._toggleFullscreen()},this._onDocumentPointerDown=e=>{if(!this._actionsMenuOpen)return;let t=e.composedPath(),n=this.shadowRoot?.querySelector(`.actions-menu`);n&&t.includes(n)||this._closeActionsMenu()},this._onDocumentKeyDown=e=>{this._actionsMenuOpen&&e.key===`Escape`&&(e.preventDefault(),this._closeActionsMenu(),this._focusMenuButton())},this._onPrintClick=async()=>{this._closeActionsMenu(),await this.#x()},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await this.#_(`png`))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await this.#_(`jpeg`))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),this.#S())},this._onToggleSeriesDifferentiationClick=()=>{this._seriesDifferentiationEnabled=!this._seriesDifferentiationEnabled,this._closeActionsMenu(),this.#g()}}get descriptionLabel(){return this.lang===`en`?`Description of the chart`:`Beskrivning av diagrammet`}get moreAboutStatsLabel(){return this.lang===`en`?`More about the statistics`:`Mer om statistiken`}get commentLabel(){return this.lang===`en`?`Comments`:`Kommentar`}get sourceLabel(){return this.lang===`en`?`Source`:`Källa`}get footnoteLabel(){return this.lang===`en`?`Footnotes`:`Fotnot`}get officialStatisticsLabel(){return this.lang===`en`?`Official statistics of Sweden`:`Sveriges officiella statistik`}get officialStatisticsTitle(){return this.lang===`en`?`Part of Official statistics of Sweden`:`Tillhör Sveriges officiella statistik`}get officialStatisticsAlt(){return this.lang===`en`?`Read more about Official statistics of Sweden`:`Läs mer om Sveriges officiella statistik`}get actionsMenuLabel(){return this.lang===`en`?`Open menu`:`Öppna meny`}get printLabel(){return this.lang===`en`?`Print`:`Skriv ut`}get downloadPngLabel(){return this.lang===`en`?`Download PNG`:`Ladda ner PNG`}get downloadJpgLabel(){return this.lang===`en`?`Download JPG`:`Ladda ner JPG`}get downloadCsvLabel(){return this.lang===`en`?`Download CSV`:`Ladda ner CSV`}get enableSeriesDifferentiationLabel(){return this.lang===`en`?`Show symbols and patterns`:`Visa symboler och mönster`}get disableSeriesDifferentiationLabel(){return this.lang===`en`?`Hide symbols and patterns`:`Dölj symboler och mönster`}get enterFullscreenLabel(){return this.lang===`en`?`View fullscreen`:`Visa i helskärm`}get exitFullscreenLabel(){return this.lang===`en`?`Exit fullscreen`:`Avsluta helskärm`}_getImageAltText(){return this.lang===`en`?`Chart image`:`Diagrambild`}_getTitleId(){return this.title?`${this._instanceId}-title`:void 0}_getSubtitleId(){return this.subtitle?`${this._instanceId}-subtitle`:void 0}_getDescriptionId(){return this.description?`${this._instanceId}-description`:void 0}_getContentAriaLabelledBy(){let e=[this._getTitleId(),this._getSubtitleId()].filter(Boolean);return e.length?e.join(` `):void 0}_getContentAriaDescribedBy(){let e=[this._getDescriptionId()].filter(Boolean);return e.length?e.join(` `):void 0}static{this.styles=p`
|
|
13238
13264
|
:host {
|
|
13239
13265
|
display: block;
|
|
13240
13266
|
box-sizing: border-box;
|
|
@@ -13849,7 +13875,7 @@
|
|
|
13849
13875
|
width: calc(100% / var(--scb-viz-print-scale, 1));
|
|
13850
13876
|
}
|
|
13851
13877
|
}
|
|
13852
|
-
`}connectedCallback(){super.connectedCallback(),document.addEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.addEventListener(`keydown`,this._onDocumentKeyDown),document.addEventListener(`fullscreenchange`,this._onDocumentFullscreenChange),document.addEventListener(`webkitfullscreenchange`,this._onDocumentFullscreenChange),window.addEventListener(`resize`,this._onWindowResize),window.visualViewport?.addEventListener(`resize`,this._onWindowResize)}firstUpdated(e){this._readTableDataFromSlot(),this.#C(),this.#T(),this.#u(),this._syncChipClass(),this.#e(),this.#r(),this._syncFullscreenState(),this.#c()}updated(e){super.updated(e),(e.has(`selectedChip`)||e.has(`variant`))&&(this._syncChipClass(),this._closeActionsMenu()),e.has(`selectedChip`)&&this._dispatchSelectedChipChanged(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#C(),e.has(`containerMaxWidth`)&&this.#T(),e.has(`variant`)&&this.#e(),(e.has(`contentMaxWidth`)||e.has(`contentHeight`)||e.has(`toggleHeightMode`)||e.has(`variant`))&&this.#u(),(e.has(`selectedChip`)||e.has(`variant`)||e.has(`contentMaxWidth`)||e.has(`contentHeight`)||e.has(`toggleHeightMode`)||e.has(`_isFullscreen`))&&this.#r(),(e.has(`selectedChip`)||e.has(`variant`))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{this.#g()}),(e.has(`valueFormat`)||e.has(`timeFormat`)||e.has(`yAxisSettings`)||e.has(`selectedChip`)||e.has(`variant`))&&this.#f(),(e.has(`title`)||e.has(`subtitle`)||e.has(`description`)||e.has(`comment`)||e.has(`source`)||e.has(`footnote`)||e.has(`officialStatistics`)||e.has(`selectedChip`)||e.has(`variant`)||e.has(`_isFullscreen`))&&this.#c()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.removeEventListener(`keydown`,this._onDocumentKeyDown),document.removeEventListener(`fullscreenchange`,this._onDocumentFullscreenChange),document.removeEventListener(`webkitfullscreenchange`,this._onDocumentFullscreenChange),window.removeEventListener(`resize`,this._onWindowResize),window.visualViewport?.removeEventListener(`resize`,this._onWindowResize),this.#t(),this.#n(),this.#d(),this.#s()}_refreshTableDataFromSlot(e){this._readTableDataFromSlot(e||void 0),this.requestUpdate()}_onTableSlotChange(e){let t=e.target;t&&(this._refreshTableDataFromSlot(t),requestAnimationFrame(()=>{this._refreshTableDataFromSlot(t)}))}_onDiagramSlotChange(){this.#u(),this.#r(),this.#f(),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{this.#g()}),this.requestUpdate()}#e(){if(this.#t(),typeof ResizeObserver>`u`)return;let e=this.shadowRoot?.querySelector(`.diagram-content`);e&&(this._diagramResizeObserver=new ResizeObserver(()=>{this.#r()}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(e))}#t(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0}#n(){this._diagramReflowFrame&&=(cancelAnimationFrame(this._diagramReflowFrame),0)}#r(){this.variant!==`Standard`||this.selectedChip!==`Diagram`||(this.#n(),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,this.#o()})}))}#i(e){let t=e?.getAttribute(`data-highcharts-chart`);if(!t)return;let n=Number.parseInt(t,10);return Number.isNaN(n)?void 0:n}#a(e){for(let t of e){let e=this.#i(t);if(e!==void 0)return e;let n=t.querySelector(`[data-highcharts-chart]`),r=this.#i(n);if(r!==void 0)return r}}#o(){if(this.variant!==`Standard`||this.selectedChip!==`Diagram`)return;let e=this.shadowRoot?.querySelector(`slot[name="diagram"]`);if(!e)return;let t=e.assignedElements({flatten:!0});if(t.length===0)return;let n=this.#a(t);if(n===void 0)return;let r=window.Highcharts?.charts?.[n];r&&(r.setSize?.(null,null,!1),r.reflow?.(),this._seriesDifferentiationEnabled&&this.#g())}_normalizeRenderableCell(e){return Tf(e)}_readTableDataFromSlot(e){let t=e||this.shadowRoot?.querySelector(`slot[name="table"]`);this._slottedTableData=Ef(t)}_inferTableAlignments(e){return Df(e,e=>this._parseTableNumericValue(e))}_parseTableNumericValue(e){if(e==null)return null;if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=String(e).replace(/[ \s]+/g,``).trim();if(!t)return null;t.endsWith(`%`)&&(t=t.slice(0,-1));let n=t.lastIndexOf(`,`),r=t.lastIndexOf(`.`);if(n>-1&&r>-1?t=n>r?t.replace(/\./g,``).replace(`,`,`.`):t.replace(/,/g,``):n>-1&&(t=t.replace(`,`,`.`)),!/^-?\d+(?:\.\d+)?$/.test(t))return null;let i=Number(t);return Number.isFinite(i)?i:null}_formatTableCell(e,t,n){let r=this._normalizeRenderableCell(e);if(r.html)return r;let i=r.text;if(!i)return r;if(t===0){let e=this._normalizeTimeFormat(this.timeFormat),t=this._formatCategoryTimeLabel(i,e);return t===null?r:{html:``,text:t}}if(n[t]!==`right`)return r;if(this._shouldPreserveSourceValueFormatting(this.valueFormat)){let e=this._localizeAutomaticNumericText(i);return e===null?r:{html:``,text:e}}let a=this._parseTableNumericValue(i);if(a===null)return r;let o=this._normalizeValueFormat(this.valueFormat),s=this._formatValueForDisplay(a,o,!0);return s===null?r:{html:``,text:s}}#s(){this._fullscreenDiagramSizingFrame&&=(cancelAnimationFrame(this._fullscreenDiagramSizingFrame),0)}#c(){this.#s(),this._fullscreenDiagramSizingFrame=requestAnimationFrame(()=>{this._fullscreenDiagramSizingFrame=requestAnimationFrame(()=>{this._fullscreenDiagramSizingFrame=0,this.#l()})})}_getViewportHeight(){return Math.round(window.visualViewport?.height||window.innerHeight||document.documentElement.clientHeight||0)}_readCssLength(e){let t=Number.parseFloat(e||`0`);return Number.isFinite(t)?t:0}_getElementOuterHeight(e){let t=this.shadowRoot?.querySelector(e);if(!t)return 0;let n=getComputedStyle(t);return t.getBoundingClientRect().height+this._readCssLength(n.marginTop)+this._readCssLength(n.marginBottom)}_getFullscreenDiagramHeight(){if(!this._isFullscreen||this.variant!==`Standard`||this.selectedChip!==`Diagram`)return``;let e=this._getViewportHeight();if(!e)return``;let t=getComputedStyle(this),n=this._readCssLength(t.paddingTop)+this._readCssLength(t.paddingBottom)+this._getElementOuterHeight(`.header`)+this._getElementOuterHeight(`.actions-row`)+this._getElementOuterHeight(`.footer`)+16,r=Math.floor(e-n);return!Number.isFinite(r)||r<=0?``:`${Math.max(320,r)}px`}#l(){let e=this._getFullscreenDiagramHeight();this._fullscreenDiagramHeight!==e&&(this._fullscreenDiagramHeight=e,this.#u(),this.#r())}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||``}_getResolvedDiagramHeight(){return this._fullscreenDiagramHeight||this.contentHeight?.trim()||``}_getResolvedDiagramScrollerWidth(){return this._getResolvedContentMaxWidth()}_getResolvedToggleHeightMode(){return this.toggleHeightMode===`auto`?`auto`:`stable`}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||`600px`}#u(){let e=this.variant===`Standard`?this._getResolvedDiagramHeight():``,t=this.variant===`Standard`&&this._getResolvedToggleHeightMode()===`stable`?this._getResolvedStandardContentHeight():``;this.variant===`Standard`?this.style.setProperty(`--scb-viz-diagram-min-height`,e||`600px`):this.style.removeProperty(`--scb-viz-diagram-min-height`),e?(this.style.setProperty(`--scb-viz-diagram-height`,e),this.style.setProperty(`--scb-viz-diagram-overflow`,`hidden`)):(this.style.removeProperty(`--scb-viz-diagram-height`),this.style.removeProperty(`--scb-viz-diagram-overflow`)),t?this.style.setProperty(`--scb-viz-standard-content-height`,t):this.style.removeProperty(`--scb-viz-standard-content-height`)}_getResolvedTableData(){return this.tableData??this._slottedTableData}_getResolvedTableView(e){return Of(e,{inferAlignments:e=>this._inferTableAlignments(e),normalizeCell:e=>this._normalizeRenderableCell(e),formatCell:(e,t,n)=>this._formatTableCell(e,t,n)})}_getDiagramAssignedElements(){let e=this.shadowRoot?.querySelector(`slot[name="diagram"]`);return e?e.assignedElements({flatten:!0}):[]}_findExportableVisualElement(e){for(let t of e){if(t instanceof SVGSVGElement||t instanceof HTMLCanvasElement||t instanceof HTMLImageElement)return t;let e=t.querySelector(`svg, canvas, img`);if(e instanceof SVGSVGElement||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)return e}return null}_getExportableVisualElement(){if(this.variant===`Table`)return null;if(this.variant===`Image`){let e=this.shadowRoot?.querySelector(`.image-content img`);return e instanceof HTMLImageElement?e:null}return this._findExportableVisualElement(this._getDiagramAssignedElements())}#d(){this._chartConfigSyncFrame&&=(cancelAnimationFrame(this._chartConfigSyncFrame),0)}#f(){this.#d(),this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=0,this.#p()})})}_getDefaultValueFormat(){return{type:`number`,scale:`auto`,decimals:0,decimalSeparator:this.lang===`en`?`.`:`,`}}_normalizeValueFormat(e){let t=this._getDefaultValueFormat(),n=e&&typeof e==`object`?e:{};return{type:[`number`,`currency`,`percent`].includes(String(n.type))?String(n.type):t.type,scale:[`auto`,`raw`,`thousands`,`millions`,`billions`].includes(String(n.scale))?String(n.scale):t.scale,decimals:Number.isFinite(Number(n.decimals))?Math.max(0,Math.min(20,Number(n.decimals))):t.decimals,decimalSeparator:String(n.decimalSeparator)===`.`?`.`:String(n.decimalSeparator)===`,`?`,`:t.decimalSeparator}}_shouldPreserveSourceValueFormatting(e){let t=this._normalizeValueFormat(e);return t.type===`number`&&t.scale===`auto`}_normalizeTimeFormat(e){let t={mode:`raw`,display:`raw`},n=e&&typeof e==`object`?e:{},r=[`raw`,`year`,`monthCode`,`quarterCode`,`weekCode`,`tertialCode`],i=typeof n.mode==`string`?n.mode:t.mode,a=typeof n.display==`string`?n.display:t.display;r.includes(i)||(i=t.mode);let o={raw:[`raw`],year:[`raw`,`year`],monthCode:[`raw`,`iso-month`,`short-month`,`long-month`],quarterCode:[`raw`,`quarter-compact`,`quarter-short`,`quarter-long`],weekCode:[`raw`,`week-compact`,`week-long`],tertialCode:[`raw`,`tertial-compact`,`tertial-short`,`tertial-long`]};return o[i].includes(a)||(a=o[i][0]),i===`raw`&&(a=`raw`),{mode:i,display:a}}_normalizeYAxisSettings(e){let t=e&&typeof e==`object`?e:{},n=Number.isFinite(Number(t.referenceLineValue))?Number(t.referenceLineValue):null;return{startAtZero:!!t.startAtZero,referenceLineEnabled:!!t.referenceLineEnabled&&Number.isFinite(n),referenceLineValue:n,referenceLineLabel:typeof t.referenceLineLabel==`string`?t.referenceLineLabel:``}}_getShortMonthNames(){return[`jan`,`feb`,`mar`,`apr`,`maj`,`jun`,`jul`,`aug`,`sep`,`okt`,`nov`,`dec`]}_getLongMonthNames(){return[`januari`,`februari`,`mars`,`april`,`maj`,`juni`,`juli`,`augusti`,`september`,`oktober`,`november`,`december`]}_formatCategoryTimeLabel(e,t){if(!e||t.mode===`raw`||t.display===`raw`)return null;if(t.mode===`year`){let t=/^\s*(\d{4})\s*$/.exec(e);return t?t[1]:null}if(t.mode===`monthCode`){let n=/^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2])-1,i=n[1],a=String(r+1).padStart(2,`0`);return t.display===`iso-month`?`${i}-${a}`:t.display===`short-month`?`${this._getShortMonthNames()[r]} ${i}`:t.display===`long-month`?`${this._getLongMonthNames()[r]} ${i}`:e}if(t.mode===`quarterCode`){let n=/^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(e);if(!n)return null;let r=Number(n[3]),i=n[1];return t.display===`quarter-compact`?`${i} K${r}`:t.display===`quarter-short`?`kv ${r} ${i}`:t.display===`quarter-long`?`${[`första`,`andra`,`tredje`,`fjärde`][r-1]} kvartalet ${i}`:e}if(t.mode===`weekCode`){let n=/^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2]),i=n[1];return t.display===`week-compact`?`${i} v. ${r}`:t.display===`week-long`?`vecka ${r} ${i}`:e}if(t.mode===`tertialCode`){let n=/^\s*(\d{4})T(0?[1-3])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2]),i=n[1];return t.display===`tertial-compact`?`${i} T${r}`:t.display===`tertial-short`?`tertial ${r} ${i}`:t.display===`tertial-long`?`${[`första`,`andra`,`tredje`][r-1]} tertialet ${i}`:e}return null}_localizeAutomaticNumericText(e){let t=this._normalizeValueFormat(this.valueFormat),n=String(e??``).trim();if(!n||n===`..`||n===`...`)return null;let r=n.replace(/[ \s]/g,``);if(!/^-?\d+(?:[.,]\d+)?$/.test(r))return null;let i=t.decimalSeparator===`.`?`.`:`,`;return i===`.`&&r.indexOf(`,`)!==-1?r.replace(`,`,`.`):i===`,`&&r.indexOf(`.`)!==-1?r.replace(`.`,`,`):r}_inferAutomaticValueDecimals(e){if(!Number.isFinite(e))return 0;let t=String(e);/e/i.test(t)&&(t=e.toFixed(6).replace(/0+$/,``).replace(/\.$/,``));let n=t.replace(/^-/,``).split(`.`);return n.length>1?Math.min(n[1].length,6):0}_formatAutomaticValueForDisplay(e,t){if(!Number.isFinite(e))return null;let n=this._localizeAutomaticNumericText(t);if(n!==null)return n;let r=this._normalizeValueFormat(this.valueFormat),i=this._inferAutomaticValueDecimals(e);return this._formatLocalizedNumber(e,i,r.decimalSeparator)}_formatLocalizedNumber(e,t,n){let r=new Intl.NumberFormat(this.lang===`en`?`en-GB`:`sv-SE`,{minimumFractionDigits:t,maximumFractionDigits:t}),i=n===`.`||n===`,`?n:this.lang===`en`?`.`:`,`;return r.formatToParts(e).map(e=>e.type===`decimal`?i:e.value).join(``)}_formatValueForDisplay(e,t,n){if(!Number.isFinite(e))return null;let r={raw:1,thousands:1e3,millions:1e6,billions:1e9},i={raw:``,thousands:this.lang===`en`?`k`:`t`,millions:this.lang===`en`?`M`:`mn`,billions:this.lang===`en`?`B`:`md`},a=t.scale;if(a===`auto`){let t=Math.abs(e);a=t>=1e9?`billions`:t>=1e6?`millions`:t>=1e3?`thousands`:`raw`}let o=e/(r[a]||1),s=this._formatLocalizedNumber(o,t.decimals,t.decimalSeparator);t.type===`percent`?s=`${s} %`:t.type===`currency`&&(s=n?`${s} kr`:s);let c=i[a]||``;return c&&(s=`${s} ${c}`),s}_isCategoryAxis(e){return e?.categories?.length>0||e?.options?.type===`category`}_isTooltipNumericLikeText(e){if(typeof e!=`string`)return!1;let t=e.trim();return t?/^-?\d+(?:[.,]\d+)?$/.test(t):!1}_getTooltipPointRowIndex(e){let t=e?.point||e;return Number.isFinite(t?.x)?Number(t.x):Number.isFinite(e?.x)?Number(e.x):Number.isFinite(t?.index)?Number(t.index):Number.isFinite(e?.index)?Number(e.index):null}_getTooltipTableCategoryValue(e){let t=this._getResolvedTableData();if(!t?.rows?.length)return``;let n=this._getTooltipPointRowIndex(e);if(n===null||n<0||n>=t.rows.length)return``;let r=t.rows[n];return!Array.isArray(r)||r.length===0?``:this._normalizeRenderableCell(r[0]).text}_getTooltipSeriesDataCategoryValue(e){let t=e?.point||e,n=t?.series||e?.series,r=this._getTooltipPointRowIndex(e);if(!n||r===null)return``;let i=[n?.options?.data,n?.userOptions?.data];for(let e of i){if(!Array.isArray(e)||r<0||r>=e.length)continue;let t=e[r];if(!t||typeof t!=`object`)continue;let n=t.category!==void 0&&t.category!==null?String(t.category):typeof t.name==`string`?t.name:``;if(n&&!this._isTooltipNumericLikeText(n))return n}let a=t?.options?.category!==void 0&&t.options.category!==null?String(t.options.category):``;if(a&&!this._isTooltipNumericLikeText(a))return a;let o=typeof t?.name==`string`?t.name.trim():``;return o&&!this._isTooltipNumericLikeText(o)?o:``}_getTooltipXAxisLabel(e,t){let n=e?.point||e,r=n?.series?.xAxis||e?.series?.xAxis,i=this._getTooltipPointRowIndex(e),a=[];if(r&&Array.isArray(r.categories)&&i!==null){let e=r.categories[i];e!=null&&a.push(String(e))}typeof n?.category==`string`&&n.category.trim()&&a.push(n.category),typeof e?.key==`string`&&e.key.trim()&&a.push(e.key),typeof e?.x==`string`&&e.x.trim()&&a.push(e.x);let o=this._getTooltipSeriesDataCategoryValue(e);o&&a.push(o);let s=this._getTooltipTableCategoryValue(e);s&&a.push(s);for(let e of a){let n=String(e).trim();if(!(!n||this._isTooltipNumericLikeText(n)))return this._formatCategoryTimeLabel(n,t)??n}let c=a.find(e=>String(e).trim());if(!c)return``;let l=String(c).trim();return this._formatCategoryTimeLabel(l,t)??l}_getTooltipPointLabel(e){let t=e?.point||e,n=t?.series||e?.series,r=String(t?.series?.type||n?.type||t?.series?.options?.type||n?.options?.type||t?.series?.chart?.options?.chart?.type||``).trim().toLowerCase();return[`pie`,`variablepie`].includes(r)?t?.name||n?.name||``:n?.name||t?.name||``}_applyTimeFormatToLiveChart(e){let t=this._normalizeTimeFormat(this.timeFormat);if(t.mode===`raw`||t.display===`raw`)return;let n=this._formatCategoryTimeLabel.bind(this);[...e?.xAxis||[],...e?.yAxis||[]].forEach(e=>{if(!this._isCategoryAxis(e))return;let r=e.options?.labels&&typeof e.options.labels==`object`?{...e.options.labels}:{},i=typeof r.formatter==`function`?r.formatter:null;r.formatter=function(){let e=``;if(this?.axis&&Array.isArray(this.axis.categories)&&typeof this.pos==`number`){let t=this.axis.categories[this.pos];t!=null&&(e=String(t))}else this?.value!==void 0&&this.value!==null&&(e=String(this.value));let r=n(e,t);return r===null?i?i.call(this):e:r},delete r.format,e.update({labels:r},!1)})}_applyValueFormatToLiveChart(e){let t=this._normalizeValueFormat(this.valueFormat),n=this._normalizeTimeFormat(this.timeFormat),r=this._formatValueForDisplay.bind(this),i=this._formatAutomaticValueForDisplay.bind(this),a=this._getTooltipXAxisLabel.bind(this),o=this._getTooltipPointLabel.bind(this);if(this._shouldPreserveSourceValueFormatting(this.valueFormat)){let r=e?.options?.tooltip&&typeof e.options.tooltip==`object`?{...e.options.tooltip}:{},s=e?.options?.plotOptions&&typeof e.options.plotOptions==`object`?{...e.options.plotOptions}:{},c=s.series&&typeof s.series==`object`?{...s.series}:{},l=c.dataLabels&&typeof c.dataLabels==`object`?{...c.dataLabels}:{},u=e?.options?.lang&&typeof e.options.lang==`object`?{...e.options.lang}:{};delete l.format,delete l.formatter,u.decimalPoint=t.decimalSeparator===`.`?`.`:`,`,u.thousandsSep=` `,r.valueDecimals=void 0,r.formatter=function(){let e=Array.isArray(this.points)&&this.points.length?this.points:[this.point||this],t=a(this,n),r=[];return e.forEach(e=>{let t=e?.point||e,n=Number.isFinite(e?.y)?e.y:t?.y,a=o(e),s=i(n,t?.options&&t.options.y!==void 0&&t.options.y!==null?String(t.options.y):t&&t.y!==void 0&&t.y!==null?String(t.y):``);!Number.isFinite(n)||s==null||r.push(`${a?`${String(a)}: `:``}<b>${String(s)}</b><br/>`)}),`${t?`<span>${String(t)}</span><br/>`:``}${r.join(``)}`}.bind(this),e.update({lang:u,tooltip:r,plotOptions:{...s,series:{...c,dataLabels:l}}},!1,!1,!1),(e?.yAxis||[]).forEach(e=>{let t=e.options?.labels&&typeof e.options.labels==`object`?{...e.options.labels}:{};delete t.format,delete t.formatter,e.update({labels:t},!1)});return}e.update({tooltip:{...e.options?.tooltip||{},valueDecimals:t.decimals,formatter:function(){let e=Array.isArray(this.points)&&this.points.length?this.points:[this.point||this],i=a(this,n),s=[];return e.forEach(e=>{let n=e?.point||e,i=r(Number.isFinite(e?.y)?e.y:n?.y,t,!0);if(i===null)return;let a=o(e);s.push(`${a?`${String(a)}: `:``}<b>${i}</b><br/>`)}),`${i?`<span>${String(i)}</span><br/>`:``}${s.join(``)}`}},plotOptions:{...e.options?.plotOptions||{},series:{...e.options?.plotOptions?.series||{},dataLabels:{...e.options?.plotOptions?.series?.dataLabels||{},formatter:function(){return r(Number.isFinite(this?.y)?this.y:this?.point?.y,t,t.type===`percent`)??null}}}}},!1,!1,!1),(e?.yAxis||[]).forEach(e=>{let n=e.options?.labels&&typeof e.options.labels==`object`?{...e.options.labels}:{},i=typeof n.formatter==`function`?n.formatter:null,a=!(e.options?.title&&typeof e.options.title.text==`string`&&e.options.title.text.trim());n.formatter=function(){let e=r(this?.value,t,a);return e===null?i?i.call(this):this?.value:e},(t.type===`percent`||t.scale!==`auto`)&&delete n.format,e.update({labels:n},!1)})}_applyYAxisSettingsToLiveChart(e){let t=this._normalizeYAxisSettings(this.yAxisSettings),n=e?.yAxis||[];n.length&&n.forEach((e,n)=>{let r=e.options&&typeof e.options==`object`?e.options:{},i={},a=r.min!==void 0&&r.min!==null&&r.min!==``;n===0&&t.startAtZero&&!a&&(i.min=0);let o=Array.isArray(r.plotLines)?r.plotLines.filter(e=>e?.id!==`scb-viz-reference-line`):[];n===0&&t.referenceLineEnabled&&Number.isFinite(t.referenceLineValue)&&o.push({id:`scb-viz-reference-line`,className:`scb-axis-plotline scb-viz-reference-line`,value:t.referenceLineValue}),o.length?i.plotLines=o:Array.isArray(r.plotLines)&&(i.plotLines=[]),e.update(i,!1)})}#p(){let e=this._getCurrentHighchartsChart();if(!e)return;let t=!1;this.timeFormat!==void 0&&(this._applyTimeFormatToLiveChart(e),t=!0),this.valueFormat!==void 0&&(this._applyValueFormatToLiveChart(e),t=!0),this.yAxisSettings!==void 0&&(this._applyYAxisSettingsToLiveChart(e),t=!0),t&&e.redraw(!1)}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!==`diagram`)return;let e=this.#a(this._getDiagramAssignedElements());if(e!==void 0)return window.Highcharts?.charts?.[e]}_getSeriesDifferentiationGroup(e,t){let n=String(e?.type||e?.options?.type||t?.options?.chart?.type||``).trim().toLowerCase();return[`line`,`spline`,`scatter`].includes(n)?`line`:[`area`,`areaspline`].includes(n)?`area`:[`column`,`bar`].includes(n)?this._isGroupedSeriesDifferentiationChart(e,t)?`grouped-fill`:`fill`:[`pie`,`variablepie`].includes(n)?`point-fill`:null}_getSeriesDifferentiationVariantByIndex(e){return of(e)}_isGroupedSeriesDifferentiationChart(e,t){return sf(e,t)}_usesGroupedPointDifferentiation(e){return cf(e)}_getGroupedSeriesDifferentiationVariant(e,t,n){let r=pf(e,t,n);return{...r,variantIndex:typeof r.variantIndex==`number`?r.variantIndex:n}}_applyGroupedLegendSeriesDifferentiation(e){(Array.isArray(e?.legend?.allItems)?e.legend.allItems:[]).forEach((t,n)=>{let r=t&&t.series?t.series:t;if(!this._isGroupedSeriesDifferentiationChart(r,e))return;let{variantIndex:i,patternKind:a}=this._getGroupedSeriesDifferentiationVariant(t,e,n),o=this._getHighchartsColorClassName(t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,i);this._getLegendSeriesDifferentiationTargets(t).fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:a}),this._setSeriesDifferentiationColorClass(e,o)}),this._ensureStyledModeSeriesPattern(e,o,a)})}_clearGroupedLegendSeriesDifferentiation(e){(Array.isArray(e?.legend?.allItems)?e.legend.allItems:[]).forEach(t=>{let n=t&&t.series?t.series:t;if(!this._isGroupedSeriesDifferentiationChart(n,e))return;let r=this._getLegendSeriesDifferentiationTargets(t);r.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),r.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)})})}_shouldShowSeriesDifferentiationAction(){return mf({chart:this._getCurrentHighchartsChart(),getCurrentPrintableView:()=>this._getCurrentPrintableView(),getSeriesDifferentiationGroup:(e,t)=>this._getSeriesDifferentiationGroup(e,t),isHighchartsStyledMode:e=>this._isHighchartsStyledMode(e)})}_getSeriesDifferentiationSnapshotStore(e){let t=this._seriesDifferentiationSnapshots.get(e);return t||(t=new Map,this._seriesDifferentiationSnapshots.set(e,t)),t}_cloneSeriesOptionValue(e){return Array.isArray(e)?e.map(e=>this._cloneSeriesOptionValue(e)):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,this._cloneSeriesOptionValue(t)])):e}_captureSeriesDifferentiationSnapshot(e){let t=this._cloneSeriesOptionValue(e?.options?.marker),n=this._cloneSeriesOptionValue(e?.resetA11yMarkerOptions),r=this._cloneSeriesOptionValue(e?.userOptions?.marker),i=t?.states,a=e?.a11yMarkersForced===!0&&n&&Object.keys(n).length>0||i?.normal?.opacity===0&&n&&Object.keys(n).length>0?n:r;return{marker:a&&Object.keys(a).length>0?a:t&&Object.keys(t).length>0?t:{enabled:!1}}}_isHighchartsStyledMode(e){return gf(e)}_getHighchartsSvgRoot(e){return _f(e)}_getHighchartsColorClassName(e,t){return vf(e,t)}_setSeriesDifferentiationMetadata(e,t){yf(e,t)}_clearSeriesDifferentiationMetadata(e){bf(e)}_setSeriesDifferentiationColorClass(e,t){xf(e,t)}_clearSeriesDifferentiationColorClass(e){Sf(e)}_getLegendSeriesDifferentiationTargets(e){return Cf(e)}_ensureStyledModeSeriesPattern(e,t,n){wf(e,t,n)}_applyStyledModeSeriesDifferentiation(e){let t=this._getHighchartsSvgRoot(e);if(!t)return;t.classList.add(`scb-viz-series-differentiation-enabled`);let n=tf(),r=this._getSeriesDifferentiationSnapshotStore(e);e.series?.forEach((t,i)=>{let a=this._getSeriesDifferentiationGroup(t,e);if(!a)return;let o=String(t?.index??i);r.has(o)||r.set(o,this._captureSeriesDifferentiationSnapshot(t));let s=a===`grouped-fill`&&this._usesGroupedPointDifferentiation(t),c=a===`grouped-fill`?this._getGroupedSeriesDifferentiationVariant(t,e,i):{variantIndex:i,...this._getSeriesDifferentiationVariantByIndex(i)},{dashStyle:l,markerSymbol:u,patternKind:d}=c,f=this._getHighchartsColorClassName(t?.graph??t?.area??t?.group,c.variantIndex),p=this._getLegendSeriesDifferentiationTargets(t);this._setSeriesDifferentiationMetadata(t?.graph,{role:`graph`,dashStyle:l}),a===`area`&&(this._setSeriesDifferentiationMetadata(t?.area,{role:`area`,patternKind:d}),this._setSeriesDifferentiationColorClass(t?.area,f),this._ensureStyledModeSeriesPattern(e,f,d)),a===`fill`&&(t.points?.forEach(e=>{this._setSeriesDifferentiationMetadata(e?.graphic,{role:`fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e?.graphic,f)}),this._ensureStyledModeSeriesPattern(e,f,d)),a===`grouped-fill`&&(s?t.points?.forEach((t,n)=>{let r=this._getGroupedSeriesDifferentiationVariant(t,e,n),i=this._getHighchartsColorClassName(t?.graphic??t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,r.variantIndex);this._setSeriesDifferentiationMetadata(t?.graphic,{role:`fill`,patternKind:r.patternKind}),this._setSeriesDifferentiationColorClass(t?.graphic,i),this._ensureStyledModeSeriesPattern(e,i,r.patternKind)}):(t.points?.forEach(e=>{this._setSeriesDifferentiationMetadata(e?.graphic,{role:`fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e?.graphic,f)}),this._ensureStyledModeSeriesPattern(e,f,d))),a===`point-fill`&&t.points?.forEach((t,r)=>{let i=n[r%n.length],a=this._getHighchartsColorClassName(t?.graphic??t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,r),o=this._getLegendSeriesDifferentiationTargets(t);this._setSeriesDifferentiationMetadata(t?.graphic,{role:`fill`,patternKind:i}),this._setSeriesDifferentiationColorClass(t?.graphic,a),this._ensureStyledModeSeriesPattern(e,a,i),o.fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:i}),this._setSeriesDifferentiationColorClass(e,a)})}),(a===`line`||a===`area`)&&p.graphTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-symbol`,dashStyle:l})}),(a===`area`||a===`fill`||a===`grouped-fill`&&!s)&&p.fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e,f)}),(a===`line`||a===`area`)&&t.update({marker:{enabled:!0,symbol:u}},!1)}),this._applyGroupedLegendSeriesDifferentiation(e),e.redraw(!1)}_restoreStyledModeSeriesDifferentiation(e){this._getHighchartsSvgRoot(e)?.classList.remove(`scb-viz-series-differentiation-enabled`);let t=this._getSeriesDifferentiationSnapshotStore(e);e.series?.forEach((n,r)=>{let i=this._getSeriesDifferentiationGroup(n,e);if(!i)return;let a=this._getLegendSeriesDifferentiationTargets(n);if(this._clearSeriesDifferentiationMetadata(n?.graph),this._clearSeriesDifferentiationMetadata(n?.area),this._clearSeriesDifferentiationColorClass(n?.area),n.points?.forEach(e=>{let t=this._getLegendSeriesDifferentiationTargets(e);this._clearSeriesDifferentiationMetadata(e?.graphic),this._clearSeriesDifferentiationColorClass(e?.graphic),t.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),t.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)})}),a.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),a.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)}),i===`line`||i===`area`){let e=t.get(String(n?.index??r));n.update({marker:this._cloneSeriesOptionValue(e?.marker)},!1)}}),this._clearGroupedLegendSeriesDifferentiation(e),e.redraw(!1),this._seriesDifferentiationSnapshots.delete(e)}#m(e){this._isHighchartsStyledMode(e)&&this._applyStyledModeSeriesDifferentiation(e)}#h(e){this._isHighchartsStyledMode(e)&&this._restoreStyledModeSeriesDifferentiation(e)}#g(){let e=this._getCurrentHighchartsChart();if(e){if(this._seriesDifferentiationEnabled){this.#m(e);return}this.#h(e)}}_canExportRaster(){return this._getExportableVisualElement()!==null}_canExportCsv(){return!!this._getResolvedTableData()?.rows?.length}_buildExportFileName(e){return jd({lang:this.lang,title:this.title},e)}_getFullscreenTarget(){return this}_getCurrentFullscreenElement(){return Nd()}_isFullscreenSupported(){return Pd(this._getFullscreenTarget())}_syncFullscreenState(){let e=this._getCurrentFullscreenElement()===this._getFullscreenTarget();this._isFullscreen=e,this.toggleAttribute(`data-scb-viz-fullscreen`,e),this.#c(),this.#r()}async _toggleFullscreen(){await Fd(this._getFullscreenTarget())}_renderActionsMenu(){let e=this._getCurrentPrintableView(),t=this._canExportRaster(),n=this._canExportCsv(),r=t&&(e===`diagram`||e===`image`),i=n&&e===`table`,a=this._shouldShowSeriesDifferentiationAction();return b`
|
|
13878
|
+
`}connectedCallback(){super.connectedCallback(),document.addEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.addEventListener(`keydown`,this._onDocumentKeyDown),document.addEventListener(`fullscreenchange`,this._onDocumentFullscreenChange),document.addEventListener(`webkitfullscreenchange`,this._onDocumentFullscreenChange),window.addEventListener(`resize`,this._onWindowResize),window.visualViewport?.addEventListener(`resize`,this._onWindowResize)}firstUpdated(e){this._readTableDataFromSlot(),this.#C(),this.#T(),this.#u(),this._syncChipClass(),this.#e(),this.#r(),this._syncFullscreenState(),this.#c()}updated(e){super.updated(e),(e.has(`selectedChip`)||e.has(`variant`))&&(this._syncChipClass(),this._closeActionsMenu()),e.has(`selectedChip`)&&this._dispatchSelectedChipChanged(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#C(),e.has(`containerMaxWidth`)&&this.#T(),e.has(`variant`)&&this.#e(),(e.has(`contentMaxWidth`)||e.has(`contentHeight`)||e.has(`toggleHeightMode`)||e.has(`variant`))&&this.#u(),(e.has(`selectedChip`)||e.has(`variant`)||e.has(`contentMaxWidth`)||e.has(`contentHeight`)||e.has(`toggleHeightMode`)||e.has(`_isFullscreen`))&&this.#r(),(e.has(`selectedChip`)||e.has(`variant`))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{this.#g()}),(e.has(`valueFormat`)||e.has(`timeFormat`)||e.has(`yAxisSettings`)||e.has(`selectedChip`)||e.has(`variant`))&&this.#f(),(e.has(`title`)||e.has(`subtitle`)||e.has(`description`)||e.has(`comment`)||e.has(`source`)||e.has(`footnote`)||e.has(`officialStatistics`)||e.has(`selectedChip`)||e.has(`variant`)||e.has(`_isFullscreen`))&&this.#c()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.removeEventListener(`keydown`,this._onDocumentKeyDown),document.removeEventListener(`fullscreenchange`,this._onDocumentFullscreenChange),document.removeEventListener(`webkitfullscreenchange`,this._onDocumentFullscreenChange),window.removeEventListener(`resize`,this._onWindowResize),window.visualViewport?.removeEventListener(`resize`,this._onWindowResize),this.#t(),this.#n(),this.#d(),this.#s()}_refreshTableDataFromSlot(e){this._readTableDataFromSlot(e||void 0),this.requestUpdate()}_onTableSlotChange(e){let t=e.target;t&&(this._refreshTableDataFromSlot(t),requestAnimationFrame(()=>{this._refreshTableDataFromSlot(t)}))}_onDiagramSlotChange(){this.#u(),this.#r(),this.#f(),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{this.#g()}),this.requestUpdate()}#e(){if(this.#t(),typeof ResizeObserver>`u`)return;let e=this.shadowRoot?.querySelector(`.diagram-content`);e&&(this._diagramResizeObserver=new ResizeObserver(()=>{this.#r()}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(e))}#t(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0}#n(){this._diagramReflowFrame&&=(cancelAnimationFrame(this._diagramReflowFrame),0)}#r(){this.variant!==`Standard`||this.selectedChip!==`Diagram`||(this.#n(),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,this.#o()})}))}#i(e){let t=e?.getAttribute(`data-highcharts-chart`);if(!t)return;let n=Number.parseInt(t,10);return Number.isNaN(n)?void 0:n}#a(e){for(let t of e){let e=this.#i(t);if(e!==void 0)return e;let n=t.querySelector(`[data-highcharts-chart]`),r=this.#i(n);if(r!==void 0)return r}}#o(){if(this.variant!==`Standard`||this.selectedChip!==`Diagram`)return;let e=this.shadowRoot?.querySelector(`slot[name="diagram"]`);if(!e)return;let t=e.assignedElements({flatten:!0});if(t.length===0)return;let n=this.#a(t);if(n===void 0)return;let r=window.Highcharts?.charts?.[n];r&&(r.setSize?.(null,null,!1),r.reflow?.(),this._seriesDifferentiationEnabled&&this.#g())}_normalizeRenderableCell(e){return Ff(e)}_readTableDataFromSlot(e){let t=e||this.shadowRoot?.querySelector(`slot[name="table"]`);this._slottedTableData=If(t)}_inferTableAlignments(e){return Lf(e,e=>this._parseTableNumericValue(e))}_parseTableNumericValue(e){if(e==null)return null;if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=String(e).replace(/[ \s]+/g,``).trim();if(!t)return null;t.endsWith(`%`)&&(t=t.slice(0,-1));let n=t.lastIndexOf(`,`),r=t.lastIndexOf(`.`);if(n>-1&&r>-1?t=n>r?t.replace(/\./g,``).replace(`,`,`.`):t.replace(/,/g,``):n>-1&&(t=t.replace(`,`,`.`)),!/^-?\d+(?:\.\d+)?$/.test(t))return null;let i=Number(t);return Number.isFinite(i)?i:null}_formatTableCell(e,t,n){let r=this._normalizeRenderableCell(e);if(r.html)return r;let i=r.text;if(!i)return r;if(t===0){let e=this._normalizeTimeFormat(this.timeFormat),t=this._formatCategoryTimeLabel(i,e);return t===null?r:{html:``,text:t}}if(n[t]!==`right`)return r;if(this._shouldPreserveSourceValueFormatting(this.valueFormat)){let e=this._localizeAutomaticNumericText(i);return e===null?r:{html:``,text:e}}let a=this._parseTableNumericValue(i);if(a===null)return r;let o=this._normalizeValueFormat(this.valueFormat),s=this._formatValueForDisplay(a,o,!0);return s===null?r:{html:``,text:s}}#s(){this._fullscreenDiagramSizingFrame&&=(cancelAnimationFrame(this._fullscreenDiagramSizingFrame),0)}#c(){this.#s(),this._fullscreenDiagramSizingFrame=requestAnimationFrame(()=>{this._fullscreenDiagramSizingFrame=requestAnimationFrame(()=>{this._fullscreenDiagramSizingFrame=0,this.#l()})})}_getViewportHeight(){return Math.round(window.visualViewport?.height||window.innerHeight||document.documentElement.clientHeight||0)}_readCssLength(e){let t=Number.parseFloat(e||`0`);return Number.isFinite(t)?t:0}_getElementOuterHeight(e){let t=this.shadowRoot?.querySelector(e);if(!t)return 0;let n=getComputedStyle(t);return t.getBoundingClientRect().height+this._readCssLength(n.marginTop)+this._readCssLength(n.marginBottom)}_getFullscreenDiagramHeight(){if(!this._isFullscreen||this.variant!==`Standard`||this.selectedChip!==`Diagram`)return``;let e=this._getViewportHeight();if(!e)return``;let t=getComputedStyle(this),n=this._readCssLength(t.paddingTop)+this._readCssLength(t.paddingBottom)+this._getElementOuterHeight(`.header`)+this._getElementOuterHeight(`.actions-row`)+this._getElementOuterHeight(`.footer`)+16,r=Math.floor(e-n);return!Number.isFinite(r)||r<=0?``:`${Math.max(320,r)}px`}#l(){let e=this._getFullscreenDiagramHeight();this._fullscreenDiagramHeight!==e&&(this._fullscreenDiagramHeight=e,this.#u(),this.#r())}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||``}_getResolvedDiagramHeight(){return this._fullscreenDiagramHeight||this.contentHeight?.trim()||``}_getResolvedDiagramScrollerWidth(){return this._getResolvedContentMaxWidth()}_getResolvedToggleHeightMode(){return this.toggleHeightMode===`auto`?`auto`:`stable`}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||`600px`}#u(){let e=this.variant===`Standard`?this._getResolvedDiagramHeight():``,t=this.variant===`Standard`&&this._getResolvedToggleHeightMode()===`stable`?this._getResolvedStandardContentHeight():``;this.variant===`Standard`?this.style.setProperty(`--scb-viz-diagram-min-height`,e||`600px`):this.style.removeProperty(`--scb-viz-diagram-min-height`),e?(this.style.setProperty(`--scb-viz-diagram-height`,e),this.style.setProperty(`--scb-viz-diagram-overflow`,`hidden`)):(this.style.removeProperty(`--scb-viz-diagram-height`),this.style.removeProperty(`--scb-viz-diagram-overflow`)),t?this.style.setProperty(`--scb-viz-standard-content-height`,t):this.style.removeProperty(`--scb-viz-standard-content-height`)}_getResolvedTableData(){return this.tableData??this._slottedTableData}_getResolvedTableView(e){return Rf(e,{inferAlignments:e=>this._inferTableAlignments(e),normalizeCell:e=>this._normalizeRenderableCell(e),formatCell:(e,t,n)=>this._formatTableCell(e,t,n)})}_getDiagramAssignedElements(){let e=this.shadowRoot?.querySelector(`slot[name="diagram"]`);return e?e.assignedElements({flatten:!0}):[]}_findExportableVisualElement(e){for(let t of e){if(t instanceof SVGSVGElement||t instanceof HTMLCanvasElement||t instanceof HTMLImageElement)return t;let e=t.querySelector(`svg, canvas, img`);if(e instanceof SVGSVGElement||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)return e}return null}_getExportableVisualElement(){if(this.variant===`Table`)return null;if(this.variant===`Image`){let e=this.shadowRoot?.querySelector(`.image-content img`);return e instanceof HTMLImageElement?e:null}return this._findExportableVisualElement(this._getDiagramAssignedElements())}#d(){this._chartConfigSyncFrame&&=(cancelAnimationFrame(this._chartConfigSyncFrame),0)}#f(){this.#d(),this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=0,this.#p()})})}_getDefaultValueFormat(){return{type:`number`,scale:`auto`,decimals:0,decimalSeparator:this.lang===`en`?`.`:`,`}}_normalizeValueFormat(e){let t=this._getDefaultValueFormat(),n=e&&typeof e==`object`?e:{};return{type:[`number`,`currency`,`percent`].includes(String(n.type))?String(n.type):t.type,scale:[`auto`,`raw`,`thousands`,`millions`,`billions`].includes(String(n.scale))?String(n.scale):t.scale,decimals:Number.isFinite(Number(n.decimals))?Math.max(0,Math.min(20,Number(n.decimals))):t.decimals,decimalSeparator:String(n.decimalSeparator)===`.`?`.`:String(n.decimalSeparator)===`,`?`,`:t.decimalSeparator}}_shouldPreserveSourceValueFormatting(e){let t=this._normalizeValueFormat(e);return t.type===`number`&&t.scale===`auto`}_normalizeTimeFormat(e){let t={mode:`raw`,display:`raw`},n=e&&typeof e==`object`?e:{},r=[`raw`,`year`,`monthCode`,`quarterCode`,`weekCode`,`tertialCode`],i=typeof n.mode==`string`?n.mode:t.mode,a=typeof n.display==`string`?n.display:t.display;r.includes(i)||(i=t.mode);let o={raw:[`raw`],year:[`raw`,`year`],monthCode:[`raw`,`iso-month`,`short-month`,`long-month`],quarterCode:[`raw`,`quarter-compact`,`quarter-short`,`quarter-long`],weekCode:[`raw`,`week-compact`,`week-long`],tertialCode:[`raw`,`tertial-compact`,`tertial-short`,`tertial-long`]};return o[i].includes(a)||(a=o[i][0]),i===`raw`&&(a=`raw`),{mode:i,display:a}}_normalizeYAxisSettings(e){let t=e&&typeof e==`object`?e:{},n=Number.isFinite(Number(t.referenceLineValue))?Number(t.referenceLineValue):null;return{startAtZero:!!t.startAtZero,referenceLineEnabled:!!t.referenceLineEnabled&&Number.isFinite(n),referenceLineValue:n,referenceLineLabel:typeof t.referenceLineLabel==`string`?t.referenceLineLabel:``}}_getShortMonthNames(){return[`jan`,`feb`,`mar`,`apr`,`maj`,`jun`,`jul`,`aug`,`sep`,`okt`,`nov`,`dec`]}_getLongMonthNames(){return[`januari`,`februari`,`mars`,`april`,`maj`,`juni`,`juli`,`augusti`,`september`,`oktober`,`november`,`december`]}_formatCategoryTimeLabel(e,t){if(!e||t.mode===`raw`||t.display===`raw`)return null;if(t.mode===`year`){let t=/^\s*(\d{4})\s*$/.exec(e);return t?t[1]:null}if(t.mode===`monthCode`){let n=/^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2])-1,i=n[1],a=String(r+1).padStart(2,`0`);return t.display===`iso-month`?`${i}-${a}`:t.display===`short-month`?`${this._getShortMonthNames()[r]} ${i}`:t.display===`long-month`?`${this._getLongMonthNames()[r]} ${i}`:e}if(t.mode===`quarterCode`){let n=/^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(e);if(!n)return null;let r=Number(n[3]),i=n[1];return t.display===`quarter-compact`?`${i} K${r}`:t.display===`quarter-short`?`kv ${r} ${i}`:t.display===`quarter-long`?`${[`första`,`andra`,`tredje`,`fjärde`][r-1]} kvartalet ${i}`:e}if(t.mode===`weekCode`){let n=/^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2]),i=n[1];return t.display===`week-compact`?`${i} v. ${r}`:t.display===`week-long`?`vecka ${r} ${i}`:e}if(t.mode===`tertialCode`){let n=/^\s*(\d{4})T(0?[1-3])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2]),i=n[1];return t.display===`tertial-compact`?`${i} T${r}`:t.display===`tertial-short`?`tertial ${r} ${i}`:t.display===`tertial-long`?`${[`första`,`andra`,`tredje`][r-1]} tertialet ${i}`:e}return null}_localizeAutomaticNumericText(e){let t=this._normalizeValueFormat(this.valueFormat),n=String(e??``).trim();if(!n||n===`..`||n===`...`)return null;let r=n.replace(/[ \s]/g,``);if(!/^-?\d+(?:[.,]\d+)?$/.test(r))return null;let i=t.decimalSeparator===`.`?`.`:`,`;return i===`.`&&r.indexOf(`,`)!==-1?r.replace(`,`,`.`):i===`,`&&r.indexOf(`.`)!==-1?r.replace(`.`,`,`):r}_inferAutomaticValueDecimals(e){if(!Number.isFinite(e))return 0;let t=String(e);/e/i.test(t)&&(t=e.toFixed(6).replace(/0+$/,``).replace(/\.$/,``));let n=t.replace(/^-/,``).split(`.`);return n.length>1?Math.min(n[1].length,6):0}_formatAutomaticValueForDisplay(e,t){if(!Number.isFinite(e))return null;let n=this._localizeAutomaticNumericText(t);if(n!==null)return n;let r=this._normalizeValueFormat(this.valueFormat),i=this._inferAutomaticValueDecimals(e);return this._formatLocalizedNumber(e,i,r.decimalSeparator)}_formatLocalizedNumber(e,t,n){let r=new Intl.NumberFormat(this.lang===`en`?`en-GB`:`sv-SE`,{minimumFractionDigits:t,maximumFractionDigits:t}),i=n===`.`||n===`,`?n:this.lang===`en`?`.`:`,`;return r.formatToParts(e).map(e=>e.type===`decimal`?i:e.value).join(``)}_formatValueForDisplay(e,t,n){if(!Number.isFinite(e))return null;let r={raw:1,thousands:1e3,millions:1e6,billions:1e9},i={raw:``,thousands:this.lang===`en`?`k`:`t`,millions:this.lang===`en`?`M`:`mn`,billions:this.lang===`en`?`B`:`md`},a=t.scale;if(a===`auto`){let t=Math.abs(e);a=t>=1e9?`billions`:t>=1e6?`millions`:t>=1e3?`thousands`:`raw`}let o=e/(r[a]||1),s=this._formatLocalizedNumber(o,t.decimals,t.decimalSeparator);t.type===`percent`?s=`${s} %`:t.type===`currency`&&(s=n?`${s} kr`:s);let c=i[a]||``;return c&&(s=`${s} ${c}`),s}_isCategoryAxis(e){return e?.categories?.length>0||e?.options?.type===`category`}_isTooltipNumericLikeText(e){if(typeof e!=`string`)return!1;let t=e.trim();return t?/^-?\d+(?:[.,]\d+)?$/.test(t):!1}_getTooltipPointRowIndex(e){let t=e?.point||e;return Number.isFinite(t?.x)?Number(t.x):Number.isFinite(e?.x)?Number(e.x):Number.isFinite(t?.index)?Number(t.index):Number.isFinite(e?.index)?Number(e.index):null}_getTooltipTableCategoryValue(e){let t=this._getResolvedTableData();if(!t?.rows?.length)return``;let n=this._getTooltipPointRowIndex(e);if(n===null||n<0||n>=t.rows.length)return``;let r=t.rows[n];return!Array.isArray(r)||r.length===0?``:this._normalizeRenderableCell(r[0]).text}_getTooltipSeriesDataCategoryValue(e){let t=e?.point||e,n=t?.series||e?.series,r=this._getTooltipPointRowIndex(e);if(!n||r===null)return``;let i=[n?.options?.data,n?.userOptions?.data];for(let e of i){if(!Array.isArray(e)||r<0||r>=e.length)continue;let t=e[r];if(!t||typeof t!=`object`)continue;let n=t.category!==void 0&&t.category!==null?String(t.category):typeof t.name==`string`?t.name:``;if(n&&!this._isTooltipNumericLikeText(n))return n}let a=t?.options?.category!==void 0&&t.options.category!==null?String(t.options.category):``;if(a&&!this._isTooltipNumericLikeText(a))return a;let o=typeof t?.name==`string`?t.name.trim():``;return o&&!this._isTooltipNumericLikeText(o)?o:``}_getTooltipXAxisLabel(e,t){let n=e?.point||e,r=n?.series?.xAxis||e?.series?.xAxis,i=this._getTooltipPointRowIndex(e),a=[];if(r&&Array.isArray(r.categories)&&i!==null){let e=r.categories[i];e!=null&&a.push(String(e))}typeof n?.category==`string`&&n.category.trim()&&a.push(n.category),typeof e?.key==`string`&&e.key.trim()&&a.push(e.key),typeof e?.x==`string`&&e.x.trim()&&a.push(e.x);let o=this._getTooltipSeriesDataCategoryValue(e);o&&a.push(o);let s=this._getTooltipTableCategoryValue(e);s&&a.push(s);for(let e of a){let n=String(e).trim();if(!(!n||this._isTooltipNumericLikeText(n)))return this._formatCategoryTimeLabel(n,t)??n}let c=a.find(e=>String(e).trim());if(!c)return``;let l=String(c).trim();return this._formatCategoryTimeLabel(l,t)??l}_getTooltipPointLabel(e){let t=e?.point||e,n=t?.series||e?.series,r=String(t?.series?.type||n?.type||t?.series?.options?.type||n?.options?.type||t?.series?.chart?.options?.chart?.type||``).trim().toLowerCase();return[`pie`,`variablepie`].includes(r)?t?.name||n?.name||``:n?.name||t?.name||``}_applyTimeFormatToLiveChart(e){let t=this._normalizeTimeFormat(this.timeFormat);if(t.mode===`raw`||t.display===`raw`)return;let n=this._formatCategoryTimeLabel.bind(this);[...e?.xAxis||[],...e?.yAxis||[]].forEach(e=>{if(!this._isCategoryAxis(e))return;let r=e.options?.labels&&typeof e.options.labels==`object`?{...e.options.labels}:{},i=typeof r.formatter==`function`?r.formatter:null;r.formatter=function(){let e=``;if(this?.axis&&Array.isArray(this.axis.categories)&&typeof this.pos==`number`){let t=this.axis.categories[this.pos];t!=null&&(e=String(t))}else this?.value!==void 0&&this.value!==null&&(e=String(this.value));let r=n(e,t);return r===null?i?i.call(this):e:r},delete r.format,e.update({labels:r},!1)})}_applyValueFormatToLiveChart(e){let t=this._normalizeValueFormat(this.valueFormat),n=this._normalizeTimeFormat(this.timeFormat),r=this._formatValueForDisplay.bind(this),i=this._formatAutomaticValueForDisplay.bind(this),a=this._getTooltipXAxisLabel.bind(this),o=this._getTooltipPointLabel.bind(this);if(this._shouldPreserveSourceValueFormatting(this.valueFormat)){let r=e?.options?.tooltip&&typeof e.options.tooltip==`object`?{...e.options.tooltip}:{},s=e?.options?.plotOptions&&typeof e.options.plotOptions==`object`?{...e.options.plotOptions}:{},c=s.series&&typeof s.series==`object`?{...s.series}:{},l=c.dataLabels&&typeof c.dataLabels==`object`?{...c.dataLabels}:{},u=e?.options?.lang&&typeof e.options.lang==`object`?{...e.options.lang}:{};delete l.format,delete l.formatter,u.decimalPoint=t.decimalSeparator===`.`?`.`:`,`,u.thousandsSep=` `,r.valueDecimals=void 0,r.formatter=function(){let e=Array.isArray(this.points)&&this.points.length?this.points:[this.point||this],t=a(this,n),r=[];return e.forEach(e=>{let t=e?.point||e,n=Number.isFinite(e?.y)?e.y:t?.y,a=o(e),s=i(n,t?.options&&t.options.y!==void 0&&t.options.y!==null?String(t.options.y):t&&t.y!==void 0&&t.y!==null?String(t.y):``);!Number.isFinite(n)||s==null||r.push(`${a?`${String(a)}: `:``}<b>${String(s)}</b><br/>`)}),`${t?`<span>${String(t)}</span><br/>`:``}${r.join(``)}`}.bind(this),e.update({lang:u,tooltip:r,plotOptions:{...s,series:{...c,dataLabels:l}}},!1,!1,!1),(e?.yAxis||[]).forEach(e=>{let t=e.options?.labels&&typeof e.options.labels==`object`?{...e.options.labels}:{};delete t.format,delete t.formatter,e.update({labels:t},!1)});return}e.update({tooltip:{...e.options?.tooltip||{},valueDecimals:t.decimals,formatter:function(){let e=Array.isArray(this.points)&&this.points.length?this.points:[this.point||this],i=a(this,n),s=[];return e.forEach(e=>{let n=e?.point||e,i=r(Number.isFinite(e?.y)?e.y:n?.y,t,!0);if(i===null)return;let a=o(e);s.push(`${a?`${String(a)}: `:``}<b>${i}</b><br/>`)}),`${i?`<span>${String(i)}</span><br/>`:``}${s.join(``)}`}},plotOptions:{...e.options?.plotOptions||{},series:{...e.options?.plotOptions?.series||{},dataLabels:{...e.options?.plotOptions?.series?.dataLabels||{},formatter:function(){return r(Number.isFinite(this?.y)?this.y:this?.point?.y,t,t.type===`percent`)??null}}}}},!1,!1,!1),(e?.yAxis||[]).forEach(e=>{let n=e.options?.labels&&typeof e.options.labels==`object`?{...e.options.labels}:{},i=typeof n.formatter==`function`?n.formatter:null,a=!(e.options?.title&&typeof e.options.title.text==`string`&&e.options.title.text.trim());n.formatter=function(){let e=r(this?.value,t,a);return e===null?i?i.call(this):this?.value:e},(t.type===`percent`||t.scale!==`auto`)&&delete n.format,e.update({labels:n},!1)})}_applyYAxisSettingsToLiveChart(e){let t=this._normalizeYAxisSettings(this.yAxisSettings),n=e?.yAxis||[];n.length&&n.forEach((e,n)=>{let r=e.options&&typeof e.options==`object`?e.options:{},i={},a=r.min!==void 0&&r.min!==null&&r.min!==``;n===0&&t.startAtZero&&!a&&(i.min=0);let o=Array.isArray(r.plotLines)?r.plotLines.filter(e=>e?.id!==`scb-viz-reference-line`):[];n===0&&t.referenceLineEnabled&&Number.isFinite(t.referenceLineValue)&&o.push({id:`scb-viz-reference-line`,className:`scb-axis-plotline scb-viz-reference-line`,value:t.referenceLineValue}),o.length?i.plotLines=o:Array.isArray(r.plotLines)&&(i.plotLines=[]),e.update(i,!1)})}#p(){let e=this._getCurrentHighchartsChart();if(!e)return;let t=!1;this.timeFormat!==void 0&&(this._applyTimeFormatToLiveChart(e),t=!0),this.valueFormat!==void 0&&(this._applyValueFormatToLiveChart(e),t=!0),this.yAxisSettings!==void 0&&(this._applyYAxisSettingsToLiveChart(e),t=!0),t&&e.redraw(!1)}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!==`diagram`)return;let e=this.#a(this._getDiagramAssignedElements());if(e!==void 0)return window.Highcharts?.charts?.[e]}_getSeriesDifferentiationGroup(e,t){let n=String(e?.type||e?.options?.type||t?.options?.chart?.type||``).trim().toLowerCase();return[`line`,`spline`,`scatter`].includes(n)?`line`:[`area`,`areaspline`].includes(n)?`area`:[`column`,`bar`].includes(n)?this._isGroupedSeriesDifferentiationChart(e,t)?`grouped-fill`:`fill`:[`pie`,`variablepie`].includes(n)?`point-fill`:null}_getSeriesDifferentiationVariantByIndex(e){return gf(e)}_isGroupedSeriesDifferentiationChart(e,t){return _f(e,t)}_usesGroupedPointDifferentiation(e){return vf(e)}_getGroupedSeriesDifferentiationVariant(e,t,n){let r=Cf(e,t,n);return{...r,variantIndex:typeof r.variantIndex==`number`?r.variantIndex:n}}_applyGroupedLegendSeriesDifferentiation(e){(Array.isArray(e?.legend?.allItems)?e.legend.allItems:[]).forEach((t,n)=>{let r=t&&t.series?t.series:t;if(!this._isGroupedSeriesDifferentiationChart(r,e))return;let{variantIndex:i,patternKind:a}=this._getGroupedSeriesDifferentiationVariant(t,e,n),o=this._getHighchartsColorClassName(t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,i);this._getLegendSeriesDifferentiationTargets(t).fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:a}),this._setSeriesDifferentiationColorClass(e,o)}),this._ensureStyledModeSeriesPattern(e,o,a)})}_clearGroupedLegendSeriesDifferentiation(e){(Array.isArray(e?.legend?.allItems)?e.legend.allItems:[]).forEach(t=>{let n=t&&t.series?t.series:t;if(!this._isGroupedSeriesDifferentiationChart(n,e))return;let r=this._getLegendSeriesDifferentiationTargets(t);r.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),r.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)})})}_shouldShowSeriesDifferentiationAction(){return wf({chart:this._getCurrentHighchartsChart(),getCurrentPrintableView:()=>this._getCurrentPrintableView(),getSeriesDifferentiationGroup:(e,t)=>this._getSeriesDifferentiationGroup(e,t),isHighchartsStyledMode:e=>this._isHighchartsStyledMode(e)})}_getSeriesDifferentiationSnapshotStore(e){let t=this._seriesDifferentiationSnapshots.get(e);return t||(t=new Map,this._seriesDifferentiationSnapshots.set(e,t)),t}_cloneSeriesOptionValue(e){return Array.isArray(e)?e.map(e=>this._cloneSeriesOptionValue(e)):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,this._cloneSeriesOptionValue(t)])):e}_captureSeriesDifferentiationSnapshot(e){let t=this._cloneSeriesOptionValue(e?.options?.marker),n=this._cloneSeriesOptionValue(e?.resetA11yMarkerOptions),r=this._cloneSeriesOptionValue(e?.userOptions?.marker),i=t?.states,a=e?.a11yMarkersForced===!0&&n&&Object.keys(n).length>0||i?.normal?.opacity===0&&n&&Object.keys(n).length>0?n:r;return{marker:a&&Object.keys(a).length>0?a:t&&Object.keys(t).length>0?t:{enabled:!1}}}_isHighchartsStyledMode(e){return Ef(e)}_getHighchartsSvgRoot(e){return Df(e)}_getHighchartsColorClassName(e,t){return Of(e,t)}_setSeriesDifferentiationMetadata(e,t){kf(e,t)}_clearSeriesDifferentiationMetadata(e){Af(e)}_setSeriesDifferentiationColorClass(e,t){jf(e,t)}_clearSeriesDifferentiationColorClass(e){Mf(e)}_getLegendSeriesDifferentiationTargets(e){return Nf(e)}_ensureStyledModeSeriesPattern(e,t,n){Pf(e,t,n)}_applyStyledModeSeriesDifferentiation(e){let t=this._getHighchartsSvgRoot(e);if(!t)return;t.classList.add(`scb-viz-series-differentiation-enabled`);let n=ff(),r=this._getSeriesDifferentiationSnapshotStore(e);e.series?.forEach((t,i)=>{let a=this._getSeriesDifferentiationGroup(t,e);if(!a)return;let o=String(t?.index??i);r.has(o)||r.set(o,this._captureSeriesDifferentiationSnapshot(t));let s=a===`grouped-fill`&&this._usesGroupedPointDifferentiation(t),c=a===`grouped-fill`?this._getGroupedSeriesDifferentiationVariant(t,e,i):{variantIndex:i,...this._getSeriesDifferentiationVariantByIndex(i)},{dashStyle:l,markerSymbol:u,patternKind:d}=c,f=this._getHighchartsColorClassName(t?.graph??t?.area??t?.group,c.variantIndex),p=this._getLegendSeriesDifferentiationTargets(t);this._setSeriesDifferentiationMetadata(t?.graph,{role:`graph`,dashStyle:l}),a===`area`&&(this._setSeriesDifferentiationMetadata(t?.area,{role:`area`,patternKind:d}),this._setSeriesDifferentiationColorClass(t?.area,f),this._ensureStyledModeSeriesPattern(e,f,d)),a===`fill`&&(t.points?.forEach(e=>{this._setSeriesDifferentiationMetadata(e?.graphic,{role:`fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e?.graphic,f)}),this._ensureStyledModeSeriesPattern(e,f,d)),a===`grouped-fill`&&(s?t.points?.forEach((t,n)=>{let r=this._getGroupedSeriesDifferentiationVariant(t,e,n),i=this._getHighchartsColorClassName(t?.graphic??t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,r.variantIndex);this._setSeriesDifferentiationMetadata(t?.graphic,{role:`fill`,patternKind:r.patternKind}),this._setSeriesDifferentiationColorClass(t?.graphic,i),this._ensureStyledModeSeriesPattern(e,i,r.patternKind)}):(t.points?.forEach(e=>{this._setSeriesDifferentiationMetadata(e?.graphic,{role:`fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e?.graphic,f)}),this._ensureStyledModeSeriesPattern(e,f,d))),a===`point-fill`&&t.points?.forEach((t,r)=>{let i=n[r%n.length],a=this._getHighchartsColorClassName(t?.graphic??t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,r),o=this._getLegendSeriesDifferentiationTargets(t);this._setSeriesDifferentiationMetadata(t?.graphic,{role:`fill`,patternKind:i}),this._setSeriesDifferentiationColorClass(t?.graphic,a),this._ensureStyledModeSeriesPattern(e,a,i),o.fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:i}),this._setSeriesDifferentiationColorClass(e,a)})}),(a===`line`||a===`area`)&&p.graphTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-symbol`,dashStyle:l})}),(a===`area`||a===`fill`||a===`grouped-fill`&&!s)&&p.fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e,f)}),(a===`line`||a===`area`)&&t.update({marker:{enabled:!0,symbol:u}},!1)}),this._applyGroupedLegendSeriesDifferentiation(e),e.redraw(!1)}_restoreStyledModeSeriesDifferentiation(e){this._getHighchartsSvgRoot(e)?.classList.remove(`scb-viz-series-differentiation-enabled`);let t=this._getSeriesDifferentiationSnapshotStore(e);e.series?.forEach((n,r)=>{let i=this._getSeriesDifferentiationGroup(n,e);if(!i)return;let a=this._getLegendSeriesDifferentiationTargets(n);if(this._clearSeriesDifferentiationMetadata(n?.graph),this._clearSeriesDifferentiationMetadata(n?.area),this._clearSeriesDifferentiationColorClass(n?.area),n.points?.forEach(e=>{let t=this._getLegendSeriesDifferentiationTargets(e);this._clearSeriesDifferentiationMetadata(e?.graphic),this._clearSeriesDifferentiationColorClass(e?.graphic),t.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),t.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)})}),a.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),a.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)}),i===`line`||i===`area`){let e=t.get(String(n?.index??r));n.update({marker:this._cloneSeriesOptionValue(e?.marker)},!1)}}),this._clearGroupedLegendSeriesDifferentiation(e),e.redraw(!1),this._seriesDifferentiationSnapshots.delete(e)}#m(e){this._isHighchartsStyledMode(e)&&this._applyStyledModeSeriesDifferentiation(e)}#h(e){this._isHighchartsStyledMode(e)&&this._restoreStyledModeSeriesDifferentiation(e)}#g(){let e=this._getCurrentHighchartsChart();if(e){if(this._seriesDifferentiationEnabled){this.#m(e);return}this.#h(e)}}_canExportRaster(){return this._getExportableVisualElement()!==null}_canExportCsv(){return!!this._getResolvedTableData()?.rows?.length}_buildExportFileName(e){return Vd({lang:this.lang,title:this.title},e)}_getFullscreenTarget(){return this}_getCurrentFullscreenElement(){return Ud()}_isFullscreenSupported(){return Wd(this._getFullscreenTarget())}_syncFullscreenState(){let e=this._getCurrentFullscreenElement()===this._getFullscreenTarget();this._isFullscreen=e,this.toggleAttribute(`data-scb-viz-fullscreen`,e),this.#c(),this.#r()}async _toggleFullscreen(){await Gd(this._getFullscreenTarget())}_renderActionsMenu(){let e=this._getCurrentPrintableView(),t=this._canExportRaster(),n=this._canExportCsv(),r=t&&(e===`diagram`||e===`image`),i=n&&e===`table`,a=this._shouldShowSeriesDifferentiationAction();return b`
|
|
13853
13879
|
<div class="actions-menu">
|
|
13854
13880
|
<scb-icon-button
|
|
13855
13881
|
icon="more_vert"
|
|
@@ -13986,7 +14012,7 @@
|
|
|
13986
14012
|
</div>
|
|
13987
14013
|
`:t}_renderTable(){let e=this._getResolvedTableData();if(!e||!e.rows||e.rows.length===0)return null;let{alignments:t,headers:n,rows:r,rowHeaderRows:i}=this._getResolvedTableView(e),a=[this.title,this.subtitle].map(e=>typeof e==`string`?e.trim():``).filter(Boolean).join(`. `),o=e=>e.html?e.html:this._escapeHtml(e.text);return b`
|
|
13988
14014
|
<scb-table part="table" column-width-mode="header">
|
|
13989
|
-
${
|
|
14015
|
+
${yl(`<table class="scb-viz-table">${a?`<caption class="visually-hidden">${this._escapeHtml(a)}</caption>`:``}${n.length>0?`<thead><tr>${n.map((e,n)=>`<th scope="col" class="${t[n]===`right`?`align-right`:`align-left`}">${o(e)}</th>`).join(``)}</tr></thead>`:``}<tbody>${r.map((e,n)=>{let r=i[n]===!0;return`<tr>${e.map((e,n)=>{let i=t[n]===`right`?`align-right`:`align-left`,a=o(e);return n===0&&r?`<th scope="row" class="${i}">${a}</th>`:`<td class="${i}">${a}</td>`}).join(``)}</tr>`}).join(``)}</tbody></table>`)}
|
|
13990
14016
|
</scb-table>
|
|
13991
14017
|
`}_renderRichText(e){let t=typeof e==`string`?e.replace(/\r\n?/g,`
|
|
13992
14018
|
`):``,n=t.split(/\n{2,}/).filter(e=>e!==``);return n.length?b`${n.map(e=>b`<p class="body-text-paragraph">${e.split(`
|
|
@@ -14022,7 +14048,7 @@
|
|
|
14022
14048
|
aria-label="${this.officialStatisticsAlt}"
|
|
14023
14049
|
>
|
|
14024
14050
|
<span class="sos-logotype-small" aria-hidden="true">
|
|
14025
|
-
${
|
|
14051
|
+
${Vf(Hf)}
|
|
14026
14052
|
</span>
|
|
14027
14053
|
</a>
|
|
14028
14054
|
`:``}
|
|
@@ -14144,4 +14170,4 @@
|
|
|
14144
14170
|
></slot>
|
|
14145
14171
|
<slot></slot>
|
|
14146
14172
|
</div>
|
|
14147
|
-
`}}}_syncChipClass(){let e=this.variant===`Standard`;this.classList.toggle(`chip-diagram`,e&&this.selectedChip===`Diagram`),this.classList.toggle(`chip-table`,e&&this.selectedChip===`Table`)}_dispatchSelectedChipChanged(){let e={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent(`selected-chip-changed`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`selectedchipchanged`,{detail:e,bubbles:!0,composed:!0}))}_onSegmentedChange(e){let t=e.detail?.value;this.selectedChip===t?this.selectedChip=null:this.selectedChip=t}_toggleActionsMenu(e){e.stopPropagation(),this._actionsMenuOpen=!this._actionsMenuOpen,this._actionsMenuOpen&&requestAnimationFrame(()=>{this._focusFirstMenuItem()})}_closeActionsMenu(){this._actionsMenuOpen=!1}_focusMenuButton(){(this.shadowRoot?.querySelector(`.actions-menu scb-icon-button`))?.focus()}_focusFirstMenuItem(){(this.shadowRoot?.querySelector(`.actions-menu-item`))?.focus()}_getExportSurfaceTarget(){return this.shadowRoot?.querySelector(`.viz-container`)??this}async#_(e){let t=this._getExportableVisualElement();if(!t)return;let n=await
|
|
14173
|
+
`}}}_syncChipClass(){let e=this.variant===`Standard`;this.classList.toggle(`chip-diagram`,e&&this.selectedChip===`Diagram`),this.classList.toggle(`chip-table`,e&&this.selectedChip===`Table`)}_dispatchSelectedChipChanged(){let e={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent(`selected-chip-changed`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`selectedchipchanged`,{detail:e,bubbles:!0,composed:!0}))}_onSegmentedChange(e){let t=e.detail?.value;this.selectedChip===t?this.selectedChip=null:this.selectedChip=t}_toggleActionsMenu(e){e.stopPropagation(),this._actionsMenuOpen=!this._actionsMenuOpen,this._actionsMenuOpen&&requestAnimationFrame(()=>{this._focusFirstMenuItem()})}_closeActionsMenu(){this._actionsMenuOpen=!1}_focusMenuButton(){(this.shadowRoot?.querySelector(`.actions-menu scb-icon-button`))?.focus()}_focusFirstMenuItem(){(this.shadowRoot?.querySelector(`.actions-menu-item`))?.focus()}_getExportSurfaceTarget(){return this.shadowRoot?.querySelector(`.viz-container`)??this}async#_(e){let t=this._getExportableVisualElement();if(!t)return;let n=await Yd(t,this._getExportSurfaceTarget(),e);n&&Zd(n,this._buildExportFileName(e===`jpeg`?`jpg`:`png`))}_getCurrentPrintableView(){return this.variant===`Table`?`table`:this.variant===`Image`?`image`:this.selectedChip===`Table`?`table`:`diagram`}#v(e){return af(this._getResolvedTableView(e),e=>this._escapeHtml(e))}#y(){return of({comment:this.comment,commentLabel:this.commentLabel,description:this.description,descriptionLabel:this.descriptionLabel,escapeHtml:e=>this._escapeHtml(e),footnote:this.footnote,footnoteLabel:this.footnoteLabel,moreAboutStatsLabel:this.moreAboutStatsLabel,officialStatistics:this.officialStatistics,renderRichTextHtml:e=>this._renderRichTextHtml(e),sosLogotypeSvg:Hf,source:this.source,sourceLabel:this.sourceLabel})}#b(e){return sf({contentHtml:e,escapeHtml:e=>this._escapeHtml(e),footerHtml:this.#y(),lang:this.lang,subtitle:this.subtitle,title:this.title})}async#x(){await qd(this,async()=>{let e=this._getCurrentPrintableView(),t=``;if(e===`table`){let e=this._getResolvedTableData();if(!e?.rows?.length)return;t=this.#v(e)}else if(e===`image`){let e=this.shadowRoot?.querySelector(`.image-content img`),n=e?.currentSrc||e?.src||this.imageHref;if(!n)return;t=`<img class="viz-image" src="${this._escapeHtml(n)}" alt="${this._escapeHtml(this._getImageAltText())}">`}else{let e=this._getExportableVisualElement();if(!e)return;let n=await Xd(e,this._getExportSurfaceTarget(),`png`);if(!n)return;t=`<img class="viz-chart-image" src="${n}" alt="${this._escapeHtml(this._getImageAltText())}">`}await Kd(this.#b(t))})}#S(){let e=this._getResolvedTableData();e?.rows?.length&&Zd(Jd(zf(e,e=>this._normalizeRenderableCell(e)),this.lang),this._buildExportFileName(`csv`))}#C(){let e=this.#w(this.spacing),t=this.#w(this.spacingTop)??e,n=this.#w(this.spacingBottom)??e,r=this.#w(this.spacingLeft),i=this.#w(this.spacingRight);t?this.style.setProperty(`--scb-viz-spacing-block-start`,t):this.style.removeProperty(`--scb-viz-spacing-block-start`),n?this.style.setProperty(`--scb-viz-spacing-block-end`,n):this.style.removeProperty(`--scb-viz-spacing-block-end`),r?this.style.setProperty(`--scb-viz-spacing-inline-start`,r):this.style.removeProperty(`--scb-viz-spacing-inline-start`),i?this.style.setProperty(`--scb-viz-spacing-inline-end`,i):this.style.removeProperty(`--scb-viz-spacing-inline-end`)}#w(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#T(){let e=this.containerMaxWidth?.trim();e?this.style.setProperty(`--scb-viz-container-max-width`,e):this.style.removeProperty(`--scb-viz-container-max-width`)}};P([g({type:String,reflect:!0})],$.prototype,`variant`,void 0),P([g({type:String,reflect:!0,attribute:`selected-chip`})],$.prototype,`selectedChip`,void 0),P([g({type:String,reflect:!0})],$.prototype,`title`,void 0),P([g({type:String,reflect:!0})],$.prototype,`subtitle`,void 0),P([g({type:String,reflect:!0})],$.prototype,`description`,void 0),P([g({type:String,reflect:!0})],$.prototype,`comment`,void 0),P([g({type:String,reflect:!0})],$.prototype,`source`,void 0),P([g({type:String,reflect:!0})],$.prototype,`footnote`,void 0),P([g({type:String,reflect:!0,attribute:`lang`})],$.prototype,`lang`,void 0),P([g({type:String,reflect:!0,attribute:`image-href`})],$.prototype,`imageHref`,void 0),P([g({type:Boolean,reflect:!0,attribute:`official-statistics`})],$.prototype,`officialStatistics`,void 0),P([g({type:Boolean,reflect:!0,attribute:`disable-toggle`})],$.prototype,`disableToggle`,void 0),P([g({type:String,attribute:`content-max-width`})],$.prototype,`contentMaxWidth`,void 0),P([g({type:String,attribute:`container-max-width`})],$.prototype,`containerMaxWidth`,void 0),P([g({type:String,attribute:`content-height`})],$.prototype,`contentHeight`,void 0),P([g({type:String,reflect:!0,attribute:`toggle-height-mode`})],$.prototype,`toggleHeightMode`,void 0),P([g({attribute:!1})],$.prototype,`tableData`,void 0),P([g({attribute:!1})],$.prototype,`valueFormat`,void 0),P([g({attribute:!1})],$.prototype,`timeFormat`,void 0),P([g({attribute:!1})],$.prototype,`yAxisSettings`,void 0),P([_()],$.prototype,`_slottedTableData`,void 0),P([_()],$.prototype,`_actionsMenuOpen`,void 0),P([_()],$.prototype,`_seriesDifferentiationEnabled`,void 0),P([_()],$.prototype,`_isFullscreen`,void 0),P([g({type:String,reflect:!0})],$.prototype,`spacing`,void 0),P([g({type:String,attribute:`spacing-top`,reflect:!0})],$.prototype,`spacingTop`,void 0),P([g({type:String,attribute:`spacing-bottom`,reflect:!0})],$.prototype,`spacingBottom`,void 0),P([g({type:String,attribute:`spacing-left`,reflect:!0})],$.prototype,`spacingLeft`,void 0),P([g({type:String,attribute:`spacing-right`,reflect:!0})],$.prototype,`spacingRight`,void 0),$=P([a(`scb-viz`)],$),Gc(),Jc(),rl(),Vl(),Eu(),Mu(),ku(),fl(),sl(),ul(),qu(),Yu(),Zu(),uu(),mu(),fu(),Ml(),ol(),Gc(),Jc(),rl(),Vl(),cu(),_u(),Eu(),Mu(),ku(),fl(),sl(),ul(),qu(),Yu(),$u(),Zu(),uu(),mu(),fu(),Ml(),nd(),ol(),Gc(),Jc(),rl(),Vc(),Vl(),cu(),_u(),Eu(),Mu(),ku(),fl(),sl(),ul(),qu(),Yu(),$u(),Zu(),uu(),mu(),fu(),Ml(),nd(),ol(),Gc(),Jc(),rl(),Vc(),Vl(),cu(),_u(),Eu(),Mu(),ku(),fl(),sl(),ul(),qu(),Yu(),$u(),Zu(),uu(),mu(),fu(),Ml(),nd(),ol()})();
|