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

/***/ 872:
/*!************************************************************!*\
  !*** ./src/components/serialTab.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!./serialTab.component.scss?ngResource */ 367);

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

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

/***/ }),

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

/***/ }),

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

/***/ }),

/***/ 419:
/*!************************************************************!*\
  !*** ../app/node_modules/@serialport/stream/dist/index.js ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";


var __importDefault = this && this.__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SerialPortStream = exports.DisconnectedError = void 0;
const stream_1 = __webpack_require__(/*! stream */ 978);
const debug_1 = __importDefault(__webpack_require__(/*! debug */ 866));
const debug = (0, debug_1.default)('serialport/stream');
class DisconnectedError extends Error {
  constructor(message) {
    super(message);
    this.disconnected = true;
  }
}
exports.DisconnectedError = DisconnectedError;
const defaultSetFlags = {
  brk: false,
  cts: false,
  dtr: true,
  rts: true
};
function allocNewReadPool(poolSize) {
  const pool = Buffer.allocUnsafe(poolSize);
  pool.used = 0;
  return pool;
}
class SerialPortStream extends stream_1.Duplex {
  /**
   * Create a new serial port object for the `path`. In the case of invalid arguments or invalid options, when constructing a new SerialPort it will throw an error. The port will open automatically by default, which is the equivalent of calling `port.open(openCallback)` in the next tick. You can disable this by setting the option `autoOpen` to `false`.
   * @emits open
   * @emits data
   * @emits close
   * @emits error
   */
  constructor(options, openCallback) {
    const settings = {
      autoOpen: true,
      endOnClose: false,
      highWaterMark: 64 * 1024,
      ...options
    };
    super({
      highWaterMark: settings.highWaterMark
    });
    if (!settings.binding) {
      throw new TypeError('"Bindings" is invalid pass it as `options.binding`');
    }
    if (!settings.path) {
      throw new TypeError(`"path" is not defined: ${settings.path}`);
    }
    if (typeof settings.baudRate !== 'number') {
      throw new TypeError(`"baudRate" must be a number: ${settings.baudRate}`);
    }
    this.settings = settings;
    this.opening = false;
    this.closing = false;
    this._pool = allocNewReadPool(this.settings.highWaterMark);
    this._kMinPoolSpace = 128;
    if (this.settings.autoOpen) {
      this.open(openCallback);
    }
  }
  get path() {
    return this.settings.path;
  }
  get baudRate() {
    return this.settings.baudRate;
  }
  get isOpen() {
    return (this.port?.isOpen ?? false) && !this.closing;
  }
  _error(error, callback) {
    if (callback) {
      callback.call(this, error);
    } else {
      this.emit('error', error);
    }
  }
  _asyncError(error, callback) {
    process.nextTick(() => this._error(error, callback));
  }
  /**
   * Opens a connection to the given serial port.
   * @param {ErrorCallback=} openCallback - Called after a connection is opened. If this is not provided and an error occurs, it will be emitted on the port's `error` event.
   * @emits open
   */
  open(openCallback) {
    if (this.isOpen) {
      return this._asyncError(new Error('Port is already open'), openCallback);
    }
    if (this.opening) {
      return this._asyncError(new Error('Port is opening'), openCallback);
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    const {
      highWaterMark,
      binding,
      autoOpen,
      endOnClose,
      ...openOptions
    } = this.settings;
    this.opening = true;
    debug('opening', `path: ${this.path}`);
    this.settings.binding.open(openOptions).then(port => {
      debug('opened', `path: ${this.path}`);
      this.port = port;
      this.opening = false;
      this.emit('open');
      if (openCallback) {
        openCallback.call(this, null);
      }
    }, err => {
      this.opening = false;
      debug('Binding #open had an error', err);
      this._error(err, openCallback);
    });
  }
  /**
   * Changes the baud rate for an open port. Emits an error or calls the callback if the baud rate isn't supported.
   * @param {object=} options Only supports `baudRate`.
   * @param {number=} [options.baudRate] The baud rate of the port to be opened. This should match one of the commonly available baud rates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200. Custom rates are supported best effort per platform. The device connected to the serial port is not guaranteed to support the requested baud rate, even if the port itself supports that baud rate.
   * @param {ErrorCallback=} [callback] Called once the port's baud rate changes. If `.update` is called without a callback, and there is an error, an error event is emitted.
   * @returns {undefined}
   */
  update(options, callback) {
    if (!this.isOpen || !this.port) {
      debug('update attempted, but port is not open');
      return this._asyncError(new Error('Port is not open'), callback);
    }
    debug('update', `baudRate: ${options.baudRate}`);
    this.port.update(options).then(() => {
      debug('binding.update', 'finished');
      this.settings.baudRate = options.baudRate;
      if (callback) {
        callback.call(this, null);
      }
    }, err => {
      debug('binding.update', 'error', err);
      return this._error(err, callback);
    });
  }
  write(data, encoding, callback) {
    if (Array.isArray(data)) {
      data = Buffer.from(data);
    }
    if (typeof encoding === 'function') {
      return super.write(data, encoding);
    }
    return super.write(data, encoding, callback);
  }
  _write(data, encoding, callback) {
    if (!this.isOpen || !this.port) {
      this.once('open', () => {
        this._write(data, encoding, callback);
      });
      return;
    }
    debug('_write', `${data.length} bytes of data`);
    this.port.write(data).then(() => {
      debug('binding.write', 'write finished');
      callback(null);
    }, err => {
      debug('binding.write', 'error', err);
      if (!err.canceled) {
        this._disconnected(err);
      }
      callback(err);
    });
  }
  _writev(data, callback) {
    debug('_writev', `${data.length} chunks of data`);
    const dataV = data.map(write => write.chunk);
    this._write(Buffer.concat(dataV), undefined, callback);
  }
  _read(bytesToRead) {
    if (!this.isOpen || !this.port) {
      debug('_read', 'queueing _read for after open');
      this.once('open', () => {
        this._read(bytesToRead);
      });
      return;
    }
    if (!this._pool || this._pool.length - this._pool.used < this._kMinPoolSpace) {
      debug('_read', 'discarding the read buffer pool because it is below kMinPoolSpace');
      this._pool = allocNewReadPool(this.settings.highWaterMark);
    }
    // Grab another reference to the pool in the case that while we're
    // in the thread pool another read() finishes up the pool, and
    // allocates a new one.
    const pool = this._pool;
    // Read the smaller of rest of the pool or however many bytes we want
    const toRead = Math.min(pool.length - pool.used, bytesToRead);
    const start = pool.used;
    // the actual read.
    debug('_read', `reading`, {
      start,
      toRead
    });
    this.port.read(pool, start, toRead).then(({
      bytesRead
    }) => {
      debug('binding.read', `finished`, {
        bytesRead
      });
      // zero bytes means read means we've hit EOF? Maybe this should be an error
      if (bytesRead === 0) {
        debug('binding.read', 'Zero bytes read closing readable stream');
        this.push(null);
        return;
      }
      pool.used += bytesRead;
      this.push(pool.slice(start, start + bytesRead));
    }, err => {
      debug('binding.read', `error`, err);
      if (!err.canceled) {
        this._disconnected(err);
      }
      this._read(bytesToRead); // prime to read more once we're reconnected
    });
  }

  _disconnected(err) {
    if (!this.isOpen) {
      debug('disconnected aborted because already closed', err);
      return;
    }
    debug('disconnected', err);
    this.close(undefined, new DisconnectedError(err.message));
  }
  /**
   * Closes an open connection.
   *
   * If there are in progress writes when the port is closed the writes will error.
   * @param {ErrorCallback} callback Called once a connection is closed.
   * @param {Error} disconnectError used internally to propagate a disconnect error
   */
  close(callback, disconnectError = null) {
    if (!this.isOpen || !this.port) {
      debug('close attempted, but port is not open');
      return this._asyncError(new Error('Port is not open'), callback);
    }
    this.closing = true;
    debug('#close');
    this.port.close().then(() => {
      this.closing = false;
      debug('binding.close', 'finished');
      this.emit('close', disconnectError);
      if (this.settings.endOnClose) {
        this.emit('end');
      }
      if (callback) {
        callback.call(this, disconnectError);
      }
    }, err => {
      this.closing = false;
      debug('binding.close', 'had an error', err);
      return this._error(err, callback);
    });
  }
  /**
   * Set control flags on an open port. Uses [`SetCommMask`](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363257(v=vs.85).aspx) for Windows and [`ioctl`](http://linux.die.net/man/4/tty_ioctl) for OS X and Linux.
   *
   * All options are operating system default when the port is opened. Every flag is set on each call to the provided or default values. If options isn't provided default options is used.
   */
  set(options, callback) {
    if (!this.isOpen || !this.port) {
      debug('set attempted, but port is not open');
      return this._asyncError(new Error('Port is not open'), callback);
    }
    const settings = {
      ...defaultSetFlags,
      ...options
    };
    debug('#set', settings);
    this.port.set(settings).then(() => {
      debug('binding.set', 'finished');
      if (callback) {
        callback.call(this, null);
      }
    }, err => {
      debug('binding.set', 'had an error', err);
      return this._error(err, callback);
    });
  }
  /**
   * Returns the control flags (CTS, DSR, DCD) on the open port.
   * Uses [`GetCommModemStatus`](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363258(v=vs.85).aspx) for Windows and [`ioctl`](http://linux.die.net/man/4/tty_ioctl) for mac and linux.
   */
  get(callback) {
    if (!this.isOpen || !this.port) {
      debug('get attempted, but port is not open');
      return this._asyncError(new Error('Port is not open'), callback);
    }
    debug('#get');
    this.port.get().then(status => {
      debug('binding.get', 'finished');
      callback.call(this, null, status);
    }, err => {
      debug('binding.get', 'had an error', err);
      return this._error(err, callback);
    });
  }
  /**
   * Flush discards data received but not read, and written but not transmitted by the operating system. For more technical details, see [`tcflush(fd, TCIOFLUSH)`](http://linux.die.net/man/3/tcflush) for Mac/Linux and [`FlushFileBuffers`](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364439) for Windows.
   */
  flush(callback) {
    if (!this.isOpen || !this.port) {
      debug('flush attempted, but port is not open');
      return this._asyncError(new Error('Port is not open'), callback);
    }
    debug('#flush');
    this.port.flush().then(() => {
      debug('binding.flush', 'finished');
      if (callback) {
        callback.call(this, null);
      }
    }, err => {
      debug('binding.flush', 'had an error', err);
      return this._error(err, callback);
    });
  }
  /**
   * Waits until all output data is transmitted to the serial port. After any pending write has completed it calls [`tcdrain()`](http://linux.die.net/man/3/tcdrain) or [FlushFileBuffers()](https://msdn.microsoft.com/en-us/library/windows/desktop/aa364439(v=vs.85).aspx) to ensure it has been written to the device.
  * @example
  Write the `data` and wait until it has finished transmitting to the target serial port before calling the callback. This will queue until the port is open and writes are finished.
     ```js
  function writeAndDrain (data, callback) {
    port.write(data);
    port.drain(callback);
  }
  ```
  */
  drain(callback) {
    debug('drain');
    if (!this.isOpen || !this.port) {
      debug('drain queuing on port open');
      this.once('open', () => {
        this.drain(callback);
      });
      return;
    }
    this.port.drain().then(() => {
      debug('binding.drain', 'finished');
      if (callback) {
        callback.call(this, null);
      }
    }, err => {
      debug('binding.drain', 'had an error', err);
      return this._error(err, callback);
    });
  }
}
exports.SerialPortStream = SerialPortStream;
/**
 * The `error` event's callback is called with an error object whenever there is an error.
 * @event error
 */
/**
 * The `open` event's callback is called with no arguments when the port is opened and ready for writing. This happens if you have the constructor open immediately (which opens in the next tick) or if you open the port manually with `open()`. See [Useage/Opening a Port](#opening-a-port) for more information.
 * @event open
 */
/**
 * Request a number of bytes from the SerialPort. The `read()` method pulls some data out of the internal buffer and returns it. If no data is available to be read, null is returned. By default, the data is returned as a `Buffer` object unless an encoding has been specified using the `.setEncoding()` method.
 * @method SerialPort.prototype.read
 * @param {number=} size Specify how many bytes of data to return, if available
 * @returns {(string|Buffer|null)} The data from internal buffers
 */
/**
 * Listening for the `data` event puts the port in flowing mode. Data is emitted as soon as it's received. Data is a `Buffer` object with a varying amount of data in it. The `readLine` parser converts the data into string lines. See the [parsers](https://serialport.io/docs/api-parsers-overview) section for more information on parsers, and the [Node.js stream documentation](https://nodejs.org/api/stream.html#stream_event_data) for more information on the data event.
 * @event data
 */
/**
 * The `close` event's callback is called with no arguments when the port is closed. In the case of a disconnect it will be called with a Disconnect Error object (`err.disconnected == true`). In the event of a close error (unlikely), an error event is triggered.
 * @event close
 */
/**
 * The `pause()` method causes a stream in flowing mode to stop emitting 'data' events, switching out of flowing mode. Any data that becomes available remains in the internal buffer.
 * @method SerialPort.prototype.pause
 * @see resume
 * @returns `this`
 */
/**
 * The `resume()` method causes an explicitly paused, `Readable` stream to resume emitting 'data' events, switching the stream into flowing mode.
 * @method SerialPort.prototype.resume
 * @see pause
 * @returns `this`
 */

/***/ }),

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

