(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-settings"), require("tabby-terminal"), require("fs"), require("keytar"), require("russh"), require("@luminati-io/socksv5"), require("net"), require("any-promise"), require("stream"), require("rxjs"), require("path"), require("os"));
	else if(typeof define === 'function' && define.amd)
		define(["@angular/core", "@angular/common", "@angular/forms", "@ng-bootstrap/ng-bootstrap", "ngx-toastr", "tabby-core", "tabby-settings", "tabby-terminal", "fs", "keytar", "russh", "@luminati-io/socksv5", "net", "any-promise", "stream", "rxjs", "path", "os"], 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-settings"), require("tabby-terminal"), require("fs"), require("keytar"), require("russh"), require("@luminati-io/socksv5"), require("net"), require("any-promise"), require("stream"), require("rxjs"), require("path"), require("os")) : factory(root["@angular/core"], root["@angular/common"], root["@angular/forms"], root["@ng-bootstrap/ng-bootstrap"], root["ngx-toastr"], root["tabby-core"], root["tabby-settings"], root["tabby-terminal"], root["fs"], root["keytar"], root["russh"], root["@luminati-io/socksv5"], root["net"], root["any-promise"], root["stream"], root["rxjs"], root["path"], root["os"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(global, (__WEBPACK_EXTERNAL_MODULE__8900__, __WEBPACK_EXTERNAL_MODULE__5848__, __WEBPACK_EXTERNAL_MODULE__7161__, __WEBPACK_EXTERNAL_MODULE__7571__, __WEBPACK_EXTERNAL_MODULE__7170__, __WEBPACK_EXTERNAL_MODULE__315__, __WEBPACK_EXTERNAL_MODULE__6663__, __WEBPACK_EXTERNAL_MODULE__8316__, __WEBPACK_EXTERNAL_MODULE__2089__, __WEBPACK_EXTERNAL_MODULE__5860__, __WEBPACK_EXTERNAL_MODULE__5487__, __WEBPACK_EXTERNAL_MODULE__6608__, __WEBPACK_EXTERNAL_MODULE__1548__, __WEBPACK_EXTERNAL_MODULE__7154__, __WEBPACK_EXTERNAL_MODULE__3978__, __WEBPACK_EXTERNAL_MODULE__3832__, __WEBPACK_EXTERNAL_MODULE__3056__, __WEBPACK_EXTERNAL_MODULE__9044__) => {
return /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 442:
/*!*******************************************************************************!*\
  !*** ./src/components/keyboardInteractiveAuthPanel.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!./keyboardInteractiveAuthPanel.component.scss?ngResource */ 9576);

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

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

/***/ }),

/***/ 4987:
/*!************************************************************!*\
  !*** ./src/components/sftpPanel.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!./sftpPanel.component.scss?ngResource */ 7543);

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

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

/***/ }),

/***/ 7846:
/*!**********************************************!*\
  !*** ./src/components/sshTab.component.scss ***!
  \**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./sshTab.component.scss */ 9886);

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

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

/***/ }),

/***/ 5098:
/*!********************************************************************!*\
  !*** ./src/components/hostKeyPromptModal.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/hostKeyPromptModal.component.pug?ngResource */ 7852);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 5897:
/*!******************************************************************************!*\
  !*** ./src/components/keyboardInteractiveAuthPanel.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/keyboardInteractiveAuthPanel.component.pug?ngResource */ 1003);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 7192:
/*!**************************************************************************!*\
  !*** ./src/components/sftpCreateDirectoryModal.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/sftpCreateDirectoryModal.component.pug?ngResource */ 3516);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 7255:
/*!*****************************************************************!*\
  !*** ./src/components/sftpDeleteModal.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/sftpDeleteModal.component.pug?ngResource */ 883);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 687:
/*!***********************************************************!*\
  !*** ./src/components/sftpPanel.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/sftpPanel.component.pug?ngResource */ 3576);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 8192:
/*!*************************************************************************!*\
  !*** ./src/components/sshPortForwardingConfig.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/sshPortForwardingConfig.component.pug?ngResource */ 7083);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 1355:
/*!************************************************************************!*\
  !*** ./src/components/sshPortForwardingModal.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/sshPortForwardingModal.component.pug?ngResource */ 9040);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 1295:
/*!********************************************************************!*\
  !*** ./src/components/sshProfileSettings.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/sshProfileSettings.component.pug?ngResource */ 3660);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 1602:
/*!****************************************************************!*\
  !*** ./src/components/sshSettingsTab.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/sshSettingsTab.component.pug?ngResource */ 5859);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 4113:
/*!*********************************************!*\
  !*** ./src/components/sshTab.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/sshTab.component.pug */ 2517);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 1752:
/*!********************************************************!*\
  !*** ../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;
});

/***/ }),

/***/ 9410:
/*!************************************************!*\
  !*** ../app/node_modules/graceful-fs/clone.js ***!
  \************************************************/
/***/ ((module) => {

"use strict";


module.exports = clone;
function clone(obj) {
  if (obj === null || typeof obj !== 'object') return obj;
  if (obj instanceof Object) var copy = {
    __proto__: obj.__proto__
  };else var copy = Object.create(null);
  Object.getOwnPropertyNames(obj).forEach(function (key) {
    Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
  });
  return copy;
}

/***/ }),

/***/ 4389:
/*!******************************************************!*\
  !*** ../app/node_modules/graceful-fs/graceful-fs.js ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var fs = __webpack_require__(/*! fs */ 2089);
var polyfills = __webpack_require__(/*! ./polyfills.js */ 5581);
var legacy = __webpack_require__(/*! ./legacy-streams.js */ 599);
var clone = __webpack_require__(/*! ./clone.js */ 9410);
var util = __webpack_require__(/*! util */ 3837);

/* istanbul ignore next - node 0.x polyfill */
var gracefulQueue;
var previousSymbol;

/* istanbul ignore else - node 0.x polyfill */
if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
  gracefulQueue = Symbol.for('graceful-fs.queue');
  // This is used in testing by future versions
  previousSymbol = Symbol.for('graceful-fs.previous');
} else {
  gracefulQueue = '___graceful-fs.queue';
  previousSymbol = '___graceful-fs.previous';
}
function noop() {}
function publishQueue(context, queue) {
  Object.defineProperty(context, gracefulQueue, {
    get: function () {
      return queue;
    }
  });
}
var debug = noop;
if (util.debuglog) debug = util.debuglog('gfs4');else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) debug = function () {
  var m = util.format.apply(util, arguments);
  m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ');
  console.error(m);
};

// Once time initialization
if (!fs[gracefulQueue]) {
  // This queue can be shared by multiple loaded instances
  var queue = global[gracefulQueue] || [];
  publishQueue(fs, queue);

  // Patch fs.close/closeSync to shared queue version, because we need
  // to retry() whenever a close happens *anywhere* in the program.
  // This is essential when multiple graceful-fs instances are
  // in play at the same time.
  fs.close = function (fs$close) {
    function close(fd, cb) {
      return fs$close.call(fs, fd, function (err) {
        // This function uses the graceful-fs shared queue
        if (!err) {
          retry();
        }
        if (typeof cb === 'function') cb.apply(this, arguments);
      });
    }
    Object.defineProperty(close, previousSymbol, {
      value: fs$close
    });
    return close;
  }(fs.close);
  fs.closeSync = function (fs$closeSync) {
    function closeSync(fd) {
      // This function uses the graceful-fs shared queue
      fs$closeSync.apply(fs, arguments);
      retry();
    }
    Object.defineProperty(closeSync, previousSymbol, {
      value: fs$closeSync
    });
    return closeSync;
  }(fs.closeSync);
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
    process.on('exit', function () {
      debug(fs[gracefulQueue]);
      (__webpack_require__(/*! assert */ 9491).equal)(fs[gracefulQueue].length, 0);
    });
  }
}
if (!global[gracefulQueue]) {
  publishQueue(global, fs[gracefulQueue]);
}
module.exports = patch(clone(fs));
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
  module.exports = patch(fs);
  fs.__patched = true;
}
function patch(fs) {
  // Everything that references the open() function needs to be in here
  polyfills(fs);
  fs.gracefulify = patch;
  fs.createReadStream = createReadStream;
  fs.createWriteStream = createWriteStream;
  var fs$readFile = fs.readFile;
  fs.readFile = readFile;
  function readFile(path, options, cb) {
    if (typeof options === 'function') cb = options, options = null;
    return go$readFile(path, options, cb);
    function go$readFile(path, options, cb) {
      return fs$readFile(path, options, function (err) {
        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) enqueue([go$readFile, [path, options, cb]]);else {
          if (typeof cb === 'function') cb.apply(this, arguments);
          retry();
        }
      });
    }
  }
  var fs$writeFile = fs.writeFile;
  fs.writeFile = writeFile;
  function writeFile(path, data, options, cb) {
    if (typeof options === 'function') cb = options, options = null;
    return go$writeFile(path, data, options, cb);
    function go$writeFile(path, data, options, cb) {
      return fs$writeFile(path, data, options, function (err) {
        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) enqueue([go$writeFile, [path, data, options, cb]]);else {
          if (typeof cb === 'function') cb.apply(this, arguments);
          retry();
        }
      });
    }
  }
  var fs$appendFile = fs.appendFile;
  if (fs$appendFile) fs.appendFile = appendFile;
  function appendFile(path, data, options, cb) {
    if (typeof options === 'function') cb = options, options = null;
    return go$appendFile(path, data, options, cb);
    function go$appendFile(path, data, options, cb) {
      return fs$appendFile(path, data, options, function (err) {
        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) enqueue([go$appendFile, [path, data, options, cb]]);else {
          if (typeof cb === 'function') cb.apply(this, arguments);
          retry();
        }
      });
    }
  }
  var fs$readdir = fs.readdir;
  fs.readdir = readdir;
  function readdir(path, options, cb) {
    var args = [path];
    if (typeof options !== 'function') {
      args.push(options);
    } else {
      cb = options;
    }
    args.push(go$readdir$cb);
    return go$readdir(args);
    function go$readdir$cb(err, files) {
      if (files && files.sort) files.sort();
      if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) enqueue([go$readdir, [args]]);else {
        if (typeof cb === 'function') cb.apply(this, arguments);
        retry();
      }
    }
  }
  function go$readdir(args) {
    return fs$readdir.apply(fs, args);
  }
  if (process.version.substr(0, 4) === 'v0.8') {
    var legStreams = legacy(fs);
    ReadStream = legStreams.ReadStream;
    WriteStream = legStreams.WriteStream;
  }
  var fs$ReadStream = fs.ReadStream;
  if (fs$ReadStream) {
    ReadStream.prototype = Object.create(fs$ReadStream.prototype);
    ReadStream.prototype.open = ReadStream$open;
  }
  var fs$WriteStream = fs.WriteStream;
  if (fs$WriteStream) {
    WriteStream.prototype = Object.create(fs$WriteStream.prototype);
    WriteStream.prototype.open = WriteStream$open;
  }
  Object.defineProperty(fs, 'ReadStream', {
    get: function () {
      return ReadStream;
    },
    set: function (val) {
      ReadStream = val;
    },
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(fs, 'WriteStream', {
    get: function () {
      return WriteStream;
    },
    set: function (val) {
      WriteStream = val;
    },
    enumerable: true,
    configurable: true
  });

  // legacy names
  var FileReadStream = ReadStream;
  Object.defineProperty(fs, 'FileReadStream', {
    get: function () {
      return FileReadStream;
    },
    set: function (val) {
      FileReadStream = val;
    },
    enumerable: true,
    configurable: true
  });
  var FileWriteStream = WriteStream;
  Object.defineProperty(fs, 'FileWriteStream', {
    get: function () {
      return FileWriteStream;
    },
    set: function (val) {
      FileWriteStream = val;
    },
    enumerable: true,
    configurable: true
  });
  function ReadStream(path, options) {
    if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this;else return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
  }
  function ReadStream$open() {
    var that = this;
    open(that.path, that.flags, that.mode, function (err, fd) {
      if (err) {
        if (that.autoClose) that.destroy();
        that.emit('error', err);
      } else {
        that.fd = fd;
        that.emit('open', fd);
        that.read();
      }
    });
  }
  function WriteStream(path, options) {
    if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this;else return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
  }
  function WriteStream$open() {
    var that = this;
    open(that.path, that.flags, that.mode, function (err, fd) {
      if (err) {
        that.destroy();
        that.emit('error', err);
      } else {
        that.fd = fd;
        that.emit('open', fd);
      }
    });
  }
  function createReadStream(path, options) {
    return new fs.ReadStream(path, options);
  }
  function createWriteStream(path, options) {
    return new fs.WriteStream(path, options);
  }
  var fs$open = fs.open;
  fs.open = open;
  function open(path, flags, mode, cb) {
    if (typeof mode === 'function') cb = mode, mode = null;
    return go$open(path, flags, mode, cb);
    function go$open(path, flags, mode, cb) {
      return fs$open(path, flags, mode, function (err, fd) {
        if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) enqueue([go$open, [path, flags, mode, cb]]);else {
          if (typeof cb === 'function') cb.apply(this, arguments);
          retry();
        }
      });
    }
  }
  return fs;
}
function enqueue(elem) {
  debug('ENQUEUE', elem[0].name, elem[1]);
  fs[gracefulQueue].push(elem);
}
function retry() {
  var elem = fs[gracefulQueue].shift();
  if (elem) {
    debug('RETRY', elem[0].name, elem[1]);
    elem[0].apply(null, elem[1]);
  }
}

/***/ }),

/***/ 599:
/*!*********************************************************!*\
  !*** ../app/node_modules/graceful-fs/legacy-streams.js ***!
  \*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Stream = (__webpack_require__(/*! stream */ 3978).Stream);
module.exports = legacy;
function legacy(fs) {
  return {
    ReadStream: ReadStream,
    WriteStream: WriteStream
  };
  function ReadStream(path, options) {
    if (!(this instanceof ReadStream)) return new ReadStream(path, options);
    Stream.call(this);
    var self = this;
    this.path = path;
    this.fd = null;
    this.readable = true;
    this.paused = false;
    this.flags = 'r';
    this.mode = 438; /*=0666*/
    this.bufferSize = 64 * 1024;
    options = options || {};

    // Mixin options into this
    var keys = Object.keys(options);
    for (var index = 0, length = keys.length; index < length; index++) {
      var key = keys[index];
      this[key] = options[key];
    }
    if (this.encoding) this.setEncoding(this.encoding);
    if (this.start !== undefined) {
      if ('number' !== typeof this.start) {
        throw TypeError('start must be a Number');
      }
      if (this.end === undefined) {
        this.end = Infinity;
      } else if ('number' !== typeof this.end) {
        throw TypeError('end must be a Number');
      }
      if (this.start > this.end) {
        throw new Error('start must be <= end');
      }
      this.pos = this.start;
    }
    if (this.fd !== null) {
      process.nextTick(function () {
        self._read();
      });
      return;
    }
    fs.open(this.path, this.flags, this.mode, function (err, fd) {
      if (err) {
        self.emit('error', err);
        self.readable = false;
        return;
      }
      self.fd = fd;
      self.emit('open', fd);
      self._read();
    });
  }
  function WriteStream(path, options) {
    if (!(this instanceof WriteStream)) return new WriteStream(path, options);
    Stream.call(this);
    this.path = path;
    this.fd = null;
    this.writable = true;
    this.flags = 'w';
    this.encoding = 'binary';
    this.mode = 438; /*=0666*/
    this.bytesWritten = 0;
    options = options || {};

    // Mixin options into this
    var keys = Object.keys(options);
    for (var index = 0, length = keys.length; index < length; index++) {
      var key = keys[index];
      this[key] = options[key];
    }
    if (this.start !== undefined) {
      if ('number' !== typeof this.start) {
        throw TypeError('start must be a Number');
      }
      if (this.start < 0) {
        throw new Error('start must be >= zero');
      }
      this.pos = this.start;
    }
    this.busy = false;
    this._queue = [];
    if (this.fd === null) {
      this._open = fs.open;
      this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
      this.flush();
    }
  }
}

/***/ }),

/***/ 5581:
/*!****************************************************!*\
  !*** ../app/node_modules/graceful-fs/polyfills.js ***!
  \****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var constants = __webpack_require__(/*! constants */ 2057);
var origCwd = process.cwd;
var cwd = null;
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
process.cwd = function () {
  if (!cwd) cwd = origCwd.call(process);
  return cwd;
};
try {
  process.cwd();
} catch (er) {}
var chdir = process.chdir;
process.chdir = function (d) {
  cwd = null;
  chdir.call(process, d);
};
module.exports = patch;
function patch(fs) {
  // (re-)implement some things that are known busted or missing.

  // lchmod, broken prior to 0.6.2
  // back-port the fix here.
  if (constants.hasOwnProperty('O_SYMLINK') && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
    patchLchmod(fs);
  }

  // lutimes implementation, or no-op
  if (!fs.lutimes) {
    patchLutimes(fs);
  }

  // https://github.com/isaacs/node-graceful-fs/issues/4
  // Chown should not fail on einval or eperm if non-root.
  // It should not fail on enosys ever, as this just indicates
  // that a fs doesn't support the intended operation.

  fs.chown = chownFix(fs.chown);
  fs.fchown = chownFix(fs.fchown);
  fs.lchown = chownFix(fs.lchown);
  fs.chmod = chmodFix(fs.chmod);
  fs.fchmod = chmodFix(fs.fchmod);
  fs.lchmod = chmodFix(fs.lchmod);
  fs.chownSync = chownFixSync(fs.chownSync);
  fs.fchownSync = chownFixSync(fs.fchownSync);
  fs.lchownSync = chownFixSync(fs.lchownSync);
  fs.chmodSync = chmodFixSync(fs.chmodSync);
  fs.fchmodSync = chmodFixSync(fs.fchmodSync);
  fs.lchmodSync = chmodFixSync(fs.lchmodSync);
  fs.stat = statFix(fs.stat);
  fs.fstat = statFix(fs.fstat);
  fs.lstat = statFix(fs.lstat);
  fs.statSync = statFixSync(fs.statSync);
  fs.fstatSync = statFixSync(fs.fstatSync);
  fs.lstatSync = statFixSync(fs.lstatSync);

  // if lchmod/lchown do not exist, then make them no-ops
  if (!fs.lchmod) {
    fs.lchmod = function (path, mode, cb) {
      if (cb) process.nextTick(cb);
    };
    fs.lchmodSync = function () {};
  }
  if (!fs.lchown) {
    fs.lchown = function (path, uid, gid, cb) {
      if (cb) process.nextTick(cb);
    };
    fs.lchownSync = function () {};
  }

  // on Windows, A/V software can lock the directory, causing this
  // to fail with an EACCES or EPERM if the directory contains newly
  // created files.  Try again on failure, for up to 60 seconds.

  // Set the timeout this long because some Windows Anti-Virus, such as Parity
  // bit9, may lock files for up to a minute, causing npm package install
  // failures. Also, take care to yield the scheduler. Windows scheduling gives
  // CPU to a busy looping process, which can cause the program causing the lock
  // contention to be starved of CPU by node, so the contention doesn't resolve.
  if (platform === "win32") {
    fs.rename = function (fs$rename) {
      return function (from, to, cb) {
        var start = Date.now();
        var backoff = 0;
        fs$rename(from, to, function CB(er) {
          if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 60000) {
            setTimeout(function () {
              fs.stat(to, function (stater, st) {
                if (stater && stater.code === "ENOENT") fs$rename(from, to, CB);else cb(er);
              });
            }, backoff);
            if (backoff < 100) backoff += 10;
            return;
          }
          if (cb) cb(er);
        });
      };
    }(fs.rename);
  }

  // if read() returns EAGAIN, then just try it again.
  fs.read = function (fs$read) {
    function read(fd, buffer, offset, length, position, callback_) {
      var callback;
      if (callback_ && typeof callback_ === 'function') {
        var eagCounter = 0;
        callback = function (er, _, __) {
          if (er && er.code === 'EAGAIN' && eagCounter < 10) {
            eagCounter++;
            return fs$read.call(fs, fd, buffer, offset, length, position, callback);
          }
          callback_.apply(this, arguments);
        };
      }
      return fs$read.call(fs, fd, buffer, offset, length, position, callback);
    }

    // This ensures `util.promisify` works as it does for native `fs.read`.
    read.__proto__ = fs$read;
    return read;
  }(fs.read);
  fs.readSync = function (fs$readSync) {
    return function (fd, buffer, offset, length, position) {
      var eagCounter = 0;
      while (true) {
        try {
          return fs$readSync.call(fs, fd, buffer, offset, length, position);
        } catch (er) {
          if (er.code === 'EAGAIN' && eagCounter < 10) {
            eagCounter++;
            continue;
          }
          throw er;
        }
      }
    };
  }(fs.readSync);
  function patchLchmod(fs) {
    fs.lchmod = function (path, mode, callback) {
      fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, mode, function (err, fd) {
        if (err) {
          if (callback) callback(err);
          return;
        }
        // prefer to return the chmod error, if one occurs,
        // but still try to close, and report closing errors if they occur.
        fs.fchmod(fd, mode, function (err) {
          fs.close(fd, function (err2) {
            if (callback) callback(err || err2);
          });
        });
      });
    };
    fs.lchmodSync = function (path, mode) {
      var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);

      // prefer to return the chmod error, if one occurs,
      // but still try to close, and report closing errors if they occur.
      var threw = true;
      var ret;
      try {
        ret = fs.fchmodSync(fd, mode);
        threw = false;
      } finally {
        if (threw) {
          try {
            fs.closeSync(fd);
          } catch (er) {}
        } else {
          fs.closeSync(fd);
        }
      }
      return ret;
    };
  }
  function patchLutimes(fs) {
    if (constants.hasOwnProperty("O_SYMLINK")) {
      fs.lutimes = function (path, at, mt, cb) {
        fs.open(path, constants.O_SYMLINK, function (er, fd) {
          if (er) {
            if (cb) cb(er);
            return;
          }
          fs.futimes(fd, at, mt, function (er) {
            fs.close(fd, function (er2) {
              if (cb) cb(er || er2);
            });
          });
        });
      };
      fs.lutimesSync = function (path, at, mt) {
        var fd = fs.openSync(path, constants.O_SYMLINK);
        var ret;
        var threw = true;
        try {
          ret = fs.futimesSync(fd, at, mt);
          threw = false;
        } finally {
          if (threw) {
            try {
              fs.closeSync(fd);
            } catch (er) {}
          } else {
            fs.closeSync(fd);
          }
        }
        return ret;
      };
    } else {
      fs.lutimes = function (_a, _b, _c, cb) {
        if (cb) process.nextTick(cb);
      };
      fs.lutimesSync = function () {};
    }
  }
  function chmodFix(orig) {
    if (!orig) return orig;
    return function (target, mode, cb) {
      return orig.call(fs, target, mode, function (er) {
        if (chownErOk(er)) er = null;
        if (cb) cb.apply(this, arguments);
      });
    };
  }
  function chmodFixSync(orig) {
    if (!orig) return orig;
    return function (target, mode) {
      try {
        return orig.call(fs, target, mode);
      } catch (er) {
        if (!chownErOk(er)) throw er;
      }
    };
  }
  function chownFix(orig) {
    if (!orig) return orig;
    return function (target, uid, gid, cb) {
      return orig.call(fs, target, uid, gid, function (er) {
        if (chownErOk(er)) er = null;
        if (cb) cb.apply(this, arguments);
      });
    };
  }
  function chownFixSync(orig) {
    if (!orig) return orig;
    return function (target, uid, gid) {
      try {
        return orig.call(fs, target, uid, gid);
      } catch (er) {
        if (!chownErOk(er)) throw er;
      }
    };
  }
  function statFix(orig) {
    if (!orig) return orig;
    // Older versions of Node erroneously returned signed integers for
    // uid + gid.
    return function (target, options, cb) {
      if (typeof options === 'function') {
        cb = options;
        options = null;
      }
      function callback(er, stats) {
        if (stats) {
          if (stats.uid < 0) stats.uid += 0x100000000;
          if (stats.gid < 0) stats.gid += 0x100000000;
        }
        if (cb) cb.apply(this, arguments);
      }
      return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
    };
  }
  function statFixSync(orig) {
    if (!orig) return orig;
    // Older versions of Node erroneously returned signed integers for
    // uid + gid.
    return function (target, options) {
      var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
      if (stats.uid < 0) stats.uid += 0x100000000;
      if (stats.gid < 0) stats.gid += 0x100000000;
      return stats;
    };
  }

  // ENOSYS means that the fs doesn't support the op. Just ignore
  // that, because it doesn't matter.
  //
  // if there's no getuid, or if getuid() is something other
  // than 0, and the error is EINVAL or EPERM, then just ignore
  // it.
  //
  // This specific case is a silent failure in cp, install, tar,
  // and most other unix tools that manage permissions.
  //
  // When running as root, or if other types of errors are
  // encountered, then it's strict.
  function chownErOk(er) {
    if (!er) return true;
    if (er.code === "ENOSYS") return true;
    var nonroot = !process.getuid || process.getuid() !== 0;
    if (nonroot) {
      if (er.code === "EINVAL" || er.code === "EPERM") return true;
    }
    return false;
  }
}

/***/ }),

/***/ 7461:
/*!************************************!*\
  !*** ../app/node_modules/mz/fs.js ***!
  \************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

var Promise = __webpack_require__(/*! any-promise */ 7154);
var fs;
try {
  fs = __webpack_require__(/*! graceful-fs */ 4389);
} catch (err) {
  fs = __webpack_require__(/*! fs */ 2089);
}
var api = ['appendFile', 'chmod', 'chown', 'close', 'fchmod', 'fchown', 'fdatasync', 'fstat', 'fsync', 'ftruncate', 'futimes', 'lchown', 'link', 'lstat', 'mkdir', 'open', 'read', 'readFile', 'readdir', 'readlink', 'realpath', 'rename', 'rmdir', 'stat', 'symlink', 'truncate', 'unlink', 'utimes', 'write', 'writeFile'];
typeof fs.access === 'function' && api.push('access');
typeof fs.copyFile === 'function' && api.push('copyFile');
typeof fs.mkdtemp === 'function' && api.push('mkdtemp');
(__webpack_require__(/*! thenify-all */ 5547).withCallback)(fs, exports, api);
exports.exists = function (filename, callback) {
  // callback
  if (typeof callback === 'function') {
    return fs.stat(filename, function (err) {
      callback(null, !err);
    });
  }
  // or promise
  return new Promise(function (resolve) {
    fs.stat(filename, function (err) {
      resolve(!err);
    });
  });
};

/***/ }),

/***/ 5547:
/*!************************************************!*\
  !*** ../app/node_modules/thenify-all/index.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var thenify = __webpack_require__(/*! thenify */ 1504);
module.exports = thenifyAll;
thenifyAll.withCallback = withCallback;
thenifyAll.thenify = thenify;

/**
 * Promisifies all the selected functions in an object.
 *
 * @param {Object} source the source object for the async functions
 * @param {Object} [destination] the destination to set all the promisified methods
 * @param {Array} [methods] an array of method names of `source`
 * @return {Object}
 * @api public
 */

function thenifyAll(source, destination, methods) {
  return promisifyAll(source, destination, methods, thenify);
}

/**
 * Promisifies all the selected functions in an object and backward compatible with callback.
 *
 * @param {Object} source the source object for the async functions
 * @param {Object} [destination] the destination to set all the promisified methods
 * @param {Array} [methods] an array of method names of `source`
 * @return {Object}
 * @api public
 */

function withCallback(source, destination, methods) {
  return promisifyAll(source, destination, methods, thenify.withCallback);
}
function promisifyAll(source, destination, methods, promisify) {
  if (!destination) {
    destination = {};
    methods = Object.keys(source);
  }
  if (Array.isArray(destination)) {
    methods = destination;
    destination = {};
  }
  if (!methods) {
    methods = Object.keys(source);
  }
  if (typeof source === 'function') destination = promisify(source);
  methods.forEach(function (name) {
    // promisify only if it's a function
    if (typeof source[name] === 'function') destination[name] = promisify(source[name]);
  });

  // proxy the rest
  Object.keys(source).forEach(function (name) {
    if (deprecated(source, name)) return;
    if (destination[name]) return;
    destination[name] = source[name];
  });
  return destination;
}
function deprecated(source, name) {
  var desc = Object.getOwnPropertyDescriptor(source, name);
  if (!desc || !desc.get) return false;
  if (desc.get.name === 'deprecated') return true;
  return false;
}

/***/ }),

/***/ 1504:
/*!********************************************!*\
  !*** ../app/node_modules/thenify/index.js ***!
  \********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Promise = __webpack_require__(/*! any-promise */ 7154);
var assert = __webpack_require__(/*! assert */ 9491);
module.exports = thenify;

/**
 * Turn async functions into promises
 *
 * @param {Function} fn
 * @return {Function}
 * @api public
 */

function thenify(fn, options) {
  assert(typeof fn === 'function');
  return createWrapper(fn, options);
}

/**
 * Turn async functions into promises and backward compatible with callback
 *
 * @param {Function} fn
 * @return {Function}
 * @api public
 */

thenify.withCallback = function (fn, options) {
  assert(typeof fn === 'function');
  options = options || {};
  options.withCallback = true;
  return createWrapper(fn, options);
};
function createCallback(resolve, reject, multiArgs) {
  // default to true
  if (multiArgs === undefined) multiArgs = true;
  return function (err, value) {
    if (err) return reject(err);
    var length = arguments.length;
    if (length <= 2 || !multiArgs) return resolve(value);
    if (Array.isArray(multiArgs)) {
      var values = {};
      for (var i = 1; i < length; i++) values[multiArgs[i - 1]] = arguments[i];
      return resolve(values);
    }
    var values = new Array(length - 1);
    for (var i = 1; i < length; ++i) values[i - 1] = arguments[i];
    resolve(values);
  };
}
function createWrapper(fn, options) {
  options = options || {};
  var name = fn.name;
  name = (name || '').replace(/\s|bound(?!$)/g, '');
  var newFn = function () {
    var self = this;
    var len = arguments.length;
    if (options.withCallback) {
      var lastType = typeof arguments[len - 1];
      if (lastType === 'function') return fn.apply(self, arguments);
    }
    var args = new Array(len + 1);
    for (var i = 0; i < len; ++i) args[i] = arguments[i];
    var lastIndex = i;
    return new Promise(function (resolve, reject) {
      args[lastIndex] = createCallback(resolve, reject, options.multiArgs);
      fn.apply(self, args);
    });
  };
  Object.defineProperty(newFn, 'name', {
    value: name
  });
  return newFn;
}

/***/ }),

/***/ 7529:
/*!******************************************************!*\
  !*** ../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");
};

/***/ }),

/***/ 6830:
/*!********************************************!*\
  !*** ../node_modules/shell-quote/index.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, exports) => {

"use strict";
var __webpack_unused_export__;


__webpack_unused_export__ = function (xs) {
  return xs.map(function (s) {
    if (s && typeof s === 'object') {
      return s.op.replace(/(.)/g, '\\$1');
    } else if (/["\s]/.test(s) && !/'/.test(s)) {
      return "'" + s.replace(/(['\\])/g, '\\$1') + "'";
    } else if (/["'\s]/.test(s)) {
      return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"';
    }
    return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2');
  }).join(' ');
};

// '<(' is process substitution operator and
// can be parsed the same as control operator
var CONTROL = '(?:' + ['\\|\\|', '\\&\\&', ';;', '\\|\\&', '\\<\\(', '>>', '>\\&', '[&;()|<>]'].join('|') + ')';
var META = '|&;()<> \\t';
var BAREWORD = '(\\\\[\'"' + META + ']|[^\\s\'"' + META + '])+';
var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
var DOUBLE_QUOTE = '\'((\\\\\'|[^\'])*?)\'';
var TOKEN = '';
for (var i = 0; i < 4; i++) {
  TOKEN += (Math.pow(16, 8) * Math.random()).toString(16);
}
function parse(s, env, opts) {
  var chunker = new RegExp(['(' + CONTROL + ')',
  // control chars
  '(' + BAREWORD + '|' + SINGLE_QUOTE + '|' + DOUBLE_QUOTE + ')*'].join('|'), 'g');
  var match = s.match(chunker).filter(Boolean);
  if (!match) {
    return [];
  }
  if (!env) {
    env = {};
  }
  if (!opts) {
    opts = {};
  }
  var commented = false;
  function getVar(_, pre, key) {
    var r = typeof env === 'function' ? env(key) : env[key];
    if (r === undefined && key != '') {
      r = '';
    } else if (r === undefined) {
      r = '$';
    }
    if (typeof r === 'object') {
      return pre + TOKEN + JSON.stringify(r) + TOKEN;
    }
    return pre + r;
  }
  return match.map(function (s, j) {
    if (commented) {
      return void undefined;
    }
    if (RegExp('^' + CONTROL + '$').test(s)) {
      return {
        op: s
      };
    }

    // Hand-written scanner/parser for Bash quoting rules:
    //
    // 1. inside single quotes, all characters are printed literally.
    // 2. inside double quotes, all characters are printed literally
    //    except variables prefixed by '$' and backslashes followed by
    //    either a double quote or another backslash.
    // 3. outside of any quotes, backslashes are treated as escape
    //    characters and not printed (unless they are themselves escaped)
    // 4. quote context can switch mid-token if there is no whitespace
    //     between the two quote contexts (e.g. all'one'"token" parses as
    //     "allonetoken")
    var SQ = "'";
    var DQ = '"';
    var DS = '$';
    var BS = opts.escape || '\\';
    var quote = false;
    var esc = false;
    var out = '';
    var isGlob = false;
    var i;
    function parseEnvVar() {
      i += 1;
      var varend;
      var varname;
      // debugger
      if (s.charAt(i) === '{') {
        i += 1;
        if (s.charAt(i) === '}') {
          throw new Error('Bad substitution: ' + s.substr(i - 2, 3));
        }
        varend = s.indexOf('}', i);
        if (varend < 0) {
          throw new Error('Bad substitution: ' + s.substr(i));
        }
        varname = s.substr(i, varend - i);
        i = varend;
      } else if (/[*@#?$!_-]/.test(s.charAt(i))) {
        varname = s.charAt(i);
        i += 1;
      } else {
        varend = s.substr(i).match(/[^\w\d_]/);
        if (!varend) {
          varname = s.substr(i);
          i = s.length;
        } else {
          varname = s.substr(i, varend.index);
          i += varend.index - 1;
        }
      }
      return getVar(null, '', varname);
    }
    for (i = 0; i < s.length; i++) {
      var c = s.charAt(i);
      isGlob = isGlob || !quote && (c === '*' || c === '?');
      if (esc) {
        out += c;
        esc = false;
      } else if (quote) {
        if (c === quote) {
          quote = false;
        } else if (quote == SQ) {
          out += c;
        } else {
          // Double quote
          if (c === BS) {
            i += 1;
            c = s.charAt(i);
            if (c === DQ || c === BS || c === DS) {
              out += c;
            } else {
              out += BS + c;
            }
          } else if (c === DS) {
            out += parseEnvVar();
          } else {
            out += c;
          }
        }
      } else if (c === DQ || c === SQ) {
        quote = c;
      } else if (RegExp('^' + CONTROL + '$').test(c)) {
        return {
          op: s
        };
      } else if (/^#$/.test(c)) {
        commented = true;
        if (out.length) {
          return [out, {
            comment: s.slice(i + 1) + match.slice(j + 1).join(' ')
          }];
        }
        return [{
          comment: s.slice(i + 1) + match.slice(j + 1).join(' ')
        }];
      } else if (c === BS) {
        esc = true;
      } else if (c === DS) {
        out += parseEnvVar();
      } else {
        out += c;
      }
    }
    if (isGlob) {
      return {
        op: 'glob',
        pattern: out
      };
    }
    return out;
  }).reduce(function (prev, arg) {
    // finalize parsed aruments
    if (arg === undefined) {
      return prev;
    }
    return prev.concat(arg);
  }, []);
}
exports.Q = function (s, env, opts) {
  var mapped = parse(s, env, opts);
  if (typeof env !== 'function') {
    return mapped;
  }
  return mapped.reduce(function (acc, s) {
    if (typeof s === 'object') {
      return acc.concat(s);
    }
    var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g'));
    if (xs.length === 1) {
      return acc.concat(xs[0]);
    }
    return acc.concat(xs.filter(Boolean).map(function (x) {
      if (RegExp('^' + TOKEN).test(x)) {
        return JSON.parse(x.split(TOKEN)[1]);
      }
      return x;
    }));
  }, []);
};

/***/ }),

/***/ 8635:
/*!***********************************************!*\
  !*** ../node_modules/thenby/thenBy.module.js ***!
  \***********************************************/
