(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("@angular/core"), require("@angular/common"), require("@angular/forms"), require("@ng-bootstrap/ng-bootstrap"), require("ngx-toastr"), require("tabby-core"), require("tabby-terminal"), (function webpackLoadOptionalExternalModule() { try { return require("fs"); } catch(e) {} }()), require("net"), require("rxjs"));
	else if(typeof define === 'function' && define.amd)
		define(["@angular/core", "@angular/common", "@angular/forms", "@ng-bootstrap/ng-bootstrap", "ngx-toastr", "tabby-core", "tabby-terminal", "fs", "net", "rxjs"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("@angular/core"), require("@angular/common"), require("@angular/forms"), require("@ng-bootstrap/ng-bootstrap"), require("ngx-toastr"), require("tabby-core"), require("tabby-terminal"), (function webpackLoadOptionalExternalModule() { try { return require("fs"); } catch(e) {} }()), require("net"), require("rxjs")) : factory(root["@angular/core"], root["@angular/common"], root["@angular/forms"], root["@ng-bootstrap/ng-bootstrap"], root["ngx-toastr"], root["tabby-core"], root["tabby-terminal"], root["fs"], root["net"], root["rxjs"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(global, (__WEBPACK_EXTERNAL_MODULE__900__, __WEBPACK_EXTERNAL_MODULE__848__, __WEBPACK_EXTERNAL_MODULE__161__, __WEBPACK_EXTERNAL_MODULE__571__, __WEBPACK_EXTERNAL_MODULE__170__, __WEBPACK_EXTERNAL_MODULE__315__, __WEBPACK_EXTERNAL_MODULE__316__, __WEBPACK_EXTERNAL_MODULE__89__, __WEBPACK_EXTERNAL_MODULE__548__, __WEBPACK_EXTERNAL_MODULE__832__) => {
return /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 613:
/*!************************************************************!*\
  !*** ./src/components/telnetTab.component.scss?ngResource ***!
  \************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./telnetTab.component.scss?ngResource */ 406);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ }),

/***/ 401:
/*!***********************************************************************!*\
  !*** ./src/components/telnetProfileSettings.component.pug?ngResource ***!
  \***********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[3].use[1]!./src/components/telnetProfileSettings.component.pug?ngResource */ 206);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 88:
/*!************************************************!*\
  !*** ./src/components/telnetTab.component.pug ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js??ruleSet[1].rules[3].use[1]!./src/components/telnetTab.component.pug */ 147);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 368:
/*!***********************************************!*\
  !*** ../app/node_modules/ansi-regex/index.js ***!
  \***********************************************/
/***/ ((module) => {

"use strict";


module.exports = ({
  onlyFirst = false
} = {}) => {
  const pattern = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'].join('|');
  return new RegExp(pattern, onlyFirst ? undefined : 'g');
};

/***/ }),

/***/ 752:
/*!********************************************************!*\
  !*** ../app/node_modules/filesize/lib/filesize.min.js ***!
  \********************************************************/
/***/ (function(module) {

/*!
 2022 Jason Mulligan <jason.mulligan@avoidwork.com>
 @version 9.0.11
*/
!function (i, t) {
   true ? module.exports = t() : 0;
}(this, function () {
  "use strict";

  function i(t) {
    return i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (i) {
      return typeof i;
    } : function (i) {
      return i && "function" == typeof Symbol && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
    }, i(t);
  }
  var t = "array",
    o = "bits",
    e = "byte",
    n = "bytes",
    r = "",
    b = "exponent",
    l = "function",
    a = "iec",
    d = "Invalid number",
    f = "Invalid rounding method",
    u = "jedec",
    s = "object",
    c = ".",
    p = "round",
    y = "kbit",
    m = "string",
    v = {
      symbol: {
        iec: {
          bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"],
          bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
        },
        jedec: {
          bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"],
          bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
        }
      },
      fullform: {
        iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"],
        jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
      }
    };
  function g(g) {
    var h = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
      B = h.bits,
      M = void 0 !== B && B,
      S = h.pad,
      T = void 0 !== S && S,
      w = h.base,
      x = void 0 === w ? -1 : w,
      E = h.round,
      j = void 0 === E ? 2 : E,
      N = h.locale,
      P = void 0 === N ? r : N,
      k = h.localeOptions,
      G = void 0 === k ? {} : k,
      K = h.separator,
      Y = void 0 === K ? r : K,
      Z = h.spacer,
      z = void 0 === Z ? " " : Z,
      I = h.symbols,
      L = void 0 === I ? {} : I,
      O = h.standard,
      q = void 0 === O ? r : O,
      A = h.output,
      C = void 0 === A ? m : A,
      D = h.fullform,
      F = void 0 !== D && D,
      H = h.fullforms,
      J = void 0 === H ? [] : H,
      Q = h.exponent,
      R = void 0 === Q ? -1 : Q,
      U = h.roundingMethod,
      V = void 0 === U ? p : U,
      W = h.precision,
      X = void 0 === W ? 0 : W,
      $ = R,
      _ = Number(g),
      ii = [],
      ti = 0,
      oi = r;
    -1 === x && 0 === q.length ? (x = 10, q = u) : -1 === x && q.length > 0 ? x = (q = q === a ? a : u) === a ? 2 : 10 : q = 10 === (x = 2 === x ? 2 : 10) || q === u ? u : a;
    var ei = 10 === x ? 1e3 : 1024,
      ni = !0 === F,
      ri = _ < 0,
      bi = Math[V];
    if (isNaN(g)) throw new TypeError(d);
    if (i(bi) !== l) throw new TypeError(f);
    if (ri && (_ = -_), (-1 === $ || isNaN($)) && ($ = Math.floor(Math.log(_) / Math.log(ei))) < 0 && ($ = 0), $ > 8 && (X > 0 && (X += 8 - $), $ = 8), C === b) return $;
    if (0 === _) ii[0] = 0, oi = ii[1] = v.symbol[q][M ? o : n][$];else {
      ti = _ / (2 === x ? Math.pow(2, 10 * $) : Math.pow(1e3, $)), M && (ti *= 8) >= ei && $ < 8 && (ti /= ei, $++);
      var li = Math.pow(10, $ > 0 ? j : 0);
      ii[0] = bi(ti * li) / li, ii[0] === ei && $ < 8 && -1 === R && (ii[0] = 1, $++), oi = ii[1] = 10 === x && 1 === $ ? M ? y : "kB" : v.symbol[q][M ? o : n][$];
    }
    if (ri && (ii[0] = -ii[0]), X > 0 && (ii[0] = ii[0].toPrecision(X)), ii[1] = L[ii[1]] || ii[1], !0 === P ? ii[0] = ii[0].toLocaleString() : P.length > 0 ? ii[0] = ii[0].toLocaleString(P, G) : Y.length > 0 && (ii[0] = ii[0].toString().replace(c, Y)), T && !1 === Number.isInteger(ii[0]) && j > 0) {
      var ai = Y || c,
        di = ii[0].toString().split(ai),
        fi = di[1] || r,
        ui = fi.length,
        si = j - ui;
      ii[0] = "".concat(di[0]).concat(ai).concat(fi.padEnd(ui + si, "0"));
    }
    return ni && (ii[1] = J[$] ? J[$] : v.fullform[q][$] + (M ? "bit" : e) + (1 === ii[0] ? r : "s")), C === t ? ii : C === s ? {
      value: ii[0],
      symbol: ii[1],
      exponent: $,
      unit: oi
    } : ii.join(z);
  }
  return g.partial = function (i) {
    return function (t) {
      return g(t, i);
    };
  }, g;
});

/***/ }),