"use strict";


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

/***/ }),

/***/ 866:
/*!************************************************!*\
  !*** ../app/node_modules/debug/src/browser.js ***!
  \************************************************/
/***/ ((module, exports, __webpack_require__) => {

/* eslint-env browser */

/**
 * This is the web browser implementation of `debug()`.
 */

exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
exports.destroy = (() => {
  let warned = false;
  return () => {
    if (!warned) {
      warned = true;
      console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
    }
  };
})();

/**
 * Colors.
 */

exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];

/**
 * Currently only WebKit-based Web Inspectors, Firefox >= v31,
 * and the Firebug extension (any Firefox version) are known
 * to support "%c" CSS customizations.
 *
 * TODO: add a `localStorage` variable to explicitly enable/disable colors
 */

// eslint-disable-next-line complexity
function useColors() {
  // NB: In an Electron preload script, document will be defined but not fully
  // initialized. Since we know we're in Chrome, we'll just detect this case
  // explicitly
  if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
    return true;
  }

  // Internet Explorer and Edge do not support colors.
  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
    return false;
  }

  // Is webkit? http://stackoverflow.com/a/16459606/376773
  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
  return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||
  // Is firebug? http://stackoverflow.com/a/398120/376773
  typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) ||
  // Is firefox >= v31?
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
  typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 ||
  // Double check webkit in userAgent just in case we are in a worker
  typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}

/**
 * Colorize log arguments if enabled.
 *
 * @api public
 */

function formatArgs(args) {
  args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
  if (!this.useColors) {
    return;
  }
  const c = 'color: ' + this.color;
  args.splice(1, 0, c, 'color: inherit');

  // The final "%c" is somewhat tricky, because there could be other
  // arguments passed either before or after the %c, so we need to
  // figure out the correct index to insert the CSS into
  let index = 0;
  let lastC = 0;
  args[0].replace(/%[a-zA-Z%]/g, match => {
    if (match === '%%') {
      return;
    }
    index++;
    if (match === '%c') {
      // We only are interested in the *last* %c
      // (the user may have provided their own)
      lastC = index;
    }
  });
  args.splice(lastC, 0, c);
}

/**
 * Invokes `console.debug()` when available.
 * No-op when `console.debug` is not a "function".
 * If `console.debug` is not available, falls back
 * to `console.log`.
 *
 * @api public
 */
exports.log = console.debug || console.log || (() => {});

/**
 * Save `namespaces`.
 *
 * @param {String} namespaces
 * @api private
 */
function save(namespaces) {
  try {
    if (namespaces) {
      exports.storage.setItem('debug', namespaces);
    } else {
      exports.storage.removeItem('debug');
    }
  } catch (error) {
    // Swallow
    // XXX (@Qix-) should we be logging these?
  }
}

/**
 * Load `namespaces`.
 *
 * @return {String} returns the previously persisted debug modes
 * @api private
 */
function load() {
  let r;
  try {
    r = exports.storage.getItem('debug');
  } catch (error) {
    // Swallow
    // XXX (@Qix-) should we be logging these?
  }

  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
  if (!r && typeof process !== 'undefined' && 'env' in process) {
    r = process.env.DEBUG;
  }
  return r;
}

/**
 * Localstorage attempts to return the localstorage.
 *
 * This is necessary because safari throws
 * when a user disables cookies/localstorage
 * and you attempt to access it.
 *
 * @return {LocalStorage}
 * @api private
 */

function localstorage() {
  try {
    // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
    // The Browser also has localStorage in the global context.
    return localStorage;
  } catch (error) {
    // Swallow
    // XXX (@Qix-) should we be logging these?
  }
}
module.exports = __webpack_require__(/*! ./common */ 857)(exports);
const {
  formatters
} = module.exports;

/**
 * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
 */

formatters.j = function (v) {
  try {
    return JSON.stringify(v);
  } catch (error) {
    return '[UnexpectedJSONParseError]: ' + error.message;
  }
};

/***/ }),

/***/ 857:
/*!***********************************************!*\
  !*** ../app/node_modules/debug/src/common.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/**
 * This is the common logic for both the Node.js and web browser
 * implementations of `debug()`.
 */