/***/ ((module) => {

/***
   Copyright 2013 Teun Duynstee

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
module.exports = function () {
  function identity(v) {
    return v;
  }
  function ignoreCase(v) {
    return typeof v === "string" ? v.toLowerCase() : v;
  }
  function makeCompareFunction(f, opt) {
    opt = typeof opt === "object" ? opt : {
      direction: opt
    };
    if (typeof f != "function") {
      var prop = f;
      // make unary function
      f = function (v1) {
        return !!v1[prop] ? v1[prop] : "";
      };
    }
    if (f.length === 1) {
      // f is a unary function mapping a single item to its sort score
      var uf = f;
      var preprocess = opt.ignoreCase ? ignoreCase : identity;
      var cmp = opt.cmp || function (v1, v2) {
        return v1 < v2 ? -1 : v1 > v2 ? 1 : 0;
      };
      f = function (v1, v2) {
        return cmp(preprocess(uf(v1)), preprocess(uf(v2)));
      };
    }
    const descTokens = {
      "-1": '',
      desc: ''
    };
    if (opt.direction in descTokens) return function (v1, v2) {
      return -f(v1, v2);
    };
    return f;
  }

  /* adds a secondary compare function to the target function (`this` context)
     which is applied in case the first one returns 0 (equal)
     returns a new compare function, which has a `thenBy` method as well */
  function tb(func, opt) {
    /* should get value false for the first call. This can be done by calling the 
    exported function, or the firstBy property on it (for es6 module compatibility)
    */
    var x = typeof this == "function" && !this.firstBy ? this : false;
    var y = makeCompareFunction(func, opt);
    var f = x ? function (a, b) {
      return x(a, b) || y(a, b);
    } : y;
    f.thenBy = tb;
    return f;
  }
  tb.firstBy = tb;
  return tb;
}();

/***/ }),

/***/ 4596:
/*!*******************************************!*\
  !*** ./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 */ 3569);
  colors.define = define;
  return colors;
};
module.exports = create();
module.exports.create = create;

/***/ }),

/***/ 3569:
/*!*********************************************!*\
  !*** ./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
});

/***/ }),

/***/ 3040:
/*!**********************************************!*\
  !*** ./node_modules/balanced-match/index.js ***!
  \**********************************************/
/***/ ((module) => {

"use strict";


module.exports = balanced;
function balanced(a, b, str) {
  if (a instanceof RegExp) a = maybeMatch(a, str);
  if (b instanceof RegExp) b = maybeMatch(b, str);
  var r = range(a, b, str);
  return r && {
    start: r[0],
    end: r[1],
    pre: str.slice(0, r[0]),
    body: str.slice(r[0] + a.length, r[1]),
    post: str.slice(r[1] + b.length)
  };
}
function maybeMatch(reg, str) {
  var m = str.match(reg);
  return m ? m[0] : null;
}
balanced.range = range;
function range(a, b, str) {
  var begs, beg, left, right, result;
  var ai = str.indexOf(a);
  var bi = str.indexOf(b, ai + 1);
  var i = ai;
  if (ai >= 0 && bi > 0) {
    begs = [];
    left = str.length;
    while (i >= 0 && !result) {
      if (i == ai) {
        begs.push(i);
        ai = str.indexOf(a, i + 1);
      } else if (begs.length == 1) {
        result = [begs.pop(), bi];
      } else {
        beg = begs.pop();
        if (beg < left) {
          left = beg;
          right = bi;
        }
        bi = str.indexOf(b, i + 1);
      }
      i = ai < bi && ai >= 0 ? ai : bi;
    }
    if (begs.length) {
      result = [left, right];
    }
  }
  return result;
}

/***/ }),

/***/ 3297:
/*!***********************************************!*\
  !*** ./node_modules/brace-expansion/index.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var concatMap = __webpack_require__(/*! concat-map */ 5877);
var balanced = __webpack_require__(/*! balanced-match */ 3040);
module.exports = expandTop;
var escSlash = '\0SLASH' + Math.random() + '\0';
var escOpen = '\0OPEN' + Math.random() + '\0';
var escClose = '\0CLOSE' + Math.random() + '\0';
var escComma = '\0COMMA' + Math.random() + '\0';
var escPeriod = '\0PERIOD' + Math.random() + '\0';
function numeric(str) {
  return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
}
function escapeBraces(str) {
  return str.split('\\\\').join(escSlash).split('\\{').join(escOpen).split('\\}').join(escClose).split('\\,').join(escComma).split('\\.').join(escPeriod);
}
function unescapeBraces(str) {
  return str.split(escSlash).join('\\').split(escOpen).join('{').split(escClose).join('}').split(escComma).join(',').split(escPeriod).join('.');
}

// Basically just str.split(","), but handling cases
// where we have nested braced sections, which should be
// treated as individual members, like {a,{b,c},d}
function parseCommaParts(str) {
  if (!str) return [''];
  var parts = [];
  var m = balanced('{', '}', str);
  if (!m) return str.split(',');
  var pre = m.pre;
  var body = m.body;
  var post = m.post;
  var p = pre.split(',');
  p[p.length - 1] += '{' + body + '}';
  var postParts = parseCommaParts(post);
  if (post.length) {
    p[p.length - 1] += postParts.shift();
    p.push.apply(p, postParts);
  }
  parts.push.apply(parts, p);
  return parts;
}
function expandTop(str) {
  if (!str) return [];

  // I don't know why Bash 4.3 does this, but it does.
  // Anything starting with {} will have the first two bytes preserved
  // but *only* at the top level, so {},a}b will not expand to anything,
  // but a{},b}c will be expanded to [a}c,abc].
  // One could argue that this is a bug in Bash, but since the goal of
  // this module is to match Bash's rules, we escape a leading {}
  if (str.substr(0, 2) === '{}') {
    str = '\\{\\}' + str.substr(2);
  }
  return expand(escapeBraces(str), true).map(unescapeBraces);
}
function identity(e) {
  return e;
}
function embrace(str) {
  return '{' + str + '}';
}
function isPadded(el) {
  return /^-?0\d/.test(el);
}
function lte(i, y) {
  return i <= y;
}
function gte(i, y) {
  return i >= y;
}
function expand(str, isTop) {
  var expansions = [];
  var m = balanced('{', '}', str);
  if (!m || /\$$/.test(m.pre)) return [str];
  var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
  var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
  var isSequence = isNumericSequence || isAlphaSequence;
  var isOptions = m.body.indexOf(',') >= 0;
  if (!isSequence && !isOptions) {
    // {a},b}
    if (m.post.match(/,.*\}/)) {
      str = m.pre + '{' + m.body + escClose + m.post;
      return expand(str);
    }
    return [str];
  }
  var n;
  if (isSequence) {
    n = m.body.split(/\.\./);
  } else {
    n = parseCommaParts(m.body);
    if (n.length === 1) {
      // x{{a,b}}y ==> x{a}y x{b}y
      n = expand(n[0], false).map(embrace);
      if (n.length === 1) {
        var post = m.post.length ? expand(m.post, false) : [''];
        return post.map(function (p) {
          return m.pre + n[0] + p;
        });
      }
    }
  }

  // at this point, n is the parts, and we know it's not a comma set
  // with a single entry.

  // no need to expand pre, since it is guaranteed to be free of brace-sets
  var pre = m.pre;
  var post = m.post.length ? expand(m.post, false) : [''];
  var N;
  if (isSequence) {
    var x = numeric(n[0]);
    var y = numeric(n[1]);
    var width = Math.max(n[0].length, n[1].length);
    var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
    var test = lte;
    var reverse = y < x;
    if (reverse) {
      incr *= -1;
      test = gte;
    }
    var pad = n.some(isPadded);
    N = [];
    for (var i = x; test(i, y); i += incr) {
      var c;
      if (isAlphaSequence) {
        c = String.fromCharCode(i);
        if (c === '\\') c = '';
      } else {
        c = String(i);
        if (pad) {
          var need = width - c.length;
          if (need > 0) {
            var z = new Array(need + 1).join('0');
            if (i < 0) c = '-' + z + c.slice(1);else c = z + c;
          }
        }
      }
      N.push(c);
    }
  } else {
    N = concatMap(n, function (el) {
      return expand(el, false);
    });
  }
  for (var j = 0; j < N.length; j++) {
    for (var k = 0; k < post.length; k++) {
      var expansion = pre + N[j] + post[k];
      if (!isTop || isSequence || expansion) expansions.push(expansion);
    }
  }
  return expansions;
}

/***/ }),

/***/ 5877:
/*!******************************************!*\
  !*** ./node_modules/concat-map/index.js ***!
  \******************************************/
/***/ ((module) => {

module.exports = function (xs, fn) {
  var res = [];
  for (var i = 0; i < xs.length; i++) {
    var x = fn(xs[i], i);
    if (isArray(x)) res.push.apply(res, x);else res.push(x);
  }
  return res;
};
var isArray = Array.isArray || function (xs) {
  return Object.prototype.toString.call(xs) === '[object Array]';
};

/***/ }),

/***/ 7990:
/*!*******************************************!*\
  !*** ./node_modules/fs.realpath/index.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = realpath;
realpath.realpath = realpath;
realpath.sync = realpathSync;
realpath.realpathSync = realpathSync;
realpath.monkeypatch = monkeypatch;
realpath.unmonkeypatch = unmonkeypatch;
var fs = __webpack_require__(/*! fs */ 2089);
var origRealpath = fs.realpath;
var origRealpathSync = fs.realpathSync;
var version = process.version;
var ok = /^v[0-5]\./.test(version);
var old = __webpack_require__(/*! ./old.js */ 6734);
function newError(er) {
  return er && er.syscall === 'realpath' && (er.code === 'ELOOP' || er.code === 'ENOMEM' || er.code === 'ENAMETOOLONG');
}
function realpath(p, cache, cb) {
  if (ok) {
    return origRealpath(p, cache, cb);
  }
  if (typeof cache === 'function') {
    cb = cache;
    cache = null;
  }
  origRealpath(p, cache, function (er, result) {
    if (newError(er)) {
      old.realpath(p, cache, cb);
    } else {
      cb(er, result);
    }
  });
}
function realpathSync(p, cache) {
  if (ok) {
    return origRealpathSync(p, cache);
  }
  try {
    return origRealpathSync(p, cache);
  } catch (er) {
    if (newError(er)) {
      return old.realpathSync(p, cache);
    } else {
      throw er;
    }
  }
}
function monkeypatch() {
  fs.realpath = realpath;
  fs.realpathSync = realpathSync;
}
function unmonkeypatch() {
  fs.realpath = origRealpath;
  fs.realpathSync = origRealpathSync;
}

/***/ }),

/***/ 6734:
/*!*****************************************!*\
  !*** ./node_modules/fs.realpath/old.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var pathModule = __webpack_require__(/*! path */ 3056);
var isWindows = process.platform === 'win32';
var fs = __webpack_require__(/*! fs */ 2089);

// JavaScript implementation of realpath, ported from node pre-v6

var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
function rethrow() {
  // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
  // is fairly slow to generate.
  var callback;
  if (DEBUG) {
    var backtrace = new Error();
    callback = debugCallback;
  } else callback = missingCallback;
  return callback;
  function debugCallback(err) {
    if (err) {
      backtrace.message = err.message;
      err = backtrace;
      missingCallback(err);
    }
  }
  function missingCallback(err) {
    if (err) {
      if (process.throwDeprecation) throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      else if (!process.noDeprecation) {
        var msg = 'fs: missing callback ' + (err.stack || err.message);
        if (process.traceDeprecation) console.trace(msg);else console.error(msg);
      }
    }
  }
}
function maybeCallback(cb) {
  return typeof cb === 'function' ? cb : rethrow();
}
var normalize = pathModule.normalize;

// Regexp that finds the next partion of a (partial) path
// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
if (isWindows) {
  var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
} else {
  var nextPartRe = /(.*?)(?:[\/]+|$)/g;
}

// Regex to find the device root, including trailing slash. E.g. 'c:\\'.
if (isWindows) {
  var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
} else {
  var splitRootRe = /^[\/]*/;
}
exports.realpathSync = function realpathSync(p, cache) {
  // make p is absolute
  p = pathModule.resolve(p);
  if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
    return cache[p];
  }
  var original = p,
    seenLinks = {},
    knownHard = {};

  // current character position in p
  var pos;
  // the partial path so far, including a trailing slash if any
  var current;
  // the partial path without a trailing slash (except when pointing at a root)
  var base;
  // the partial path scanned in the previous round, with slash
  var previous;
  start();
  function start() {
    // Skip over roots
    var m = splitRootRe.exec(p);
    pos = m[0].length;
    current = m[0];
    base = m[0];
    previous = '';

    // On windows, check that the root exists. On unix there is no need.
    if (isWindows && !knownHard[base]) {
      fs.lstatSync(base);
      knownHard[base] = true;
    }
  }

  // walk down the path, swapping out linked pathparts for their real
  // values
  // NB: p.length changes.
  while (pos < p.length) {
    // find the next part
    nextPartRe.lastIndex = pos;
    var result = nextPartRe.exec(p);
    previous = current;
    current += result[0];
    base = previous + result[1];
    pos = nextPartRe.lastIndex;

    // continue if not a symlink
    if (knownHard[base] || cache && cache[base] === base) {
      continue;
    }
    var resolvedLink;
    if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
      // some known symbolic link.  no need to stat again.
      resolvedLink = cache[base];
    } else {
      var stat = fs.lstatSync(base);
      if (!stat.isSymbolicLink()) {
        knownHard[base] = true;
        if (cache) cache[base] = base;
        continue;
      }

      // read the link if it wasn't read before
      // dev/ino always return 0 on windows, so skip the check.
      var linkTarget = null;
      if (!isWindows) {
        var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
        if (seenLinks.hasOwnProperty(id)) {
          linkTarget = seenLinks[id];
        }
      }
      if (linkTarget === null) {
        fs.statSync(base);
        linkTarget = fs.readlinkSync(base);
      }
      resolvedLink = pathModule.resolve(previous, linkTarget);
      // track this, if given a cache.
      if (cache) cache[base] = resolvedLink;
      if (!isWindows) seenLinks[id] = linkTarget;
    }

    // resolve the link, then start over
    p = pathModule.resolve(resolvedLink, p.slice(pos));
    start();
  }
  if (cache) cache[original] = p;
  return p;
};
exports.realpath = function realpath(p, cache, cb) {
  if (typeof cb !== 'function') {
    cb = maybeCallback(cache);
    cache = null;
  }

  // make p is absolute
  p = pathModule.resolve(p);
  if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
    return process.nextTick(cb.bind(null, null, cache[p]));
  }
  var original = p,
    seenLinks = {},
    knownHard = {};

  // current character position in p
  var pos;
  // the partial path so far, including a trailing slash if any
  var current;
  // the partial path without a trailing slash (except when pointing at a root)
  var base;
  // the partial path scanned in the previous round, with slash
  var previous;
  start();
  function start() {
    // Skip over roots
    var m = splitRootRe.exec(p);
    pos = m[0].length;
    current = m[0];
    base = m[0];
    previous = '';

    // On windows, check that the root exists. On unix there is no need.
    if (isWindows && !knownHard[base]) {
      fs.lstat(base, function (err) {
        if (err) return cb(err);
        knownHard[base] = true;
        LOOP();
      });
    } else {
      process.nextTick(LOOP);
    }
  }

  // walk down the path, swapping out linked pathparts for their real
  // values
  function LOOP() {
    // stop if scanned past end of path
    if (pos >= p.length) {
      if (cache) cache[original] = p;
      return cb(null, p);
    }

    // find the next part
    nextPartRe.lastIndex = pos;
    var result = nextPartRe.exec(p);
    previous = current;
    current += result[0];
    base = previous + result[1];
    pos = nextPartRe.lastIndex;

    // continue if not a symlink
    if (knownHard[base] || cache && cache[base] === base) {
      return process.nextTick(LOOP);
    }
    if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
      // known symbolic link.  no need to stat again.
      return gotResolvedLink(cache[base]);
    }
    return fs.lstat(base, gotStat);
  }
  function gotStat(err, stat) {
    if (err) return cb(err);

    // if not a symlink, skip to the next path part
    if (!stat.isSymbolicLink()) {
      knownHard[base] = true;
      if (cache) cache[base] = base;
      return process.nextTick(LOOP);
    }

    // stat & read the link if not read before
    // call gotTarget as soon as the link target is known
    // dev/ino always return 0 on windows, so skip the check.
    if (!isWindows) {
      var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
      if (seenLinks.hasOwnProperty(id)) {
        return gotTarget(null, seenLinks[id], base);
      }
    }
    fs.stat(base, function (err) {
      if (err) return cb(err);
      fs.readlink(base, function (err, target) {
        if (!isWindows) seenLinks[id] = target;
        gotTarget(err, target);
      });
    });
  }
  function gotTarget(err, target, base) {
    if (err) return cb(err);
    var resolvedLink = pathModule.resolve(previous, target);
    if (cache) cache[base] = resolvedLink;
    gotResolvedLink(resolvedLink);
  }
  function gotResolvedLink(resolvedLink) {
    // resolve the link, then start over
    p = pathModule.resolve(resolvedLink, p.slice(pos));
    start();
  }
};

/***/ }),

/***/ 6064:
/*!*************************************!*\
  !*** ./node_modules/glob/common.js ***!
  \*************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

exports.setopts = setopts;
exports.ownProp = ownProp;
exports.makeAbs = makeAbs;
exports.finish = finish;
exports.mark = mark;
exports.isIgnored = isIgnored;
exports.childrenIgnored = childrenIgnored;
function ownProp(obj, field) {
  return Object.prototype.hasOwnProperty.call(obj, field);
}
var fs = __webpack_require__(/*! fs */ 2089);
var path = __webpack_require__(/*! path */ 3056);
var minimatch = __webpack_require__(/*! minimatch */ 6091);
var isAbsolute = __webpack_require__(/*! path-is-absolute */ 5450);
var Minimatch = minimatch.Minimatch;
function alphasort(a, b) {
  return a.localeCompare(b, 'en');
}
function setupIgnores(self, options) {
  self.ignore = options.ignore || [];
  if (!Array.isArray(self.ignore)) self.ignore = [self.ignore];
  if (self.ignore.length) {
    self.ignore = self.ignore.map(ignoreMap);
  }
}

// ignore patterns are always in dot:true mode.
function ignoreMap(pattern) {
  var gmatcher = null;
  if (pattern.slice(-3) === '/**') {
    var gpattern = pattern.replace(/(\/\*\*)+$/, '');
    gmatcher = new Minimatch(gpattern, {
      dot: true
    });
  }
  return {
    matcher: new Minimatch(pattern, {
      dot: true
    }),
    gmatcher: gmatcher
  };
}
function setopts(self, pattern, options) {
  if (!options) options = {};

  // base-matching: just use globstar for that.
  if (options.matchBase && -1 === pattern.indexOf("/")) {
    if (options.noglobstar) {
      throw new Error("base matching requires globstar");
    }
    pattern = "**/" + pattern;
  }
  self.silent = !!options.silent;
  self.pattern = pattern;
  self.strict = options.strict !== false;
  self.realpath = !!options.realpath;
  self.realpathCache = options.realpathCache || Object.create(null);
  self.follow = !!options.follow;
  self.dot = !!options.dot;
  self.mark = !!options.mark;
  self.nodir = !!options.nodir;
  if (self.nodir) self.mark = true;
  self.sync = !!options.sync;
  self.nounique = !!options.nounique;
  self.nonull = !!options.nonull;
  self.nosort = !!options.nosort;
  self.nocase = !!options.nocase;
  self.stat = !!options.stat;
  self.noprocess = !!options.noprocess;
  self.absolute = !!options.absolute;
  self.fs = options.fs || fs;
  self.maxLength = options.maxLength || Infinity;
  self.cache = options.cache || Object.create(null);
  self.statCache = options.statCache || Object.create(null);
  self.symlinks = options.symlinks || Object.create(null);
  setupIgnores(self, options);
  self.changedCwd = false;
  var cwd = process.cwd();
  if (!ownProp(options, "cwd")) self.cwd = cwd;else {
    self.cwd = path.resolve(options.cwd);
    self.changedCwd = self.cwd !== cwd;
  }
  self.root = options.root || path.resolve(self.cwd, "/");
  self.root = path.resolve(self.root);
  if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/");

  // TODO: is an absolute `cwd` supposed to be resolved against `root`?
  // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
  self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
  if (process.platform === "win32") self.cwdAbs = self.cwdAbs.replace(/\\/g, "/");
  self.nomount = !!options.nomount;

  // disable comments and negation in Minimatch.
  // Note that they are not supported in Glob itself anyway.
  options.nonegate = true;
  options.nocomment = true;
  // always treat \ in patterns as escapes, not path separators
  options.allowWindowsEscape = false;
  self.minimatch = new Minimatch(pattern, options);
  self.options = self.minimatch.options;
}
function finish(self) {
  var nou = self.nounique;
  var all = nou ? [] : Object.create(null);
  for (var i = 0, l = self.matches.length; i < l; i++) {
    var matches = self.matches[i];
    if (!matches || Object.keys(matches).length === 0) {
      if (self.nonull) {
        // do like the shell, and spit out the literal glob
        var literal = self.minimatch.globSet[i];
        if (nou) all.push(literal);else all[literal] = true;
      }
    } else {
      // had matches
      var m = Object.keys(matches);
      if (nou) all.push.apply(all, m);else m.forEach(function (m) {
        all[m] = true;
      });
    }
  }
  if (!nou) all = Object.keys(all);
  if (!self.nosort) all = all.sort(alphasort);

  // at *some* point we statted all of these
  if (self.mark) {
    for (var i = 0; i < all.length; i++) {
      all[i] = self._mark(all[i]);
    }
    if (self.nodir) {
      all = all.filter(function (e) {
        var notDir = !/\/$/.test(e);
        var c = self.cache[e] || self.cache[makeAbs(self, e)];
        if (notDir && c) notDir = c !== 'DIR' && !Array.isArray(c);
        return notDir;
      });
    }
  }
  if (self.ignore.length) all = all.filter(function (m) {
    return !isIgnored(self, m);
  });
  self.found = all;
}
function mark(self, p) {
  var abs = makeAbs(self, p);
  var c = self.cache[abs];
  var m = p;
  if (c) {
    var isDir = c === 'DIR' || Array.isArray(c);
    var slash = p.slice(-1) === '/';
    if (isDir && !slash) m += '/';else if (!isDir && slash) m = m.slice(0, -1);
    if (m !== p) {
      var mabs = makeAbs(self, m);
      self.statCache[mabs] = self.statCache[abs];
      self.cache[mabs] = self.cache[abs];
    }
  }
  return m;
}

// lotta situps...
function makeAbs(self, f) {
  var abs = f;
  if (f.charAt(0) === '/') {
    abs = path.join(self.root, f);
  } else if (isAbsolute(f) || f === '') {
    abs = f;
  } else if (self.changedCwd) {
    abs = path.resolve(self.cwd, f);
  } else {
    abs = path.resolve(f);
  }
  if (process.platform === 'win32') abs = abs.replace(/\\/g, '/');
  return abs;
}

// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
function isIgnored(self, path) {
  if (!self.ignore.length) return false;
  return self.ignore.some(function (item) {
    return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path));
  });
}
function childrenIgnored(self, path) {
  if (!self.ignore.length) return false;
  return self.ignore.some(function (item) {
    return !!(item.gmatcher && item.gmatcher.match(path));
  });
}

/***/ }),

/***/ 9953:
/*!***********************************!*\
  !*** ./node_modules/glob/glob.js ***!
  \***********************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Approach:
//
// 1. Get the minimatch set
// 2. For each pattern in the set, PROCESS(pattern, false)
// 3. Store matches per-set, then uniq them
//
// PROCESS(pattern, inGlobStar)
// Get the first [n] items from pattern that are all strings
// Join these together.  This is PREFIX.
//   If there is no more remaining, then stat(PREFIX) and
//   add to matches if it succeeds.  END.
//
// If inGlobStar and PREFIX is symlink and points to dir
//   set ENTRIES = []
// else readdir(PREFIX) as ENTRIES
//   If fail, END
//
// with ENTRIES
//   If pattern[n] is GLOBSTAR
//     // handle the case where the globstar match is empty
//     // by pruning it out, and testing the resulting pattern
//     PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
//     // handle other cases.
//     for ENTRY in ENTRIES (not dotfiles)
//       // attach globstar + tail onto the entry
//       // Mark that this entry is a globstar match
//       PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
//
//   else // not globstar
//     for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
//       Test ENTRY against pattern[n]
//       If fails, continue
//       If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
//
// Caveat:
//   Cache all stats and readdirs results to minimize syscall.  Since all
//   we ever care about is existence and directory-ness, we can just keep
//   `true` for files, and [children,...] for directories, or `false` for
//   things that don't exist.

module.exports = glob;
var rp = __webpack_require__(/*! fs.realpath */ 7990);
var minimatch = __webpack_require__(/*! minimatch */ 6091);
var Minimatch = minimatch.Minimatch;
var inherits = __webpack_require__(/*! inherits */ 7694);
var EE = (__webpack_require__(/*! events */ 2361).EventEmitter);
var path = __webpack_require__(/*! path */ 3056);
var assert = __webpack_require__(/*! assert */ 9491);
var isAbsolute = __webpack_require__(/*! path-is-absolute */ 5450);
var globSync = __webpack_require__(/*! ./sync.js */ 6109);
var common = __webpack_require__(/*! ./common.js */ 6064);
var setopts = common.setopts;
var ownProp = common.ownProp;
var inflight = __webpack_require__(/*! inflight */ 9123);
var util = __webpack_require__(/*! util */ 3837);
var childrenIgnored = common.childrenIgnored;
var isIgnored = common.isIgnored;
var once = __webpack_require__(/*! once */ 5831);
function glob(pattern, options, cb) {
  if (typeof options === 'function') cb = options, options = {};
  if (!options) options = {};
  if (options.sync) {
    if (cb) throw new TypeError('callback provided to sync glob');
    return globSync(pattern, options);
  }
  return new Glob(pattern, options, cb);
}
glob.sync = globSync;
var GlobSync = glob.GlobSync = globSync.GlobSync;

// old api surface
glob.glob = glob;
function extend(origin, add) {
  if (add === null || typeof add !== 'object') {
    return origin;
  }
  var keys = Object.keys(add);
  var i = keys.length;
  while (i--) {
    origin[keys[i]] = add[keys[i]];
  }
  return origin;
}
glob.hasMagic = function (pattern, options_) {
  var options = extend({}, options_);
  options.noprocess = true;
  var g = new Glob(pattern, options);
  var set = g.minimatch.set;
  if (!pattern) return false;
  if (set.length > 1) return true;
  for (var j = 0; j < set[0].length; j++) {
    if (typeof set[0][j] !== 'string') return true;
  }
  return false;
};
glob.Glob = Glob;
inherits(Glob, EE);
function Glob(pattern, options, cb) {
  if (typeof options === 'function') {
    cb = options;
    options = null;
  }
  if (options && options.sync) {
    if (cb) throw new TypeError('callback provided to sync glob');
    return new GlobSync(pattern, options);
  }
  if (!(this instanceof Glob)) return new Glob(pattern, options, cb);
  setopts(this, pattern, options);
  this._didRealPath = false;

  // process each pattern in the minimatch set
  var n = this.minimatch.set.length;

  // The matches are stored as {<filename>: true,...} so that
  // duplicates are automagically pruned.
  // Later, we do an Object.keys() on these.
  // Keep them as a list so we can fill in when nonull is set.
  this.matches = new Array(n);
  if (typeof cb === 'function') {
    cb = once(cb);
    this.on('error', cb);
    this.on('end', function (matches) {
      cb(null, matches);
    });
  }
  var self = this;
  this._processing = 0;
  this._emitQueue = [];
  this._processQueue = [];
  this.paused = false;
  if (this.noprocess) return this;
  if (n === 0) return done();
  var sync = true;
  for (var i = 0; i < n; i++) {
    this._process(this.minimatch.set[i], i, false, done);
  }
  sync = false;
  function done() {
    --self._processing;
    if (self._processing <= 0) {
      if (sync) {
        process.nextTick(function () {
          self._finish();
        });
      } else {
        self._finish();
      }
    }
  }
}
Glob.prototype._finish = function () {
  assert(this instanceof Glob);
  if (this.aborted) return;
  if (this.realpath && !this._didRealpath) return this._realpath();
  common.finish(this);
  this.emit('end', this.found);
};
Glob.prototype._realpath = function () {
  if (this._didRealpath) return;
  this._didRealpath = true;
  var n = this.matches.length;
  if (n === 0) return this._finish();
  var self = this;
  for (var i = 0; i < this.matches.length; i++) this._realpathSet(i, next);
  function next() {
    if (--n === 0) self._finish();
  }
};
Glob.prototype._realpathSet = function (index, cb) {
  var matchset = this.matches[index];
  if (!matchset) return cb();
  var found = Object.keys(matchset);
  var self = this;
  var n = found.length;
  if (n === 0) return cb();
  var set = this.matches[index] = Object.create(null);
  found.forEach(function (p, i) {
    // If there's a problem with the stat, then it means that
    // one or more of the links in the realpath couldn't be
    // resolved.  just return the abs value in that case.
    p = self._makeAbs(p);
    rp.realpath(p, self.realpathCache, function (er, real) {
      if (!er) set[real] = true;else if (er.syscall === 'stat') set[p] = true;else self.emit('error', er); // srsly wtf right here

      if (--n === 0) {
        self.matches[index] = set;
        cb();
      }
    });
  });
};
Glob.prototype._mark = function (p) {
  return common.mark(this, p);
};
Glob.prototype._makeAbs = function (f) {
  return common.makeAbs(this, f);
};
Glob.prototype.abort = function () {
  this.aborted = true;
  this.emit('abort');
};
Glob.prototype.pause = function () {
  if (!this.paused) {
    this.paused = true;
    this.emit('pause');
  }
};
Glob.prototype.resume = function () {
  if (this.paused) {
    this.emit('resume');
    this.paused = false;
    if (this._emitQueue.length) {
      var eq = this._emitQueue.slice(0);
      this._emitQueue.length = 0;
      for (var i = 0; i < eq.length; i++) {
        var e = eq[i];
        this._emitMatch(e[0], e[1]);
      }
    }
    if (this._processQueue.length) {
      var pq = this._processQueue.slice(0);
      this._processQueue.length = 0;
      for (var i = 0; i < pq.length; i++) {
        var p = pq[i];
        this._processing--;
        this._process(p[0], p[1], p[2], p[3]);
      }
    }
  }
};
Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
  assert(this instanceof Glob);
  assert(typeof cb === 'function');
  if (this.aborted) return;
  this._processing++;
  if (this.paused) {
    this._processQueue.push([pattern, index, inGlobStar, cb]);
    return;
  }

  //console.error('PROCESS %d', this._processing, pattern)

  // Get the first [n] parts of pattern that are all strings.
  var n = 0;
  while (typeof pattern[n] === 'string') {
    n++;
  }
  // now n is the index of the first one that is *not* a string.

  // see if there's anything else
  var prefix;
  switch (n) {
    // if not, then this is rather simple
    case pattern.length:
      this._processSimple(pattern.join('/'), index, cb);
      return;
    case 0:
      // pattern *starts* with some non-trivial item.
      // going to readdir(cwd), but not include the prefix in matches.
      prefix = null;
      break;
    default:
      // pattern has some string bits in the front.
      // whatever it starts with, whether that's 'absolute' like /foo/bar,
      // or 'relative' like '../baz'
      prefix = pattern.slice(0, n).join('/');
      break;
  }
  var remain = pattern.slice(n);

  // get the list of entries.
  var read;
  if (prefix === null) read = '.';else if (isAbsolute(prefix) || isAbsolute(pattern.map(function (p) {
    return typeof p === 'string' ? p : '[*]';
  }).join('/'))) {
    if (!prefix || !isAbsolute(prefix)) prefix = '/' + prefix;
    read = prefix;
  } else read = prefix;
  var abs = this._makeAbs(read);

  //if ignored, skip _processing
  if (childrenIgnored(this, read)) return cb();
  var isGlobStar = remain[0] === minimatch.GLOBSTAR;
  if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb);else this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb);
};
Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
  var self = this;
  this._readdir(abs, inGlobStar, function (er, entries) {
    return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
  });
};
Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
  // if the abs isn't a dir, then nothing can match!
  if (!entries) return cb();

  // It will only match dot entries if it starts with a dot, or if
  // dot is set.  Stuff like @(.foo|.bar) isn't allowed.
  var pn = remain[0];
  var negate = !!this.minimatch.negate;
  var rawGlob = pn._glob;
  var dotOk = this.dot || rawGlob.charAt(0) === '.';
  var matchedEntries = [];
  for (var i = 0; i < entries.length; i++) {
    var e = entries[i];
    if (e.charAt(0) !== '.' || dotOk) {
      var m;
      if (negate && !prefix) {
        m = !e.match(pn);
      } else {
        m = e.match(pn);
      }
      if (m) matchedEntries.push(e);
    }
  }

  //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)

  var len = matchedEntries.length;
  // If there are no matched entries, then nothing matches.
  if (len === 0) return cb();

  // if this is the last remaining pattern bit, then no need for
  // an additional stat *unless* the user has specified mark or
  // stat explicitly.  We know they exist, since readdir returned
  // them.

  if (remain.length === 1 && !this.mark && !this.stat) {
    if (!this.matches[index]) this.matches[index] = Object.create(null);
    for (var i = 0; i < len; i++) {
      var e = matchedEntries[i];
      if (prefix) {
        if (prefix !== '/') e = prefix + '/' + e;else e = prefix + e;
      }
      if (e.charAt(0) === '/' && !this.nomount) {
        e = path.join(this.root, e);
      }
      this._emitMatch(index, e);
    }
    // This was the last one, and no stats were needed
    return cb();
  }

  // now test all matched entries as stand-ins for that part
  // of the pattern.
  remain.shift();
  for (var i = 0; i < len; i++) {
    var e = matchedEntries[i];
    var newPattern;
    if (prefix) {
      if (prefix !== '/') e = prefix + '/' + e;else e = prefix + e;
    }
    this._process([e].concat(remain), index, inGlobStar, cb);
  }
  cb();
};
Glob.prototype._emitMatch = function (index, e) {
  if (this.aborted) return;
  if (isIgnored(this, e)) return;
  if (this.paused) {
    this._emitQueue.push([index, e]);
    return;
  }
  var abs = isAbsolute(e) ? e : this._makeAbs(e);
  if (this.mark) e = this._mark(e);
  if (this.absolute) e = abs;
  if (this.matches[index][e]) return;
  if (this.nodir) {
    var c = this.cache[abs];
    if (c === 'DIR' || Array.isArray(c)) return;
  }
  this.matches[index][e] = true;
  var st = this.statCache[abs];
  if (st) this.emit('stat', e, st);
  this.emit('match', e);
};
Glob.prototype._readdirInGlobStar = function (abs, cb) {
  if (this.aborted) return;

  // follow all symlinked directories forever
  // just proceed as if this is a non-globstar situation
  if (this.follow) return this._readdir(abs, false, cb);
  var lstatkey = 'lstat\0' + abs;
  var self = this;
  var lstatcb = inflight(lstatkey, lstatcb_);
  if (lstatcb) self.fs.lstat(abs, lstatcb);
  function lstatcb_(er, lstat) {
    if (er && er.code === 'ENOENT') return cb();
    var isSym = lstat && lstat.isSymbolicLink();
    self.symlinks[abs] = isSym;

    // If it's not a symlink or a dir, then it's definitely a regular file.
    // don't bother doing a readdir in that case.
    if (!isSym && lstat && !lstat.isDirectory()) {
      self.cache[abs] = 'FILE';
      cb();
    } else self._readdir(abs, false, cb);
  }
};
Glob.prototype._readdir = function (abs, inGlobStar, cb) {
  if (this.aborted) return;
  cb = inflight('readdir\0' + abs + '\0' + inGlobStar, cb);
  if (!cb) return;

  //console.error('RD %j %j', +inGlobStar, abs)
  if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs, cb);
  if (ownProp(this.cache, abs)) {
    var c = this.cache[abs];
    if (!c || c === 'FILE') return cb();
    if (Array.isArray(c)) return cb(null, c);
  }
  var self = this;
  self.fs.readdir(abs, readdirCb(this, abs, cb));
};
function readdirCb(self, abs, cb) {
  return function (er, entries) {
    if (er) self._readdirError(abs, er, cb);else self._readdirEntries(abs, entries, cb);
  };
}
Glob.prototype._readdirEntries = function (abs, entries, cb) {
  if (this.aborted) return;

  // if we haven't asked to stat everything, then just
  // assume that everything in there exists, so we can avoid
  // having to stat it a second time.
  if (!this.mark && !this.stat) {
    for (var i = 0; i < entries.length; i++) {
      var e = entries[i];
      if (abs === '/') e = abs + e;else e = abs + '/' + e;
      this.cache[e] = true;
    }
  }
  this.cache[abs] = entries;
  return cb(null, entries);
};
Glob.prototype._readdirError = function (f, er, cb) {
  if (this.aborted) return;

  // handle errors, and cache the information
  switch (er.code) {
    case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
    case 'ENOTDIR':
      // totally normal. means it *does* exist.
      var abs = this._makeAbs(f);
      this.cache[abs] = 'FILE';
      if (abs === this.cwdAbs) {
        var error = new Error(er.code + ' invalid cwd ' + this.cwd);
        error.path = this.cwd;
        error.code = er.code;
        this.emit('error', error);
        this.abort();
      }
      break;
    case 'ENOENT': // not terribly unusual
    case 'ELOOP':
    case 'ENAMETOOLONG':
    case 'UNKNOWN':
      this.cache[this._makeAbs(f)] = false;
      break;
    default:
      // some unusual error.  Treat as failure.
      this.cache[this._makeAbs(f)] = false;
      if (this.strict) {
        this.emit('error', er);
        // If the error is handled, then we abort
        // if not, we threw out of here
        this.abort();
      }
      if (!this.silent) console.error('glob error', er);
      break;
  }
  return cb();
};
Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
  var self = this;
  this._readdir(abs, inGlobStar, function (er, entries) {
    self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
  });
};
Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
  //console.error('pgs2', prefix, remain[0], entries)

  // no entries means not a dir, so it can never have matches
  // foo.txt/** doesn't match foo.txt
  if (!entries) return cb();

  // test without the globstar, and with every child both below
  // and replacing the globstar.
  var remainWithoutGlobStar = remain.slice(1);
  var gspref = prefix ? [prefix] : [];
  var noGlobStar = gspref.concat(remainWithoutGlobStar);

  // the noGlobStar pattern exits the inGlobStar state
  this._process(noGlobStar, index, false, cb);
  var isSym = this.symlinks[abs];
  var len = entries.length;

  // If it's a symlink, and we're in a globstar, then stop
  if (isSym && inGlobStar) return cb();
  for (var i = 0; i < len; i++) {
    var e = entries[i];
    if (e.charAt(0) === '.' && !this.dot) continue;

    // these two cases enter the inGlobStar state
    var instead = gspref.concat(entries[i], remainWithoutGlobStar);
    this._process(instead, index, true, cb);
    var below = gspref.concat(entries[i], remain);
    this._process(below, index, true, cb);
  }
  cb();
};
Glob.prototype._processSimple = function (prefix, index, cb) {
  // XXX review this.  Shouldn't it be doing the mounting etc
  // before doing stat?  kinda weird?
  var self = this;
  this._stat(prefix, function (er, exists) {
    self._processSimple2(prefix, index, er, exists, cb);
  });
};
Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
  //console.error('ps2', prefix, exists)

  if (!this.matches[index]) this.matches[index] = Object.create(null);

  // If it doesn't exist, then just mark the lack of results
  if (!exists) return cb();
  if (prefix && isAbsolute(prefix) && !this.nomount) {
    var trail = /[\/\\]$/.test(prefix);
    if (prefix.charAt(0) === '/') {
      prefix = path.join(this.root, prefix);
    } else {
      prefix = path.resolve(this.root, prefix);
      if (trail) prefix += '/';
    }
  }
  if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/');

  // Mark this as a match
  this._emitMatch(index, prefix);
  cb();
};

