export const __rspack_esm_id="33970";export const __rspack_esm_ids=["33970"];export const __webpack_modules__={56304(t,o,a){var e=a(62826),r=a(99199),i=a(92347),d=a(75057),s=a(96196),n=a(97735);class l extends r.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=[i.R,d.R,s.AH`:host{--mdc-text-field-fill-color:var(--ha-color-form-background)}: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,e.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],l.prototype,"autogrow",void 0),l=(0,e.Cg)([(0,n.EM)("ha-textarea")],l)},40169(t,o,a){a.a(t,async function(t,e){try{a.r(o),a.d(o,{DialogSupportPackage:()=>b});var r=a(62826),i=a(96196),d=a(97735),s=a(1087),n=a(38962),l=a(18350),p=(a(93444),a(69709),a(72554)),c=a(606),h=a(65829),g=(a(56304),a(71117)),u=a(30039),m=t([n,l,p,c,h]);[n,l,p,c,h]=m.then?(await m)():m;class b extends i.WF{showDialog(){this._open=!0,this._loadSupportPackage()}_dialogClosed(){this._open=!1,this._supportPackage=void 0,(0,s.r)(this,"dialog-closed",{dialog:this.localName})}closeDialog(){return this._open=!1,!0}render(){return i.qy` <ha-dialog .hass="${this.hass}" .open="${this._open}" width="full" header-title="Download support package" @closed="${this._dialogClosed}"> ${this._supportPackage?i.qy`<ha-markdown-element .content="${this._supportPackage}" breaks></ha-markdown-element>`:i.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,g.qF)(this.hass)}async _download(){(0,u.R)("data:text/plain;charset=utf-8,"+encodeURIComponent(this._supportPackage||""),"support-package.md")}constructor(...t){super(...t),this._open=!1}}b.styles=i.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,r.Cg)([(0,d.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,r.Cg)([(0,d.wk)()],b.prototype,"_open",void 0),(0,r.Cg)([(0,d.wk)()],b.prototype,"_supportPackage",void 0),b=(0,r.Cg)([(0,d.EM)("dialog-cloud-support-package")],b),e()}catch(t){e(t)}})},30039(t,o,a){a.d(o,{R:()=>e});const e=(t,o="")=>{const a=document.createElement("a");a.target="_blank",a.href=t,a.download=o,a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a)}}};
//# sourceMappingURL=33970.bc92cf1f01bfe4f8.js.map