import {u as uG}from'./chunk-hC-VBPpw.js';import {H as Ht,F as Fi}from'./chunk-DCZsu2tZ.js';import {J,a5 as fh,a6 as pi,c as tS,a7 as si,aX as lt,aY as qp,H as ul,ag as lp,aZ as Dt,a_ as Oo,a$ as pe,U as RN,G as vl,b0 as W,ax as y,b1 as ie,b2 as v,b3 as w,al as Kv,bG as $e,aP as N,ah as ot,ak as Jd,bH as Jv,bI,w as wo,ac as Dr,b4 as Yt,b5 as HE,N as Sr,am as Dh,b6 as Yi,b7 as Po,b8 as eT,b9 as he,ab as LN,M as ie$1,ba as K,Y,aF as T,bb as se,bc as I,bd as K$1,f as QT,q as qu,g as xy,W as Wu,bu as dy,bv as Vy,bw as y_,bx as v_}from'./main-WUGO6e7n.js';import {O as Oe,b as bt}from'./chunk-De4L3Lrd.js';import {$ as $t,P as Pt}from'./chunk-D_waHSRh.js';import {u,p}from'./chunk-UwWT952T.js';import {z,m as me}from'./chunk-C1PKWB5e.js';import {C,b}from'./chunk-CfiJ14IU.js';import'./chunk-CQEWnNNf.js';import'./chunk-C1cNl4jV.js';import'./chunk-CEAqrwcG.js';import'./chunk-Ccvbn2BH.js';import'./chunk-DcA4pN5u.js';import'./chunk-CQ36K6Ah.js';import'./chunk-BRPXnOPq.js';import'./chunk-6zPu8Pcy.js';import'./chunk-BadIw3lc.js';import'./chunk-DEGgtmKK.js';import'./chunk-B-6eD0Fy.js';import'./chunk-dzqW61Sq.js';import'./chunk-4dNjMamm.js';import'./chunk-DTKExQCa.js';import'./chunk-Blf_arF2.js';import'./chunk-WwWRMY1v.js';import'./chunk-B7_1MEbK.js';import'./chunk-BDdknrPu.js';import'./chunk-D6e7-j30.js';import'./chunk-BkdNRDhV.js';import'./chunk-D5dt-Yno.js';import'./chunk-V1E1Bdyi.js';import'./chunk-KghqFjfJ.js';import'./chunk-DzpJSeDn.js';import'./chunk-CWfXzReb.js';import'./chunk-wP_7RXpA.js';import'./chunk-Bvm02P_B.js';import'./chunk-BzFwnrs7.js';import'./chunk-hsbyhxk9.js';var Ue,oi,We=J(()=>{Oe();uG();fh();pi();Ht();$t();tS();si();lt();u();qp();ul();lp();Dt();Oo();pe();RN();vl();W();y();z();ie();v();w();C();Ue=["webHyperVConsole"],oi=(()=>{class c extends bt{constructor(e,t,r,o,a,m,l,d,h,p,v,f,u,S,C,y,I,g,j,E){super(e,t,r,o,a,m,l,d,h,p,v,f,u,S,C,y,I,g,j,E),this.currentUserService=e,this.broadcastChannelService=t,this.logsService=r,this.connectionService=o,this.translatorService=a,this.assetService=m,this.messageService=l,this.titleService=d,this.renderer=h,this.connectionManager=p,this.dvlConfirmationService=v,this.route=f,this.commentDialogService=u,this.router=S,this.connectionNavigationService=C,this.globalPamService=y,this.actionConnectionService=I,this.longOperationIndicatorService=g,this.errorService=j,this.currentConnectionService=E,this.jetUrl=Fi.JET_POWERSHELL_URL;}getEventTerminal(e){return e.detail.hyperVService}getTerminalStatusEnum(){return Pt}getGatewayUrl(e){return e.getGatewayWebSocketUrl(this.jetUrl)}isCredentialPromptRequired(e){return Fi.isCredentialPromptRequiredStatic(e)}initSessionEventHandler(){if(!this.remoteTerminal){console.error("Remote terminal is not initialized.");return}try{this.remoteTerminal.onStatusChange(e=>this.handleSessionStatus(e));}catch(e){console.error("Error occurred while monitoring terminal status:",e);}}handleRecording(e){return Kv()}callConnect(e){return e.port=e.port??5985,$e(N(this,null,function*(){yield this.remoteTerminal.connect(Fi.mapConnectionParameters(e)),this.handleSessionStarted();})).pipe(ot(()=>e),Jd(r=>(console.error(r),Jv(()=>r))),bI(()=>{this.longOperationIndicatorService.hideIndicator();}))}handleSessionStatus(e){switch(e){case Pt.readyForConnection:case Pt.connected:break;case Pt.timeout:case Pt.failed:{this.handleSessionError(e);break}case Pt.terminated:case Pt.closed:{this.unsubscribeTerminalStatus(),this.handleSessionEnded(e);break}}}static{this.\u0275fac=function(t){return new(t||c)(wo(Dr),wo(Yt),wo(p),wo(HE),wo(Sr),wo(Dh),wo(Yi),wo(Po),wo(eT),wo(he),wo(LN),wo(ie$1),wo(K),wo(Y),wo(T),wo(me),wo(se),wo(I),wo(K$1),wo(b))};}static{this.\u0275cmp=QT({type:c,selectors:[["web-client-hyperv"]],viewQuery:function(t,r){if(t&1&&Vy(Ue,5),t&2){let o;y_(o=v_())&&(r.ironGuiElement=o.first);}},features:[dy],decls:3,vars:0,consts:[["webHyperVConsole",""],[1,"hyperv-container"],[1,"hyper-v-console"]],template:function(t,r){t&1&&(qu(0,"div",1),xy(1,"web-hyperv-console",2,0),Wu());},styles:[".hyperv-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%;position:absolute;inset:0}.hyper-v-console[_ngcontent-%COMP%]{flex:1;min-height:0;display:block;width:100%;height:100%}"],changeDetection:1});}}return c})();});We();export{oi as WebClientHypervComponent};