// Returns either 'DIR', 'FILE', or false
Glob.prototype._stat = function (f, cb) {
  var abs = this._makeAbs(f);
  var needDir = f.slice(-1) === '/';
  if (f.length > this.maxLength) return cb();
  if (!this.stat && ownProp(this.cache, abs)) {
    var c = this.cache[abs];
    if (Array.isArray(c)) c = 'DIR';

    // It exists, but maybe not how we need it
    if (!needDir || c === 'DIR') return cb(null, c);
    if (needDir && c === 'FILE') return cb();

    // otherwise we have to stat, because maybe c=true
    // if we know it exists, but not what it is.
  }

  var exists;
  var stat = this.statCache[abs];
  if (stat !== undefined) {
    if (stat === false) return cb(null, stat);else {
      var type = stat.isDirectory() ? 'DIR' : 'FILE';
      if (needDir && type === 'FILE') return cb();else return cb(null, type, stat);
    }
  }
  var self = this;
  var statcb = inflight('stat\0' + abs, lstatcb_);
  if (statcb) self.fs.lstat(abs, statcb);
  function lstatcb_(er, lstat) {
    if (lstat && lstat.isSymbolicLink()) {
      // If it's a symlink, then treat it as the target, unless
      // the target does not exist, then treat it as a file.
      return self.fs.stat(abs, function (er, stat) {
        if (er) self._stat2(f, abs, null, lstat, cb);else self._stat2(f, abs, er, stat, cb);
      });
    } else {
      self._stat2(f, abs, er, lstat, cb);
    }
  }
};
Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
  if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
    this.statCache[abs] = false;
    return cb();
  }
  var needDir = f.slice(-1) === '/';
  this.statCache[abs] = stat;
  if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) return cb(null, false, stat);
  var c = true;
  if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE';
  this.cache[abs] = this.cache[abs] || c;
  if (needDir && c === 'FILE') return cb();
  return cb(null, c, stat);
};

/***/ }),

/***/ 6109:
/*!***********************************!*\
  !*** ./node_modules/glob/sync.js ***!
  \***********************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = globSync;
globSync.GlobSync = GlobSync;
var rp = __webpack_require__(/*! fs.realpath */ 7990);
var minimatch = __webpack_require__(/*! minimatch */ 6091);
var Minimatch = minimatch.Minimatch;
var Glob = (__webpack_require__(/*! ./glob.js */ 9953).Glob);
var util = __webpack_require__(/*! util */ 3837);
var path = __webpack_require__(/*! path */ 3056);
var assert = __webpack_require__(/*! assert */ 9491);
var isAbsolute = __webpack_require__(/*! path-is-absolute */ 5450);
var common = __webpack_require__(/*! ./common.js */ 6064);
var setopts = common.setopts;
var ownProp = common.ownProp;
var childrenIgnored = common.childrenIgnored;
var isIgnored = common.isIgnored;
function globSync(pattern, options) {
  if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n' + 'See: https://github.com/isaacs/node-glob/issues/167');
  return new GlobSync(pattern, options).found;
}
function GlobSync(pattern, options) {
  if (!pattern) throw new Error('must provide pattern');
  if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n' + 'See: https://github.com/isaacs/node-glob/issues/167');
  if (!(this instanceof GlobSync)) return new GlobSync(pattern, options);
  setopts(this, pattern, options);
  if (this.noprocess) return this;
  var n = this.minimatch.set.length;
  this.matches = new Array(n);
  for (var i = 0; i < n; i++) {
    this._process(this.minimatch.set[i], i, false);
  }
  this._finish();
}
GlobSync.prototype._finish = function () {
  assert.ok(this instanceof GlobSync);
  if (this.realpath) {
    var self = this;
    this.matches.forEach(function (matchset, index) {
      var set = self.matches[index] = Object.create(null);
      for (var p in matchset) {
        try {
          p = self._makeAbs(p);
          var real = rp.realpathSync(p, self.realpathCache);
          set[real] = true;
        } catch (er) {
          if (er.syscall === 'stat') set[self._makeAbs(p)] = true;else throw er;
        }
      }
    });
  }
  common.finish(this);
};
GlobSync.prototype._process = function (pattern, index, inGlobStar) {
  assert.ok(this instanceof GlobSync);

  // Get the first [n] parts of pattern that are all strings.
  var n = 0;
  while (typeof pattern[n] === 'string') {
    n++;
  }
  // now n is the index of the first one that is *not* a string.

  // See if there's anything else
  var prefix;
  switch (n) {
    // if not, then this is rather simple
    case pattern.length:
      this._processSimple(pattern.join('/'), index);
      return;
    case 0:
      // pattern *starts* with some non-trivial item.
      // going to readdir(cwd), but not include the prefix in matches.
      prefix = null;
      break;
    default:
      // pattern has some string bits in the front.
      // whatever it starts with, whether that's 'absolute' like /foo/bar,
      // or 'relative' like '../baz'
      prefix = pattern.slice(0, n).join('/');
      break;
  }
  var remain = pattern.slice(n);

  // get the list of entries.
  var read;
  if (prefix === null) read = '.';else if (isAbsolute(prefix) || isAbsolute(pattern.map(function (p) {
    return typeof p === 'string' ? p : '[*]';
  }).join('/'))) {
    if (!prefix || !isAbsolute(prefix)) prefix = '/' + prefix;
    read = prefix;
  } else read = prefix;
  var abs = this._makeAbs(read);

  //if ignored, skip processing
  if (childrenIgnored(this, read)) return;
  var isGlobStar = remain[0] === minimatch.GLOBSTAR;
  if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar);else this._processReaddir(prefix, read, abs, remain, index, inGlobStar);
};
GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
  var entries = this._readdir(abs, inGlobStar);

  // if the abs isn't a dir, then nothing can match!
  if (!entries) return;

  // It will only match dot entries if it starts with a dot, or if
  // dot is set.  Stuff like @(.foo|.bar) isn't allowed.
  var pn = remain[0];
  var negate = !!this.minimatch.negate;
  var rawGlob = pn._glob;
  var dotOk = this.dot || rawGlob.charAt(0) === '.';
  var matchedEntries = [];
  for (var i = 0; i < entries.length; i++) {
    var e = entries[i];
    if (e.charAt(0) !== '.' || dotOk) {
      var m;
      if (negate && !prefix) {
        m = !e.match(pn);
      } else {
        m = e.match(pn);
      }
      if (m) matchedEntries.push(e);
    }
  }
  var len = matchedEntries.length;
  // If there are no matched entries, then nothing matches.
  if (len === 0) return;

  // if this is the last remaining pattern bit, then no need for
  // an additional stat *unless* the user has specified mark or
  // stat explicitly.  We know they exist, since readdir returned
  // them.

  if (remain.length === 1 && !this.mark && !this.stat) {
    if (!this.matches[index]) this.matches[index] = Object.create(null);
    for (var i = 0; i < len; i++) {
      var e = matchedEntries[i];
      if (prefix) {
        if (prefix.slice(-1) !== '/') e = prefix + '/' + e;else e = prefix + e;
      }
      if (e.charAt(0) === '/' && !this.nomount) {
        e = path.join(this.root, e);
      }
      this._emitMatch(index, e);
    }
    // This was the last one, and no stats were needed
    return;
  }

  // now test all matched entries as stand-ins for that part
  // of the pattern.
  remain.shift();
  for (var i = 0; i < len; i++) {
    var e = matchedEntries[i];
    var newPattern;
    if (prefix) newPattern = [prefix, e];else newPattern = [e];
    this._process(newPattern.concat(remain), index, inGlobStar);
  }
};
GlobSync.prototype._emitMatch = function (index, e) {
  if (isIgnored(this, e)) return;
  var abs = this._makeAbs(e);
  if (this.mark) e = this._mark(e);
  if (this.absolute) {
    e = abs;
  }
  if (this.matches[index][e]) return;
  if (this.nodir) {
    var c = this.cache[abs];
    if (c === 'DIR' || Array.isArray(c)) return;
  }
  this.matches[index][e] = true;
  if (this.stat) this._stat(e);
};
GlobSync.prototype._readdirInGlobStar = function (abs) {
  // follow all symlinked directories forever
  // just proceed as if this is a non-globstar situation
  if (this.follow) return this._readdir(abs, false);
  var entries;
  var lstat;
  var stat;
  try {
    lstat = this.fs.lstatSync(abs);
  } catch (er) {
    if (er.code === 'ENOENT') {
      // lstat failed, doesn't exist
      return null;
    }
  }
  var isSym = lstat && lstat.isSymbolicLink();
  this.symlinks[abs] = isSym;

  // If it's not a symlink or a dir, then it's definitely a regular file.
  // don't bother doing a readdir in that case.
  if (!isSym && lstat && !lstat.isDirectory()) this.cache[abs] = 'FILE';else entries = this._readdir(abs, false);
  return entries;
};
GlobSync.prototype._readdir = function (abs, inGlobStar) {
  var entries;
  if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs);
  if (ownProp(this.cache, abs)) {
    var c = this.cache[abs];
    if (!c || c === 'FILE') return null;
    if (Array.isArray(c)) return c;
  }
  try {
    return this._readdirEntries(abs, this.fs.readdirSync(abs));
  } catch (er) {
    this._readdirError(abs, er);
    return null;
  }
};
GlobSync.prototype._readdirEntries = function (abs, entries) {
  // if we haven't asked to stat everything, then just
  // assume that everything in there exists, so we can avoid
  // having to stat it a second time.
  if (!this.mark && !this.stat) {
    for (var i = 0; i < entries.length; i++) {
      var e = entries[i];
      if (abs === '/') e = abs + e;else e = abs + '/' + e;
      this.cache[e] = true;
    }
  }
  this.cache[abs] = entries;

  // mark and cache dir-ness
  return entries;
};
GlobSync.prototype._readdirError = function (f, er) {
  // handle errors, and cache the information
  switch (er.code) {
    case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
    case 'ENOTDIR':
      // totally normal. means it *does* exist.
      var abs = this._makeAbs(f);
      this.cache[abs] = 'FILE';
      if (abs === this.cwdAbs) {
        var error = new Error(er.code + ' invalid cwd ' + this.cwd);
        error.path = this.cwd;
        error.code = er.code;
        throw error;
      }
      break;
    case 'ENOENT': // not terribly unusual
    case 'ELOOP':
    case 'ENAMETOOLONG':
    case 'UNKNOWN':
      this.cache[this._makeAbs(f)] = false;
      break;
    default:
      // some unusual error.  Treat as failure.
      this.cache[this._makeAbs(f)] = false;
      if (this.strict) throw er;
      if (!this.silent) console.error('glob error', er);
      break;
  }
};
GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
  var entries = this._readdir(abs, inGlobStar);

  // no entries means not a dir, so it can never have matches
  // foo.txt/** doesn't match foo.txt
  if (!entries) return;

  // test without the globstar, and with every child both below
  // and replacing the globstar.
  var remainWithoutGlobStar = remain.slice(1);
  var gspref = prefix ? [prefix] : [];
  var noGlobStar = gspref.concat(remainWithoutGlobStar);

  // the noGlobStar pattern exits the inGlobStar state
  this._process(noGlobStar, index, false);
  var len = entries.length;
  var isSym = this.symlinks[abs];

  // If it's a symlink, and we're in a globstar, then stop
  if (isSym && inGlobStar) return;
  for (var i = 0; i < len; i++) {
    var e = entries[i];
    if (e.charAt(0) === '.' && !this.dot) continue;

    // these two cases enter the inGlobStar state
    var instead = gspref.concat(entries[i], remainWithoutGlobStar);
    this._process(instead, index, true);
    var below = gspref.concat(entries[i], remain);
    this._process(below, index, true);
  }
};
GlobSync.prototype._processSimple = function (prefix, index) {
  // XXX review this.  Shouldn't it be doing the mounting etc
  // before doing stat?  kinda weird?
  var exists = this._stat(prefix);
  if (!this.matches[index]) this.matches[index] = Object.create(null);

  // If it doesn't exist, then just mark the lack of results
  if (!exists) return;
  if (prefix && isAbsolute(prefix) && !this.nomount) {
    var trail = /[\/\\]$/.test(prefix);
    if (prefix.charAt(0) === '/') {
      prefix = path.join(this.root, prefix);
    } else {
      prefix = path.resolve(this.root, prefix);
      if (trail) prefix += '/';
    }
  }
  if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/');

  // Mark this as a match
  this._emitMatch(index, prefix);
};

// Returns either 'DIR', 'FILE', or false
GlobSync.prototype._stat = function (f) {
  var abs = this._makeAbs(f);
  var needDir = f.slice(-1) === '/';
  if (f.length > this.maxLength) return false;
  if (!this.stat && ownProp(this.cache, abs)) {
    var c = this.cache[abs];
    if (Array.isArray(c)) c = 'DIR';

    // It exists, but maybe not how we need it
    if (!needDir || c === 'DIR') return c;
    if (needDir && c === 'FILE') return false;

    // otherwise we have to stat, because maybe c=true
    // if we know it exists, but not what it is.
  }

  var exists;
  var stat = this.statCache[abs];
  if (!stat) {
    var lstat;
    try {
      lstat = this.fs.lstatSync(abs);
    } catch (er) {
      if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
        this.statCache[abs] = false;
        return false;
      }
    }
    if (lstat && lstat.isSymbolicLink()) {
      try {
        stat = this.fs.statSync(abs);
      } catch (er) {
        stat = lstat;
      }
    } else {
      stat = lstat;
    }
  }
  this.statCache[abs] = stat;
  var c = true;
  if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE';
  this.cache[abs] = this.cache[abs] || c;
  if (needDir && c === 'FILE') return false;
  return c;
};
GlobSync.prototype._mark = function (p) {
  return common.mark(this, p);
};
GlobSync.prototype._makeAbs = function (f) {
  return common.makeAbs(this, f);
};

/***/ }),

/***/ 9123:
/*!*******************************************!*\
  !*** ./node_modules/inflight/inflight.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var wrappy = __webpack_require__(/*! wrappy */ 341);
var reqs = Object.create(null);
var once = __webpack_require__(/*! once */ 5831);
module.exports = wrappy(inflight);
function inflight(key, cb) {
  if (reqs[key]) {
    reqs[key].push(cb);
    return null;
  } else {
    reqs[key] = [cb];
    return makeres(key);
  }
}
function makeres(key) {
  return once(function RES() {
    var cbs = reqs[key];
    var len = cbs.length;
    var args = slice(arguments);

    // XXX It's somewhat ambiguous whether a new callback added in this
    // pass should be queued for later execution if something in the
    // list of callbacks throws, or if it should just be discarded.
    // However, it's such an edge case that it hardly matters, and either
    // choice is likely as surprising as the other.
    // As it happens, we do go ahead and schedule it for later execution.
    try {
      for (var i = 0; i < len; i++) {
        cbs[i].apply(null, args);
      }
    } finally {
      if (cbs.length > len) {
        // added more in the interim.
        // de-zalgo, just in case, but don't call again.
        cbs.splice(0, len);
        process.nextTick(function () {
          RES.apply(null, args);
        });
      } else {
        delete reqs[key];
      }
    }
  });
}
function slice(args) {
  var length = args.length;
  var array = [];
  for (var i = 0; i < length; i++) array[i] = args[i];
  return array;
}

/***/ }),

/***/ 7694:
/*!***************************************************!*\
  !*** ./node_modules/inherits/inherits_browser.js ***!
  \***************************************************/
/***/ ((module) => {

if (typeof Object.create === 'function') {
  // implementation from standard node.js 'util' module
  module.exports = function inherits(ctor, superCtor) {
    if (superCtor) {
      ctor.super_ = superCtor;
      ctor.prototype = Object.create(superCtor.prototype, {
        constructor: {
          value: ctor,
          enumerable: false,
          writable: true,
          configurable: true
        }
      });
    }
  };
} else {
  // old school shim for old browsers
  module.exports = function inherits(ctor, superCtor) {
    if (superCtor) {
      ctor.super_ = superCtor;
      var TempCtor = function () {};
      TempCtor.prototype = superCtor.prototype;
      ctor.prototype = new TempCtor();
      ctor.prototype.constructor = ctor;
    }
  };
}

/***/ }),

/***/ 6091:
/*!*********************************************!*\
  !*** ./node_modules/minimatch/minimatch.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = minimatch;
minimatch.Minimatch = Minimatch;
var path = function () {
  try {
    return __webpack_require__(/*! path */ 3056);
  } catch (e) {}
}() || {
  sep: '/'
};
minimatch.sep = path.sep;
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
var expand = __webpack_require__(/*! brace-expansion */ 3297);
var plTypes = {
  '!': {
    open: '(?:(?!(?:',
    close: '))[^/]*?)'
  },
  '?': {
    open: '(?:',
    close: ')?'
  },
  '+': {
    open: '(?:',
    close: ')+'
  },
  '*': {
    open: '(?:',
    close: ')*'
  },
  '@': {
    open: '(?:',
    close: ')'
  }
};

// any single thing other than /
// don't need to escape / when using new RegExp()
var qmark = '[^/]';

// * => any number of characters
var star = qmark + '*?';

// ** when dots are allowed.  Anything goes, except .. and .
// not (^ or / followed by one or two dots followed by $ or /),
// followed by anything, any number of times.
var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?';

// not a ^ or / followed by a dot,
// followed by anything, any number of times.
var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?';

// characters that need to be escaped in RegExp.
var reSpecials = charSet('().*{}+?[]^$\\!');

// "abc" -> { a:true, b:true, c:true }
function charSet(s) {
  return s.split('').reduce(function (set, c) {
    set[c] = true;
    return set;
  }, {});
}

// normalizes slashes.
var slashSplit = /\/+/;
minimatch.filter = filter;
function filter(pattern, options) {
  options = options || {};
  return function (p, i, list) {
    return minimatch(p, pattern, options);
  };
}
function ext(a, b) {
  b = b || {};
  var t = {};
  Object.keys(a).forEach(function (k) {
    t[k] = a[k];
  });
  Object.keys(b).forEach(function (k) {
    t[k] = b[k];
  });
  return t;
}
minimatch.defaults = function (def) {
  if (!def || typeof def !== 'object' || !Object.keys(def).length) {
    return minimatch;
  }
  var orig = minimatch;
  var m = function minimatch(p, pattern, options) {
    return orig(p, pattern, ext(def, options));
  };
  m.Minimatch = function Minimatch(pattern, options) {
    return new orig.Minimatch(pattern, ext(def, options));
  };
  m.Minimatch.defaults = function defaults(options) {
    return orig.defaults(ext(def, options)).Minimatch;
  };
  m.filter = function filter(pattern, options) {
    return orig.filter(pattern, ext(def, options));
  };
  m.defaults = function defaults(options) {
    return orig.defaults(ext(def, options));
  };
  m.makeRe = function makeRe(pattern, options) {
    return orig.makeRe(pattern, ext(def, options));
  };
  m.braceExpand = function braceExpand(pattern, options) {
    return orig.braceExpand(pattern, ext(def, options));
  };
  m.match = function (list, pattern, options) {
    return orig.match(list, pattern, ext(def, options));
  };
  return m;
};
Minimatch.defaults = function (def) {
  return minimatch.defaults(def).Minimatch;
};
function minimatch(p, pattern, options) {
  assertValidPattern(pattern);
  if (!options) options = {};

  // shortcut: comments match nothing.
  if (!options.nocomment && pattern.charAt(0) === '#') {
    return false;
  }
  return new Minimatch(pattern, options).match(p);
}
function Minimatch(pattern, options) {
  if (!(this instanceof Minimatch)) {
    return new Minimatch(pattern, options);
  }
  assertValidPattern(pattern);
  if (!options) options = {};
  pattern = pattern.trim();

  // windows support: need to use /, not \
  if (!options.allowWindowsEscape && path.sep !== '/') {
    pattern = pattern.split(path.sep).join('/');
  }
  this.options = options;
  this.set = [];
  this.pattern = pattern;
  this.regexp = null;
  this.negate = false;
  this.comment = false;
  this.empty = false;
  this.partial = !!options.partial;

  // make the set of regexps etc.
  this.make();
}
Minimatch.prototype.debug = function () {};
Minimatch.prototype.make = make;
function make() {
  var pattern = this.pattern;
  var options = this.options;

  // empty patterns and comments match nothing.
  if (!options.nocomment && pattern.charAt(0) === '#') {
    this.comment = true;
    return;
  }
  if (!pattern) {
    this.empty = true;
    return;
  }

  // step 1: figure out negation, etc.
  this.parseNegate();

  // step 2: expand braces
  var set = this.globSet = this.braceExpand();
  if (options.debug) this.debug = function debug() {
    console.error.apply(console, arguments);
  };
  this.debug(this.pattern, set);

  // step 3: now we have a set, so turn each one into a series of path-portion
  // matching patterns.
  // These will be regexps, except in the case of "**", which is
  // set to the GLOBSTAR object for globstar behavior,
  // and will not contain any / characters
  set = this.globParts = set.map(function (s) {
    return s.split(slashSplit);
  });
  this.debug(this.pattern, set);

  // glob --> regexps
  set = set.map(function (s, si, set) {
    return s.map(this.parse, this);
  }, this);
  this.debug(this.pattern, set);

  // filter out everything that didn't compile properly.
  set = set.filter(function (s) {
    return s.indexOf(false) === -1;
  });
  this.debug(this.pattern, set);
  this.set = set;
}
Minimatch.prototype.parseNegate = parseNegate;
function parseNegate() {
  var pattern = this.pattern;
  var negate = false;
  var options = this.options;
  var negateOffset = 0;
  if (options.nonegate) return;
  for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === '!'; i++) {
    negate = !negate;
    negateOffset++;
  }
  if (negateOffset) this.pattern = pattern.substr(negateOffset);
  this.negate = negate;
}

// Brace expansion:
// a{b,c}d -> abd acd
// a{b,}c -> abc ac
// a{0..3}d -> a0d a1d a2d a3d
// a{b,c{d,e}f}g -> abg acdfg acefg
// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
//
// Invalid sets are not expanded.
// a{2..}b -> a{2..}b
// a{b}c -> a{b}c
minimatch.braceExpand = function (pattern, options) {
  return braceExpand(pattern, options);
};
Minimatch.prototype.braceExpand = braceExpand;
function braceExpand(pattern, options) {
  if (!options) {
    if (this instanceof Minimatch) {
      options = this.options;
    } else {
      options = {};
    }
  }
  pattern = typeof pattern === 'undefined' ? this.pattern : pattern;
  assertValidPattern(pattern);

  // Thanks to Yeting Li <https://github.com/yetingli> for
  // improving this regexp to avoid a ReDOS vulnerability.
  if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
    // shortcut. no need to expand.
    return [pattern];
  }
  return expand(pattern);
}
var MAX_PATTERN_LENGTH = 1024 * 64;
var assertValidPattern = function (pattern) {
  if (typeof pattern !== 'string') {
    throw new TypeError('invalid pattern');
  }
  if (pattern.length > MAX_PATTERN_LENGTH) {
    throw new TypeError('pattern is too long');
  }
};

// parse a component of the expanded set.
// At this point, no pattern may contain "/" in it
// so we're going to return a 2d array, where each entry is the full
// pattern, split on '/', and then turned into a regular expression.
// A regexp is made at the end which joins each array with an
// escaped /, and another full one which joins each regexp with |.
//
// Following the lead of Bash 4.1, note that "**" only has special meaning
// when it is the *only* thing in a path portion.  Otherwise, any series
// of * is equivalent to a single *.  Globstar behavior is enabled by
// default, and can be disabled by setting options.noglobstar.
Minimatch.prototype.parse = parse;
var SUBPARSE = {};
function parse(pattern, isSub) {
  assertValidPattern(pattern);
  var options = this.options;

  // shortcuts
  if (pattern === '**') {
    if (!options.noglobstar) return GLOBSTAR;else pattern = '*';
  }
  if (pattern === '') return '';
  var re = '';
  var hasMagic = !!options.nocase;
  var escaping = false;
  // ? => one single character
  var patternListStack = [];
  var negativeLists = [];
  var stateChar;
  var inClass = false;
  var reClassStart = -1;
  var classStart = -1;
  // . and .. never match anything that doesn't start with .,
  // even when options.dot is set.
  var patternStart = pattern.charAt(0) === '.' ? '' // anything
  // not (start or / followed by . or .. followed by / or end)
  : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)';
  var self = this;
  function clearStateChar() {
    if (stateChar) {
      // we had some state-tracking character
      // that wasn't consumed by this pass.
      switch (stateChar) {
        case '*':
          re += star;
          hasMagic = true;
          break;
        case '?':
          re += qmark;
          hasMagic = true;
          break;
        default:
          re += '\\' + stateChar;
          break;
      }
      self.debug('clearStateChar %j %j', stateChar, re);
      stateChar = false;
    }
  }
  for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
    this.debug('%s\t%s %s %j', pattern, i, re, c);

    // skip over any that are escaped.
    if (escaping && reSpecials[c]) {
      re += '\\' + c;
      escaping = false;
      continue;
    }
    switch (c) {
      /* istanbul ignore next */
      case '/':
        {
          // completely not allowed, even escaped.
          // Should already be path-split by now.
          return false;
        }
      case '\\':
        clearStateChar();
        escaping = true;
        continue;

      // the various stateChar values
      // for the "extglob" stuff.
      case '?':
      case '*':
      case '+':
      case '@':
      case '!':
        this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c);

        // all of those are literals inside a class, except that
        // the glob [!a] means [^a] in regexp
        if (inClass) {
          this.debug('  in class');
          if (c === '!' && i === classStart + 1) c = '^';
          re += c;
          continue;
        }

        // if we already have a stateChar, then it means
        // that there was something like ** or +? in there.
        // Handle the stateChar, then proceed with this one.
        self.debug('call clearStateChar %j', stateChar);
        clearStateChar();
        stateChar = c;
        // if extglob is disabled, then +(asdf|foo) isn't a thing.
        // just clear the statechar *now*, rather than even diving into
        // the patternList stuff.
        if (options.noext) clearStateChar();
        continue;
      case '(':
        if (inClass) {
          re += '(';
          continue;
        }
        if (!stateChar) {
          re += '\\(';
          continue;
        }
        patternListStack.push({
          type: stateChar,
          start: i - 1,
          reStart: re.length,
          open: plTypes[stateChar].open,
          close: plTypes[stateChar].close
        });
        // negation is (?:(?!js)[^/]*)
        re += stateChar === '!' ? '(?:(?!(?:' : '(?:';
        this.debug('plType %j %j', stateChar, re);
        stateChar = false;
        continue;
      case ')':
        if (inClass || !patternListStack.length) {
          re += '\\)';
          continue;
        }
        clearStateChar();
        hasMagic = true;
        var pl = patternListStack.pop();
        // negation is (?:(?!js)[^/]*)
        // The others are (?:<pattern>)<type>
        re += pl.close;
        if (pl.type === '!') {
          negativeLists.push(pl);
        }
        pl.reEnd = re.length;
        continue;
      case '|':
        if (inClass || !patternListStack.length || escaping) {
          re += '\\|';
          escaping = false;
          continue;
        }
        clearStateChar();
        re += '|';
        continue;

      // these are mostly the same in regexp and glob
      case '[':
        // swallow any state-tracking char before the [
        clearStateChar();
        if (inClass) {
          re += '\\' + c;
          continue;
        }
        inClass = true;
        classStart = i;
        reClassStart = re.length;
        re += c;
        continue;
      case ']':
        //  a right bracket shall lose its special
        //  meaning and represent itself in
        //  a bracket expression if it occurs
        //  first in the list.  -- POSIX.2 2.8.3.2
        if (i === classStart + 1 || !inClass) {
          re += '\\' + c;
          escaping = false;
          continue;
        }

        // handle the case where we left a class open.
        // "[z-a]" is valid, equivalent to "\[z-a\]"
        // split where the last [ was, make sure we don't have
        // an invalid re. if so, re-walk the contents of the
        // would-be class to re-translate any characters that
        // were passed through as-is
        // TODO: It would probably be faster to determine this
        // without a try/catch and a new RegExp, but it's tricky
        // to do safely.  For now, this is safe and works.
        var cs = pattern.substring(classStart + 1, i);
        try {
          RegExp('[' + cs + ']');
        } catch (er) {
          // not a valid class!
          var sp = this.parse(cs, SUBPARSE);
          re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]';
          hasMagic = hasMagic || sp[1];
          inClass = false;
          continue;
        }

        // finish up the class.
        hasMagic = true;
        inClass = false;
        re += c;
        continue;
      default:
        // swallow any state char that wasn't consumed
        clearStateChar();
        if (escaping) {
          // no need
          escaping = false;
        } else if (reSpecials[c] && !(c === '^' && inClass)) {
          re += '\\';
        }
        re += c;
    } // switch
  } // for

  // handle the case where we left a class open.
  // "[abc" is valid, equivalent to "\[abc"
  if (inClass) {
    // split where the last [ was, and escape it
    // this is a huge pita.  We now have to re-walk
    // the contents of the would-be class to re-translate
    // any characters that were passed through as-is
    cs = pattern.substr(classStart + 1);
    sp = this.parse(cs, SUBPARSE);
    re = re.substr(0, reClassStart) + '\\[' + sp[0];
    hasMagic = hasMagic || sp[1];
  }

  // handle the case where we had a +( thing at the *end*
  // of the pattern.
  // each pattern list stack adds 3 chars, and we need to go through
  // and escape any | chars that were passed through as-is for the regexp.
  // Go through and escape them, taking care not to double-escape any
  // | chars that were already escaped.
  for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
    var tail = re.slice(pl.reStart + pl.open.length);
    this.debug('setting tail', re, pl);
    // maybe some even number of \, then maybe 1 \, followed by a |
    tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
      if (!$2) {
        // the | isn't already escaped, so escape it.
        $2 = '\\';
      }

      // need to escape all those slashes *again*, without escaping the
      // one that we need for escaping the | character.  As it works out,
      // escaping an even number of slashes can be done by simply repeating
      // it exactly after itself.  That's why this trick works.
      //
      // I am sorry that you have to see this.
      return $1 + $1 + $2 + '|';
    });
    this.debug('tail=%j\n   %s', tail, tail, pl, re);
    var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type;
    hasMagic = true;
    re = re.slice(0, pl.reStart) + t + '\\(' + tail;
  }

  // handle trailing things that only matter at the very end.
  clearStateChar();
  if (escaping) {
    // trailing \\
    re += '\\\\';
  }

  // only need to apply the nodot start if the re starts with
  // something that could conceivably capture a dot
  var addPatternStart = false;
  switch (re.charAt(0)) {
    case '[':
    case '.':
    case '(':
      addPatternStart = true;
  }

  // Hack to work around lack of negative lookbehind in JS
  // A pattern like: *.!(x).!(y|z) needs to ensure that a name
  // like 'a.xyz.yz' doesn't match.  So, the first negative
  // lookahead, has to look ALL the way ahead, to the end of
  // the pattern.
  for (var n = negativeLists.length - 1; n > -1; n--) {
    var nl = negativeLists[n];
    var nlBefore = re.slice(0, nl.reStart);
    var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
    var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
    var nlAfter = re.slice(nl.reEnd);
    nlLast += nlAfter;

    // Handle nested stuff like *(*.js|!(*.json)), where open parens
    // mean that we should *not* include the ) in the bit that is considered
    // "after" the negated section.
    var openParensBefore = nlBefore.split('(').length - 1;
    var cleanAfter = nlAfter;
    for (i = 0; i < openParensBefore; i++) {
      cleanAfter = cleanAfter.replace(/\)[+*?]?/, '');
    }
    nlAfter = cleanAfter;
    var dollar = '';
    if (nlAfter === '' && isSub !== SUBPARSE) {
      dollar = '$';
    }
    var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
    re = newRe;
  }

  // if the re is not "" at this point, then we need to make sure
  // it doesn't match against an empty path part.
  // Otherwise a/* will match a/, which it should not.
  if (re !== '' && hasMagic) {
    re = '(?=.)' + re;
  }
  if (addPatternStart) {
    re = patternStart + re;
  }

  // parsing just a piece of a larger pattern.
  if (isSub === SUBPARSE) {
    return [re, hasMagic];
  }

  // skip the regexp for non-magical patterns
  // unescape anything in it, though, so that it'll be
  // an exact match against a file etc.
  if (!hasMagic) {
    return globUnescape(pattern);
  }
  var flags = options.nocase ? 'i' : '';
  try {
    var regExp = new RegExp('^' + re + '$', flags);
  } catch (er) /* istanbul ignore next - should be impossible */{
    // If it was an invalid regular expression, then it can't match
    // anything.  This trick looks for a character after the end of
    // the string, which is of course impossible, except in multi-line
    // mode, but it's not a /m regex.
    return new RegExp('$.');
  }
  regExp._glob = pattern;
  regExp._src = re;
  return regExp;
}
minimatch.makeRe = function (pattern, options) {
  return new Minimatch(pattern, options || {}).makeRe();
};
Minimatch.prototype.makeRe = makeRe;
function makeRe() {
  if (this.regexp || this.regexp === false) return this.regexp;

  // at this point, this.set is a 2d array of partial
  // pattern strings, or "**".
  //
  // It's better to use .match().  This function shouldn't
  // be used, really, but it's pretty convenient sometimes,
  // when you just want to work with a regex.
  var set = this.set;
  if (!set.length) {
    this.regexp = false;
    return this.regexp;
  }
  var options = this.options;
  var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
  var flags = options.nocase ? 'i' : '';
  var re = set.map(function (pattern) {
    return pattern.map(function (p) {
      return p === GLOBSTAR ? twoStar : typeof p === 'string' ? regExpEscape(p) : p._src;
    }).join('\\\/');
  }).join('|');

  // must match entire pattern
  // ending in a * or ** will make it less strict.
  re = '^(?:' + re + ')$';

  // can match anything, as long as it's not this.
  if (this.negate) re = '^(?!' + re + ').*$';
  try {
    this.regexp = new RegExp(re, flags);
  } catch (ex) /* istanbul ignore next - should be impossible */{
    this.regexp = false;
  }
  return this.regexp;
}
minimatch.match = function (list, pattern, options) {
  options = options || {};
  var mm = new Minimatch(pattern, options);
  list = list.filter(function (f) {
    return mm.match(f);
  });
  if (mm.options.nonull && !list.length) {
    list.push(pattern);
  }
  return list;
};
Minimatch.prototype.match = function match(f, partial) {
  if (typeof partial === 'undefined') partial = this.partial;
  this.debug('match', f, this.pattern);
  // short-circuit in the case of busted things.
  // comments, etc.
  if (this.comment) return false;
  if (this.empty) return f === '';
  if (f === '/' && partial) return true;
  var options = this.options;

  // windows: need to use /, not \
  if (path.sep !== '/') {
    f = f.split(path.sep).join('/');
  }

  // treat the test path as a set of pathparts.
  f = f.split(slashSplit);
  this.debug(this.pattern, 'split', f);

  // just ONE of the pattern sets in this.set needs to match
  // in order for it to be valid.  If negating, then just one
  // match means that we have failed.
  // Either way, return on the first hit.

  var set = this.set;
  this.debug(this.pattern, 'set', set);

  // Find the basename of the path by looking for the last non-empty segment
  var filename;
  var i;
  for (i = f.length - 1; i >= 0; i--) {
    filename = f[i];
    if (filename) break;
  }
  for (i = 0; i < set.length; i++) {
    var pattern = set[i];
    var file = f;
    if (options.matchBase && pattern.length === 1) {
      file = [filename];
    }
    var hit = this.matchOne(file, pattern, partial);
    if (hit) {
      if (options.flipNegate) return true;
      return !this.negate;
    }
  }

  // didn't get any hits.  this is success if it's a negative
  // pattern, failure otherwise.
  if (options.flipNegate) return false;
  return this.negate;
};