/***/ 907:
/*!***********************************************!*\
  !*** ../app/node_modules/strip-ansi/index.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var ansiRegex = __webpack_require__(/*! ansi-regex */ 368)();
module.exports = function (str) {
  return typeof str === 'string' ? str.replace(ansiRegex, '') : str;
};

/***/ }),

/***/ 529:
/*!******************************************************!*\
  !*** ../node_modules/css-loader/dist/runtime/api.js ***!
  \******************************************************/
/***/ ((module) => {

"use strict";


/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/
module.exports = function (cssWithMappingToString) {
  var list = [];

  // return the list of modules as css string
  list.toString = function toString() {
    return this.map(function (item) {
      var content = "";
      var needLayer = typeof item[5] !== "undefined";
      if (item[4]) {
        content += "@supports (".concat(item[4], ") {");
      }
      if (item[2]) {
        content += "@media ".concat(item[2], " {");
      }
      if (needLayer) {
        content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
      }
      content += cssWithMappingToString(item);
      if (needLayer) {
        content += "}";
      }
      if (item[2]) {
        content += "}";
      }
      if (item[4]) {
        content += "}";
      }
      return content;
    }).join("");
  };

  // import a list of modules into the list
  list.i = function i(modules, media, dedupe, supports, layer) {
    if (typeof modules === "string") {
      modules = [[null, modules, undefined]];
    }
    var alreadyImportedModules = {};
    if (dedupe) {
      for (var k = 0; k < this.length; k++) {
        var id = this[k][0];
        if (id != null) {
          alreadyImportedModules[id] = true;
        }
      }
    }
    for (var _k = 0; _k < modules.length; _k++) {
      var item = [].concat(modules[_k]);
      if (dedupe && alreadyImportedModules[item[0]]) {
        continue;
      }
      if (typeof layer !== "undefined") {
        if (typeof item[5] === "undefined") {
          item[5] = layer;
        } else {
          item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
          item[5] = layer;
        }
      }
      if (media) {
        if (!item[2]) {
          item[2] = media;
        } else {
          item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
          item[2] = media;
        }
      }
      if (supports) {
        if (!item[4]) {
          item[4] = "".concat(supports);
        } else {
          item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
          item[4] = supports;
        }
      }
      list.push(item);
    }
  };
  return list;
};

/***/ }),

/***/ 230:
/*!*************************************************************!*\
  !*** ../node_modules/css-loader/dist/runtime/sourceMaps.js ***!
  \*************************************************************/
/***/ ((module) => {

"use strict";


module.exports = function (item) {
  var content = item[1];
  var cssMapping = item[3];
  if (!cssMapping) {
    return content;
  }
  if (typeof btoa === "function") {
    var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
    var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
    var sourceMapping = "/*# ".concat(data, " */");
    return [content].concat([sourceMapping]).join("\n");
  }
  return [content].join("\n");
};

/***/ }),

/***/ 596:
/*!*******************************************!*\
  !*** ./node_modules/ansi-colors/index.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);

/* eslint-disable no-control-regex */
// this is a modified version of https://github.com/chalk/ansi-regex (MIT License)
const ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g;
const hasColor = () => {
  if (typeof process !== 'undefined') {
    return process.env.FORCE_COLOR !== '0';
  }
  return false;
};
const create = () => {
  const colors = {
    enabled: hasColor(),
    visible: true,
    styles: {},
    keys: {}
  };
  const ansi = style => {
    let open = style.open = `\u001b[${style.codes[0]}m`;
    let close = style.close = `\u001b[${style.codes[1]}m`;
    let regex = style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g');
    style.wrap = (input, newline) => {
      if (input.includes(close)) input = input.replace(regex, close + open);
      let output = open + input + close;
      // see https://github.com/chalk/chalk/pull/92, thanks to the
      // chalk contributors for this fix. However, we've confirmed that
      // this issue is also present in Windows terminals
      return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output;
    };
    return style;
  };
  const wrap = (style, input, newline) => {
    return typeof style === 'function' ? style(input) : style.wrap(input, newline);
  };
  const style = (input, stack) => {
    if (input === '' || input == null) return '';
    if (colors.enabled === false) return input;
    if (colors.visible === false) return '';
    let str = '' + input;
    let nl = str.includes('\n');
    let n = stack.length;
    if (n > 0 && stack.includes('unstyle')) {
      stack = [...new Set(['unstyle', ...stack])].reverse();
    }
    while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl);
    return str;
  };
  const define = (name, codes, type) => {
    colors.styles[name] = ansi({
      name,
      codes
    });
    let keys = colors.keys[type] || (colors.keys[type] = []);
    keys.push(name);
    Reflect.defineProperty(colors, name, {
      configurable: true,
      enumerable: true,
      set(value) {
        colors.alias(name, value);
      },
      get() {
        let color = input => style(input, color.stack);
        Reflect.setPrototypeOf(color, colors);
        color.stack = this.stack ? this.stack.concat(name) : [name];
        return color;
      }
    });
  };
  define('reset', [0, 0], 'modifier');
  define('bold', [1, 22], 'modifier');
  define('dim', [2, 22], 'modifier');
  define('italic', [3, 23], 'modifier');
  define('underline', [4, 24], 'modifier');
  define('inverse', [7, 27], 'modifier');
  define('hidden', [8, 28], 'modifier');
  define('strikethrough', [9, 29], 'modifier');
  define('black', [30, 39], 'color');
  define('red', [31, 39], 'color');
  define('green', [32, 39], 'color');
  define('yellow', [33, 39], 'color');
  define('blue', [34, 39], 'color');
  define('magenta', [35, 39], 'color');
  define('cyan', [36, 39], 'color');
  define('white', [37, 39], 'color');
  define('gray', [90, 39], 'color');
  define('grey', [90, 39], 'color');
  define('bgBlack', [40, 49], 'bg');
  define('bgRed', [41, 49], 'bg');
  define('bgGreen', [42, 49], 'bg');
  define('bgYellow', [43, 49], 'bg');
  define('bgBlue', [44, 49], 'bg');
  define('bgMagenta', [45, 49], 'bg');
  define('bgCyan', [46, 49], 'bg');
  define('bgWhite', [47, 49], 'bg');
  define('blackBright', [90, 39], 'bright');
  define('redBright', [91, 39], 'bright');
  define('greenBright', [92, 39], 'bright');
  define('yellowBright', [93, 39], 'bright');
  define('blueBright', [94, 39], 'bright');
  define('magentaBright', [95, 39], 'bright');
  define('cyanBright', [96, 39], 'bright');
  define('whiteBright', [97, 39], 'bright');
  define('bgBlackBright', [100, 49], 'bgBright');
  define('bgRedBright', [101, 49], 'bgBright');
  define('bgGreenBright', [102, 49], 'bgBright');
  define('bgYellowBright', [103, 49], 'bgBright');
  define('bgBlueBright', [104, 49], 'bgBright');
  define('bgMagentaBright', [105, 49], 'bgBright');
  define('bgCyanBright', [106, 49], 'bgBright');
  define('bgWhiteBright', [107, 49], 'bgBright');
  colors.ansiRegex = ANSI_REGEX;
  colors.hasColor = colors.hasAnsi = str => {
    colors.ansiRegex.lastIndex = 0;
    return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str);
  };
  colors.alias = (name, color) => {
    let fn = typeof color === 'string' ? colors[color] : color;
    if (typeof fn !== 'function') {
      throw new TypeError('Expected alias to be the name of an existing color (string) or a function');
    }
    if (!fn.stack) {
      Reflect.defineProperty(fn, 'name', {
        value: name
      });
      colors.styles[name] = fn;
      fn.stack = [name];
    }
    Reflect.defineProperty(colors, name, {
      configurable: true,
      enumerable: true,
      set(value) {
        colors.alias(name, value);
      },
      get() {
        let color = input => style(input, color.stack);
        Reflect.setPrototypeOf(color, colors);
        color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack;
        return color;
      }
    });
  };
  colors.theme = custom => {
    if (!isObject(custom)) throw new TypeError('Expected theme to be an object');
    for (let name of Object.keys(custom)) {
      colors.alias(name, custom[name]);
    }
    return colors;
  };
  colors.alias('unstyle', str => {
    if (typeof str === 'string' && str !== '') {
      colors.ansiRegex.lastIndex = 0;
      return str.replace(colors.ansiRegex, '');
    }
    return '';
  });
  colors.alias('noop', str => str);
  colors.none = colors.clear = colors.noop;
  colors.stripColor = colors.unstyle;
  colors.symbols = __webpack_require__(/*! ./symbols */ 569);
  colors.define = define;
  return colors;
};
module.exports = create();
module.exports.create = create;