function setup(env) {
  createDebug.debug = createDebug;
  createDebug.default = createDebug;
  createDebug.coerce = coerce;
  createDebug.disable = disable;
  createDebug.enable = enable;
  createDebug.enabled = enabled;
  createDebug.humanize = __webpack_require__(/*! ms */ 37);
  createDebug.destroy = destroy;
  Object.keys(env).forEach(key => {
    createDebug[key] = env[key];
  });

  /**
  * The currently active debug mode names, and names to skip.
  */

  createDebug.names = [];
  createDebug.skips = [];

  /**
  * Map of special "%n" handling functions, for the debug "format" argument.
  *
  * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
  */
  createDebug.formatters = {};

  /**
  * Selects a color for a debug namespace
  * @param {String} namespace The namespace string for the debug instance to be colored
  * @return {Number|String} An ANSI color code for the given namespace
  * @api private
  */
  function selectColor(namespace) {
    let hash = 0;
    for (let i = 0; i < namespace.length; i++) {
      hash = (hash << 5) - hash + namespace.charCodeAt(i);
      hash |= 0; // Convert to 32bit integer
    }

    return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  }
  createDebug.selectColor = selectColor;

  /**
  * Create a debugger with the given `namespace`.
  *
  * @param {String} namespace
  * @return {Function}
  * @api public
  */
  function createDebug(namespace) {
    let prevTime;
    let enableOverride = null;
    let namespacesCache;
    let enabledCache;
    function debug(...args) {
      // Disabled?
      if (!debug.enabled) {
        return;
      }
      const self = debug;

      // Set `diff` timestamp
      const curr = Number(new Date());
      const ms = curr - (prevTime || curr);
      self.diff = ms;
      self.prev = prevTime;
      self.curr = curr;
      prevTime = curr;
      args[0] = createDebug.coerce(args[0]);
      if (typeof args[0] !== 'string') {
        // Anything else let's inspect with %O
        args.unshift('%O');
      }

      // Apply any `formatters` transformations
      let index = 0;
      args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
        // If we encounter an escaped % then don't increase the array index
        if (match === '%%') {
          return '%';
        }
        index++;
        const formatter = createDebug.formatters[format];
        if (typeof formatter === 'function') {
          const val = args[index];
          match = formatter.call(self, val);

          // Now we need to remove `args[index]` since it's inlined in the `format`
          args.splice(index, 1);
          index--;
        }
        return match;
      });

      // Apply env-specific formatting (colors, etc.)
      createDebug.formatArgs.call(self, args);
      const logFn = self.log || createDebug.log;
      logFn.apply(self, args);
    }
    debug.namespace = namespace;
    debug.useColors = createDebug.useColors();
    debug.color = createDebug.selectColor(namespace);
    debug.extend = extend;
    debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.

    Object.defineProperty(debug, 'enabled', {
      enumerable: true,
      configurable: false,
      get: () => {
        if (enableOverride !== null) {
          return enableOverride;
        }
        if (namespacesCache !== createDebug.namespaces) {
          namespacesCache = createDebug.namespaces;
          enabledCache = createDebug.enabled(namespace);
        }
        return enabledCache;
      },
      set: v => {
        enableOverride = v;
      }
    });

    // Env-specific initialization logic for debug instances
    if (typeof createDebug.init === 'function') {
      createDebug.init(debug);
    }
    return debug;
  }
  function extend(namespace, delimiter) {
    const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
    newDebug.log = this.log;
    return newDebug;
  }

  /**
  * Enables a debug mode by namespaces. This can include modes
  * separated by a colon and wildcards.
  *
  * @param {String} namespaces
  * @api public
  */
  function enable(namespaces) {
    createDebug.save(namespaces);
    createDebug.namespaces = namespaces;
    createDebug.names = [];
    createDebug.skips = [];
    let i;
    const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
    const len = split.length;
    for (i = 0; i < len; i++) {
      if (!split[i]) {
        // ignore empty strings
        continue;
      }
      namespaces = split[i].replace(/\*/g, '.*?');
      if (namespaces[0] === '-') {
        createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
      } else {
        createDebug.names.push(new RegExp('^' + namespaces + '$'));
      }
    }
  }

  /**
  * Disable debug output.
  *
  * @return {String} namespaces
  * @api public
  */
  function disable() {
    const namespaces = [...createDebug.names.map(toNamespace), ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)].join(',');
    createDebug.enable('');
    return namespaces;
  }

  /**
  * Returns true if the given mode name is enabled, false otherwise.
  *
  * @param {String} name
  * @return {Boolean}
  * @api public
  */
  function enabled(name) {
    if (name[name.length - 1] === '*') {
      return true;
    }
    let i;
    let len;
    for (i = 0, len = createDebug.skips.length; i < len; i++) {
      if (createDebug.skips[i].test(name)) {
        return false;
      }
    }
    for (i = 0, len = createDebug.names.length; i < len; i++) {
      if (createDebug.names[i].test(name)) {
        return true;
      }
    }
    return false;
  }

  /**
  * Convert regexp to namespace
  *
  * @param {RegExp} regxep
  * @return {String} namespace
  * @api private
  */
  function toNamespace(regexp) {
    return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
  }

  /**
  * Coerce `val`.
  *
  * @param {Mixed} val
  * @return {Mixed}
  * @api private
  */
  function coerce(val) {
    if (val instanceof Error) {
      return val.stack || val.message;
    }
    return val;
  }

  /**
  * XXX DO NOT USE. This is a temporary stub function.
  * XXX It WILL be removed in the next major release.
  */
  function destroy() {
    console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
  }
  createDebug.enable(createDebug.load());
  return createDebug;
}
module.exports = setup;

/***/ }),

/***/ 37:
/*!***************************************!*\
  !*** ../app/node_modules/ms/index.js ***!
  \***************************************/
/***/ ((module) => {

/**
 * Helpers.
 */

var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
var w = d * 7;
var y = d * 365.25;

/**
 * Parse or format the given `val`.
 *
 * Options:
 *
 *  - `long` verbose formatting [false]
 *
 * @param {String|Number} val
 * @param {Object} [options]
 * @throws {Error} throw an error if val is not a non-empty string or a number
 * @return {String|Number}
 * @api public
 */

module.exports = function (val, options) {
  options = options || {};
  var type = typeof val;
  if (type === 'string' && val.length > 0) {
    return parse(val);
  } else if (type === 'number' && isFinite(val)) {
    return options.long ? fmtLong(val) : fmtShort(val);
  }
  throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
};

/**
 * Parse the given `str` and return milliseconds.
 *
 * @param {String} str
 * @return {Number}
 * @api private
 */

function parse(str) {
  str = String(str);
  if (str.length > 100) {
    return;
  }
  var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
  if (!match) {
    return;
  }
  var n = parseFloat(match[1]);
  var type = (match[2] || 'ms').toLowerCase();
  switch (type) {
    case 'years':
    case 'year':
    case 'yrs':
    case 'yr':
    case 'y':
      return n * y;
    case 'weeks':
    case 'week':
    case 'w':
      return n * w;
    case 'days':
    case 'day':
    case 'd':
      return n * d;
    case 'hours':
    case 'hour':
    case 'hrs':
    case 'hr':
    case 'h':
      return n * h;
    case 'minutes':
    case 'minute':
    case 'mins':
    case 'min':
    case 'm':
      return n * m;
    case 'seconds':
    case 'second':
    case 'secs':
    case 'sec':
    case 's':
      return n * s;
    case 'milliseconds':
    case 'millisecond':
    case 'msecs':
    case 'msec':
    case 'ms':
      return n;
    default:
      return undefined;
  }
}

/**
 * Short format for `ms`.
 *
 * @param {Number} ms
 * @return {String}
 * @api private
 */

function fmtShort(ms) {
  var msAbs = Math.abs(ms);
  if (msAbs >= d) {
    return Math.round(ms / d) + 'd';
  }
  if (msAbs >= h) {
    return Math.round(ms / h) + 'h';
  }
  if (msAbs >= m) {
    return Math.round(ms / m) + 'm';
  }
  if (msAbs >= s) {
    return Math.round(ms / s) + 's';
  }
  return ms + 'ms';
}

/**
 * Long format for `ms`.
 *
 * @param {Number} ms
 * @return {String}
 * @api private
 */

function fmtLong(ms) {
  var msAbs = Math.abs(ms);
  if (msAbs >= d) {
    return plural(ms, msAbs, d, 'day');
  }
  if (msAbs >= h) {
    return plural(ms, msAbs, h, 'hour');
  }
  if (msAbs >= m) {
    return plural(ms, msAbs, m, 'minute');
  }
  if (msAbs >= s) {
    return plural(ms, msAbs, s, 'second');
  }
  return ms + ' ms';
}

/**
 * Pluralization helper.
 */

function plural(ms, msAbs, n, name) {
  var isPlural = msAbs >= n * 1.5;
  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}

/***/ }),

/***/ 329:
/*!*******************************************************************************!*\
  !*** ../app/node_modules/serialport-binding-webserialapi/dist/wsa-sp-bind.js ***!
  \*******************************************************************************/