// set partial to true to test if, for example,
// "/a/b" matches the start of "/*/b/*/d"
// Partial means, if you run out of file before you run
// out of pattern, then that's fine, as long as all
// the parts match.
Minimatch.prototype.matchOne = function (file, pattern, partial) {
  var options = this.options;
  this.debug('matchOne', {
    'this': this,
    file: file,
    pattern: pattern
  });
  this.debug('matchOne', file.length, pattern.length);
  for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
    this.debug('matchOne loop');
    var p = pattern[pi];
    var f = file[fi];
    this.debug(pattern, p, f);

    // should be impossible.
    // some invalid regexp stuff in the set.
    /* istanbul ignore if */
    if (p === false) return false;
    if (p === GLOBSTAR) {
      this.debug('GLOBSTAR', [pattern, p, f]);

      // "**"
      // a/**/b/**/c would match the following:
      // a/b/x/y/z/c
      // a/x/y/z/b/c
      // a/b/x/b/x/c
      // a/b/c
      // To do this, take the rest of the pattern after
      // the **, and see if it would match the file remainder.
      // If so, return success.
      // If not, the ** "swallows" a segment, and try again.
      // This is recursively awful.
      //
      // a/**/b/**/c matching a/b/x/y/z/c
      // - a matches a
      // - doublestar
      //   - matchOne(b/x/y/z/c, b/**/c)
      //     - b matches b
      //     - doublestar
      //       - matchOne(x/y/z/c, c) -> no
      //       - matchOne(y/z/c, c) -> no
      //       - matchOne(z/c, c) -> no
      //       - matchOne(c, c) yes, hit
      var fr = fi;
      var pr = pi + 1;
      if (pr === pl) {
        this.debug('** at the end');
        // a ** at the end will just swallow the rest.
        // We have found a match.
        // however, it will not swallow /.x, unless
        // options.dot is set.
        // . and .. are *never* matched by **, for explosively
        // exponential reasons.
        for (; fi < fl; fi++) {
          if (file[fi] === '.' || file[fi] === '..' || !options.dot && file[fi].charAt(0) === '.') return false;
        }
        return true;
      }

      // ok, let's see if we can swallow whatever we can.
      while (fr < fl) {
        var swallowee = file[fr];
        this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);

        // XXX remove this slice.  Just pass the start index.
        if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
          this.debug('globstar found match!', fr, fl, swallowee);
          // found a match.
          return true;
        } else {
          // can't swallow "." or ".." ever.
          // can only swallow ".foo" when explicitly asked.
          if (swallowee === '.' || swallowee === '..' || !options.dot && swallowee.charAt(0) === '.') {
            this.debug('dot detected!', file, fr, pattern, pr);
            break;
          }

          // ** swallows a segment, and continue.
          this.debug('globstar swallow a segment, and continue');
          fr++;
        }
      }

      // no match was found.
      // However, in partial mode, we can't say this is necessarily over.
      // If there's more *pattern* left, then
      /* istanbul ignore if */
      if (partial) {
        // ran out of file
        this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
        if (fr === fl) return true;
      }
      return false;
    }

    // something other than **
    // non-magic patterns just have to match exactly
    // patterns with magic have been turned into regexps.
    var hit;
    if (typeof p === 'string') {
      hit = f === p;
      this.debug('string match', p, f, hit);
    } else {
      hit = f.match(p);
      this.debug('pattern match', p, f, hit);
    }
    if (!hit) return false;
  }

  // Note: ending in / means that we'll get a final ""
  // at the end of the pattern.  This can only match a
  // corresponding "" at the end of the file.
  // If the file ends in /, then it can only match a
  // a pattern that ends in /, unless the pattern just
  // doesn't have any more for it. But, a/b/ should *not*
  // match "a/b/*", even though "" matches against the
  // [^/]*? pattern, except in partial mode, where it might
  // simply not be reached yet.
  // However, a/b/ should still satisfy a/*

  // now either we fell off the end of the pattern, or we're done.
  if (fi === fl && pi === pl) {
    // ran out of pattern and filename at the same time.
    // an exact hit!
    return true;
  } else if (fi === fl) {
    // ran out of file, but still had pattern left.
    // this is ok if we're doing the match as part of
    // a glob fs traversal.
    return partial;
  } else /* istanbul ignore else */if (pi === pl) {
      // ran out of pattern, still have file left.
      // this is only acceptable if we're on the very last
      // empty segment of a file with a trailing slash.
      // a/* should match a/b/
      return fi === fl - 1 && file[fi] === '';
    }

  // should be unreachable.
  /* istanbul ignore next */
  throw new Error('wtf?');
};

// replace stuff like \* with *
function globUnescape(s) {
  return s.replace(/\\(.)/g, '$1');
}
function regExpEscape(s) {
  return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
}

/***/ }),

/***/ 5831:
/*!***********************************!*\
  !*** ./node_modules/once/once.js ***!
  \***********************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var wrappy = __webpack_require__(/*! wrappy */ 341);
module.exports = wrappy(once);
module.exports.strict = wrappy(onceStrict);
once.proto = once(function () {
  Object.defineProperty(Function.prototype, 'once', {
    value: function () {
      return once(this);
    },
    configurable: true
  });
  Object.defineProperty(Function.prototype, 'onceStrict', {
    value: function () {
      return onceStrict(this);
    },
    configurable: true
  });
});
function once(fn) {
  var f = function () {
    if (f.called) return f.value;
    f.called = true;
    return f.value = fn.apply(this, arguments);
  };
  f.called = false;
  return f;
}
function onceStrict(fn) {
  var f = function () {
    if (f.called) throw new Error(f.onceError);
    f.called = true;
    return f.value = fn.apply(this, arguments);
  };
  var name = fn.name || 'Function wrapped with `once`';
  f.onceError = name + " shouldn't be called more than once";
  f.called = false;
  return f;
}

/***/ }),

/***/ 5450:
/*!************************************************!*\
  !*** ./node_modules/path-is-absolute/index.js ***!
  \************************************************/
/***/ ((module) => {

"use strict";


function posix(path) {
  return path.charAt(0) === '/';
}
function win32(path) {
  // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
  var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
  var result = splitDeviceRe.exec(path);
  var device = result[1] || '';
  var isUnc = Boolean(device && device.charAt(1) !== ':');

  // UNC paths are always absolute
  return Boolean(result[2] || isUnc);
}
module.exports = process.platform === 'win32' ? win32 : posix;
module.exports.posix = posix;
module.exports.win32 = win32;

/***/ }),

/***/ 2856:
/*!***************************************!*\
  !*** ./node_modules/rimraf/rimraf.js ***!
  \***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const assert = __webpack_require__(/*! assert */ 9491);
const path = __webpack_require__(/*! path */ 3056);
const fs = __webpack_require__(/*! fs */ 2089);
let glob = undefined;
try {
  glob = __webpack_require__(/*! glob */ 9953);
} catch (_err) {
  // treat glob as optional.
}
const defaultGlobOpts = {
  nosort: true,
  silent: true
};

// for EMFILE handling
let timeout = 0;
const isWindows = process.platform === "win32";
const defaults = options => {
  const methods = ['unlink', 'chmod', 'stat', 'lstat', 'rmdir', 'readdir'];
  methods.forEach(m => {
    options[m] = options[m] || fs[m];
    m = m + 'Sync';
    options[m] = options[m] || fs[m];
  });
  options.maxBusyTries = options.maxBusyTries || 3;
  options.emfileWait = options.emfileWait || 1000;
  if (options.glob === false) {
    options.disableGlob = true;
  }
  if (options.disableGlob !== true && glob === undefined) {
    throw Error('glob dependency not found, set `options.disableGlob = true` if intentional');
  }
  options.disableGlob = options.disableGlob || false;
  options.glob = options.glob || defaultGlobOpts;
};
const rimraf = (p, options, cb) => {
  if (typeof options === 'function') {
    cb = options;
    options = {};
  }
  assert(p, 'rimraf: missing path');
  assert.equal(typeof p, 'string', 'rimraf: path should be a string');
  assert.equal(typeof cb, 'function', 'rimraf: callback function required');
  assert(options, 'rimraf: invalid options argument provided');
  assert.equal(typeof options, 'object', 'rimraf: options should be object');
  defaults(options);
  let busyTries = 0;
  let errState = null;
  let n = 0;
  const next = er => {
    errState = errState || er;
    if (--n === 0) cb(errState);
  };
  const afterGlob = (er, results) => {
    if (er) return cb(er);
    n = results.length;
    if (n === 0) return cb();
    results.forEach(p => {
      const CB = er => {
        if (er) {
          if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) {
            busyTries++;
            // try again, with the same exact callback as this one.
            return setTimeout(() => rimraf_(p, options, CB), busyTries * 100);
          }

          // this one won't happen if graceful-fs is used.
          if (er.code === "EMFILE" && timeout < options.emfileWait) {
            return setTimeout(() => rimraf_(p, options, CB), timeout++);
          }

          // already gone
          if (er.code === "ENOENT") er = null;
        }
        timeout = 0;
        next(er);
      };
      rimraf_(p, options, CB);
    });
  };
  if (options.disableGlob || !glob.hasMagic(p)) return afterGlob(null, [p]);
  options.lstat(p, (er, stat) => {
    if (!er) return afterGlob(null, [p]);
    glob(p, options.glob, afterGlob);
  });
};

// Two possible strategies.
// 1. Assume it's a file.  unlink it, then do the dir stuff on EPERM or EISDIR
// 2. Assume it's a directory.  readdir, then do the file stuff on ENOTDIR
//
// Both result in an extra syscall when you guess wrong.  However, there
// are likely far more normal files in the world than directories.  This
// is based on the assumption that a the average number of files per
// directory is >= 1.
//
// If anyone ever complains about this, then I guess the strategy could
// be made configurable somehow.  But until then, YAGNI.
const rimraf_ = (p, options, cb) => {
  assert(p);
  assert(options);
  assert(typeof cb === 'function');

  // sunos lets the root user unlink directories, which is... weird.
  // so we have to lstat here and make sure it's not a dir.
  options.lstat(p, (er, st) => {
    if (er && er.code === "ENOENT") return cb(null);

    // Windows can EPERM on stat.  Life is suffering.
    if (er && er.code === "EPERM" && isWindows) fixWinEPERM(p, options, er, cb);
    if (st && st.isDirectory()) return rmdir(p, options, er, cb);
    options.unlink(p, er => {
      if (er) {
        if (er.code === "ENOENT") return cb(null);
        if (er.code === "EPERM") return isWindows ? fixWinEPERM(p, options, er, cb) : rmdir(p, options, er, cb);
        if (er.code === "EISDIR") return rmdir(p, options, er, cb);
      }
      return cb(er);
    });
  });
};
const fixWinEPERM = (p, options, er, cb) => {
  assert(p);
  assert(options);
  assert(typeof cb === 'function');
  options.chmod(p, 0o666, er2 => {
    if (er2) cb(er2.code === "ENOENT" ? null : er);else options.stat(p, (er3, stats) => {
      if (er3) cb(er3.code === "ENOENT" ? null : er);else if (stats.isDirectory()) rmdir(p, options, er, cb);else options.unlink(p, cb);
    });
  });
};
const fixWinEPERMSync = (p, options, er) => {
  assert(p);
  assert(options);
  try {
    options.chmodSync(p, 0o666);
  } catch (er2) {
    if (er2.code === "ENOENT") return;else throw er;
  }
  let stats;
  try {
    stats = options.statSync(p);
  } catch (er3) {
    if (er3.code === "ENOENT") return;else throw er;
  }
  if (stats.isDirectory()) rmdirSync(p, options, er);else options.unlinkSync(p);
};
const rmdir = (p, options, originalEr, cb) => {
  assert(p);
  assert(options);
  assert(typeof cb === 'function');

  // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
  // if we guessed wrong, and it's not a directory, then
  // raise the original error.
  options.rmdir(p, er => {
    if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) rmkids(p, options, cb);else if (er && er.code === "ENOTDIR") cb(originalEr);else cb(er);
  });
};
const rmkids = (p, options, cb) => {
  assert(p);
  assert(options);
  assert(typeof cb === 'function');
  options.readdir(p, (er, files) => {
    if (er) return cb(er);
    let n = files.length;
    if (n === 0) return options.rmdir(p, cb);
    let errState;
    files.forEach(f => {
      rimraf(path.join(p, f), options, er => {
        if (errState) return;
        if (er) return cb(errState = er);
        if (--n === 0) options.rmdir(p, cb);
      });
    });
  });
};

// this looks simpler, and is strictly *faster*, but will
// tie up the JavaScript thread and fail on excessively
// deep directory trees.
const rimrafSync = (p, options) => {
  options = options || {};
  defaults(options);
  assert(p, 'rimraf: missing path');
  assert.equal(typeof p, 'string', 'rimraf: path should be a string');
  assert(options, 'rimraf: missing options');
  assert.equal(typeof options, 'object', 'rimraf: options should be object');
  let results;
  if (options.disableGlob || !glob.hasMagic(p)) {
    results = [p];
  } else {
    try {
      options.lstatSync(p);
      results = [p];
    } catch (er) {
      results = glob.sync(p, options.glob);
    }
  }
  if (!results.length) return;
  for (let i = 0; i < results.length; i++) {
    const p = results[i];
    let st;
    try {
      st = options.lstatSync(p);
    } catch (er) {
      if (er.code === "ENOENT") return;

      // Windows can EPERM on stat.  Life is suffering.
      if (er.code === "EPERM" && isWindows) fixWinEPERMSync(p, options, er);
    }
    try {
      // sunos lets the root user unlink directories, which is... weird.
      if (st && st.isDirectory()) rmdirSync(p, options, null);else options.unlinkSync(p);
    } catch (er) {
      if (er.code === "ENOENT") return;
      if (er.code === "EPERM") return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er);
      if (er.code !== "EISDIR") throw er;
      rmdirSync(p, options, er);
    }
  }
};
const rmdirSync = (p, options, originalEr) => {
  assert(p);
  assert(options);
  try {
    options.rmdirSync(p);
  } catch (er) {
    if (er.code === "ENOENT") return;
    if (er.code === "ENOTDIR") throw originalEr;
    if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") rmkidsSync(p, options);
  }
};
const rmkidsSync = (p, options) => {
  assert(p);
  assert(options);
  options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options));

  // We only end up here once we got ENOTEMPTY at least once, and
  // at this point, we are guaranteed to have removed all the kids.
  // So, we know that it won't be ENOENT or ENOTDIR or anything else.
  // try really hard to delete stuff on windows, because it has a
  // PROFOUNDLY annoying habit of not closing handles promptly when
  // files are deleted, resulting in spurious ENOTEMPTY errors.
  const retries = isWindows ? 100 : 1;
  let i = 0;
  do {
    let threw = true;
    try {
      const ret = options.rmdirSync(p, options);
      threw = false;
      return ret;
    } finally {
      if (++i < retries && threw) continue;
    }
  } while (true);
};
module.exports = rimraf;
rimraf.sync = rimrafSync;

/***/ }),

/***/ 8995:
/*!*******************************************!*\
  !*** ./node_modules/tmp-promise/index.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


const {
  promisify
} = __webpack_require__(/*! util */ 3837);
const tmp = __webpack_require__(/*! tmp */ 2662);

// file
module.exports.fileSync = tmp.fileSync;
const fileWithOptions = promisify((options, cb) => tmp.file(options, (err, path, fd, cleanup) => err ? cb(err) : cb(undefined, {
  path,
  fd,
  cleanup: promisify(cleanup)
})));
module.exports.file = async options => fileWithOptions(options);
module.exports.withFile = async function withFile(fn, options) {
  const {
    path,
    fd,
    cleanup
  } = await module.exports.file(options);
  try {
    return await fn({
      path,
      fd
    });
  } finally {
    await cleanup();
  }
};

// directory
module.exports.dirSync = tmp.dirSync;
const dirWithOptions = promisify((options, cb) => tmp.dir(options, (err, path, cleanup) => err ? cb(err) : cb(undefined, {
  path,
  cleanup: promisify(cleanup)
})));
module.exports.dir = async options => dirWithOptions(options);
module.exports.withDir = async function withDir(fn, options) {
  const {
    path,
    cleanup
  } = await module.exports.dir(options);
  try {
    return await fn({
      path
    });
  } finally {
    await cleanup();
  }
};

// name generation
module.exports.tmpNameSync = tmp.tmpNameSync;
module.exports.tmpName = promisify(tmp.tmpName);
module.exports.tmpdir = tmp.tmpdir;
module.exports.setGracefulCleanup = tmp.setGracefulCleanup;

/***/ }),

/***/ 2662:
/*!*************************************!*\
  !*** ./node_modules/tmp/lib/tmp.js ***!
  \*************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*!
 * Tmp
 *
 * Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
 *
 * MIT Licensed
 */

/*
 * Module dependencies.
 */
const fs = __webpack_require__(/*! fs */ 2089);
const os = __webpack_require__(/*! os */ 9044);
const path = __webpack_require__(/*! path */ 3056);
const crypto = __webpack_require__(/*! crypto */ 6113);
const _c = {
  fs: fs.constants,
  os: os.constants
};
const rimraf = __webpack_require__(/*! rimraf */ 2856);

/*
 * The working inner variables.
 */
const
  // the random characters to choose from
  RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
  TEMPLATE_PATTERN = /XXXXXX/,
  DEFAULT_TRIES = 3,
  CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR),
  // constants are off on the windows platform and will not match the actual errno codes
  IS_WIN32 = os.platform() === 'win32',
  EBADF = _c.EBADF || _c.os.errno.EBADF,
  ENOENT = _c.ENOENT || _c.os.errno.ENOENT,
  DIR_MODE = 0o700 /* 448 */,
  FILE_MODE = 0o600 /* 384 */,
  EXIT = 'exit',
  // this will hold the objects need to be removed on exit
  _removeObjects = [],
  // API change in fs.rmdirSync leads to error when passing in a second parameter, e.g. the callback
  FN_RMDIR_SYNC = fs.rmdirSync.bind(fs),
  FN_RIMRAF_SYNC = rimraf.sync;
let _gracefulCleanup = false;

/**
 * Gets a temporary file name.
 *
 * @param {(Options|tmpNameCallback)} options options or callback
 * @param {?tmpNameCallback} callback the callback function
 */
function tmpName(options, callback) {
  const args = _parseArguments(options, callback),
    opts = args[0],
    cb = args[1];
  try {
    _assertAndSanitizeOptions(opts);
  } catch (err) {
    return cb(err);
  }
  let tries = opts.tries;
  (function _getUniqueName() {
    try {
      const name = _generateTmpName(opts);

      // check whether the path exists then retry if needed
      fs.stat(name, function (err) {
        /* istanbul ignore else */
        if (!err) {
          /* istanbul ignore else */
          if (tries-- > 0) return _getUniqueName();
          return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name));
        }
        cb(null, name);
      });
    } catch (err) {
      cb(err);
    }
  })();
}

/**
 * Synchronous version of tmpName.
 *
 * @param {Object} options
 * @returns {string} the generated random name
 * @throws {Error} if the options are invalid or could not generate a filename
 */
function tmpNameSync(options) {
  const args = _parseArguments(options),
    opts = args[0];
  _assertAndSanitizeOptions(opts);
  let tries = opts.tries;
  do {
    const name = _generateTmpName(opts);
    try {
      fs.statSync(name);
    } catch (e) {
      return name;
    }
  } while (tries-- > 0);
  throw new Error('Could not get a unique tmp filename, max tries reached');
}

/**
 * Creates and opens a temporary file.
 *
 * @param {(Options|null|undefined|fileCallback)} options the config options or the callback function or null or undefined
 * @param {?fileCallback} callback
 */
function file(options, callback) {
  const args = _parseArguments(options, callback),
    opts = args[0],
    cb = args[1];

  // gets a temporary filename
  tmpName(opts, function _tmpNameCreated(err, name) {
    /* istanbul ignore else */
    if (err) return cb(err);

    // create and open the file
    fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) {
      /* istanbu ignore else */
      if (err) return cb(err);
      if (opts.discardDescriptor) {
        return fs.close(fd, function _discardCallback(possibleErr) {
          // the chance of getting an error on close here is rather low and might occur in the most edgiest cases only
          return cb(possibleErr, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts, false));
        });
      } else {
        // detachDescriptor passes the descriptor whereas discardDescriptor closes it, either way, we no longer care
        // about the descriptor
        const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
        cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false));
      }
    });
  });
}

/**
 * Synchronous version of file.
 *
 * @param {Options} options
 * @returns {FileSyncObject} object consists of name, fd and removeCallback
 * @throws {Error} if cannot create a file
 */
function fileSync(options) {
  const args = _parseArguments(options),
    opts = args[0];
  const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
  const name = tmpNameSync(opts);
  var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
  /* istanbul ignore else */
  if (opts.discardDescriptor) {
    fs.closeSync(fd);
    fd = undefined;
  }
  return {
    name: name,
    fd: fd,
    removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true)
  };
}

/**
 * Creates a temporary directory.
 *
 * @param {(Options|dirCallback)} options the options or the callback function
 * @param {?dirCallback} callback
 */
function dir(options, callback) {
  const args = _parseArguments(options, callback),
    opts = args[0],
    cb = args[1];

  // gets a temporary filename
  tmpName(opts, function _tmpNameCreated(err, name) {
    /* istanbul ignore else */
    if (err) return cb(err);

    // create the directory
    fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) {
      /* istanbul ignore else */
      if (err) return cb(err);
      cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false));
    });
  });
}

/**
 * Synchronous version of dir.
 *
 * @param {Options} options
 * @returns {DirSyncObject} object consists of name and removeCallback
 * @throws {Error} if it cannot create a directory
 */
function dirSync(options) {
  const args = _parseArguments(options),
    opts = args[0];
  const name = tmpNameSync(opts);
  fs.mkdirSync(name, opts.mode || DIR_MODE);
  return {
    name: name,
    removeCallback: _prepareTmpDirRemoveCallback(name, opts, true)
  };
}

/**
 * Removes files asynchronously.
 *
 * @param {Object} fdPath
 * @param {Function} next
 * @private
 */
function _removeFileAsync(fdPath, next) {
  const _handler = function (err) {
    if (err && !_isENOENT(err)) {
      // reraise any unanticipated error
      return next(err);
    }
    next();
  };
  if (0 <= fdPath[0]) fs.close(fdPath[0], function () {
    fs.unlink(fdPath[1], _handler);
  });else fs.unlink(fdPath[1], _handler);
}

/**
 * Removes files synchronously.
 *
 * @param {Object} fdPath
 * @private
 */
function _removeFileSync(fdPath) {
  let rethrownException = null;
  try {
    if (0 <= fdPath[0]) fs.closeSync(fdPath[0]);
  } catch (e) {
    // reraise any unanticipated error
    if (!_isEBADF(e) && !_isENOENT(e)) throw e;
  } finally {
    try {
      fs.unlinkSync(fdPath[1]);
    } catch (e) {
      // reraise any unanticipated error
      if (!_isENOENT(e)) rethrownException = e;
    }
  }
  if (rethrownException !== null) {
    throw rethrownException;
  }
}

/**
 * Prepares the callback for removal of the temporary file.
 *
 * Returns either a sync callback or a async callback depending on whether
 * fileSync or file was called, which is expressed by the sync parameter.
 *
 * @param {string} name the path of the file
 * @param {number} fd file descriptor
 * @param {Object} opts
 * @param {boolean} sync
 * @returns {fileCallback | fileCallbackSync}
 * @private
 */
function _prepareTmpFileRemoveCallback(name, fd, opts, sync) {
  const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync);
  const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync);
  if (!opts.keep) _removeObjects.unshift(removeCallbackSync);
  return sync ? removeCallbackSync : removeCallback;
}

/**
 * Prepares the callback for removal of the temporary directory.
 *
 * Returns either a sync callback or a async callback depending on whether
 * tmpFileSync or tmpFile was called, which is expressed by the sync parameter.
 *
 * @param {string} name
 * @param {Object} opts
 * @param {boolean} sync
 * @returns {Function} the callback
 * @private
 */
function _prepareTmpDirRemoveCallback(name, opts, sync) {
  const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs);
  const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC;
  const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync);
  const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync);
  if (!opts.keep) _removeObjects.unshift(removeCallbackSync);
  return sync ? removeCallbackSync : removeCallback;
}

/**
 * Creates a guarded function wrapping the removeFunction call.
 *
 * The cleanup callback is save to be called multiple times.
 * Subsequent invocations will be ignored.
 *
 * @param {Function} removeFunction
 * @param {string} fileOrDirName
 * @param {boolean} sync
 * @param {cleanupCallbackSync?} cleanupCallbackSync
 * @returns {cleanupCallback | cleanupCallbackSync}
 * @private
 */
function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) {
  let called = false;

  // if sync is true, the next parameter will be ignored
  return function _cleanupCallback(next) {
    /* istanbul ignore else */
    if (!called) {
      // remove cleanupCallback from cache
      const toRemove = cleanupCallbackSync || _cleanupCallback;
      const index = _removeObjects.indexOf(toRemove);
      /* istanbul ignore else */
      if (index >= 0) _removeObjects.splice(index, 1);
      called = true;
      if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) {
        return removeFunction(fileOrDirName);
      } else {
        return removeFunction(fileOrDirName, next || function () {});
      }
    }
  };
}

/**
 * The garbage collector.
 *
 * @private
 */
function _garbageCollector() {
  /* istanbul ignore else */
  if (!_gracefulCleanup) return;

  // the function being called removes itself from _removeObjects,
  // loop until _removeObjects is empty
  while (_removeObjects.length) {
    try {
      _removeObjects[0]();
    } catch (e) {
      // already removed?
    }
  }
}

/**
 * Random name generator based on crypto.
 * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript
 *
 * @param {number} howMany
 * @returns {string} the generated random name
 * @private
 */
function _randomChars(howMany) {
  let value = [],
    rnd = null;

  // make sure that we do not fail because we ran out of entropy
  try {
    rnd = crypto.randomBytes(howMany);
  } catch (e) {
    rnd = crypto.pseudoRandomBytes(howMany);
  }
  for (var i = 0; i < howMany; i++) {
    value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]);
  }
  return value.join('');
}

/**
 * Helper which determines whether a string s is blank, that is undefined, or empty or null.
 *
 * @private
 * @param {string} s
 * @returns {Boolean} true whether the string s is blank, false otherwise
 */
function _isBlank(s) {
  return s === null || _isUndefined(s) || !s.trim();
}

/**
 * Checks whether the `obj` parameter is defined or not.
 *
 * @param {Object} obj
 * @returns {boolean} true if the object is undefined
 * @private
 */
function _isUndefined(obj) {
  return typeof obj === 'undefined';
}

/**
 * Parses the function arguments.
 *
 * This function helps to have optional arguments.
 *
 * @param {(Options|null|undefined|Function)} options
 * @param {?Function} callback
 * @returns {Array} parsed arguments
 * @private
 */
function _parseArguments(options, callback) {
  /* istanbul ignore else */
  if (typeof options === 'function') {
    return [{}, options];
  }

  /* istanbul ignore else */
  if (_isUndefined(options)) {
    return [{}, callback];
  }

  // copy options so we do not leak the changes we make internally
  const actualOptions = {};
  for (const key of Object.getOwnPropertyNames(options)) {
    actualOptions[key] = options[key];
  }
  return [actualOptions, callback];
}

/**
 * Generates a new temporary name.
 *
 * @param {Object} opts
 * @returns {string} the new random name according to opts
 * @private
 */
function _generateTmpName(opts) {
  const tmpDir = opts.tmpdir;

  /* istanbul ignore else */
  if (!_isUndefined(opts.name)) return path.join(tmpDir, opts.dir, opts.name);

  /* istanbul ignore else */
  if (!_isUndefined(opts.template)) return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));

  // prefix and postfix
  const name = [opts.prefix ? opts.prefix : 'tmp', '-', process.pid, '-', _randomChars(12), opts.postfix ? '-' + opts.postfix : ''].join('');
  return path.join(tmpDir, opts.dir, name);
}

/**
 * Asserts whether the specified options are valid, also sanitizes options and provides sane defaults for missing
 * options.
 *
 * @param {Options} options
 * @private
 */
function _assertAndSanitizeOptions(options) {
  options.tmpdir = _getTmpDir(options);
  const tmpDir = options.tmpdir;

  /* istanbul ignore else */
  if (!_isUndefined(options.name)) _assertIsRelative(options.name, 'name', tmpDir);
  /* istanbul ignore else */
  if (!_isUndefined(options.dir)) _assertIsRelative(options.dir, 'dir', tmpDir);
  /* istanbul ignore else */
  if (!_isUndefined(options.template)) {
    _assertIsRelative(options.template, 'template', tmpDir);
    if (!options.template.match(TEMPLATE_PATTERN)) throw new Error(`Invalid template, found "${options.template}".`);
  }
  /* istanbul ignore else */
  if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) throw new Error(`Invalid tries, found "${options.tries}".`);

  // if a name was specified we will try once
  options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1;
  options.keep = !!options.keep;
  options.detachDescriptor = !!options.detachDescriptor;
  options.discardDescriptor = !!options.discardDescriptor;
  options.unsafeCleanup = !!options.unsafeCleanup;

  // sanitize dir, also keep (multiple) blanks if the user, purportedly sane, requests us to
  options.dir = _isUndefined(options.dir) ? '' : path.relative(tmpDir, _resolvePath(options.dir, tmpDir));
  options.template = _isUndefined(options.template) ? undefined : path.relative(tmpDir, _resolvePath(options.template, tmpDir));
  // sanitize further if template is relative to options.dir
  options.template = _isBlank(options.template) ? undefined : path.relative(options.dir, options.template);

  // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to
  options.name = _isUndefined(options.name) ? undefined : _sanitizeName(options.name);
  options.prefix = _isUndefined(options.prefix) ? '' : options.prefix;
  options.postfix = _isUndefined(options.postfix) ? '' : options.postfix;
}

/**
 * Resolve the specified path name in respect to tmpDir.
 *
 * The specified name might include relative path components, e.g. ../
 * so we need to resolve in order to be sure that is is located inside tmpDir
 *
 * @param name
 * @param tmpDir
 * @returns {string}
 * @private
 */
function _resolvePath(name, tmpDir) {
  const sanitizedName = _sanitizeName(name);
  if (sanitizedName.startsWith(tmpDir)) {
    return path.resolve(sanitizedName);
  } else {
    return path.resolve(path.join(tmpDir, sanitizedName));
  }
}

/**
 * Sanitize the specified path name by removing all quote characters.
 *
 * @param name
 * @returns {string}
 * @private
 */
function _sanitizeName(name) {
  if (_isBlank(name)) {
    return name;
  }
  return name.replace(/["']/g, '');
}

/**
 * Asserts whether specified name is relative to the specified tmpDir.
 *
 * @param {string} name
 * @param {string} option
 * @param {string} tmpDir
 * @throws {Error}
 * @private
 */
function _assertIsRelative(name, option, tmpDir) {
  if (option === 'name') {
    // assert that name is not absolute and does not contain a path
    if (path.isAbsolute(name)) throw new Error(`${option} option must not contain an absolute path, found "${name}".`);
    // must not fail on valid .<name> or ..<name> or similar such constructs
    let basename = path.basename(name);
    if (basename === '..' || basename === '.' || basename !== name) throw new Error(`${option} option must not contain a path, found "${name}".`);
  } else {
    // if (option === 'dir' || option === 'template') {
    // assert that dir or template are relative to tmpDir
    if (path.isAbsolute(name) && !name.startsWith(tmpDir)) {
      throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`);
    }
    let resolvedPath = _resolvePath(name, tmpDir);
    if (!resolvedPath.startsWith(tmpDir)) throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`);
  }
}

/**
 * Helper for testing against EBADF to compensate changes made to Node 7.x under Windows.
 *
 * @private
 */
function _isEBADF(error) {
  return _isExpectedError(error, -EBADF, 'EBADF');
}

/**
 * Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows.
 *
 * @private
 */
function _isENOENT(error) {
  return _isExpectedError(error, -ENOENT, 'ENOENT');
}

/**
 * Helper to determine whether the expected error code matches the actual code and errno,
 * which will differ between the supported node versions.
 *
 * - Node >= 7.0:
 *   error.code {string}
 *   error.errno {number} any numerical value will be negated
 *
 * CAVEAT
 *
 * On windows, the errno for EBADF is -4083 but os.constants.errno.EBADF is different and we must assume that ENOENT
 * is no different here.
 *
 * @param {SystemError} error
 * @param {number} errno
 * @param {string} code
 * @private
 */
function _isExpectedError(error, errno, code) {
  return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno;
}

/**
 * Sets the graceful cleanup.
 *
 * If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the
 * temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary
 * object removals.
 */
function setGracefulCleanup() {
  _gracefulCleanup = true;
}

/**
 * Returns the currently configured tmp dir from os.tmpdir().
 *
 * @private
 * @param {?Options} options
 * @returns {string} the currently configured tmp dir
 */
function _getTmpDir(options) {
  return path.resolve(_sanitizeName(options && options.tmpdir || os.tmpdir()));
}

// Install process exit listener
process.addListener(EXIT, _garbageCollector);

/**
 * Configuration options.
 *
 * @typedef {Object} Options
 * @property {?boolean} keep the temporary object (file or dir) will not be garbage collected
 * @property {?number} tries the number of tries before give up the name generation
 * @property (?int) mode the access mode, defaults are 0o700 for directories and 0o600 for files
 * @property {?string} template the "mkstemp" like filename template
 * @property {?string} name fixed name relative to tmpdir or the specified dir option
 * @property {?string} dir tmp directory relative to the root tmp directory in use
 * @property {?string} prefix prefix for the generated name
 * @property {?string} postfix postfix for the generated name
 * @property {?string} tmpdir the root tmp directory which overrides the os tmpdir
 * @property {?boolean} unsafeCleanup recursively removes the created temporary directory, even when it's not empty
 * @property {?boolean} detachDescriptor detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection
 * @property {?boolean} discardDescriptor discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection
 */

/**
 * @typedef {Object} FileSyncObject
 * @property {string} name the name of the file
 * @property {string} fd the file descriptor or -1 if the fd has been discarded
 * @property {fileCallback} removeCallback the callback function to remove the file
 */

/**
 * @typedef {Object} DirSyncObject
 * @property {string} name the name of the directory
 * @property {fileCallback} removeCallback the callback function to remove the directory
 */

/**
 * @callback tmpNameCallback
 * @param {?Error} err the error object if anything goes wrong
 * @param {string} name the temporary file name
 */

/**
 * @callback fileCallback
 * @param {?Error} err the error object if anything goes wrong
 * @param {string} name the temporary file name
 * @param {number} fd the file descriptor or -1 if the fd had been discarded
 * @param {cleanupCallback} fn the cleanup callback function
 */

/**
 * @callback fileCallbackSync
 * @param {?Error} err the error object if anything goes wrong
 * @param {string} name the temporary file name
 * @param {number} fd the file descriptor or -1 if the fd had been discarded
 * @param {cleanupCallbackSync} fn the cleanup callback function
 */

/**
 * @callback dirCallback
 * @param {?Error} err the error object if anything goes wrong
 * @param {string} name the temporary file name
 * @param {cleanupCallback} fn the cleanup callback function
 */

/**
 * @callback dirCallbackSync
 * @param {?Error} err the error object if anything goes wrong
 * @param {string} name the temporary file name
 * @param {cleanupCallbackSync} fn the cleanup callback function
 */

/**
 * Removes the temporary created file or directory.
 *
 * @callback cleanupCallback
 * @param {simpleCallback} [next] function to call whenever the tmp object needs to be removed
 */

/**
 * Removes the temporary created file or directory.
 *
 * @callback cleanupCallbackSync
 */

/**
 * Callback function for function composition.
 * @see {@link https://github.com/raszi/node-tmp/issues/57|raszi/node-tmp#57}
 *
 * @callback simpleCallback
 */

// exporting all the needed methods

// evaluate _getTmpDir() lazily, mainly for simplifying testing but it also will
// allow users to reconfigure the temporary directory
Object.defineProperty(module.exports, "tmpdir", ({
  enumerable: true,
  configurable: false,
  get: function () {
    return _getTmpDir();
  }
}));
module.exports.dir = dir;
module.exports.dirSync = dirSync;
module.exports.file = file;
module.exports.fileSync = fileSync;
module.exports.tmpName = tmpName;
module.exports.tmpNameSync = tmpNameSync;
module.exports.setGracefulCleanup = setGracefulCleanup;

/***/ }),