/***/ }),

/***/ 569:
/*!*********************************************!*\
  !*** ./node_modules/ansi-colors/symbols.js ***!
  \*********************************************/
/***/ ((module) => {

"use strict";


const isHyper = typeof process !== 'undefined' && process.env.TERM_PROGRAM === 'Hyper';
const isWindows = typeof process !== 'undefined' && process.platform === 'win32';
const isLinux = typeof process !== 'undefined' && process.platform === 'linux';
const common = {
  ballotDisabled: '☒',
  ballotOff: '☐',
  ballotOn: '☑',
  bullet: '•',
  bulletWhite: '◦',
  fullBlock: '█',
  heart: '❤',
  identicalTo: '≡',
  line: '─',
  mark: '※',
  middot: '·',
  minus: '－',
  multiplication: '×',
  obelus: '÷',
  pencilDownRight: '✎',
  pencilRight: '✏',
  pencilUpRight: '✐',
  percent: '%',
  pilcrow2: '❡',
  pilcrow: '¶',
  plusMinus: '±',
  question: '?',
  section: '§',
  starsOff: '☆',
  starsOn: '★',
  upDownArrow: '↕'
};
const windows = Object.assign({}, common, {
  check: '√',
  cross: '×',
  ellipsisLarge: '...',
  ellipsis: '...',
  info: 'i',
  questionSmall: '?',
  pointer: '>',
  pointerSmall: '»',
  radioOff: '( )',
  radioOn: '(*)',
  warning: '‼'
});
const other = Object.assign({}, common, {
  ballotCross: '✘',
  check: '✔',
  cross: '✖',
  ellipsisLarge: '⋯',
  ellipsis: '…',
  info: 'ℹ',
  questionFull: '？',
  questionSmall: '﹖',
  pointer: isLinux ? '▸' : '❯',
  pointerSmall: isLinux ? '‣' : '›',
  radioOff: '◯',
  radioOn: '◉',
  warning: '⚠'
});
module.exports = isWindows && !isHyper ? windows : other;
Reflect.defineProperty(module.exports, 'common', {
  enumerable: false,
  value: common
});
Reflect.defineProperty(module.exports, 'windows', {
  enumerable: false,
  value: windows
});
Reflect.defineProperty(module.exports, 'other', {
  enumerable: false,
  value: other
});

/***/ }),

/***/ 406:
/*!*******************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/telnetTab.component.scss?ngResource ***!
  \*******************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 230);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 529);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, "sftp-panel{position:absolute;height:80%;width:100%;bottom:0;z-index:5}", "",{"version":3,"sources":["webpack://./../tabby-ssh/src/components/sshTab.component.scss"],"names":[],"mappings":"AAAA,WACI,iBAAA,CACA,UAAA,CACA,UAAA,CACA,QAAA,CACA,SAAA","sourcesContent":["sftp-panel {\n    position: absolute;\n    height: 80%;\n    width: 100%;\n    bottom: 0;\n    z-index: 5;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 206:
/*!***************************************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[3].use[1]!./src/components/telnetProfileSettings.component.pug?ngResource ***!
  \***************************************************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 757);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cul class=\"nav-tabs\" ngbNav #nav=\"ngbNav\"\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003EGeneral\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Cdiv class=\"mb-3\"\u003E\n        \u003Clabel translate\u003EHost\u003C\u002Flabel\u003E\n        \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"profile.options.host\"\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"mb-3\"\u003E\n        \u003Clabel translate\u003EPort\u003C\u002Flabel\u003E\n        \u003Cinput class=\"form-control\" type=\"number\" placeholder=\"22\" [(ngModel)]=\"profile.options.port\"\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cstream-processing-settings [options]=\"profile.options\"\u003E\u003C\u002Fstream-processing-settings\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003ELogin scripts\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Clogin-scripts-settings [options]=\"profile.options\"\u003E\u003C\u002Flogin-scripts-settings\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003EInput\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Cinput-processing-settings [options]=\"profile.options.input\"\u003E\u003C\u002Finput-processing-settings\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n\u003C\u002Ful\u003E\n\u003Cdiv [ngbNavOutlet]=\"nav\"\u003E\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 147:
/*!****************************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js??ruleSet[1].rules[3].use[1]!./src/components/telnetTab.component.pug ***!
  \****************************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 757);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cterminal-toolbar [tab]=\"this\"\u003E\u003Ci class=\"fas fa-xs fa-circle text-success me-2\" *ngIf=\"session &amp;&amp; session.open\"\u003E\u003C\u002Fi\u003E\u003Ci class=\"fas fa-xs fa-circle text-danger me-2\" *ngIf=\"!session || !session.open\"\u003E\u003C\u002Fi\u003E\u003Cstrong class=\"me-auto\"\u003E{{profile.options.host}}:{{profile.options.port}}\u003C\u002Fstrong\u003E\n  \u003Cbutton class=\"btn btn-sm btn-link me-2\" (click)=\"reconnect()\"\u003E\u003Ci class=\"fas fa-redo\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EReconnect\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n\u003C\u002Fterminal-toolbar\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 757:
/*!********************************************!*\
  !*** ../node_modules/pug-runtime/index.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var pug_has_own_property = Object.prototype.hasOwnProperty;

/**
 * Merge two attribute objects giving precedence
 * to values in object `b`. Classes are special-cased
 * allowing for arrays and merging/joining appropriately
 * resulting in a string.
 *
 * @param {Object} a
 * @param {Object} b
 * @return {Object} a
 * @api private
 */

exports.merge = pug_merge;
function pug_merge(a, b) {
  if (arguments.length === 1) {
    var attrs = a[0];
    for (var i = 1; i < a.length; i++) {
      attrs = pug_merge(attrs, a[i]);
    }
    return attrs;
  }

  for (var key in b) {
    if (key === 'class') {
      var valA = a[key] || [];
      a[key] = (Array.isArray(valA) ? valA : [valA]).concat(b[key] || []);
    } else if (key === 'style') {
      var valA = pug_style(a[key]);
      valA = valA && valA[valA.length - 1] !== ';' ? valA + ';' : valA;
      var valB = pug_style(b[key]);
      valB = valB && valB[valB.length - 1] !== ';' ? valB + ';' : valB;
      a[key] = valA + valB;
    } else {
      a[key] = b[key];
    }
  }

  return a;
}

/**
 * Process array, object, or string as a string of classes delimited by a space.
 *
 * If `val` is an array, all members of it and its subarrays are counted as
 * classes. If `escaping` is an array, then whether or not the item in `val` is
 * escaped depends on the corresponding item in `escaping`. If `escaping` is
 * not an array, no escaping is done.
 *
 * If `val` is an object, all the keys whose value is truthy are counted as
 * classes. No escaping is done.
 *
 * If `val` is a string, it is counted as a class. No escaping is done.
 *
 * @param {(Array.<string>|Object.<string, boolean>|string)} val
 * @param {?Array.<string>} escaping
 * @return {String}
 */
