/*! For license information please see 33970.61cf00e58eb4414a.js.LICENSE.txt */
export const __rspack_esm_id="33970";export const __rspack_esm_ids=["33970"];export const __webpack_modules__={11896(t,e,o){o.d(e,{u:()=>p});var a=o(62826),i=o(71714),r=o(96196),d=o(97735),n=o(94333),s=o(32288),l=o(60893);const h={fromAttribute:t=>null!==t&&(""===t||t),toAttribute:t=>"boolean"==typeof t?t?"":null:t};class p extends i.J{render(){const t=this.charCounter&&-1!==this.maxLength,e=t&&"internal"===this.charCounter,o=t&&!e,a=!!this.helper||!!this.validationMessage||o,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--end-aligned":this.endAligned,"mdc-text-field--with-internal-counter":e};return r.qy` <label class="mdc-text-field mdc-text-field--textarea ${(0,n.H)(i)}"> ${this.renderRipple()} ${this.outlined?this.renderOutline():this.renderLabel()} ${this.renderInput()} ${this.renderCharCounter(e)} ${this.renderLineRipple()} </label> ${this.renderHelperText(a,o)} `}renderInput(){const t=this.label?"label":void 0,e=-1===this.minLength?void 0:this.minLength,o=-1===this.maxLength?void 0:this.maxLength,a=this.autocapitalize?this.autocapitalize:void 0;return r.qy` <textarea aria-labelledby="${(0,s.J)(t)}" class="mdc-text-field__input" .value="${(0,l.V)(this.value)}" rows="${this.rows}" cols="${this.cols}" ?disabled="${this.disabled}" placeholder="${this.placeholder}" ?required="${this.required}" ?readonly="${this.readOnly}" minlength="${(0,s.J)(e)}" maxlength="${(0,s.J)(o)}" name="${(0,s.J)(""===this.name?void 0:this.name)}" inputmode="${(0,s.J)(this.inputMode)}" autocapitalize="${(0,s.J)(a)}" @input="${this.handleInputChange}" @blur="${this.onInputBlur}">
      </textarea>`}constructor(){super(...arguments),this.rows=2,this.cols=20,this.charCounter=!1}}(0,a.Cg)([(0,d.P)("textarea")],p.prototype,"formElement",void 0),(0,a.Cg)([(0,d.MZ)({type:Number})],p.prototype,"rows",void 0),(0,a.Cg)([(0,d.MZ)({type:Number})],p.prototype,"cols",void 0),(0,a.Cg)([(0,d.MZ)({converter:h})],p.prototype,"charCounter",void 0)},75057(t,e,o){o.d(e,{R:()=>a});const a=o(96196).AH`.mdc-text-field{height:100%}.mdc-text-field__input{resize:none}`},56304(t,e,o){var a=o(62826),i=o(11896),r=o(92347),d=o(75057),n=o(96196),s=o(97735);class l extends i.u{updated(t){super.updated(t),this.autogrow&&t.has("value")&&(this.mdcRoot.dataset.value=this.value+'=​"')}constructor(...t){super(...t),this.autogrow=!1}}l.styles=[r.R,d.R,n.AH`:host([autogrow]) .mdc-text-field{position:relative;min-height:74px;min-width:178px;max-height:200px}:host([autogrow]) .mdc-text-field:after{content:attr(data-value);margin-top:23px;margin-bottom:9px;line-height:var(--ha-line-height-normal);min-height:42px;padding:0px 32px 0 16px;letter-spacing:var(
          --mdc-typography-subtitle1-letter-spacing,
          .009375em
        );visibility:hidden;white-space:pre-wrap}:host([autogrow]) .mdc-text-field__input{position:absolute;height:calc(100% - 32px)}:host([autogrow]) .mdc-text-field.mdc-text-field--no-label:after{margin-top:16px;margin-bottom:16px}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start) top}@media only screen and (min-width:459px){:host([mobile-multiline]) .mdc-text-field__input{white-space:nowrap;max-height:16px}}`],(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],l.prototype,"autogrow",void 0),l=(0,a.Cg)([(0,s.EM)("ha-textarea")],l)},40169(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{DialogSupportPackage:()=>b});var i=o(62826),r=o(96196),d=o(97735),n=o(1087),s=o(38962),l=o(18350),h=(o(93444),o(69709),o(72554)),p=o(606),c=o(65829),u=(o(56304),o(71117)),g=o(30039),m=t([s,l,h,p,c]);[s,l,h,p,c]=m.then?(await m)():m;class b extends r.WF{showDialog(){this._open=!0,this._loadSupportPackage()}_dialogClosed(){this._open=!1,this._supportPackage=void 0,(0,n.r)(this,"dialog-closed",{dialog:this.localName})}closeDialog(){return this._open=!1,!0}render(){return r.qy` <ha-dialog .hass="${this.hass}" .open="${this._open}" width="full" header-title="Download support package" @closed="${this._dialogClosed}"> ${this._supportPackage?r.qy`<ha-markdown-element .content="${this._supportPackage}" breaks></ha-markdown-element>`:r.qy` <div class="progress-container"> <ha-spinner></ha-spinner> Generating preview... </div> `} <div slot="footer" class="footer"> <ha-alert> This file may contain personal data about your home. Avoid sharing them with unverified or untrusted parties. </ha-alert> <hr> <ha-dialog-footer> <ha-button slot="secondaryAction" appearance="plain" @click="${this.closeDialog}"> Close </ha-button> <ha-button slot="primaryAction" @click="${this._download}"> Download </ha-button> </ha-dialog-footer> </div> </ha-dialog> `}async _loadSupportPackage(){this._supportPackage=await(0,u.qF)(this.hass)}async _download(){(0,g.R)("data:text/plain;charset=utf-8,"+encodeURIComponent(this._supportPackage||""),"support-package.md")}constructor(...t){super(...t),this._open=!1}}b.styles=r.AH`.progress-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:calc(90vh - 260px);width:100%}.footer{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:var(--ha-space-3);width:100%}ha-dialog-footer{display:block;width:100%}hr{border:none;border-top:1px solid var(--divider-color);width:100%;margin:0}table,td,th{border:none}table{width:100%;display:table;border-collapse:collapse;border-spacing:0}table tr{border-bottom:none}table>tbody>tr:nth-child(odd){background-color:rgba(var(--rgb-primary-text-color),.04)}table>tbody>tr>td{border-radius:var(--ha-border-radius-square)}table>tbody>tr{-webkit-transition:background-color .25s ease;transition:background-color .25s ease}table>tbody>tr:hover{background-color:rgba(var(--rgb-primary-text-color),.08)}tr{border-bottom:1px solid var(--divider-color)}td,th{padding:15px 5px;display:table-cell;text-align:left;vertical-align:middle;border-radius:var(--ha-border-radius-sm)}details{background-color:var(--secondary-background-color);padding:16px 24px;margin:8px 0;border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-xl)}summary{font-weight:var(--ha-font-weight-bold);cursor:pointer}`,(0,i.Cg)([(0,d.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,i.Cg)([(0,d.wk)()],b.prototype,"_open",void 0),(0,i.Cg)([(0,d.wk)()],b.prototype,"_supportPackage",void 0),b=(0,i.Cg)([(0,d.EM)("dialog-cloud-support-package")],b),a()}catch(t){a(t)}})},30039(t,e,o){o.d(e,{R:()=>a});const a=(t,e="")=>{const o=document.createElement("a");o.target="_blank",o.href=t,o.download=e,o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click")),document.body.removeChild(o)}}};
//# sourceMappingURL=33970.61cf00e58eb4414a.js.map