/***/ 341:
/*!***************************************!*\
  !*** ./node_modules/wrappy/wrappy.js ***!
  \***************************************/
/***/ ((module) => {

// Returns a wrapper function that returns a wrapped callback
// The wrapper function should do some stuff, and return a
// presumably different callback function.
// This makes sure that own properties are retained, so that
// decorations and such are not lost along the way.
module.exports = wrappy;
function wrappy(fn, cb) {
  if (fn && cb) return wrappy(fn)(cb);
  if (typeof fn !== 'function') throw new TypeError('need wrapper function');
  Object.keys(fn).forEach(function (k) {
    wrapper[k] = fn[k];
  });
  return wrapper;
  function wrapper() {
    var args = new Array(arguments.length);
    for (var i = 0; i < args.length; i++) {
      args[i] = arguments[i];
    }
    var ret = fn.apply(this, args);
    var cb = args[args.length - 1];
    if (typeof ret === 'function' && ret !== cb) {
      Object.keys(cb).forEach(function (k) {
        ret[k] = cb[k];
      });
    }
    return ret;
  }
}

/***/ }),

/***/ 9576:
/*!**************************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/keyboardInteractiveAuthPanel.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 */ 7529);
/* 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, ":host{display:flex;flex-direction:column;padding:15px 20px}.prompt-text{white-space:pre-wrap}", "",{"version":3,"sources":["webpack://./src/components/keyboardInteractiveAuthPanel.component.scss"],"names":[],"mappings":"AAAA,MACI,YAAA,CACA,qBAAA,CACA,iBAAA,CAGJ,aACI,oBAAA","sourcesContent":[":host {\n    display: flex;\n    flex-direction: column;\n    padding: 15px 20px;\n}\n\n.prompt-text {\n    white-space: pre-wrap;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 7543:
/*!*******************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/sftpPanel.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 */ 7529);
/* 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, ":host{display:flex;flex-direction:column}:host>.header{padding:5px 15px 0 20px;display:flex;align-items:center;flex:none}:host>.filter-bar{flex:none}:host>.body{padding:10px 20px;flex:1 1 0;overflow-y:auto}:host .breadcrumb{background:none;padding:0;margin:0}:host .breadcrumb-item{cursor:pointer}:host .breadcrumb-item:first-child{font-weight:bold}:host .list-group-item-action:hover{background:rgba(255,255,255,.05)}:host .mode,:host .size,:host .date{font-family:monospace;opacity:.5;font-size:12px;text-align:right;margin-left:20px}:host .size{width:100px}:host .date{width:200px}.btn-link svg{width:12px}", "",{"version":3,"sources":["webpack://./src/components/sftpPanel.component.scss"],"names":[],"mappings":"AAAA,MACI,YAAA,CACA,qBAAA,CAEA,cACI,uBAAA,CACA,YAAA,CACA,kBAAA,CACA,SAAA,CAGJ,kBACI,SAAA,CAGJ,YACI,iBAAA,CACA,UAAA,CACA,eAAA,CAGJ,kBACI,eAAA,CACA,SAAA,CACA,QAAA,CAGJ,uBACI,cAAA,CAGJ,mCACI,gBAAA,CAIA,oCACI,gCAAA,CAIR,oCACI,qBAAA,CACA,UAAA,CACA,cAAA,CACA,gBAAA,CACA,gBAAA,CAGJ,YACI,WAAA,CAGJ,YACI,WAAA,CAIR,cACI,UAAA","sourcesContent":[":host {\n    display: flex;\n    flex-direction: column;\n\n    > .header {\n        padding: 5px 15px 0 20px;\n        display: flex;\n        align-items: center;\n        flex: none;\n    }\n\n    > .filter-bar {\n        flex: none;\n    }\n\n    > .body {\n        padding: 10px 20px;\n        flex: 1 1 0;\n        overflow-y: auto;\n    }\n\n    .breadcrumb {\n        background: none;\n        padding: 0;\n        margin: 0;\n    }\n\n    .breadcrumb-item {\n        cursor: pointer;\n    }\n\n    .breadcrumb-item:first-child {\n        font-weight: bold;\n    }\n\n    .list-group-item-action {\n        &:hover {\n            background: rgba(white, .05);\n        }\n    }\n\n    .mode, .size, .date {\n        font-family: monospace;\n        opacity: .5;\n        font-size: 12px;\n        text-align: right;\n        margin-left: 20px;\n    }\n\n    .size {\n        width: 100px;\n    }\n\n    .date {\n        width: 200px;\n    }\n}\n\n.btn-link svg {\n    width: 12px;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 9886:
/*!*****************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/sshTab.component.scss ***!
  \*****************************************************************************************************************************/
/***/ ((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 */ 7529);
/* 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://./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___);


/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"modal-header\"\u003E\n  \u003Ch3 class=\"m-0\" translate\u003EHost key verification\u003C\u002Fh3\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"modal-body pt-0\"\u003E\n  \u003Cdiv class=\"alert alert-danger\" *ngIf=\"isMismatched\"\u003E\u003Cstrong translate\u003EWarning: remote host's key has suddenly changed!\u003C\u002Fstrong\u003E\n    \u003Cdiv translate\u003EYou could be under a man-in-the-middle attack right now, or the host key could have just been changed.\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"mb-3\" *ngIf=\"isMismatched\"\u003E\n    \u003Cdiv class=\"d-flex align-items-center\"\u003E\n      \u003Clabel translate\u003ELast known host key fingerprint\u003C\u002Flabel\u003E\n      \u003Cdiv class=\"badge text-bg-danger ms-auto\"\u003E{{ selector.type }}\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\u003Ccode\u003E{{knownHost?.digest}}\u003C\u002Fcode\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"mb-3\"\u003E\n    \u003Cdiv class=\"d-flex align-items-center\"\u003E\n      \u003Clabel translate\u003ECurrent host key fingerprint\u003C\u002Flabel\u003E\n      \u003Cdiv class=\"badge text-bg-success ms-auto\"\u003E{{ selector.type }}\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\u003Ccode\u003E{{digest}}\u003C\u002Fcode\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"modal-footer\"\u003E\n  \u003Cdiv class=\"w-100\"\u003E\n    \u003Cbutton class=\"d-block w-100 mb-3 btn btn-primary\" (click)=\"acceptAndSave()\" [class.btn-danger]=\"isMismatched\" translate\u003EAccept and remember key\u003C\u002Fbutton\u003E\n    \u003Cbutton class=\"d-block w-100 mb-3 btn btn-secondary\" (click)=\"accept()\" [class.btn-warning]=\"isMismatched\" translate\u003EAccept just this once\u003C\u002Fbutton\u003E\n    \u003Cbutton class=\"d-block w-100 btn btn-secondary\" [class.btn-danger]=\"!isMismatched\" (click)=\"cancel()\" translate\u003EDisconnect\u003C\u002Fbutton\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"d-flex\"\u003E\u003Cstrong translate\u003EKeyboard-interactive auth\u003C\u002Fstrong\u003E\n  \u003Cdiv class=\"ms-2\"\u003E{{prompt.name}}\u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"prompt-text\"\u003E{{prompt.prompts[step].prompt}}\u003C\u002Fdiv\u003E\n\u003Cinput class=\"form-control mt-2\" #input autofocus [type]=\"isPassword() ? &quot;password&quot;: &quot;text&quot;\" placeholder=\"Response\" (keyup.enter)=\"next()\" [(ngModel)]=\"prompt.responses[step]\"\u003E\n\u003Cdiv class=\"d-flex mt-3\"\u003E\n  \u003Ccheckbox *ngIf=\"isPassword()\" [(ngModel)]=\"remember\" [text]=\"&quot;Save password&quot;|translate\"\u003E\u003C\u002Fcheckbox\u003E\n  \u003Cdiv class=\"ms-auto\"\u003E\u003C\u002Fdiv\u003E\n  \u003Cbutton class=\"btn btn-secondary me-3\" *ngIf=\"step &gt; 0\" (click)=\"previous()\"\u003E\u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-primary\" (click)=\"next()\"\u003E\u003Cspan *ngIf=\"step &lt; prompt.prompts.length - 1\"\u003ENext\u003C\u002Fspan\u003E\u003Cspan *ngIf=\"step == prompt.prompts.length - 1\"\u003EFinish\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"modal-body\"\u003E\n  \u003Clabel translate\u003EName for the new directory\u003C\u002Flabel\u003E\n  \u003Cdiv class=\"mb-3 w-100 me-2\"\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"directoryName\"\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"modal-footer\"\u003E\n  \u003Cbutton class=\"btn btn-success\" (click)=\"create()\" translate\u003ECreate\u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-danger\" (click)=\"cancel()\" translate\u003ECancel\u003C\u002Fbutton\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"modal-body\"\u003E\n  \u003Clabel translate\u003EDeleting\u003C\u002Flabel\u003E\n  \u003Cdiv class=\"no-wrap\"\u003E{{progressMessage}}\u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"modal-footer\"\u003E\n  \u003Cbutton class=\"btn btn-danger\" (click)=\"cancel()\" translate\u003ECancel\u003C\u002Fbutton\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"header\"\u003E\n  \u003Cinput class=\"form-control flex-grow-1 w-0\" *ngIf=\"editingPath !== null\" type=\"text\" autofocus (keydown.enter)=\"confirmPath()\" (keydown.esc)=\"editingPath = null\" (blur)=\"editingPath = null\" [(ngModel)]=\"editingPath\"\u003E\n  \u003Cdiv class=\"breadcrumb\" *ngIf=\"editingPath === null\" (dblclick)=\"editPath()\"\u003E\u003Ca class=\"breadcrumb-item text-decoration-none\" (click)=\"navigate(&quot;\u002F&quot;)\"\u003ESFTP\u003C\u002Fa\u003E\u003Ca class=\"breadcrumb-item text-decoration-none\" *ngFor=\"let segment of pathSegments\" (click)=\"navigate(segment.path)\"\u003E{{segment.name}}\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"breadcrumb-spacer flex-grow-1 h-100\" (dblclick)=\"editPath()\"\u003E\u003C\u002Fdiv\u003E\n  \u003Cbutton class=\"btn btn-link btn-sm flex-shrink-0 d-flex\" *ngIf=\"!showFilter\" (click)=\"showFilter = true\"\u003E\u003Ci class=\"fas fa-filter me-1\"\u003E\u003C\u002Fi\u003E\n    \u003Cdiv translate\u003EFilter\u003C\u002Fdiv\u003E\n  \u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-link btn-sm flex-shrink-0 d-flex\" (click)=\"openCreateDirectoryModal()\"\u003E\u003Ci class=\"fas fa-plus me-1\"\u003E\u003C\u002Fi\u003E\n    \u003Cdiv translate\u003ECreate directory\u003C\u002Fdiv\u003E\n  \u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-link btn-sm flex-shrink-0 d-flex\" (click)=\"upload()\"\u003E\u003Ci class=\"fas fa-upload me-1\"\u003E\u003C\u002Fi\u003E\n    \u003Cdiv translate\u003EUpload files\u003C\u002Fdiv\u003E\n  \u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-link btn-sm flex-shrink-0 d-flex\" (click)=\"uploadFolder()\"\u003E\u003Ci class=\"fas fa-upload me-1\"\u003E\u003C\u002Fi\u003E\n    \u003Cdiv translate\u003EUpload folder\u003C\u002Fdiv\u003E\n  \u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-link text-decoration-none\" (click)=\"close()\"\u003E" + (null == (pug_interp = __webpack_require__(/*! ../../../tabby-core/src/icons/times.svg */ 2024)) ? "" : pug_interp) + "\u003C\u002Fbutton\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"filter-bar px-3 py-2 border-bottom\" *ngIf=\"showFilter\"\u003E\n  \u003Cdiv class=\"input-group\"\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Filter...\" autofocus [(ngModel)]=\"filterText\" (input)=\"onFilterChange()\" (keydown.escape)=\"clearFilter()\"\u003E\n    \u003Cbutton class=\"btn btn-secondary\" (click)=\"clearFilter()\"\u003E\u003Ci class=\"fas fa-times\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"body\" dropZone (transfer)=\"uploadOneFolder($event)\"\u003E\u003Ca class=\"alert alert-info d-flex align-items-center\" *ngIf=\"shouldShowCWDTip &amp;&amp; !cwdDetectionAvailable\" (click)=\"platform.openExternal(&quot;https:\u002F\u002Ftabby.sh\u002Fgo\u002Fcwd-detection&quot;)\"\u003E\n    \u003Cdiv class=\"me-auto\"\u003E\u003Cstrong translate\u003EWorking directory detection\u003C\u002Fstrong\u003E\n      \u003Cdiv translate\u003ELearn how to allow Tabby to detect remote shell's working directory.\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cbutton class=\"close\" (click)=\"dismissCWDTip()\"\u003E\u003Ci class=\"fas fa-close\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\u003C\u002Fa\u003E\n  \u003Cdiv *ngIf=\"!sftp\" translate\u003EConnecting\u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"sftp\"\u003E\n    \u003Cdiv *ngIf=\"fileList === null\" translate\u003ELoading\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"list-group list-group-light\" *ngIf=\"fileList !== null\"\u003E\n      \u003Cdiv class=\"list-group-item list-group-item-action d-flex align-items-center\" *ngIf=\"path !== &quot;\u002F&quot; &amp;&amp; (!showFilter || filterText.trim() === &quot;&quot;)\" (click)=\"goUp()\"\u003E\u003Ci class=\"fas fa-fw fa-level-up-alt\"\u003E\u003C\u002Fi\u003E\n        \u003Cdiv translate\u003EGo up\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"list-group-item list-group-item-action d-flex align-items-center\" *ngFor=\"let item of filteredFileList\" (contextmenu)=\"showContextMenu(item, $event)\" (click)=\"open(item)\"\u003E\u003Ci class=\"fa-fw\" [class]=\"getIcon(item)\"\u003E\u003C\u002Fi\u003E\n        \u003Cdiv\u003E{{item.name}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"me-auto\"\u003E\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"size\" *ngIf=\"!item.isDirectory\"\u003E{{item.size|filesize}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"date\"\u003E{{item.modified|tabbyDate}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"mode\"\u003E{{getModeString(item)}}\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"alert alert-info text-center mt-3\" *ngIf=\"fileList !== null &amp;&amp; filteredFileList.length === 0 &amp;&amp; showFilter &amp;&amp; filterText.trim() !== &quot;&quot;\"\u003E\u003Ci class=\"fas fa-search me-2\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ENo files match the filter \"{{filterText}}\"\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"list-group mb-3\"\u003E\n  \u003Cdiv class=\"list-group-item d-flex align-items-center\" *ngFor=\"let fw of model\"\u003E\n    \u003Cdiv\u003E\n      \u003Cdiv class=\"d-flex align-items-center\"\u003E\u003Cstrong *ngIf=\"fw.type === PortForwardType.Local\" translate\u003ELocal\u003C\u002Fstrong\u003E\u003Cstrong *ngIf=\"fw.type === PortForwardType.Remote\" translate\u003ERemote\u003C\u002Fstrong\u003E\u003Cstrong *ngIf=\"fw.type === PortForwardType.Dynamic\" translate translateContext=\"[Dynamic] port forwarding\"\u003Eid.port-forwarding.dynamic\u003C\u002Fstrong\u003E\n        \u003Cdiv class=\"ms-3\"\u003E{{fw.host}}:{{fw.port}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"ms-2\"\u003E&rarr;\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"ms-2\" *ngIf=\"fw.type !== PortForwardType.Dynamic\"\u003E{{fw.targetAddress}}:{{fw.targetPort}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"ms-2\" *ngIf=\"fw.type === PortForwardType.Dynamic\" translate\u003ESOCKS proxy\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv\u003E{{fw.description}}\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cbutton class=\"btn btn-link hover-reveal ms-auto\" (click)=\"remove(fw)\"\u003E\u003Ci class=\"fas fa-trash-alt\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Ch5 translate\u003EAdd a port forward\u003C\u002Fh5\u003E\n\u003Cdiv class=\"input-group mb-2\" *ngIf=\"newForward.type === PortForwardType.Dynamic\"\u003E\n  \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"newForward.host\"\u003E\n  \u003Cdiv class=\"input-group-text\"\u003E:\u003C\u002Fdiv\u003E\n  \u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"newForward.port\"\u003E\n  \u003Cdiv class=\"input-group-text\"\u003E&rarr;\u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"input-group-text\" style=\"flex: 3 1 0\" translate\u003ESOCKS proxy\u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"input-group mb-2\" *ngIf=\"newForward.type !== PortForwardType.Dynamic\"\u003E\n  \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"newForward.host\"\u003E\n  \u003Cdiv class=\"input-group-text\"\u003E:\u003C\u002Fdiv\u003E\n  \u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"newForward.port\"\u003E\n  \u003Cdiv class=\"input-group-text\"\u003E&rarr;\u003C\u002Fdiv\u003E\n  \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"newForward.targetAddress\"\u003E\n  \u003Cdiv class=\"input-group-text\"\u003E:\u003C\u002Fdiv\u003E\n  \u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"newForward.targetPort\"\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"input-group mb-2\"\u003E\n  \u003Cinput class=\"form-control\" type=\"text\" [placeholder]=\"&quot;Description&quot;|translate\" [(ngModel)]=\"newForward.description\"\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"d-flex\"\u003E\n  \u003Cdiv class=\"btn-group me-auto\"\u003E\n    \u003Cinput class=\"btn-check\" type=\"radio\" [(ngModel)]=\"newForward.type\" id=\"newForwardTypeLocal\" name=\"newForwardType\" [value]=\"PortForwardType.Local\"\u003E\n    \u003Clabel class=\"btn btn-secondary m-0\" for=\"newForwardTypeLocal\" translate\u003ELocal\u003C\u002Flabel\u003E\n    \u003Cinput class=\"btn-check\" type=\"radio\" [(ngModel)]=\"newForward.type\" id=\"newForwardTypeRemote\" name=\"newForwardType\" [value]=\"PortForwardType.Remote\"\u003E\n    \u003Clabel class=\"btn btn-secondary m-0\" for=\"newForwardTypeRemote\" translate\u003ERemote\u003C\u002Flabel\u003E\n    \u003Cinput class=\"btn-check\" type=\"radio\" [(ngModel)]=\"newForward.type\" id=\"newForwardTypeDynamic\" name=\"newForwardType\" [value]=\"PortForwardType.Dynamic\"\u003E\n    \u003Clabel class=\"btn btn-secondary m-0\" for=\"newForwardTypeDynamic\" translate translateContext=\"[Dynamic] port forwarding\"\u003Eid.port-forwarding.dynamic\u003C\u002Flabel\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cbutton class=\"btn btn-primary\" (click)=\"addForward()\"\u003E\u003Ci class=\"fas fa-check me-2\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EForward port\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"modal-header\" *ngIf=\"session.forwardedPorts.length\"\u003E\n  \u003Ch5 class=\"m-0\" translate\u003EForwarded ports\u003C\u002Fh5\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"modal-body pt-0\"\u003E\n  \u003Cssh-port-forwarding-config [model]=\"session.forwardedPorts\" (forwardAdded)=\"onForwardAdded($event)\" (forwardRemoved)=\"onForwardRemoved($event)\"\u003E\u003C\u002Fssh-port-forwarding-config\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

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=\"d-flex w-100 mt-3\"\u003E\n        \u003Cdiv class=\"mb-3 me-2\" ngbDropdown\u003E\n          \u003Clabel translate\u003EConnection\u003C\u002Flabel\u003E\n          \u003Cbutton class=\"btn btn-secondary d-block\" ngbDropdownToggle\u003E{{getConnectionDropdownTitle()}}\u003C\u002Fbutton\u003E\n          \u003Cdiv ngbDropdownMenu\u003E\n            \u003Cbutton class=\"dropdown-item\" (click)=\"connectionMode = &quot;direct&quot;\" translate\u003EDirect\u003C\u002Fbutton\u003E\n            \u003Cbutton class=\"dropdown-item\" *ngIf=\"hostApp.platform !== Platform.Web\" (click)=\"connectionMode = &quot;proxyCommand&quot;\"\u003E\n              \u003Cdiv\u003EProxy command\u003C\u002Fdiv\u003E\n              \u003Cdiv class=\"text-muted\" translate\u003ECommand's stdin\u002Fstdout is used instead of a network connection\u003C\u002Fdiv\u003E\n            \u003C\u002Fbutton\u003E\n            \u003Cbutton class=\"dropdown-item\" (click)=\"connectionMode = &quot;jumpHost&quot;\"\u003E\n              \u003Cdiv translate\u003EJump host\u003C\u002Fdiv\u003E\n              \u003Cdiv class=\"text-muted\" translate\u003EConnect to a different host first and use it as a proxy\u003C\u002Fdiv\u003E\n            \u003C\u002Fbutton\u003E\n            \u003Cbutton class=\"dropdown-item\" (click)=\"connectionMode = &quot;socksProxy&quot;\"\u003E\n              \u003Cdiv translate\u003ESOCKS proxy\u003C\u002Fdiv\u003E\n              \u003Cdiv class=\"text-muted\" translate\u003EConnect through a proxy server\u003C\u002Fdiv\u003E\n            \u003C\u002Fbutton\u003E\n            \u003Cbutton class=\"dropdown-item\" (click)=\"connectionMode = &quot;httpProxy&quot;\"\u003E\n              \u003Cdiv translate\u003EHTTP proxy\u003C\u002Fdiv\u003E\n              \u003Cdiv class=\"text-muted\" translate\u003EUsing CONNECT method\u003C\u002Fdiv\u003E\n            \u003C\u002Fbutton\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"mb-3 w-100\" *ngIf=\"connectionMode === &quot;proxyCommand&quot;\"\u003E\n          \u003Clabel translate\u003EProxy command\u003C\u002Flabel\u003E\n          \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"profile.options.proxyCommand\"\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"mb-3 w-100 me-2\" *ngIf=\"connectionMode !== &quot;proxyCommand&quot;\"\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\" *ngIf=\"connectionMode !== &quot;proxyCommand&quot;\"\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      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"mb-3\" *ngIf=\"connectionMode === &quot;jumpHost&quot;\"\u003E\n        \u003Clabel translate\u003EJump host\u003C\u002Flabel\u003E\n        \u003Cselect class=\"form-control\" [(ngModel)]=\"profile.options.jumpHost\"\u003E\n          \u003Coption [ngValue]=\"null\" translate\u003ESelect\u003C\u002Foption\u003E\n          \u003Coption [ngValue]=\"x.id\" *ngFor=\"let x of jumpHosts\"\u003E{{getJumpHostLabel(x)}}\u003C\u002Foption\u003E\n        \u003C\u002Fselect\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"d-flex w-100\" *ngIf=\"connectionMode === &quot;socksProxy&quot;\"\u003E\n        \u003Cdiv class=\"mb-3 w-100 me-2\"\u003E\n          \u003Clabel translate\u003ESOCKS proxy host\u003C\u002Flabel\u003E\n          \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"profile.options.socksProxyHost\"\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"mb-3\"\u003E\n          \u003Clabel translate\u003ESOCKS proxy port\u003C\u002Flabel\u003E\n          \u003Cinput class=\"form-control\" type=\"number\" placeholder=\"5000\" [(ngModel)]=\"profile.options.socksProxyPort\"\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"d-flex w-100\" *ngIf=\"connectionMode === &quot;httpProxy&quot;\"\u003E\n        \u003Cdiv class=\"mb-3 w-100 me-2\"\u003E\n          \u003Clabel translate\u003EHTTP proxy host\u003C\u002Flabel\u003E\n          \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"profile.options.httpProxyHost\"\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"mb-3\"\u003E\n          \u003Clabel translate\u003EHTTP proxy port\u003C\u002Flabel\u003E\n          \u003Cinput class=\"form-control\" type=\"number\" placeholder=\"5000\" [(ngModel)]=\"profile.options.httpProxyPort\"\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"mb-3\"\u003E\n        \u003Clabel translate\u003EUsername\u003C\u002Flabel\u003E\n        \u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Ask every time\" [(ngModel)]=\"profile.options.user\"\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"mb-3\"\u003E\n        \u003Clabel translate\u003EAuthentication method\u003C\u002Flabel\u003E\n        \u003Cdiv class=\"btn-group mt-1 w-100\"\u003E\n          \u003Cinput class=\"btn-check\" type=\"radio\" name=\"auth\" [(ngModel)]=\"profile.options.auth\" id=\"authAuto\" [value]=\"null\"\u003E\n          \u003Clabel class=\"btn btn-secondary\" for=\"authAuto\"\u003E\u003Ci class=\"far fa-lightbulb\"\u003E\u003C\u002Fi\u003E\n            \u003Cdiv class=\"m-0\" translate\u003EAuto\u003C\u002Fdiv\u003E\n          \u003C\u002Flabel\u003E\n          \u003Cinput class=\"btn-check\" type=\"radio\" name=\"auth\" [(ngModel)]=\"profile.options.auth\" id=\"authPassword\" [value]=\"&quot;password&quot;\"\u003E\n          \u003Clabel class=\"btn btn-secondary\" for=\"authPassword\"\u003E\u003Ci class=\"fas fa-font\"\u003E\u003C\u002Fi\u003E\n            \u003Cdiv class=\"m-0\" translate\u003EPassword\u003C\u002Fdiv\u003E\n          \u003C\u002Flabel\u003E\n          \u003Cinput class=\"btn-check\" type=\"radio\" name=\"auth\" [(ngModel)]=\"profile.options.auth\" id=\"authPublicKey\" [value]=\"&quot;publicKey&quot;\"\u003E\n          \u003Clabel class=\"btn btn-secondary\" for=\"authPublicKey\"\u003E\u003Ci class=\"fas fa-key\"\u003E\u003C\u002Fi\u003E\n            \u003Cdiv class=\"m-0\" translate\u003EKey\u003C\u002Fdiv\u003E\n          \u003C\u002Flabel\u003E\n          \u003Cinput class=\"btn-check\" type=\"radio\" name=\"auth\" [(ngModel)]=\"profile.options.auth\" id=\"authAgent\" [value]=\"&quot;agent&quot;\"\u003E\n          \u003Clabel class=\"btn btn-secondary\" for=\"authAgent\" ng:if=\"hostApp.platform !== Platform.Web\"\u003E\u003Ci class=\"fas fa-user-secret\"\u003E\u003C\u002Fi\u003E\n            \u003Cdiv class=\"m-0\" translate\u003EAgent\u003C\u002Fdiv\u003E\n          \u003C\u002Flabel\u003E\n          \u003Cinput class=\"btn-check\" type=\"radio\" name=\"auth\" [(ngModel)]=\"profile.options.auth\" id=\"auth&quot;keyboardInteractive&quot;\" [value]=\"&quot;keyboardInteractive&quot;\"\u003E\n          \u003Clabel class=\"btn btn-secondary\" for=\"auth&quot;keyboardInteractive&quot;\"\u003E\u003Ci class=\"far fa-keyboard\"\u003E\u003C\u002Fi\u003E\n            \u003Cdiv class=\"m-0\" translate\u003EInteractive\u003C\u002Fdiv\u003E\n          \u003C\u002Flabel\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\" *ngIf=\"profile.options.user &amp;&amp; (!profile.options.auth || profile.options.auth === &quot;password&quot;)\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EPassword\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"description\" *ngIf=\"!hasSavedPassword\" translate\u003ESave a password in the keychain\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"description\" *ngIf=\"hasSavedPassword\" translate\u003EThere is a saved password for this connection\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cbutton class=\"btn btn-success ms-4\" *ngIf=\"!hasSavedPassword\" (click)=\"setPassword()\"\u003E\u003Ci class=\"fas fa-key\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ESet password\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n        \u003Cbutton class=\"btn btn-danger ms-4\" *ngIf=\"hasSavedPassword\" (click)=\"clearSavedPassword()\"\u003E\u003Ci class=\"fas fa-trash-alt\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EForget\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"mb-3\" *ngIf=\"!profile.options.auth || profile.options.auth === &quot;publicKey&quot;\"\u003E\n        \u003Clabel translate\u003EPrivate keys\u003C\u002Flabel\u003E\n        \u003Cdiv class=\"list-group mb-2\"\u003E\n          \u003Cdiv class=\"list-group-item d-flex align-items-center p-1 ps-3\" *ngFor=\"let path of profile.options.privateKeys\"\u003E\u003Ci class=\"fas fa-key\"\u003E\u003C\u002Fi\u003E\n            \u003Cdiv class=\"no-wrap me-auto\"\u003E{{path}}\u003C\u002Fdiv\u003E\n            \u003Cbutton class=\"btn btn-link\" (click)=\"removePrivateKey(path)\"\u003E\u003Ci class=\"fas fa-trash\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cbutton class=\"btn btn-secondary\" (click)=\"addPrivateKey()\"\u003E\u003Ci class=\"fas fa-folder-open\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EAdd a private key\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003EPorts\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Cssh-port-forwarding-config *ngIf=\"profile.options.forwardedPorts\" [model]=\"profile.options.forwardedPorts\" (forwardAdded)=\"onForwardAdded($event)\" (forwardRemoved)=\"onForwardRemoved($event)\"\u003E\u003C\u002Fssh-port-forwarding-config\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003EAdvanced\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Cdiv class=\"form-line\" ng:if=\"hostApp.platform !== Platform.Web\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EX11 forwarding\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.x11\"\u003E\u003C\u002Ftoggle\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\" ng:if=\"hostApp.platform !== Platform.Web\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EAgent forwarding\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.agentForward\"\u003E\u003C\u002Ftoggle\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003ESkip MoTD\u002Fbanner\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"description\" translate\u003EWill prevent the SSH greeting from showing up\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.skipBanner\"\u003E\u003C\u002Ftoggle\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EReuse session for multiple tabs\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"description\"\u003EMultiplex multiple shells through the same connection\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.reuseSession\"\u003E\u003C\u002Ftoggle\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EKeep Alive Interval (Milliseconds)\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cinput class=\"form-control\" type=\"number\" placeholder=\"0\" [(ngModel)]=\"profile.options.keepaliveInterval\"\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EMax Keep Alive Count\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cinput class=\"form-control\" type=\"number\" placeholder=\"3\" [(ngModel)]=\"profile.options.keepaliveCountMax\"\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EReady Timeout (Milliseconds)\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cinput class=\"form-control\" type=\"number\" placeholder=\"20000\" [(ngModel)]=\"profile.options.readyTimeout\"\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003ECiphers\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Cdiv class=\"form-line align-items-start\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003ECiphers\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"w-75\"\u003E\n          \u003Cdiv *ngFor=\"let alg of supportedAlgorithms.cipher\"\u003E\n            \u003Ccheckbox [text]=\"alg\" [(ngModel)]=\"algorithms.cipher[alg]\"\u003E\u003C\u002Fcheckbox\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line align-items-start\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EKey exchange\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"w-75\"\u003E\n          \u003Cdiv *ngFor=\"let alg of supportedAlgorithms.kex\"\u003E\n            \u003Ccheckbox [text]=\"alg\" [(ngModel)]=\"algorithms.kex[alg]\"\u003E\u003C\u002Fcheckbox\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line align-items-start\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\"\u003EHMAC\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"w-75\"\u003E\n          \u003Cdiv *ngFor=\"let alg of supportedAlgorithms.hmac\"\u003E\n            \u003Ccheckbox [text]=\"alg\" [(ngModel)]=\"algorithms.hmac[alg]\"\u003E\u003C\u002Fcheckbox\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line align-items-start\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EHost key\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"w-75\"\u003E\n          \u003Cdiv *ngFor=\"let alg of supportedAlgorithms.serverHostKey\"\u003E\n            \u003Ccheckbox [text]=\"alg\" [(ngModel)]=\"algorithms.serverHostKey[alg]\"\u003E\u003C\u002Fcheckbox\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line align-items-start\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\"\u003ECompression\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"w-75\"\u003E\n          \u003Cdiv *ngFor=\"let alg of supportedAlgorithms.compression\"\u003E\n            \u003Ccheckbox [text]=\"alg\" [(ngModel)]=\"algorithms.compression[alg]\"\u003E\u003C\u002Fcheckbox\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003EColors\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Ccolor-scheme-selector [(model)]=\"profile.terminalColorScheme\"\u003E\u003C\u002Fcolor-scheme-selector\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\" #loginScriptsSettings\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;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Ch3\u003ESSH\u003C\u002Fh3\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EWarn when closing active connections\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Ctoggle [(ngModel)]=\"config.store.ssh.warnOnClose\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EVerify host keys when connecting\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Ctoggle [(ngModel)]=\"config.store.ssh.verifyHostKeys\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\" *ngIf=\"hostApp.platform === Platform.Windows\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EWinSCP path\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"description\" translate\u003EWhen WinSCP is detected, you can launch an SCP session from the context menu.\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Auto-detect\" [(ngModel)]=\"config.store.ssh.winSCPPath\" (ngModelChange)=\"config.save()\"\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\" *ngIf=\"hostApp.platform === Platform.Windows\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EAgent type\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"description\" translate\u003EForces a specific SSH agent connection type.\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.ssh.agentType\" (ngModelChange)=\"config.save()\"\u003E\n    \u003Coption value=\"auto\" translate\u003EAutomatic\u003C\u002Foption\u003E\n    \u003Coption value=\"pageant\"\u003EPageant\u003C\u002Foption\u003E\n    \u003Coption value=\"pipe\"\u003ENamed pipe\u003C\u002Foption\u003E\n  \u003C\u002Fselect\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\" *ngIf=\"config.store.ssh.agentType === &quot;pipe&quot;\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EAgent pipe path\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"description\" translate\u003ESets the SSH agent's named pipe path.\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Default: \\\\.\\pipe\\openssh-ssh-agent\" [(ngModel)]=\"config.store.ssh.agentPath\" (ngModelChange)=\"config.save()\"\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EOverride X11 display\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"description\" translate\u003EPath or address of the local X11 socket\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cinput class=\"form-control\" type=\"text\" [placeholder]=\"defaultX11Display\" [(ngModel)]=\"config.store.ssh.x11Display\" (ngModelChange)=\"config.save()\"\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"alert alert-info\" translate\u003ESSH connection management is now done through the \"Profiles & connections\" tab\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

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\" style=\"user-select: text; cursor: text;\" onclick=\"event.stopPropagation()\"\u003E{{profile.options.user}}@{{profile.options.host}}:{{profile.options.port}}\u003C\u002Fstrong\u003E\n  \u003Cdiv class=\"me-2\" ngbDropdown container=\"body\" *ngIf=\"session &amp;&amp; !session.supportsWorkingDirectory()\" placement=\"bottom-right bottom-left bottom\"\u003E\n    \u003Cbutton class=\"btn btn-sm btn-link\" ngbDropdownToggle\u003E\u003Ci class=\"far fa-lightbulb text-primary\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\n    \u003Cdiv class=\"bg-dark\" ngbDropdownMenu\u003E\u003Ca class=\"d-flex align-items-center\" ngbDropdownItem (click)=\"platform.openExternal(&quot;https:\u002F\u002Ftabby.sh\u002Fgo\u002Fcwd-detection&quot;)\"\u003E\n        \u003Cdiv class=\"me-auto\"\u003E\u003Cstrong translate\u003EWorking directory detection\u003C\u002Fstrong\u003E\n          \u003Cdiv translate\u003ELearn how to allow Tabby to detect remote shell's working directory.\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\u003Ci class=\"fas fa-arrow-right ms-4\"\u003E\u003C\u002Fi\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\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  \u003Cbutton class=\"btn btn-sm btn-link me-2\" (click)=\"openSFTP()\" *ngIf=\"session &amp;&amp; session.open\"\u003E\u003Ci class=\"far fa-folder-open\"\u003E\u003C\u002Fi\u003E\u003Cspan\u003ESFTP\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-sm btn-link\" *ngIf=\"session &amp;&amp; session.open &amp;&amp; hostApp.platform !== Platform.Web\" (click)=\"showPortForwarding()\"\u003E\u003Ci class=\"fas fa-plug\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EPorts\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n\u003C\u002Fterminal-toolbar\u003E\n\u003Csftp-panel class=\"bg-dark\" @panelSlide [@.disabled]=\"!config.store.accessibility.animations\" [(path)]=\"sftpPath\" *ngIf=\"sftpPanelVisible &amp;&amp; sshSession\" (click)=\"$event.stopPropagation()\" [session]=\"sshSession!\" [cwdDetectionAvailable]=\"session?.supportsWorkingDirectory() ?? false\" (closed)=\"sftpPanelVisible = false\"\u003E\u003C\u002Fsftp-panel\u003E\n\u003Ckeyboard-interactive-auth-panel class=\"bg-dark\" *ngIf=\"activeKIPrompt\" [prompt]=\"activeKIPrompt\" [profile]=\"profile\" (click)=\"$event.stopPropagation()\" (done)=\"activeKIPrompt = null; frontend?.focus()\"\u003E\u003C\u002Fkeyboard-interactive-auth-panel\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 9757:
/*!********************************************!*\
  !*** ../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 */ 2089).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;
}