exports.classes = pug_classes;
function pug_classes_array(val, escaping) {
  var classString = '',
    className,
    padding = '',
    escapeEnabled = Array.isArray(escaping);
  for (var i = 0; i < val.length; i++) {
    className = pug_classes(val[i]);
    if (!className) continue;
    escapeEnabled && escaping[i] && (className = pug_escape(className));
    classString = classString + padding + className;
    padding = ' ';
  }
  return classString;
}
function pug_classes_object(val) {
  var classString = '',
    padding = '';
  for (var key in val) {
    if (key && val[key] && pug_has_own_property.call(val, key)) {
      classString = classString + padding + key;
      padding = ' ';
    }
  }
  return classString;
}
function pug_classes(val, escaping) {
  if (Array.isArray(val)) {
    return pug_classes_array(val, escaping);
  } else if (val && typeof val === 'object') {
    return pug_classes_object(val);
  } else {
    return val || '';
  }
}

/**
 * Convert object or string to a string of CSS styles delimited by a semicolon.
 *
 * @param {(Object.<string, string>|string)} val
 * @return {String}
 */

exports.style = pug_style;
function pug_style(val) {
  if (!val) return '';
  if (typeof val === 'object') {
    var out = '';
    for (var style in val) {
      /* istanbul ignore else */
      if (pug_has_own_property.call(val, style)) {
        out = out + style + ':' + val[style] + ';';
      }
    }
    return out;
  } else {
    return val + '';
  }
}

/**
 * Render the given attribute.
 *
 * @param {String} key
 * @param {String} val
 * @param {Boolean} escaped
 * @param {Boolean} terse
 * @return {String}
 */
exports.attr = pug_attr;
function pug_attr(key, val, escaped, terse) {
  if (
    val === false ||
    val == null ||
    (!val && (key === 'class' || key === 'style'))
  ) {
    return '';
  }
  if (val === true) {
    return ' ' + (terse ? key : key + '="' + key + '"');
  }
  var type = typeof val;
  if (
    (type === 'object' || type === 'function') &&
    typeof val.toJSON === 'function'
  ) {
    val = val.toJSON();
  }
  if (typeof val !== 'string') {
    val = JSON.stringify(val);
    if (!escaped && val.indexOf('"') !== -1) {
      return ' ' + key + "='" + val.replace(/'/g, '&#39;') + "'";
    }
  }
  if (escaped) val = pug_escape(val);
  return ' ' + key + '="' + val + '"';
}

/**
 * Render the given attributes object.
 *
 * @param {Object} obj
 * @param {Object} terse whether to use HTML5 terse boolean attributes
 * @return {String}
 */
exports.attrs = pug_attrs;
function pug_attrs(obj, terse) {
  var attrs = '';

  for (var key in obj) {
    if (pug_has_own_property.call(obj, key)) {
      var val = obj[key];

      if ('class' === key) {
        val = pug_classes(val);
        attrs = pug_attr(key, val, false, terse) + attrs;
        continue;
      }
      if ('style' === key) {
        val = pug_style(val);
      }
      attrs += pug_attr(key, val, false, terse);
    }
  }

  return attrs;
}

/**
 * Escape the given string of `html`.
 *
 * @param {String} html
 * @return {String}
 * @api private
 */

var pug_match_html = /["&<>]/;
exports.escape = pug_escape;
function pug_escape(_html) {
  var html = '' + _html;
  var regexResult = pug_match_html.exec(html);
  if (!regexResult) return _html;

  var result = '';
  var i, lastIndex, escape;
  for (i = regexResult.index, lastIndex = 0; i < html.length; i++) {
    switch (html.charCodeAt(i)) {
      case 34:
        escape = '&quot;';
        break;
      case 38:
        escape = '&amp;';
        break;
      case 60:
        escape = '&lt;';
        break;
      case 62:
        escape = '&gt;';
        break;
      default:
        continue;
    }
    if (lastIndex !== i) result += html.substring(lastIndex, i);
    lastIndex = i + 1;
    result += escape;
  }
  if (lastIndex !== i) return result + html.substring(lastIndex, i);
  else return result;
}

/**
 * Re-throw the given `err` in context to the
 * the pug in `filename` at the given `lineno`.
 *
 * @param {Error} err
 * @param {String} filename
 * @param {String} lineno
 * @param {String} str original source
 * @api private
 */

exports.rethrow = pug_rethrow;
function pug_rethrow(err, filename, lineno, str) {
  if (!(err instanceof Error)) throw err;
  if ((typeof window != 'undefined' || !filename) && !str) {
    err.message += ' on line ' + lineno;
    throw err;
  }
  var context, lines, start, end;
  try {
    str = str || (__webpack_require__(/*! fs */ 89).readFileSync)(filename, {encoding: 'utf8'});
    context = 3;
    lines = str.split('\n');
    start = Math.max(lineno - context, 0);
    end = Math.min(lines.length, lineno + context);
  } catch (ex) {
    err.message +=
      ' - could not read from ' + filename + ' (' + ex.message + ')';
    pug_rethrow(err, null, lineno);
    return;
  }

  // Error context
  context = lines
    .slice(start, end)
    .map(function(line, i) {
      var curr = i + start + 1;
      return (curr == lineno ? '  > ' : '    ') + curr + '| ' + line;
    })
    .join('\n');

  // Alter exception message
  err.path = filename;
  try {
    err.message =
      (filename || 'Pug') +
      ':' +
      lineno +
      '\n' +
      context +
      '\n\n' +
      err.message;
  } catch (e) {}
  throw err;
}


/***/ }),

/***/ 848:
/*!**********************************!*\
  !*** external "@angular/common" ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__848__;

/***/ }),

/***/ 900:
/*!********************************!*\
  !*** external "@angular/core" ***!
  \********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__900__;

/***/ }),

/***/ 161:
/*!*********************************!*\
  !*** external "@angular/forms" ***!
  \*********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__161__;

/***/ }),

/***/ 571:
/*!*********************************************!*\
  !*** external "@ng-bootstrap/ng-bootstrap" ***!
  \*********************************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__571__;

/***/ }),

/***/ 89:
/*!*********************!*\
  !*** external "fs" ***!
  \*********************/
/***/ ((module) => {

"use strict";
if(typeof __WEBPACK_EXTERNAL_MODULE__89__ === 'undefined') { var e = new Error("Cannot find module 'fs'"); e.code = 'MODULE_NOT_FOUND'; throw e; }

module.exports = __WEBPACK_EXTERNAL_MODULE__89__;

/***/ }),

/***/ 548:
/*!**********************!*\
  !*** external "net" ***!
  \**********************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__548__;

/***/ }),

/***/ 170:
/*!*****************************!*\
  !*** external "ngx-toastr" ***!
  \*****************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__170__;

/***/ }),

/***/ 832:
/*!***********************!*\
  !*** external "rxjs" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__832__;

/***/ }),

/***/ 315:
/*!*****************************!*\
  !*** external "tabby-core" ***!
  \*****************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__315__;

/***/ }),

/***/ 316:
/*!*********************************!*\
  !*** external "tabby-terminal" ***!
  \*********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__316__;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			id: moduleId,
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/*!***********************************!*\
  !*** ./src/index.ts + 10 modules ***!
  \***********************************/
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": () => (/* binding */ src)
});

;// CONCATENATED MODULE: ../app/node_modules/tslib/tslib.es6.js
/******************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */

