System.register(["./xterm-legacy-UzqSqzXt.js?v=1773287522785","./xterm-addon-canvas-legacy-Tys2uZOF.js?v=1773287522785","./useSocket-legacy-D9BDJ2id.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785"],(function(e,n){"use strict";var o,t,a,r,l,s,d,i,c,u,m,v,f,w,x;return{setters:[e=>{o=e.x,t=e.a,a=e.b,r=e.c},e=>{l=e.x},e=>{s=e.u},e=>{d=e.k,i=e.R,c=e.r,u=e.o,m=e.b,v=e.$,f=e.Z,w=e.n},e=>{x=e.b1}],execute:function(){var n=document.createElement("style");n.textContent=".drawer{display:none}.xterm{height:100%;padding:12px}.xterm .xterm-viewport{overflow:auto!important}\n/*$vite$:1*/",document.head.appendChild(n),e("_",d({__name:"index",props:{url:{default:"/ws_model"},data:{default:()=>[]}},emits:["message"],setup(e,{emit:n}){const d=e,g=n,{t:p}=i(),{ws:A,status:h,send:y,close:C}=s(d.url,{onMessage:(e,n)=>{const o=n.data;return g("message",o),o.indexOf("Authentication timeout.")>-1&&(k.value=!0),-1==o.indexOf("@127.0.0.1:")&&-1==o.indexOf("@localhost:")||-1==o.indexOf("Authentication failed")?"\\r\\nlogout\\r\\n"==o||"logout\\r\\n"==o||"\r\nlogout\r\n"==o||"logout\r\n"==o||o.search(/logout[\r\n]+$/)>-1?(b.write("\r"+p("Component.Terminal.index_1")+"\r"),z(),void C()):void 0:(C(),void z())}});let b,_;const k=c(!1),O=c(null),j=()=>{const e=A.value;e&&(b.loadAddon(_),b.loadAddon(new l.CanvasAddon),b.loadAddon(new a.WebLinksAddon),b.loadAddon(new r.AttachAddon(e)))},S=()=>{O.value&&b.open(O.value)};let $=!1;const z=()=>{$=!1},E=()=>{(()=>{const{data:e}=d;e.forEach((e=>{y(e)}))})(),b.focus(),b.onData((e=>{const n=A.value;"\r"===e&&k.value&&(k.value=!1,b.write("\r\n"),M()),null!==n||"\r"!==e||$||($=!0,b.write("\r\n"+p("Component.Terminal.index_2")+"\r\n"),M())}))},M=()=>{E();const e=A.value;e&&b.loadAddon(new r.AttachAddon(e))},R=()=>{w((()=>{if(_.fit(),"CLOSED"!==h.value){const{cols:e,rows:n}=b;y({cols:e,rows:n,resize:1})}}))};let T=!0;const D=new ResizeObserver((()=>{x((()=>{T?T=!1:R()}),200)()}));return u((()=>{b=new o.Terminal({cursorBlink:!0,fontSize:14,fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#333",foreground:"#ececec"}}),_=new t.FitAddon,j(),S(),E(),R(),(()=>{const e=O.value;e&&D.observe(e)})()})),m((()=>{C(),D?.disconnect(),b?.dispose()})),(e,n)=>(v(),f("div",{ref_key:"terminalRef",ref:O,class:"w-full h-full"},null,512))}}))}}}));