/***/ }),

/***/ 2024:
/*!*****************************************!*\
  !*** ../tabby-core/src/icons/times.svg ***!
  \*****************************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"times\" class=\"svg-inline--fa fa-times fa-w-10\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path fill=\"currentColor\" d=\"M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z\"></path></svg>"

/***/ }),

/***/ 9491:
/*!*************************!*\
  !*** external "assert" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = require("assert");

/***/ }),

/***/ 2057:
/*!****************************!*\
  !*** external "constants" ***!
  \****************************/
/***/ ((module) => {

"use strict";
module.exports = require("constants");

/***/ }),

/***/ 6113:
/*!*************************!*\
  !*** external "crypto" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = require("crypto");

/***/ }),

/***/ 2361:
/*!*************************!*\
  !*** external "events" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = require("events");

/***/ }),

/***/ 3837:
/*!***********************!*\
  !*** external "util" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = require("util");

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__5848__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__8900__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7161__;

/***/ }),

/***/ 6608:
/*!***************************************!*\
  !*** external "@luminati-io/socksv5" ***!
  \***************************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__6608__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7571__;

/***/ }),

/***/ 7154:
/*!******************************!*\
  !*** external "any-promise" ***!
  \******************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7154__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__2089__;

/***/ }),

/***/ 5860:
/*!*************************!*\
  !*** external "keytar" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__5860__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__1548__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7170__;

/***/ }),

/***/ 9044:
/*!*********************!*\
  !*** external "os" ***!
  \*********************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__9044__;

/***/ }),

/***/ 3056:
/*!***********************!*\
  !*** external "path" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3056__;

/***/ }),

/***/ 5487:
/*!************************!*\
  !*** external "russh" ***!
  \************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__5487__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3832__;

/***/ }),

/***/ 3978:
/*!*************************!*\
  !*** external "stream" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3978__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__315__;

/***/ }),

/***/ 6663:
/*!*********************************!*\
  !*** external "tabby-settings" ***!
  \*********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__6663__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__8316__;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// 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 + 37 modules ***!
  \***********************************/
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  AutoPrivateKeyLocator: () => (/* reexport */ AutoPrivateKeyLocator),
  PasswordStorageService: () => (/* reexport */ PasswordStorageService),
  PortForwardType: () => (/* reexport */ PortForwardType),
  SFTPContextMenuItemProvider: () => (/* reexport */ SFTPContextMenuItemProvider),
  SFTPPanelComponent: () => (/* reexport */ SFTPPanelComponent),
  SFTPSession: () => (/* reexport */ SFTPSession),
  SSHAlgorithmType: () => (/* reexport */ SSHAlgorithmType),
  SSHMultiplexerService: () => (/* reexport */ SSHMultiplexerService),
  SSHProfileImporter: () => (/* reexport */ SSHProfileImporter),
  SSHTabComponent: () => (/* reexport */ SSHTabComponent),
  "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__(8900);
// EXTERNAL MODULE: external "@angular/common"
var common_ = __webpack_require__(5848);
// EXTERNAL MODULE: external "@angular/forms"
var forms_ = __webpack_require__(7161);
// EXTERNAL MODULE: external "@ng-bootstrap/ng-bootstrap"
var ng_bootstrap_ = __webpack_require__(7571);
// EXTERNAL MODULE: external "ngx-toastr"
var external_ngx_toastr_ = __webpack_require__(7170);
// EXTERNAL MODULE: ../app/node_modules/filesize/lib/filesize.min.js
var filesize_min = __webpack_require__(1752);
;// 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-settings"
var external_tabby_settings_ = __webpack_require__(6663);
// EXTERNAL MODULE: external "tabby-terminal"
var external_tabby_terminal_ = __webpack_require__(8316);
var external_tabby_terminal_default = /*#__PURE__*/__webpack_require__.n(external_tabby_terminal_);
// EXTERNAL MODULE: ./src/components/sshProfileSettings.component.pug?ngResource
var sshProfileSettings_componentngResource = __webpack_require__(1295);
var sshProfileSettings_componentngResource_default = /*#__PURE__*/__webpack_require__.n(sshProfileSettings_componentngResource);
// EXTERNAL MODULE: ../node_modules/thenby/thenBy.module.js
var thenBy_module = __webpack_require__(8635);
// EXTERNAL MODULE: external "keytar"
var external_keytar_ = __webpack_require__(5860);
;// CONCATENATED MODULE: ./src/services/passwordStorage.service.ts




const VAULT_SECRET_TYPE_PASSWORD = 'ssh:password';
const VAULT_SECRET_TYPE_PASSPHRASE = 'ssh:key-passphrase';
let PasswordStorageService = class PasswordStorageService {
    constructor(vault) {
        this.vault = vault;
    }
    savePassword(profile, password) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.vault.isEnabled()) {
                const key = this.getVaultKeyForConnection(profile);
                this.vault.addSecret({ type: VAULT_SECRET_TYPE_PASSWORD, key, value: password });
            }
            else {
                const key = this.getKeytarKeyForConnection(profile);
                return external_keytar_.setPassword(key, profile.options.user, password);
            }
        });
    }
    deletePassword(profile) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.vault.isEnabled()) {
                const key = this.getVaultKeyForConnection(profile);
                this.vault.removeSecret(VAULT_SECRET_TYPE_PASSWORD, key);
            }
            else {
                const key = this.getKeytarKeyForConnection(profile);
                yield external_keytar_.deletePassword(key, profile.options.user);
            }
        });
    }
    loadPassword(profile) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            if (this.vault.isEnabled()) {
                const key = this.getVaultKeyForConnection(profile);
                return (_b = (_a = (yield this.vault.getSecret(VAULT_SECRET_TYPE_PASSWORD, key))) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null;
            }
            else {
                const key = this.getKeytarKeyForConnection(profile);
                return external_keytar_.getPassword(key, profile.options.user);
            }
        });
    }
    savePrivateKeyPassword(id, password) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.vault.isEnabled()) {
                const key = this.getVaultKeyForPrivateKey(id);
                this.vault.addSecret({ type: VAULT_SECRET_TYPE_PASSPHRASE, key, value: password });
            }
            else {
                const key = this.getKeytarKeyForPrivateKey(id);
                return external_keytar_.setPassword(key, 'user', password);
            }
        });
    }
    deletePrivateKeyPassword(id) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.vault.isEnabled()) {
                const key = this.getVaultKeyForPrivateKey(id);
                this.vault.removeSecret(VAULT_SECRET_TYPE_PASSPHRASE, key);
            }
            else {
                const key = this.getKeytarKeyForPrivateKey(id);
                yield external_keytar_.deletePassword(key, 'user');
            }
        });
    }
    loadPrivateKeyPassword(id) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            if (this.vault.isEnabled()) {
                const key = this.getVaultKeyForPrivateKey(id);
                return (_b = (_a = (yield this.vault.getSecret(VAULT_SECRET_TYPE_PASSPHRASE, key))) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null;
            }
            else {
                const key = this.getKeytarKeyForPrivateKey(id);
                return external_keytar_.getPassword(key, 'user');
            }
        });
    }
    getKeytarKeyForConnection(profile) {
        let key = `ssh@${profile.options.host}`;
        if (profile.options.port) {
            key = `ssh@${profile.options.host}:${profile.options.port}`;
        }
        return key;
    }
    getKeytarKeyForPrivateKey(id) {
        return `ssh-private-key:${id}`;
    }
    getVaultKeyForConnection(profile) {
        return {
            user: profile.options.user,
            host: profile.options.host,
            port: profile.options.port,
        };
    }
    getVaultKeyForPrivateKey(id) {
        return { hash: id };
    }
};
PasswordStorageService.ctorParameters = () => [
    { type: external_tabby_core_.VaultService }
];
PasswordStorageService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [external_tabby_core_.VaultService])
], PasswordStorageService);


;// CONCATENATED MODULE: ./src/api/contextMenu.ts
/**
 * Extend to add items to the SFTPPanel context menu
 */
class SFTPContextMenuItemProvider {
    constructor() {
        this.weight = 0;
    }
}

;// CONCATENATED MODULE: ./src/api/interfaces.ts
var SSHAlgorithmType;
(function (SSHAlgorithmType) {
    SSHAlgorithmType["HMAC"] = "hmac";
    SSHAlgorithmType["KEX"] = "kex";
    SSHAlgorithmType["CIPHER"] = "cipher";
    SSHAlgorithmType["HOSTKEY"] = "serverHostKey";
    SSHAlgorithmType["COMPRESSION"] = "compression";
})(SSHAlgorithmType || (SSHAlgorithmType = {}));
var PortForwardType;
(function (PortForwardType) {
    PortForwardType["Local"] = "Local";
    PortForwardType["Remote"] = "Remote";
    PortForwardType["Dynamic"] = "Dynamic";
})(PortForwardType || (PortForwardType = {}));

;// CONCATENATED MODULE: ./src/api/importer.ts
class SSHProfileImporter {
}
class AutoPrivateKeyLocator {
}

;// CONCATENATED MODULE: ./src/services/sshMultiplexer.service.ts



let SSHMultiplexerService = class SSHMultiplexerService {
    constructor(profilesService) {
        this.profilesService = profilesService;
        this.sessions = new Map();
    }
    addSession(session) {
        return __awaiter(this, void 0, void 0, function* () {
            const key = yield this.getMultiplexerKey(session.profile);
            this.sessions.set(key, session);
            session.willDestroy$.subscribe(() => {
                if (this.sessions.get(key) === session) {
                    this.sessions.delete(key);
                }
            });
        });
    }
    getSession(profile) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const fullProfile = this.profilesService.getConfigProxyForProfile(profile);
            const key = yield this.getMultiplexerKey(fullProfile);
            return (_a = this.sessions.get(key)) !== null && _a !== void 0 ? _a : null;
        });
    }
    getMultiplexerKey(profile) {
        return __awaiter(this, void 0, void 0, function* () {
            let key = `${profile.options.host}:${profile.options.port}:${profile.options.user}:${profile.options.proxyCommand}:${profile.options.socksProxyHost}:${profile.options.socksProxyPort}`;
            if (profile.options.jumpHost) {
                const jumpConnection = (yield this.profilesService.getProfiles()).find(x => x.id === profile.options.jumpHost);
                if (!jumpConnection) {
                    return key;
                }
                const jumpProfile = this.profilesService.getConfigProxyForProfile(jumpConnection);
                key += '$' + (yield this.getMultiplexerKey(jumpProfile));
            }
            return key;
        });
    }
};
SSHMultiplexerService.ctorParameters = () => [
    { type: external_tabby_core_.ProfilesService }
];
SSHMultiplexerService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [external_tabby_core_.ProfilesService])
], SSHMultiplexerService);


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





// EXTERNAL MODULE: external "russh"
var external_russh_ = __webpack_require__(5487);
;// CONCATENATED MODULE: ./src/algorithms.ts


const supportedAlgorithms = {
    [SSHAlgorithmType.KEX]: external_russh_.getSupportedKexAlgorithms().filter(x => x !== 'none'),
    [SSHAlgorithmType.HOSTKEY]: external_russh_.getSupportedKeyTypes().filter(x => x !== 'none'),
    [SSHAlgorithmType.CIPHER]: external_russh_.getSupportedCiphers().filter(x => x !== 'clear'),
    [SSHAlgorithmType.HMAC]: external_russh_.getSupportedMACs().filter(x => x !== 'none'),
    [SSHAlgorithmType.COMPRESSION]: external_russh_.getSupportedCompressionAlgorithms().reverse(),
};
const defaultAlgorithms = {
    [SSHAlgorithmType.KEX]: [
        'curve25519-sha256',
        'curve25519-sha256@libssh.org',
        'diffie-hellman-group16-sha512',
        'diffie-hellman-group14-sha256',
        'ext-info-c',
        'ext-info-s',
        'kex-strict-c-v00@openssh.com',
        'kex-strict-s-v00@openssh.com',
    ],
    [SSHAlgorithmType.HOSTKEY]: [
        'ssh-ed25519',
        'ecdsa-sha2-nistp256',
        'ecdsa-sha2-nistp521',
        'rsa-sha2-256',
        'rsa-sha2-512',
        'ssh-rsa',
    ],
    [SSHAlgorithmType.CIPHER]: [
        'chacha20-poly1305@openssh.com',
        'aes256-gcm@openssh.com',
        'aes256-ctr',
        'aes192-ctr',
        'aes128-ctr',
    ],
    [SSHAlgorithmType.HMAC]: [
        'hmac-sha2-512-etm@openssh.com',
        'hmac-sha2-256-etm@openssh.com',
        'hmac-sha2-512',
        'hmac-sha2-256',
        'hmac-sha1-etm@openssh.com',
        'hmac-sha1',
    ],
    [SSHAlgorithmType.COMPRESSION]: [
        'zlib@openssh.com',
        'zlib',
        'none',
    ],
};

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


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







/** @hidden */
let SSHProfileSettingsComponent = class SSHProfileSettingsComponent {
    constructor(hostApp, profilesService, passwordStorage, ngbModal, fileProviders) {
        this.hostApp = hostApp;
        this.profilesService = profilesService;
        this.passwordStorage = passwordStorage;
        this.ngbModal = ngbModal;
        this.fileProviders = fileProviders;
        this.Platform = external_tabby_core_.Platform;
        this.connectionMode = 'direct';
        this.supportedAlgorithms = supportedAlgorithms;
        this.algorithms = {};
    }
    ngOnInit() {
        var _a, _b, _c, _d;
        var _e;
        return __awaiter(this, void 0, void 0, function* () {
            this.jumpHosts = (yield this.profilesService.getProfiles({ includeBuiltin: false })).filter(x => x.type === 'ssh' && x !== this.profile);
            this.jumpHosts.sort((0,thenBy_module.firstBy)(x => this.getJumpHostLabel(x)));
            for (const k of Object.values(SSHAlgorithmType)) {
                this.algorithms[k] = {};
                for (const alg of (_b = (_a = this.profile.options.algorithms) === null || _a === void 0 ? void 0 : _a[k]) !== null && _b !== void 0 ? _b : []) {
                    this.algorithms[k][alg] = true;
                }
            }
            this.profile.options.auth = (_c = this.profile.options.auth) !== null && _c !== void 0 ? _c : null;
            (_d = (_e = this.profile.options).privateKeys) !== null && _d !== void 0 ? _d : (_e.privateKeys = []);
            if (this.profile.options.proxyCommand) {
                this.connectionMode = 'proxyCommand';
            }
            else if (this.profile.options.jumpHost) {
                this.connectionMode = 'jumpHost';
            }
            else if (this.profile.options.socksProxyHost) {
                this.connectionMode = 'socksProxy';
            }
            else if (this.profile.options.httpProxyHost) {
                this.connectionMode = 'httpProxy';
            }
            if (this.profile.options.user) {
                try {
                    this.hasSavedPassword = !!(yield this.passwordStorage.loadPassword(this.profile));
                }
                catch (e) {
                    console.error('Could not check for saved password', e);
                }
            }
        });
    }
    getJumpHostLabel(p) {
        return p.group ? `${this.profilesService.resolveProfileGroupName(p.group)} / ${p.name}` : p.name;
    }
    setPassword() {
        return __awaiter(this, void 0, void 0, function* () {
            const modal = this.ngbModal.open(external_tabby_core_.PromptModalComponent);
            modal.componentInstance.prompt = `Password for ${this.profile.options.user}@${this.profile.options.host}`;
            modal.componentInstance.password = true;
            try {
                const result = yield modal.result.catch(() => null);
                if (result === null || result === void 0 ? void 0 : result.value) {
                    this.passwordStorage.savePassword(this.profile, result.value);
                    this.hasSavedPassword = true;
                }
            }
            catch (_a) { }
        });
    }
    clearSavedPassword() {
        this.hasSavedPassword = false;
        this.passwordStorage.deletePassword(this.profile);
    }
    addPrivateKey() {
        return __awaiter(this, void 0, void 0, function* () {
            const ref = yield this.fileProviders.selectAndStoreFile(`private key for ${this.profile.name}`).catch(() => null);
            if (ref) {
                this.profile.options.privateKeys = [
                    ...this.profile.options.privateKeys,
                    ref,
                ];
            }
        });
    }
    removePrivateKey(path) {
        var _a;
        this.profile.options.privateKeys = (_a = this.profile.options.privateKeys) === null || _a === void 0 ? void 0 : _a.filter(x => x !== path);
    }
    save() {
        var _a;
        for (const k of Object.values(SSHAlgorithmType)) {
            this.profile.options.algorithms[k] = Object.entries(this.algorithms[k])
                .filter(([_, v]) => !!v)
                .map(([key, _]) => key);
            if (k !== SSHAlgorithmType.COMPRESSION) {
                this.profile.options.algorithms[k].sort();
            }
        }
        if (this.connectionMode !== 'jumpHost') {
            this.profile.options.jumpHost = undefined;
        }
        if (this.connectionMode !== 'proxyCommand') {
            this.profile.options.proxyCommand = undefined;
        }
        if (this.connectionMode !== 'socksProxy') {
            this.profile.options.socksProxyHost = undefined;
            this.profile.options.socksProxyPort = undefined;
        }
        if (this.connectionMode !== 'httpProxy') {
            this.profile.options.httpProxyHost = undefined;
            this.profile.options.httpProxyPort = undefined;
        }
        (_a = this.loginScriptsSettings) === null || _a === void 0 ? void 0 : _a.save();
    }
    onForwardAdded(fw) {
        var _a;
        this.profile.options.forwardedPorts = (_a = this.profile.options.forwardedPorts) !== null && _a !== void 0 ? _a : [];
        this.profile.options.forwardedPorts.push(fw);
    }
    onForwardRemoved(fw) {
        var _a;
        this.profile.options.forwardedPorts = (_a = this.profile.options.forwardedPorts) === null || _a === void 0 ? void 0 : _a.filter(x => x !== fw);
    }
    getConnectionDropdownTitle() {
        return {
            direct: 'Direct',
            proxyCommand: 'Proxy command',
            jumpHost: 'Jump host',
            socksProxy: 'SOCKS proxy',
            httpProxy: 'HTTP proxy',
        }[this.connectionMode];
    }
};
SSHProfileSettingsComponent.ctorParameters = () => [
    { type: external_tabby_core_.HostAppService },
    { type: external_tabby_core_.ProfilesService },
    { type: PasswordStorageService },
    { type: ng_bootstrap_.NgbModal },
    { type: external_tabby_core_.FileProvidersService }
];
SSHProfileSettingsComponent.propDecorators = {
    loginScriptsSettings: [{ type: core_.ViewChild, args: ['loginScriptsSettings',] }]
};
SSHProfileSettingsComponent = __decorate([
    (0,core_.Component)({
        template: (sshProfileSettings_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.HostAppService,
        external_tabby_core_.ProfilesService,
        PasswordStorageService,
        ng_bootstrap_.NgbModal,
        external_tabby_core_.FileProvidersService])
], SSHProfileSettingsComponent);


// EXTERNAL MODULE: ./src/components/sshPortForwardingModal.component.pug?ngResource
var sshPortForwardingModal_componentngResource = __webpack_require__(1355);
var sshPortForwardingModal_componentngResource_default = /*#__PURE__*/__webpack_require__.n(sshPortForwardingModal_componentngResource);
// EXTERNAL MODULE: external "@luminati-io/socksv5"
var socksv5_ = __webpack_require__(6608);
var socksv5_default = /*#__PURE__*/__webpack_require__.n(socksv5_);
// EXTERNAL MODULE: external "net"
var external_net_ = __webpack_require__(1548);
;// CONCATENATED MODULE: ./src/session/forwards.ts




class ForwardedPort {
    constructor() {
        this.host = '127.0.0.1';
        this.listener = null;
    }
    startLocalListener(callback) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.type === PortForwardType.Local) {
                const listener = this.listener = (0,external_net_.createServer)(s => {
                    var _a, _b;
                    return callback(() => s, () => s.destroy(), (_a = s.remoteAddress) !== null && _a !== void 0 ? _a : null, (_b = s.remotePort) !== null && _b !== void 0 ? _b : null, this.targetAddress, this.targetPort);
                });
                return new Promise((resolve, reject) => {
                    listener.listen(this.port, this.host);
                    listener.on('error', reject);
                    listener.on('listening', resolve);
                });
            }
            else if (this.type === PortForwardType.Dynamic) {
                return new Promise((resolve, reject) => {
                    this.listener = socksv5_default().createServer((info, acceptConnection, rejectConnection) => {
                        callback(() => acceptConnection(true), () => rejectConnection(), null, null, info.dstAddr, info.dstPort);
                    });
                    this.listener.on('error', reject);
                    this.listener.listen(this.port, this.host, resolve);
                    this.listener['useAuth'](socksv5_default().auth.None());
                });
            }
            else {
                throw new Error('Invalid forward type for a local listener');
            }
        });
    }
    stopLocalListener() {
        var _a;
        (_a = this.listener) === null || _a === void 0 ? void 0 : _a.close();
    }
    toString() {
        if (this.type === PortForwardType.Local) {
            return `(local) ${this.host}:${this.port} → (remote) ${this.targetAddress}:${this.targetPort}`;
        }
        if (this.type === PortForwardType.Remote) {
            return `(remote) ${this.host}:${this.port} → (local) ${this.targetAddress}:${this.targetPort}`;
        }
        else {
            return `(dynamic) ${this.host}:${this.port}`;
        }
    }
}

// EXTERNAL MODULE: ../app/node_modules/mz/fs.js
var fs = __webpack_require__(7461);
// EXTERNAL MODULE: external "crypto"
var external_crypto_ = __webpack_require__(6113);
// EXTERNAL MODULE: ./node_modules/ansi-colors/index.js
var ansi_colors = __webpack_require__(4596);
var ansi_colors_default = /*#__PURE__*/__webpack_require__.n(ansi_colors);
;// CONCATENATED MODULE: ./node_modules/ansi-regex/index.js
function ansiRegex({
  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');
}
;// CONCATENATED MODULE: ./node_modules/strip-ansi/index.js

const regex = ansiRegex();
function stripAnsi(string) {
  if (typeof string !== 'string') {
    throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
  }

  // Even though the regex is global, we don't need to reset the `.lastIndex`
  // because unlike `.exec()` and `.test()`, `.replace()` does it automatically
  // and doing it manually has a performance penalty.
  return string.replace(regex, '');
}
// EXTERNAL MODULE: ../node_modules/shell-quote/index.js
var shell_quote = __webpack_require__(6830);
// EXTERNAL MODULE: external "rxjs"
var external_rxjs_ = __webpack_require__(3832);
// EXTERNAL MODULE: ./src/components/hostKeyPromptModal.component.pug?ngResource
var hostKeyPromptModal_componentngResource = __webpack_require__(5098);
var hostKeyPromptModal_componentngResource_default = /*#__PURE__*/__webpack_require__.n(hostKeyPromptModal_componentngResource);
;// CONCATENATED MODULE: ./src/services/sshKnownHosts.service.ts



let SSHKnownHostsService = class SSHKnownHostsService {
    constructor(config) {
        this.config = config;
    }
    getFor(selector) {
        var _a;
        return (_a = this.config.store.ssh.knownHosts.find(x => x.host === selector.host && x.port === selector.port && x.type === selector.type)) !== null && _a !== void 0 ? _a : null;
    }
    store(selector, digest) {
        return __awaiter(this, void 0, void 0, function* () {
            const existing = this.getFor(selector);
            if (existing) {
                existing.digest = digest;
            }
            else {
                this.config.store.ssh.knownHosts.push(Object.assign(Object.assign({}, selector), { digest }));
            }
            this.config.save();
        });
    }
};
SSHKnownHostsService.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService }
];
SSHKnownHostsService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService])
], SSHKnownHostsService);


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


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



/** @hidden */
let HostKeyPromptModalComponent = class HostKeyPromptModalComponent {
    constructor(knownHosts, modalInstance) {
        this.knownHosts = knownHosts;
        this.modalInstance = modalInstance;
        this.isMismatched = false;
        this.isUnknown = false;
    }
    ngOnInit() {
        this.knownHost = this.knownHosts.getFor(this.selector);
        if (!this.knownHost) {
            this.isUnknown = true;
        }
        else if (this.knownHost.digest !== this.digest) {
            this.isMismatched = true;
        }
    }
    accept() {
        this.modalInstance.close(true);
    }
    acceptAndSave() {
        return __awaiter(this, void 0, void 0, function* () {
            yield this.knownHosts.store(this.selector, this.digest);
            this.accept();
        });
    }
    cancel() {
        this.modalInstance.close(false);
    }
};
HostKeyPromptModalComponent.ctorParameters = () => [
    { type: SSHKnownHostsService },
    { type: ng_bootstrap_.NgbActiveModal }
];
HostKeyPromptModalComponent.propDecorators = {
    selector: [{ type: core_.Input }],
    digest: [{ type: core_.Input }]
};
HostKeyPromptModalComponent = __decorate([
    (0,core_.Component)({
        template: (hostKeyPromptModal_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [SSHKnownHostsService,
        ng_bootstrap_.NgbActiveModal])
], HostKeyPromptModalComponent);


// EXTERNAL MODULE: external "path"
var external_path_ = __webpack_require__(3056);
;// CONCATENATED MODULE: ./src/session/sftp.ts

/* eslint-disable @typescript-eslint/no-unused-vars */




class SFTPFileHandle {
    constructor(inner) {
        this.inner = inner;
        this.position = 0;
    }
    read() {
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.inner) {
                return Promise.resolve(new Uint8Array(0));
            }
            return this.inner.read(256 * 1024);
        });
    }
    write(chunk) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.inner) {
                throw new Error('File handle is closed');
            }
            yield this.inner.writeAll(chunk);
        });
    }
    close() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            yield ((_a = this.inner) === null || _a === void 0 ? void 0 : _a.shutdown());
            this.inner = null;
        });
    }
}
class SFTPSession {
    get closed$() { return this.closed; }
    constructor(sftp, injector) {
        this.sftp = sftp;
        this.closed = new external_rxjs_.Subject();
        this.logger = injector.get(external_tabby_core_.LogService).create('sftp');
        sftp.closed$.subscribe(() => {
            this.closed.next();
            this.closed.complete();
        });
    }
    readdir(p) {
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.debug('readdir', p);
            const entries = yield this.sftp.readDirectory(p);
            return entries.map(entry => this._makeFile(external_path_.posix.join(p, entry.name), entry));
        });
    }
    readlink(p) {
        this.logger.debug('readlink', p);
        return this.sftp.readlink(p);
    }
    stat(p) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.debug('stat', p);
            const stats = yield this.sftp.stat(p);
            return {
                name: external_path_.posix.basename(p),
                fullPath: p,
                isDirectory: stats.type === 0 /* russh.SFTPFileType.Directory */,
                isSymlink: stats.type === 2 /* russh.SFTPFileType.Symlink */,
                mode: (_a = stats.permissions) !== null && _a !== void 0 ? _a : 0,
                size: stats.size,
                modified: new Date(((_b = stats.mtime) !== null && _b !== void 0 ? _b : 0) * 1000),
            };
        });
    }
    open(p, mode) {
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.debug('open', p, mode);
            const handle = yield this.sftp.open(p, mode);
            return new SFTPFileHandle(handle);
        });
    }
    rmdir(p) {
        return __awaiter(this, void 0, void 0, function* () {
            yield this.sftp.removeDirectory(p);
        });
    }
    mkdir(p) {
        return __awaiter(this, void 0, void 0, function* () {
            yield this.sftp.createDirectory(p);
        });
    }
    rename(oldPath, newPath) {
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.debug('rename', oldPath, newPath);
            yield this.sftp.rename(oldPath, newPath);
        });
    }
    unlink(p) {
        return __awaiter(this, void 0, void 0, function* () {
            yield this.sftp.removeFile(p);
        });
    }
    chmod(p, mode) {
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.debug('chmod', p, mode);
            yield this.sftp.chmod(p, mode);
        });
    }
    upload(path, transfer) {
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.info('Uploading into', path);
            const tempPath = path + '.tabby-upload';
            try {
                const handle = yield this.open(tempPath, external_russh_.OPEN_WRITE | external_russh_.OPEN_CREATE);
                while (true) {
                    const chunk = yield transfer.read();
                    if (!chunk.length) {
                        break;
                    }
                    yield handle.write(chunk);
                }
                yield handle.close();
                yield this.unlink(path).catch(() => null);
                yield this.rename(tempPath, path);
                transfer.close();
            }
            catch (e) {
                transfer.cancel();
                this.unlink(tempPath).catch(() => null);
                throw e;
            }
        });
    }
    download(path, transfer) {
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.info('Downloading', path);
            try {
                const handle = yield this.open(path, external_russh_.OPEN_READ);
                while (true) {
                    const chunk = yield handle.read();
                    if (!chunk.length) {
                        break;
                    }
                    yield transfer.write(chunk);
                }
                transfer.close();
                handle.close();
            }
            catch (e) {
                transfer.cancel();
                throw e;
            }
        });
    }
    _makeFile(p, entry) {
        var _a, _b;
        return {
            fullPath: p,
            name: external_path_.posix.basename(p),
            isDirectory: entry.metadata.type === 0 /* russh.SFTPFileType.Directory */,
            isSymlink: entry.metadata.type === 2 /* russh.SFTPFileType.Symlink */,
            mode: (_a = entry.metadata.permissions) !== null && _a !== void 0 ? _a : 0,
            size: entry.metadata.size,
            modified: new Date(((_b = entry.metadata.mtime) !== null && _b !== void 0 ? _b : 0) * 1000),
        };
    }
}

;// CONCATENATED MODULE: ./src/session/x11.ts


class X11Socket {
    constructor() {
        this.error$ = new external_rxjs_.Subject();
        this.socket = null;
    }
    static resolveDisplaySpec(spec) {
        var _a, _b;
        // eslint-disable-next-line prefer-const, @typescript-eslint/no-unused-vars
        let [_, xHost, xDisplay] = (_b = /^(.+):(\d+)(?:.(\d+))$/.exec((_a = spec !== null && spec !== void 0 ? spec : process.env.DISPLAY) !== null && _a !== void 0 ? _a : 'localhost:0')) !== null && _b !== void 0 ? _b : [undefined, undefined, undefined];
        if (process.platform === 'win32') {
            xHost !== null && xHost !== void 0 ? xHost : (xHost = 'localhost');
        }
        else {
            xHost !== null && xHost !== void 0 ? xHost : (xHost = 'unix');
        }
        if (spec === null || spec === void 0 ? void 0 : spec.startsWith('/')) {
            xHost = spec;
        }
        const display = parseInt(xDisplay !== null && xDisplay !== void 0 ? xDisplay : '0');
        const port = display < 100 ? display + 6000 : display;
        if (xHost === 'unix') {
            xHost = `/tmp/.X11-unix/X${display}`;
        }
        if (xHost.startsWith('/')) {
            return {
                path: xHost,
            };
        }
        else {
            return {
                host: xHost,
                port: port,
            };
        }
    }
    connect(spec) {
        this.socket = new external_net_.Socket();
        return new Promise((resolve, reject) => {
            this.socket.on('connect', () => {
                resolve(this.socket);
            });
            this.socket.on('error', e => {
                this.error$.next(e);
                reject(e);
            });
            this.socket.connect(X11Socket.resolveDisplaySpec(spec));
        });
    }
    destroy() {
        var _a;
        (_a = this.socket) === null || _a === void 0 ? void 0 : _a.destroy();
    }
}

;// CONCATENATED MODULE: ./src/session/ssh.ts



