var extendStatics = function (d, b) {
  extendStatics = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (d, b) {
    d.__proto__ = b;
  } || function (d, b) {
    for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
  };
  return extendStatics(d, b);
};
function __extends(d, b) {
  if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics(d, b);
  function __() {
    this.constructor = d;
  }
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function () {
  __assign = Object.assign || function __assign(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
    }
    return t;
  };
  return __assign.apply(this, arguments);
};
function __rest(s, e) {
  var t = {};
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  }
  return t;
}
function __decorate(decorators, target, key, desc) {
  var c = arguments.length,
    r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
    d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
  return function (target, key) {
    decorator(target, key, paramIndex);
  };
}
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
  function accept(f) {
    if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
    return f;
  }
  var kind = contextIn.kind,
    key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
  var _,
    done = false;
  for (var i = decorators.length - 1; i >= 0; i--) {
    var context = {};
    for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
    for (var p in contextIn.access) context.access[p] = contextIn.access[p];
    context.addInitializer = function (f) {
      if (done) throw new TypeError("Cannot add initializers after decoration has completed");
      extraInitializers.push(accept(f || null));
    };
    var result = (0, decorators[i])(kind === "accessor" ? {
      get: descriptor.get,
      set: descriptor.set
    } : descriptor[key], context);
    if (kind === "accessor") {
      if (result === void 0) continue;
      if (result === null || typeof result !== "object") throw new TypeError("Object expected");
      if (_ = accept(result.get)) descriptor.get = _;
      if (_ = accept(result.set)) descriptor.set = _;
      if (_ = accept(result.init)) initializers.push(_);
    } else if (_ = accept(result)) {
      if (kind === "field") initializers.push(_);else descriptor[key] = _;
    }
  }
  if (target) Object.defineProperty(target, contextIn.name, descriptor);
  done = true;
}
;
function __runInitializers(thisArg, initializers, value) {
  var useValue = arguments.length > 2;
  for (var i = 0; i < initializers.length; i++) {
    value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
  }
  return useValue ? value : void 0;
}
;
function __propKey(x) {
  return typeof x === "symbol" ? x : "".concat(x);
}
;
function __setFunctionName(f, name, prefix) {
  if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
  return Object.defineProperty(f, "name", {
    configurable: true,
    value: prefix ? "".concat(prefix, " ", name) : name
  });
}
;
function __metadata(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = {
      label: 0,
      sent: function () {
        if (t[0] & 1) throw t[1];
        return t[1];
      },
      trys: [],
      ops: []
    },
    f,
    y,
    t,
    g;
  return g = {
    next: verb(0),
    "throw": verb(1),
    "return": verb(2)
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
    return this;
  }), g;
  function verb(n) {
    return function (v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return {
            value: op[1],
            done: false
          };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
}
var __createBinding = Object.create ? function (o, m, k, k2) {
  if (k2 === undefined) k2 = k;
  var desc = Object.getOwnPropertyDescriptor(m, k);
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
    desc = {
      enumerable: true,
      get: function () {
        return m[k];
      }
    };
  }
  Object.defineProperty(o, k2, desc);
} : function (o, m, k, k2) {
  if (k2 === undefined) k2 = k;
  o[k2] = m[k];
};
function __exportStar(m, o) {
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}
function __values(o) {
  var s = typeof Symbol === "function" && Symbol.iterator,
    m = s && o[s],
    i = 0;
  if (m) return m.call(o);
  if (o && typeof o.length === "number") return {
    next: function () {
      if (o && i >= o.length) o = void 0;
      return {
        value: o && o[i++],
        done: !o
      };
    }
  };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m) return o;
  var i = m.call(o),
    r,
    ar = [],
    e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  } catch (error) {
    e = {
      error: error
    };
  } finally {
    try {
      if (r && !r.done && (m = i["return"])) m.call(i);
    } finally {
      if (e) throw e.error;
    }
  }
  return ar;
}

/** @deprecated */
function __spread() {
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
  return ar;
}

/** @deprecated */
function __spreadArrays() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
  return r;
}
function __spreadArray(to, from, pack) {
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
    if (ar || !(i in from)) {
      if (!ar) ar = Array.prototype.slice.call(from, 0, i);
      ar[i] = from[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []),
    i,
    q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i;
  function verb(n) {
    if (g[n]) i[n] = function (v) {
      return new Promise(function (a, b) {
        q.push([n, v, a, b]) > 1 || resume(n, v);
      });
    };
  }
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  function step(r) {
    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f, v) {
    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
  }
}
function __asyncDelegator(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function (e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function () {
    return this;
  }, i;
  function verb(n, f) {
    i[n] = o[n] ? function (v) {
      return (p = !p) ? {
        value: __await(o[n](v)),
        done: false
      } : f ? f(v) : v;
    } : f;
  }
}
function __asyncValues(o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator],
    i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function (v) {
      return new Promise(function (resolve, reject) {
        v = o[n](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve, reject, d, v) {
    Promise.resolve(v).then(function (v) {
      resolve({
        value: v,
        done: d
      });
    }, reject);
  }
}
function __makeTemplateObject(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", {
      value: raw
    });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
;
var __setModuleDefault = Object.create ? function (o, v) {
  Object.defineProperty(o, "default", {
    enumerable: true,
    value: v
  });
} : function (o, v) {
  o["default"] = v;
};
function __importStar(mod) {
  if (mod && mod.__esModule) return mod;
  var result = {};
  if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  __setModuleDefault(result, mod);
  return result;
}
function __importDefault(mod) {
  return mod && mod.__esModule ? mod : {
    default: mod
  };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
  if (kind === "m") throw new TypeError("Private method is not writable");
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
}
function __classPrivateFieldIn(state, receiver) {
  if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
  return typeof state === "function" ? receiver === state : state.has(receiver);
}
// EXTERNAL MODULE: external "@angular/core"
var core_ = __webpack_require__(900);
// EXTERNAL MODULE: external "@angular/common"
var common_ = __webpack_require__(848);
// EXTERNAL MODULE: external "@angular/forms"
var forms_ = __webpack_require__(161);
// EXTERNAL MODULE: external "@ng-bootstrap/ng-bootstrap"
var ng_bootstrap_ = __webpack_require__(571);
// EXTERNAL MODULE: external "ngx-toastr"
var external_ngx_toastr_ = __webpack_require__(170);
// EXTERNAL MODULE: ../app/node_modules/filesize/lib/filesize.min.js
var filesize_min = __webpack_require__(752);
;// CONCATENATED MODULE: ../app/node_modules/ngx-filesize/fesm2015/ngx-filesize.mjs



class FileSizePipe {
  static transformOne(value, options) {
    return filesize_min(value, options);
  }
  transform(value, options) {
    if (Array.isArray(value)) {
      return value.map(val => FileSizePipe.transformOne(val, options));
    }
    return FileSizePipe.transformOne(value, options);
  }
}
FileSizePipe.ɵfac = function FileSizePipe_Factory(t) {
  return new (t || FileSizePipe)();
};
FileSizePipe.ɵpipe = /* @__PURE__ */core_["ɵɵdefinePipe"]({
  name: "filesize",
  type: FileSizePipe,
  pure: true
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](FileSizePipe, [{
    type: core_.Pipe,
    args: [{
      name: 'filesize'
    }]
  }], null, null);
})();
class NgxFilesizeModule {}
NgxFilesizeModule.ɵfac = function NgxFilesizeModule_Factory(t) {
  return new (t || NgxFilesizeModule)();
};
NgxFilesizeModule.ɵmod = /* @__PURE__ */core_["ɵɵdefineNgModule"]({
  type: NgxFilesizeModule,
  declarations: [FileSizePipe],
  exports: [FileSizePipe]
});
NgxFilesizeModule.ɵinj = /* @__PURE__ */core_["ɵɵdefineInjector"]({});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](NgxFilesizeModule, [{
    type: core_.NgModule,
    args: [{
      declarations: [FileSizePipe],
      exports: [FileSizePipe]
    }]
  }], null, null);
})();