/***/ (function(module) {

!function (e, t) {
   true ? module.exports = t() : 0;
}(this, function () {
  return (() => {
    var e = {
        573: (e, t, n) => {
          const r = n(227)("serialport/binding-abstract");
          e.exports = class {
            static async list() {
              r("list");
            }
            constructor(e = {}) {
              if ("object" != typeof e) throw new TypeError('"options" is not an object');
            }
            async open(e, t) {
              if (!e) throw new TypeError('"path" is not a valid port');
              if ("object" != typeof t) throw new TypeError('"options" is not an object');
              if (r("open"), this.isOpen) throw new Error("Already open");
            }
            async close() {
              if (r("close"), !this.isOpen) throw new Error("Port is not open");
            }
            async read(e, t, n) {
              if (!Buffer.isBuffer(e)) throw new TypeError('"buffer" is not a Buffer');
              if ("number" != typeof t || isNaN(t)) throw new TypeError(`"offset" is not an integer got "${isNaN(t) ? "NaN" : typeof t}"`);
              if ("number" != typeof n || isNaN(n)) throw new TypeError(`"length" is not an integer got "${isNaN(n) ? "NaN" : typeof n}"`);
              if (r("read"), e.length < t + n) throw new Error("buffer is too small");
              if (!this.isOpen) throw new Error("Port is not open");
            }
            async write(e) {
              if (!Buffer.isBuffer(e)) throw new TypeError('"buffer" is not a Buffer');
              if (r("write", e.length, "bytes"), !this.isOpen) throw r("write", "error port is not open"), new Error("Port is not open");
            }
            async update(e) {
              if ("object" != typeof e) throw TypeError('"options" is not an object');
              if ("number" != typeof e.baudRate) throw new TypeError('"options.baudRate" is not a number');
              if (r("update"), !this.isOpen) throw new Error("Port is not open");
            }
            async set(e) {
              if ("object" != typeof e) throw new TypeError('"options" is not an object');
              if (r("set"), !this.isOpen) throw new Error("Port is not open");
            }
            async get() {
              if (r("get"), !this.isOpen) throw new Error("Port is not open");
            }
            async getBaudRate() {
              if (r("getbaudRate"), !this.isOpen) throw new Error("Port is not open");
            }
            async flush() {
              if (r("flush"), !this.isOpen) throw new Error("Port is not open");
            }
            async drain() {
              if (r("drain"), !this.isOpen) throw new Error("Port is not open");
            }
          };
        },
        321: (e, t, n) => {
          "use strict";

          n.r(t), n.d(t, {
            default: () => s
          });
          var r = n(573),
            o = n.n(r);
          class s extends o() {
            constructor(e) {
              super(e), this.storedOpenOptions = {
                baudRate: 115200,
                dataBits: 8,
                stopBits: 1,
                parity: "none",
                rtscts: !1
              }, this.boundedPort = void 0, this.actualBaudRate = -1, this.classReader = void 0, this.pendingRead = void 0, this.isOpen = !1, Object.assign(this.storedOpenOptions, e);
            }
            static list() {
              return new Promise((e, t) => {
                s.backendAvailable ? s.updatePortsList().then(() => {
                  e(s.internalBasePortsList.map(s.mapBasePortToPortInfo));
                }) : t();
              });
            }
            static internalLog(e) {
              s.debug && console.log("%c WSA Log: " + e, "background: #222; color: #bada55");
            }
            static dec2hex16bitWithPad(e) {
              return (e + 65536).toString(16).substr(-4).toUpperCase();
            }
            static mapBasePortToPath(e) {
              const t = e.getInfo();
              return "wsa://" + s.dec2hex16bitWithPad(t.usbVendorId) + "-" + s.dec2hex16bitWithPad(t.usbProductId);
            }
            static mapBasePortToPortInfo(e) {
              const t = e.getInfo();
              return {
                path: s.mapBasePortToPath(e),
                productId: t.usbProductId,
                vendorId: t.usbVendorId
              };
            }
            static updatePortsList() {
              return s.internalNavigatorSerial.getPorts().then(e => e.length > 0 ? new Promise(t => {
                s.internalBasePortsList = e, t(null);
              }) : 0 == s.internalBasePortsList.length ? s.internalNavigatorSerial.requestPort({
                filters: s.portFilters
              }).then(e => (s.internalBasePortsList = [e], new Promise(e => {
                e(null);
              }))) : new Promise(e => {
                e(null);
              }));
            }
            static mapOpenOptions(e) {
              return {
                baudRate: e.baudRate,
                dataBits: e.dataBits,
                stopBits: e.stopBits,
                parity: e.parity,
                bufferSize: s.internalBufferSize,
                flowControl: e.rtscts ? "hardware" : "none"
              };
            }
            open(e, t) {
              return s.internalLog("open called, path: " + e), this.classReader = void 0, super.open(e, t).then(() => s.updatePortsList().then(() => {
                for (const n of s.internalBasePortsList) {
                  const r = s.mapBasePortToPath(n);
                  if (s.internalLog("Checking " + r), r == e || "wsa://default" == e) {
                    this.boundedPort = n;
                    const e = this.storedOpenOptions;
                    return Object.assign(e, t), this.boundedPort.open(s.mapOpenOptions(e)).then(() => (s.internalLog("Open successful"), this.isOpen = !0, new Promise(e => {
                      s.internalLog("Open resolved"), e(null);
                    })), e => (this.isOpen = !1, s.internalLog("Open failed"), new Promise(t => {
                      s.internalLog("Open rejected with " + e), t(null);
                    })));
                  }
                }
              }));
            }
            closePromise() {
              return this.boundedPort.close().then(() => new Promise(e => {
                this.isOpen = !1, e(null);
              }));
            }
            close() {
              return s.internalLog("close called"), super.close().then(() => {
                if (!this.classReader) return this.closePromise();
                this.classReader.cancel().then(() => (this.classReader.releaseLock(), this.closePromise()));
              });
            }
            write(e) {
              s.internalLog("write called");
              const t = this.boundedPort.writable.getWriter();
              return super.write(e).then(() => t.write(e).then(() => new Promise(e => {
                s.internalLog("Write system execution completed"), t.releaseLock(), e(null);
              })));
            }
            registerInternalRead() {
              const e = this.classReader.read();
              return this.pendingRead = e, e;
            }
            clearInternalRead() {
              this.pendingRead = void 0;
            }
            read(e, t, n) {
              let r = t,
                o = 0,
                a = 0;
              const i = this;
              s.internalLog("read called, bytes expecting: " + n);
              const l = super.read(e, t, n);
              return this.boundedPort.readable ? (void 0 === this.classReader && (this.classReader = this.boundedPort.readable.getReader()), l.then(() => new Promise((t, n) => {
                this.isOpen ? (s.internalLog("Read system execution initiated " + a), i.registerInternalRead().then(t => {
                  return s.internalLog("Read system execution completed " + a), i.clearInternalRead(), n = t, new Promise(t => {
                    if (s.internalLog("Updating result buffer " + a), n.value) {
                      const i = n.value,
                        l = i.length;
                      s.internalLog("Read bytes: " + l), e.set(i, r), r += l, o += l, a += 1, s.internalLog("No more data, total callbacks: " + a), s.internalLog("Returning bytes : " + o), t({
                        bytesRead: o,
                        buffer: e
                      });
                    } else t({
                      bytesRead: 0,
                      buffer: e
                    });
                  });
                  var n;
                })).then(t, n) : n({
                  canceled: !0
                });
              }))) : l.then(() => new Promise(t => {
                t({
                  bytesRead: 0,
                  buffer: e
                });
              }));
            }
            update(e) {
              return s.internalLog("update called"), super.update(e).then(() => new Promise(e => {
                s.internalLog("update not supported"), e(null);
              }));
            }
            set(e) {
              return s.internalLog("set called"), super.set(e).then(() => this.boundedPort.setSignals({
                dataTerminalReady: e.dtr,
                requestToSend: e.rts,
                break: e.brk
              }));
            }
            get() {
              return s.internalLog("get called"), super.get().then(() => {
                this.boundedPort.getSignals().then(e => new Promise((t, n) => {
                  e ? t({
                    cts: e.clearToSend,
                    dsr: e.dataSetReady,
                    dcd: e.dataCarrierDetect
                  }) : n(null);
                }));
              });
            }
            getBaudRate() {
              return s.internalLog("getBaudRate called"), new Promise(e => {
                e(this.actualBaudRate);
              });
            }
            flush() {
              return s.internalLog("flush called"), super.flush().then(() => new Promise(e => {
                s.internalLog("flush not supported"), e(null);
              }));
            }
            drain() {
              return s.internalLog("drain called"), super.drain().then(() => new Promise(e => {
                s.internalLog("drain not supported"), e(null);
              }));
            }
          }
          s.internalBufferSize = 16384, s.internalNavigatorSerial = navigator.serial, s.backendAvailable = void 0 !== navigator.serial, s.internalBasePortsList = [], s.portFilters = void 0, s.debug = !1;
        },
        227: (e, t, n) => {
          t.formatArgs = function (t) {
            if (t[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + t[0] + (this.useColors ? "%c " : " ") + "+" + e.exports.humanize(this.diff), !this.useColors) return;
            const n = "color: " + this.color;
            t.splice(1, 0, n, "color: inherit");
            let r = 0,
              o = 0;
            t[0].replace(/%[a-zA-Z%]/g, e => {
              "%%" !== e && (r++, "%c" === e && (o = r));
            }), t.splice(o, 0, n);
          }, t.save = function (e) {
            try {
              e ? t.storage.setItem("debug", e) : t.storage.removeItem("debug");
            } catch (e) {}
          }, t.load = function () {
            let e;
            try {
              e = t.storage.getItem("debug");
            } catch (e) {}
            return !e && "undefined" != typeof process && "env" in process && (e = process.env.DEBUG), e;
          }, t.useColors = function () {
            return !("undefined" == typeof window || !window.process || "renderer" !== window.process.type && !window.process.__nwjs) || ("undefined" == typeof navigator || !navigator.userAgent || !navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && ("undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
          }, t.storage = function () {
            try {
              return localStorage;
            } catch (e) {}
          }(), t.destroy = (() => {
            let e = !1;
            return () => {
              e || (e = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
            };
          })(), t.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"], t.log = console.debug || console.log || (() => {}), e.exports = n(447)(t);
          const {
            formatters: r
          } = e.exports;
          r.j = function (e) {
            try {
              return JSON.stringify(e);
            } catch (e) {
              return "[UnexpectedJSONParseError]: " + e.message;
            }
          };
        },
        447: (e, t, n) => {
          e.exports = function (e) {
            function t(e) {
              let n,
                o = null;
              function s(...e) {
                if (!s.enabled) return;
                const r = s,
                  o = Number(new Date()),
                  a = o - (n || o);
                r.diff = a, r.prev = n, r.curr = o, n = o, e[0] = t.coerce(e[0]), "string" != typeof e[0] && e.unshift("%O");
                let i = 0;
                e[0] = e[0].replace(/%([a-zA-Z%])/g, (n, o) => {
                  if ("%%" === n) return "%";
                  i++;
                  const s = t.formatters[o];
                  if ("function" == typeof s) {
                    const t = e[i];
                    n = s.call(r, t), e.splice(i, 1), i--;
                  }
                  return n;
                }), t.formatArgs.call(r, e), (r.log || t.log).apply(r, e);
              }
              return s.namespace = e, s.useColors = t.useColors(), s.color = t.selectColor(e), s.extend = r, s.destroy = t.destroy, Object.defineProperty(s, "enabled", {
                enumerable: !0,
                configurable: !1,
                get: () => null === o ? t.enabled(e) : o,
                set: e => {
                  o = e;
                }
              }), "function" == typeof t.init && t.init(s), s;
            }
            function r(e, n) {
              const r = t(this.namespace + (void 0 === n ? ":" : n) + e);
              return r.log = this.log, r;
            }
            function o(e) {
              return e.toString().substring(2, e.toString().length - 2).replace(/\.\*\?$/, "*");
            }
            return t.debug = t, t.default = t, t.coerce = function (e) {
              return e instanceof Error ? e.stack || e.message : e;
            }, t.disable = function () {
              const e = [...t.names.map(o), ...t.skips.map(o).map(e => "-" + e)].join(",");
              return t.enable(""), e;
            }, t.enable = function (e) {
              let n;
              t.save(e), t.names = [], t.skips = [];
              const r = ("string" == typeof e ? e : "").split(/[\s,]+/),
                o = r.length;
              for (n = 0; n < o; n++) r[n] && ("-" === (e = r[n].replace(/\*/g, ".*?"))[0] ? t.skips.push(new RegExp("^" + e.substr(1) + "$")) : t.names.push(new RegExp("^" + e + "$")));
            }, t.enabled = function (e) {
              if ("*" === e[e.length - 1]) return !0;
              let n, r;
              for (n = 0, r = t.skips.length; n < r; n++) if (t.skips[n].test(e)) return !1;
              for (n = 0, r = t.names.length; n < r; n++) if (t.names[n].test(e)) return !0;
              return !1;
            }, t.humanize = n(824), t.destroy = function () {
              console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
            }, Object.keys(e).forEach(n => {
              t[n] = e[n];
            }), t.names = [], t.skips = [], t.formatters = {}, t.selectColor = function (e) {
              let n = 0;
              for (let t = 0; t < e.length; t++) n = (n << 5) - n + e.charCodeAt(t), n |= 0;
              return t.colors[Math.abs(n) % t.colors.length];
            }, t.enable(t.load()), t;
          };
        },
        824: e => {
          var t = 1e3,
            n = 60 * t,
            r = 60 * n,
            o = 24 * r;
          function s(e, t, n, r) {
            var o = t >= 1.5 * n;
            return Math.round(e / n) + " " + r + (o ? "s" : "");
          }
          e.exports = function (e, a) {
            a = a || {};
            var i,
              l,
              c = typeof e;
            if ("string" === c && e.length > 0) return function (e) {
              if (!((e = String(e)).length > 100)) {
                var s = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);
                if (s) {
                  var a = parseFloat(s[1]);
                  switch ((s[2] || "ms").toLowerCase()) {
                    case "years":
                    case "year":
                    case "yrs":
                    case "yr":
                    case "y":
                      return 315576e5 * a;
                    case "weeks":
                    case "week":
                    case "w":
                      return 6048e5 * a;
                    case "days":
                    case "day":
                    case "d":
                      return a * o;
                    case "hours":
                    case "hour":
                    case "hrs":
                    case "hr":
                    case "h":
                      return a * r;
                    case "minutes":
                    case "minute":
                    case "mins":
                    case "min":
                    case "m":
                      return a * n;
                    case "seconds":
                    case "second":
                    case "secs":
                    case "sec":
                    case "s":
                      return a * t;
                    case "milliseconds":
                    case "millisecond":
                    case "msecs":
                    case "msec":
                    case "ms":
                      return a;
                    default:
                      return;
                  }
                }
              }
            }(e);
            if ("number" === c && isFinite(e)) return a.long ? (i = e, (l = Math.abs(i)) >= o ? s(i, l, o, "day") : l >= r ? s(i, l, r, "hour") : l >= n ? s(i, l, n, "minute") : l >= t ? s(i, l, t, "second") : i + " ms") : function (e) {
              var s = Math.abs(e);
              return s >= o ? Math.round(e / o) + "d" : s >= r ? Math.round(e / r) + "h" : s >= n ? Math.round(e / n) + "m" : s >= t ? Math.round(e / t) + "s" : e + "ms";
            }(e);
            throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e));
          };
        }
      },
      t = {};
    function n(r) {
      if (t[r]) return t[r].exports;
      var o = t[r] = {
        exports: {}
      };
      return e[r](o, o.exports, n), o.exports;
    }
    return n.n = e => {
      var t = e && e.__esModule ? () => e.default : () => e;
      return n.d(t, {
        a: t
      }), t;
    }, n.d = (e, t) => {
      for (var r in t) n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, {
        enumerable: !0,
        get: t[r]
      });
    }, n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), n.r = e => {
      "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
        value: "Module"
      }), Object.defineProperty(e, "__esModule", {
        value: !0
      });
    }, n(321);
  })();
});