const WINDOWS_OPENSSH_AGENT_PIPE = '\\\\.\\pipe\\openssh-ssh-agent';
function sshAuthTypeForMethod(m) {
    switch (m.type) {
        case 'none': return 'none';
        case 'hostbased': return 'hostbased';
        case 'prompt-password': return 'password';
        case 'saved-password': return 'password';
        case 'keyboard-interactive': return 'keyboard-interactive';
        case 'publickey': return 'publickey';
        case 'agent': return 'publickey';
    }
}
class KeyboardInteractivePrompt {
    constructor(name, instruction, prompts) {
        this.name = name;
        this.instruction = instruction;
        this.prompts = prompts;
        this.responses = [];
        this.promise = new Promise((resolve, reject) => {
            this._resolve = resolve;
            this._reject = reject;
        });
        this.responses = new Array(this.prompts.length).fill('');
    }
    isAPasswordPrompt(index) {
        return this.prompts[index].prompt.toLowerCase().includes('password') && !this.prompts[index].echo;
    }
    respond() {
        this._resolve(this.responses);
    }
    reject() {
        this._reject(new Error('Keyboard-interactive auth rejected'));
    }
}
class SSHSession {
    get serviceMessage$() { return this.serviceMessage; }
    get keyboardInteractivePrompt$() { return this.keyboardInteractivePrompt; }
    get willDestroy$() { return this.willDestroy; }
    constructor(injector, profile) {
        this.injector = injector;
        this.profile = profile;
        this.forwardedPorts = [];
        this.jumpChannel = null;
        this.activePrivateKey = null;
        this.authUsername = null;
        this.open = false;
        this.refCount = 0;
        this.allAuthMethods = [];
        this.serviceMessage = new external_rxjs_.Subject();
        this.keyboardInteractivePrompt = new external_rxjs_.Subject();
        this.willDestroy = new external_rxjs_.Subject();
        this.previouslyDisconnected = false;
        this.logger = injector.get(external_tabby_core_.LogService).create(`ssh-${profile.options.host}-${profile.options.port}`);
        this.passwordStorage = injector.get(PasswordStorageService);
        this.ngbModal = injector.get(ng_bootstrap_.NgbModal);
        this.hostApp = injector.get(external_tabby_core_.HostAppService);
        this.notifications = injector.get(external_tabby_core_.NotificationsService);
        this.fileProviders = injector.get(external_tabby_core_.FileProvidersService);
        this.config = injector.get(external_tabby_core_.ConfigService);
        this.translate = injector.get(external_tabby_core_.TranslateService);
        this.knownHosts = injector.get(SSHKnownHostsService);
        this.privateKeyImporters = injector.get(AutoPrivateKeyLocator, []);
        this.willDestroy$.subscribe(() => {
            for (const port of this.forwardedPorts) {
                port.stopLocalListener();
            }
        });
    }
    addPublicKeyAuthMethod(name, contents) {
        this.allAuthMethods.push({
            type: 'publickey',
            name,
            contents,
        });
    }
    init() {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            this.allAuthMethods = [{ type: 'none' }];
            if (!this.profile.options.auth || this.profile.options.auth === 'publicKey') {
                if ((_a = this.profile.options.privateKeys) === null || _a === void 0 ? void 0 : _a.length) {
                    for (let pk of this.profile.options.privateKeys) {
                        // eslint-disable-next-line @typescript-eslint/init-declarations
                        let contents;
                        pk = pk.replace('%h', this.profile.options.host);
                        pk = pk.replace('%r', this.profile.options.user);
                        try {
                            contents = yield this.fileProviders.retrieveFile(pk);
                        }
                        catch (error) {
                            this.emitServiceMessage(ansi_colors_default().bgYellow.yellow.black(' ! ') + ` Could not load private key ${pk}: ${error}`);
                            continue;
                        }
                        this.addPublicKeyAuthMethod(pk, contents);
                    }
                }
                else {
                    for (const importer of this.privateKeyImporters) {
                        for (const [name, contents] of yield importer.getKeys()) {
                            this.addPublicKeyAuthMethod(name, contents);
                        }
                    }
                }
            }
            if (!this.profile.options.auth || this.profile.options.auth === 'agent') {
                const spec = yield this.getAgentConnectionSpec();
                if (!spec) {
                    this.emitServiceMessage(ansi_colors_default().bgYellow.yellow.black(' ! ') + ` Agent auth selected, but no running Agent process is found`);
                }
                else {
                    this.allAuthMethods.push(Object.assign({ type: 'agent' }, spec));
                }
            }
            if (!this.profile.options.auth || this.profile.options.auth === 'password') {
                if (this.profile.options.password) {
                    this.allAuthMethods.push({ type: 'saved-password', password: this.profile.options.password });
                }
                const password = yield this.passwordStorage.loadPassword(this.profile);
                if (password) {
                    this.allAuthMethods.push({ type: 'saved-password', password });
                }
            }
            if (!this.profile.options.auth || this.profile.options.auth === 'keyboardInteractive') {
                const savedPassword = (_b = this.profile.options.password) !== null && _b !== void 0 ? _b : yield this.passwordStorage.loadPassword(this.profile);
                if (savedPassword) {
                    this.allAuthMethods.push({ type: 'keyboard-interactive', savedPassword });
                }
                this.allAuthMethods.push({ type: 'keyboard-interactive' });
            }
            if (!this.profile.options.auth || this.profile.options.auth === 'password') {
                this.allAuthMethods.push({ type: 'prompt-password' });
            }
            this.allAuthMethods.push({ type: 'hostbased' });
        });
    }
    getAgentConnectionSpec() {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.hostApp.platform === external_tabby_core_.Platform.Windows) {
                if (this.config.store.ssh.agentType === 'auto') {
                    if (yield fs.exists(WINDOWS_OPENSSH_AGENT_PIPE)) {
                        return {
                            kind: 'named-pipe',
                            path: WINDOWS_OPENSSH_AGENT_PIPE,
                        };
                    }
                    else if (external_russh_.isPageantRunning()) {
                        return {
                            kind: 'pageant',
                        };
                    }
                    else {
                        this.emitServiceMessage(ansi_colors_default().bgYellow.yellow.black(' ! ') + ` Agent auth selected, but no running Agent process is found`);
                    }
                }
                else if (this.config.store.ssh.agentType === 'pageant') {
                    return {
                        kind: 'pageant',
                    };
                }
                else {
                    return {
                        kind: 'named-pipe',
                        path: this.config.store.ssh.agentPath || WINDOWS_OPENSSH_AGENT_PIPE,
                    };
                }
            }
            else {
                return {
                    kind: 'unix-socket',
                    path: process.env.SSH_AUTH_SOCK,
                };
            }
            return null;
        });
    }
    openSFTP() {
        return __awaiter(this, void 0, void 0, function* () {
            if (!(this.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                throw new Error('Cannot open SFTP session before auth');
            }
            if (!this.sftp) {
                this.sftp = yield this.ssh.activateSFTP(yield this.ssh.openSessionChannel());
            }
            return new SFTPSession(this.sftp, this.injector);
        });
    }
    start() {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
        return __awaiter(this, void 0, void 0, function* () {
            yield this.init();
            const algorithms = {};
            for (const key of Object.values(SSHAlgorithmType)) {
                algorithms[key] = this.profile.options.algorithms[key].filter(x => supportedAlgorithms[key].includes(x));
            }
            // eslint-disable-next-line @typescript-eslint/init-declarations
            let transport;
            if (this.profile.options.proxyCommand) {
                this.emitServiceMessage(ansi_colors_default().bgBlue.black(' Proxy command ') + ` Using ${this.profile.options.proxyCommand}`);
                const argv = shell_quote/* parse */.Q(this.profile.options.proxyCommand);
                transport = yield external_russh_.SshTransport.newCommand(argv[0], argv.slice(1));
            }
            else if (this.jumpChannel) {
                transport = yield external_russh_.SshTransport.newSshChannel(this.jumpChannel.take());
                this.jumpChannel = null;
            }
            else if (this.profile.options.socksProxyHost) {
                this.emitServiceMessage(ansi_colors_default().bgBlue.black(' Proxy ') + ` Using ${this.profile.options.socksProxyHost}:${this.profile.options.socksProxyPort}`);
                transport = yield external_russh_.SshTransport.newSocksProxy(this.profile.options.socksProxyHost, (_a = this.profile.options.socksProxyPort) !== null && _a !== void 0 ? _a : 1080, this.profile.options.host, (_b = this.profile.options.port) !== null && _b !== void 0 ? _b : 22);
            }
            else if (this.profile.options.httpProxyHost) {
                this.emitServiceMessage(ansi_colors_default().bgBlue.black(' Proxy ') + ` Using ${this.profile.options.httpProxyHost}:${this.profile.options.httpProxyPort}`);
                transport = yield external_russh_.SshTransport.newHttpProxy(this.profile.options.httpProxyHost, (_c = this.profile.options.httpProxyPort) !== null && _c !== void 0 ? _c : 8080, this.profile.options.host, (_d = this.profile.options.port) !== null && _d !== void 0 ? _d : 22);
            }
            else {
                transport = yield external_russh_.SshTransport.newSocket(`${this.profile.options.host.trim()}:${(_e = this.profile.options.port) !== null && _e !== void 0 ? _e : 22}`);
            }
            this.ssh = yield external_russh_.SSHClient.connect(transport, (key) => __awaiter(this, void 0, void 0, function* () {
                if (!(yield this.verifyHostKey(key))) {
                    return false;
                }
                this.logger.info('Host key verified');
                return true;
            }), {
                preferred: {
                    ciphers: (_g = (_f = this.profile.options.algorithms) === null || _f === void 0 ? void 0 : _f[SSHAlgorithmType.CIPHER]) === null || _g === void 0 ? void 0 : _g.filter(x => supportedAlgorithms[SSHAlgorithmType.CIPHER].includes(x)),
                    kex: (_j = (_h = this.profile.options.algorithms) === null || _h === void 0 ? void 0 : _h[SSHAlgorithmType.KEX]) === null || _j === void 0 ? void 0 : _j.filter(x => supportedAlgorithms[SSHAlgorithmType.KEX].includes(x)),
                    mac: (_l = (_k = this.profile.options.algorithms) === null || _k === void 0 ? void 0 : _k[SSHAlgorithmType.HMAC]) === null || _l === void 0 ? void 0 : _l.filter(x => supportedAlgorithms[SSHAlgorithmType.HMAC].includes(x)),
                    key: (_o = (_m = this.profile.options.algorithms) === null || _m === void 0 ? void 0 : _m[SSHAlgorithmType.HOSTKEY]) === null || _o === void 0 ? void 0 : _o.filter(x => supportedAlgorithms[SSHAlgorithmType.HOSTKEY].includes(x)),
                    compression: (_q = (_p = this.profile.options.algorithms) === null || _p === void 0 ? void 0 : _p[SSHAlgorithmType.COMPRESSION]) === null || _q === void 0 ? void 0 : _q.filter(x => supportedAlgorithms[SSHAlgorithmType.COMPRESSION].includes(x)),
                },
                keepaliveIntervalSeconds: this.profile.options.keepaliveInterval ? Math.round(this.profile.options.keepaliveInterval / 1000) : undefined,
                keepaliveCountMax: this.profile.options.keepaliveCountMax,
                connectionTimeoutSeconds: this.profile.options.readyTimeout ? Math.round(this.profile.options.readyTimeout / 1000) : undefined,
            });
            this.ssh.banner$.subscribe(banner => {
                if (!this.profile.options.skipBanner) {
                    this.emitServiceMessage(banner);
                }
            });
            this.previouslyDisconnected = false;
            this.ssh.disconnect$.subscribe(() => {
                if (!this.previouslyDisconnected) {
                    this.previouslyDisconnected = true;
                    // Let service messages drain
                    setTimeout(() => {
                        this.destroy();
                    });
                }
            });
            // Authentication
            (_r = this.authUsername) !== null && _r !== void 0 ? _r : (this.authUsername = this.profile.options.user);
            if (!this.authUsername) {
                const modal = this.ngbModal.open(external_tabby_core_.PromptModalComponent);
                modal.componentInstance.prompt = `Username for ${this.profile.options.host}`;
                try {
                    const result = yield modal.result.catch(() => null);
                    this.authUsername = (_s = result === null || result === void 0 ? void 0 : result.value) !== null && _s !== void 0 ? _s : null;
                }
                catch (_v) {
                    this.authUsername = 'root';
                }
            }
            if ((_t = this.authUsername) === null || _t === void 0 ? void 0 : _t.startsWith('$')) {
                try {
                    const result = process.env[this.authUsername.slice(1)];
                    this.authUsername = result !== null && result !== void 0 ? result : this.authUsername;
                }
                catch (_w) {
                    this.authUsername = 'root';
                }
            }
            const authenticatedClient = yield this.handleAuth();
            if (authenticatedClient) {
                this.ssh = authenticatedClient;
            }
            else {
                this.ssh.disconnect();
                this.passwordStorage.deletePassword(this.profile);
                // eslint-disable-next-line @typescript-eslint/no-base-to-string
                throw new Error('Authentication rejected');
            }
            // auth success
            if (this.savedPassword) {
                this.passwordStorage.savePassword(this.profile, this.savedPassword);
            }
            for (const fw of (_u = this.profile.options.forwardedPorts) !== null && _u !== void 0 ? _u : []) {
                this.addPortForward(Object.assign(new ForwardedPort(), fw));
            }
            this.open = true;
            this.ssh.tcpChannelOpen$.subscribe((event) => __awaiter(this, void 0, void 0, function* () {
                this.logger.info(`Incoming forwarded connection: ${event.clientAddress}:${event.clientPort} -> ${event.targetAddress}:${event.targetPort}`);
                if (!(this.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                    throw new Error('Cannot open agent channel before auth');
                }
                const channel = yield this.ssh.activateChannel(event.channel);
                const forward = this.forwardedPorts.find(x => x.port === event.targetPort && x.host === event.targetAddress);
                if (!forward) {
                    this.emitServiceMessage(ansi_colors_default().bgRed.black(' X ') + ` Rejected incoming forwarded connection for unrecognized port ${event.targetAddress}:${event.targetPort}`);
                    channel.close();
                    return;
                }
                const socket = new external_net_.Socket();
                socket.connect(forward.targetPort, forward.targetAddress);
                socket.on('error', e => {
                    // eslint-disable-next-line @typescript-eslint/no-base-to-string
                    this.emitServiceMessage(ansi_colors_default().bgRed.black(' X ') + ` Could not forward the remote connection to ${forward.targetAddress}:${forward.targetPort}: ${e}`);
                    channel.close();
                });
                channel.data$.subscribe(data => socket.write(data));
                socket.on('data', data => channel.write(Uint8Array.from(data)));
                channel.closed$.subscribe(() => socket.destroy());
                socket.on('close', () => channel.close());
                socket.on('connect', () => {
                    this.logger.info('Connection forwarded');
                });
            }));
            this.ssh.x11ChannelOpen$.subscribe((event) => __awaiter(this, void 0, void 0, function* () {
                var _x;
                this.logger.info(`Incoming X11 connection from ${event.clientAddress}:${event.clientPort}`);
                const displaySpec = (_x = (this.config.store.ssh.x11Display || process.env.DISPLAY)) !== null && _x !== void 0 ? _x : 'localhost:0';
                this.logger.debug(`Trying display ${displaySpec}`);
                if (!(this.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                    throw new Error('Cannot open agent channel before auth');
                }
                const channel = yield this.ssh.activateChannel(event.channel);
                const socket = new X11Socket();
                try {
                    const x11Stream = yield socket.connect(displaySpec);
                    this.logger.info('Connection forwarded');
                    channel.data$.subscribe(data => {
                        x11Stream.write(data);
                    });
                    x11Stream.on('data', data => {
                        channel.write(Uint8Array.from(data));
                    });
                    channel.closed$.subscribe(() => {
                        socket.destroy();
                    });
                    x11Stream.on('close', () => {
                        channel.close();
                    });
                }
                catch (e) {
                    // eslint-disable-next-line @typescript-eslint/no-base-to-string
                    this.emitServiceMessage(ansi_colors_default().bgRed.black(' X ') + ` Could not connect to the X server: ${e}`);
                    this.emitServiceMessage(`    Tabby tried to connect to ${JSON.stringify(X11Socket.resolveDisplaySpec(displaySpec))} based on the DISPLAY environment var (${displaySpec})`);
                    if (process.platform === 'win32') {
                        this.emitServiceMessage('    To use X forwarding, you need a local X server, e.g.:');
                        this.emitServiceMessage('    * VcXsrv: https://sourceforge.net/projects/vcxsrv/');
                        this.emitServiceMessage('    * Xming: https://sourceforge.net/projects/xming/');
                    }
                    channel.close();
                }
            }));
            this.ssh.agentChannelOpen$.subscribe((newChannel) => __awaiter(this, void 0, void 0, function* () {
                if (!(this.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                    throw new Error('Cannot open agent channel before auth');
                }
                const channel = yield this.ssh.activateChannel(newChannel);
                const spec = yield this.getAgentConnectionSpec();
                if (!spec) {
                    yield channel.close();
                    return;
                }
                const agent = yield external_russh_.SSHAgentStream.connect(spec);
                channel.data$.subscribe(data => agent.write(data));
                agent.data$.subscribe(data => channel.write(data), undefined, () => channel.close());
                channel.closed$.subscribe(() => agent.close());
            }));
        });
    }
    verifyHostKey(key) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            this.emitServiceMessage('Host key fingerprint:');
            this.emitServiceMessage(ansi_colors_default().white.bgBlack(` ${key.algorithm()} `) + ansi_colors_default().bgBlackBright(' ' + key.fingerprint() + ' '));
            if (!this.config.store.ssh.verifyHostKeys) {
                return true;
            }
            const selector = {
                host: this.profile.options.host,
                port: (_a = this.profile.options.port) !== null && _a !== void 0 ? _a : 22,
                type: key.algorithm(),
            };
            const keyDigest = external_crypto_.createHash('sha256').update(key.bytes()).digest('base64');
            const knownHost = this.knownHosts.getFor(selector);
            if (!knownHost || knownHost.digest !== keyDigest) {
                const modal = this.ngbModal.open(HostKeyPromptModalComponent);
                modal.componentInstance.selector = selector;
                modal.componentInstance.digest = keyDigest;
                return modal.result.catch(() => false);
            }
            return true;
        });
    }
    emitServiceMessage(msg) {
        this.serviceMessage.next(msg);
        this.logger.info(stripAnsi(msg));
    }
    emitKeyboardInteractivePrompt(prompt) {
        this.logger.info('Keyboard-interactive auth:', prompt.name, prompt.instruction);
        this.emitServiceMessage(ansi_colors_default().bgBlackBright(' ') + ` Keyboard-interactive auth requested: ${prompt.name}`);
        if (prompt.instruction) {
            for (const line of prompt.instruction.split('\n')) {
                this.emitServiceMessage(line);
            }
        }
        this.keyboardInteractivePrompt.next(prompt);
    }
    handleAuth() {
        return __awaiter(this, void 0, void 0, function* () {
            const subscription = this.ssh.disconnect$.subscribe(() => {
                // Auto auth and >=3 keys found
                if (!this.profile.options.auth && this.allAuthMethods.filter(x => x.type === 'publickey').length >= 3) {
                    this.emitServiceMessage('The server has disconnected during authentication.');
                    this.emitServiceMessage('This may happen if too many private key authentication attemps are made.');
                    this.emitServiceMessage('You can set the specific private key for authentication in the profile settings.');
                }
            });
            try {
                return yield this._handleAuth();
            }
            finally {
                subscription.unsubscribe();
            }
        });
    }
    _handleAuth() {
        return __awaiter(this, void 0, void 0, function* () {
            this.activePrivateKey = null;
            if (!(this.ssh instanceof external_russh_.SSHClient)) {
                throw new Error('Wrong state for auth handling');
            }
            if (!this.authUsername) {
                throw new Error('No username');
            }
            const noneResult = yield this.ssh.authenticateNone(this.authUsername);
            if (noneResult instanceof external_russh_.AuthenticatedSSHClient) {
                return noneResult;
            }
            let remainingMethods = [...this.allAuthMethods];
            let methodsLeft = noneResult.remainingMethods;
            function maybeSetRemainingMethods(r) {
                if (r.remainingMethods.length) {
                    methodsLeft = r.remainingMethods;
                }
            }
            while (true) {
                const m = methodsLeft;
                const method = remainingMethods.find(x => m.length === 0 || m.includes(sshAuthTypeForMethod(x)));
                if (this.previouslyDisconnected || !method) {
                    return null;
                }
                remainingMethods = remainingMethods.filter(x => x !== method);
                if (method.type === 'saved-password') {
                    this.emitServiceMessage(this.translate.instant('Using saved password'));
                    const result = yield this.ssh.authenticateWithPassword(this.authUsername, method.password);
                    if (result instanceof external_russh_.AuthenticatedSSHClient) {
                        return result;
                    }
                    maybeSetRemainingMethods(result);
                }
                if (method.type === 'prompt-password') {
                    const modal = this.ngbModal.open(external_tabby_core_.PromptModalComponent);
                    modal.componentInstance.prompt = `Password for ${this.authUsername}@${this.profile.options.host}`;
                    modal.componentInstance.password = true;
                    modal.componentInstance.showRememberCheckbox = true;
                    try {
                        const promptResult = yield modal.result.catch(() => null);
                        if (promptResult) {
                            if (promptResult.remember) {
                                this.savedPassword = promptResult.value;
                            }
                            const result = yield this.ssh.authenticateWithPassword(this.authUsername, promptResult.value);
                            if (result instanceof external_russh_.AuthenticatedSSHClient) {
                                return result;
                            }
                            maybeSetRemainingMethods(result);
                        }
                        else {
                            continue;
                        }
                    }
                    catch (_a) {
                        continue;
                    }
                }
                if (method.type === 'publickey') {
                    try {
                        const key = yield this.loadPrivateKey(method.name, method.contents);
                        this.emitServiceMessage(`Trying private key: ${method.name}`);
                        const result = yield this.ssh.authenticateWithKeyPair(this.authUsername, key, null);
                        if (result instanceof external_russh_.AuthenticatedSSHClient) {
                            return result;
                        }
                        maybeSetRemainingMethods(result);
                    }
                    catch (e) {
                        this.emitServiceMessage(ansi_colors_default().bgYellow.yellow.black(' ! ') + ` Failed to load private key ${method.name}: ${e}`);
                        continue;
                    }
                }
                if (method.type === 'keyboard-interactive') {
                    let state = yield this.ssh.startKeyboardInteractiveAuthentication(this.authUsername);
                    while (true) {
                        if (state.state === 'failure') {
                            maybeSetRemainingMethods(state);
                            break;
                        }
                        const prompts = state.prompts();
                        let responses = [];
                        // OpenSSH can send a k-i request without prompts
                        // just respond ok to it
                        if (prompts.length > 0) {
                            const prompt = new KeyboardInteractivePrompt(state.name, state.instructions, state.prompts());
                            if (method.savedPassword) {
                                // eslint-disable-next-line max-depth
                                for (let i = 0; i < prompt.prompts.length; i++) {
                                    // eslint-disable-next-line max-depth
                                    if (prompt.isAPasswordPrompt(i)) {
                                        prompt.responses[i] = method.savedPassword;
                                    }
                                }
                            }
                            this.emitKeyboardInteractivePrompt(prompt);
                            try {
                                // eslint-disable-next-line @typescript-eslint/await-thenable
                                responses = yield prompt.promise;
                            }
                            catch (_b) {
                                break; // this loop
                            }
                        }
                        state = yield this.ssh.continueKeyboardInteractiveAuthentication(responses);
                        if (state instanceof external_russh_.AuthenticatedSSHClient) {
                            return state;
                        }
                    }
                }
                if (method.type === 'agent') {
                    try {
                        const result = yield this.ssh.authenticateWithAgent(this.authUsername, method);
                        if (result instanceof external_russh_.AuthenticatedSSHClient) {
                            return result;
                        }
                        maybeSetRemainingMethods(result);
                    }
                    catch (e) {
                        this.emitServiceMessage(ansi_colors_default().bgYellow.yellow.black(' ! ') + ` Failed to authenticate using agent: ${e}`);
                        continue;
                    }
                }
            }
            return null;
        });
    }
    addPortForward(fw) {
        return __awaiter(this, void 0, void 0, function* () {
            if (fw.type === PortForwardType.Local || fw.type === PortForwardType.Dynamic) {
                yield fw.startLocalListener((accept, reject, sourceAddress, sourcePort, targetAddress, targetPort) => __awaiter(this, void 0, void 0, function* () {
                    this.logger.info(`New connection on ${fw}`);
                    if (!(this.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                        this.logger.error(`Connection while unauthenticated on ${fw}`);
                        reject();
                        return;
                    }
                    const channel = yield this.ssh.activateChannel(yield this.ssh.openTCPForwardChannel({
                        addressToConnectTo: targetAddress,
                        portToConnectTo: targetPort,
                        originatorAddress: sourceAddress !== null && sourceAddress !== void 0 ? sourceAddress : '127.0.0.1',
                        originatorPort: sourcePort !== null && sourcePort !== void 0 ? sourcePort : 0,
                    }).catch(err => {
                        this.emitServiceMessage(ansi_colors_default().bgRed.black(' X ') + ` Remote has rejected the forwarded connection to ${targetAddress}:${targetPort} via ${fw}: ${err}`);
                        reject();
                        throw err;
                    }));
                    const socket = accept();
                    channel.data$.subscribe(data => socket.write(data));
                    socket.on('data', data => channel.write(Uint8Array.from(data)));
                    channel.closed$.subscribe(() => socket.destroy());
                    socket.on('close', () => channel.close());
                })).then(() => {
                    this.emitServiceMessage(ansi_colors_default().bgGreen.black(' -> ') + ` Forwarded ${fw}`);
                    this.forwardedPorts.push(fw);
                }).catch(e => {
                    this.emitServiceMessage(ansi_colors_default().bgRed.black(' X ') + ` Failed to forward port ${fw}: ${e}`);
                    throw e;
                });
            }
            if (fw.type === PortForwardType.Remote) {
                if (!(this.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                    throw new Error('Cannot add remote port forward before auth');
                }
                try {
                    yield this.ssh.forwardTCPPort(fw.host, fw.port);
                }
                catch (err) {
                    // eslint-disable-next-line @typescript-eslint/no-base-to-string
                    this.emitServiceMessage(ansi_colors_default().bgRed.black(' X ') + ` Remote rejected port forwarding for ${fw}: ${err}`);
                    return;
                }
                this.emitServiceMessage(ansi_colors_default().bgGreen.black(' <- ') + ` Forwarded ${fw}`);
                this.forwardedPorts.push(fw);
            }
        });
    }
    removePortForward(fw) {
        return __awaiter(this, void 0, void 0, function* () {
            if (fw.type === PortForwardType.Local || fw.type === PortForwardType.Dynamic) {
                fw.stopLocalListener();
                this.forwardedPorts = this.forwardedPorts.filter(x => x !== fw);
            }
            if (fw.type === PortForwardType.Remote) {
                if (!(this.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                    throw new Error('Cannot remove remote port forward before auth');
                }
                this.ssh.stopForwardingTCPPort(fw.host, fw.port);
                this.forwardedPorts = this.forwardedPorts.filter(x => x !== fw);
            }
            this.emitServiceMessage(`Stopped forwarding ${fw}`);
        });
    }
    destroy() {
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.info('Destroying');
            this.willDestroy.next();
            this.willDestroy.complete();
            this.serviceMessage.complete();
            this.ssh.disconnect();
        });
    }
    openShellChannel(options) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!(this.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                throw new Error('Cannot open shell channel before auth');
            }
            const ch = yield this.ssh.activateChannel(yield this.ssh.openSessionChannel());
            yield ch.requestPTY('xterm-256color', {
                columns: 80,
                rows: 24,
                pixHeight: 0,
                pixWidth: 0,
            });
            if (options.x11) {
                yield ch.requestX11Forwarding({
                    singleConnection: false,
                    authProtocol: 'MIT-MAGIC-COOKIE-1',
                    authCookie: external_crypto_.randomBytes(16).toString('hex'),
                    screenNumber: 0,
                });
            }
            if (this.profile.options.agentForward) {
                yield ch.requestAgentForwarding();
            }
            yield ch.requestShell();
            return ch;
        });
    }
    loadPrivateKey(name, privateKeyContents) {
        return __awaiter(this, void 0, void 0, function* () {
            this.activePrivateKey = yield this.loadPrivateKeyWithPassphraseMaybe(privateKeyContents.toString());
            return this.activePrivateKey;
        });
    }
    loadPrivateKeyWithPassphraseMaybe(privateKey) {
        return __awaiter(this, void 0, void 0, function* () {
            const keyHash = external_crypto_.createHash('sha512').update(privateKey).digest('hex');
            privateKey = privateKey.replaceAll('EC PRIVATE KEY', 'PRIVATE KEY');
            let triedSavedPassphrase = false;
            let passphrase = null;
            while (true) {
                try {
                    return yield external_russh_.KeyPair.parse(privateKey, passphrase !== null && passphrase !== void 0 ? passphrase : undefined);
                }
                catch (e) {
                    if (!triedSavedPassphrase) {
                        passphrase = yield this.passwordStorage.loadPrivateKeyPassword(keyHash);
                        triedSavedPassphrase = true;
                        continue;
                    }
                    if ([
                        'Error: Keys(KeyIsEncrypted)',
                        'Error: Keys(SshKey(Ppk(Encrypted)))',
                        'Error: Keys(SshKey(Ppk(IncorrectMac)))',
                        'Error: Keys(SshKey(Crypto))',
                    ].includes(e.toString())) {
                        yield this.passwordStorage.deletePrivateKeyPassword(keyHash);
                        const modal = this.ngbModal.open(external_tabby_core_.PromptModalComponent);
                        modal.componentInstance.prompt = 'Private key passphrase';
                        modal.componentInstance.password = true;
                        modal.componentInstance.showRememberCheckbox = true;
                        const result = yield modal.result.catch(() => {
                            throw new Error('Passphrase prompt cancelled');
                        });
                        passphrase = result === null || result === void 0 ? void 0 : result.value;
                        if (passphrase && result.remember) {
                            this.passwordStorage.savePrivateKeyPassword(keyHash, passphrase);
                        }
                    }
                    else {
                        this.notifications.error('Could not read the private key', e.toString());
                        throw e;
                    }
                }
            }
        });
    }
    ref() {
        this.refCount++;
    }
    unref() {
        this.refCount--;
        if (this.refCount === 0) {
            this.destroy();
        }
    }
}

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


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



/** @hidden */
let SSHPortForwardingModalComponent = class SSHPortForwardingModalComponent {
    onForwardAdded(fw) {
        const newForward = new ForwardedPort();
        Object.assign(newForward, fw);
        this.session.addPortForward(newForward);
    }
    onForwardRemoved(fw) {
        this.session.removePortForward(fw);
    }
};
SSHPortForwardingModalComponent.propDecorators = {
    session: [{ type: core_.Input }]
};
SSHPortForwardingModalComponent = __decorate([
    (0,core_.Component)({
        template: (sshPortForwardingModal_componentngResource_default()),
    })
], SSHPortForwardingModalComponent);


// EXTERNAL MODULE: ./src/components/sshPortForwardingConfig.component.pug?ngResource
var sshPortForwardingConfig_componentngResource = __webpack_require__(8192);
var sshPortForwardingConfig_componentngResource_default = /*#__PURE__*/__webpack_require__.n(sshPortForwardingConfig_componentngResource);
;// CONCATENATED MODULE: ./src/components/sshPortForwardingConfig.component.ts


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


/** @hidden */
let SSHPortForwardingConfigComponent = class SSHPortForwardingConfigComponent {
    constructor() {
        this.forwardAdded = new core_.EventEmitter();
        this.forwardRemoved = new core_.EventEmitter();
        this.PortForwardType = PortForwardType;
        this.reset();
    }
    reset() {
        this.newForward = {
            type: PortForwardType.Local,
            host: '127.0.0.1',
            port: 8000,
            targetAddress: '127.0.0.1',
            targetPort: 80,
            description: '',
        };
    }
    addForward() {
        return __awaiter(this, void 0, void 0, function* () {
            try {
                this.forwardAdded.emit(this.newForward);
                this.reset();
            }
            catch (e) {
                console.error(e);
            }
        });
    }
    remove(fw) {
        this.forwardRemoved.emit(fw);
        this.newForward = fw;
    }
};
SSHPortForwardingConfigComponent.ctorParameters = () => [];
SSHPortForwardingConfigComponent.propDecorators = {
    model: [{ type: core_.Input }],
    forwardAdded: [{ type: core_.Output }],
    forwardRemoved: [{ type: core_.Output }]
};
SSHPortForwardingConfigComponent = __decorate([
    (0,core_.Component)({
        selector: 'ssh-port-forwarding-config',
        template: (sshPortForwardingConfig_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [])
], SSHPortForwardingConfigComponent);


// EXTERNAL MODULE: ./src/components/sshSettingsTab.component.pug?ngResource
var sshSettingsTab_componentngResource = __webpack_require__(1602);
var sshSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(sshSettingsTab_componentngResource);
;// CONCATENATED MODULE: ./src/components/sshSettingsTab.component.ts





/** @hidden */
let SSHSettingsTabComponent = class SSHSettingsTabComponent {
    constructor(config, hostApp) {
        this.config = config;
        this.hostApp = hostApp;
        this.Platform = external_tabby_core_.Platform;
        const spec = X11Socket.resolveDisplaySpec();
        if ('path' in spec) {
            this.defaultX11Display = spec.path;
        }
        else {
            this.defaultX11Display = `${spec.host}:${spec.port}`;
        }
    }
};
SSHSettingsTabComponent.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService },
    { type: external_tabby_core_.HostAppService }
];
SSHSettingsTabComponent.propDecorators = {
    true: [{ type: core_.HostBinding, args: ['class.content-box',] }]
};
SSHSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: (sshSettingsTab_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        external_tabby_core_.HostAppService])
], SSHSettingsTabComponent);


;// 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;
}
;// CONCATENATED MODULE: external "fs/promises"
const promises_namespaceObject = require("fs/promises");
// EXTERNAL MODULE: ./node_modules/tmp-promise/index.js
var tmp_promise = __webpack_require__(8995);
;// CONCATENATED MODULE: ./src/services/ssh.service.ts







let SSHService = class SSHService {
    constructor(passwordStorage, config, hostApp, platform, fileProviders) {
        this.passwordStorage = passwordStorage;
        this.config = config;
        this.platform = platform;
        this.fileProviders = fileProviders;
        if (hostApp.platform === external_tabby_core_.Platform.Windows) {
            this.detectedWinSCPPath = platform.getWinSCPPath();
        }
    }
    getWinSCPPath() {
        var _a;
        return (_a = this.detectedWinSCPPath) !== null && _a !== void 0 ? _a : this.config.store.ssh.winSCPPath;
    }
    getWinSCPURI(profile, cwd, username) {
        return __awaiter(this, void 0, void 0, function* () {
            let uri = `scp://${username !== null && username !== void 0 ? username : profile.options.user}`;
            const password = yield this.passwordStorage.loadPassword(profile);
            if (password) {
                uri += ':' + encodeURIComponent(password);
            }
            if (profile.options.host.includes(':')) {
                uri += `@[${profile.options.host}]:${profile.options.port}${cwd !== null && cwd !== void 0 ? cwd : '/'}`;
            }
            else {
                uri += `@${profile.options.host}:${profile.options.port}${cwd !== null && cwd !== void 0 ? cwd : '/'}`;
            }
            return uri;
        });
    }
    launchWinSCP(session) {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            const path = this.getWinSCPPath();
            if (!path) {
                return;
            }
            const args = [yield this.getWinSCPURI(session.profile, undefined, (_a = session.authUsername) !== null && _a !== void 0 ? _a : undefined)];
            let tmpFile = null;
            try {
                if (session.activePrivateKey && session.profile.options.privateKeys && session.profile.options.privateKeys.length > 0) {
                    tmpFile = yield tmp_promise.file();
                    let passphrase = null;
                    for (const pk of session.profile.options.privateKeys) {
                        let privateKeyContent = null;
                        const buffer = yield this.fileProviders.retrieveFile(pk);
                        privateKeyContent = buffer.toString();
                        yield promises_namespaceObject.writeFile(tmpFile.path, privateKeyContent);
                        const keyHash = external_crypto_.createHash('sha512').update(privateKeyContent).digest('hex');
                        // need to pass an default passphrase, otherwise it might get stuck at the passphrase input
                        passphrase = (_b = yield this.passwordStorage.loadPrivateKeyPassword(keyHash)) !== null && _b !== void 0 ? _b : 'tabby';
                        const winSCPcom = path.slice(0, -3) + 'com';
                        try {
                            yield this.platform.exec(winSCPcom, ['/keygen', tmpFile.path, '-o', tmpFile.path, '--old-passphrase', passphrase]);
                        }
                        catch (error) {
                            console.warn('Could not convert private key ', error);
                            continue;
                        }
                        break;
                    }
                    args.push(`/privatekey=${tmpFile.path}`);
                    if (passphrase != null) {
                        args.push(`/passphrase=${passphrase}`);
                    }
                }
                yield this.platform.exec(path, args);
            }
            finally {
                tmpFile === null || tmpFile === void 0 ? void 0 : tmpFile.cleanup();
            }
        });
    }
};
SSHService.ctorParameters = () => [
    { type: PasswordStorageService },
    { type: external_tabby_core_.ConfigService },
    { type: external_tabby_core_.HostAppService },
    { type: external_tabby_core_.PlatformService },
    { type: external_tabby_core_.FileProvidersService }
];
SSHService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [PasswordStorageService,
        external_tabby_core_.ConfigService,
        external_tabby_core_.HostAppService,
        external_tabby_core_.PlatformService,
        external_tabby_core_.FileProvidersService])
], SSHService);


;// CONCATENATED MODULE: ./src/session/shell.ts





class SSHShellSession extends external_tabby_terminal_.BaseSession {
    get serviceMessage$() { return this.serviceMessage; }
    constructor(injector, ssh, profile) {
        super(injector.get(external_tabby_core_.LogService).create(`ssh-shell-${profile.options.host}-${profile.options.port}`));
        this.profile = profile;
        this.serviceMessage = new external_rxjs_.Subject();
        this.ssh = ssh;
        this.setLoginScriptsOptions(this.profile.options);
        this.ssh.serviceMessage$.subscribe(m => this.serviceMessage.next(m));
        this.middleware.push(new external_tabby_terminal_.UTF8SplitterMiddleware());
        this.middleware.push(new external_tabby_terminal_.InputProcessor(profile.options.input));
    }
    start() {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.ssh) {
                throw new Error('SSH session not set');
            }
            this.ssh.ref();
            this.ssh.willDestroy$.subscribe(() => {
                this.destroy();
            });
            this.logger.debug('Opening shell');
            try {
                this.shell = yield this.ssh.openShellChannel({ x11: (_a = this.profile.options.x11) !== null && _a !== void 0 ? _a : false });
            }
            catch (err) {
                if (err.toString().includes('Unable to request X11')) {
                    this.emitServiceMessage('    Make sure `xauth` is installed on the remote side');
                }
                throw new Error(`Remote rejected opening a shell channel: ${err}`);
            }
            this.open = true;
            this.logger.debug('Shell open');
            (_b = this.loginScriptProcessor) === null || _b === void 0 ? void 0 : _b.executeUnconditionalScripts();
            this.shell.data$.subscribe(data => {
                this.emitOutput(Buffer.from(data));
            });
            this.shell.eof$.subscribe(() => {
                this.logger.info('Shell session ended');
                if (this.open) {
                    this.destroy();
                }
            });
        });
    }
    emitServiceMessage(msg) {
        this.serviceMessage.next(msg);
        this.logger.info(stripAnsi(msg));
    }
    resize(columns, rows) {
        var _a;
        (_a = this.shell) === null || _a === void 0 ? void 0 : _a.resizePTY({
            columns,
            rows,
            pixHeight: 0,
            pixWidth: 0,
        });
    }
    write(data) {
        if (this.shell) {
            this.shell.write(new Uint8Array(data));
        }
    }
    kill(_signal) {
        // this.shell?.signal(signal ?? 'TERM')
    }
    destroy() {
        const _super = Object.create(null, {
            destroy: { get: () => super.destroy }
        });
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            this.logger.debug('Closing shell');
            this.serviceMessage.complete();
            this.kill();
            (_a = this.ssh) === null || _a === void 0 ? void 0 : _a.unref();
            this.ssh = null;
            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('TERM');
        });
    }
    supportsWorkingDirectory() {
        return !!this.reportedCWD;
    }
    getWorkingDirectory() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            return (_a = this.reportedCWD) !== null && _a !== void 0 ? _a : null;
        });
    }
}

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