/*
 * Public API Surface of ngx-filesize
 */

/**
 * Generated bundle index. Do not edit.
 */


// EXTERNAL MODULE: external "tabby-core"
var external_tabby_core_ = __webpack_require__(315);
var external_tabby_core_default = /*#__PURE__*/__webpack_require__.n(external_tabby_core_);
// EXTERNAL MODULE: external "tabby-terminal"
var external_tabby_terminal_ = __webpack_require__(316);
var external_tabby_terminal_default = /*#__PURE__*/__webpack_require__.n(external_tabby_terminal_);
// EXTERNAL MODULE: ./src/components/telnetProfileSettings.component.pug?ngResource
var telnetProfileSettings_componentngResource = __webpack_require__(401);
var telnetProfileSettings_componentngResource_default = /*#__PURE__*/__webpack_require__.n(telnetProfileSettings_componentngResource);
;// CONCATENATED MODULE: ./src/components/telnetProfileSettings.component.ts


/* eslint-disable @typescript-eslint/explicit-module-boundary-types */

/** @hidden */
let TelnetProfileSettingsComponent = class TelnetProfileSettingsComponent {
};
TelnetProfileSettingsComponent = __decorate([
    (0,core_.Component)({
        template: (telnetProfileSettings_componentngResource_default()),
    })
], TelnetProfileSettingsComponent);


// EXTERNAL MODULE: ./src/components/telnetTab.component.scss?ngResource
var telnetTab_componentngResource = __webpack_require__(613);
var telnetTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(telnetTab_componentngResource);
;// CONCATENATED MODULE: ../node_modules/@biesbjerg/ngx-translate-extract-marker/__ivy_ngcc__/esm2015/lib/ngx-translate-extract-marker.js
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T
 * @param {?} key
 * @return {?}
 */
function marker(key) {
  return key;
}
// EXTERNAL MODULE: ./node_modules/ansi-colors/index.js
var ansi_colors = __webpack_require__(596);
var ansi_colors_default = /*#__PURE__*/__webpack_require__.n(ansi_colors);
// EXTERNAL MODULE: external "net"
var external_net_ = __webpack_require__(548);
// EXTERNAL MODULE: ../app/node_modules/strip-ansi/index.js
var strip_ansi = __webpack_require__(907);
var strip_ansi_default = /*#__PURE__*/__webpack_require__.n(strip_ansi);
// EXTERNAL MODULE: external "rxjs"
var external_rxjs_ = __webpack_require__(832);
;// CONCATENATED MODULE: ./src/session.ts

/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */






