(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{X0fP:function(n,t,e){"use strict";e.r(t);var o=e("CcnG"),i=function(){return function(){console.log("loaded")}}(),r=e("pMnS"),s=e("buEt"),l=e("Gi3i"),c=e("Wb/s"),u=e("xVS5"),a=e("ldua"),d=e("+WIb");c.Terminal.applyAddon(u),c.Terminal.applyAddon(a);var m=function(){function n(n){this.$ws=n,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new c.Terminal,this.resize=new s.a}return n.prototype.ngOnInit=function(){var n=this;window.document.querySelector("body").classList.add("bg-black"),this.termTarget=document.getElementById("docker-terminal"),this.term.open(this.termTarget),this.term.fit(),this.term.webLinksInit(),this.io.connected.subscribe(function(){n.startTerminal()}),this.io.socket.on("disconnect",function(){n.term.write("\n\r\n\rTerminal disconnected. Is the server running?\n\r\n\r")}),this.resize.pipe(Object(l.a)(500)).subscribe(function(t){n.io.socket.emit("resize",t)}),this.io.socket.on("stdout",function(t){n.term.write(t)}),this.term.on("resize",function(t){n.resize.next(t)}),this.term.on("data",function(t){n.io.socket.emit("stdin",t)})},n.prototype.onWindowResize=function(n){this.term.fit()},n.prototype.startTerminal=function(){this.term.reset(),this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.resize.next({cols:this.term.cols,rows:this.term.rows}),this.term.focus()},n.prototype.ngOnDestroy=function(){window.document.querySelector("body").classList.remove("bg-black"),this.io.end(),this.term.dispose()},n}(),p=o["\u0275crt"]({encapsulation:2,styles:[],data:{}});function f(n){return o["\u0275vid"](0,[(n()(),o["\u0275eld"](0,0,null,null,1,"div",[["class","flex-column d-flex align-items-stretch h-100"]],null,null,null,null,null)),(n()(),o["\u0275eld"](1,0,null,null,0,"div",[["class","terminal align-self-end w-100 h-100 mb-1"],["id","docker-terminal"]],null,null,null,null,null))],null,null)}function h(n){return o["\u0275vid"](0,[(n()(),o["\u0275eld"](0,0,null,null,1,"app-terminal",[],null,[["window","resize"]],function(n,t,e){var i=!0;return"window:resize"===t&&(i=!1!==o["\u0275nov"](n,1).onWindowResize(e)&&i),i},f,p)),o["\u0275did"](1,245760,null,0,m,[d.a],null,null)],function(n,t){n(t,1,0)},null)}var w=o["\u0275ccf"]("app-terminal",m,h,{},{},[]),b=e("Ip0R"),g=e("ZYCi"),v=function(){return function(){}}();e.d(t,"TerminalModuleNgFactory",function(){return y});var y=o["\u0275cmf"](i,[],function(n){return o["\u0275mod"]([o["\u0275mpd"](512,o.ComponentFactoryResolver,o["\u0275CodegenComponentFactoryResolver"],[[8,[r.a,w]],[3,o.ComponentFactoryResolver],o.NgModuleRef]),o["\u0275mpd"](4608,b.NgLocalization,b.NgLocaleLocalization,[o.LOCALE_ID,[2,b["\u0275angular_packages_common_common_a"]]]),o["\u0275mpd"](1073742336,b.CommonModule,b.CommonModule,[]),o["\u0275mpd"](1073742336,g.p,g.p,[[2,g.u],[2,g.l]]),o["\u0275mpd"](1073742336,v,v,[]),o["\u0275mpd"](1073742336,i,i,[]),o["\u0275mpd"](1024,g.j,function(){return[[{path:"",component:m}]]},[])])})},ldua:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=new RegExp("(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,6}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?((\\/[\\/\\w\\.\\-%~:+]*)*([^:\"'\\s]))?(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)");function i(n,t){window.open(t,"_blank")}function r(n,t,e){void 0===t&&(t=i),void 0===e&&(e={}),e.matchIndex=1,n.registerLinkMatcher(o,t,e)}t.webLinksInit=r,t.apply=function(n){n.prototype.webLinksInit=function(n,t){r(this,n,t)}}}}]);