/** @hidden */
let SSHTabComponent = class SSHTabComponent extends external_tabby_terminal_.ConnectableTerminalTabComponent {
    constructor(injector, ssh, ngbModal, profilesService, sshMultiplexer) {
        super(injector);
        this.ssh = ssh;
        this.ngbModal = ngbModal;
        this.profilesService = profilesService;
        this.sshMultiplexer = sshMultiplexer;
        this.Platform = external_tabby_core_.Platform;
        this.sshSession = null;
        this.session = null;
        this.sftpPanelVisible = false;
        this.sftpPath = '/';
        this.enableToolbar = true;
        this.activeKIPrompt = null;
        this.sessionChanged$.subscribe(() => {
            this.activeKIPrompt = null;
        });
    }
    ngOnInit() {
        this.subscribeUntilDestroyed(this.hotkeys.hotkey$, hotkey => {
            if (!this.hasFocus) {
                return;
            }
            switch (hotkey) {
                case 'home':
                    this.sendInput('\x1bOH');
                    break;
                case 'end':
                    this.sendInput('\x1bOF');
                    break;
                case 'restart-ssh-session':
                    this.reconnect();
                    break;
                case 'launch-winscp':
                    if (this.sshSession) {
                        this.ssh.launchWinSCP(this.sshSession);
                    }
                    break;
            }
        });
        super.ngOnInit();
    }
    setupOneSession(injector, profile, multiplex = true) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let session = yield this.sshMultiplexer.getSession(profile);
            if (!multiplex || !session || !profile.options.reuseSession) {
                session = new SSHSession(injector, profile);
                if (profile.options.jumpHost) {
                    const jumpConnection = (yield this.profilesService.getProfiles()).find(x => x.id === profile.options.jumpHost);
                    if (!jumpConnection) {
                        throw new Error(`${profile.options.host}: jump host "${profile.options.jumpHost}" not found in your config`);
                    }
                    const jumpSession = yield this.setupOneSession(this.injector, this.profilesService.getConfigProxyForProfile(jumpConnection));
                    jumpSession.ref();
                    session.willDestroy$.subscribe(() => jumpSession.unref());
                    jumpSession.willDestroy$.subscribe(() => {
                        if (session === null || session === void 0 ? void 0 : session.open) {
                            session.destroy();
                        }
                    });
                    if (!(jumpSession.ssh instanceof external_russh_.AuthenticatedSSHClient)) {
                        throw new Error('Jump session is not authenticated yet somehow');
                    }
                    try {
                        session.jumpChannel = yield jumpSession.ssh.openTCPForwardChannel({
                            addressToConnectTo: profile.options.host,
                            portToConnectTo: (_a = profile.options.port) !== null && _a !== void 0 ? _a : 22,
                            originatorAddress: '127.0.0.1',
                            originatorPort: 0,
                        });
                    }
                    catch (err) {
                        jumpSession.emitServiceMessage(ansi_colors_default().bgRed.black(' X ') + ` Could not set up port forward on ${jumpConnection.name}`);
                        throw err;
                    }
                }
            }
            this.attachSessionHandler(session.serviceMessage$, msg => {
                msg = msg.replace(/\n/g, '\r\n      ');
                this.write(`\r${ansi_colors_default().black.bgWhite(' SSH ')} ${msg}\r\n`);
            });
            this.attachSessionHandler(session.willDestroy$, () => {
                this.activeKIPrompt = null;
            });
            this.attachSessionHandler(session.keyboardInteractivePrompt$, prompt => {
                this.activeKIPrompt = prompt;
                setTimeout(() => {
                    var _a;
                    (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.scrollToBottom();
                });
            });
            if (!session.open) {
                this.write('\r\n' + ansi_colors_default().black.bgWhite(' SSH ') + ` Connecting to ${session.profile.name}\r\n`);
                this.startSpinner(this.translate.instant(marker('Connecting')));
                try {
                    yield session.start();
                }
                finally {
                    this.stopSpinner();
                }
                this.sshMultiplexer.addSession(session);
            }
            return session;
        });
    }
    onSessionDestroyed() {
        var _a;
        if (this.frontend) {
            // Session was closed abruptly
            this.write('\r\n' + ansi_colors_default().black.bgWhite(' SSH ') + ` ${(_a = this.sshSession) === null || _a === void 0 ? void 0 : _a.profile.options.host}: session closed\r\n`);
            super.onSessionDestroyed();
        }
    }
    initializeSessionMaybeMultiplex(multiplex = true) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            this.sshSession = yield this.setupOneSession(this.injector, this.profile, multiplex);
            const session = new SSHShellSession(this.injector, this.sshSession, this.profile);
            this.setSession(session);
            this.attachSessionHandler(session.serviceMessage$, msg => {
                msg = msg.replace(/\n/g, '\r\n      ');
                this.write(`\r${ansi_colors_default().black.bgWhite(' SSH ')} ${msg}\r\n`);
                session.resize(this.size.columns, this.size.rows);
            });
            yield session.start();
            (_a = this.session) === null || _a === void 0 ? void 0 : _a.resize(this.size.columns, this.size.rows);
        });
    }
    initializeSession() {
        const _super = Object.create(null, {
            initializeSession: { get: () => super.initializeSession }
        });
        return __awaiter(this, void 0, void 0, function* () {
            yield _super.initializeSession.call(this);
            try {
                yield this.initializeSessionMaybeMultiplex(true);
            }
            catch (_a) {
                try {
                    yield this.initializeSessionMaybeMultiplex(false);
                }
                catch (e) {
                    console.error('SSH session initialization failed', e);
                    this.write(ansi_colors_default().black.bgRed(' X ') + ' ' + ansi_colors_default().red(e.message) + '\r\n');
                    return;
                }
            }
        });
    }
    showPortForwarding() {
        const modal = this.ngbModal.open(SSHPortForwardingModalComponent).componentInstance;
        modal.session = this.sshSession;
    }
    canClose() {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            if (!((_a = this.session) === null || _a === void 0 ? void 0 : _a.open)) {
                return true;
            }
            if (!((_b = this.profile.options.warnOnClose) !== null && _b !== void 0 ? _b : this.config.store.ssh.warnOnClose)) {
                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;
        });
    }
    openSFTP() {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            this.sftpPath = (_b = yield ((_a = this.session) === null || _a === void 0 ? void 0 : _a.getWorkingDirectory())) !== null && _b !== void 0 ? _b : this.sftpPath;
            setTimeout(() => {
                this.sftpPanelVisible = true;
            }, 100);
        });
    }
    onClick() {
        this.sftpPanelVisible = false;
    }
    isSessionExplicitlyTerminated() {
        return super.isSessionExplicitlyTerminated() ||
            this.recentInputs.charCodeAt(this.recentInputs.length - 1) === 4 ||
            this.recentInputs.endsWith('exit\r');
    }
};
SSHTabComponent.ctorParameters = () => [
    { type: core_.Injector },
    { type: SSHService },
    { type: ng_bootstrap_.NgbModal },
    { type: external_tabby_core_.ProfilesService },
    { type: SSHMultiplexerService }
];
SSHTabComponent.propDecorators = {
    onClick: [{ type: core_.HostListener, args: ['click',] }]
};
SSHTabComponent = __decorate([
    (0,core_.Component)({
        selector: 'ssh-tab',
        template: `${external_tabby_terminal_.BaseTerminalTabComponent.template} ${__webpack_require__(/*! ./sshTab.component.pug */ 4113)}`,
        animations: external_tabby_terminal_.BaseTerminalTabComponent.animations,
        styles: [...external_tabby_terminal_.BaseTerminalTabComponent.styles,
            __webpack_require__(/*! ./sshTab.component.scss */ 7846)]
    }),
    __metadata("design:paramtypes", [core_.Injector,
        SSHService,
        ng_bootstrap_.NgbModal,
        external_tabby_core_.ProfilesService,
        SSHMultiplexerService])
], SSHTabComponent);


// EXTERNAL MODULE: ./src/components/sftpPanel.component.pug?ngResource
var sftpPanel_componentngResource = __webpack_require__(687);
var sftpPanel_componentngResource_default = /*#__PURE__*/__webpack_require__.n(sftpPanel_componentngResource);
// EXTERNAL MODULE: ./src/components/sftpPanel.component.scss?ngResource
var components_sftpPanel_componentngResource = __webpack_require__(4987);
var components_sftpPanel_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_sftpPanel_componentngResource);
// EXTERNAL MODULE: external "constants"
var external_constants_ = __webpack_require__(2057);
// EXTERNAL MODULE: ./src/components/sftpCreateDirectoryModal.component.pug?ngResource
var sftpCreateDirectoryModal_componentngResource = __webpack_require__(7192);
var sftpCreateDirectoryModal_componentngResource_default = /*#__PURE__*/__webpack_require__.n(sftpCreateDirectoryModal_componentngResource);
;// CONCATENATED MODULE: ./src/components/sftpCreateDirectoryModal.component.ts





/** @hidden */
let SFTPCreateDirectoryModalComponent = class SFTPCreateDirectoryModalComponent extends external_tabby_core_.BaseComponent {
    constructor(modalInstance) {
        super();
        this.modalInstance = modalInstance;
    }
    create() {
        this.modalInstance.close(this.directoryName);
    }
    cancel() {
        this.modalInstance.close('');
    }
};
SFTPCreateDirectoryModalComponent.ctorParameters = () => [
    { type: ng_bootstrap_.NgbActiveModal }
];
SFTPCreateDirectoryModalComponent = __decorate([
    (0,core_.Component)({
        template: (sftpCreateDirectoryModal_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [ng_bootstrap_.NgbActiveModal])
], SFTPCreateDirectoryModalComponent);


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











let SFTPPanelComponent = class SFTPPanelComponent {
    constructor(ngbModal, notifications, platform, contextMenuProviders) {
        this.ngbModal = ngbModal;
        this.notifications = notifications;
        this.platform = platform;
        this.contextMenuProviders = contextMenuProviders;
        this.closed = new core_.EventEmitter();
        this.fileList = null;
        this.filteredFileList = [];
        this.path = '/';
        this.pathChange = new core_.EventEmitter();
        this.pathSegments = [];
        this.cwdDetectionAvailable = false;
        this.editingPath = null;
        this.showFilter = false;
        this.filterText = '';
        this.contextMenuProviders.sort((a, b) => a.weight - b.weight);
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.sftp = yield this.session.openSFTP();
            try {
                yield this.navigate(this.path);
            }
            catch (error) {
                console.warn('Could not navigate to', this.path, ':', error);
                this.notifications.error(error.message);
                yield this.navigate('/');
            }
        });
    }
    navigate(newPath, fallbackOnError = true) {
        return __awaiter(this, void 0, void 0, function* () {
            const previousPath = this.path;
            this.path = newPath;
            this.pathChange.next(this.path);
            this.clearFilter();
            let p = newPath;
            this.pathSegments = [];
            while (p !== '/') {
                this.pathSegments.unshift({
                    name: external_path_.posix.basename(p),
                    path: p,
                });
                p = external_path_.posix.dirname(p);
            }
            this.fileList = null;
            this.filteredFileList = [];
            try {
                this.fileList = yield this.sftp.readdir(this.path);
            }
            catch (error) {
                this.notifications.error(error.message);
                if (previousPath && fallbackOnError) {
                    this.navigate(previousPath, false);
                }
                return;
            }
            const dirKey = a => a.isDirectory ? 1 : 0;
            this.fileList.sort((a, b) => dirKey(b) - dirKey(a) ||
                a.name.localeCompare(b.name));
            this.updateFilteredList();
        });
    }
    getFileType(fileExtension) {
        const codeExtensions = ['js', 'ts', 'py', 'java', 'cpp', 'h', 'cs', 'html', 'css', 'rb', 'php', 'swift', 'go', 'kt', 'sh', 'json', 'cc', 'c', 'xml'];
        const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
        const pdfExtensions = ['pdf'];
        const archiveExtensions = ['zip', 'rar', 'tar', 'gz'];
        const wordExtensions = ['doc', 'docx'];
        const videoExtensions = ['mp4', 'avi', 'mkv', 'mov'];
        const powerpointExtensions = ['ppt', 'pptx'];
        const textExtensions = ['txt', 'log'];
        const audioExtensions = ['mp3', 'wav', 'flac'];
        const excelExtensions = ['xls', 'xlsx'];
        const lowerCaseExtension = fileExtension.toLowerCase();
        if (codeExtensions.includes(lowerCaseExtension)) {
            return 'code';
        }
        else if (imageExtensions.includes(lowerCaseExtension)) {
            return 'image';
        }
        else if (pdfExtensions.includes(lowerCaseExtension)) {
            return 'pdf';
        }
        else if (archiveExtensions.includes(lowerCaseExtension)) {
            return 'archive';
        }
        else if (wordExtensions.includes(lowerCaseExtension)) {
            return 'word';
        }
        else if (videoExtensions.includes(lowerCaseExtension)) {
            return 'video';
        }
        else if (powerpointExtensions.includes(lowerCaseExtension)) {
            return 'powerpoint';
        }
        else if (textExtensions.includes(lowerCaseExtension)) {
            return 'text';
        }
        else if (audioExtensions.includes(lowerCaseExtension)) {
            return 'audio';
        }
        else if (excelExtensions.includes(lowerCaseExtension)) {
            return 'excel';
        }
        else {
            return 'unknown';
        }
    }
    getIcon(item) {
        if (item.isDirectory) {
            return 'fas fa-folder text-info';
        }
        if (item.isSymlink) {
            return 'fas fa-link text-warning';
        }
        const fileMatch = /\.([^.]+)$/.exec(item.name);
        const extension = fileMatch ? fileMatch[1] : null;
        if (extension !== null) {
            const fileType = this.getFileType(extension);
            switch (fileType) {
                case 'unknown':
                    return 'fas fa-file';
                default:
                    return `fa-solid fa-file-${fileType} `;
            }
        }
        return 'fas fa-file';
    }
    goUp() {
        this.navigate(external_path_.posix.dirname(this.path));
    }
    open(item) {
        return __awaiter(this, void 0, void 0, function* () {
            if (item.isDirectory) {
                yield this.navigate(item.fullPath);
            }
            else if (item.isSymlink) {
                const target = external_path_.posix.resolve(this.path, yield this.sftp.readlink(item.fullPath));
                const stat = yield this.sftp.stat(target);
                if (stat.isDirectory) {
                    yield this.navigate(item.fullPath);
                }
                else {
                    yield this.download(item.fullPath, stat.mode, stat.size);
                }
            }
            else {
                yield this.download(item.fullPath, item.mode, item.size);
            }
        });
    }
    openCreateDirectoryModal() {
        return __awaiter(this, void 0, void 0, function* () {
            const modal = this.ngbModal.open(SFTPCreateDirectoryModalComponent);
            const directoryName = yield modal.result.catch(() => null);
            if (directoryName === null || directoryName === void 0 ? void 0 : directoryName.trim()) {
                this.sftp.mkdir(external_path_.posix.join(this.path, directoryName)).then(() => {
                    this.notifications.notice('The directory was created successfully');
                    this.navigate(external_path_.posix.join(this.path, directoryName));
                }).catch(() => {
                    this.notifications.error('The directory could not be created');
                });
            }
        });
    }
    upload() {
        return __awaiter(this, void 0, void 0, function* () {
            const transfers = yield this.platform.startUpload({ multiple: true });
            yield Promise.all(transfers.map(t => this.uploadOne(t)));
        });
    }
    uploadFolder() {
        return __awaiter(this, void 0, void 0, function* () {
            const transfer = yield this.platform.startUploadDirectory();
            yield this.uploadOneFolder(transfer);
        });
    }
    uploadOneFolder(transfer, accumPath = '') {
        return __awaiter(this, void 0, void 0, function* () {
            const savedPath = this.path;
            for (const t of transfer.getChildrens()) {
                if (t instanceof external_tabby_core_.DirectoryUpload) {
                    try {
                        yield this.sftp.mkdir(external_path_.posix.posix.join(this.path, accumPath, t.getName()));
                    }
                    catch (_a) {
                        // Intentionally ignoring errors from making duplicate dirs.
                    }
                    yield this.uploadOneFolder(t, external_path_.posix.posix.join(accumPath, t.getName()));
                }
                else {
                    yield this.sftp.upload(external_path_.posix.posix.join(this.path, accumPath, t.getName()), t);
                }
            }
            if (this.path === savedPath) {
                yield this.navigate(this.path);
            }
        });
    }
    uploadOne(transfer) {
        return __awaiter(this, void 0, void 0, function* () {
            const savedPath = this.path;
            yield this.sftp.upload(external_path_.posix.join(this.path, transfer.getName()), transfer);
            if (this.path === savedPath) {
                yield this.navigate(this.path);
            }
        });
    }
    download(itemPath, mode, size) {
        return __awaiter(this, void 0, void 0, function* () {
            const transfer = yield this.platform.startDownload(external_path_.posix.basename(itemPath), mode, size);
            if (!transfer) {
                return;
            }
            this.sftp.download(itemPath, transfer);
        });
    }
    downloadFolder(folder) {
        return __awaiter(this, void 0, void 0, function* () {
            try {
                const transfer = yield this.platform.startDownloadDirectory(folder.name, 0);
                if (!transfer) {
                    return;
                }
                // Start background size calculation and download simultaneously
                const sizeCalculationPromise = this.calculateFolderSizeAndUpdate(folder, transfer);
                const downloadPromise = this.downloadFolderRecursive(folder, transfer, '');
                try {
                    yield Promise.all([sizeCalculationPromise, downloadPromise]);
                    transfer.setStatus('');
                    transfer.setCompleted(true);
                }
                catch (error) {
                    transfer.cancel();
                    throw error;
                }
                finally {
                    transfer.close();
                }
            }
            catch (error) {
                this.notifications.error(`Failed to download folder: ${error.message}`);
                throw error;
            }
        });
    }
    calculateFolderSizeAndUpdate(folder, transfer) {
        return __awaiter(this, void 0, void 0, function* () {
            let totalSize = 0;
            const items = yield this.sftp.readdir(folder.fullPath);
            for (const item of items) {
                if (item.isDirectory) {
                    totalSize += yield this.calculateFolderSizeAndUpdate(item, transfer);
                }
                else {
                    totalSize += item.size;
                }
                transfer.setTotalSize(totalSize);
            }
            return totalSize;
        });
    }
    downloadFolderRecursive(folder, transfer, relativePath) {
        return __awaiter(this, void 0, void 0, function* () {
            const items = yield this.sftp.readdir(folder.fullPath);
            for (const item of items) {
                if (transfer.isCancelled()) {
                    throw new Error('Download cancelled');
                }
                const itemRelativePath = relativePath ? `${relativePath}/${item.name}` : item.name;
                transfer.setStatus(itemRelativePath);
                if (item.isDirectory) {
                    yield transfer.createDirectory(itemRelativePath);
                    yield this.downloadFolderRecursive(item, transfer, itemRelativePath);
                }
                else {
                    const fileDownload = yield transfer.createFile(itemRelativePath, item.mode, item.size);
                    yield this.sftp.download(item.fullPath, fileDownload);
                }
            }
        });
    }
    getModeString(item) {
        const s = 'SGdrwxrwxrwx';
        const e = '   ---------';
        const c = [
            0o4000, 0o2000, external_constants_.S_IFDIR,
            external_constants_.S_IRUSR, external_constants_.S_IWUSR, external_constants_.S_IXUSR,
            external_constants_.S_IRGRP, external_constants_.S_IWGRP, external_constants_.S_IXGRP,
            external_constants_.S_IROTH, external_constants_.S_IWOTH, external_constants_.S_IXOTH,
        ];
        let result = '';
        for (let i = 0; i < c.length; i++) {
            result += item.mode & c[i] ? s[i] : e[i];
        }
        return result;
    }
    buildContextMenu(item) {
        return __awaiter(this, void 0, void 0, function* () {
            let items = [];
            for (const section of yield Promise.all(this.contextMenuProviders.map(x => x.getItems(item, this)))) {
                items.push({ type: 'separator' });
                items = items.concat(section);
            }
            return items.slice(1);
        });
    }
    showContextMenu(item, event) {
        return __awaiter(this, void 0, void 0, function* () {
            event.preventDefault();
            this.platform.popupContextMenu(yield this.buildContextMenu(item), event);
        });
    }
    get shouldShowCWDTip() {
        return !window.localStorage.sshCWDTipDismissed;
    }
    dismissCWDTip() {
        window.localStorage.sshCWDTipDismissed = 'true';
    }
    editPath() {
        this.editingPath = this.path;
    }
    confirmPath() {
        if (this.editingPath === null) {
            return;
        }
        this.navigate(this.editingPath);
        this.editingPath = null;
    }
    close() {
        this.closed.emit();
    }
    clearFilter() {
        this.showFilter = false;
        this.filterText = '';
        this.updateFilteredList();
    }
    onFilterChange() {
        this.updateFilteredList();
    }
    updateFilteredList() {
        if (!this.fileList) {
            this.filteredFileList = [];
            return;
        }
        if (!this.showFilter || this.filterText.trim() === '') {
            this.filteredFileList = this.fileList;
            return;
        }
        this.filteredFileList = this.fileList.filter(item => item.name.toLowerCase().includes(this.filterText.toLowerCase()));
    }
};
SFTPPanelComponent.ctorParameters = () => [
    { type: ng_bootstrap_.NgbModal },
    { type: external_tabby_core_.NotificationsService },
    { type: external_tabby_core_.PlatformService },
    { type: Array, decorators: [{ type: core_.Optional }, { type: core_.Inject, args: [SFTPContextMenuItemProvider,] }] }
];
SFTPPanelComponent.propDecorators = {
    session: [{ type: core_.Input }],
    closed: [{ type: core_.Output }],
    path: [{ type: core_.Input }],
    pathChange: [{ type: core_.Output }],
    cwdDetectionAvailable: [{ type: core_.Input }]
};
SFTPPanelComponent = __decorate([
    (0,core_.Component)({
        selector: 'sftp-panel',
        template: (sftpPanel_componentngResource_default()),
        styles: [(components_sftpPanel_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [ng_bootstrap_.NgbModal,
        external_tabby_core_.NotificationsService,
        external_tabby_core_.PlatformService, Array])
], SFTPPanelComponent);


// EXTERNAL MODULE: ./src/components/sftpDeleteModal.component.pug?ngResource
var sftpDeleteModal_componentngResource = __webpack_require__(7255);
var sftpDeleteModal_componentngResource_default = /*#__PURE__*/__webpack_require__.n(sftpDeleteModal_componentngResource);
;// CONCATENATED MODULE: ./src/components/sftpDeleteModal.component.ts





/** @hidden */
let SFTPDeleteModalComponent = class SFTPDeleteModalComponent extends external_tabby_core_.BaseComponent {
    constructor(modalInstance) {
        super();
        this.modalInstance = modalInstance;
        this.progressMessage = '';
        this.cancelled = false;
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.destroyed$.subscribe(() => this.cancel());
            yield this.run(this.item);
            this.modalInstance.close();
        });
    }
    cancel() {
        this.cancelled = true;
        this.modalInstance.close();
    }
    run(file) {
        return __awaiter(this, void 0, void 0, function* () {
            this.progressMessage = file.fullPath;
            if (file.isDirectory) {
                for (const child of yield this.sftp.readdir(file.fullPath)) {
                    yield this.run(child);
                    if (this.cancelled) {
                        break;
                    }
                }
                yield this.sftp.rmdir(file.fullPath);
            }
            else {
                this.sftp.unlink(file.fullPath);
            }
        });
    }
};
SFTPDeleteModalComponent.ctorParameters = () => [
    { type: ng_bootstrap_.NgbActiveModal }
];
SFTPDeleteModalComponent = __decorate([
    (0,core_.Component)({
        template: (sftpDeleteModal_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [ng_bootstrap_.NgbActiveModal])
], SFTPDeleteModalComponent);


// EXTERNAL MODULE: ./src/components/keyboardInteractiveAuthPanel.component.pug?ngResource
var keyboardInteractiveAuthPanel_componentngResource = __webpack_require__(5897);
var keyboardInteractiveAuthPanel_componentngResource_default = /*#__PURE__*/__webpack_require__.n(keyboardInteractiveAuthPanel_componentngResource);
// EXTERNAL MODULE: ./src/components/keyboardInteractiveAuthPanel.component.scss?ngResource
var components_keyboardInteractiveAuthPanel_componentngResource = __webpack_require__(442);
var components_keyboardInteractiveAuthPanel_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_keyboardInteractiveAuthPanel_componentngResource);
;// CONCATENATED MODULE: ./src/components/keyboardInteractiveAuthPanel.component.ts






let KeyboardInteractiveAuthComponent = class KeyboardInteractiveAuthComponent {
    constructor(passwordStorage) {
        this.passwordStorage = passwordStorage;
        this.step = 0;
        this.done = new core_.EventEmitter();
        this.remember = false;
    }
    isPassword() {
        return this.prompt.isAPasswordPrompt(this.step);
    }
    previous() {
        if (this.step > 0) {
            this.step--;
        }
        this.input.nativeElement.focus();
    }
    next() {
        if (this.isPassword() && this.remember) {
            this.passwordStorage.savePassword(this.profile, this.prompt.responses[this.step]);
        }
        if (this.step === this.prompt.prompts.length - 1) {
            this.prompt.respond();
            this.done.emit();
            return;
        }
        this.step++;
        this.input.nativeElement.focus();
    }
};
KeyboardInteractiveAuthComponent.ctorParameters = () => [
    { type: PasswordStorageService }
];
KeyboardInteractiveAuthComponent.propDecorators = {
    profile: [{ type: core_.Input }],
    prompt: [{ type: core_.Input }],
    step: [{ type: core_.Input }],
    done: [{ type: core_.Output }],
    input: [{ type: core_.ViewChild, args: ['input',] }]
};
KeyboardInteractiveAuthComponent = __decorate([
    (0,core_.Component)({
        selector: 'keyboard-interactive-auth-panel',
        template: (keyboardInteractiveAuthPanel_componentngResource_default()),
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
        styles: [(components_keyboardInteractiveAuthPanel_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [PasswordStorageService])
], KeyboardInteractiveAuthComponent);


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

/** @hidden */
class SSHConfigProvider extends external_tabby_core_.ConfigProvider {
    constructor() {
        super(...arguments);
        this.defaults = {
            ssh: {
                warnOnClose: false,
                winSCPPath: null,
                agentType: 'auto',
                agentPath: null,
                x11Display: null,
                knownHosts: [],
                verifyHostKeys: true,
            },
            hotkeys: {
                'restart-ssh-session': [],
                'launch-winscp': [],
            },
        };
        this.platformDefaults = {};
    }
}

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




/** @hidden */
let SSHSettingsTabProvider = class SSHSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor() {
        super(...arguments);
        this.id = 'ssh';
        this.icon = 'globe';
        this.title = 'SSH';
    }
    getComponentType() {
        return SSHSettingsTabComponent;
    }
};
SSHSettingsTabProvider = __decorate([
    (0,core_.Injectable)()
], SSHSettingsTabProvider);


;// 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:ssh-tab';
        });
    }
    recover(recoveryToken) {
        return __awaiter(this, void 0, void 0, function* () {
            return {
                type: SSHTabComponent,
                inputs: {
                    profile: recoveryToken['profile'],
                    savedState: recoveryToken['savedState'],
                },
            };
        });
    }
};
RecoveryProvider = __decorate([
    (0,core_.Injectable)()
], RecoveryProvider);


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



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


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





/** @hidden */
let SFTPContextMenu = class SFTPContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(hostApp, ssh, translate) {
        super();
        this.hostApp = hostApp;
        this.ssh = ssh;
        this.translate = translate;
        this.weight = 10;
    }
    getItems(tab) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!(tab instanceof SSHTabComponent)) {
                return [];
            }
            const items = [{
                    label: this.translate.instant('Open SFTP panel'),
                    click: () => {
                        tab.openSFTP();
                    },
                }];
            if (this.hostApp.platform === external_tabby_core_.Platform.Windows && this.ssh.getWinSCPPath()) {
                items.push({
                    label: this.translate.instant('Launch WinSCP'),
                    click: () => {
                        this.ssh.launchWinSCP(tab.sshSession);
                    },
                });
            }
            return items;
        });
    }
};
SFTPContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.HostAppService },
    { type: SSHService },
    { type: external_tabby_core_.TranslateService }
];
SFTPContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.HostAppService,
        SSHService,
        external_tabby_core_.TranslateService])
], SFTPContextMenu);


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









let SSHProfilesService = class SSHProfilesService extends external_tabby_core_.QuickConnectProfileProvider {
    constructor(passwordStorage, translate, injector) {
        super();
        this.passwordStorage = passwordStorage;
        this.translate = translate;
        this.injector = injector;
        this.id = 'ssh';
        this.name = 'SSH';
        this.settingsComponent = SSHProfileSettingsComponent;
        this.configDefaults = {
            options: {
                host: null,
                port: 22,
                user: 'root',
                auth: null,
                password: null,
                privateKeys: [],
                keepaliveInterval: null,
                keepaliveCountMax: 10,
                readyTimeout: null,
                x11: false,
                skipBanner: false,
                jumpHost: null,
                agentForward: false,
                warnOnClose: null,
                algorithms: {
                    hmac: [],
                    kex: [],
                    cipher: [],
                    serverHostKey: [],
                },
                proxyCommand: null,
                forwardedPorts: [],
                scripts: [],
                socksProxyHost: null,
                socksProxyPort: null,
                httpProxyHost: null,
                httpProxyPort: null,
                reuseSession: true,
                input: { backspace: 'backspace' },
            },
            clearServiceMessagesOnConnect: true,
        };
        for (const k of Object.values(SSHAlgorithmType)) {
            this.configDefaults.options.algorithms[k] = [...defaultAlgorithms[k]];
            if (k !== SSHAlgorithmType.COMPRESSION) {
                this.configDefaults.options.algorithms[k].sort();
            }
        }
    }
    getBuiltinProfiles() {
        return __awaiter(this, void 0, void 0, function* () {
            const importers = this.injector.get(SSHProfileImporter, [], core_.InjectFlags.Optional);
            let imported = [];
            for (const importer of importers) {
                try {
                    imported = imported.concat(yield importer.getProfiles());
                }
                catch (e) {
                    console.warn('Could not import SSH profiles:', e);
                }
            }
            return [
                {
                    id: `ssh:template`,
                    type: 'ssh',
                    name: this.translate.instant('SSH connection'),
                    icon: 'fas fa-desktop',
                    options: {
                        host: '',
                        port: 22,
                        user: 'root',
                    },
                    isBuiltin: true,
                    isTemplate: true,
                    weight: -1,
                },
                ...imported.map(p => (Object.assign(Object.assign({}, p), { isBuiltin: true }))),
            ];
        });
    }
    getNewTabParameters(profile) {
        return __awaiter(this, void 0, void 0, function* () {
            return {
                type: SSHTabComponent,
                inputs: { profile },
            };
        });
    }
    getSuggestedName(profile) {
        return `${profile.options.user}@${profile.options.host}:${profile.options.port}`;
    }
    getDescription(profile) {
        var _a, _b;
        return (_b = (_a = profile.options) === null || _a === void 0 ? void 0 : _a.host) !== null && _b !== void 0 ? _b : '';
    }
    deleteProfile(profile) {
        this.passwordStorage.deletePassword(profile);
    }
    quickConnect(query) {
        let user = undefined;
        let host = query;
        let port = 22;
        if (host.includes('@')) {
            const parts = host.split(/@/g);
            host = parts[parts.length - 1];
            user = parts.slice(0, parts.length - 1).join('@');
        }
        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: 'ssh',
            options: {
                host,
                user,
                port,
            },
        };
    }
    intoQuickConnectString(profile) {
        let s = profile.options.host;
        if (profile.options.user !== 'root') {
            s = `${profile.options.user}@${s}`;
        }
        if (profile.options.port !== 22) {
            s = `${s}:${profile.options.port}`;
        }
        return s;
    }
};
SSHProfilesService.ctorParameters = () => [
    { type: PasswordStorageService },
    { type: external_tabby_core_.TranslateService },
    { type: core_.Injector }
];
SSHProfilesService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [PasswordStorageService,
        external_tabby_core_.TranslateService,
        core_.Injector])
], SSHProfilesService);


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






/** @hidden */
let CommonSFTPContextMenu = class CommonSFTPContextMenu extends SFTPContextMenuItemProvider {
    constructor(platform, ngbModal, translate, hostApp) {
        super();
        this.platform = platform;
        this.ngbModal = ngbModal;
        this.translate = translate;
        this.hostApp = hostApp;
        this.weight = 10;
    }
    getItems(item, panel) {
        return __awaiter(this, void 0, void 0, function* () {
            const items = [
                {
                    click: () => __awaiter(this, void 0, void 0, function* () {
                        yield panel.openCreateDirectoryModal();
                    }),
                    label: this.translate.instant('Create directory'),
                },
            ];
            // Add download folder option for directories (only in electron)
            if (item.isDirectory && this.hostApp.platform !== external_tabby_core_.Platform.Web) {
                items.push({
                    click: () => panel.downloadFolder(item),
                    label: this.translate.instant('Download directory'),
                });
            }
            items.push({
                click: () => __awaiter(this, void 0, void 0, function* () {
                    if ((yield this.platform.showMessageBox({
                        type: 'warning',
                        message: this.translate.instant('Delete {fullPath}?', item),
                        defaultId: 0,
                        cancelId: 1,
                        buttons: [
                            this.translate.instant('Delete'),
                            this.translate.instant('Cancel'),
                        ],
                    })).response === 0) {
                        yield this.deleteItem(item, panel.sftp);
                        panel.navigate(panel.path);
                    }
                }),
                label: this.translate.instant('Delete'),
            });
            return items;
        });
    }
    deleteItem(item, session) {
        return __awaiter(this, void 0, void 0, function* () {
            const modal = this.ngbModal.open(SFTPDeleteModalComponent);
            modal.componentInstance.item = item;
            modal.componentInstance.sftp = session;
            yield modal.result.catch(() => null);
        });
    }
};
CommonSFTPContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.PlatformService },
    { type: ng_bootstrap_.NgbModal },
    { type: external_tabby_core_.TranslateService },
    { type: external_tabby_core_.HostAppService }
];
CommonSFTPContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.PlatformService,
        ng_bootstrap_.NgbModal,
        external_tabby_core_.TranslateService,
        external_tabby_core_.HostAppService])
], CommonSFTPContextMenu);


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




























/** @hidden */
let SSHModule = class SSHModule {
};
SSHModule = __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: SSHConfigProvider, multi: true },
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: SSHSettingsTabProvider, multi: true },
            { provide: external_tabby_core_.TabRecoveryProvider, useClass: RecoveryProvider, multi: true },
            { provide: external_tabby_core_.HotkeyProvider, useClass: SSHHotkeyProvider, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: SFTPContextMenu, multi: true },
            { provide: external_tabby_core_.ProfileProvider, useExisting: SSHProfilesService, multi: true },
            { provide: SFTPContextMenuItemProvider, useClass: CommonSFTPContextMenu, multi: true },
        ],
        declarations: [
            SSHProfileSettingsComponent,
            SFTPDeleteModalComponent,
            SFTPCreateDirectoryModalComponent,
            SSHPortForwardingModalComponent,
            SSHPortForwardingConfigComponent,
            SSHSettingsTabComponent,
            SSHTabComponent,
            SFTPPanelComponent,
            KeyboardInteractiveAuthComponent,
            HostKeyPromptModalComponent,
        ],
    })
    // eslint-disable-next-line @typescript-eslint/no-extraneous-class
], SSHModule);
/* harmony default export */ const src = (SSHModule);





})();

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