var TelnetCommands;
(function (TelnetCommands) {
    TelnetCommands[TelnetCommands["SUBOPTION_SEND"] = 1] = "SUBOPTION_SEND";
    TelnetCommands[TelnetCommands["SUBOPTION_END"] = 240] = "SUBOPTION_END";
    TelnetCommands[TelnetCommands["GA"] = 249] = "GA";
    TelnetCommands[TelnetCommands["SUBOPTION"] = 250] = "SUBOPTION";
    TelnetCommands[TelnetCommands["WILL"] = 251] = "WILL";
    TelnetCommands[TelnetCommands["WONT"] = 252] = "WONT";
    TelnetCommands[TelnetCommands["DO"] = 253] = "DO";
    TelnetCommands[TelnetCommands["DONT"] = 254] = "DONT";
    TelnetCommands[TelnetCommands["IAC"] = 255] = "IAC";
})(TelnetCommands || (TelnetCommands = {}));
var TelnetOptions;
(function (TelnetOptions) {
    TelnetOptions[TelnetOptions["ECHO"] = 1] = "ECHO";
    TelnetOptions[TelnetOptions["AUTH_OPTIONS"] = 37] = "AUTH_OPTIONS";
    TelnetOptions[TelnetOptions["SUPPRESS_GO_AHEAD"] = 3] = "SUPPRESS_GO_AHEAD";
    TelnetOptions[TelnetOptions["TERMINAL_TYPE"] = 24] = "TERMINAL_TYPE";
    TelnetOptions[TelnetOptions["NEGO_WINDOW_SIZE"] = 31] = "NEGO_WINDOW_SIZE";
    TelnetOptions[TelnetOptions["NEGO_TERMINAL_SPEED"] = 32] = "NEGO_TERMINAL_SPEED";
    TelnetOptions[TelnetOptions["STATUS"] = 5] = "STATUS";
    TelnetOptions[TelnetOptions["REMOTE_FLOW_CONTROL"] = 33] = "REMOTE_FLOW_CONTROL";
    TelnetOptions[TelnetOptions["X_DISPLAY_LOCATION"] = 35] = "X_DISPLAY_LOCATION";
    TelnetOptions[TelnetOptions["NEW_ENVIRON"] = 39] = "NEW_ENVIRON";
})(TelnetOptions || (TelnetOptions = {}));
class UnescapeFFMiddleware extends external_tabby_terminal_.SessionMiddleware {
    feedFromSession(data) {
        while (data.includes(0xff)) {
            const pos = data.indexOf(0xff);
            this.outputToTerminal.next(data.slice(0, pos));
            this.outputToTerminal.next(Buffer.from([0xff, 0xff]));
            data = data.slice(pos + 1);
        }
        this.outputToTerminal.next(data);
    }
}
class TelnetSession extends external_tabby_terminal_.BaseSession {
    get serviceMessage$() { return this.serviceMessage; }
    constructor(injector, profile) {
        super(injector.get(external_tabby_core_.LogService).create(`telnet-${profile.options.host}-${profile.options.port}`));
        this.profile = profile;
        this.serviceMessage = new external_rxjs_.Subject();
        this.telnetProtocol = false;
        this.lastWidth = 0;
        this.lastHeight = 0;
        this.requestedOptions = new Set();
        this.telnetRemoteEcho = false;
        this.streamProcessor = new external_tabby_terminal_.TerminalStreamProcessor(profile.options);
        this.middleware.push(this.streamProcessor);
        this.middleware.push(new external_tabby_terminal_.InputProcessor(profile.options.input));
        this.setLoginScriptsOptions(profile.options);
    }
    start() {
        return __awaiter(this, void 0, void 0, function* () {
            this.socket = new external_net_.Socket();
            this.emitServiceMessage(`Connecting to ${this.profile.options.host}`);
            return new Promise((resolve, reject) => {
                var _a;
                this.socket.on('error', err => {
                    this.emitServiceMessage(ansi_colors_default().bgRed.black(' X ') + ` Socket error: ${err}`);
                    reject(err);
                    this.destroy();
                });
                this.socket.on('close', () => {
                    this.emitServiceMessage('Connection closed');
                    this.destroy();
                });
                this.socket.on('data', data => this.onData(data));
                this.socket.connect((_a = this.profile.options.port) !== null && _a !== void 0 ? _a : 23, this.profile.options.host, () => {
                    var _a;
                    this.emitServiceMessage('Connected');
                    this.open = true;
                    setTimeout(() => this.streamProcessor.start());
                    (_a = this.loginScriptProcessor) === null || _a === void 0 ? void 0 : _a.executeUnconditionalScripts();
                    resolve();
                });
            });
        });
    }
    requestOption(cmd, option) {
        this.requestedOptions.add(option);
        this.emitTelnet(cmd, option);
    }
    emitServiceMessage(msg) {
        this.serviceMessage.next(msg);
        this.logger.info(strip_ansi_default()(msg));
    }
    onData(data) {
        if (!this.telnetProtocol && data[0] === TelnetCommands.IAC) {
            this.telnetProtocol = true;
            this.middleware.push(new UnescapeFFMiddleware());
            this.requestOption(TelnetCommands.DO, TelnetOptions.SUPPRESS_GO_AHEAD);
            this.emitTelnet(TelnetCommands.WILL, TelnetOptions.TERMINAL_TYPE);
            this.emitTelnet(TelnetCommands.WILL, TelnetOptions.NEGO_WINDOW_SIZE);
        }
        if (this.telnetProtocol) {
            data = this.processTelnetProtocol(data);
        }
        this.emitOutput(data);
    }
    emitTelnet(command, option) {
        this.logger.debug('>', TelnetCommands[command], TelnetOptions[option] || option);
        this.socket.write(Buffer.from([TelnetCommands.IAC, command, option]));
    }
    emitTelnetSuboption(option, value) {
        this.logger.debug('>', 'SUBOPTION', TelnetOptions[option], value);
        this.socket.write(Buffer.from([
            TelnetCommands.IAC,
            TelnetCommands.SUBOPTION,
            option,
            ...value,
            TelnetCommands.IAC,
            TelnetCommands.SUBOPTION_END,
        ]));
    }
    processTelnetProtocol(data) {
        while (data.length) {
            if (data[0] === TelnetCommands.IAC) {
                const command = data[1];
                const commandName = TelnetCommands[command];
                const option = data[2];
                const optionName = TelnetOptions[option];
                if (command === TelnetCommands.IAC) {
                    data = data.slice(1);
                    break;
                }
                data = data.slice(3);
                this.logger.debug('<', commandName || command, optionName || option);
                if (command === TelnetCommands.WILL || command === TelnetCommands.WONT || command === TelnetCommands.DONT) {
                    if (this.requestedOptions.has(option)) {
                        this.requestedOptions.delete(option);
                        continue;
                    }
                }
                if (command === TelnetCommands.WILL) {
                    if ([
                        TelnetOptions.SUPPRESS_GO_AHEAD,
                        TelnetOptions.ECHO,
                    ].includes(option)) {
                        this.emitTelnet(TelnetCommands.DO, option);
                        if (option === TelnetOptions.ECHO && this.streamProcessor.forceEcho) {
                            this.telnetRemoteEcho = true;
                            this.streamProcessor.forceEcho = false;
                            this.requestOption(TelnetCommands.WONT, option);
                        }
                    }
                    else {
                        this.logger.debug('(!) Unhandled option');
                        this.emitTelnet(TelnetCommands.DONT, option);
                    }
                }
                if (command === TelnetCommands.DO) {
                    if (option === TelnetOptions.NEGO_WINDOW_SIZE) {
                        this.emitTelnet(TelnetCommands.WILL, option);
                        this.emitSize();
                    }
                    else if (option === TelnetOptions.ECHO) {
                        if (this.telnetRemoteEcho) {
                            this.streamProcessor.forceEcho = false;
                            this.emitTelnet(TelnetCommands.WONT, option);
                        }
                        else {
                            this.streamProcessor.forceEcho = true;
                            this.emitTelnet(TelnetCommands.WILL, option);
                        }
                    }
                    else if (option === TelnetOptions.TERMINAL_TYPE) {
                        this.emitTelnet(TelnetCommands.WILL, option);
                    }
                    else {
                        this.logger.debug('(!) Unhandled option');
                        this.emitTelnet(TelnetCommands.WONT, option);
                    }
                }
                if (command === TelnetCommands.DONT) {
                    if (option === TelnetOptions.ECHO) {
                        this.streamProcessor.forceEcho = false;
                        this.emitTelnet(TelnetCommands.WONT, option);
                    }
                    else {
                        this.logger.debug('(!) Unhandled option');
                        this.emitTelnet(TelnetCommands.WONT, option);
                    }
                }
                if (command === TelnetCommands.WONT) {
                    if (option === TelnetOptions.ECHO) {
                        this.telnetRemoteEcho = false;
                        this.emitTelnet(TelnetCommands.DONT, option);
                    }
                    else {
                        this.logger.debug('(!) Unhandled option');
                        this.emitTelnet(TelnetCommands.DONT, option);
                    }
                }
                if (command === TelnetCommands.SUBOPTION) {
                    const endIndex = data.indexOf(TelnetCommands.IAC);
                    const optionValue = data.slice(0, endIndex);
                    this.logger.debug('<', commandName || command, optionName || option, optionValue);
                    if (option === TelnetOptions.TERMINAL_TYPE && optionValue[0] === TelnetCommands.SUBOPTION_SEND) {
                        this.emitTelnetSuboption(option, Buffer.from([0, ...Buffer.from('XTERM-256COLOR')]));
                    }
                    data = data.slice(endIndex + 2);
                }
            }
            else {
                return data;
            }
        }
        return data;
    }
    // eslint-disable-next-line @typescript-eslint/no-empty-function
    resize(w, h) {
        if (w && h) {
            this.lastWidth = w;
            this.lastHeight = h;
        }
        if (this.lastWidth && this.lastHeight && this.telnetProtocol) {
            this.emitSize();
        }
    }
    emitSize() {
        if (this.lastWidth && this.lastHeight) {
            this.emitTelnetSuboption(TelnetOptions.NEGO_WINDOW_SIZE, Buffer.from([
                this.lastWidth >> 8, this.lastWidth & 0xff,
                this.lastHeight >> 8, this.lastHeight & 0xff,
            ]));
        }
        else {
            this.emitTelnet(TelnetCommands.WONT, TelnetOptions.NEGO_WINDOW_SIZE);
        }
    }
    write(data) {
        this.socket.write(data);
    }
    kill(_signal) {
        this.socket.destroy();
    }
    destroy() {
        const _super = Object.create(null, {
            destroy: { get: () => super.destroy }
        });
        return __awaiter(this, void 0, void 0, function* () {
            this.streamProcessor.close();
            this.serviceMessage.complete();
            this.kill();
            yield _super.destroy.call(this);
        });
    }
    getChildProcesses() {
        return __awaiter(this, void 0, void 0, function* () {
            return [];
        });
    }
    gracefullyKillProcess() {
        return __awaiter(this, void 0, void 0, function* () {
            this.kill();
        });
    }
    supportsWorkingDirectory() {
        return false;
    }
    getWorkingDirectory() {
        return __awaiter(this, void 0, void 0, function* () {
            return null;
        });
    }
}

;// CONCATENATED MODULE: ./src/components/telnetTab.component.ts