/***/ }),

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

"use strict";


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

/***/ }),

/***/ 842:
/*!*******************************************!*\
  !*** ../node_modules/clone-deep/index.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/**
 * Module dependenices
 */
const clone = __webpack_require__(/*! shallow-clone */ 99);
const typeOf = __webpack_require__(/*! kind-of */ 373);
const isPlainObject = __webpack_require__(/*! is-plain-object */ 427);
function cloneDeep(val, instanceClone) {
  switch (typeOf(val)) {
    case 'object':
      return cloneObjectDeep(val, instanceClone);
    case 'array':
      return cloneArrayDeep(val, instanceClone);
    default:
      {
        return clone(val);
      }
  }
}
function cloneObjectDeep(val, instanceClone) {
  if (typeof instanceClone === 'function') {
    return instanceClone(val);
  }
  if (instanceClone || isPlainObject(val)) {
    const res = new val.constructor();
    for (let key in val) {
      res[key] = cloneDeep(val[key], instanceClone);
    }
    return res;
  }
  return val;
}
function cloneArrayDeep(val, instanceClone) {
  const res = new val.constructor(val.length);
  for (let i = 0; i < val.length; i++) {
    res[i] = cloneDeep(val[i], instanceClone);
  }
  return res;
}

/**
 * Expose `cloneDeep`
 */

module.exports = cloneDeep;

/***/ }),

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

"use strict";


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

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

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

/***/ }),

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

"use strict";


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

/***/ }),

/***/ 427:
/*!************************************************!*\
  !*** ../node_modules/is-plain-object/index.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */



var isObject = __webpack_require__(/*! isobject */ 918);
function isObjectObject(o) {
  return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]';
}
module.exports = function isPlainObject(o) {
  var ctor, prot;
  if (isObjectObject(o) === false) return false;

  // If has modified constructor
  ctor = o.constructor;
  if (typeof ctor !== 'function') return false;

  // If has modified prototype
  prot = ctor.prototype;
  if (isObjectObject(prot) === false) return false;

  // If constructor does not have an Object-specific method
  if (prot.hasOwnProperty('isPrototypeOf') === false) {
    return false;
  }

  // Most likely a plain Object
  return true;
};

/***/ }),

/***/ 918:
/*!*****************************************!*\
  !*** ../node_modules/isobject/index.js ***!
  \*****************************************/
/***/ ((module) => {

"use strict";
/*!
 * isobject <https://github.com/jonschlinkert/isobject>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */



module.exports = function isObject(val) {
  return val != null && typeof val === 'object' && Array.isArray(val) === false;
};

/***/ }),

/***/ 373:
/*!****************************************!*\
  !*** ../node_modules/kind-of/index.js ***!
  \****************************************/
/***/ ((module) => {

var toString = Object.prototype.toString;
module.exports = function kindOf(val) {
  if (val === void 0) return 'undefined';
  if (val === null) return 'null';
  var type = typeof val;
  if (type === 'boolean') return 'boolean';
  if (type === 'string') return 'string';
  if (type === 'number') return 'number';
  if (type === 'symbol') return 'symbol';
  if (type === 'function') {
    return isGeneratorFn(val) ? 'generatorfunction' : 'function';
  }
  if (isArray(val)) return 'array';
  if (isBuffer(val)) return 'buffer';
  if (isArguments(val)) return 'arguments';
  if (isDate(val)) return 'date';
  if (isError(val)) return 'error';
  if (isRegexp(val)) return 'regexp';
  switch (ctorName(val)) {
    case 'Symbol':
      return 'symbol';
    case 'Promise':
      return 'promise';

    // Set, Map, WeakSet, WeakMap
    case 'WeakMap':
      return 'weakmap';
    case 'WeakSet':
      return 'weakset';
    case 'Map':
      return 'map';
    case 'Set':
      return 'set';

    // 8-bit typed arrays
    case 'Int8Array':
      return 'int8array';
    case 'Uint8Array':
      return 'uint8array';
    case 'Uint8ClampedArray':
      return 'uint8clampedarray';

    // 16-bit typed arrays
    case 'Int16Array':
      return 'int16array';
    case 'Uint16Array':
      return 'uint16array';

    // 32-bit typed arrays
    case 'Int32Array':
      return 'int32array';
    case 'Uint32Array':
      return 'uint32array';
    case 'Float32Array':
      return 'float32array';
    case 'Float64Array':
      return 'float64array';
  }
  if (isGeneratorObj(val)) {
    return 'generator';
  }

  // Non-plain objects
  type = toString.call(val);
  switch (type) {
    case '[object Object]':
      return 'object';
    // iterators
    case '[object Map Iterator]':
      return 'mapiterator';
    case '[object Set Iterator]':
      return 'setiterator';
    case '[object String Iterator]':
      return 'stringiterator';
    case '[object Array Iterator]':
      return 'arrayiterator';
  }

  // other
  return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
};
function ctorName(val) {
  return typeof val.constructor === 'function' ? val.constructor.name : null;
}
function isArray(val) {
  if (Array.isArray) return Array.isArray(val);
  return val instanceof Array;
}
function isError(val) {
  return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
}
function isDate(val) {
  if (val instanceof Date) return true;
  return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
}
function isRegexp(val) {
  if (val instanceof RegExp) return true;
  return typeof val.flags === 'string' && typeof val.ignoreCase === 'boolean' && typeof val.multiline === 'boolean' && typeof val.global === 'boolean';
}
function isGeneratorFn(name, val) {
  return ctorName(name) === 'GeneratorFunction';
}
function isGeneratorObj(val) {
  return typeof val.throw === 'function' && typeof val.return === 'function' && typeof val.next === 'function';
}
function isArguments(val) {
  try {
    if (typeof val.length === 'number' && typeof val.callee === 'function') {
      return true;
    }
  } catch (err) {
    if (err.message.indexOf('callee') !== -1) {
      return true;
    }
  }
  return false;
}

/**
 * If you need to support Safari 5-7 (8-10 yr-old browser),
 * take a look at https://github.com/feross/is-buffer
 */

function isBuffer(val) {
  if (val.constructor && typeof val.constructor.isBuffer === 'function') {
    return val.constructor.isBuffer(val);
  }
  return false;
}

/***/ }),

