Files
2026-01-30 23:31:00 -06:00

3 lines
27 KiB
JavaScript

/*! For license information please see 6426.78778085a2463f48.js.LICENSE.txt */
"use strict";(self.webpackChunkhacs_frontend=self.webpackChunkhacs_frontend||[]).push([["6426"],{84632:function(e,o,r){r.d(o,{Q2:function(){return i},ou:function(){return a}});r(71695),r(19134),r(11740),r(47706),r(39527),r(41360),r(47021),r(71513),r(75656),r(50100),r(18084);var t=r(13089);const i=()=>{const e={},o=new URLSearchParams(t.E.location.search);for(const[r,t]of o.entries())e[r]=t;return e},a=e=>{const o=new URLSearchParams;return Object.entries(e).forEach((([e,r])=>{o.append(e,r)})),o.toString()}},84573:function(e,o,r){var t=r(73577),i=(r(71695),r(47021),r(74763)),a=r(50778);(0,t.Z)([(0,a.Mo)("ha-chip-set")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[]}}),i.l)},1192:function(e,o,r){var t=r(73577),i=(r(71695),r(47021),r(57243)),a=r(50778);let s,n,c,d=e=>e;(0,t.Z)([(0,a.Mo)("ha-card")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean,reflect:!0})],key:"raised",value(){return!1}},{kind:"get",static:!0,key:"styles",value:function(){return(0,i.iv)(s||(s=d`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,12px);border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, 24px);letter-spacing:-.012em;line-height:48px;padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:400}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`))}},{kind:"method",key:"render",value:function(){return(0,i.dy)(n||(n=d` ${0} <slot></slot> `),this.header?(0,i.dy)(c||(c=d`<h1 class="card-header">${0}</h1>`),this.header):i.Ld)}}]}}),i.oi)},90977:function(e,o,r){var t=r(73577),i=r(72621),a=(r(71695),r(47021),r(58795)),s=r(57243),n=r(50778);let c,d=e=>e;(0,t.Z)([(0,n.Mo)("ha-circular-progress")],(function(e,o){class r extends o{constructor(...o){super(...o),e(this)}}return{F:r,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:"aria-label",type:String})],key:"ariaLabel",value(){return"Loading"}},{kind:"field",decorators:[(0,n.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,i.Z)(r,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--md-circular-progress-size","16px");break;case"small":this.style.setProperty("--md-circular-progress-size","28px");break;case"medium":this.style.setProperty("--md-circular-progress-size","48px");break;case"large":this.style.setProperty("--md-circular-progress-size","68px")}}},{kind:"field",static:!0,key:"styles",value(){return[...(0,i.Z)(r,"styles",this),(0,s.iv)(c||(c=d`:host{--md-sys-color-primary:var(--primary-color);--md-circular-progress-size:48px}`))]}}]}}),a.B)},68455:function(e,o,r){r.r(o);var t=r(73577),i=(r(71695),r(47021),r(57243)),a=r(50778),s=(r(90977),r(92500),r(89654),r(66193));let n,c,d,l,h,u,p=e=>e;(0,t.Z)([(0,a.Mo)("hass-loading-screen")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean,attribute:"no-toolbar"})],key:"noToolbar",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"rootnav",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)()],key:"message",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,i.dy)(n||(n=p` ${0} <div class="content"> <ha-circular-progress indeterminate></ha-circular-progress> ${0} </div> `),this.noToolbar?"":(0,i.dy)(c||(c=p`<div class="toolbar"> ${0} </div>`),this.rootnav||null!==(e=history.state)&&void 0!==e&&e.root?(0,i.dy)(d||(d=p` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):(0,i.dy)(l||(l=p` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._handleBack)),this.message?(0,i.dy)(h||(h=p`<div id="loading-text">${0}</div>`),this.message):i.Ld)}},{kind:"method",key:"_handleBack",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[s.Qx,(0,i.iv)(u||(u=p`:host{display:block;height:100%;background-color:var(--primary-background-color)}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;pointer-events:none;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto}.content{height:calc(100% - var(--header-height));display:flex;flex-direction:column;align-items:center;justify-content:center}#loading-text{max-width:350px;margin-top:16px}`))]}}]}}),i.oi)},84285:function(e,o,r){r.r(o),r.d(o,{HacsRepositoryDashboard:()=>H});var t=r("73577"),i=r("72621"),a=(r("19083"),r("71695"),r("92745"),r("40251"),r("19134"),r("11740"),r("97003"),r("88044"),r("39527"),r("67670"),r("41360"),r("13334"),r("47021"),r("71513"),r("75656"),r("50100"),r("18084"),r("57243")),s=r("50778"),n=r("27486"),c=r("13089"),d=r("84632"),l=(r("1025"),r("84573"),r("17949"),r("1192"),r("12974"),r("61158"),r("5848"),r("88002"),r("4557")),h=(r("3035"),r("68455"),r("82283")),u=(r("92500"),r("89654"),r("66193"));let p,v,f,b,y,g=e=>e;(0,t.Z)([(0,s.Mo)("hass-subpage")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"supervisor",value(){return!1}},{kind:"field",decorators:[(0,h.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,a.dy)(p||(p=g` <div class="toolbar"> ${0} <div class="main-title"><slot name="header">${0}</slot></div> <slot name="toolbar-icon"></slot> </div> <div class="content ha-scrollbar" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),this.mainPage||null!==(e=history.state)&&void 0!==e&&e.root?(0,a.dy)(v||(v=g` <ha-menu-button .hassio="${0}" .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.supervisor,this.hass,this.narrow):this.backPath?(0,a.dy)(f||(f=g` <a href="${0}"> <ha-icon-button-arrow-prev .hass="${0}"></ha-icon-button-arrow-prev> </a> `),this.backPath,this.hass):(0,a.dy)(b||(b=g` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,this._saveScrollPos)}},{kind:"method",decorators:[(0,s.hO)({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[u.$c,(0,a.iv)(y||(y=g`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin:var(--margin-title);line-height:20px;min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;padding-bottom:1px}.content{position:relative;width:100%;height:calc(100% - 1px - var(--header-height));overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}#fab{position:absolute;right:calc(16px + env(safe-area-inset-right));inset-inline-end:calc(16px + env(safe-area-inset-right));inset-inline-start:initial;bottom:calc(16px + env(safe-area-inset-bottom));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}:host([narrow]) #fab.tabs{bottom:calc(84px + env(safe-area-inset-bottom))}#fab[is-wide]{bottom:24px;right:24px;inset-inline-end:24px;inset-inline-start:initial}`))]}}]}}),a.oi);var m=r("23660"),k=r("82290"),x=r("49236"),w=r("42104"),_=r("51597");r("61006");const $=e=>e.toLowerCase().includes(".md")||e.toLowerCase().includes(".markdown");let C,L,z,M,A,Z,P,S,T,B,I=e=>e;let H=(0,t.Z)([(0,s.Mo)("hacs-repository-dashboard")],(function(e,o){class r extends o{constructor(...o){super(...o),e(this)}}return{F:r,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hacs",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"narrow",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"isWide",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_repository",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,s.IO)("#overflow-menu")],key:"_repositoryOverflowMenu",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,i.Z)(r,"connectedCallback",this,3)([]),document.body.addEventListener("keydown",this._generateMyLink)}},{kind:"method",key:"disconnectedCallback",value:function(){(0,i.Z)(r,"disconnectedCallback",this,3)([]),document.body.removeEventListener("keydown",this._generateMyLink)}},{kind:"field",key:"_generateMyLink",value(){return e=>{if(!(e.ctrlKey||e.shiftKey||e.metaKey||e.altKey)&&"m"===e.key&&c.E.location.pathname.startsWith("/hacs/repository/")){if(!this._repository)return;const e=new URLSearchParams({redirect:"hacs_repository",owner:this._repository.full_name.split("/")[0],repository:this._repository.full_name.split("/")[1],category:this._repository.category});window.open(`https://my.home-assistant.io/create-link/?${e.toString()}`,"_blank")}}}},{kind:"method",key:"firstUpdated",value:async function(e){(0,i.Z)(r,"firstUpdated",this,3)([e]);const o=(0,d.Q2)();if(Object.entries(o).length){let e;const r=`${o.owner}/${o.repository}`;if(e=this.hacs.repositories.find((e=>e.full_name.toLocaleLowerCase()===r.toLocaleLowerCase())),!e&&o.category){if(!(await(0,l.g7)(this,{title:this.hacs.localize("my.add_repository_title"),text:this.hacs.localize("my.add_repository_description",{repository:r}),confirmText:this.hacs.localize("common.add"),dismissText:this.hacs.localize("common.cancel")})))return void(this._error=this.hacs.localize("my.repository_not_found",{repository:r}));try{await(0,w.NA)(this.hass,r,o.category),this.hacs.repositories=await(0,w.ER)(this.hass),e=this.hacs.repositories.find((e=>e.full_name.toLocaleLowerCase()===r.toLocaleLowerCase()))}catch(t){return void(this._error=t)}}e?this._fetchRepository(String(e.id)):this._error=this.hacs.localize("my.repository_not_found",{repository:r})}else{const e=this.route.path.indexOf("/",1),o=this.route.path.substr(e+1);if(!o)return void(this._error="Missing repositoryId from route");this._fetchRepository(o)}}},{kind:"method",key:"updated",value:function(e){(0,i.Z)(r,"updated",this,3)([e]),e.has("repositories")&&this._repository&&this._fetchRepository()}},{kind:"method",key:"_fetchRepository",value:async function(e){try{this._repository=await(0,x.nj)(this.hass,e||String(this._repository.id))}catch(o){this._error=null==o?void 0:o.message}}},{kind:"field",key:"_getAuthors",value(){return(0,n.Z)((e=>{const o=[];if(!e.authors)return o;if(e.authors.forEach((e=>o.push(e.replace("@","")))),0===o.length){const r=e.full_name.split("/")[0];if(["custom-cards","custom-components","home-assistant-community-themes"].includes(r))return o;o.push(r)}return o}))}},{kind:"method",key:"render",value:function(){if(this._error)return(0,a.dy)(C||(C=I`<hass-error-screen .error="${0}"></hass-error-screen>`),this._error);if(!this._repository)return(0,a.dy)(L||(L=I`<hass-loading-screen></hass-loading-screen>`));const e=this._getAuthors(this._repository);return(0,a.dy)(z||(z=I` <hass-subpage .hass="${0}" .narrow="${0}" .route="${0}" .header="${0}" hasFab> <ha-icon-button slot="toolbar-icon" .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> <div class="content"> <ha-card> <ha-chip-set> ${0} ${0} ${0} <ha-assist-chip .label="${0}" title="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-assist-chip> <a href="https://github.com/${0}/issues" target="_blank" rel="noreferrer noopener"> <ha-assist-chip .label="${0}" title="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-assist-chip> </a> </ha-chip-set> <ha-markdown .content="${0}"></ha-markdown> </ha-card> </div> ${0} </hass-subpage> <ha-menu id="overflow-menu" positioning="fixed"> ${0} </ha-menu> `),this.hass,this.narrow,this.route,this._repository.name,this.hass.localize("ui.common.overflow_menu")||"overflow_menu","M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",this._showOverflowRepositoryMenu,this._repository.installed?(0,a.dy)(M||(M=I` <ha-assist-chip .label="${0}" title="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-assist-chip> `),this._repository.installed_version,this.hacs.localize("dialog_info.version_installed"),"M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,7.5V16.5M12,4.15L6.04,7.5L12,10.85L17.96,7.5L12,4.15Z"):"",e?e.map((e=>(0,a.dy)(A||(A=I`<a href="https://github.com/${0}" target="_blank" rel="noreferrer noopener"> <ha-assist-chip .label="${0}" title="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> @${0} </ha-assist-chip> </a>`),e,e,this.hacs.localize("dialog_info.author"),"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z",e))):"",this._repository.downloads?(0,a.dy)(Z||(Z=I` <ha-assist-chip title="${0}" .label="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-assist-chip>`),this.hacs.localize("dialog_info.downloads"),String(this._repository.downloads),"M9,4H15V12H19.84L12,19.84L4.16,12H9V4Z"):"",String(this._repository.stars),this.hacs.localize("dialog_info.stars"),"M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",this._repository.stars,this._repository.full_name,String(this._repository.issues),this.hacs.localize("dialog_info.open_issues"),"M10 3H14V14H10V3M10 21V17H14V21H10Z",this._repository.issues,(o=this._repository.additional_info,r=this._repository,o=o.replace(/https:\/\/github\.com\/([^\/]+)\/([^\/]+)\/blob\/([^\s]+)/g,(function(e,o,r,t){return $(e)?e:`https://raw.githubusercontent.com/${o}/${r}/${t}`})),r&&(o=(o=(o=o.replace(/\[.*?\]\([^#](?!.*?:\/\/).*?\)/g,(function(e){const o=$(e);return e.replace("(/","(").replace("(",`(${o?"https://github.com":"https://raw.githubusercontent.com"}/${r.full_name}${o?"/blob":""}/${r.available_version||r.default_branch}/`)}))).replace(/\[.*\]\(\#.*\)/g,(function(e){return e.replace("(#",`(/hacs/repository/${r.id}#`)}))).replace(/(?:\w[\w-.]+\/\w[\w-.]+|\B)#[1-9]\d*\b/g,(e=>{const o=e.replace(/^#/,`${r.full_name}#`),[t,i]=o.split("#");return`[${e}](https://github.com/${t}/issues/${i})`}))),o||this.hacs.localize("dialog_info.no_info")),this._repository.installed_version?"":(0,a.dy)(P||(P=I`<ha-fab .label="${0}" .extended="${0}" @click="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-fab>`),this.hacs.localize("common.download"),!this.narrow,this._downloadRepositoryDialog,"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"),(0,k.G)(this,this._repository,this.hacs.localize).map((e=>e.divider?(0,a.dy)(S||(S=I`<li divider role="separator"></li>`)):(0,a.dy)(T||(T=I` <ha-md-menu-item class="${0}" .clickAction="${0}"> <ha-svg-icon .path="${0}" slot="start"></ha-svg-icon> <div slot="headline">${0}</div> </ha-md-menu-item> `),e.error?"error":e.warning?"warning":"",(()=>{(null==e?void 0:e.action)&&e.action()}),e.path,e.label))));var o,r}},{kind:"field",key:"_showOverflowRepositoryMenu",value(){return e=>{this._repositoryOverflowMenu.open&&e.target===this._repositoryOverflowMenu.anchorElement?this._repositoryOverflowMenu.close():(this._repositoryOverflowMenu.anchorElement=e.target,this._repositoryOverflowMenu.show())}}},{kind:"method",key:"_downloadRepositoryDialog",value:function(){(0,m.px)(this,{hacs:this.hacs,repositoryId:this._repository.id,repository:this._repository})}},{kind:"get",static:!0,key:"styles",value:function(){return[_.w,(0,a.iv)(B||(B=I`hass-loading-screen{--app-header-background-color:var(--sidebar-background-color);--app-header-text-color:var(--sidebar-text-color);height:100vh}hass-subpage{position:absolute;width:100vw}ha-fab ha-svg-icon{color:var(--hcv-text-color-on-background)}ha-fab{position:fixed;float:right;right:calc(18px + env(safe-area-inset-right));bottom:calc(16px + env(safe-area-inset-bottom));z-index:1}ha-fab.rtl{float:left;right:auto;left:calc(18px + env(safe-area-inset-left))}ha-card{display:block;padding:16px}.content{margin:auto;padding:8px;max-width:1536px}ha-chip-set{padding-bottom:8px}@media all and (max-width:500px){.content{margin:8px 4px 64px;max-width:none}}`))]}}]}}),a.oi)},49236:function(e,o,r){r.d(o,{hZ:function(){return i},i2:function(){return a},nj:function(){return t}});r(40251);const t=async(e,o)=>e.connection.sendMessagePromise({type:"hacs/repository/info",repository_id:o}),i=async(e,o,r)=>e.connection.sendMessagePromise({type:"hacs/repository/download",repository:o,version:r}),a=async(e,o)=>e.connection.sendMessagePromise({type:"hacs/repository/releases",repository_id:o})},74763:function(e,o,r){r.d(o,{l:()=>u});var t=r("9065"),i=r("50778"),a=(r("85601"),r("71695"),r("39527"),r("99790"),r("67670"),r("47021"),r("57243")),s=r("4077");let n,c=e=>e;class d extends a.oi{get chips(){return this.childElements.filter((e=>e instanceof s.A))}constructor(){super(),this.internals=this.attachInternals(),a.sk||(this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar")}render(){return(0,a.dy)(n||(n=c`<slot @slotchange="${0}"></slot>`),this.updateTabIndices)}handleKeyDown(e){const o="ArrowLeft"===e.key,r="ArrowRight"===e.key,t="Home"===e.key,i="End"===e.key;if(!(o||r||t||i))return;const{chips:a}=this;if(a.length<2)return;if(e.preventDefault(),t||i){return a[t?0:a.length-1].focus({trailing:i}),void this.updateTabIndices()}const s="rtl"===getComputedStyle(this).direction?o:r,n=a.find((e=>e.matches(":focus-within")));if(!n){return(s?a[0]:a[a.length-1]).focus({trailing:!s}),void this.updateTabIndices()}const c=a.indexOf(n);let d=s?c+1:c-1;for(;d!==c;){d>=a.length?d=0:d<0&&(d=a.length-1);const e=a[d];if(!e.disabled||e.alwaysFocusable){e.focus({trailing:!s}),this.updateTabIndices();break}s?d++:d--}}updateTabIndices(){const{chips:e}=this;let o;for(const r of e){const e=r.alwaysFocusable||!r.disabled;r.matches(":focus-within")&&e?o=r:(e&&!o&&(o=r),r.tabIndex=-1)}o&&(o.tabIndex=0)}}(0,t.gn)([(0,i.NH)()],d.prototype,"childElements",void 0);let l;const h=(0,a.iv)(l||(l=(e=>e)`:host{display:flex;flex-wrap:wrap;gap:8px}`));let u=class extends d{};u.styles=[h],u=(0,t.gn)([(0,i.Mo)("md-chip-set")],u)},58795:function(e,o,r){r.d(o,{B:()=>g});var t=r("9065"),i=r("50778"),a=r("57243"),s=(r("71695"),r("47021"),r("35359")),n=r("13823");let c,d=e=>e;const l=(0,n.T)(a.oi);class h extends l{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){const{ariaLabel:e}=this;return(0,a.dy)(c||(c=d` <div class="progress ${0}" role="progressbar" aria-label="${0}" aria-valuemin="0" aria-valuemax="${0}" aria-valuenow="${0}">${0}</div> `),(0,s.$)(this.getRenderClasses()),e||a.Ld,this.max,this.indeterminate?a.Ld:this.value,this.renderIndicator())}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}}(0,t.gn)([(0,i.Cb)({type:Number})],h.prototype,"value",void 0),(0,t.gn)([(0,i.Cb)({type:Number})],h.prototype,"max",void 0),(0,t.gn)([(0,i.Cb)({type:Boolean})],h.prototype,"indeterminate",void 0),(0,t.gn)([(0,i.Cb)({type:Boolean,attribute:"four-color"})],h.prototype,"fourColor",void 0);let u,p,v=e=>e;class f extends h{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){const e=100*(1-this.value/this.max);return(0,a.dy)(u||(u=v` <svg viewBox="0 0 4800 4800"> <circle class="track" pathLength="100"></circle> <circle class="active-track" pathLength="100" stroke-dashoffset="${0}"></circle> </svg> `),e)}renderIndeterminateContainer(){return(0,a.dy)(p||(p=v` <div class="spinner"> <div class="left"> <div class="circle"></div> </div> <div class="right"> <div class="circle"></div> </div> </div>`))}}let b;const y=(0,a.iv)(b||(b=(e=>e)`: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}.active-track,.circle,.left,.progress,.right,.spinner,.track,svg{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 .5s cubic-bezier(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:1.568s}.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) transparent transparent;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:-.666s,0s}@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)}}`));let g=class extends f{};g.styles=[y],g=(0,t.gn)([(0,i.Mo)("md-circular-progress")],g)}}]);
//# sourceMappingURL=6426.78778085a2463f48.js.map