/** @hidden */
let TelnetTabComponent = class TelnetTabComponent extends external_tabby_terminal_.ConnectableTerminalTabComponent {
    // eslint-disable-next-line @typescript-eslint/no-useless-constructor
    constructor(injector) {
        super(injector);
        this.Platform = external_tabby_core_.Platform;
        this.session = null;
        this.enableToolbar = true;
    }
    ngOnInit() {
        this.subscribeUntilDestroyed(this.hotkeys.hotkey$, hotkey => {
            if (this.hasFocus && hotkey === 'restart-telnet-session') {
                this.reconnect();
            }
        });
        super.ngOnInit();
    }
    onSessionDestroyed() {
        var _a;
        if (this.frontend) {
            // Session was closed abruptly
            this.write('\r\n' + ansi_colors_default().black.bgWhite(' TELNET ') + ` ${(_a = this.session) === null || _a === void 0 ? void 0 : _a.profile.options.host}: session closed\r\n`);
            super.onSessionDestroyed();
        }
    }
    initializeSession() {
        const _super = Object.create(null, {
            initializeSession: { get: () => super.initializeSession }
        });
        return __awaiter(this, void 0, void 0, function* () {
            yield _super.initializeSession.call(this);
            const session = new TelnetSession(this.injector, this.profile);
            this.setSession(session);
            try {
                this.startSpinner(this.translate.instant(marker('Connecting')));
                this.attachSessionHandler(session.serviceMessage$, msg => {
                    this.write(`\r${ansi_colors_default().black.bgWhite(' Telnet ')} ${msg}\r\n`);
                    session.resize(this.size.columns, this.size.rows);
                });
                try {
                    yield session.start();
                    this.stopSpinner();
                }
                catch (e) {
                    this.stopSpinner();
                    this.write(ansi_colors_default().black.bgRed(' X ') + ' ' + ansi_colors_default().red(e.message) + '\r\n');
                    return;
                }
            }
            catch (e) {
                this.write(ansi_colors_default().black.bgRed(' X ') + ' ' + ansi_colors_default().red(e.message) + '\r\n');
            }
        });
    }
    canClose() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            if (!((_a = this.session) === null || _a === void 0 ? void 0 : _a.open)) {
                return true;
            }
            return (yield this.platform.showMessageBox({
                type: 'warning',
                message: this.translate.instant(marker('Disconnect from {host}?'), this.profile.options),
                buttons: [
                    this.translate.instant(marker('Disconnect')),
                    this.translate.instant(marker('Do not close')),
                ],
                defaultId: 0,
                cancelId: 1,
            })).response === 0;
        });
    }
    isSessionExplicitlyTerminated() {
        return super.isSessionExplicitlyTerminated() ||
            this.recentInputs.endsWith('close\r') ||
            this.recentInputs.endsWith('quit\r');
    }
};
TelnetTabComponent.ctorParameters = () => [
    { type: core_.Injector }
];
TelnetTabComponent = __decorate([
    (0,core_.Component)({
        selector: 'telnet-tab',
        template: `${external_tabby_terminal_.BaseTerminalTabComponent.template} ${__webpack_require__(/*! ./telnetTab.component.pug */ 88)}`,
        animations: external_tabby_terminal_.BaseTerminalTabComponent.animations,
        styles: [(telnetTab_componentngResource_default()), ...external_tabby_terminal_.BaseTerminalTabComponent.styles]
    }),
    __metadata("design:paramtypes", [core_.Injector])
], TelnetTabComponent);


;// CONCATENATED MODULE: ./src/config.ts

/** @hidden */
class TelnetConfigProvider extends external_tabby_core_.ConfigProvider {
    constructor() {
        super(...arguments);
        this.defaults = {
            hotkeys: {
                'restart-telnet-session': [],
            },
        };
        this.platformDefaults = {};
    }
}

;// CONCATENATED MODULE: ./src/recoveryProvider.ts




/** @hidden */
let RecoveryProvider = class RecoveryProvider extends external_tabby_core_.TabRecoveryProvider {
    applicableTo(recoveryToken) {
        return __awaiter(this, void 0, void 0, function* () {
            return recoveryToken.type === 'app:telnet-tab';
        });
    }
    recover(recoveryToken) {
        return __awaiter(this, void 0, void 0, function* () {
            return {
                type: TelnetTabComponent,
                inputs: {
                    profile: recoveryToken['profile'],
                    savedState: recoveryToken['savedState'],
                },
            };
        });
    }
};
RecoveryProvider = __decorate([
    (0,core_.Injectable)()
], RecoveryProvider);


;// CONCATENATED MODULE: ./src/hotkeys.ts



/** @hidden */
let TelnetHotkeyProvider = class TelnetHotkeyProvider extends external_tabby_core_.HotkeyProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.hotkeys = [
            {
                id: 'restart-telnet-session',
                name: this.translate.instant('Restart current Telnet session'),
            },
        ];
    }
    provide() {
        return __awaiter(this, void 0, void 0, function* () {
            return this.hotkeys;
        });
    }
};
TelnetHotkeyProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
TelnetHotkeyProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], TelnetHotkeyProvider);


;// CONCATENATED MODULE: ./src/profiles.ts





let TelnetProfilesService = class TelnetProfilesService extends external_tabby_core_.QuickConnectProfileProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'telnet';
        this.name = 'Telnet';
        this.supportsQuickConnect = true;
        this.settingsComponent = TelnetProfileSettingsComponent;
        this.configDefaults = {
            options: {
                host: null,
                port: 23,
                inputMode: 'local-echo',
                outputMode: null,
                inputNewlines: null,
                outputNewlines: 'crlf',
                scripts: [],
                input: { backspace: 'backspace' },
            },
            clearServiceMessagesOnConnect: false,
        };
    }
    getBuiltinProfiles() {
        return __awaiter(this, void 0, void 0, function* () {
            return [
                {
                    id: `telnet:template`,
                    type: 'telnet',
                    name: this.translate.instant('Telnet session'),
                    icon: 'fas fa-network-wired',
                    options: {
                        host: '',
                        port: 23,
                        inputMode: 'readline',
                        outputMode: null,
                        inputNewlines: null,
                        outputNewlines: 'crlf',
                    },
                    isBuiltin: true,
                    isTemplate: true,
                },
                {
                    id: `socket:template`,
                    type: 'telnet',
                    name: this.translate.instant('Raw socket connection'),
                    icon: 'fas fa-network-wired',
                    options: {
                        host: '',
                        port: 1234,
                    },
                    isBuiltin: true,
                    isTemplate: true,
                },
            ];
        });
    }
    getNewTabParameters(profile) {
        return __awaiter(this, void 0, void 0, function* () {
            return {
                type: TelnetTabComponent,
                inputs: { profile },
            };
        });
    }
    getSuggestedName(profile) {
        return this.getDescription(profile) || null;
    }
    getDescription(profile) {
        return profile.options.host ? `${profile.options.host}:${profile.options.port}` : '';
    }
    quickConnect(query) {
        let host = query;
        let port = 23;
        if (host.includes('[')) {
            port = parseInt(host.split(']')[1].substring(1));
            host = host.split(']')[0].substring(1);
        }
        else if (host.includes(':')) {
            port = parseInt(host.split(/:/g)[1]);
            host = host.split(':')[0];
        }
        return {
            name: query,
            type: 'telnet',
            options: {
                host,
                port,
                inputMode: 'readline',
                outputNewlines: 'crlf',
            },
        };
    }
    intoQuickConnectString(profile) {
        let s = profile.options.host;
        if (profile.options.port !== 23) {
            s = `${s}:${profile.options.port}`;
        }
        return s;
    }
};
TelnetProfilesService.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
TelnetProfilesService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], TelnetProfilesService);


;// CONCATENATED MODULE: ./src/index.ts















/** @hidden */
let TelnetModule = class TelnetModule {
};
TelnetModule = __decorate([
    (0,core_.NgModule)({
        imports: [
            ng_bootstrap_.NgbModule,
            NgxFilesizeModule,
            common_.CommonModule,
            forms_.FormsModule,
            external_ngx_toastr_.ToastrModule,
            (external_tabby_core_default()),
            (external_tabby_terminal_default()),
        ],
        providers: [
            { provide: external_tabby_core_.ConfigProvider, useClass: TelnetConfigProvider, multi: true },
            { provide: external_tabby_core_.TabRecoveryProvider, useClass: RecoveryProvider, multi: true },
            { provide: external_tabby_core_.HotkeyProvider, useClass: TelnetHotkeyProvider, multi: true },
            { provide: external_tabby_core_.ProfileProvider, useExisting: TelnetProfilesService, multi: true },
        ],
        declarations: [
            TelnetProfileSettingsComponent,
            TelnetTabComponent,
        ],
    })
    // eslint-disable-next-line @typescript-eslint/no-extraneous-class
], TelnetModule);
/* harmony default export */ const src = (TelnetModule);

})();

/******/ 	return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=../../../app.asar.unpacked/assets/webpack/index.js.map