/***/ 99:
/*!**********************************************!*\
  !*** ../node_modules/shallow-clone/index.js ***!
  \**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*!
 * shallow-clone <https://github.com/jonschlinkert/shallow-clone>
 *
 * Copyright (c) 2015-present, Jon Schlinkert.
 * Released under the MIT License.
 */



const valueOf = Symbol.prototype.valueOf;
const typeOf = __webpack_require__(/*! kind-of */ 373);
function clone(val, deep) {
  switch (typeOf(val)) {
    case 'array':
      return val.slice();
    case 'object':
      return Object.assign({}, val);
    case 'date':
      return new val.constructor(Number(val));
    case 'map':
      return new Map(val);
    case 'set':
      return new Set(val);
    case 'buffer':
      return cloneBuffer(val);
    case 'symbol':
      return cloneSymbol(val);
    case 'arraybuffer':
      return cloneArrayBuffer(val);
    case 'float32array':
    case 'float64array':
    case 'int16array':
    case 'int32array':
    case 'int8array':
    case 'uint16array':
    case 'uint32array':
    case 'uint8clampedarray':
    case 'uint8array':
      return cloneTypedArray(val);
    case 'regexp':
      return cloneRegExp(val);
    case 'error':
      return Object.create(val);
    default:
      {
        return val;
      }
  }
}
function cloneRegExp(val) {
  const flags = val.flags !== void 0 ? val.flags : /\w+$/.exec(val) || void 0;
  const re = new val.constructor(val.source, flags);
  re.lastIndex = val.lastIndex;
  return re;
}
function cloneArrayBuffer(val) {
  const res = new val.constructor(val.byteLength);
  new Uint8Array(res).set(new Uint8Array(val));
  return res;
}
function cloneTypedArray(val, deep) {
  return new val.constructor(val.buffer, val.byteOffset, val.length);
}
function cloneBuffer(val) {
  const len = val.length;
  const buf = Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : Buffer.from(len);
  val.copy(buf);
  return buf;
}
function cloneSymbol(val) {
  return valueOf ? Object(valueOf.call(val)) : {};
}

/**
 * Expose `clone`
 */

module.exports = clone;

/***/ }),

/***/ 322:
/*!******************************************!*\
  !*** ../node_modules/slugify/slugify.js ***!
  \******************************************/
/***/ (function(module) {

;
(function (name, root, factory) {
  if (true) {
    module.exports = factory();
    module.exports["default"] = factory();
  }
  /* istanbul ignore next */else {}
})('slugify', this, function () {
  var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","ǈ":"LJ","ǉ":"lj","ǋ":"NJ","ǌ":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\\"","”":"\\\"","„":"\\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}');
  var locales = JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');
  function replace(string, options) {
    if (typeof string !== 'string') {
      throw new Error('slugify: string argument expected');
    }
    options = typeof options === 'string' ? {
      replacement: options
    } : options || {};
    var locale = locales[options.locale] || {};
    var replacement = options.replacement === undefined ? '-' : options.replacement;
    var trim = options.trim === undefined ? true : options.trim;
    var slug = string.normalize().split('')
    // replace characters based on charMap
    .reduce(function (result, ch) {
      var appendChar = locale[ch] || charMap[ch] || ch;
      if (appendChar === replacement) {
        appendChar = ' ';
      }
      return result + appendChar
      // remove not allowed characters
      .replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, '');
    }, '');
    if (options.strict) {
      slug = slug.replace(/[^A-Za-z0-9\s]/g, '');
    }
    if (trim) {
      slug = slug.trim();
    }

    // Replace spaces with replacement character, treating multiple consecutive
    // spaces as a single space.
    slug = slug.replace(/\s+/g, replacement);
    if (options.lower) {
      slug = slug.toLowerCase();
    }
    return slug;
  }
  replace.extend = function (customMap) {
    Object.assign(charMap, customMap);
  };
  return replace;
});

/***/ }),

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

"use strict";


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

/***/ }),

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

"use strict";


const isHyper = process.env.TERM_PROGRAM === 'Hyper';
const isWindows = process.platform === 'win32';
const isLinux = 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: '±',
  section: '§',
  starsOff: '☆',
  starsOn: '★',
  upDownArrow: '↕'
};
const windows = Object.assign({}, common, {
  check: '√',
  cross: '×',
  ellipsisLarge: '...',
  ellipsis: '...',
  info: 'i',
  question: '?',
  questionSmall: '?',
  pointer: '>',
  pointerSmall: '»',
  radioOff: '( )',
  radioOn: '(*)',
  warning: '‼'
});
const other = Object.assign({}, common, {
  ballotCross: '✘',
  check: '✔',
  cross: '✖',
  ellipsisLarge: '⋯',
  ellipsis: '…',
  info: 'ℹ',
  question: '?',
  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
});

/***/ }),

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

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


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


/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cul class=\"nav-tabs\" ngbNav #nav=\"ngbNav\"\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003EGeneral\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Cdiv class=\"row\"\u003E\n        \u003Cdiv class=\"col-6\" ng:if=\"hostApp.platform !== Platform.Web\"\u003E\n          \u003Cdiv class=\"mb-3\"\u003E\n            \u003Clabel translate\u003EDevice\u003C\u002Flabel\u003E\n            \u003Cinput class=\"form-control\" type=\"text\" alwaysVisibleTypeahead [(ngModel)]=\"profile.options.port\" [ngbTypeahead]=\"portsAutocomplete\" [resultFormatter]=\"portsFormatter\"\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"col-6\"\u003E\n          \u003Cdiv class=\"mb-3\"\u003E\n            \u003Clabel translate\u003EBaud rate\u003C\u002Flabel\u003E\n            \u003Cinput class=\"form-control\" type=\"number\" alwaysVisibleTypeahead placeholder=\"Ask every time\" [(ngModel)]=\"profile.options.baudrate\" [ngbTypeahead]=\"baudratesAutocomplete\"\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cstream-processing-settings [options]=\"profile.options\"\u003E\u003C\u002Fstream-processing-settings\u003E\n    \u003C\u002Fng-template\u003E\n  \u003C\u002Fli\u003E\n  \u003Cli ngbNavItem\u003E\u003Ca ngbNavLink translate\u003EAdvanced\u003C\u002Fa\u003E\n    \u003Cng-template ngbNavContent\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EData bits\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cinput class=\"form-control\" type=\"number\" placeholder=\"8\" [(ngModel)]=\"profile.options.databits\"\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EStop bits\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cinput class=\"form-control\" type=\"number\" placeholder=\"1\" [(ngModel)]=\"profile.options.stopbits\"\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003EParity\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Cselect class=\"form-control\" type=\"text\" [(ngModel)]=\"profile.options.parity\"\u003E\n          \u003Coption value=\"none\" translate\u003ENone\u003C\u002Foption\u003E\n          \u003Coption value=\"even\"\u003EEven\u003C\u002Foption\u003E\n          \u003Coption value=\"odd\"\u003EOdd\u003C\u002Foption\u003E\n          \u003Coption value=\"mark\" ng:if=\"hostApp.platform === Platform.Windows\"\u003EMark\u003C\u002Foption\u003E\n          \u003Coption value=\"space\" ng:if=\"hostApp.platform === Platform.Windows\"\u003ESpace\u003C\u002Foption\u003E\n        \u003C\u002Fselect\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\"\u003ERTS \u002F CTS\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.rtscts\"\u003E\u003C\u002Ftoggle\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\"\u003EXON\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.xon\"\u003E\u003C\u002Ftoggle\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\"\u003EXOFF\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.xoff\"\u003E\u003C\u002Ftoggle\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\"\u003EXany\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.xany\"\u003E\u003C\u002Ftoggle\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"form-line\"\u003E\n        \u003Cdiv class=\"header\"\u003E\n          \u003Cdiv class=\"title\" translate\u003ESlow feed\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"description\" translate\u003ESends data one byte at a time\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ctoggle [(ngModel)]=\"profile.options.slowSend\"\u003E\u003C\u002Ftoggle\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\"\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;

/***/ }),

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

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

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

/***/ }),

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

"use strict";


var pug_has_own_property = Object.prototype.hasOwnProperty;

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

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

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

  return a;
}

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

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

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

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

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

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

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

  return attrs;
}

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

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

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

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

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

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

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


/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__848__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__900__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__161__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__571__;

/***/ }),

/***/ 84:
/*!*******************************************!*\
  !*** external "@serialport/bindings-cpp" ***!
  \*******************************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__84__;

/***/ }),

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

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

module.exports = __WEBPACK_EXTERNAL_MODULE__89__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__170__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__832__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__978__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__315__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__316__;

/***/ })

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

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

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

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

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

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

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

