"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[18469],{19106:function(t,o,e){e(74423),e(27495),e(21699),e(5746);var r,a=window.externalAppV2||window.externalApp||(null===(r=window.webkit)||void 0===r||null===(r=r.messageHandlers)||void 0===r?void 0:r.getExternalAuth)||location.search.includes("external_auth=1"),n=window.externalApp||window.externalAppV2;e.d(o,{B:function(){return n},g:function(){return a}})},22756:function(t,o,e){e.a(t,async function(t,r){try{e.r(o);var a,n,i,d,l=e(36854),s=e(98117),c=e(28430),u=e(57567),p=e(25979),h=e(12463),g=e(16472),b=(e(28706),e(26099),e(3362),e(15697)),v=e(57527),f=e(51209),k=e(148),y=e(88457),w=e(98747),m=(e(90507),e(80494),e(73651)),x=e(54939),A=e(15466),_=e(24396),C=e(36158),P=t([y,w,m,x,A]);[y,w,m,x,A]=P.then?(await P)():P;var R=function(t){function o(){var t;(0,u.A)(this,o);for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return(t=(0,g.A)(this,o,[].concat(r)))._open=!1,t}return(0,h.A)(o,t),(0,p.A)(o,[{key:"showDialog",value:function(){this._open=!0,this._loadSupportPackage()}},{key:"_dialogClosed",value:function(){this._open=!1,this._supportPackage=void 0,(0,k.r)(this,"dialog-closed",{dialog:this.localName})}},{key:"closeDialog",value:function(){return this._open=!1,!0}},{key:"render",value:function(){return(0,v.qy)(a||(a=(0,c.A)([" <ha-dialog .open=",' width="full" header-title="Download support package" @closed=',"> ",' <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=','> Close </ha-button> <ha-button slot="primaryAction" @click=',"> Download </ha-button> </ha-dialog-footer> </div> </ha-dialog> "])),this._open,this._dialogClosed,this._supportPackage?(0,v.qy)(n||(n=(0,c.A)(["<ha-markdown-element .content="," breaks></ha-markdown-element>"])),this._supportPackage):(0,v.qy)(i||(i=(0,c.A)([' <div class="progress-container"> <ha-spinner></ha-spinner> Generating preview... </div> ']))),this.closeDialog,this._download)}},{key:"_loadSupportPackage",value:(r=(0,s.A)((0,l.A)().m(function t(){return(0,l.A)().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,(0,_.qF)(this.hass);case 1:this._supportPackage=t.v;case 2:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"_download",value:(e=(0,s.A)((0,l.A)().m(function t(){return(0,l.A)().w(function(t){for(;;)switch(t.n){case 0:(0,C.R)("data:text/plain;charset=utf-8,"+encodeURIComponent(this._supportPackage||""),"support-package.md");case 1:return t.a(2)}},t,this)})),function(){return e.apply(this,arguments)})}]);var e,r}(v.WF);R.styles=(0,v.AH)(d||(d=(0,c.A)([".progress-container{flex-direction:column;justify-content:center;align-items:center;width:100%;height:calc(90vh - 260px);display:flex}.footer{justify-content:flex-start;align-items:stretch;gap:var(--ha-space-3);flex-direction:column;width:100%;display:flex}ha-dialog-footer{width:100%;display:block}hr{border:none;border-top:1px solid var(--divider-color);width:100%;margin:0}table,th,td{border:none}table{border-collapse:collapse;border-spacing:0;width:100%;display:table}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;transition:background-color .25s}table>tbody>tr:hover{background-color:rgba(var(--rgb-primary-text-color), .08)}tr{border-bottom:1px solid var(--divider-color)}td,th{text-align:left;vertical-align:middle;border-radius:var(--ha-border-radius-sm);padding:15px 5px;display:table-cell}details{background-color:var(--secondary-background-color);border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-xl);margin:8px 0;padding:16px 24px}summary{font-weight:var(--ha-font-weight-bold);cursor:pointer}"]))),(0,b.Cg)([(0,f.MZ)({attribute:!1})],R.prototype,"hass",void 0),(0,b.Cg)([(0,f.wk)()],R.prototype,"_open",void 0),(0,b.Cg)([(0,f.wk)()],R.prototype,"_supportPackage",void 0),R=(0,b.Cg)([(0,f.EM)("dialog-cloud-support-package")],R),e.d(o,{DialogSupportPackage:function(){return R}}),r()}catch(D){r(D)}})},36158:function(t,o,e){e(23792),e(26099),e(47764),e(11392),e(62953),e(3296),e(27208),e(48408),e(14603),e(47566),e(98721);var r=e(19106),a=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=document.createElement("a");e.target="_blank",e.href=t,e.download=o,e.style.display="none",document.body.appendChild(e),e.dispatchEvent(new MouseEvent("click")),document.body.removeChild(e),t.startsWith("blob:")&&(r.B?setTimeout(function(){return URL.revokeObjectURL(t)},1e4):URL.revokeObjectURL(t))};e.d(o,{R:function(){return a}})}}]);
//# sourceMappingURL=18469.72a756481c85b4d8.js.map