/** @deprecated */
function __spreadArrays() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
  return r;
}
function __spreadArray(to, from, pack) {
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
    if (ar || !(i in from)) {
      if (!ar) ar = Array.prototype.slice.call(from, 0, i);
      ar[i] = from[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []),
    i,
    q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i;
  function verb(n) {
    if (g[n]) i[n] = function (v) {
      return new Promise(function (a, b) {
        q.push([n, v, a, b]) > 1 || resume(n, v);
      });
    };
  }
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  function step(r) {
    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f, v) {
    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
  }
}
function __asyncDelegator(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function (e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function () {
    return this;
  }, i;
  function verb(n, f) {
    i[n] = o[n] ? function (v) {
      return (p = !p) ? {
        value: __await(o[n](v)),
        done: false
      } : f ? f(v) : v;
    } : f;
  }
}
function __asyncValues(o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator],
    i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function (v) {
      return new Promise(function (resolve, reject) {
        v = o[n](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve, reject, d, v) {
    Promise.resolve(v).then(function (v) {
      resolve({
        value: v,
        done: d
      });
    }, reject);
  }
}
function __makeTemplateObject(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", {
      value: raw
    });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
;
var __setModuleDefault = Object.create ? function (o, v) {
  Object.defineProperty(o, "default", {
    enumerable: true,
    value: v
  });
} : function (o, v) {
  o["default"] = v;
};
function __importStar(mod) {
  if (mod && mod.__esModule) return mod;
  var result = {};
  if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  __setModuleDefault(result, mod);
  return result;
}
function __importDefault(mod) {
  return mod && mod.__esModule ? mod : {
    default: mod
  };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
  if (kind === "m") throw new TypeError("Private method is not writable");
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
}
function __classPrivateFieldIn(state, receiver) {
  if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
  return typeof state === "function" ? receiver === state : state.has(receiver);
}
// EXTERNAL MODULE: external "@angular/core"
var core_ = __webpack_require__(900);
// EXTERNAL MODULE: external "@angular/common"
var common_ = __webpack_require__(848);
// EXTERNAL MODULE: external "@angular/forms"
var forms_ = __webpack_require__(161);
// EXTERNAL MODULE: external "@ng-bootstrap/ng-bootstrap"
var ng_bootstrap_ = __webpack_require__(571);
// EXTERNAL MODULE: external "ngx-toastr"
var external_ngx_toastr_ = __webpack_require__(170);
// EXTERNAL MODULE: external "tabby-core"
var external_tabby_core_ = __webpack_require__(315);
var external_tabby_core_default = /*#__PURE__*/__webpack_require__.n(external_tabby_core_);
// EXTERNAL MODULE: external "tabby-terminal"
var external_tabby_terminal_ = __webpack_require__(316);
var external_tabby_terminal_default = /*#__PURE__*/__webpack_require__.n(external_tabby_terminal_);
// EXTERNAL MODULE: ./src/components/serialProfileSettings.component.pug?ngResource
var serialProfileSettings_componentngResource = __webpack_require__(611);
var serialProfileSettings_componentngResource_default = /*#__PURE__*/__webpack_require__.n(serialProfileSettings_componentngResource);
// EXTERNAL MODULE: external "rxjs"
var external_rxjs_ = __webpack_require__(832);
// EXTERNAL MODULE: ../app/node_modules/strip-ansi/index.js
var strip_ansi = __webpack_require__(907);
var strip_ansi_default = /*#__PURE__*/__webpack_require__.n(strip_ansi);
// EXTERNAL MODULE: ../app/node_modules/@serialport/stream/dist/index.js
var dist = __webpack_require__(419);
// EXTERNAL MODULE: ../app/node_modules/serialport-binding-webserialapi/dist/wsa-sp-bind.js
var wsa_sp_bind = __webpack_require__(329);
var wsa_sp_bind_default = /*#__PURE__*/__webpack_require__.n(wsa_sp_bind);
// EXTERNAL MODULE: external "@serialport/bindings-cpp"
var bindings_cpp_ = __webpack_require__(84);
;// CONCATENATED MODULE: ./src/services/serial.service.ts





let SerialService = class SerialService {
    constructor(injector, hostApp) {
        this.injector = injector;
        this.hostApp = hostApp;
    }
    detectBinding() {
        return this.hostApp.platform === external_tabby_core_.Platform.Web ? (wsa_sp_bind_default()) : (0,bindings_cpp_.autoDetect)();
    }
    listPorts() {
        return __awaiter(this, void 0, void 0, function* () {
            try {
                return (yield this.detectBinding().list()).map(x => {
                    var _a, _b;
                    return ({
                        name: x.path,
                        description: `${(_a = x.manufacturer) !== null && _a !== void 0 ? _a : ''} ${(_b = x.serialNumber) !== null && _b !== void 0 ? _b : ''}`.trim() || undefined,
                    });
                });
            }
            catch (err) {
                console.error('Failed to list serial ports', err);
                return [];
            }
        });
    }
    quickConnect(query) {
        let path = query;
        let baudrate = 115200;
        if (query.includes('@')) {
            baudrate = parseInt(path.split('@')[1]);
            path = path.split('@')[0];
        }
        const profile = {
            name: query,
            type: 'serial',
            options: {
                port: path,
                baudrate: baudrate,
            },
        };
        window.localStorage.lastSerialConnection = JSON.stringify(profile);
        return this.injector.get(external_tabby_core_.ProfilesService).openNewTabForProfile(profile);
    }
};
SerialService.ctorParameters = () => [
    { type: core_.Injector },
    { type: external_tabby_core_.HostAppService }
];
SerialService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [core_.Injector,
        external_tabby_core_.HostAppService])
], SerialService);


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








const BAUD_RATES = [
    110, 150, 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600, 1500000,
];
class SlowFeedMiddleware extends external_tabby_terminal_.SessionMiddleware {
    feedFromTerminal(data) {
        for (const byte of data) {
            this.outputToSession.next(Buffer.from([byte]));
        }
    }
}
class SerialSession extends external_tabby_terminal_.BaseSession {
    get serviceMessage$() { return this.serviceMessage; }
    constructor(injector, profile) {
        super(injector.get(external_tabby_core_.LogService).create(`serial-${profile.options.port}`));
        this.profile = profile;
        this.serviceMessage = new external_rxjs_.Subject();
        this.serialService = injector.get(SerialService);
        this.zone = injector.get(core_.NgZone);
        this.notifications = injector.get(external_tabby_core_.NotificationsService);
        this.streamProcessor = new external_tabby_terminal_.TerminalStreamProcessor(profile.options);
        this.middleware.push(this.streamProcessor);
        if (this.profile.options.slowSend) {
            this.middleware.unshift(new SlowFeedMiddleware());
        }
        this.middleware.push(new external_tabby_terminal_.UTF8SplitterMiddleware());
        this.middleware.push(new external_tabby_terminal_.InputProcessor(profile.options.input));
        this.setLoginScriptsOptions(profile.options);
    }
    start() {
        var _a, _b, _c, _d, _e, _f, _g, _h;
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.profile.options.port) {
                this.profile.options.port = (yield this.serialService.listPorts())[0].name;
            }
            const serial = this.serial = new dist.SerialPortStream({
                binding: this.serialService.detectBinding(),
                path: this.profile.options.port,
                autoOpen: false,
                baudRate: parseInt(this.profile.options.baudrate),
                dataBits: (_a = this.profile.options.databits) !== null && _a !== void 0 ? _a : 8,
                stopBits: (_b = this.profile.options.stopbits) !== null && _b !== void 0 ? _b : 1,
                parity: (_c = this.profile.options.parity) !== null && _c !== void 0 ? _c : 'none',
                rtscts: (_d = this.profile.options.rtscts) !== null && _d !== void 0 ? _d : false,
                xon: (_e = this.profile.options.xon) !== null && _e !== void 0 ? _e : false,
                xoff: (_f = this.profile.options.xoff) !== null && _f !== void 0 ? _f : false,
                xany: (_g = this.profile.options.xany) !== null && _g !== void 0 ? _g : false,
            });
            let connected = false;
            yield new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
                serial.on('open', () => {
                    connected = true;
                    this.zone.run(resolve);
                });
                serial.on('error', error => {
                    this.zone.run(() => {
                        if (connected) {
                            this.notifications.error(error.message);
                        }
                        else {
                            reject(error);
                        }
                        this.destroy();
                    });
                });
                serial.on('close', () => {
                    this.emitServiceMessage('Port closed');
                    this.destroy();
                });
                try {
                    serial.open();
                }
                catch (e) {
                    this.notifications.error(e.message);
                    reject(e);
                }
            }));
            this.open = true;
            setTimeout(() => this.streamProcessor.start());
            serial.on('readable', () => {
                this.emitOutput(serial.read());
            });
            serial.on('end', () => {
                this.logger.info('Shell session ended');
                if (this.open) {
                    this.destroy();
                }
            });
            (_h = this.loginScriptProcessor) === null || _h === void 0 ? void 0 : _h.executeUnconditionalScripts();
        });
    }
    write(data) {
        var _a;
        (_a = this.serial) === null || _a === void 0 ? void 0 : _a.write(data);
    }
    destroy() {
        const _super = Object.create(null, {
            destroy: { get: () => super.destroy }
        });
        return __awaiter(this, void 0, void 0, function* () {
            this.serviceMessage.complete();
            yield _super.destroy.call(this);
        });
    }
    // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-empty-function
    resize(_, __) {
        this.streamProcessor.resize();
    }
    kill(_) {
        var _a;
        (_a = this.serial) === null || _a === void 0 ? void 0 : _a.close();
    }
    emitServiceMessage(msg) {
        this.serviceMessage.next(msg);
        this.logger.info(strip_ansi_default()(msg));
    }
    getChildProcesses() {
        return __awaiter(this, void 0, void 0, function* () {
            return [];
        });
    }
    gracefullyKillProcess() {
        return __awaiter(this, void 0, void 0, function* () {
            this.kill('TERM');
        });
    }
    supportsWorkingDirectory() {
        return false;
    }
    getWorkingDirectory() {
        return __awaiter(this, void 0, void 0, function* () {
            return null;
        });
    }
}

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


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





/** @hidden */
let SerialProfileSettingsComponent = class SerialProfileSettingsComponent {
    constructor(serial, hostApp) {
        this.serial = serial;
        this.hostApp = hostApp;
        this.Platform = external_tabby_core_.Platform;
        this.portsAutocomplete = text$ => text$.pipe((0,external_rxjs_.map)(() => {
            return this.foundPorts.map(x => x.name);
        }));
        this.baudratesAutocomplete = text$ => text$.pipe((0,external_rxjs_.debounceTime)(200), (0,external_rxjs_.distinctUntilChanged)(), (0,external_rxjs_.map)((q) => [
            null,
            ...BAUD_RATES.filter(x => !q || x.toString().startsWith(q)),
        ]));
        this.portsFormatter = port => {
            const p = this.foundPorts.find(x => x.name === port);
            if (p === null || p === void 0 ? void 0 : p.description) {
                return `${port} (${p.description})`;
            }
            return port;
        };
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.foundPorts = yield this.serial.listPorts();
        });
    }
};
SerialProfileSettingsComponent.ctorParameters = () => [
    { type: SerialService },
    { type: external_tabby_core_.HostAppService }
];
SerialProfileSettingsComponent = __decorate([
    (0,core_.Component)({
        template: (serialProfileSettings_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [SerialService,
        external_tabby_core_.HostAppService])
], SerialProfileSettingsComponent);


// EXTERNAL MODULE: ./src/components/serialTab.component.scss?ngResource
var serialTab_componentngResource = __webpack_require__(872);
var serialTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(serialTab_componentngResource);
;// CONCATENATED MODULE: ../node_modules/@biesbjerg/ngx-translate-extract-marker/__ivy_ngcc__/esm2015/lib/ngx-translate-extract-marker.js
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T
 * @param {?} key
 * @return {?}
 */
function marker(key) {
  return key;
}
// EXTERNAL MODULE: ./node_modules/ansi-colors/index.js
var ansi_colors = __webpack_require__(596);
var ansi_colors_default = /*#__PURE__*/__webpack_require__.n(ansi_colors);
;// CONCATENATED MODULE: ./src/components/serialTab.component.ts


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






/** @hidden */
let SerialTabComponent = class SerialTabComponent extends external_tabby_terminal_.ConnectableTerminalTabComponent {
    // eslint-disable-next-line @typescript-eslint/no-useless-constructor
    constructor(injector, selector) {
        super(injector);
        this.selector = selector;
        this.session = null;
        this.Platform = external_tabby_core_.Platform;
        this.enableToolbar = true;
    }
    ngOnInit() {
        this.subscribeUntilDestroyed(this.hotkeys.hotkey$, hotkey => {
            if (!this.hasFocus) {
                return;
            }
            switch (hotkey) {
                case 'home':
                    this.sendInput('\x1b[H');
                    break;
                case 'end':
                    this.sendInput('\x1b[F');
                    break;
                case 'restart-serial-session':
                    this.reconnect();
                    break;
            }
        });
        super.ngOnInit();
        setImmediate(() => {
            this.setTitle(this.profile.name);
        });
    }
    initializeSession() {
        const _super = Object.create(null, {
            initializeSession: { get: () => super.initializeSession }
        });
        return __awaiter(this, void 0, void 0, function* () {
            _super.initializeSession.call(this);
            const session = new SerialSession(this.injector, this.profile);
            this.setSession(session);
            this.startSpinner(this.translate.instant(marker('Connecting')));
            try {
                yield this.session.start();
                this.stopSpinner();
                session.emitServiceMessage(this.translate.instant(marker('Port opened')));
            }
            catch (e) {
                this.stopSpinner();
                this.write(ansi_colors_default().black.bgRed(' X ') + ' ' + ansi_colors_default().red(e.message) + '\r\n');
                return;
            }
            this.session.resize(this.size.columns, this.size.rows);
        });
    }
    attachSessionHandlers() {
        this.attachSessionHandler(this.session.serviceMessage$, msg => {
            var _a;
            this.write(`\r\n${ansi_colors_default().black.bgWhite(' Serial ')} ${msg}\r\n`);
            (_a = this.session) === null || _a === void 0 ? void 0 : _a.resize(this.size.columns, this.size.rows);
        });
        super.attachSessionHandlers();
    }
    onSessionDestroyed() {
        if (this.frontend) {
            // Session was closed abruptly
            this.write('\r\n' + ansi_colors_default().black.bgWhite(' SERIAL ') + ` session closed\r\n`);
            super.onSessionDestroyed();
        }
    }
    changeBaudRate() {
        var _a, _b;
        return __awaiter(this, void 0, void 0, function* () {
            const rate = yield this.selector.show(this.translate.instant(marker('Baud rate')), BAUD_RATES.map(x => ({
                name: x.toString(), result: x,
            })));
            (_b = (_a = this.session) === null || _a === void 0 ? void 0 : _a.serial) === null || _b === void 0 ? void 0 : _b.update({ baudRate: rate });
            this.profile.options.baudrate = rate;
        });
    }
    isSessionExplicitlyTerminated() {
        return super.isSessionExplicitlyTerminated() ||
            this.recentInputs.endsWith('close\r') ||
            this.recentInputs.endsWith('quit\r');
    }
};
SerialTabComponent.ctorParameters = () => [
    { type: core_.Injector },
    { type: external_tabby_core_.SelectorService }
];
SerialTabComponent = __decorate([
    (0,core_.Component)({
        selector: 'serial-tab',
        template: `${external_tabby_terminal_.BaseTerminalTabComponent.template} ${__webpack_require__(/*! ./serialTab.component.pug */ 370)}`,
        animations: external_tabby_terminal_.BaseTerminalTabComponent.animations,
        styles: [(serialTab_componentngResource_default()), ...external_tabby_terminal_.BaseTerminalTabComponent.styles]
    }),
    __metadata("design:paramtypes", [core_.Injector,
        external_tabby_core_.SelectorService])
], SerialTabComponent);


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

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

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




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


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



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


// EXTERNAL MODULE: ../node_modules/slugify/slugify.js
var slugify = __webpack_require__(322);
var slugify_default = /*#__PURE__*/__webpack_require__.n(slugify);
// EXTERNAL MODULE: ../node_modules/clone-deep/index.js
var clone_deep = __webpack_require__(842);
var clone_deep_default = /*#__PURE__*/__webpack_require__.n(clone_deep);
;// CONCATENATED MODULE: ./src/profiles.ts










let SerialProfilesService = class SerialProfilesService extends external_tabby_core_.ConnectableProfileProvider {
    constructor(selector, serial, hostApp, translate) {
        super();
        this.selector = selector;
        this.serial = serial;
        this.hostApp = hostApp;
        this.translate = translate;
        this.id = 'serial';
        this.name = marker('Serial');
        this.settingsComponent = SerialProfileSettingsComponent;
        this.configDefaults = {
            options: {
                port: null,
                baudrate: null,
                databits: 8,
                stopbits: 1,
                parity: 'none',
                rtscts: false,
                xon: false,
                xoff: false,
                xany: false,
                inputMode: null,
                outputMode: null,
                inputNewlines: null,
                outputNewlines: null,
                scripts: [],
                slowSend: false,
                input: { backspace: 'backspace' },
            },
            clearServiceMessagesOnConnect: false,
        };
    }
    getBuiltinProfiles() {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.hostApp.platform === external_tabby_core_.Platform.Web) {
                return [
                    {
                        id: `serial:web`,
                        type: 'serial',
                        name: this.translate.instant('Serial connection'),
                        icon: 'fas fa-microchip',
                        isBuiltin: true,
                    },
                ];
            }
            return [
                {
                    id: `serial:template`,
                    type: 'serial',
                    name: this.translate.instant('Serial connection'),
                    icon: 'fas fa-microchip',
                    isBuiltin: true,
                    isTemplate: true,
                },
                ...(yield this.serial.listPorts()).map(p => ({
                    id: `serial:port-${slugify_default()(p.name).replace('.', '-')}`,
                    type: 'serial',
                    name: p.description ?
                        this.translate.instant('Serial: {description}', p) :
                        this.translate.instant('Serial'),
                    icon: 'fas fa-microchip',
                    isBuiltin: true,
                    options: {
                        port: p.name,
                    },
                })),
            ];
        });
    }
    getNewTabParameters(profile) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!profile.options.baudrate) {
                profile = clone_deep_default()(profile);
                profile.options.baudrate = yield this.selector.show(this.translate.instant('Baud rate'), BAUD_RATES.map(x => ({
                    name: x.toString(), result: x,
                })));
            }
            return {
                type: SerialTabComponent,
                inputs: { profile },
            };
        });
    }
    getSuggestedName(profile) {
        return this.getDescription(profile);
    }
    getDescription(profile) {
        return profile.options.port;
    }
};
SerialProfilesService.ctorParameters = () => [
    { type: external_tabby_core_.SelectorService },
    { type: SerialService },
    { type: external_tabby_core_.HostAppService },
    { type: external_tabby_core_.TranslateService }
];
SerialProfilesService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [external_tabby_core_.SelectorService,
        SerialService,
        external_tabby_core_.HostAppService,
        external_tabby_core_.TranslateService])
], SerialProfilesService);


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














/** @hidden */
let SerialModule = class SerialModule {
}; // eslint-disable-line @typescript-eslint/no-extraneous-class
SerialModule = __decorate([
    (0,core_.NgModule)({
        imports: [
            ng_bootstrap_.NgbModule,
            common_.CommonModule,
            forms_.FormsModule,
            external_ngx_toastr_.ToastrModule,
            (external_tabby_core_default()),
            (external_tabby_terminal_default()),
        ],
        providers: [
            { provide: external_tabby_core_.ConfigProvider, useClass: SerialConfigProvider, multi: true },
            { provide: external_tabby_core_.ProfileProvider, useClass: SerialProfilesService, multi: true },
            { provide: external_tabby_core_.TabRecoveryProvider, useClass: RecoveryProvider, multi: true },
            { provide: external_tabby_core_.HotkeyProvider, useClass: SerialHotkeyProvider, multi: true },
        ],
        declarations: [
            SerialProfileSettingsComponent,
            SerialTabComponent,
        ],
    })
], SerialModule);
/* harmony default export */ const src = (SerialModule);



})();

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