(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("@angular/core"), require("@angular/common"), require("@angular/forms"), require("@ng-bootstrap/ng-bootstrap"), require("ngx-toastr"), require("tabby-core"), require("tabby-settings"), require("fs"), require("rxjs"), require("readline"), require("@angular/animations"), require("path"), require("stream"), require("os"));
	else if(typeof define === 'function' && define.amd)
		define(["@angular/core", "@angular/common", "@angular/forms", "@ng-bootstrap/ng-bootstrap", "ngx-toastr", "tabby-core", "tabby-settings", "fs", "rxjs", "readline", "@angular/animations", "path", "stream", "os"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("@angular/core"), require("@angular/common"), require("@angular/forms"), require("@ng-bootstrap/ng-bootstrap"), require("ngx-toastr"), require("tabby-core"), require("tabby-settings"), require("fs"), require("rxjs"), require("readline"), require("@angular/animations"), require("path"), require("stream"), require("os")) : factory(root["@angular/core"], root["@angular/common"], root["@angular/forms"], root["@ng-bootstrap/ng-bootstrap"], root["ngx-toastr"], root["tabby-core"], root["tabby-settings"], root["fs"], root["rxjs"], root["readline"], root["@angular/animations"], root["path"], root["stream"], root["os"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(global, (__WEBPACK_EXTERNAL_MODULE__8900__, __WEBPACK_EXTERNAL_MODULE__5848__, __WEBPACK_EXTERNAL_MODULE__7161__, __WEBPACK_EXTERNAL_MODULE__7571__, __WEBPACK_EXTERNAL_MODULE__7170__, __WEBPACK_EXTERNAL_MODULE__315__, __WEBPACK_EXTERNAL_MODULE__6663__, __WEBPACK_EXTERNAL_MODULE__2089__, __WEBPACK_EXTERNAL_MODULE__3832__, __WEBPACK_EXTERNAL_MODULE__2908__, __WEBPACK_EXTERNAL_MODULE__8781__, __WEBPACK_EXTERNAL_MODULE__3056__, __WEBPACK_EXTERNAL_MODULE__3978__, __WEBPACK_EXTERNAL_MODULE__9044__) => {
return /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 2953:
/*!************************************************************************!*\
  !*** ./src/components/appearanceSettingsTab.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!./appearanceSettingsTab.component.scss?ngResource */ 3326);

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

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

/***/ }),

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


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

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

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

/***/ }),

/***/ 3216:
/*!**************************************************************!*\
  !*** ./src/components/colorPicker.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!./colorPicker.component.scss?ngResource */ 3729);

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

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

/***/ }),

/***/ 6683:
/*!*********************************************************************!*\
  !*** ./src/components/colorSchemePreview.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!./colorSchemePreview.component.scss?ngResource */ 4382);

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

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

/***/ }),

/***/ 6403:
/*!*************************************************************************!*\
  !*** ./src/components/colorSchemeSettingsTab.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!./colorSchemeSettingsTab.component.scss?ngResource */ 4017);

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

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

/***/ }),

/***/ 2161:
/*!**************************************************************!*\
  !*** ./src/components/searchPanel.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!./searchPanel.component.scss?ngResource */ 2239);

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

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

/***/ }),

/***/ 458:
/*!******************************************************************!*\
  !*** ./src/components/terminalToolbar.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!./terminalToolbar.component.scss?ngResource */ 5765);

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

/***/ 7252:
/*!**************************************************!*\
  !*** ../app/node_modules/call-bind/callBound.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 5832);
var callBind = __webpack_require__(/*! ./ */ 1231);
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
module.exports = function callBoundIntrinsic(name, allowMissing) {
  var intrinsic = GetIntrinsic(name, !!allowMissing);
  if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
    return callBind(intrinsic);
  }
  return intrinsic;
};

/***/ }),

/***/ 1231:
/*!**********************************************!*\
  !*** ../app/node_modules/call-bind/index.js ***!
  \**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var bind = __webpack_require__(/*! function-bind */ 941);
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 5832);
var $apply = GetIntrinsic('%Function.prototype.apply%');
var $call = GetIntrinsic('%Function.prototype.call%');
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
if ($defineProperty) {
  try {
    $defineProperty({}, 'a', {
      value: 1
    });
  } catch (e) {
    // IE 8 has a broken defineProperty
    $defineProperty = null;
  }
}
module.exports = function callBind() {
  return $reflectApply(bind, $call, arguments);
};
var applyBind = function applyBind() {
  return $reflectApply(bind, $apply, arguments);
};
if ($defineProperty) {
  $defineProperty(module.exports, 'apply', {
    value: applyBind
  });
} else {
  module.exports.apply = applyBind;
}

/***/ }),

/***/ 9951:
/*!******************************************************!*\
  !*** ../app/node_modules/define-properties/index.js ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var keys = __webpack_require__(/*! object-keys */ 2877);
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
var toStr = Object.prototype.toString;
var concat = Array.prototype.concat;
var origDefineProperty = Object.defineProperty;
var isFunction = function (fn) {
  return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
};
var arePropertyDescriptorsSupported = function () {
  var obj = {};
  try {
    origDefineProperty(obj, 'x', {
      enumerable: false,
      value: obj
    });
    // eslint-disable-next-line no-unused-vars, no-restricted-syntax
    for (var _ in obj) {
      // jscs:ignore disallowUnusedVariables
      return false;
    }
    return obj.x === obj;
  } catch (e) {
    /* this is IE 8. */
    return false;
  }
};
var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
var defineProperty = function (object, name, value, predicate) {
  if (name in object && (!isFunction(predicate) || !predicate())) {
    return;
  }
  if (supportsDescriptors) {
    origDefineProperty(object, name, {
      configurable: true,
      enumerable: false,
      value: value,
      writable: true
    });
  } else {
    object[name] = value;
  }
};
var defineProperties = function (object, map) {
  var predicates = arguments.length > 2 ? arguments[2] : {};
  var props = keys(map);
  if (hasSymbols) {
    props = concat.call(props, Object.getOwnPropertySymbols(map));
  }
  for (var i = 0; i < props.length; i += 1) {
    defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
  }
};
defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;

/***/ }),

/***/ 6117:
/*!*******************************************************!*\
  !*** ../app/node_modules/es-abstract/GetIntrinsic.js ***!
  \*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/* globals
	AggregateError,
	Atomics,
	FinalizationRegistry,
	SharedArrayBuffer,
	WeakRef,
*/
var undefined;
var $SyntaxError = SyntaxError;
var $Function = Function;
var $TypeError = TypeError;

// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
  try {
    // eslint-disable-next-line no-new-func
    return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  } catch (e) {}
};
var $gOPD = Object.getOwnPropertyDescriptor;
if ($gOPD) {
  try {
    $gOPD({}, '');
  } catch (e) {
    $gOPD = null; // this is IE 8, which has a broken gOPD
  }
}

var throwTypeError = function () {
  throw new $TypeError();
};
var ThrowTypeError = $gOPD ? function () {
  try {
    // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
    arguments.callee; // IE 8 does not throw here
    return throwTypeError;
  } catch (calleeThrows) {
    try {
      // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
      return $gOPD(arguments, 'callee').get;
    } catch (gOPDthrows) {
      return throwTypeError;
    }
  }
}() : throwTypeError;
var hasSymbols = __webpack_require__(/*! has-symbols */ 2074)();
var getProto = Object.getPrototypeOf || function (x) {
  return x.__proto__;
}; // eslint-disable-line no-proto

var asyncGenFunction = getEvalledConstructor('async function* () {}');
var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
var INTRINSICS = {
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  '%Array%': Array,
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
  '%AsyncFromSyncIteratorPrototype%': undefined,
  '%AsyncFunction%': getEvalledConstructor('async function () {}'),
  '%AsyncGenerator%': asyncGenFunctionPrototype,
  '%AsyncGeneratorFunction%': asyncGenFunction,
  '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
  '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  '%Boolean%': Boolean,
  '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  '%Date%': Date,
  '%decodeURI%': decodeURI,
  '%decodeURIComponent%': decodeURIComponent,
  '%encodeURI%': encodeURI,
  '%encodeURIComponent%': encodeURIComponent,
  '%Error%': Error,
  '%eval%': eval,
  // eslint-disable-line no-eval
  '%EvalError%': EvalError,
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  '%Function%': $Function,
  '%GeneratorFunction%': getEvalledConstructor('function* () {}'),
  '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  '%isFinite%': isFinite,
  '%isNaN%': isNaN,
  '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
  '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  '%Map%': typeof Map === 'undefined' ? undefined : Map,
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
  '%Math%': Math,
  '%Number%': Number,
  '%Object%': Object,
  '%parseFloat%': parseFloat,
  '%parseInt%': parseInt,
  '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  '%RangeError%': RangeError,
  '%ReferenceError%': ReferenceError,
  '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  '%RegExp%': RegExp,
  '%Set%': typeof Set === 'undefined' ? undefined : Set,
  '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  '%String%': String,
  '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
  '%Symbol%': hasSymbols ? Symbol : undefined,
  '%SyntaxError%': $SyntaxError,
  '%ThrowTypeError%': ThrowTypeError,
  '%TypedArray%': TypedArray,
  '%TypeError%': $TypeError,
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  '%URIError%': URIError,
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
};
var LEGACY_ALIASES = {
  '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  '%ArrayPrototype%': ['Array', 'prototype'],
  '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  '%BooleanPrototype%': ['Boolean', 'prototype'],
  '%DataViewPrototype%': ['DataView', 'prototype'],
  '%DatePrototype%': ['Date', 'prototype'],
  '%ErrorPrototype%': ['Error', 'prototype'],
  '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  '%FunctionPrototype%': ['Function', 'prototype'],
  '%Generator%': ['GeneratorFunction', 'prototype'],
  '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  '%JSONParse%': ['JSON', 'parse'],
  '%JSONStringify%': ['JSON', 'stringify'],
  '%MapPrototype%': ['Map', 'prototype'],
  '%NumberPrototype%': ['Number', 'prototype'],
  '%ObjectPrototype%': ['Object', 'prototype'],
  '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  '%PromisePrototype%': ['Promise', 'prototype'],
  '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  '%Promise_all%': ['Promise', 'all'],
  '%Promise_reject%': ['Promise', 'reject'],
  '%Promise_resolve%': ['Promise', 'resolve'],
  '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  '%RegExpPrototype%': ['RegExp', 'prototype'],
  '%SetPrototype%': ['Set', 'prototype'],
  '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  '%StringPrototype%': ['String', 'prototype'],
  '%SymbolPrototype%': ['Symbol', 'prototype'],
  '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  '%URIErrorPrototype%': ['URIError', 'prototype'],
  '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  '%WeakSetPrototype%': ['WeakSet', 'prototype']
};
var bind = __webpack_require__(/*! function-bind */ 941);
var hasOwn = __webpack_require__(/*! has */ 4499);
var $concat = bind.call(Function.call, Array.prototype.concat);
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
var $replace = bind.call(Function.call, String.prototype.replace);

/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
  var result = [];
  $replace(string, rePropName, function (match, number, quote, subString) {
    result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  });
  return result;
};
/* end adaptation */

var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  var intrinsicName = name;
  var alias;
  if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
    alias = LEGACY_ALIASES[intrinsicName];
    intrinsicName = '%' + alias[0] + '%';
  }
  if (hasOwn(INTRINSICS, intrinsicName)) {
    var value = INTRINSICS[intrinsicName];
    if (typeof value === 'undefined' && !allowMissing) {
      throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
    }
    return {
      alias: alias,
      name: intrinsicName,
      value: value
    };
  }
  throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
};
module.exports = function GetIntrinsic(name, allowMissing) {
  if (typeof name !== 'string' || name.length === 0) {
    throw new $TypeError('intrinsic name must be a non-empty string');
  }
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
    throw new $TypeError('"allowMissing" argument must be a boolean');
  }
  var parts = stringToPath(name);
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  var intrinsicRealName = intrinsic.name;
  var value = intrinsic.value;
  var skipFurtherCaching = false;
  var alias = intrinsic.alias;
  if (alias) {
    intrinsicBaseName = alias[0];
    $spliceApply(parts, $concat([0, 1], alias));
  }
  for (var i = 1, isOwn = true; i < parts.length; i += 1) {
    var part = parts[i];
    if (part === 'constructor' || !isOwn) {
      skipFurtherCaching = true;
    }
    intrinsicBaseName += '.' + part;
    intrinsicRealName = '%' + intrinsicBaseName + '%';
    if (hasOwn(INTRINSICS, intrinsicRealName)) {
      value = INTRINSICS[intrinsicRealName];
    } else if (value != null) {
      if ($gOPD && i + 1 >= parts.length) {
        var desc = $gOPD(value, part);
        isOwn = !!desc;
        if (!allowMissing && !(part in value)) {
          throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
        }
        // By convention, when a data property is converted to an accessor
        // property to emulate a data property that does not suffer from
        // the override mistake, that accessor's getter is marked with
        // an `originalValue` property. Here, when we detect this, we
        // uphold the illusion by pretending to see that original data
        // property, i.e., returning the value rather than the getter
        // itself.
        if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
          value = desc.get;
        } else {
          value = value[part];
        }
      } else {
        isOwn = hasOwn(value, part);
        value = value[part];
      }
      if (isOwn && !skipFurtherCaching) {
        INTRINSICS[intrinsicRealName] = value;
      }
    }
  }
  return value;
};

/***/ }),

/***/ 3064:
/*!***************************************************************************!*\
  !*** ../app/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js ***!
  \***************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var GetIntrinsic = __webpack_require__(/*! ../GetIntrinsic */ 6117);
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%');
if ($gOPD) {
  try {
    $gOPD([], 'length');
  } catch (e) {
    // IE 8 has a broken gOPD
    $gOPD = null;
  }
}
module.exports = $gOPD;

/***/ }),

/***/ 389:
/*!***********************************************************!*\
  !*** ../app/node_modules/function-bind/implementation.js ***!
  \***********************************************************/
/***/ ((module) => {

"use strict";


/* eslint no-invalid-this: 1 */
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var slice = Array.prototype.slice;
var toStr = Object.prototype.toString;
var funcType = '[object Function]';
module.exports = function bind(that) {
  var target = this;
  if (typeof target !== 'function' || toStr.call(target) !== funcType) {
    throw new TypeError(ERROR_MESSAGE + target);
  }
  var args = slice.call(arguments, 1);
  var bound;
  var binder = function () {
    if (this instanceof bound) {
      var result = target.apply(this, args.concat(slice.call(arguments)));
      if (Object(result) === result) {
        return result;
      }
      return this;
    } else {
      return target.apply(that, args.concat(slice.call(arguments)));
    }
  };
  var boundLength = Math.max(0, target.length - args.length);
  var boundArgs = [];
  for (var i = 0; i < boundLength; i++) {
    boundArgs.push('$' + i);
  }
  bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
  if (target.prototype) {
    var Empty = function Empty() {};
    Empty.prototype = target.prototype;
    bound.prototype = new Empty();
    Empty.prototype = null;
  }
  return bound;
};

/***/ }),

/***/ 941:
/*!**************************************************!*\
  !*** ../app/node_modules/function-bind/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 389);
module.exports = Function.prototype.bind || implementation;

/***/ }),

/***/ 5832:
/*!**************************************************!*\
  !*** ../app/node_modules/get-intrinsic/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/* globals
	AggregateError,
	Atomics,
	FinalizationRegistry,
	SharedArrayBuffer,
	WeakRef,
*/
var undefined;
var $SyntaxError = SyntaxError;
var $Function = Function;
var $TypeError = TypeError;

// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
  try {
    // eslint-disable-next-line no-new-func
    return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  } catch (e) {}
};
var $gOPD = Object.getOwnPropertyDescriptor;
if ($gOPD) {
  try {
    $gOPD({}, '');
  } catch (e) {
    $gOPD = null; // this is IE 8, which has a broken gOPD
  }
}

var throwTypeError = function () {
  throw new $TypeError();
};
var ThrowTypeError = $gOPD ? function () {
  try {
    // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
    arguments.callee; // IE 8 does not throw here
    return throwTypeError;
  } catch (calleeThrows) {
    try {
      // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
      return $gOPD(arguments, 'callee').get;
    } catch (gOPDthrows) {
      return throwTypeError;
    }
  }
}() : throwTypeError;
var hasSymbols = __webpack_require__(/*! has-symbols */ 2074)();
var getProto = Object.getPrototypeOf || function (x) {
  return x.__proto__;
}; // eslint-disable-line no-proto

var asyncGenFunction = getEvalledConstructor('async function* () {}');
var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
var INTRINSICS = {
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  '%Array%': Array,
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
  '%AsyncFromSyncIteratorPrototype%': undefined,
  '%AsyncFunction%': getEvalledConstructor('async function () {}'),
  '%AsyncGenerator%': asyncGenFunctionPrototype,
  '%AsyncGeneratorFunction%': asyncGenFunction,
  '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
  '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  '%Boolean%': Boolean,
  '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  '%Date%': Date,
  '%decodeURI%': decodeURI,
  '%decodeURIComponent%': decodeURIComponent,
  '%encodeURI%': encodeURI,
  '%encodeURIComponent%': encodeURIComponent,
  '%Error%': Error,
  '%eval%': eval,
  // eslint-disable-line no-eval
  '%EvalError%': EvalError,
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  '%Function%': $Function,
  '%GeneratorFunction%': getEvalledConstructor('function* () {}'),
  '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  '%isFinite%': isFinite,
  '%isNaN%': isNaN,
  '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
  '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  '%Map%': typeof Map === 'undefined' ? undefined : Map,
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
  '%Math%': Math,
  '%Number%': Number,
  '%Object%': Object,
  '%parseFloat%': parseFloat,
  '%parseInt%': parseInt,
  '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  '%RangeError%': RangeError,
  '%ReferenceError%': ReferenceError,
  '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  '%RegExp%': RegExp,
  '%Set%': typeof Set === 'undefined' ? undefined : Set,
  '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  '%String%': String,
  '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
  '%Symbol%': hasSymbols ? Symbol : undefined,
  '%SyntaxError%': $SyntaxError,
  '%ThrowTypeError%': ThrowTypeError,
  '%TypedArray%': TypedArray,
  '%TypeError%': $TypeError,
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  '%URIError%': URIError,
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
};
var LEGACY_ALIASES = {
  '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  '%ArrayPrototype%': ['Array', 'prototype'],
  '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  '%BooleanPrototype%': ['Boolean', 'prototype'],
  '%DataViewPrototype%': ['DataView', 'prototype'],
  '%DatePrototype%': ['Date', 'prototype'],
  '%ErrorPrototype%': ['Error', 'prototype'],
  '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  '%FunctionPrototype%': ['Function', 'prototype'],
  '%Generator%': ['GeneratorFunction', 'prototype'],
  '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  '%JSONParse%': ['JSON', 'parse'],
  '%JSONStringify%': ['JSON', 'stringify'],
  '%MapPrototype%': ['Map', 'prototype'],
  '%NumberPrototype%': ['Number', 'prototype'],
  '%ObjectPrototype%': ['Object', 'prototype'],
  '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  '%PromisePrototype%': ['Promise', 'prototype'],
  '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  '%Promise_all%': ['Promise', 'all'],
  '%Promise_reject%': ['Promise', 'reject'],
  '%Promise_resolve%': ['Promise', 'resolve'],
  '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  '%RegExpPrototype%': ['RegExp', 'prototype'],
  '%SetPrototype%': ['Set', 'prototype'],
  '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  '%StringPrototype%': ['String', 'prototype'],
  '%SymbolPrototype%': ['Symbol', 'prototype'],
  '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  '%URIErrorPrototype%': ['URIError', 'prototype'],
  '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  '%WeakSetPrototype%': ['WeakSet', 'prototype']
};
var bind = __webpack_require__(/*! function-bind */ 941);
var hasOwn = __webpack_require__(/*! has */ 4499);
var $concat = bind.call(Function.call, Array.prototype.concat);
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
var $replace = bind.call(Function.call, String.prototype.replace);
var $strSlice = bind.call(Function.call, String.prototype.slice);

/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
  var first = $strSlice(string, 0, 1);
  var last = $strSlice(string, -1);
  if (first === '%' && last !== '%') {
    throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
  } else if (last === '%' && first !== '%') {
    throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
  }
  var result = [];
  $replace(string, rePropName, function (match, number, quote, subString) {
    result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  });
  return result;
};
/* end adaptation */

var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  var intrinsicName = name;
  var alias;
  if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
    alias = LEGACY_ALIASES[intrinsicName];
    intrinsicName = '%' + alias[0] + '%';
  }
  if (hasOwn(INTRINSICS, intrinsicName)) {
    var value = INTRINSICS[intrinsicName];
    if (typeof value === 'undefined' && !allowMissing) {
      throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
    }
    return {
      alias: alias,
      name: intrinsicName,
      value: value
    };
  }
  throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
};
module.exports = function GetIntrinsic(name, allowMissing) {
  if (typeof name !== 'string' || name.length === 0) {
    throw new $TypeError('intrinsic name must be a non-empty string');
  }
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
    throw new $TypeError('"allowMissing" argument must be a boolean');
  }
  var parts = stringToPath(name);
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  var intrinsicRealName = intrinsic.name;
  var value = intrinsic.value;
  var skipFurtherCaching = false;
  var alias = intrinsic.alias;
  if (alias) {
    intrinsicBaseName = alias[0];
    $spliceApply(parts, $concat([0, 1], alias));
  }
  for (var i = 1, isOwn = true; i < parts.length; i += 1) {
    var part = parts[i];
    var first = $strSlice(part, 0, 1);
    var last = $strSlice(part, -1);
    if ((first === '"' || first === "'" || first === '`' || last === '"' || last === "'" || last === '`') && first !== last) {
      throw new $SyntaxError('property names with quotes must have matching quotes');
    }
    if (part === 'constructor' || !isOwn) {
      skipFurtherCaching = true;
    }
    intrinsicBaseName += '.' + part;
    intrinsicRealName = '%' + intrinsicBaseName + '%';
    if (hasOwn(INTRINSICS, intrinsicRealName)) {
      value = INTRINSICS[intrinsicRealName];
    } else if (value != null) {
      if (!(part in value)) {
        if (!allowMissing) {
          throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
        }
        return void undefined;
      }
      if ($gOPD && i + 1 >= parts.length) {
        var desc = $gOPD(value, part);
        isOwn = !!desc;

        // By convention, when a data property is converted to an accessor
        // property to emulate a data property that does not suffer from
        // the override mistake, that accessor's getter is marked with
        // an `originalValue` property. Here, when we detect this, we
        // uphold the illusion by pretending to see that original data
        // property, i.e., returning the value rather than the getter
        // itself.
        if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
          value = desc.get;
        } else {
          value = value[part];
        }
      } else {
        isOwn = hasOwn(value, part);
        value = value[part];
      }
      if (isOwn && !skipFurtherCaching) {
        INTRINSICS[intrinsicRealName] = value;
      }
    }
  }
  return value;
};

/***/ }),

/***/ 2074:
/*!************************************************!*\
  !*** ../app/node_modules/has-symbols/index.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var origSymbol = global.Symbol;
var hasSymbolSham = __webpack_require__(/*! ./shams */ 7168);
module.exports = function hasNativeSymbols() {
  if (typeof origSymbol !== 'function') {
    return false;
  }
  if (typeof Symbol !== 'function') {
    return false;
  }
  if (typeof origSymbol('foo') !== 'symbol') {
    return false;
  }
  if (typeof Symbol('bar') !== 'symbol') {
    return false;
  }
  return hasSymbolSham();
};

/***/ }),

/***/ 7168:
/*!************************************************!*\
  !*** ../app/node_modules/has-symbols/shams.js ***!
  \************************************************/
/***/ ((module) => {

"use strict";


/* eslint complexity: [2, 18], max-statements: [2, 33] */
module.exports = function hasSymbols() {
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') {
    return false;
  }
  if (typeof Symbol.iterator === 'symbol') {
    return true;
  }
  var obj = {};
  var sym = Symbol('test');
  var symObj = Object(sym);
  if (typeof sym === 'string') {
    return false;
  }
  if (Object.prototype.toString.call(sym) !== '[object Symbol]') {
    return false;
  }
  if (Object.prototype.toString.call(symObj) !== '[object Symbol]') {
    return false;
  }

  // temp disabled per https://github.com/ljharb/object.assign/issues/17
  // if (sym instanceof Symbol) { return false; }
  // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
  // if (!(symObj instanceof Symbol)) { return false; }

  // if (typeof Symbol.prototype.toString !== 'function') { return false; }
  // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }

  var symVal = 42;
  obj[sym] = symVal;
  for (sym in obj) {
    return false;
  } // eslint-disable-line no-restricted-syntax
  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) {
    return false;
  }
  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) {
    return false;
  }
  var syms = Object.getOwnPropertySymbols(obj);
  if (syms.length !== 1 || syms[0] !== sym) {
    return false;
  }
  if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
    return false;
  }
  if (typeof Object.getOwnPropertyDescriptor === 'function') {
    var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
    if (descriptor.value !== symVal || descriptor.enumerable !== true) {
      return false;
    }
  }
  return true;
};

/***/ }),

/***/ 4499:
/*!********************************************!*\
  !*** ../app/node_modules/has/src/index.js ***!
  \********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var bind = __webpack_require__(/*! function-bind */ 941);
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);

/***/ }),

/***/ 9344:
/*!***************************************************!*\
  !*** ../app/node_modules/is-date-object/index.js ***!
  \***************************************************/
/***/ ((module) => {

"use strict";


var getDay = Date.prototype.getDay;
var tryDateObject = function tryDateGetDayCall(value) {
  try {
    getDay.call(value);
    return true;
  } catch (e) {
    return false;
  }
};
var toStr = Object.prototype.toString;
var dateClass = '[object Date]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isDateObject(value) {
  if (typeof value !== 'object' || value === null) {
    return false;
  }
  return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
};

/***/ }),

/***/ 5208:
/*!*********************************************!*\
  !*** ../app/node_modules/is-regex/index.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var hasSymbols = __webpack_require__(/*! has-symbols */ 2074)();
var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';
var hasOwnProperty;
var regexExec;
var isRegexMarker;
var badStringifier;
if (hasToStringTag) {
  hasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
  regexExec = Function.call.bind(RegExp.prototype.exec);
  isRegexMarker = {};
  var throwRegexMarker = function () {
    throw isRegexMarker;
  };
  badStringifier = {
    toString: throwRegexMarker,
    valueOf: throwRegexMarker
  };
  if (typeof Symbol.toPrimitive === 'symbol') {
    badStringifier[Symbol.toPrimitive] = throwRegexMarker;
  }
}
var toStr = Object.prototype.toString;
var gOPD = Object.getOwnPropertyDescriptor;
var regexClass = '[object RegExp]';
module.exports = hasToStringTag
// eslint-disable-next-line consistent-return
? function isRegex(value) {
  if (!value || typeof value !== 'object') {
    return false;
  }
  var descriptor = gOPD(value, 'lastIndex');
  var hasLastIndexDataProperty = descriptor && hasOwnProperty(descriptor, 'value');
  if (!hasLastIndexDataProperty) {
    return false;
  }
  try {
    regexExec(value, badStringifier);
  } catch (e) {
    return e === isRegexMarker;
  }
} : function isRegex(value) {
  // In older browsers, typeof regex incorrectly returns 'function'
  if (!value || typeof value !== 'object' && typeof value !== 'function') {
    return false;
  }
  return toStr.call(value) === regexClass;
};

/***/ }),

/***/ 9866:
/*!**********************************************!*\
  !*** ../app/node_modules/is-symbol/index.js ***!
  \**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var toStr = Object.prototype.toString;
var hasSymbols = __webpack_require__(/*! has-symbols */ 2074)();
if (hasSymbols) {
  var symToStr = Symbol.prototype.toString;
  var symStringRegex = /^Symbol\(.*\)$/;
  var isSymbolObject = function isRealSymbolObject(value) {
    if (typeof value.valueOf() !== 'symbol') {
      return false;
    }
    return symStringRegex.test(symToStr.call(value));
  };
  module.exports = function isSymbol(value) {
    if (typeof value === 'symbol') {
      return true;
    }
    if (toStr.call(value) !== '[object Symbol]') {
      return false;
    }
    try {
      return isSymbolObject(value);
    } catch (e) {
      return false;
    }
  };
} else {
  module.exports = function isSymbol(value) {
    // this environment does not support Symbols.
    return  false && 0;
  };
}

/***/ }),

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

var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
  return toString.call(arr) == '[object Array]';
};

/***/ }),

/***/ 788:
/*!***************************************************!*\
  !*** ../app/node_modules/object-inspect/index.js ***!
  \***************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var hasMap = typeof Map === 'function' && Map.prototype;
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
var mapForEach = hasMap && Map.prototype.forEach;
var hasSet = typeof Set === 'function' && Set.prototype;
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
var setForEach = hasSet && Set.prototype.forEach;
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
var booleanValueOf = Boolean.prototype.valueOf;
var objectToString = Object.prototype.toString;
var functionToString = Function.prototype.toString;
var match = String.prototype.match;
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
var gOPS = Object.getOwnPropertySymbols;
var symToString = typeof Symbol === 'function' ? Symbol.prototype.toString : null;
var isEnumerable = Object.prototype.propertyIsEnumerable;
var inspectCustom = (__webpack_require__(/*! ./util.inspect */ 1894).custom);
var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
module.exports = function inspect_(obj, options, depth, seen) {
  var opts = options || {};
  if (has(opts, 'quoteStyle') && opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double') {
    throw new TypeError('option "quoteStyle" must be "single" or "double"');
  }
  if (has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
    throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  }
  var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
  if (typeof customInspect !== 'boolean') {
    throw new TypeError('option "customInspect", if provided, must be `true` or `false`');
  }
  if (has(opts, 'indent') && opts.indent !== null && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
    throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');
  }
  if (typeof obj === 'undefined') {
    return 'undefined';
  }
  if (obj === null) {
    return 'null';
  }
  if (typeof obj === 'boolean') {
    return obj ? 'true' : 'false';
  }
  if (typeof obj === 'string') {
    return inspectString(obj, opts);
  }
  if (typeof obj === 'number') {
    if (obj === 0) {
      return Infinity / obj > 0 ? '0' : '-0';
    }
    return String(obj);
  }
  if (typeof obj === 'bigint') {
    return String(obj) + 'n';
  }
  var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
  if (typeof depth === 'undefined') {
    depth = 0;
  }
  if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
    return isArray(obj) ? '[Array]' : '[Object]';
  }
  var indent = getIndent(opts, depth);
  if (typeof seen === 'undefined') {
    seen = [];
  } else if (indexOf(seen, obj) >= 0) {
    return '[Circular]';
  }
  function inspect(value, from, noIndent) {
    if (from) {
      seen = seen.slice();
      seen.push(from);
    }
    if (noIndent) {
      var newOpts = {
        depth: opts.depth
      };
      if (has(opts, 'quoteStyle')) {
        newOpts.quoteStyle = opts.quoteStyle;
      }
      return inspect_(value, newOpts, depth + 1, seen);
    }
    return inspect_(value, opts, depth + 1, seen);
  }
  if (typeof obj === 'function') {
    var name = nameOf(obj);
    var keys = arrObjKeys(obj, inspect);
    return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : '');
  }
  if (isSymbol(obj)) {
    var symString = symToString.call(obj);
    return typeof obj === 'object' ? markBoxed(symString) : symString;
  }
  if (isElement(obj)) {
    var s = '<' + String(obj.nodeName).toLowerCase();
    var attrs = obj.attributes || [];
    for (var i = 0; i < attrs.length; i++) {
      s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
    }
    s += '>';
    if (obj.childNodes && obj.childNodes.length) {
      s += '...';
    }
    s += '</' + String(obj.nodeName).toLowerCase() + '>';
    return s;
  }
  if (isArray(obj)) {
    if (obj.length === 0) {
      return '[]';
    }
    var xs = arrObjKeys(obj, inspect);
    if (indent && !singleLineValues(xs)) {
      return '[' + indentedJoin(xs, indent) + ']';
    }
    return '[ ' + xs.join(', ') + ' ]';
  }
  if (isError(obj)) {
    var parts = arrObjKeys(obj, inspect);
    if (parts.length === 0) {
      return '[' + String(obj) + ']';
    }
    return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }';
  }
  if (typeof obj === 'object' && customInspect) {
    if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
      return obj[inspectSymbol]();
    } else if (typeof obj.inspect === 'function') {
      return obj.inspect();
    }
  }
  if (isMap(obj)) {
    var mapParts = [];
    mapForEach.call(obj, function (value, key) {
      mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
    });
    return collectionOf('Map', mapSize.call(obj), mapParts, indent);
  }
  if (isSet(obj)) {
    var setParts = [];
    setForEach.call(obj, function (value) {
      setParts.push(inspect(value, obj));
    });
    return collectionOf('Set', setSize.call(obj), setParts, indent);
  }
  if (isWeakMap(obj)) {
    return weakCollectionOf('WeakMap');
  }
  if (isWeakSet(obj)) {
    return weakCollectionOf('WeakSet');
  }
  if (isNumber(obj)) {
    return markBoxed(inspect(Number(obj)));
  }
  if (isBigInt(obj)) {
    return markBoxed(inspect(bigIntValueOf.call(obj)));
  }
  if (isBoolean(obj)) {
    return markBoxed(booleanValueOf.call(obj));
  }
  if (isString(obj)) {
    return markBoxed(inspect(String(obj)));
  }
  if (!isDate(obj) && !isRegExp(obj)) {
    var ys = arrObjKeys(obj, inspect);
    if (ys.length === 0) {
      return '{}';
    }
    if (indent) {
      return '{' + indentedJoin(ys, indent) + '}';
    }
    return '{ ' + ys.join(', ') + ' }';
  }
  return String(obj);
};
function wrapQuotes(s, defaultStyle, opts) {
  var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
  return quoteChar + s + quoteChar;
}
function quote(s) {
  return String(s).replace(/"/g, '&quot;');
}
function isArray(obj) {
  return toStr(obj) === '[object Array]';
}
function isDate(obj) {
  return toStr(obj) === '[object Date]';
}
function isRegExp(obj) {
  return toStr(obj) === '[object RegExp]';
}
function isError(obj) {
  return toStr(obj) === '[object Error]';
}
function isSymbol(obj) {
  return toStr(obj) === '[object Symbol]';
}
function isString(obj) {
  return toStr(obj) === '[object String]';
}
function isNumber(obj) {
  return toStr(obj) === '[object Number]';
}
function isBigInt(obj) {
  return toStr(obj) === '[object BigInt]';
}
function isBoolean(obj) {
  return toStr(obj) === '[object Boolean]';
}
var hasOwn = Object.prototype.hasOwnProperty || function (key) {
  return key in this;
};
function has(obj, key) {
  return hasOwn.call(obj, key);
}
function toStr(obj) {
  return objectToString.call(obj);
}
function nameOf(f) {
  if (f.name) {
    return f.name;
  }
  var m = match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  if (m) {
    return m[1];
  }
  return null;
}
function indexOf(xs, x) {
  if (xs.indexOf) {
    return xs.indexOf(x);
  }
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) {
      return i;
    }
  }
  return -1;
}
function isMap(x) {
  if (!mapSize || !x || typeof x !== 'object') {
    return false;
  }
  try {
    mapSize.call(x);
    try {
      setSize.call(x);
    } catch (s) {
      return true;
    }
    return x instanceof Map; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
}
function isWeakMap(x) {
  if (!weakMapHas || !x || typeof x !== 'object') {
    return false;
  }
  try {
    weakMapHas.call(x, weakMapHas);
    try {
      weakSetHas.call(x, weakSetHas);
    } catch (s) {
      return true;
    }
    return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
}
function isSet(x) {
  if (!setSize || !x || typeof x !== 'object') {
    return false;
  }
  try {
    setSize.call(x);
    try {
      mapSize.call(x);
    } catch (m) {
      return true;
    }
    return x instanceof Set; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
}
function isWeakSet(x) {
  if (!weakSetHas || !x || typeof x !== 'object') {
    return false;
  }
  try {
    weakSetHas.call(x, weakSetHas);
    try {
      weakMapHas.call(x, weakMapHas);
    } catch (s) {
      return true;
    }
    return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
}
function isElement(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
    return true;
  }
  return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
}
function inspectString(str, opts) {
  if (str.length > opts.maxStringLength) {
    var remaining = str.length - opts.maxStringLength;
    var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
    return inspectString(str.slice(0, opts.maxStringLength), opts) + trailer;
  }
  // eslint-disable-next-line no-control-regex
  var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte);
  return wrapQuotes(s, 'single', opts);
}
function lowbyte(c) {
  var n = c.charCodeAt(0);
  var x = {
    8: 'b',
    9: 't',
    10: 'n',
    12: 'f',
    13: 'r'
  }[n];
  if (x) {
    return '\\' + x;
  }
  return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16).toUpperCase();
}
function markBoxed(str) {
  return 'Object(' + str + ')';
}
function weakCollectionOf(type) {
  return type + ' { ? }';
}
function collectionOf(type, size, entries, indent) {
  var joinedEntries = indent ? indentedJoin(entries, indent) : entries.join(', ');
  return type + ' (' + size + ') {' + joinedEntries + '}';
}
function singleLineValues(xs) {
  for (var i = 0; i < xs.length; i++) {
    if (indexOf(xs[i], '\n') >= 0) {
      return false;
    }
  }
  return true;
}
function getIndent(opts, depth) {
  var baseIndent;
  if (opts.indent === '\t') {
    baseIndent = '\t';
  } else if (typeof opts.indent === 'number' && opts.indent > 0) {
    baseIndent = Array(opts.indent + 1).join(' ');
  } else {
    return null;
  }
  return {
    base: baseIndent,
    prev: Array(depth + 1).join(baseIndent)
  };
}
function indentedJoin(xs, indent) {
  if (xs.length === 0) {
    return '';
  }
  var lineJoiner = '\n' + indent.prev + indent.base;
  return lineJoiner + xs.join(',' + lineJoiner) + '\n' + indent.prev;
}
function arrObjKeys(obj, inspect) {
  var isArr = isArray(obj);
  var xs = [];
  if (isArr) {
    xs.length = obj.length;
    for (var i = 0; i < obj.length; i++) {
      xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
    }
  }
  for (var key in obj) {
    // eslint-disable-line no-restricted-syntax
    if (!has(obj, key)) {
      continue;
    } // eslint-disable-line no-restricted-syntax, no-continue
    if (isArr && String(Number(key)) === key && key < obj.length) {
      continue;
    } // eslint-disable-line no-restricted-syntax, no-continue
    if (/[^\w$]/.test(key)) {
      xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
    } else {
      xs.push(key + ': ' + inspect(obj[key], obj));
    }
  }
  if (typeof gOPS === 'function') {
    var syms = gOPS(obj);
    for (var j = 0; j < syms.length; j++) {
      if (isEnumerable.call(obj, syms[j])) {
        xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
      }
    }
  }
  return xs;
}

/***/ }),

/***/ 1894:
/*!**********************************************************!*\
  !*** ../app/node_modules/object-inspect/util.inspect.js ***!
  \**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(/*! util */ 3837).inspect;

/***/ }),

/***/ 4390:
/*!*********************************************************!*\
  !*** ../app/node_modules/object-keys/implementation.js ***!
  \*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var keysShim;
if (!Object.keys) {
  // modified from https://github.com/es-shims/es5-shim
  var has = Object.prototype.hasOwnProperty;
  var toStr = Object.prototype.toString;
  var isArgs = __webpack_require__(/*! ./isArguments */ 4976); // eslint-disable-line global-require
  var isEnumerable = Object.prototype.propertyIsEnumerable;
  var hasDontEnumBug = !isEnumerable.call({
    toString: null
  }, 'toString');
  var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
  var dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'];
  var equalsConstructorPrototype = function (o) {
    var ctor = o.constructor;
    return ctor && ctor.prototype === o;
  };
  var excludedKeys = {
    $applicationCache: true,
    $console: true,
    $external: true,
    $frame: true,
    $frameElement: true,
    $frames: true,
    $innerHeight: true,
    $innerWidth: true,
    $onmozfullscreenchange: true,
    $onmozfullscreenerror: true,
    $outerHeight: true,
    $outerWidth: true,
    $pageXOffset: true,
    $pageYOffset: true,
    $parent: true,
    $scrollLeft: true,
    $scrollTop: true,
    $scrollX: true,
    $scrollY: true,
    $self: true,
    $webkitIndexedDB: true,
    $webkitStorageInfo: true,
    $window: true
  };
  var hasAutomationEqualityBug = function () {
    /* global window */
    if (typeof window === 'undefined') {
      return false;
    }
    for (var k in window) {
      try {
        if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
          try {
            equalsConstructorPrototype(window[k]);
          } catch (e) {
            return true;
          }
        }
      } catch (e) {
        return true;
      }
    }
    return false;
  }();
  var equalsConstructorPrototypeIfNotBuggy = function (o) {
    /* global window */
    if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
      return equalsConstructorPrototype(o);
    }
    try {
      return equalsConstructorPrototype(o);
    } catch (e) {
      return false;
    }
  };
  keysShim = function keys(object) {
    var isObject = object !== null && typeof object === 'object';
    var isFunction = toStr.call(object) === '[object Function]';
    var isArguments = isArgs(object);
    var isString = isObject && toStr.call(object) === '[object String]';
    var theKeys = [];
    if (!isObject && !isFunction && !isArguments) {
      throw new TypeError('Object.keys called on a non-object');
    }
    var skipProto = hasProtoEnumBug && isFunction;
    if (isString && object.length > 0 && !has.call(object, 0)) {
      for (var i = 0; i < object.length; ++i) {
        theKeys.push(String(i));
      }
    }
    if (isArguments && object.length > 0) {
      for (var j = 0; j < object.length; ++j) {
        theKeys.push(String(j));
      }
    } else {
      for (var name in object) {
        if (!(skipProto && name === 'prototype') && has.call(object, name)) {
          theKeys.push(String(name));
        }
      }
    }
    if (hasDontEnumBug) {
      var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
      for (var k = 0; k < dontEnums.length; ++k) {
        if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
          theKeys.push(dontEnums[k]);
        }
      }
    }
    return theKeys;
  };
}
module.exports = keysShim;

/***/ }),

/***/ 2877:
/*!************************************************!*\
  !*** ../app/node_modules/object-keys/index.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var slice = Array.prototype.slice;
var isArgs = __webpack_require__(/*! ./isArguments */ 4976);
var origKeys = Object.keys;
var keysShim = origKeys ? function keys(o) {
  return origKeys(o);
} : __webpack_require__(/*! ./implementation */ 4390);
var originalKeys = Object.keys;
keysShim.shim = function shimObjectKeys() {
  if (Object.keys) {
    var keysWorksWithArguments = function () {
      // Safari 5.0 bug
      var args = Object.keys(arguments);
      return args && args.length === arguments.length;
    }(1, 2);
    if (!keysWorksWithArguments) {
      Object.keys = function keys(object) {
        // eslint-disable-line func-name-matching
        if (isArgs(object)) {
          return originalKeys(slice.call(object));
        }
        return originalKeys(object);
      };
    }
  } else {
    Object.keys = keysShim;
  }
  return Object.keys || keysShim;
};
module.exports = keysShim;

/***/ }),

/***/ 4976:
/*!******************************************************!*\
  !*** ../app/node_modules/object-keys/isArguments.js ***!
  \******************************************************/
/***/ ((module) => {

"use strict";


var toStr = Object.prototype.toString;
module.exports = function isArguments(value) {
  var str = toStr.call(value);
  var isArgs = str === '[object Arguments]';
  if (!isArgs) {
    isArgs = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && toStr.call(value.callee) === '[object Function]';
  }
  return isArgs;
};

/***/ }),

/***/ 4887:
/*!***********************************************************!*\
  !*** ../app/node_modules/object.assign/implementation.js ***!
  \***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


// modified from https://github.com/es-shims/es6-shim
var keys = __webpack_require__(/*! object-keys */ 2877);
var canBeObject = function (obj) {
  return typeof obj !== 'undefined' && obj !== null;
};
var hasSymbols = __webpack_require__(/*! has-symbols/shams */ 7168)();
var callBound = __webpack_require__(/*! call-bind/callBound */ 7252);
var toObject = Object;
var $push = callBound('Array.prototype.push');
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;

// eslint-disable-next-line no-unused-vars
module.exports = function assign(target, source1) {
  if (!canBeObject(target)) {
    throw new TypeError('target must be an object');
  }
  var objTarget = toObject(target);
  var s, source, i, props, syms, value, key;
  for (s = 1; s < arguments.length; ++s) {
    source = toObject(arguments[s]);
    props = keys(source);
    var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
    if (getSymbols) {
      syms = getSymbols(source);
      for (i = 0; i < syms.length; ++i) {
        key = syms[i];
        if ($propIsEnumerable(source, key)) {
          $push(props, key);
        }
      }
    }
    for (i = 0; i < props.length; ++i) {
      key = props[i];
      value = source[key];
      if ($propIsEnumerable(source, key)) {
        objTarget[key] = value;
      }
    }
  }
  return objTarget;
};

/***/ }),

/***/ 6443:
/*!**************************************************!*\
  !*** ../app/node_modules/object.assign/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var defineProperties = __webpack_require__(/*! define-properties */ 9951);
var callBind = __webpack_require__(/*! call-bind */ 1231);
var implementation = __webpack_require__(/*! ./implementation */ 4887);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 9530);
var shim = __webpack_require__(/*! ./shim */ 8369);
var polyfill = callBind.apply(getPolyfill());
// eslint-disable-next-line no-unused-vars
var bound = function assign(target, source1) {
  return polyfill(Object, arguments);
};
defineProperties(bound, {
  getPolyfill: getPolyfill,
  implementation: implementation,
  shim: shim
});
module.exports = bound;

/***/ }),

/***/ 9530:
/*!*****************************************************!*\
  !*** ../app/node_modules/object.assign/polyfill.js ***!
  \*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 4887);
var lacksProperEnumerationOrder = function () {
  if (!Object.assign) {
    return false;
  }
  /*
   * v8, specifically in node 4.x, has a bug with incorrect property enumeration order
   * note: this does not detect the bug unless there's 20 characters
   */
  var str = 'abcdefghijklmnopqrst';
  var letters = str.split('');
  var map = {};
  for (var i = 0; i < letters.length; ++i) {
    map[letters[i]] = letters[i];
  }
  var obj = Object.assign({}, map);
  var actual = '';
  for (var k in obj) {
    actual += k;
  }
  return str !== actual;
};
var assignHasPendingExceptions = function () {
  if (!Object.assign || !Object.preventExtensions) {
    return false;
  }
  /*
   * Firefox 37 still has "pending exception" logic in its Object.assign implementation,
   * which is 72% slower than our shim, and Firefox 40's native implementation.
   */
  var thrower = Object.preventExtensions({
    1: 2
  });
  try {
    Object.assign(thrower, 'xy');
  } catch (e) {
    return thrower[1] === 'y';
  }
  return false;
};
module.exports = function getPolyfill() {
  if (!Object.assign) {
    return implementation;
  }
  if (lacksProperEnumerationOrder()) {
    return implementation;
  }
  if (assignHasPendingExceptions()) {
    return implementation;
  }
  return Object.assign;
};

/***/ }),

/***/ 8369:
/*!*************************************************!*\
  !*** ../app/node_modules/object.assign/shim.js ***!
  \*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var define = __webpack_require__(/*! define-properties */ 9951);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 9530);
module.exports = function shimAssign() {
  var polyfill = getPolyfill();
  define(Object, {
    assign: polyfill
  }, {
    assign: function () {
      return Object.assign !== polyfill;
    }
  });
  return polyfill;
};

/***/ }),

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

"use strict";


/**
 * Module dependenices
 */
const clone = __webpack_require__(/*! shallow-clone */ 3773);
const typeOf = __webpack_require__(/*! kind-of */ 9996);
const isPlainObject = __webpack_require__(/*! is-plain-object */ 9854);
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;

/***/ }),

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

/***/ }),

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

"use strict";


module.exports = function (url, options) {
  if (!options) {
    options = {};
  }
  if (!url) {
    return url;
  }
  url = String(url.__esModule ? url.default : url);

  // If url is already wrapped in quotes, remove them
  if (/^['"].*['"]$/.test(url)) {
    url = url.slice(1, -1);
  }
  if (options.hash) {
    url += options.hash;
  }

  // Should url be wrapped?
  // See https://drafts.csswg.org/css-values-3/#urls
  if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
    return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
  }
  return url;
};

/***/ }),

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

/***/ }),

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

"use strict";


var objectKeys = __webpack_require__(/*! object-keys */ 2877);
var isArguments = __webpack_require__(/*! is-arguments */ 6994);
var is = __webpack_require__(/*! object-is */ 7666);
var isRegex = __webpack_require__(/*! is-regex */ 5208);
var flags = __webpack_require__(/*! regexp.prototype.flags */ 2248);
var isArray = __webpack_require__(/*! isarray */ 3381);
var isDate = __webpack_require__(/*! is-date-object */ 9344);
var whichBoxedPrimitive = __webpack_require__(/*! which-boxed-primitive */ 7475);
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 5832);
var callBound = __webpack_require__(/*! call-bind/callBound */ 7252);
var whichCollection = __webpack_require__(/*! which-collection */ 4386);
var getIterator = __webpack_require__(/*! es-get-iterator */ 1793);
var getSideChannel = __webpack_require__(/*! side-channel */ 4078);
var whichTypedArray = __webpack_require__(/*! which-typed-array */ 1765);
var assign = __webpack_require__(/*! object.assign */ 6443);
var $getTime = callBound('Date.prototype.getTime');
var gPO = Object.getPrototypeOf;
var $objToString = callBound('Object.prototype.toString');
var $Set = GetIntrinsic('%Set%', true);
var $mapHas = callBound('Map.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSize = callBound('Map.prototype.size', true);
var $setAdd = callBound('Set.prototype.add', true);
var $setDelete = callBound('Set.prototype.delete', true);
var $setHas = callBound('Set.prototype.has', true);
var $setSize = callBound('Set.prototype.size', true);

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
function setHasEqualElement(set, val1, opts, channel) {
  var i = getIterator(set);
  var result;
  while ((result = i.next()) && !result.done) {
    if (internalDeepEqual(val1, result.value, opts, channel)) {
      // eslint-disable-line no-use-before-define
      // Remove the matching element to make sure we do not check that again.
      $setDelete(set, result.value);
      return true;
    }
  }
  return false;
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
function findLooseMatchingPrimitives(prim) {
  if (typeof prim === 'undefined') {
    return null;
  }
  if (typeof prim === 'object') {
    // Only pass in null as object!
    return void 0;
  }
  if (typeof prim === 'symbol') {
    return false;
  }
  if (typeof prim === 'string' || typeof prim === 'number') {
    // Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
    return +prim === +prim; // eslint-disable-line no-implicit-coercion
  }

  return true;
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
  var altValue = findLooseMatchingPrimitives(prim);
  if (altValue != null) {
    return altValue;
  }
  var curB = $mapGet(b, altValue);
  var looseOpts = assign({}, opts, {
    strict: false
  });
  if (typeof curB === 'undefined' && !$mapHas(b, altValue)
  // eslint-disable-next-line no-use-before-define
  || !internalDeepEqual(item, curB, looseOpts, channel)) {
    return false;
  }
  // eslint-disable-next-line no-use-before-define
  return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
function setMightHaveLoosePrim(a, b, prim) {
  var altValue = findLooseMatchingPrimitives(prim);
  if (altValue != null) {
    return altValue;
  }
  return $setHas(b, altValue) && !$setHas(a, altValue);
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
  var i = getIterator(set);
  var result;
  var key2;
  while ((result = i.next()) && !result.done) {
    key2 = result.value;
    if (
    // eslint-disable-next-line no-use-before-define
    internalDeepEqual(key1, key2, opts, channel)
    // eslint-disable-next-line no-use-before-define
    && internalDeepEqual(item1, $mapGet(map, key2), opts, channel)) {
      $setDelete(set, key2);
      return true;
    }
  }
  return false;
}
function internalDeepEqual(actual, expected, options, channel) {
  var opts = options || {};

  // 7.1. All identical values are equivalent, as determined by ===.
  if (opts.strict ? is(actual, expected) : actual === expected) {
    return true;
  }
  var actualBoxed = whichBoxedPrimitive(actual);
  var expectedBoxed = whichBoxedPrimitive(expected);
  if (actualBoxed !== expectedBoxed) {
    return false;
  }

  // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
  if (!actual || !expected || typeof actual !== 'object' && typeof expected !== 'object') {
    return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
  }

  /*
   * 7.4. For all other Object pairs, including Array objects, equivalence is
   * determined by having the same number of owned properties (as verified
   * with Object.prototype.hasOwnProperty.call), the same set of keys
   * (although not necessarily the same order), equivalent values for every
   * corresponding key, and an identical 'prototype' property. Note: this
   * accounts for both named and indexed properties on Arrays.
   */
  // see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration

  var hasActual = channel.has(actual);
  var hasExpected = channel.has(expected);
  var sentinel;
  if (hasActual && hasExpected) {
    if (channel.get(actual) === channel.get(expected)) {
      return true;
    }
  } else {
    sentinel = {};
  }
  if (!hasActual) {
    channel.set(actual, sentinel);
  }
  if (!hasExpected) {
    channel.set(expected, sentinel);
  }

  // eslint-disable-next-line no-use-before-define
  return objEquiv(actual, expected, opts, channel);
}
function isBuffer(x) {
  if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
    return false;
  }
  if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
    return false;
  }
  if (x.length > 0 && typeof x[0] !== 'number') {
    return false;
  }
  return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
}
function setEquiv(a, b, opts, channel) {
  if ($setSize(a) !== $setSize(b)) {
    return false;
  }
  var iA = getIterator(a);
  var iB = getIterator(b);
  var resultA;
  var resultB;
  var set;
  while ((resultA = iA.next()) && !resultA.done) {
    if (resultA.value && typeof resultA.value === 'object') {
      if (!set) {
        set = new $Set();
      }
      $setAdd(set, resultA.value);
    } else if (!$setHas(b, resultA.value)) {
      if (opts.strict) {
        return false;
      }
      if (!setMightHaveLoosePrim(a, b, resultA.value)) {
        return false;
      }
      if (!set) {
        set = new $Set();
      }
      $setAdd(set, resultA.value);
    }
  }
  if (set) {
    while ((resultB = iB.next()) && !resultB.done) {
      // We have to check if a primitive value is already matching and only if it's not, go hunting for it.
      if (resultB.value && typeof resultB.value === 'object') {
        if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
          return false;
        }
      } else if (!opts.strict && !$setHas(a, resultB.value) && !setHasEqualElement(set, resultB.value, opts.strict, channel)) {
        return false;
      }
    }
    return $setSize(set) === 0;
  }
  return true;
}
function mapEquiv(a, b, opts, channel) {
  if ($mapSize(a) !== $mapSize(b)) {
    return false;
  }
  var iA = getIterator(a);
  var iB = getIterator(b);
  var resultA;
  var resultB;
  var set;
  var key;
  var item1;
  var item2;
  while ((resultA = iA.next()) && !resultA.done) {
    key = resultA.value[0];
    item1 = resultA.value[1];
    if (key && typeof key === 'object') {
      if (!set) {
        set = new $Set();
      }
      $setAdd(set, key);
    } else {
      item2 = $mapGet(b, key);
      if (typeof item2 === 'undefined' && !$mapHas(b, key) || !internalDeepEqual(item1, item2, opts, channel)) {
        if (opts.strict) {
          return false;
        }
        if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
          return false;
        }
        if (!set) {
          set = new $Set();
        }
        $setAdd(set, key);
      }
    }
  }
  if (set) {
    while ((resultB = iB.next()) && !resultB.done) {
      key = resultB.value[0];
      item2 = resultB.value[1];
      if (key && typeof key === 'object') {
        if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
          return false;
        }
      } else if (!opts.strict && (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel)) && !mapHasEqualEntry(set, a, key, item2, assign({}, opts, {
        strict: false
      }), channel)) {
        return false;
      }
    }
    return $setSize(set) === 0;
  }
  return true;
}
function objEquiv(a, b, opts, channel) {
  /* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5] */
  var i, key;
  if (typeof a !== typeof b) {
    return false;
  }
  if (a == null || b == null) {
    return false;
  }
  if ($objToString(a) !== $objToString(b)) {
    return false;
  }
  if (isArguments(a) !== isArguments(b)) {
    return false;
  }
  var aIsArray = isArray(a);
  var bIsArray = isArray(b);
  if (aIsArray !== bIsArray) {
    return false;
  }

  // TODO: replace when a cross-realm brand check is available
  var aIsError = a instanceof Error;
  var bIsError = b instanceof Error;
  if (aIsError !== bIsError) {
    return false;
  }
  if (aIsError || bIsError) {
    if (a.name !== b.name || a.message !== b.message) {
      return false;
    }
  }
  var aIsRegex = isRegex(a);
  var bIsRegex = isRegex(b);
  if (aIsRegex !== bIsRegex) {
    return false;
  }
  if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
    return false;
  }
  var aIsDate = isDate(a);
  var bIsDate = isDate(b);
  if (aIsDate !== bIsDate) {
    return false;
  }
  if (aIsDate || bIsDate) {
    // && would work too, because both are true or both false here
    if ($getTime(a) !== $getTime(b)) {
      return false;
    }
  }
  if (opts.strict && gPO && gPO(a) !== gPO(b)) {
    return false;
  }
  if (whichTypedArray(a) !== whichTypedArray(b)) {
    return false;
  }
  var aIsBuffer = isBuffer(a);
  var bIsBuffer = isBuffer(b);
  if (aIsBuffer !== bIsBuffer) {
    return false;
  }
  if (aIsBuffer || bIsBuffer) {
    // && would work too, because both are true or both false here
    if (a.length !== b.length) {
      return false;
    }
    for (i = 0; i < a.length; i++) {
      if (a[i] !== b[i]) {
        return false;
      }
    }
    return true;
  }
  if (typeof a !== typeof b) {
    return false;
  }
  var ka = objectKeys(a);
  var kb = objectKeys(b);
  // having the same number of owned properties (keys incorporates hasOwnProperty)
  if (ka.length !== kb.length) {
    return false;
  }

  // the same set of keys (although not necessarily the same order),
  ka.sort();
  kb.sort();
  // ~~~cheap key test
  for (i = ka.length - 1; i >= 0; i--) {
    if (ka[i] != kb[i]) {
      return false;
    } // eslint-disable-line eqeqeq
  }

  // equivalent values for every corresponding key, and ~~~possibly expensive deep test
  for (i = ka.length - 1; i >= 0; i--) {
    key = ka[i];
    if (!internalDeepEqual(a[key], b[key], opts, channel)) {
      return false;
    }
  }
  var aCollection = whichCollection(a);
  var bCollection = whichCollection(b);
  if (aCollection !== bCollection) {
    return false;
  }
  if (aCollection === 'Set' || bCollection === 'Set') {
    // aCollection === bCollection
    return setEquiv(a, b, opts, channel);
  }
  if (aCollection === 'Map') {
    // aCollection === bCollection
    return mapEquiv(a, b, opts, channel);
  }
  return true;
}
module.exports = function deepEqual(a, b, opts) {
  return internalDeepEqual(a, b, opts, getSideChannel());
};

/***/ }),

/***/ 9889:
/*!****************************************!*\
  !*** ../node_modules/foreach/index.js ***!
  \****************************************/
/***/ ((module) => {

var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;
module.exports = function forEach(obj, fn, ctx) {
  if (toString.call(fn) !== '[object Function]') {
    throw new TypeError('iterator must be a function');
  }
  var l = obj.length;
  if (l === +l) {
    for (var i = 0; i < l; i++) {
      fn.call(ctx, obj[i], i, obj);
    }
  } else {
    for (var k in obj) {
      if (hasOwn.call(obj, k)) {
        fn.call(ctx, obj[k], k, obj);
      }
    }
  }
};

/***/ }),

/***/ 8221:
/*!********************************************!*\
  !*** ../node_modules/has-bigints/index.js ***!
  \********************************************/
/***/ ((module) => {

"use strict";


var $BigInt = global.BigInt;
module.exports = function hasNativeBigInts() {
  return typeof $BigInt === 'function' && typeof BigInt === 'function' && typeof $BigInt(42) === 'bigint' // eslint-disable-line no-magic-numbers
  && typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers
};

/***/ }),

/***/ 3631:
/*!************************************************!*\
  !*** ../node_modules/has-tostringtag/shams.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var hasSymbols = __webpack_require__(/*! has-symbols/shams */ 7168);
module.exports = function hasToStringTagShams() {
  return hasSymbols() && !!Symbol.toStringTag;
};

/***/ }),

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

"use strict";


var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 3631)();
var callBound = __webpack_require__(/*! call-bind/callBound */ 7252);
var $toString = callBound('Object.prototype.toString');
var isStandardArguments = function isArguments(value) {
  if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
    return false;
  }
  return $toString(value) === '[object Arguments]';
};
var isLegacyArguments = function isArguments(value) {
  if (isStandardArguments(value)) {
    return true;
  }
  return value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && $toString(value) !== '[object Array]' && $toString(value.callee) === '[object Function]';
};
var supportsStandardArguments = function () {
  return isStandardArguments(arguments);
}();
isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests

module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;

/***/ }),

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

"use strict";


var hasBigInts = __webpack_require__(/*! has-bigints */ 8221)();
if (hasBigInts) {
  var bigIntValueOf = BigInt.prototype.valueOf;
  var tryBigInt = function tryBigIntObject(value) {
    try {
      bigIntValueOf.call(value);
      return true;
    } catch (e) {}
    return false;
  };
  module.exports = function isBigInt(value) {
    if (value === null || typeof value === 'undefined' || typeof value === 'boolean' || typeof value === 'string' || typeof value === 'number' || typeof value === 'symbol' || typeof value === 'function') {
      return false;
    }
    if (typeof value === 'bigint') {
      return true;
    }
    return tryBigInt(value);
  };
} else {
  module.exports = function isBigInt(value) {
    return  false && 0;
  };
}

/***/ }),

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

"use strict";


var callBound = __webpack_require__(/*! call-bind/callBound */ 7252);
var $boolToStr = callBound('Boolean.prototype.toString');
var $toString = callBound('Object.prototype.toString');
var tryBooleanObject = function booleanBrandCheck(value) {
  try {
    $boolToStr(value);
    return true;
  } catch (e) {
    return false;
  }
};
var boolClass = '[object Boolean]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 3631)();
module.exports = function isBoolean(value) {
  if (typeof value === 'boolean') {
    return true;
  }
  if (value === null || typeof value !== 'object') {
    return false;
  }
  return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
};

/***/ }),

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

"use strict";


var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;
var exported;
if (!$Map) {
  // eslint-disable-next-line no-unused-vars
  exported = function isMap(x) {
    // `Map` is not present in this environment.
    return false;
  };
}
var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$mapHas) {
  // eslint-disable-next-line no-unused-vars
  exported = function isMap(x) {
    // `Map` does not have a `has` method
    return false;
  };
}
module.exports = exported || function isMap(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  try {
    $mapHas.call(x);
    if ($setHas) {
      try {
        $setHas.call(x);
      } catch (e) {
        return true;
      }
    }
    return x instanceof $Map; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
};

/***/ }),

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

"use strict";


var numToStr = Number.prototype.toString;
var tryNumberObject = function tryNumberObject(value) {
  try {
    numToStr.call(value);
    return true;
  } catch (e) {
    return false;
  }
};
var toStr = Object.prototype.toString;
var numClass = '[object Number]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 3631)();
module.exports = function isNumberObject(value) {
  if (typeof value === 'number') {
    return true;
  }
  if (typeof value !== 'object') {
    return false;
  }
  return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass;
};

/***/ }),

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

/***/ }),

/***/ 7411:
/*!***************************************!*\
  !*** ../node_modules/is-set/index.js ***!
  \***************************************/
/***/ ((module) => {

"use strict";


var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;
var exported;
if (!$Set) {
  // eslint-disable-next-line no-unused-vars
  exported = function isSet(x) {
    // `Set` is not present in this environment.
    return false;
  };
}
var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$setHas) {
  // eslint-disable-next-line no-unused-vars
  exported = function isSet(x) {
    // `Set` does not have a `has` method
    return false;
  };
}
module.exports = exported || function isSet(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  try {
    $setHas.call(x);
    if ($mapHas) {
      try {
        $mapHas.call(x);
      } catch (e) {
        return true;
      }
    }
    return x instanceof $Set; // core-js workaround, pre-v2.5.0
  } catch (e) {}
  return false;
};

/***/ }),

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

"use strict";


var strValue = String.prototype.valueOf;
var tryStringObject = function tryStringObject(value) {
  try {
    strValue.call(value);
    return true;
  } catch (e) {
    return false;
  }
};
var toStr = Object.prototype.toString;
var strClass = '[object String]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 3631)();
module.exports = function isString(value) {
  if (typeof value === 'string') {
    return true;
  }
  if (typeof value !== 'object') {
    return false;
  }
  return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
};

/***/ }),

/***/ 6772:
/*!***********************************************!*\
  !*** ../node_modules/is-typed-array/index.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var forEach = __webpack_require__(/*! foreach */ 9889);
var availableTypedArrays = __webpack_require__(/*! available-typed-arrays */ 2155);
var callBound = __webpack_require__(/*! call-bind/callBound */ 7252);
var $toString = callBound('Object.prototype.toString');
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 3631)();
var typedArrays = availableTypedArrays();
var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
  for (var i = 0; i < array.length; i += 1) {
    if (array[i] === value) {
      return i;
    }
  }
  return -1;
};
var $slice = callBound('String.prototype.slice');
var toStrTags = {};
var gOPD = __webpack_require__(/*! es-abstract/helpers/getOwnPropertyDescriptor */ 3064);
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
if (hasToStringTag && gOPD && getPrototypeOf) {
  forEach(typedArrays, function (typedArray) {
    var arr = new global[typedArray]();
    if (Symbol.toStringTag in arr) {
      var proto = getPrototypeOf(arr);
      var descriptor = gOPD(proto, Symbol.toStringTag);
      if (!descriptor) {
        var superProto = getPrototypeOf(proto);
        descriptor = gOPD(superProto, Symbol.toStringTag);
      }
      toStrTags[typedArray] = descriptor.get;
    }
  });
}
var tryTypedArrays = function tryAllTypedArrays(value) {
  var anyTrue = false;
  forEach(toStrTags, function (getter, typedArray) {
    if (!anyTrue) {
      try {
        anyTrue = getter.call(value) === typedArray;
      } catch (e) {/**/}
    }
  });
  return anyTrue;
};
module.exports = function isTypedArray(value) {
  if (!value || typeof value !== 'object') {
    return false;
  }
  if (!hasToStringTag || !(Symbol.toStringTag in value)) {
    var tag = $slice($toString(value), 8, -1);
    return $indexOf(typedArrays, tag) > -1;
  }
  if (!gOPD) {
    return false;
  }
  return tryTypedArrays(value);
};

/***/ }),

/***/ 5124:
/*!*******************************************!*\
  !*** ../node_modules/is-weakmap/index.js ***!
  \*******************************************/
/***/ ((module) => {

"use strict";


var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null;
var $WeakSet = typeof WeakSet === 'function' && WeakSet.prototype ? WeakSet : null;
var exported;
if (!$WeakMap) {
  // eslint-disable-next-line no-unused-vars
  exported = function isWeakMap(x) {
    // `WeakMap` is not present in this environment.
    return false;
  };
}
var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
if (!exported && !$mapHas) {
  // eslint-disable-next-line no-unused-vars
  exported = function isWeakMap(x) {
    // `WeakMap` does not have a `has` method
    return false;
  };
}
module.exports = exported || function isWeakMap(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  try {
    $mapHas.call(x, $mapHas);
    if ($setHas) {
      try {
        $setHas.call(x, $setHas);
      } catch (e) {
        return true;
      }
    }
    return x instanceof $WeakMap; // core-js workaround, pre-v3
  } catch (e) {}
  return false;
};

/***/ }),

/***/ 8124:
/*!*******************************************!*\
  !*** ../node_modules/is-weakset/index.js ***!
  \*******************************************/
/***/ ((module) => {

"use strict";


var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null;
var $WeakSet = typeof WeakSet === 'function' && WeakSet.prototype ? WeakSet : null;
var exported;
if (!$WeakMap) {
  // eslint-disable-next-line no-unused-vars
  exported = function isWeakSet(x) {
    // `WeakSet` is not present in this environment.
    return false;
  };
}
var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
if (!exported && !$setHas) {
  // eslint-disable-next-line no-unused-vars
  module.exports = function isWeakSet(x) {
    // `WeakSet` does not have a `has` method
    return false;
  };
}
module.exports = exported || function isWeakSet(x) {
  if (!x || typeof x !== 'object') {
    return false;
  }
  try {
    $setHas.call(x, $setHas);
    if ($mapHas) {
      try {
        $mapHas.call(x, $mapHas);
      } catch (e) {
        return true;
      }
    }
    return x instanceof $WeakSet; // core-js workaround, pre-v3
  } catch (e) {}
  return false;
};

/***/ }),

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

/***/ }),

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

/***/ }),

/***/ 8349:
/*!***************************************************!*\
  !*** ../node_modules/object-is/implementation.js ***!
  \***************************************************/
/***/ ((module) => {

"use strict";


var numberIsNaN = function (value) {
  return value !== value;
};
module.exports = function is(a, b) {
  if (a === 0 && b === 0) {
    return 1 / a === 1 / b;
  }
  if (a === b) {
    return true;
  }
  if (numberIsNaN(a) && numberIsNaN(b)) {
    return true;
  }
  return false;
};

/***/ }),

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

"use strict";


var define = __webpack_require__(/*! define-properties */ 9951);
var callBind = __webpack_require__(/*! call-bind */ 1231);
var implementation = __webpack_require__(/*! ./implementation */ 8349);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 4440);
var shim = __webpack_require__(/*! ./shim */ 6602);
var polyfill = callBind(getPolyfill(), Object);
define(polyfill, {
  getPolyfill: getPolyfill,
  implementation: implementation,
  shim: shim
});
module.exports = polyfill;

/***/ }),

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

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 8349);
module.exports = function getPolyfill() {
  return typeof Object.is === 'function' ? Object.is : implementation;
};

/***/ }),

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

"use strict";


var getPolyfill = __webpack_require__(/*! ./polyfill */ 4440);
var define = __webpack_require__(/*! define-properties */ 9951);
module.exports = function shimObjectIs() {
  var polyfill = getPolyfill();
  define(Object, {
    is: polyfill
  }, {
    is: function testObjectIs() {
      return Object.is !== polyfill;
    }
  });
  return polyfill;
};

/***/ }),

/***/ 2909:
/*!****************************************************************!*\
  !*** ../node_modules/regexp.prototype.flags/implementation.js ***!
  \****************************************************************/
/***/ ((module) => {

"use strict";


var $Object = Object;
var $TypeError = TypeError;
module.exports = function flags() {
  if (this != null && this !== $Object(this)) {
    throw new $TypeError('RegExp.prototype.flags getter called on non-object');
  }
  var result = '';
  if (this.global) {
    result += 'g';
  }
  if (this.ignoreCase) {
    result += 'i';
  }
  if (this.multiline) {
    result += 'm';
  }
  if (this.dotAll) {
    result += 's';
  }
  if (this.unicode) {
    result += 'u';
  }
  if (this.sticky) {
    result += 'y';
  }
  return result;
};

/***/ }),

/***/ 2248:
/*!*******************************************************!*\
  !*** ../node_modules/regexp.prototype.flags/index.js ***!
  \*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var define = __webpack_require__(/*! define-properties */ 9951);
var callBind = __webpack_require__(/*! call-bind */ 1231);
var implementation = __webpack_require__(/*! ./implementation */ 2909);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 5344);
var shim = __webpack_require__(/*! ./shim */ 7848);
var flagsBound = callBind(implementation);
define(flagsBound, {
  getPolyfill: getPolyfill,
  implementation: implementation,
  shim: shim
});
module.exports = flagsBound;

/***/ }),

/***/ 5344:
/*!**********************************************************!*\
  !*** ../node_modules/regexp.prototype.flags/polyfill.js ***!
  \**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 2909);
var supportsDescriptors = (__webpack_require__(/*! define-properties */ 9951).supportsDescriptors);
var $gOPD = Object.getOwnPropertyDescriptor;
var $TypeError = TypeError;
module.exports = function getPolyfill() {
  if (!supportsDescriptors) {
    throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
  }
  if (/a/mig.flags === 'gim') {
    var descriptor = $gOPD(RegExp.prototype, 'flags');
    if (descriptor && typeof descriptor.get === 'function' && typeof /a/.dotAll === 'boolean') {
      return descriptor.get;
    }
  }
  return implementation;
};

/***/ }),

/***/ 7848:
/*!******************************************************!*\
  !*** ../node_modules/regexp.prototype.flags/shim.js ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var supportsDescriptors = (__webpack_require__(/*! define-properties */ 9951).supportsDescriptors);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 5344);
var gOPD = Object.getOwnPropertyDescriptor;
var defineProperty = Object.defineProperty;
var TypeErr = TypeError;
var getProto = Object.getPrototypeOf;
var regex = /a/;
module.exports = function shimFlags() {
  if (!supportsDescriptors || !getProto) {
    throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
  }
  var polyfill = getPolyfill();
  var proto = getProto(regex);
  var descriptor = gOPD(proto, 'flags');
  if (!descriptor || descriptor.get !== polyfill) {
    defineProperty(proto, 'flags', {
      configurable: true,
      enumerable: false,
      get: polyfill
    });
  }
  return polyfill;
};

/***/ }),

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

/***/ }),

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

"use strict";


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

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

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

/***/ }),

/***/ 4078:
/*!*********************************************!*\
  !*** ../node_modules/side-channel/index.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 5832);
var callBound = __webpack_require__(/*! call-bind/callBound */ 7252);
var inspect = __webpack_require__(/*! object-inspect */ 788);
var $TypeError = GetIntrinsic('%TypeError%');
var $WeakMap = GetIntrinsic('%WeakMap%', true);
var $Map = GetIntrinsic('%Map%', true);
var $weakMapGet = callBound('WeakMap.prototype.get', true);
var $weakMapSet = callBound('WeakMap.prototype.set', true);
var $weakMapHas = callBound('WeakMap.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSet = callBound('Map.prototype.set', true);
var $mapHas = callBound('Map.prototype.has', true);

/*
 * This function traverses the list returning the node corresponding to the
 * given key.
 *
 * That node is also moved to the head of the list, so that if it's accessed
 * again we don't need to traverse the whole list. By doing so, all the recently
 * used nodes can be accessed relatively quickly.
 */
var listGetNode = function (list, key) {
  // eslint-disable-line consistent-return
  for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
    if (curr.key === key) {
      prev.next = curr.next;
      curr.next = list.next;
      list.next = curr; // eslint-disable-line no-param-reassign
      return curr;
    }
  }
};
var listGet = function (objects, key) {
  var node = listGetNode(objects, key);
  return node && node.value;
};
var listSet = function (objects, key, value) {
  var node = listGetNode(objects, key);
  if (node) {
    node.value = value;
  } else {
    // Prepend the new node to the beginning of the list
    objects.next = {
      // eslint-disable-line no-param-reassign
      key: key,
      next: objects.next,
      value: value
    };
  }
};
var listHas = function (objects, key) {
  return !!listGetNode(objects, key);
};
module.exports = function getSideChannel() {
  var $wm;
  var $m;
  var $o;
  var channel = {
    assert: function (key) {
      if (!channel.has(key)) {
        throw new $TypeError('Side channel does not contain ' + inspect(key));
      }
    },
    get: function (key) {
      // eslint-disable-line consistent-return
      if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
        if ($wm) {
          return $weakMapGet($wm, key);
        }
      } else if ($Map) {
        if ($m) {
          return $mapGet($m, key);
        }
      } else {
        if ($o) {
          // eslint-disable-line no-lonely-if
          return listGet($o, key);
        }
      }
    },
    has: function (key) {
      if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
        if ($wm) {
          return $weakMapHas($wm, key);
        }
      } else if ($Map) {
        if ($m) {
          return $mapHas($m, key);
        }
      } else {
        if ($o) {
          // eslint-disable-line no-lonely-if
          return listHas($o, key);
        }
      }
      return false;
    },
    set: function (key, value) {
      if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
        if (!$wm) {
          $wm = new $WeakMap();
        }
        $weakMapSet($wm, key, value);
      } else if ($Map) {
        if (!$m) {
          $m = new $Map();
        }
        $mapSet($m, key, value);
      } else {
        if (!$o) {
          /*
           * Initialize the linked list as an empty node, so that we don't have
           * to special-case handling of the first node: we can always refer to
           * it as (previous node).next, instead of something like (list).head
           */
          $o = {
            key: {},
            next: null
          };
        }
        listSet($o, key, value);
      }
    }
  };
  return channel;
};

/***/ }),

/***/ 7475:
/*!******************************************************!*\
  !*** ../node_modules/which-boxed-primitive/index.js ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var isString = __webpack_require__(/*! is-string */ 1614);
var isNumber = __webpack_require__(/*! is-number-object */ 9589);
var isBoolean = __webpack_require__(/*! is-boolean-object */ 5697);
var isSymbol = __webpack_require__(/*! is-symbol */ 9866);
var isBigInt = __webpack_require__(/*! is-bigint */ 4608);

// eslint-disable-next-line consistent-return
module.exports = function whichBoxedPrimitive(value) {
  // eslint-disable-next-line eqeqeq
  if (value == null || typeof value !== 'object' && typeof value !== 'function') {
    return null;
  }
  if (isString(value)) {
    return 'String';
  }
  if (isNumber(value)) {
    return 'Number';
  }
  if (isBoolean(value)) {
    return 'Boolean';
  }
  if (isSymbol(value)) {
    return 'Symbol';
  }
  if (isBigInt(value)) {
    return 'BigInt';
  }
};

/***/ }),

/***/ 1765:
/*!**************************************************!*\
  !*** ../node_modules/which-typed-array/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var forEach = __webpack_require__(/*! foreach */ 9889);
var availableTypedArrays = __webpack_require__(/*! available-typed-arrays */ 2155);
var callBound = __webpack_require__(/*! call-bind/callBound */ 7252);
var $toString = callBound('Object.prototype.toString');
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 3631)();
var typedArrays = availableTypedArrays();
var $slice = callBound('String.prototype.slice');
var toStrTags = {};
var gOPD = __webpack_require__(/*! es-abstract/helpers/getOwnPropertyDescriptor */ 3064);
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
if (hasToStringTag && gOPD && getPrototypeOf) {
  forEach(typedArrays, function (typedArray) {
    if (typeof global[typedArray] === 'function') {
      var arr = new global[typedArray]();
      if (Symbol.toStringTag in arr) {
        var proto = getPrototypeOf(arr);
        var descriptor = gOPD(proto, Symbol.toStringTag);
        if (!descriptor) {
          var superProto = getPrototypeOf(proto);
          descriptor = gOPD(superProto, Symbol.toStringTag);
        }
        toStrTags[typedArray] = descriptor.get;
      }
    }
  });
}
var tryTypedArrays = function tryAllTypedArrays(value) {
  var foundName = false;
  forEach(toStrTags, function (getter, typedArray) {
    if (!foundName) {
      try {
        var name = getter.call(value);
        if (name === typedArray) {
          foundName = name;
        }
      } catch (e) {}
    }
  });
  return foundName;
};
var isTypedArray = __webpack_require__(/*! is-typed-array */ 6772);
module.exports = function whichTypedArray(value) {
  if (!isTypedArray(value)) {
    return false;
  }
  if (!hasToStringTag || !(Symbol.toStringTag in value)) {
    return $slice($toString(value), 8, -1);
  }
  return tryTypedArrays(value);
};

/***/ }),

/***/ 1720:
/*!***************************************************!*\
  !*** ./node_modules/ansi-color/lib/ansi-color.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, exports) => {

// ANSI color code outputs for strings

var ANSI_CODES = {
  "off": 0,
  "bold": 1,
  "italic": 3,
  "underline": 4,
  "blink": 5,
  "inverse": 7,
  "hidden": 8,
  "black": 30,
  "red": 31,
  "green": 32,
  "yellow": 33,
  "blue": 34,
  "magenta": 35,
  "cyan": 36,
  "white": 37,
  "black_bg": 40,
  "red_bg": 41,
  "green_bg": 42,
  "yellow_bg": 43,
  "blue_bg": 44,
  "magenta_bg": 45,
  "cyan_bg": 46,
  "white_bg": 47
};
exports.t = function (str, color) {
  if (!color) return str;
  var color_attrs = color.split("+");
  var ansi_str = "";
  for (var i = 0, attr; attr = color_attrs[i]; i++) {
    ansi_str += "\x1b[" + ANSI_CODES[attr] + "m";
  }
  ansi_str += str + "\x1b[" + ANSI_CODES["off"] + "m";
  return ansi_str;
};

/***/ }),

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

"use strict";


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

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

/***/ }),

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

"use strict";


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

/***/ }),

/***/ 9030:
/*!*************************************************!*\
  !*** ./node_modules/binstring/lib/binstring.js ***!
  \*************************************************/
/***/ ((module) => {

"use strict";


function bufferToBytes(data) {
  var rs = [];
  for (var i = 0; i < data.length; i++) {
    rs.push(data[i]);
  }
  return rs;
}
var binString = module.exports = function binString(data, options) {
  // Set default options
  options = options || {};
  if (Array.isArray(data)) {
    data = new Buffer(data);
  } else if (typeof data == 'number') {
    data = new Buffer(data.toString(16), 'hex');
  } else if (typeof data == 'string') {
    if (!options.in) {
      // Quack, quack! Duck-type the input
      if (data.slice(0, 2) == '0x') {
        data = new Buffer(data.slice(2), 'hex');
      } else {
        // Binary string
        data = new Buffer(data, 'binary');
      }
    } else {
      data = new Buffer(data, options.in);
    }
  }
  if (!options.out) options.out = 'buffer';

  // Convert
  switch (options.out) {
    case 'buffer':
      return data;
    case 'hex':
      return data.toString('hex');
    case 'binary':
      return data.toString('binary');
    case 'utf8':
      return data.toString('utf8');
    case 'base64':
      return data.toString('base64');
    case 'bytes':
      return bufferToBytes(data);
    default:
      throw new Error('Output format "' + options.out + '" not understood');
  }
};

/***/ }),

/***/ 837:
/*!**********************************************!*\
  !*** ./node_modules/buffer-replace/index.js ***!
  \**********************************************/
/***/ ((module) => {

"use strict";


const replace = (buf, a, b) => {
  if (!Buffer.isBuffer(buf)) buf = Buffer(buf);
  const idx = buf.indexOf(a);
  if (idx === -1) return buf;
  if (!Buffer.isBuffer(b)) b = Buffer(b);
  const before = buf.slice(0, idx);
  const after = replace(buf.slice(idx + a.length), a, b);
  return Buffer.concat([before, b, after], idx + b.length + after.length);
};
module.exports = replace;

/***/ }),

/***/ 9648:
/*!*******************************************!*\
  !*** ./node_modules/cli-spinner/index.js ***!
  \*******************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

var readline = __webpack_require__(/*! readline */ 2908);
var defaultSpinnerString = 0;
var defaultSpinnerDelay = 60;
function defaultOnTick(msg) {
  this.clearLine(this.stream);
  this.stream.write(msg);
}
;
var Spinner = function (options) {
  if (!(this instanceof Spinner)) return new Spinner(options);
  if (typeof options === "string") {
    options = {
      text: options
    };
  } else if (!options) {
    options = {};
  }
  this.text = options.text || '';
  this.setSpinnerString(defaultSpinnerString);
  this.setSpinnerDelay(defaultSpinnerDelay);
  this.onTick = options.onTick || defaultOnTick;
  this.stream = options.stream || process.stdout;
};
Spinner.spinners = __webpack_require__(/*! ./spinners.json */ 8138);
Spinner.setDefaultSpinnerString = function (value) {
  defaultSpinnerString = value;
  return this;
};
Spinner.setDefaultSpinnerDelay = function (value) {
  defaultSpinnerDelay = value;
  return this;
};
Spinner.prototype.start = function () {
  if (this.stream === process.stdout && this.stream.isTTY !== true) {
    return this;
  }
  var current = 0;
  var self = this;
  var iteration = function () {
    var msg = self.text.indexOf('%s') > -1 ? self.text.replace('%s', self.chars[current]) : self.chars[current] + ' ' + self.text;
    self.onTick(msg);
    current = ++current % self.chars.length;
  };
  iteration();
  this.id = setInterval(iteration, this.delay);
  return this;
};
Spinner.prototype.isSpinning = function () {
  return this.id !== undefined;
};
Spinner.prototype.setSpinnerDelay = function (n) {
  this.delay = n;
  return this;
};
Spinner.prototype.setSpinnerString = function (str) {
  const map = mapToSpinner(str, this.spinners);
  this.chars = Array.isArray(map) ? map : map.split('');
  return this;
};
Spinner.prototype.setSpinnerTitle = function (str) {
  this.text = str;
  return this;
};
Spinner.prototype.stop = function (clear) {
  if (this.isSpinning === false) {
    return this;
  }
  clearInterval(this.id);
  this.id = undefined;
  if (clear) {
    this.clearLine(this.stream);
  }
  return this;
};
Spinner.prototype.clearLine = function (stream) {
  readline.clearLine(stream, 0);
  readline.cursorTo(stream, 0);
  return this;
};

// Helpers

function isInt(value) {
  return typeof value === 'number' && value % 1 === 0;
}
function mapToSpinner(value, spinners) {
  // Not an integer, return as strng
  if (!isInt(value)) {
    return value + '';
  }
  var length = Spinner.spinners.length;

  // Check if index is within bounds
  value = value >= length ? 0 : value;
  // If negative, count from the end
  value = value < 0 ? length + value : value;
  return Spinner.spinners[value];
}
exports.$ = Spinner;

/***/ }),

/***/ 5143:
/*!**************************************!*\
  !*** ./node_modules/crc-32/crc32.js ***!
  \**************************************/
/***/ ((__unused_webpack_module, exports) => {

/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
/*exported CRC32 */
var CRC32;
(function (factory) {
  /*jshint ignore:start */
  /*eslint-disable */
  if (typeof DO_NOT_EXPORT_CRC === 'undefined') {
    if (true) {
      factory(exports);
    } else {}
  } else {
    factory(CRC32 = {});
  }
  /*eslint-enable */
  /*jshint ignore:end */
})(function (CRC32) {
  CRC32.version = '1.2.0';
  /* see perf/crc32table.js */
  /*global Int32Array */
  function signed_crc_table() {
    var c = 0,
      table = new Array(256);
    for (var n = 0; n != 256; ++n) {
      c = n;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1;
      table[n] = c;
    }
    return typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;
  }
  var T = signed_crc_table();
  function crc32_bstr(bstr, seed) {
    var C = seed ^ -1,
      L = bstr.length - 1;
    for (var i = 0; i < L;) {
      C = C >>> 8 ^ T[(C ^ bstr.charCodeAt(i++)) & 0xFF];
      C = C >>> 8 ^ T[(C ^ bstr.charCodeAt(i++)) & 0xFF];
    }
    if (i === L) C = C >>> 8 ^ T[(C ^ bstr.charCodeAt(i)) & 0xFF];
    return C ^ -1;
  }
  function crc32_buf(buf, seed) {
    if (buf.length > 10000) return crc32_buf_8(buf, seed);
    var C = seed ^ -1,
      L = buf.length - 3;
    for (var i = 0; i < L;) {
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
    }
    while (i < L + 3) C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
    return C ^ -1;
  }
  function crc32_buf_8(buf, seed) {
    var C = seed ^ -1,
      L = buf.length - 7;
    for (var i = 0; i < L;) {
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
      C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
    }
    while (i < L + 7) C = C >>> 8 ^ T[(C ^ buf[i++]) & 0xFF];
    return C ^ -1;
  }
  function crc32_str(str, seed) {
    var C = seed ^ -1;
    for (var i = 0, L = str.length, c, d; i < L;) {
      c = str.charCodeAt(i++);
      if (c < 0x80) {
        C = C >>> 8 ^ T[(C ^ c) & 0xFF];
      } else if (c < 0x800) {
        C = C >>> 8 ^ T[(C ^ (192 | c >> 6 & 31)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | c & 63)) & 0xFF];
      } else if (c >= 0xD800 && c < 0xE000) {
        c = (c & 1023) + 64;
        d = str.charCodeAt(i++) & 1023;
        C = C >>> 8 ^ T[(C ^ (240 | c >> 8 & 7)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | c >> 2 & 63)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | d >> 6 & 15 | (c & 3) << 4)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | d & 63)) & 0xFF];
      } else {
        C = C >>> 8 ^ T[(C ^ (224 | c >> 12 & 15)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | c >> 6 & 63)) & 0xFF];
        C = C >>> 8 ^ T[(C ^ (128 | c & 63)) & 0xFF];
      }
    }
    return C ^ -1;
  }
  CRC32.table = T;
  // $FlowIgnore
  CRC32.bstr = crc32_bstr;
  // $FlowIgnore
  CRC32.buf = crc32_buf;
  // $FlowIgnore
  CRC32.str = crc32_str;
});

/***/ }),

/***/ 5295:
/*!*****************************************************!*\
  !*** ./node_modules/hexer/chunked_hex_transform.js ***!
  \*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var util = __webpack_require__(/*! util */ 3837);
var HexTransform = __webpack_require__(/*! ./hex_transform */ 2519);
function ChunkedHexTransform(options) {
  if (!(this instanceof ChunkedHexTransform)) {
    return new ChunkedHexTransform(options);
  }
  // istanbul ignore next
  if (!options) options = {};
  HexTransform.call(this, options);
  var self = this;
  if (typeof options.header === 'function') {
    self.header = options.header;
  } else if (typeof options.header === 'object') {
    self.header = simpleHeader(options.header);
  } else if (typeof options.header === 'string') {
    self.header = simpleHeader({
      label: options.header
    });
  } else {
    self.header = simpleHeader();
  }
  self.chunkNum = 0;
}
util.inherits(ChunkedHexTransform, HexTransform);
ChunkedHexTransform.prototype._transform = function transform(chunk, encoding, done) {
  var self = this;
  // istanbul ignore next
  if (self.totalOffset) {
    self.reset();
  }
  ++self.chunkNum;
  var header = self.header(self.chunkNum, chunk);
  if (header.length) {
    self.push(header);
  }
  HexTransform.prototype._transform.call(self, chunk, encoding, function subDone(err) {
    self.reset();
    done(err);
  });
};
function simpleHeader(opts) {
  opts = opts || {};
  var fmt = '-- ';
  if (opts.label) fmt += opts.label + ' ';
  fmt += 'chunk[%s] length: %s (0x%s)\n';
  return function header(chunkNum, chunk) {
    var len = chunk.length;
    var hexlen = len.toString(16);
    return util.format(fmt, chunkNum, len, hexlen);
  };
}
module.exports = ChunkedHexTransform;

/***/ }),

/***/ 5445:
/*!***************************************!*\
  !*** ./node_modules/hexer/hex_spy.js ***!
  \***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var util = __webpack_require__(/*! util */ 3837);
var Transform = (__webpack_require__(/*! stream */ 3978).Transform);
var ChunkedHexTransform = __webpack_require__(/*! ./chunked_hex_transform */ 5295);
module.exports = HexSpy;
function HexSpy(sink, options) {
  if (!(this instanceof HexSpy)) {
    return new HexSpy(sink, options);
  }
  // istanbul ignore next
  if (!options) options = {};
  // istanbul ignore else
  if (options.highWaterMark === undefined) {
    options.highWaterMark = 1;
  }
  var self = this;
  Transform.call(self, options);
  self.hex = ChunkedHexTransform(options);
  self.hex.pipe(sink);
}
util.inherits(HexSpy, Transform);
HexSpy.prototype._transform = function _transform(chunk, encoding, callback) {
  var self = this;
  self.hex.write(chunk, encoding, function writeDone() {
    self.push(chunk);
    callback();
  });
};
HexSpy.prototype._flush = function _flush(callback) {
  var self = this;
  self.hex.end(null, null, callback);
};

/***/ }),

/***/ 2519:
/*!*********************************************!*\
  !*** ./node_modules/hexer/hex_transform.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var extend = __webpack_require__(/*! xtend */ 72);
var util = __webpack_require__(/*! util */ 3837);
var Transform = (__webpack_require__(/*! stream */ 3978).Transform);
var render = __webpack_require__(/*! ./render */ 977);
function HexTransform(options) {
  if (!(this instanceof HexTransform)) {
    return new HexTransform(options);
  }
  // istanbul ignore next
  if (!options) options = {};
  if (options.colored) options = extend(render.coloredOptions, options);
  Transform.call(this, options);
  var self = this;
  self.options = options;
  self.prefix = self.options.prefix || '';
  self.cols = self.options.cols || 16;
  self.group = self.options.group || 2;
  self.gutter = self.options.gutter || 0;
  // istanbul ignore if
  self.annotateLine = options.annotateLine || null;
  self.decorateHexen = self.options.decorateHexen || noopDecorate;
  self.decorateHuman = self.options.decorateHuman || noopDecorate;
  self.renderHexen = self.options.renderHexen || render.byte2hex;
  self.renderHuman = self.options.renderHuman || render.byte2char;
  // istanbul ignore next
  self.groupSeparator = self.options.groupSeparator === undefined ? ' ' : self.options.groupSeparator;
  self.headSep = self.options.headSep === undefined ? ': ' : self.options.headSep;
  // istanbul ignore next
  self.divide = self.options.divide === undefined ? '  ' : self.options.divide;
  // istanbul ignore next
  self.emptyHexen = self.options.emptyHexen === undefined ? '  ' : self.options.emptyHexen;
  self.emptyHuman = self.options.emptyHuman || '';
  self.nullHuman = self.options.nullHuman || '';
  self.offsetWidth = self.options.offsetWidth || 8;
  self.gutter = Math.max(self.offsetWidth, self.gutter);
  self.line = '';
  self.hexen = '';
  self.human = '';
  self.reset();
}
util.inherits(HexTransform, Transform);
HexTransform.prototype.reset = function reset() {
  var self = this;
  self._finishLine();
  self.screenOffset = 0;
  self.totalOffset = 0;
};
HexTransform.prototype._transform = function transform(chunk, encoding, done) {
  var self = this;
  for (var offset = 0; offset < chunk.length; offset++) {
    if (self.screenOffset % self.cols === 0) {
      self._finishLine();
      self._startLine();
    }
    self._addByte(chunk[offset]);
  }
  done(null);
};
HexTransform.prototype._flush = function flush(done) {
  var self = this;
  if (self.totalOffset === 0 && self.nullHuman) {
    self._startLine();
    self.human += self.nullHuman;
  }
  self._finishLine();
  done(null);
};
HexTransform.prototype._startLine = function startLine() {
  var self = this;
  var head = render.pad('0', self.totalOffset.toString(16), self.offsetWidth);
  self.line = self.prefix + render.pad(' ', head, self.gutter) + self.headSep;
};
HexTransform.prototype._finishLine = function finishLine() {
  var self = this;
  if (self.line.length) {
    var rem = self.screenOffset % self.cols;
    if (rem !== 0 || self.totalOffset === 0 && self.nullHuman) {
      rem = self.cols - rem;
      for (var i = 0; i < rem; i++) {
        self._addEmpty();
      }
    }
    self.line += self.hexen + self.divide + self.human;
    // istanbul ignore if
    if (self.annotateLine) {
      self.line += self.annotateLine(self.totalOffset - self.cols, self.totalOffset);
    }
    self.line += '\n';
    self.push(self.line);
    self.line = '';
    self.hexen = '';
    self.human = '';
  }
};
HexTransform.prototype._addEmpty = function addEmpty() {
  var self = this;
  self._addPart(self.emptyHexen, self.emptyHuman);
};
HexTransform.prototype._addByte = function addByte(b) {
  var self = this;
  var hexen = self.renderHexen(b);
  var human = self.renderHuman(b);
  self._addPart(hexen, human, b);
};
HexTransform.prototype._addPart = function addByte(hexen, human, b) {
  var self = this;
  hexen = self.decorateHexen(self.totalOffset, self.screenOffset, hexen, b);
  human = self.decorateHuman(self.totalOffset, self.screenOffset, human, b);
  var isStartOfRow = self.screenOffset % self.cols === 0;
  var isStartOfGroup = self.screenOffset % self.group === 0;
  if (!isStartOfRow && isStartOfGroup) {
    self.hexen += self.groupSeparator;
  }
  self.hexen += hexen;
  self.human += human;
  self.totalOffset++;
  self.screenOffset++;
};
function noopDecorate(offset, screenOffset, s) {
  return s;
}
module.exports = HexTransform;

/***/ }),

/***/ 6440:
/*!*************************************!*\
  !*** ./node_modules/hexer/index.js ***!
  \*************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


hex.Transform = __webpack_require__(/*! ./hex_transform */ 2519);
hex.ChunkedTransform = __webpack_require__(/*! ./chunked_hex_transform */ 5295);
hex.Spy = __webpack_require__(/*! ./hex_spy */ 5445);
module.exports = hex;
function hex(buffer, options) {
  if (typeof buffer === 'string') {
    return hex(Buffer(buffer), options);
  }
  if (!Buffer.isBuffer(buffer)) {
    throw new Error('invalid argument to hex, expected a buffer or string');
  }
  options = options || {};
  if (!options.offsetWidth) {
    options.offsetWidth = 2 * Math.ceil(buffer.length.toString(16).length / 2);
  }
  var stream = hex.Transform(options);
  stream.write(buffer);
  stream.end();
  var out = stream.read();
  if (out === null) {
    return '';
  }
  out = String(out);
  out = out.replace(/\n+$/, '');
  return out;
}

/***/ }),

/***/ 977:
/*!**************************************!*\
  !*** ./node_modules/hexer/render.js ***!
  \**************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var color = (__webpack_require__(/*! ansi-color */ 1720)/* .set */ .t);
function pad(c, s, width) {
  while (s.length < width) s = c + s;
  return s;
}
function byte2hex(b) {
  return pad('0', b.toString(16), 2);
}
function byte2char(c) {
  if (c > 0x1f && c < 0x7f) {
    return String.fromCharCode(c);
  } else {
    return '.';
  }
  // TODO: could provide perhaps some unicode renderings for certain control chars
}

function renderColoredHuman(c) {
  if (c > 0x1f && c < 0x7f) {
    return String.fromCharCode(c);
  } else {
    return color('.', 'black+bold');
  }
}

// istanbul ignore next
function stripColor(str) {
  while (true) {
    var i = str.indexOf('\x1b[');
    if (i < 0) return str;
    var j = str.indexOf('m', i);
    if (j < 0) return str;
    str = str.slice(0, i) + str.slice(j + 1);
  }
}
module.exports.coloredHeadSep = color(':', 'cyan') + ' ';
module.exports.coloredOptions = {
  headSep: module.exports.coloredHeadSep,
  renderHuman: renderColoredHuman
};
module.exports.pad = pad;
module.exports.byte2hex = byte2hex;
module.exports.byte2char = byte2char;
module.exports.renderHuman = renderColoredHuman;
module.exports.stripColor = stripColor;

/***/ }),

/***/ 72:
/*!*****************************************!*\
  !*** ./node_modules/xtend/immutable.js ***!
  \*****************************************/
/***/ ((module) => {

module.exports = extend;
var hasOwnProperty = Object.prototype.hasOwnProperty;
function extend() {
  var target = {};
  for (var i = 0; i < arguments.length; i++) {
    var source = arguments[i];
    for (var key in source) {
      if (hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }
  return target;
}

/***/ }),

/***/ 7487:
/*!*******************************************************************!*\
  !*** ./node_modules/xterm-addon-canvas/lib/xterm-addon-canvas.js ***!
  \*******************************************************************/
/***/ ((module) => {

!function (e, t) {
   true ? module.exports = t() : 0;
}(self, () => (() => {
  "use strict";

  var e = {
      903: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.BaseRenderLayer = void 0;
        const s = i(627),
          r = i(237),
          o = i(860),
          n = i(374),
          a = i(296),
          h = i(855),
          c = i(274),
          l = i(859),
          d = i(399),
          _ = i(345);
        class u extends l.Disposable {
          constructor(e, t, i, s, r, o, n, h, d, u) {
            super(), this._terminal = e, this._container = t, this._alpha = r, this._themeService = o, this._bufferService = n, this._optionsService = h, this._decorationService = d, this._coreBrowserService = u, this._deviceCharWidth = 0, this._deviceCharHeight = 0, this._deviceCellWidth = 0, this._deviceCellHeight = 0, this._deviceCharLeft = 0, this._deviceCharTop = 0, this._selectionModel = (0, a.createSelectionRenderModel)(), this._bitmapGenerator = [], this._onAddTextureAtlasCanvas = this.register(new _.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._cellColorResolver = new c.CellColorResolver(this._terminal, this._selectionModel, this._decorationService, this._coreBrowserService, this._themeService), this._canvas = document.createElement("canvas"), this._canvas.classList.add(`xterm-${i}-layer`), this._canvas.style.zIndex = s.toString(), this._initCanvas(), this._container.appendChild(this._canvas), this._refreshCharAtlas(this._themeService.colors), this.register(this._themeService.onChangeColors(e => {
              this._refreshCharAtlas(e), this.reset(), this.handleSelectionChanged(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
            })), this.register((0, l.toDisposable)(() => {
              var e;
              this._canvas.remove(), null === (e = this._charAtlas) || void 0 === e || e.dispose();
            }));
          }
          get canvas() {
            return this._canvas;
          }
          get cacheCanvas() {
            var e;
            return null === (e = this._charAtlas) || void 0 === e ? void 0 : e.pages[0].canvas;
          }
          _initCanvas() {
            this._ctx = (0, n.throwIfFalsy)(this._canvas.getContext("2d", {
              alpha: this._alpha
            })), this._alpha || this._clearAll();
          }
          handleBlur() {}
          handleFocus() {}
          handleCursorMove() {}
          handleGridChanged(e, t) {}
          handleSelectionChanged(e, t, i = !1) {
            this._selectionModel.update(this._terminal, e, t, i);
          }
          _setTransparency(e) {
            if (e === this._alpha) return;
            const t = this._canvas;
            this._alpha = e, this._canvas = this._canvas.cloneNode(), this._initCanvas(), this._container.replaceChild(this._canvas, t), this._refreshCharAtlas(this._themeService.colors), this.handleGridChanged(0, this._bufferService.rows - 1);
          }
          _refreshCharAtlas(e) {
            var t;
            if (!(this._deviceCharWidth <= 0 && this._deviceCharHeight <= 0)) {
              null === (t = this._charAtlasDisposable) || void 0 === t || t.dispose(), this._charAtlas = (0, s.acquireTextureAtlas)(this._terminal, this._optionsService.rawOptions, e, this._deviceCellWidth, this._deviceCellHeight, this._deviceCharWidth, this._deviceCharHeight, this._coreBrowserService.dpr), this._charAtlasDisposable = (0, _.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas), this._charAtlas.warmUp();
              for (let e = 0; e < this._charAtlas.pages.length; e++) this._bitmapGenerator[e] = new g(this._charAtlas.pages[e].canvas);
            }
          }
          resize(e) {
            this._deviceCellWidth = e.device.cell.width, this._deviceCellHeight = e.device.cell.height, this._deviceCharWidth = e.device.char.width, this._deviceCharHeight = e.device.char.height, this._deviceCharLeft = e.device.char.left, this._deviceCharTop = e.device.char.top, this._canvas.width = e.device.canvas.width, this._canvas.height = e.device.canvas.height, this._canvas.style.width = `${e.css.canvas.width}px`, this._canvas.style.height = `${e.css.canvas.height}px`, this._alpha || this._clearAll(), this._refreshCharAtlas(this._themeService.colors);
          }
          clearTextureAtlas() {
            var e;
            null === (e = this._charAtlas) || void 0 === e || e.clearTexture();
          }
          _fillCells(e, t, i, s) {
            this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight);
          }
          _fillMiddleLineAtCells(e, t, i = 1) {
            const s = Math.ceil(.5 * this._deviceCellHeight);
            this._ctx.fillRect(e * this._deviceCellWidth, (t + 1) * this._deviceCellHeight - s - this._coreBrowserService.dpr, i * this._deviceCellWidth, this._coreBrowserService.dpr);
          }
          _fillBottomLineAtCells(e, t, i = 1, s = 0) {
            this._ctx.fillRect(e * this._deviceCellWidth, (t + 1) * this._deviceCellHeight + s - this._coreBrowserService.dpr - 1, i * this._deviceCellWidth, this._coreBrowserService.dpr);
          }
          _curlyUnderlineAtCell(e, t, i = 1) {
            this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
            const s = this._coreBrowserService.dpr;
            this._ctx.lineWidth = s;
            for (let r = 0; r < i; r++) {
              const i = (e + r) * this._deviceCellWidth,
                o = (e + r + .5) * this._deviceCellWidth,
                n = (e + r + 1) * this._deviceCellWidth,
                a = (t + 1) * this._deviceCellHeight - s - 1,
                h = a - s,
                c = a + s;
              this._ctx.moveTo(i, a), this._ctx.bezierCurveTo(i, h, o, h, o, a), this._ctx.bezierCurveTo(o, c, n, c, n, a);
            }
            this._ctx.stroke(), this._ctx.restore();
          }
          _dottedUnderlineAtCell(e, t, i = 1) {
            this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
            const s = this._coreBrowserService.dpr;
            this._ctx.lineWidth = s, this._ctx.setLineDash([2 * s, s]);
            const r = e * this._deviceCellWidth,
              o = (t + 1) * this._deviceCellHeight - s - 1;
            this._ctx.moveTo(r, o);
            for (let t = 0; t < i; t++) {
              const s = (e + i + t) * this._deviceCellWidth;
              this._ctx.lineTo(s, o);
            }
            this._ctx.stroke(), this._ctx.closePath(), this._ctx.restore();
          }
          _dashedUnderlineAtCell(e, t, i = 1) {
            this._ctx.save(), this._ctx.beginPath(), this._ctx.strokeStyle = this._ctx.fillStyle;
            const s = this._coreBrowserService.dpr;
            this._ctx.lineWidth = s, this._ctx.setLineDash([4 * s, 3 * s]);
            const r = e * this._deviceCellWidth,
              o = (e + i) * this._deviceCellWidth,
              n = (t + 1) * this._deviceCellHeight - s - 1;
            this._ctx.moveTo(r, n), this._ctx.lineTo(o, n), this._ctx.stroke(), this._ctx.closePath(), this._ctx.restore();
          }
          _fillLeftLineAtCell(e, t, i) {
            this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, this._coreBrowserService.dpr * i, this._deviceCellHeight);
          }
          _strokeRectAtCell(e, t, i, s) {
            const r = this._coreBrowserService.dpr;
            this._ctx.lineWidth = r, this._ctx.strokeRect(e * this._deviceCellWidth + r / 2, t * this._deviceCellHeight + r / 2, i * this._deviceCellWidth - r, s * this._deviceCellHeight - r);
          }
          _clearAll() {
            this._alpha ? this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(0, 0, this._canvas.width, this._canvas.height));
          }
          _clearCells(e, t, i, s) {
            this._alpha ? this._ctx.clearRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight));
          }
          _fillCharTrueColor(e, t, i) {
            this._ctx.font = this._getFont(!1, !1), this._ctx.textBaseline = r.TEXT_BASELINE, this._clipRow(i);
            let s = !1;
            !1 !== this._optionsService.rawOptions.customGlyphs && (s = (0, o.tryDrawCustomChar)(this._ctx, e.getChars(), t * this._deviceCellWidth, i * this._deviceCellHeight, this._deviceCellWidth, this._deviceCellHeight, this._optionsService.rawOptions.fontSize, this._coreBrowserService.dpr)), s || this._ctx.fillText(e.getChars(), t * this._deviceCellWidth + this._deviceCharLeft, i * this._deviceCellHeight + this._deviceCharTop + this._deviceCharHeight);
          }
          _drawChars(e, t, i) {
            var s, r;
            const o = e.getChars();
            let n;
            this._cellColorResolver.resolve(e, t, this._bufferService.buffer.ydisp + i), n = o && o.length > 1 ? this._charAtlas.getRasterizedGlyphCombinedChar(o, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext) : this._charAtlas.getRasterizedGlyph(e.getCode() || h.WHITESPACE_CELL_CODE, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext), n.size.x && n.size.y && (this._ctx.save(), this._clipRow(i), this._charAtlas.pages[n.texturePage].version !== (null === (s = this._bitmapGenerator[n.texturePage]) || void 0 === s ? void 0 : s.version) && (this._bitmapGenerator[n.texturePage] || (this._bitmapGenerator[n.texturePage] = new g(this._charAtlas.pages[n.texturePage].canvas)), this._bitmapGenerator[n.texturePage].refresh(), this._bitmapGenerator[n.texturePage].version = this._charAtlas.pages[n.texturePage].version), this._ctx.drawImage((null === (r = this._bitmapGenerator[n.texturePage]) || void 0 === r ? void 0 : r.bitmap) || this._charAtlas.pages[n.texturePage].canvas, n.texturePosition.x, n.texturePosition.y, n.size.x, n.size.y, t * this._deviceCellWidth + this._deviceCharLeft - n.offset.x, i * this._deviceCellHeight + this._deviceCharTop - n.offset.y, n.size.x, n.size.y), this._ctx.restore());
          }
          _clipRow(e) {
            this._ctx.beginPath(), this._ctx.rect(0, e * this._deviceCellHeight, this._bufferService.cols * this._deviceCellWidth, this._deviceCellHeight), this._ctx.clip();
          }
          _getFont(e, t) {
            return `${t ? "italic" : ""} ${e ? this._optionsService.rawOptions.fontWeightBold : this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize * this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`;
          }
        }
        t.BaseRenderLayer = u;
        class g {
          constructor(e) {
            this._canvas = e, this._state = 0, this._commitTimeout = void 0, this._bitmap = void 0, this.version = -1;
          }
          get bitmap() {
            return this._bitmap;
          }
          refresh() {
            this._bitmap = void 0, d.isSafari || (void 0 === this._commitTimeout && (this._commitTimeout = window.setTimeout(() => this._generate(), 100)), 1 === this._state && (this._state = 2));
          }
          _generate() {
            0 === this._state && (this._bitmap = void 0, this._state = 1, window.createImageBitmap(this._canvas).then(e => {
              2 === this._state ? this.refresh() : this._bitmap = e, this._state = 0;
            }), this._commitTimeout && (this._commitTimeout = void 0));
          }
        }
      },
      949: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CanvasRenderer = void 0;
        const s = i(627),
          r = i(56),
          o = i(374),
          n = i(345),
          a = i(859),
          h = i(873),
          c = i(43),
          l = i(630),
          d = i(744);
        class _ extends a.Disposable {
          constructor(e, t, i, _, u, g, f, v, C, p, x) {
            super(), this._terminal = e, this._screenElement = t, this._bufferService = _, this._charSizeService = u, this._optionsService = g, this._coreBrowserService = C, this._themeService = x, this._onRequestRedraw = this.register(new n.EventEmitter()), this.onRequestRedraw = this._onRequestRedraw.event, this._onChangeTextureAtlas = this.register(new n.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new n.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event;
            const w = this._optionsService.rawOptions.allowTransparency;
            this._renderLayers = [new d.TextRenderLayer(this._terminal, this._screenElement, 0, w, this._bufferService, this._optionsService, f, p, this._coreBrowserService, x), new l.SelectionRenderLayer(this._terminal, this._screenElement, 1, this._bufferService, this._coreBrowserService, p, this._optionsService, x), new c.LinkRenderLayer(this._terminal, this._screenElement, 2, i, this._bufferService, this._optionsService, p, this._coreBrowserService, x), new h.CursorRenderLayer(this._terminal, this._screenElement, 3, this._onRequestRedraw, this._bufferService, this._optionsService, v, this._coreBrowserService, p, x)];
            for (const e of this._renderLayers) (0, n.forwardEvent)(e.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas);
            this.dimensions = (0, o.createRenderDimensions)(), this._devicePixelRatio = this._coreBrowserService.dpr, this._updateDimensions(), this.register((0, r.observeDevicePixelDimensions)(this._renderLayers[0].canvas, this._coreBrowserService.window, (e, t) => this._setCanvasDevicePixelDimensions(e, t))), this.register((0, a.toDisposable)(() => {
              for (const e of this._renderLayers) e.dispose();
              (0, s.removeTerminalFromCache)(this._terminal);
            }));
          }
          get textureAtlas() {
            return this._renderLayers[0].cacheCanvas;
          }
          handleDevicePixelRatioChange() {
            this._devicePixelRatio !== this._coreBrowserService.dpr && (this._devicePixelRatio = this._coreBrowserService.dpr, this.handleResize(this._bufferService.cols, this._bufferService.rows));
          }
          handleResize(e, t) {
            this._updateDimensions();
            for (const e of this._renderLayers) e.resize(this.dimensions);
            this._screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._screenElement.style.height = `${this.dimensions.css.canvas.height}px`;
          }
          handleCharSizeChanged() {
            this.handleResize(this._bufferService.cols, this._bufferService.rows);
          }
          handleBlur() {
            this._runOperation(e => e.handleBlur());
          }
          handleFocus() {
            this._runOperation(e => e.handleFocus());
          }
          handleSelectionChanged(e, t, i = !1) {
            this._runOperation(s => s.handleSelectionChanged(e, t, i)), this._themeService.colors.selectionForeground && this._onRequestRedraw.fire({
              start: 0,
              end: this._bufferService.rows - 1
            });
          }
          handleCursorMove() {
            this._runOperation(e => e.handleCursorMove());
          }
          clear() {
            this._runOperation(e => e.reset());
          }
          _runOperation(e) {
            for (const t of this._renderLayers) e(t);
          }
          renderRows(e, t) {
            for (const i of this._renderLayers) i.handleGridChanged(e, t);
          }
          clearTextureAtlas() {
            for (const e of this._renderLayers) e.clearTextureAtlas();
          }
          _updateDimensions() {
            if (!this._charSizeService.hasValidSize) return;
            const e = this._coreBrowserService.dpr;
            this.dimensions.device.char.width = Math.floor(this._charSizeService.width * e), this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * e), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.top = 1 === this._optionsService.rawOptions.lineHeight ? 0 : Math.round((this.dimensions.device.cell.height - this.dimensions.device.char.height) / 2), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.char.left = Math.floor(this._optionsService.rawOptions.letterSpacing / 2), this.dimensions.device.canvas.height = this._bufferService.rows * this.dimensions.device.cell.height, this.dimensions.device.canvas.width = this._bufferService.cols * this.dimensions.device.cell.width, this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / e), this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / e), this.dimensions.css.cell.height = this.dimensions.css.canvas.height / this._bufferService.rows, this.dimensions.css.cell.width = this.dimensions.css.canvas.width / this._bufferService.cols;
          }
          _setCanvasDevicePixelDimensions(e, t) {
            this.dimensions.device.canvas.height = t, this.dimensions.device.canvas.width = e;
            for (const e of this._renderLayers) e.resize(this.dimensions);
            this._requestRedrawViewport();
          }
          _requestRedrawViewport() {
            this._onRequestRedraw.fire({
              start: 0,
              end: this._bufferService.rows - 1
            });
          }
        }
        t.CanvasRenderer = _;
      },
      873: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CursorRenderLayer = void 0;
        const s = i(903),
          r = i(782),
          o = i(859);
        class n extends s.BaseRenderLayer {
          constructor(e, t, i, s, n, a, h, c, l, d) {
            super(e, t, "cursor", i, !0, d, n, a, l, c), this._onRequestRedraw = s, this._coreService = h, this._cell = new r.CellData(), this._state = {
              x: 0,
              y: 0,
              isFocused: !1,
              style: "",
              width: 0
            }, this._cursorRenderers = {
              bar: this._renderBarCursor.bind(this),
              block: this._renderBlockCursor.bind(this),
              underline: this._renderUnderlineCursor.bind(this)
            }, this.register(a.onOptionChange(() => this._handleOptionsChanged())), this.register((0, o.toDisposable)(() => {
              var e;
              null === (e = this._cursorBlinkStateManager) || void 0 === e || e.dispose(), this._cursorBlinkStateManager = void 0;
            }));
          }
          resize(e) {
            super.resize(e), this._state = {
              x: 0,
              y: 0,
              isFocused: !1,
              style: "",
              width: 0
            };
          }
          reset() {
            var e;
            this._clearCursor(), null === (e = this._cursorBlinkStateManager) || void 0 === e || e.restartBlinkAnimation(), this._handleOptionsChanged();
          }
          handleBlur() {
            var e;
            null === (e = this._cursorBlinkStateManager) || void 0 === e || e.pause(), this._onRequestRedraw.fire({
              start: this._bufferService.buffer.y,
              end: this._bufferService.buffer.y
            });
          }
          handleFocus() {
            var e;
            null === (e = this._cursorBlinkStateManager) || void 0 === e || e.resume(), this._onRequestRedraw.fire({
              start: this._bufferService.buffer.y,
              end: this._bufferService.buffer.y
            });
          }
          _handleOptionsChanged() {
            var e;
            this._optionsService.rawOptions.cursorBlink ? this._cursorBlinkStateManager || (this._cursorBlinkStateManager = new a(this._coreBrowserService.isFocused, () => {
              this._render(!0);
            }, this._coreBrowserService)) : (null === (e = this._cursorBlinkStateManager) || void 0 === e || e.dispose(), this._cursorBlinkStateManager = void 0), this._onRequestRedraw.fire({
              start: this._bufferService.buffer.y,
              end: this._bufferService.buffer.y
            });
          }
          handleCursorMove() {
            var e;
            null === (e = this._cursorBlinkStateManager) || void 0 === e || e.restartBlinkAnimation();
          }
          handleGridChanged(e, t) {
            !this._cursorBlinkStateManager || this._cursorBlinkStateManager.isPaused ? this._render(!1) : this._cursorBlinkStateManager.restartBlinkAnimation();
          }
          _render(e) {
            if (!this._coreService.isCursorInitialized || this._coreService.isCursorHidden) return void this._clearCursor();
            const t = this._bufferService.buffer.ybase + this._bufferService.buffer.y,
              i = t - this._bufferService.buffer.ydisp;
            if (i < 0 || i >= this._bufferService.rows) return void this._clearCursor();
            const s = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);
            if (this._bufferService.buffer.lines.get(t).loadCell(s, this._cell), void 0 !== this._cell.content) {
              if (!this._coreBrowserService.isFocused) {
                this._clearCursor(), this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css;
                const e = this._optionsService.rawOptions.cursorStyle;
                return this._renderBlurCursor(s, i, this._cell), this._ctx.restore(), this._state.x = s, this._state.y = i, this._state.isFocused = !1, this._state.style = e, void (this._state.width = this._cell.getWidth());
              }
              if (!this._cursorBlinkStateManager || this._cursorBlinkStateManager.isCursorVisible) {
                if (this._state) {
                  if (this._state.x === s && this._state.y === i && this._state.isFocused === this._coreBrowserService.isFocused && this._state.style === this._optionsService.rawOptions.cursorStyle && this._state.width === this._cell.getWidth()) return;
                  this._clearCursor();
                }
                this._ctx.save(), this._cursorRenderers[this._optionsService.rawOptions.cursorStyle || "block"](s, i, this._cell), this._ctx.restore(), this._state.x = s, this._state.y = i, this._state.isFocused = !1, this._state.style = this._optionsService.rawOptions.cursorStyle, this._state.width = this._cell.getWidth();
              } else this._clearCursor();
            }
          }
          _clearCursor() {
            this._state && (this._coreBrowserService.dpr < 1 ? this._clearAll() : this._clearCells(this._state.x, this._state.y, this._state.width, 1), this._state = {
              x: 0,
              y: 0,
              isFocused: !1,
              style: "",
              width: 0
            });
          }
          _renderBarCursor(e, t, i) {
            this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillLeftLineAtCell(e, t, this._optionsService.rawOptions.cursorWidth), this._ctx.restore();
          }
          _renderBlockCursor(e, t, i) {
            this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillCells(e, t, i.getWidth(), 1), this._ctx.fillStyle = this._themeService.colors.cursorAccent.css, this._fillCharTrueColor(i, e, t), this._ctx.restore();
          }
          _renderUnderlineCursor(e, t, i) {
            this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillBottomLineAtCells(e, t), this._ctx.restore();
          }
          _renderBlurCursor(e, t, i) {
            this._ctx.save(), this._ctx.strokeStyle = this._themeService.colors.cursor.css, this._strokeRectAtCell(e, t, i.getWidth(), 1), this._ctx.restore();
          }
        }
        t.CursorRenderLayer = n;
        class a {
          constructor(e, t, i) {
            this._renderCallback = t, this._coreBrowserService = i, this.isCursorVisible = !0, e && this._restartInterval();
          }
          get isPaused() {
            return !(this._blinkStartTimeout || this._blinkInterval);
          }
          dispose() {
            this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout && (this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout), this._blinkStartTimeout = void 0), this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
          }
          restartBlinkAnimation() {
            this.isPaused || (this._animationTimeRestarted = Date.now(), this.isCursorVisible = !0, this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
              this._renderCallback(), this._animationFrame = void 0;
            })));
          }
          _restartInterval(e = 600) {
            this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout = this._coreBrowserService.window.setTimeout(() => {
              if (this._animationTimeRestarted) {
                const e = 600 - (Date.now() - this._animationTimeRestarted);
                if (this._animationTimeRestarted = void 0, e > 0) return void this._restartInterval(e);
              }
              this.isCursorVisible = !1, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                this._renderCallback(), this._animationFrame = void 0;
              }), this._blinkInterval = this._coreBrowserService.window.setInterval(() => {
                if (this._animationTimeRestarted) {
                  const e = 600 - (Date.now() - this._animationTimeRestarted);
                  return this._animationTimeRestarted = void 0, void this._restartInterval(e);
                }
                this.isCursorVisible = !this.isCursorVisible, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                  this._renderCallback(), this._animationFrame = void 0;
                });
              }, 600);
            }, e);
          }
          pause() {
            this.isCursorVisible = !0, this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout && (this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout), this._blinkStartTimeout = void 0), this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
          }
          resume() {
            this.pause(), this._animationTimeRestarted = void 0, this._restartInterval(), this.restartBlinkAnimation();
          }
        }
      },
      574: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.GridCache = void 0, t.GridCache = class {
          constructor() {
            this.cache = [];
          }
          resize(e, t) {
            for (let i = 0; i < e; i++) {
              this.cache.length <= i && this.cache.push([]);
              for (let e = this.cache[i].length; e < t; e++) this.cache[i].push(void 0);
              this.cache[i].length = t;
            }
            this.cache.length = e;
          }
          clear() {
            for (let e = 0; e < this.cache.length; e++) for (let t = 0; t < this.cache[e].length; t++) this.cache[e][t] = void 0;
          }
        };
      },
      43: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.LinkRenderLayer = void 0;
        const s = i(903),
          r = i(237),
          o = i(197);
        class n extends s.BaseRenderLayer {
          constructor(e, t, i, s, r, o, n, a, h) {
            super(e, t, "link", i, !0, h, r, o, n, a), this.register(s.onShowLinkUnderline(e => this._handleShowLinkUnderline(e))), this.register(s.onHideLinkUnderline(e => this._handleHideLinkUnderline(e)));
          }
          resize(e) {
            super.resize(e), this._state = void 0;
          }
          reset() {
            this._clearCurrentLink();
          }
          _clearCurrentLink() {
            if (this._state) {
              this._clearCells(this._state.x1, this._state.y1, this._state.cols - this._state.x1, 1);
              const e = this._state.y2 - this._state.y1 - 1;
              e > 0 && this._clearCells(0, this._state.y1 + 1, this._state.cols, e), this._clearCells(0, this._state.y2, this._state.x2, 1), this._state = void 0;
            }
          }
          _handleShowLinkUnderline(e) {
            if (e.fg === r.INVERTED_DEFAULT_COLOR ? this._ctx.fillStyle = this._themeService.colors.background.css : e.fg && (0, o.is256Color)(e.fg) ? this._ctx.fillStyle = this._themeService.colors.ansi[e.fg].css : this._ctx.fillStyle = this._themeService.colors.foreground.css, e.y1 === e.y2) this._fillBottomLineAtCells(e.x1, e.y1, e.x2 - e.x1);else {
              this._fillBottomLineAtCells(e.x1, e.y1, e.cols - e.x1);
              for (let t = e.y1 + 1; t < e.y2; t++) this._fillBottomLineAtCells(0, t, e.cols);
              this._fillBottomLineAtCells(0, e.y2, e.x2);
            }
            this._state = e;
          }
          _handleHideLinkUnderline(e) {
            this._clearCurrentLink();
          }
        }
        t.LinkRenderLayer = n;
      },
      630: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.SelectionRenderLayer = void 0;
        const s = i(903);
        class r extends s.BaseRenderLayer {
          constructor(e, t, i, s, r, o, n, a) {
            super(e, t, "selection", i, !0, a, s, n, o, r), this._clearState();
          }
          _clearState() {
            this._state = {
              start: void 0,
              end: void 0,
              columnSelectMode: void 0,
              ydisp: void 0
            };
          }
          resize(e) {
            super.resize(e), this._selectionModel.selectionStart && this._selectionModel.selectionEnd && (this._clearState(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode));
          }
          reset() {
            this._state.start && this._state.end && (this._clearState(), this._clearAll());
          }
          handleBlur() {
            this.reset(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
          }
          handleFocus() {
            this.reset(), this._redrawSelection(this._selectionModel.selectionStart, this._selectionModel.selectionEnd, this._selectionModel.columnSelectMode);
          }
          handleSelectionChanged(e, t, i) {
            super.handleSelectionChanged(e, t, i), this._redrawSelection(e, t, i);
          }
          _redrawSelection(e, t, i) {
            if (!this._didStateChange(e, t, i, this._bufferService.buffer.ydisp)) return;
            if (this._clearAll(), !e || !t) return void this._clearState();
            const s = e[1] - this._bufferService.buffer.ydisp,
              r = t[1] - this._bufferService.buffer.ydisp,
              o = Math.max(s, 0),
              n = Math.min(r, this._bufferService.rows - 1);
            if (o >= this._bufferService.rows || n < 0) this._state.ydisp = this._bufferService.buffer.ydisp;else {
              if (this._ctx.fillStyle = (this._coreBrowserService.isFocused ? this._themeService.colors.selectionBackgroundTransparent : this._themeService.colors.selectionInactiveBackgroundTransparent).css, i) {
                const i = e[0],
                  s = t[0] - i,
                  r = n - o + 1;
                this._fillCells(i, o, s, r);
              } else {
                const i = s === o ? e[0] : 0,
                  a = o === r ? t[0] : this._bufferService.cols;
                this._fillCells(i, o, a - i, 1);
                const h = Math.max(n - o - 1, 0);
                if (this._fillCells(0, o + 1, this._bufferService.cols, h), o !== n) {
                  const e = r === n ? t[0] : this._bufferService.cols;
                  this._fillCells(0, n, e, 1);
                }
              }
              this._state.start = [e[0], e[1]], this._state.end = [t[0], t[1]], this._state.columnSelectMode = i, this._state.ydisp = this._bufferService.buffer.ydisp;
            }
          }
          _didStateChange(e, t, i, s) {
            return !this._areCoordinatesEqual(e, this._state.start) || !this._areCoordinatesEqual(t, this._state.end) || i !== this._state.columnSelectMode || s !== this._state.ydisp;
          }
          _areCoordinatesEqual(e, t) {
            return !(!e || !t) && e[0] === t[0] && e[1] === t[1];
          }
        }
        t.SelectionRenderLayer = r;
      },
      744: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TextRenderLayer = void 0;
        const s = i(574),
          r = i(903),
          o = i(147),
          n = i(855),
          a = i(782),
          h = i(577),
          c = i(160);
        class l extends r.BaseRenderLayer {
          constructor(e, t, i, r, o, n, h, c, l, d) {
            super(e, t, "text", i, r, d, o, n, c, l), this._characterJoinerService = h, this._characterWidth = 0, this._characterFont = "", this._characterOverlapCache = {}, this._workCell = new a.CellData(), this._state = new s.GridCache(), this.register(n.onSpecificOptionChange("allowTransparency", e => this._setTransparency(e)));
          }
          resize(e) {
            super.resize(e);
            const t = this._getFont(!1, !1);
            this._characterWidth === e.device.char.width && this._characterFont === t || (this._characterWidth = e.device.char.width, this._characterFont = t, this._characterOverlapCache = {}), this._state.clear(), this._state.resize(this._bufferService.cols, this._bufferService.rows);
          }
          reset() {
            this._state.clear(), this._clearAll();
          }
          _forEachCell(e, t, i) {
            for (let s = e; s <= t; s++) {
              const e = s + this._bufferService.buffer.ydisp,
                t = this._bufferService.buffer.lines.get(e),
                r = this._characterJoinerService.getJoinedCharacters(e);
              for (let e = 0; e < this._bufferService.cols; e++) {
                t.loadCell(e, this._workCell);
                let o = this._workCell,
                  a = !1,
                  c = e;
                if (0 !== o.getWidth()) {
                  if (r.length > 0 && e === r[0][0]) {
                    a = !0;
                    const e = r.shift();
                    o = new h.JoinedCellData(this._workCell, t.translateToString(!0, e[0], e[1]), e[1] - e[0]), c = e[1] - 1;
                  }
                  !a && this._isOverlapping(o) && c < t.length - 1 && t.getCodePoint(c + 1) === n.NULL_CELL_CODE && (o.content &= -12582913, o.content |= 2 << 22), i(o, e, s), e = c;
                }
              }
            }
          }
          _drawBackground(e, t) {
            const i = this._ctx,
              s = this._bufferService.cols;
            let r = 0,
              n = 0,
              a = null;
            i.save(), this._forEachCell(e, t, (e, t, h) => {
              let l = null;
              e.isInverse() ? l = e.isFgDefault() ? this._themeService.colors.foreground.css : e.isFgRGB() ? `rgb(${o.AttributeData.toColorRGB(e.getFgColor()).join(",")})` : this._themeService.colors.ansi[e.getFgColor()].css : e.isBgRGB() ? l = `rgb(${o.AttributeData.toColorRGB(e.getBgColor()).join(",")})` : e.isBgPalette() && (l = this._themeService.colors.ansi[e.getBgColor()].css), l && e.isDim() && (l = c.color.multiplyOpacity(c.css.toColor(l), .5).css);
              let d = !1;
              this._decorationService.forEachDecorationAtCell(t, this._bufferService.buffer.ydisp + h, void 0, e => {
                "top" !== e.options.layer && d || (e.backgroundColorRGB && (l = e.backgroundColorRGB.css), d = "top" === e.options.layer);
              }), null === a && (r = t, n = h), h !== n ? (i.fillStyle = a || "", this._fillCells(r, n, s - r, 1), r = t, n = h) : a !== l && (i.fillStyle = a || "", this._fillCells(r, n, t - r, 1), r = t, n = h), a = l;
            }), null !== a && (i.fillStyle = a, this._fillCells(r, n, s - r, 1)), i.restore();
          }
          _drawForeground(e, t) {
            this._forEachCell(e, t, (e, t, i) => this._drawChars(e, t, i));
          }
          handleGridChanged(e, t) {
            0 !== this._state.cache.length && (this._charAtlas && this._charAtlas.beginFrame(), this._clearCells(0, e, this._bufferService.cols, t - e + 1), this._drawBackground(e, t), this._drawForeground(e, t));
          }
          _isOverlapping(e) {
            if (1 !== e.getWidth()) return !1;
            if (e.getCode() < 256) return !1;
            const t = e.getChars();
            if (this._characterOverlapCache.hasOwnProperty(t)) return this._characterOverlapCache[t];
            this._ctx.save(), this._ctx.font = this._characterFont;
            const i = Math.floor(this._ctx.measureText(t).width) > this._characterWidth;
            return this._ctx.restore(), this._characterOverlapCache[t] = i, i;
          }
        }
        t.TextRenderLayer = l;
      },
      274: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CellColorResolver = void 0;
        let i,
          s = 0,
          r = 0,
          o = !1,
          n = !1,
          a = !1;
        t.CellColorResolver = class {
          constructor(e, t, i, s, r) {
            this._terminal = e, this._selectionRenderModel = t, this._decorationService = i, this._coreBrowserService = s, this._themeService = r, this.result = {
              fg: 0,
              bg: 0,
              ext: 0
            };
          }
          resolve(e, t, h) {
            this.result.bg = e.bg, this.result.fg = e.fg, this.result.ext = 268435456 & e.bg ? e.extended.ext : 0, r = 0, s = 0, n = !1, o = !1, a = !1, i = this._themeService.colors, this._decorationService.forEachDecorationAtCell(t, h, "bottom", e => {
              e.backgroundColorRGB && (r = e.backgroundColorRGB.rgba >> 8 & 16777215, n = !0), e.foregroundColorRGB && (s = e.foregroundColorRGB.rgba >> 8 & 16777215, o = !0);
            }), a = this._selectionRenderModel.isCellSelected(this._terminal, t, h), a && (r = (this._coreBrowserService.isFocused ? i.selectionBackgroundOpaque : i.selectionInactiveBackgroundOpaque).rgba >> 8 & 16777215, n = !0, i.selectionForeground && (s = i.selectionForeground.rgba >> 8 & 16777215, o = !0)), this._decorationService.forEachDecorationAtCell(t, h, "top", e => {
              e.backgroundColorRGB && (r = e.backgroundColorRGB.rgba >> 8 & 16777215, n = !0), e.foregroundColorRGB && (s = e.foregroundColorRGB.rgba >> 8 & 16777215, o = !0);
            }), n && (r = a ? -16777216 & e.bg & -134217729 | r | 50331648 : -16777216 & e.bg | r | 50331648), o && (s = -16777216 & e.fg & -67108865 | s | 50331648), 67108864 & this.result.fg && (n && !o && (s = 0 == (50331648 & this.result.bg) ? -134217728 & this.result.fg | 16777215 & i.background.rgba >> 8 | 50331648 : -134217728 & this.result.fg | 67108863 & this.result.bg, o = !0), !n && o && (r = 0 == (50331648 & this.result.fg) ? -67108864 & this.result.bg | 16777215 & i.foreground.rgba >> 8 | 50331648 : -67108864 & this.result.bg | 67108863 & this.result.fg, n = !0)), i = void 0, this.result.bg = n ? r : this.result.bg, this.result.fg = o ? s : this.result.fg;
          }
        };
      },
      627: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.removeTerminalFromCache = t.acquireTextureAtlas = void 0;
        const s = i(509),
          r = i(197),
          o = [];
        t.acquireTextureAtlas = function (e, t, i, n, a, h, c, l) {
          const d = (0, r.generateConfig)(n, a, h, c, t, i, l);
          for (let t = 0; t < o.length; t++) {
            const i = o[t],
              s = i.ownedBy.indexOf(e);
            if (s >= 0) {
              if ((0, r.configEquals)(i.config, d)) return i.atlas;
              1 === i.ownedBy.length ? (i.atlas.dispose(), o.splice(t, 1)) : i.ownedBy.splice(s, 1);
              break;
            }
          }
          for (let t = 0; t < o.length; t++) {
            const i = o[t];
            if ((0, r.configEquals)(i.config, d)) return i.ownedBy.push(e), i.atlas;
          }
          const _ = e._core,
            u = {
              atlas: new s.TextureAtlas(document, d, _.unicodeService),
              config: d,
              ownedBy: [e]
            };
          return o.push(u), u.atlas;
        }, t.removeTerminalFromCache = function (e) {
          for (let t = 0; t < o.length; t++) {
            const i = o[t].ownedBy.indexOf(e);
            if (-1 !== i) {
              1 === o[t].ownedBy.length ? (o[t].atlas.dispose(), o.splice(t, 1)) : o[t].ownedBy.splice(i, 1);
              break;
            }
          }
        };
      },
      197: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.is256Color = t.configEquals = t.generateConfig = void 0;
        const s = i(160);
        t.generateConfig = function (e, t, i, r, o, n, a) {
          const h = {
            foreground: n.foreground,
            background: n.background,
            cursor: s.NULL_COLOR,
            cursorAccent: s.NULL_COLOR,
            selectionForeground: s.NULL_COLOR,
            selectionBackgroundTransparent: s.NULL_COLOR,
            selectionBackgroundOpaque: s.NULL_COLOR,
            selectionInactiveBackgroundTransparent: s.NULL_COLOR,
            selectionInactiveBackgroundOpaque: s.NULL_COLOR,
            ansi: n.ansi.slice(),
            contrastCache: n.contrastCache
          };
          return {
            customGlyphs: o.customGlyphs,
            devicePixelRatio: a,
            letterSpacing: o.letterSpacing,
            lineHeight: o.lineHeight,
            deviceCellWidth: e,
            deviceCellHeight: t,
            deviceCharWidth: i,
            deviceCharHeight: r,
            fontFamily: o.fontFamily,
            fontSize: o.fontSize,
            fontWeight: o.fontWeight,
            fontWeightBold: o.fontWeightBold,
            allowTransparency: o.allowTransparency,
            drawBoldTextInBrightColors: o.drawBoldTextInBrightColors,
            minimumContrastRatio: o.minimumContrastRatio,
            colors: h
          };
        }, t.configEquals = function (e, t) {
          for (let i = 0; i < e.colors.ansi.length; i++) if (e.colors.ansi[i].rgba !== t.colors.ansi[i].rgba) return !1;
          return e.devicePixelRatio === t.devicePixelRatio && e.customGlyphs === t.customGlyphs && e.lineHeight === t.lineHeight && e.letterSpacing === t.letterSpacing && e.fontFamily === t.fontFamily && e.fontSize === t.fontSize && e.fontWeight === t.fontWeight && e.fontWeightBold === t.fontWeightBold && e.allowTransparency === t.allowTransparency && e.deviceCharWidth === t.deviceCharWidth && e.deviceCharHeight === t.deviceCharHeight && e.drawBoldTextInBrightColors === t.drawBoldTextInBrightColors && e.minimumContrastRatio === t.minimumContrastRatio && e.colors.foreground.rgba === t.colors.foreground.rgba && e.colors.background.rgba === t.colors.background.rgba;
        }, t.is256Color = function (e) {
          return 16777216 == (50331648 & e) || 33554432 == (50331648 & e);
        };
      },
      237: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TEXT_BASELINE = t.DIM_OPACITY = t.INVERTED_DEFAULT_COLOR = void 0;
        const s = i(399);
        t.INVERTED_DEFAULT_COLOR = 257, t.DIM_OPACITY = .5, t.TEXT_BASELINE = s.isFirefox || s.isLegacyEdge ? "bottom" : "ideographic";
      },
      860: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.tryDrawCustomChar = t.powerlineDefinitions = t.boxDrawingDefinitions = t.blockElementDefinitions = void 0;
        const s = i(374);
        t.blockElementDefinitions = {
          "▀": [{
            x: 0,
            y: 0,
            w: 8,
            h: 4
          }],
          "▁": [{
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "▂": [{
            x: 0,
            y: 6,
            w: 8,
            h: 2
          }],
          "▃": [{
            x: 0,
            y: 5,
            w: 8,
            h: 3
          }],
          "▄": [{
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "▅": [{
            x: 0,
            y: 3,
            w: 8,
            h: 5
          }],
          "▆": [{
            x: 0,
            y: 2,
            w: 8,
            h: 6
          }],
          "▇": [{
            x: 0,
            y: 1,
            w: 8,
            h: 7
          }],
          "█": [{
            x: 0,
            y: 0,
            w: 8,
            h: 8
          }],
          "▉": [{
            x: 0,
            y: 0,
            w: 7,
            h: 8
          }],
          "▊": [{
            x: 0,
            y: 0,
            w: 6,
            h: 8
          }],
          "▋": [{
            x: 0,
            y: 0,
            w: 5,
            h: 8
          }],
          "▌": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }],
          "▍": [{
            x: 0,
            y: 0,
            w: 3,
            h: 8
          }],
          "▎": [{
            x: 0,
            y: 0,
            w: 2,
            h: 8
          }],
          "▏": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }],
          "▐": [{
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }],
          "▔": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "▕": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }],
          "▖": [{
            x: 0,
            y: 4,
            w: 4,
            h: 4
          }],
          "▗": [{
            x: 4,
            y: 4,
            w: 4,
            h: 4
          }],
          "▘": [{
            x: 0,
            y: 0,
            w: 4,
            h: 4
          }],
          "▙": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "▚": [{
            x: 0,
            y: 0,
            w: 4,
            h: 4
          }, {
            x: 4,
            y: 4,
            w: 4,
            h: 4
          }],
          "▛": [{
            x: 0,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }],
          "▜": [{
            x: 0,
            y: 0,
            w: 8,
            h: 4
          }, {
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }],
          "▝": [{
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }],
          "▞": [{
            x: 4,
            y: 0,
            w: 4,
            h: 4
          }, {
            x: 0,
            y: 4,
            w: 4,
            h: 4
          }],
          "▟": [{
            x: 4,
            y: 0,
            w: 4,
            h: 8
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 4
          }],
          "🭰": [{
            x: 1,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭱": [{
            x: 2,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭲": [{
            x: 3,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭳": [{
            x: 4,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭴": [{
            x: 5,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭵": [{
            x: 6,
            y: 0,
            w: 1,
            h: 8
          }],
          "🭶": [{
            x: 0,
            y: 1,
            w: 8,
            h: 1
          }],
          "🭷": [{
            x: 0,
            y: 2,
            w: 8,
            h: 1
          }],
          "🭸": [{
            x: 0,
            y: 3,
            w: 8,
            h: 1
          }],
          "🭹": [{
            x: 0,
            y: 4,
            w: 8,
            h: 1
          }],
          "🭺": [{
            x: 0,
            y: 5,
            w: 8,
            h: 1
          }],
          "🭻": [{
            x: 0,
            y: 6,
            w: 8,
            h: 1
          }],
          "🭼": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🭽": [{
            x: 0,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "🭾": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }],
          "🭿": [{
            x: 7,
            y: 0,
            w: 1,
            h: 8
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮀": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮁": [{
            x: 0,
            y: 0,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 2,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 4,
            w: 8,
            h: 1
          }, {
            x: 0,
            y: 7,
            w: 8,
            h: 1
          }],
          "🮂": [{
            x: 0,
            y: 0,
            w: 8,
            h: 2
          }],
          "🮃": [{
            x: 0,
            y: 0,
            w: 8,
            h: 3
          }],
          "🮄": [{
            x: 0,
            y: 0,
            w: 8,
            h: 5
          }],
          "🮅": [{
            x: 0,
            y: 0,
            w: 8,
            h: 6
          }],
          "🮆": [{
            x: 0,
            y: 0,
            w: 8,
            h: 7
          }],
          "🮇": [{
            x: 6,
            y: 0,
            w: 2,
            h: 8
          }],
          "🮈": [{
            x: 5,
            y: 0,
            w: 3,
            h: 8
          }],
          "🮉": [{
            x: 3,
            y: 0,
            w: 5,
            h: 8
          }],
          "🮊": [{
            x: 2,
            y: 0,
            w: 6,
            h: 8
          }],
          "🮋": [{
            x: 1,
            y: 0,
            w: 7,
            h: 8
          }],
          "🮕": [{
            x: 0,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 6,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 6,
            w: 2,
            h: 2
          }],
          "🮖": [{
            x: 2,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 0,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 2,
            w: 2,
            h: 2
          }, {
            x: 2,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 6,
            y: 4,
            w: 2,
            h: 2
          }, {
            x: 0,
            y: 6,
            w: 2,
            h: 2
          }, {
            x: 4,
            y: 6,
            w: 2,
            h: 2
          }],
          "🮗": [{
            x: 0,
            y: 2,
            w: 8,
            h: 2
          }, {
            x: 0,
            y: 6,
            w: 8,
            h: 2
          }]
        };
        const r = {
          "░": [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0]],
          "▒": [[1, 0], [0, 0], [0, 1], [0, 0]],
          "▓": [[0, 1], [1, 1], [1, 0], [1, 1]]
        };
        t.boxDrawingDefinitions = {
          "─": {
            1: "M0,.5 L1,.5"
          },
          "━": {
            3: "M0,.5 L1,.5"
          },
          "│": {
            1: "M.5,0 L.5,1"
          },
          "┃": {
            3: "M.5,0 L.5,1"
          },
          "┌": {
            1: "M0.5,1 L.5,.5 L1,.5"
          },
          "┏": {
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┐": {
            1: "M0,.5 L.5,.5 L.5,1"
          },
          "┓": {
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "└": {
            1: "M.5,0 L.5,.5 L1,.5"
          },
          "┗": {
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┘": {
            1: "M.5,0 L.5,.5 L0,.5"
          },
          "┛": {
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "├": {
            1: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "┣": {
            3: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "┤": {
            1: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "┫": {
            3: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "┬": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "┳": {
            3: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "┴": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,0"
          },
          "┻": {
            3: "M0,.5 L1,.5 M.5,.5 L.5,0"
          },
          "┼": {
            1: "M0,.5 L1,.5 M.5,0 L.5,1"
          },
          "╋": {
            3: "M0,.5 L1,.5 M.5,0 L.5,1"
          },
          "╴": {
            1: "M.5,.5 L0,.5"
          },
          "╸": {
            3: "M.5,.5 L0,.5"
          },
          "╵": {
            1: "M.5,.5 L.5,0"
          },
          "╹": {
            3: "M.5,.5 L.5,0"
          },
          "╶": {
            1: "M.5,.5 L1,.5"
          },
          "╺": {
            3: "M.5,.5 L1,.5"
          },
          "╷": {
            1: "M.5,.5 L.5,1"
          },
          "╻": {
            3: "M.5,.5 L.5,1"
          },
          "═": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "║": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╒": {
            1: (e, t) => `M.5,1 L.5,${.5 - t} L1,${.5 - t} M.5,${.5 + t} L1,${.5 + t}`
          },
          "╓": {
            1: (e, t) => `M${.5 - e},1 L${.5 - e},.5 L1,.5 M${.5 + e},.5 L${.5 + e},1`
          },
          "╔": {
            1: (e, t) => `M1,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1`
          },
          "╕": {
            1: (e, t) => `M0,${.5 - t} L.5,${.5 - t} L.5,1 M0,${.5 + t} L.5,${.5 + t}`
          },
          "╖": {
            1: (e, t) => `M${.5 + e},1 L${.5 + e},.5 L0,.5 M${.5 - e},.5 L${.5 - e},1`
          },
          "╗": {
            1: (e, t) => `M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M0,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},1`
          },
          "╘": {
            1: (e, t) => `M.5,0 L.5,${.5 + t} L1,${.5 + t} M.5,${.5 - t} L1,${.5 - t}`
          },
          "╙": {
            1: (e, t) => `M1,.5 L${.5 - e},.5 L${.5 - e},0 M${.5 + e},.5 L${.5 + e},0`
          },
          "╚": {
            1: (e, t) => `M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0 M1,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},0`
          },
          "╛": {
            1: (e, t) => `M0,${.5 + t} L.5,${.5 + t} L.5,0 M0,${.5 - t} L.5,${.5 - t}`
          },
          "╜": {
            1: (e, t) => `M0,.5 L${.5 + e},.5 L${.5 + e},0 M${.5 - e},.5 L${.5 - e},0`
          },
          "╝": {
            1: (e, t) => `M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M0,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},0`
          },
          "╞": {
            1: (e, t) => `M.5,0 L.5,1 M.5,${.5 - t} L1,${.5 - t} M.5,${.5 + t} L1,${.5 + t}`
          },
          "╟": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1 M${.5 + e},.5 L1,.5`
          },
          "╠": {
            1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╡": {
            1: (e, t) => `M.5,0 L.5,1 M0,${.5 - t} L.5,${.5 - t} M0,${.5 + t} L.5,${.5 + t}`
          },
          "╢": {
            1: (e, t) => `M0,.5 L${.5 - e},.5 M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╣": {
            1: (e, t) => `M${.5 + e},0 L${.5 + e},1 M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0`
          },
          "╤": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t} M.5,${.5 + t} L.5,1`
          },
          "╥": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},.5 L${.5 - e},1 M${.5 + e},.5 L${.5 + e},1`
          },
          "╦": {
            1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1`
          },
          "╧": {
            1: (e, t) => `M.5,0 L.5,${.5 - t} M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "╨": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},.5 L${.5 - e},0 M${.5 + e},.5 L${.5 + e},0`
          },
          "╩": {
            1: (e, t) => `M0,${.5 + t} L1,${.5 + t} M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╪": {
            1: (e, t) => `M.5,0 L.5,1 M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
          },
          "╫": {
            1: (e, t) => `M0,.5 L1,.5 M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
          },
          "╬": {
            1: (e, t) => `M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1 M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
          },
          "╱": {
            1: "M1,0 L0,1"
          },
          "╲": {
            1: "M0,0 L1,1"
          },
          "╳": {
            1: "M1,0 L0,1 M0,0 L1,1"
          },
          "╼": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "╽": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L.5,1"
          },
          "╾": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "╿": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "┍": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┎": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┑": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L0,.5"
          },
          "┒": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L.5,1"
          },
          "┕": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L1,.5"
          },
          "┖": {
            1: "M.5,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┙": {
            1: "M.5,.5 L.5,0",
            3: "M.5,.5 L0,.5"
          },
          "┚": {
            1: "M.5,.5 L0,.5",
            3: "M.5,.5 L.5,0"
          },
          "┝": {
            1: "M.5,0 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┞": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┟": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┠": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,1"
          },
          "┡": {
            1: "M.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┢": {
            1: "M.5,.5 L.5,0",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┥": {
            1: "M.5,0 L.5,1",
            3: "M.5,.5 L0,.5"
          },
          "┦": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "┧": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M.5,.5 L.5,1"
          },
          "┨": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,1"
          },
          "┩": {
            1: "M.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "┪": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "┭": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┮": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,.5 L1,.5"
          },
          "┯": {
            1: "M.5,.5 L.5,1",
            3: "M0,.5 L1,.5"
          },
          "┰": {
            1: "M0,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "┱": {
            1: "M.5,.5 L1,.5",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "┲": {
            1: "M.5,.5 L0,.5",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "┵": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┶": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "┷": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L1,.5"
          },
          "┸": {
            1: "M0,.5 L1,.5",
            3: "M.5,.5 L.5,0"
          },
          "┹": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "┺": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "┽": {
            1: "M.5,0 L.5,1 M.5,.5 L1,.5",
            3: "M.5,.5 L0,.5"
          },
          "┾": {
            1: "M.5,0 L.5,1 M.5,.5 L0,.5",
            3: "M.5,.5 L1,.5"
          },
          "┿": {
            1: "M.5,0 L.5,1",
            3: "M0,.5 L1,.5"
          },
          "╀": {
            1: "M0,.5 L1,.5 M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0"
          },
          "╁": {
            1: "M.5,.5 L.5,0 M0,.5 L1,.5",
            3: "M.5,.5 L.5,1"
          },
          "╂": {
            1: "M0,.5 L1,.5",
            3: "M.5,0 L.5,1"
          },
          "╃": {
            1: "M0.5,1 L.5,.5 L1,.5",
            3: "M.5,0 L.5,.5 L0,.5"
          },
          "╄": {
            1: "M0,.5 L.5,.5 L.5,1",
            3: "M.5,0 L.5,.5 L1,.5"
          },
          "╅": {
            1: "M.5,0 L.5,.5 L1,.5",
            3: "M0,.5 L.5,.5 L.5,1"
          },
          "╆": {
            1: "M.5,0 L.5,.5 L0,.5",
            3: "M0.5,1 L.5,.5 L1,.5"
          },
          "╇": {
            1: "M.5,.5 L.5,1",
            3: "M.5,.5 L.5,0 M0,.5 L1,.5"
          },
          "╈": {
            1: "M.5,.5 L.5,0",
            3: "M0,.5 L1,.5 M.5,.5 L.5,1"
          },
          "╉": {
            1: "M.5,.5 L1,.5",
            3: "M.5,0 L.5,1 M.5,.5 L0,.5"
          },
          "╊": {
            1: "M.5,.5 L0,.5",
            3: "M.5,0 L.5,1 M.5,.5 L1,.5"
          },
          "╌": {
            1: "M.1,.5 L.4,.5 M.6,.5 L.9,.5"
          },
          "╍": {
            3: "M.1,.5 L.4,.5 M.6,.5 L.9,.5"
          },
          "┄": {
            1: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"
          },
          "┅": {
            3: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"
          },
          "┈": {
            1: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"
          },
          "┉": {
            3: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"
          },
          "╎": {
            1: "M.5,.1 L.5,.4 M.5,.6 L.5,.9"
          },
          "╏": {
            3: "M.5,.1 L.5,.4 M.5,.6 L.5,.9"
          },
          "┆": {
            1: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"
          },
          "┇": {
            3: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"
          },
          "┊": {
            1: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"
          },
          "┋": {
            3: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"
          },
          "╭": {
            1: (e, t) => `M.5,1 L.5,${.5 + t / .15 * .5} C.5,${.5 + t / .15 * .5},.5,.5,1,.5`
          },
          "╮": {
            1: (e, t) => `M.5,1 L.5,${.5 + t / .15 * .5} C.5,${.5 + t / .15 * .5},.5,.5,0,.5`
          },
          "╯": {
            1: (e, t) => `M.5,0 L.5,${.5 - t / .15 * .5} C.5,${.5 - t / .15 * .5},.5,.5,0,.5`
          },
          "╰": {
            1: (e, t) => `M.5,0 L.5,${.5 - t / .15 * .5} C.5,${.5 - t / .15 * .5},.5,.5,1,.5`
          }
        }, t.powerlineDefinitions = {
          "": {
            d: "M0,0 L1,.5 L0,1",
            type: 0,
            rightPadding: 2
          },
          "": {
            d: "M-1,-.5 L1,.5 L-1,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M1,0 L0,.5 L1,1",
            type: 0,
            leftPadding: 2
          },
          "": {
            d: "M2,-.5 L0,.5 L2,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",
            type: 0,
            rightPadding: 1
          },
          "": {
            d: "M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",
            type: 1,
            rightPadding: 1
          },
          "": {
            d: "M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",
            type: 0,
            leftPadding: 1
          },
          "": {
            d: "M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",
            type: 1,
            leftPadding: 1
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5 L-.5,1.5",
            type: 0
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5 L1.5,1.5",
            type: 0
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5 L-.5,-.5",
            type: 0
          },
          "": {
            d: "M1.5,-.5 L-.5,1.5",
            type: 1,
            leftPadding: 1,
            rightPadding: 1
          },
          "": {
            d: "M-.5,-.5 L1.5,1.5 L1.5,-.5",
            type: 0
          }
        }, t.powerlineDefinitions[""] = t.powerlineDefinitions[""], t.powerlineDefinitions[""] = t.powerlineDefinitions[""], t.tryDrawCustomChar = function (e, i, n, c, l, d, _, u) {
          const g = t.blockElementDefinitions[i];
          if (g) return function (e, t, i, s, r, o) {
            for (let n = 0; n < t.length; n++) {
              const a = t[n],
                h = r / 8,
                c = o / 8;
              e.fillRect(i + a.x * h, s + a.y * c, a.w * h, a.h * c);
            }
          }(e, g, n, c, l, d), !0;
          const f = r[i];
          if (f) return function (e, t, i, r, n, a) {
            let h = o.get(t);
            h || (h = new Map(), o.set(t, h));
            const c = e.fillStyle;
            if ("string" != typeof c) throw new Error(`Unexpected fillStyle type "${c}"`);
            let l = h.get(c);
            if (!l) {
              const i = t[0].length,
                r = t.length,
                o = document.createElement("canvas");
              o.width = i, o.height = r;
              const n = (0, s.throwIfFalsy)(o.getContext("2d")),
                a = new ImageData(i, r);
              let d, _, u, g;
              if (c.startsWith("#")) d = parseInt(c.slice(1, 3), 16), _ = parseInt(c.slice(3, 5), 16), u = parseInt(c.slice(5, 7), 16), g = c.length > 7 && parseInt(c.slice(7, 9), 16) || 1;else {
                if (!c.startsWith("rgba")) throw new Error(`Unexpected fillStyle color format "${c}" when drawing pattern glyph`);
                [d, _, u, g] = c.substring(5, c.length - 1).split(",").map(e => parseFloat(e));
              }
              for (let e = 0; e < r; e++) for (let s = 0; s < i; s++) a.data[4 * (e * i + s)] = d, a.data[4 * (e * i + s) + 1] = _, a.data[4 * (e * i + s) + 2] = u, a.data[4 * (e * i + s) + 3] = t[e][s] * (255 * g);
              n.putImageData(a, 0, 0), l = (0, s.throwIfFalsy)(e.createPattern(o, null)), h.set(c, l);
            }
            e.fillStyle = l, e.fillRect(i, r, n, a);
          }(e, f, n, c, l, d), !0;
          const v = t.boxDrawingDefinitions[i];
          if (v) return function (e, t, i, s, r, o, n) {
            e.strokeStyle = e.fillStyle;
            for (const [c, l] of Object.entries(t)) {
              let t;
              e.beginPath(), e.lineWidth = n * Number.parseInt(c), t = "function" == typeof l ? l(.15, .15 / o * r) : l;
              for (const c of t.split(" ")) {
                const t = c[0],
                  l = a[t];
                if (!l) {
                  console.error(`Could not find drawing instructions for "${t}"`);
                  continue;
                }
                const d = c.substring(1).split(",");
                d[0] && d[1] && l(e, h(d, r, o, i, s, !0, n));
              }
              e.stroke(), e.closePath();
            }
          }(e, v, n, c, l, d, u), !0;
          const C = t.powerlineDefinitions[i];
          return !!C && (function (e, t, i, s, r, o, n, c) {
            var l, d;
            const _ = new Path2D();
            _.rect(i, s, r, o), e.clip(_), e.beginPath();
            const u = n / 12;
            e.lineWidth = c * u;
            for (const n of t.d.split(" ")) {
              const _ = n[0],
                g = a[_];
              if (!g) {
                console.error(`Could not find drawing instructions for "${_}"`);
                continue;
              }
              const f = n.substring(1).split(",");
              f[0] && f[1] && g(e, h(f, r, o, i, s, !1, c, (null !== (l = t.leftPadding) && void 0 !== l ? l : 0) * (u / 2), (null !== (d = t.rightPadding) && void 0 !== d ? d : 0) * (u / 2)));
            }
            1 === t.type ? (e.strokeStyle = e.fillStyle, e.stroke()) : e.fill(), e.closePath();
          }(e, C, n, c, l, d, _, u), !0);
        };
        const o = new Map();
        function n(e, t, i = 0) {
          return Math.max(Math.min(e, t), i);
        }
        const a = {
          C: (e, t) => e.bezierCurveTo(t[0], t[1], t[2], t[3], t[4], t[5]),
          L: (e, t) => e.lineTo(t[0], t[1]),
          M: (e, t) => e.moveTo(t[0], t[1])
        };
        function h(e, t, i, s, r, o, a, h = 0, c = 0) {
          const l = e.map(e => parseFloat(e) || parseInt(e));
          if (l.length < 2) throw new Error("Too few arguments for instruction");
          for (let e = 0; e < l.length; e += 2) l[e] *= t - h * a - c * a, o && 0 !== l[e] && (l[e] = n(Math.round(l[e] + .5) - .5, t, 0)), l[e] += s + h * a;
          for (let e = 1; e < l.length; e += 2) l[e] *= i, o && 0 !== l[e] && (l[e] = n(Math.round(l[e] + .5) - .5, i, 0)), l[e] += r;
          return l;
        }
      },
      56: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.observeDevicePixelDimensions = void 0;
        const s = i(859);
        t.observeDevicePixelDimensions = function (e, t, i) {
          let r = new t.ResizeObserver(t => {
            const s = t.find(t => t.target === e);
            if (!s) return;
            if (!("devicePixelContentBoxSize" in s)) return null == r || r.disconnect(), void (r = void 0);
            const o = s.devicePixelContentBoxSize[0].inlineSize,
              n = s.devicePixelContentBoxSize[0].blockSize;
            o > 0 && n > 0 && i(o, n);
          });
          try {
            r.observe(e, {
              box: ["device-pixel-content-box"]
            });
          } catch (e) {
            r.disconnect(), r = void 0;
          }
          return (0, s.toDisposable)(() => null == r ? void 0 : r.disconnect());
        };
      },
      374: (e, t) => {
        function i(e) {
          return 57508 <= e && e <= 57558;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createRenderDimensions = t.excludeFromContrastRatioDemands = t.isRestrictedPowerlineGlyph = t.isPowerlineGlyph = t.throwIfFalsy = void 0, t.throwIfFalsy = function (e) {
          if (!e) throw new Error("value must not be falsy");
          return e;
        }, t.isPowerlineGlyph = i, t.isRestrictedPowerlineGlyph = function (e) {
          return 57520 <= e && e <= 57527;
        }, t.excludeFromContrastRatioDemands = function (e) {
          return i(e) || function (e) {
            return 9472 <= e && e <= 9631;
          }(e);
        }, t.createRenderDimensions = function () {
          return {
            css: {
              canvas: {
                width: 0,
                height: 0
              },
              cell: {
                width: 0,
                height: 0
              }
            },
            device: {
              canvas: {
                width: 0,
                height: 0
              },
              cell: {
                width: 0,
                height: 0
              },
              char: {
                width: 0,
                height: 0,
                left: 0,
                top: 0
              }
            }
          };
        };
      },
      296: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createSelectionRenderModel = void 0;
        class i {
          constructor() {
            this.clear();
          }
          clear() {
            this.hasSelection = !1, this.columnSelectMode = !1, this.viewportStartRow = 0, this.viewportEndRow = 0, this.viewportCappedStartRow = 0, this.viewportCappedEndRow = 0, this.startCol = 0, this.endCol = 0, this.selectionStart = void 0, this.selectionEnd = void 0;
          }
          update(e, t, i, s = !1) {
            if (this.selectionStart = t, this.selectionEnd = i, !t || !i || t[0] === i[0] && t[1] === i[1]) return void this.clear();
            const r = t[1] - e.buffer.active.viewportY,
              o = i[1] - e.buffer.active.viewportY,
              n = Math.max(r, 0),
              a = Math.min(o, e.rows - 1);
            n >= e.rows || a < 0 ? this.clear() : (this.hasSelection = !0, this.columnSelectMode = s, this.viewportStartRow = r, this.viewportEndRow = o, this.viewportCappedStartRow = n, this.viewportCappedEndRow = a, this.startCol = t[0], this.endCol = i[0]);
          }
          isCellSelected(e, t, i) {
            return !!this.hasSelection && (i -= e.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? t >= this.startCol && i >= this.viewportCappedStartRow && t < this.endCol && i <= this.viewportCappedEndRow : t < this.startCol && i >= this.viewportCappedStartRow && t >= this.endCol && i <= this.viewportCappedEndRow : i > this.viewportStartRow && i < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportEndRow && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol);
          }
        }
        t.createSelectionRenderModel = function () {
          return new i();
        };
      },
      509: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.TextureAtlas = void 0;
        const s = i(237),
          r = i(855),
          o = i(147),
          n = i(160),
          a = i(860),
          h = i(374),
          c = i(485),
          l = i(385),
          d = i(345),
          _ = {
            texturePage: 0,
            texturePosition: {
              x: 0,
              y: 0
            },
            texturePositionClipSpace: {
              x: 0,
              y: 0
            },
            offset: {
              x: 0,
              y: 0
            },
            size: {
              x: 0,
              y: 0
            },
            sizeClipSpace: {
              x: 0,
              y: 0
            }
          };
        let u;
        class g {
          constructor(e, t, i) {
            this._document = e, this._config = t, this._unicodeService = i, this._didWarmUp = !1, this._cacheMap = new c.FourKeyMap(), this._cacheMapCombined = new c.FourKeyMap(), this._pages = [], this._activePages = [], this._workBoundingBox = {
              top: 0,
              left: 0,
              bottom: 0,
              right: 0
            }, this._workAttributeData = new o.AttributeData(), this._textureSize = 512, this._onAddTextureAtlasCanvas = new d.EventEmitter(), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = new d.EventEmitter(), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._requestClearModel = !1, this._createNewPage(), this._tmpCanvas = C(e, 4 * this._config.deviceCellWidth + 4, this._config.deviceCellHeight + 4), this._tmpCtx = (0, h.throwIfFalsy)(this._tmpCanvas.getContext("2d", {
              alpha: this._config.allowTransparency,
              willReadFrequently: !0
            }));
          }
          get pages() {
            return this._pages;
          }
          dispose() {
            for (const e of this.pages) e.canvas.remove();
            this._onAddTextureAtlasCanvas.dispose();
          }
          warmUp() {
            this._didWarmUp || (this._doWarmUp(), this._didWarmUp = !0);
          }
          _doWarmUp() {
            const e = new l.IdleTaskQueue();
            for (let t = 33; t < 126; t++) e.enqueue(() => {
              if (!this._cacheMap.get(t, r.DEFAULT_COLOR, r.DEFAULT_COLOR, r.DEFAULT_EXT)) {
                const e = this._drawToCache(t, r.DEFAULT_COLOR, r.DEFAULT_COLOR, r.DEFAULT_EXT);
                this._cacheMap.set(t, r.DEFAULT_COLOR, r.DEFAULT_COLOR, r.DEFAULT_EXT, e);
              }
            });
          }
          beginFrame() {
            return this._requestClearModel;
          }
          clearTexture() {
            if (0 !== this._pages[0].currentRow.x || 0 !== this._pages[0].currentRow.y) {
              for (const e of this._pages) e.clear();
              this._cacheMap.clear(), this._cacheMapCombined.clear(), this._didWarmUp = !1;
            }
          }
          _createNewPage() {
            g.maxAtlasPages && this._pages.length >= Math.max(4, g.maxAtlasPages / 2) && queueMicrotask(() => {
              const e = this._pages.filter(e => 2 * e.canvas.width <= (g.maxTextureSize || 4096)).sort((e, t) => t.canvas.width !== e.canvas.width ? t.canvas.width - e.canvas.width : t.percentageUsed - e.percentageUsed);
              let t = -1,
                i = 0;
              for (let s = 0; s < e.length; s++) if (e[s].canvas.width !== i) t = s, i = e[s].canvas.width;else if (s - t == 3) break;
              const s = e.slice(t, t + 4),
                r = s.map(e => e.glyphs[0].texturePage).sort((e, t) => e > t ? 1 : -1),
                o = r[0],
                n = this._mergePages(s, o);
              n.version++, this._pages[o] = n;
              for (let e = r.length - 1; e >= 1; e--) this._deletePage(r[e]);
              this._requestClearModel = !0, this._onAddTextureAtlasCanvas.fire(n.canvas);
            });
            const e = new f(this._document, this._textureSize);
            return this._pages.push(e), this._activePages.push(e), this._onAddTextureAtlasCanvas.fire(e.canvas), e;
          }
          _mergePages(e, t) {
            const i = 2 * e[0].canvas.width,
              s = new f(this._document, i, e);
            for (const [r, o] of e.entries()) {
              const e = r * o.canvas.width % i,
                n = Math.floor(r / 2) * o.canvas.height;
              s.ctx.drawImage(o.canvas, e, n);
              for (const s of o.glyphs) s.texturePage = t, s.sizeClipSpace.x = s.size.x / i, s.sizeClipSpace.y = s.size.y / i, s.texturePosition.x += e, s.texturePosition.y += n, s.texturePositionClipSpace.x = s.texturePosition.x / i, s.texturePositionClipSpace.y = s.texturePosition.y / i;
              this._onRemoveTextureAtlasCanvas.fire(o.canvas);
              const a = this._activePages.indexOf(o);
              -1 !== a && this._activePages.splice(a, 1);
            }
            return s;
          }
          _deletePage(e) {
            this._pages.splice(e, 1);
            for (let t = e; t < this._pages.length; t++) {
              const e = this._pages[t];
              for (const t of e.glyphs) t.texturePage--;
              e.version++;
            }
          }
          getRasterizedGlyphCombinedChar(e, t, i, s) {
            return this._getFromCacheMap(this._cacheMapCombined, e, t, i, s);
          }
          getRasterizedGlyph(e, t, i, s) {
            return this._getFromCacheMap(this._cacheMap, e, t, i, s);
          }
          _getFromCacheMap(e, t, i, s, r) {
            return u = e.get(t, i, s, r), u || (u = this._drawToCache(t, i, s, r), e.set(t, i, s, r, u)), u;
          }
          _getColorFromAnsiIndex(e) {
            if (e >= this._config.colors.ansi.length) throw new Error("No color found for idx " + e);
            return this._config.colors.ansi[e];
          }
          _getBackgroundColor(e, t, i, r) {
            if (this._config.allowTransparency) return n.NULL_COLOR;
            let a;
            switch (e) {
              case 16777216:
              case 33554432:
                a = this._getColorFromAnsiIndex(t);
                break;
              case 50331648:
                const e = o.AttributeData.toColorRGB(t);
                a = n.rgba.toColor(e[0], e[1], e[2]);
                break;
              default:
                a = i ? this._config.colors.foreground : this._config.colors.background;
            }
            return r && (a = n.color.blend(this._config.colors.background, n.color.multiplyOpacity(a, s.DIM_OPACITY))), a;
          }
          _getForegroundColor(e, t, i, r, a, h, c, l, d, _) {
            const u = this._getMinimumContrastColor(e, t, i, r, a, h, !1, d, _);
            if (u) return u;
            let g;
            switch (a) {
              case 16777216:
              case 33554432:
                this._config.drawBoldTextInBrightColors && d && h < 8 && (h += 8), g = this._getColorFromAnsiIndex(h);
                break;
              case 50331648:
                const e = o.AttributeData.toColorRGB(h);
                g = n.rgba.toColor(e[0], e[1], e[2]);
                break;
              default:
                g = c ? this._config.colors.background : this._config.colors.foreground;
            }
            return this._config.allowTransparency && (g = n.color.opaque(g)), l && (g = n.color.multiplyOpacity(g, s.DIM_OPACITY)), g;
          }
          _resolveBackgroundRgba(e, t, i) {
            switch (e) {
              case 16777216:
              case 33554432:
                return this._getColorFromAnsiIndex(t).rgba;
              case 50331648:
                return t << 8;
              default:
                return i ? this._config.colors.foreground.rgba : this._config.colors.background.rgba;
            }
          }
          _resolveForegroundRgba(e, t, i, s) {
            switch (e) {
              case 16777216:
              case 33554432:
                return this._config.drawBoldTextInBrightColors && s && t < 8 && (t += 8), this._getColorFromAnsiIndex(t).rgba;
              case 50331648:
                return t << 8;
              default:
                return i ? this._config.colors.background.rgba : this._config.colors.foreground.rgba;
            }
          }
          _getMinimumContrastColor(e, t, i, s, r, o, a, h, c) {
            if (1 === this._config.minimumContrastRatio || c) return;
            const l = this._config.colors.contrastCache.getColor(e, s);
            if (void 0 !== l) return l || void 0;
            const d = this._resolveBackgroundRgba(t, i, a),
              _ = this._resolveForegroundRgba(r, o, a, h),
              u = n.rgba.ensureContrastRatio(d, _, this._config.minimumContrastRatio);
            if (!u) return void this._config.colors.contrastCache.setColor(e, s, null);
            const g = n.rgba.toColor(u >> 24 & 255, u >> 16 & 255, u >> 8 & 255);
            return this._config.colors.contrastCache.setColor(e, s, g), g;
          }
          _drawToCache(e, t, i, r) {
            const n = "number" == typeof e ? String.fromCharCode(e) : e,
              c = this._config.deviceCellWidth * Math.max(n.length, 2) + 4;
            this._tmpCanvas.width < c && (this._tmpCanvas.width = c);
            const l = this._config.deviceCellHeight + 8;
            if (this._tmpCanvas.height < l && (this._tmpCanvas.height = l), this._tmpCtx.save(), this._workAttributeData.fg = i, this._workAttributeData.bg = t, this._workAttributeData.extended.ext = r, this._workAttributeData.isInvisible()) return _;
            const d = !!this._workAttributeData.isBold(),
              u = !!this._workAttributeData.isInverse(),
              g = !!this._workAttributeData.isDim(),
              f = !!this._workAttributeData.isItalic(),
              C = !!this._workAttributeData.isUnderline(),
              p = !!this._workAttributeData.isStrikethrough();
            let x = this._workAttributeData.getFgColor(),
              w = this._workAttributeData.getFgColorMode(),
              m = this._workAttributeData.getBgColor(),
              L = this._workAttributeData.getBgColorMode();
            if (u) {
              const e = x;
              x = m, m = e;
              const t = w;
              w = L, L = t;
            }
            const b = this._getBackgroundColor(L, m, u, g);
            this._tmpCtx.globalCompositeOperation = "copy", this._tmpCtx.fillStyle = b.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.globalCompositeOperation = "source-over";
            const M = d ? this._config.fontWeightBold : this._config.fontWeight,
              y = f ? "italic" : "";
            this._tmpCtx.font = `${y} ${M} ${this._config.fontSize * this._config.devicePixelRatio}px ${this._config.fontFamily}`, this._tmpCtx.textBaseline = s.TEXT_BASELINE;
            const S = 1 === n.length && (0, h.isPowerlineGlyph)(n.charCodeAt(0)),
              R = 1 === n.length && (0, h.isRestrictedPowerlineGlyph)(n.charCodeAt(0)),
              A = this._getForegroundColor(t, L, m, i, w, x, u, g, d, (0, h.excludeFromContrastRatioDemands)(n.charCodeAt(0)));
            this._tmpCtx.fillStyle = A.css;
            const D = R ? 0 : 4;
            let T = !1;
            !1 !== this._config.customGlyphs && (T = (0, a.tryDrawCustomChar)(this._tmpCtx, n, D, D, this._config.deviceCellWidth, this._config.deviceCellHeight, this._config.fontSize, this._config.devicePixelRatio));
            let k,
              $ = !S;
            if (k = "number" == typeof e ? this._unicodeService.wcwidth(e) : this._unicodeService.getStringCellWidth(e), C) {
              this._tmpCtx.save();
              const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 15)),
                t = e % 2 == 1 ? .5 : 0;
              if (this._tmpCtx.lineWidth = e, this._workAttributeData.isUnderlineColorDefault()) this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle;else if (this._workAttributeData.isUnderlineColorRGB()) $ = !1, this._tmpCtx.strokeStyle = `rgb(${o.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else {
                $ = !1;
                let e = this._workAttributeData.getUnderlineColor();
                this._config.drawBoldTextInBrightColors && this._workAttributeData.isBold() && e < 8 && (e += 8), this._tmpCtx.strokeStyle = this._getColorFromAnsiIndex(e).css;
              }
              this._tmpCtx.beginPath();
              const i = D,
                s = Math.ceil(D + this._config.deviceCharHeight) - t,
                r = D + this._config.deviceCharHeight + e - t,
                a = Math.ceil(D + this._config.deviceCharHeight + 2 * e) - t;
              for (let o = 0; o < k; o++) {
                this._tmpCtx.save();
                const n = i + o * this._config.deviceCellWidth,
                  h = i + (o + 1) * this._config.deviceCellWidth,
                  c = n + this._config.deviceCellWidth / 2;
                switch (this._workAttributeData.extended.underlineStyle) {
                  case 2:
                    this._tmpCtx.moveTo(n, s), this._tmpCtx.lineTo(h, s), this._tmpCtx.moveTo(n, a), this._tmpCtx.lineTo(h, a);
                    break;
                  case 3:
                    const i = e <= 1 ? a : Math.ceil(D + this._config.deviceCharHeight - e / 2) - t,
                      o = e <= 1 ? s : Math.ceil(D + this._config.deviceCharHeight + e / 2) - t,
                      l = new Path2D();
                    l.rect(n, s, this._config.deviceCellWidth, a - s), this._tmpCtx.clip(l), this._tmpCtx.moveTo(n - this._config.deviceCellWidth / 2, r), this._tmpCtx.bezierCurveTo(n - this._config.deviceCellWidth / 2, o, n, o, n, r), this._tmpCtx.bezierCurveTo(n, i, c, i, c, r), this._tmpCtx.bezierCurveTo(c, o, h, o, h, r), this._tmpCtx.bezierCurveTo(h, i, h + this._config.deviceCellWidth / 2, i, h + this._config.deviceCellWidth / 2, r);
                    break;
                  case 4:
                    this._tmpCtx.setLineDash([Math.round(e), Math.round(e)]), this._tmpCtx.moveTo(n, s), this._tmpCtx.lineTo(h, s);
                    break;
                  case 5:
                    this._tmpCtx.setLineDash([4 * this._config.devicePixelRatio, 3 * this._config.devicePixelRatio]), this._tmpCtx.moveTo(n, s), this._tmpCtx.lineTo(h, s);
                    break;
                  default:
                    this._tmpCtx.moveTo(n, s), this._tmpCtx.lineTo(h, s);
                }
                this._tmpCtx.stroke(), this._tmpCtx.restore();
              }
              if (this._tmpCtx.restore(), !T && this._config.fontSize >= 12 && !this._config.allowTransparency && " " !== n) {
                this._tmpCtx.save(), this._tmpCtx.textBaseline = "alphabetic";
                const t = this._tmpCtx.measureText(n);
                if (this._tmpCtx.restore(), "actualBoundingBoxDescent" in t && t.actualBoundingBoxDescent > 0) {
                  this._tmpCtx.save();
                  const t = new Path2D();
                  t.rect(i, s - Math.ceil(e / 2), this._config.deviceCellWidth * k, a - s + Math.ceil(e / 2)), this._tmpCtx.clip(t), this._tmpCtx.lineWidth = 3 * this._config.devicePixelRatio, this._tmpCtx.strokeStyle = b.css, this._tmpCtx.strokeText(n, D, D + this._config.deviceCharHeight), this._tmpCtx.restore();
                }
              }
            }
            if (T || this._tmpCtx.fillText(n, D, D + this._config.deviceCharHeight), "_" === n && !this._config.allowTransparency) {
              let e = v(this._tmpCtx.getImageData(D, D, this._config.deviceCellWidth, this._config.deviceCellHeight), b, A, $);
              if (e) for (let t = 1; t <= 5 && (this._tmpCtx.save(), this._tmpCtx.fillStyle = b.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.restore(), this._tmpCtx.fillText(n, D, D + this._config.deviceCharHeight - t), e = v(this._tmpCtx.getImageData(D, D, this._config.deviceCellWidth, this._config.deviceCellHeight), b, A, $), e); t++);
            }
            if (p) {
              const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 10)),
                t = this._tmpCtx.lineWidth % 2 == 1 ? .5 : 0;
              this._tmpCtx.lineWidth = e, this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle, this._tmpCtx.beginPath(), this._tmpCtx.moveTo(D, D + Math.floor(this._config.deviceCharHeight / 2) - t), this._tmpCtx.lineTo(D + this._config.deviceCharWidth * k, D + Math.floor(this._config.deviceCharHeight / 2) - t), this._tmpCtx.stroke();
            }
            this._tmpCtx.restore();
            const B = this._tmpCtx.getImageData(0, 0, this._tmpCanvas.width, this._tmpCanvas.height);
            let E;
            if (E = this._config.allowTransparency ? function (e) {
              for (let t = 0; t < e.data.length; t += 4) if (e.data[t + 3] > 0) return !1;
              return !0;
            }(B) : v(B, b, A, $), E) return _;
            const P = this._findGlyphBoundingBox(B, this._workBoundingBox, c, R, T, D);
            let I, O;
            for (;;) {
              if (0 === this._activePages.length) {
                const e = this._createNewPage();
                I = e, O = e.currentRow, O.height = P.size.y;
                break;
              }
              I = this._activePages[this._activePages.length - 1], O = I.currentRow;
              for (const e of this._activePages) P.size.y <= e.currentRow.height && (I = e, O = e.currentRow);
              for (let e = this._activePages.length - 1; e >= 0; e--) for (const t of this._activePages[e].fixedRows) t.height <= O.height && P.size.y <= t.height && (I = this._activePages[e], O = t);
              if (O.y + P.size.y >= I.canvas.height || O.height > P.size.y + 2) {
                let e = !1;
                if (I.currentRow.y + I.currentRow.height + P.size.y >= I.canvas.height) {
                  let t;
                  for (const e of this._activePages) if (e.currentRow.y + e.currentRow.height + P.size.y < e.canvas.height) {
                    t = e;
                    break;
                  }
                  if (t) I = t;else {
                    const t = this._createNewPage();
                    I = t, O = t.currentRow, O.height = P.size.y, e = !0;
                  }
                }
                e || (I.currentRow.height > 0 && I.fixedRows.push(I.currentRow), O = {
                  x: 0,
                  y: I.currentRow.y + I.currentRow.height,
                  height: P.size.y
                }, I.fixedRows.push(O), I.currentRow = {
                  x: 0,
                  y: O.y + O.height,
                  height: 0
                });
              }
              if (O.x + P.size.x <= I.canvas.width) break;
              O === I.currentRow ? (O.x = 0, O.y += O.height, O.height = 0) : I.fixedRows.splice(I.fixedRows.indexOf(O), 1);
            }
            return P.texturePage = this._pages.indexOf(I), P.texturePosition.x = O.x, P.texturePosition.y = O.y, P.texturePositionClipSpace.x = O.x / I.canvas.width, P.texturePositionClipSpace.y = O.y / I.canvas.height, P.sizeClipSpace.x /= I.canvas.width, P.sizeClipSpace.y /= I.canvas.height, O.height = Math.max(O.height, P.size.y), O.x += P.size.x, I.ctx.putImageData(B, P.texturePosition.x - this._workBoundingBox.left, P.texturePosition.y - this._workBoundingBox.top, this._workBoundingBox.left, this._workBoundingBox.top, P.size.x, P.size.y), I.addGlyph(P), I.version++, P;
          }
          _findGlyphBoundingBox(e, t, i, s, r, o) {
            t.top = 0;
            const n = s ? this._config.deviceCellHeight : this._tmpCanvas.height,
              a = s ? this._config.deviceCellWidth : i;
            let h = !1;
            for (let i = 0; i < n; i++) {
              for (let s = 0; s < a; s++) {
                const r = i * this._tmpCanvas.width * 4 + 4 * s + 3;
                if (0 !== e.data[r]) {
                  t.top = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.left = 0, h = !1;
            for (let i = 0; i < o + a; i++) {
              for (let s = 0; s < n; s++) {
                const r = s * this._tmpCanvas.width * 4 + 4 * i + 3;
                if (0 !== e.data[r]) {
                  t.left = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.right = a, h = !1;
            for (let i = o + a - 1; i >= o; i--) {
              for (let s = 0; s < n; s++) {
                const r = s * this._tmpCanvas.width * 4 + 4 * i + 3;
                if (0 !== e.data[r]) {
                  t.right = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            t.bottom = n, h = !1;
            for (let i = n - 1; i >= 0; i--) {
              for (let s = 0; s < a; s++) {
                const r = i * this._tmpCanvas.width * 4 + 4 * s + 3;
                if (0 !== e.data[r]) {
                  t.bottom = i, h = !0;
                  break;
                }
              }
              if (h) break;
            }
            return {
              texturePage: 0,
              texturePosition: {
                x: 0,
                y: 0
              },
              texturePositionClipSpace: {
                x: 0,
                y: 0
              },
              size: {
                x: t.right - t.left + 1,
                y: t.bottom - t.top + 1
              },
              sizeClipSpace: {
                x: t.right - t.left + 1,
                y: t.bottom - t.top + 1
              },
              offset: {
                x: -t.left + o + (s || r ? Math.floor((this._config.deviceCellWidth - this._config.deviceCharWidth) / 2) : 0),
                y: -t.top + o + (s || r ? 1 === this._config.lineHeight ? 0 : Math.round((this._config.deviceCellHeight - this._config.deviceCharHeight) / 2) : 0)
              }
            };
          }
        }
        t.TextureAtlas = g;
        class f {
          constructor(e, t, i) {
            if (this._usedPixels = 0, this._glyphs = [], this.version = 0, this.currentRow = {
              x: 0,
              y: 0,
              height: 0
            }, this.fixedRows = [], i) for (const e of i) this._glyphs.push(...e.glyphs), this._usedPixels += e._usedPixels;
            this.canvas = C(e, t, t), this.ctx = (0, h.throwIfFalsy)(this.canvas.getContext("2d", {
              alpha: !0
            }));
          }
          get percentageUsed() {
            return this._usedPixels / (this.canvas.width * this.canvas.height);
          }
          get glyphs() {
            return this._glyphs;
          }
          addGlyph(e) {
            this._glyphs.push(e), this._usedPixels += e.size.x * e.size.y;
          }
          clear() {
            this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), this.currentRow.x = 0, this.currentRow.y = 0, this.currentRow.height = 0, this.fixedRows.length = 0, this.version++;
          }
        }
        function v(e, t, i, s) {
          const r = t.rgba >>> 24,
            o = t.rgba >>> 16 & 255,
            n = t.rgba >>> 8 & 255,
            a = i.rgba >>> 24,
            h = i.rgba >>> 16 & 255,
            c = i.rgba >>> 8 & 255,
            l = Math.floor((Math.abs(r - a) + Math.abs(o - h) + Math.abs(n - c)) / 12);
          let d = !0;
          for (let t = 0; t < e.data.length; t += 4) e.data[t] === r && e.data[t + 1] === o && e.data[t + 2] === n || s && Math.abs(e.data[t] - r) + Math.abs(e.data[t + 1] - o) + Math.abs(e.data[t + 2] - n) < l ? e.data[t + 3] = 0 : d = !1;
          return d;
        }
        function C(e, t, i) {
          const s = e.createElement("canvas");
          return s.width = t, s.height = i, s;
        }
      },
      577: function (e, t, i) {
        var s = this && this.__decorate || function (e, t, i, s) {
            var r,
              o = arguments.length,
              n = o < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
            return o > 3 && n && Object.defineProperty(t, i, n), n;
          },
          r = this && this.__param || function (e, t) {
            return function (i, s) {
              t(i, s, e);
            };
          };
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CharacterJoinerService = t.JoinedCellData = void 0;
        const o = i(147),
          n = i(855),
          a = i(782),
          h = i(97);
        class c extends o.AttributeData {
          constructor(e, t, i) {
            super(), this.content = 0, this.combinedData = "", this.fg = e.fg, this.bg = e.bg, this.combinedData = t, this._width = i;
          }
          isCombined() {
            return 2097152;
          }
          getWidth() {
            return this._width;
          }
          getChars() {
            return this.combinedData;
          }
          getCode() {
            return 2097151;
          }
          setFromCharData(e) {
            throw new Error("not implemented");
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        t.JoinedCellData = c;
        let l = class e {
          constructor(e) {
            this._bufferService = e, this._characterJoiners = [], this._nextCharacterJoinerId = 0, this._workCell = new a.CellData();
          }
          register(e) {
            const t = {
              id: this._nextCharacterJoinerId++,
              handler: e
            };
            return this._characterJoiners.push(t), t.id;
          }
          deregister(e) {
            for (let t = 0; t < this._characterJoiners.length; t++) if (this._characterJoiners[t].id === e) return this._characterJoiners.splice(t, 1), !0;
            return !1;
          }
          getJoinedCharacters(e) {
            if (0 === this._characterJoiners.length) return [];
            const t = this._bufferService.buffer.lines.get(e);
            if (!t || 0 === t.length) return [];
            const i = [],
              s = t.translateToString(!0);
            let r = 0,
              o = 0,
              a = 0,
              h = t.getFg(0),
              c = t.getBg(0);
            for (let e = 0; e < t.getTrimmedLength(); e++) if (t.loadCell(e, this._workCell), 0 !== this._workCell.getWidth()) {
              if (this._workCell.fg !== h || this._workCell.bg !== c) {
                if (e - r > 1) {
                  const e = this._getJoinedRanges(s, a, o, t, r);
                  for (let t = 0; t < e.length; t++) i.push(e[t]);
                }
                r = e, a = o, h = this._workCell.fg, c = this._workCell.bg;
              }
              o += this._workCell.getChars().length || n.WHITESPACE_CELL_CHAR.length;
            }
            if (this._bufferService.cols - r > 1) {
              const e = this._getJoinedRanges(s, a, o, t, r);
              for (let t = 0; t < e.length; t++) i.push(e[t]);
            }
            return i;
          }
          _getJoinedRanges(t, i, s, r, o) {
            const n = t.substring(i, s);
            let a = [];
            try {
              a = this._characterJoiners[0].handler(n);
            } catch (e) {
              console.error(e);
            }
            for (let t = 1; t < this._characterJoiners.length; t++) try {
              const i = this._characterJoiners[t].handler(n);
              for (let t = 0; t < i.length; t++) e._mergeRanges(a, i[t]);
            } catch (e) {
              console.error(e);
            }
            return this._stringRangesToCellRanges(a, r, o), a;
          }
          _stringRangesToCellRanges(e, t, i) {
            let s = 0,
              r = !1,
              o = 0,
              a = e[s];
            if (a) {
              for (let h = i; h < this._bufferService.cols; h++) {
                const i = t.getWidth(h),
                  c = t.getString(h).length || n.WHITESPACE_CELL_CHAR.length;
                if (0 !== i) {
                  if (!r && a[0] <= o && (a[0] = h, r = !0), a[1] <= o) {
                    if (a[1] = h, a = e[++s], !a) break;
                    a[0] <= o ? (a[0] = h, r = !0) : r = !1;
                  }
                  o += c;
                }
              }
              a && (a[1] = this._bufferService.cols);
            }
          }
          static _mergeRanges(e, t) {
            let i = !1;
            for (let s = 0; s < e.length; s++) {
              const r = e[s];
              if (i) {
                if (t[1] <= r[0]) return e[s - 1][1] = t[1], e;
                if (t[1] <= r[1]) return e[s - 1][1] = Math.max(t[1], r[1]), e.splice(s, 1), e;
                e.splice(s, 1), s--;
              } else {
                if (t[1] <= r[0]) return e.splice(s, 0, t), e;
                if (t[1] <= r[1]) return r[0] = Math.min(t[0], r[0]), e;
                t[0] < r[1] && (r[0] = Math.min(t[0], r[0]), i = !0);
              }
            }
            return i ? e[e.length - 1][1] = t[1] : e.push(t), e;
          }
        };
        l = s([r(0, h.IBufferService)], l), t.CharacterJoinerService = l;
      },
      160: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.contrastRatio = t.toPaddedHex = t.rgba = t.rgb = t.css = t.color = t.channels = t.NULL_COLOR = void 0;
        const s = i(399);
        let r = 0,
          o = 0,
          n = 0,
          a = 0;
        var h, c, l;
        function d(e) {
          const t = e.toString(16);
          return t.length < 2 ? "0" + t : t;
        }
        function _(e, t) {
          return e < t ? (t + .05) / (e + .05) : (e + .05) / (t + .05);
        }
        t.NULL_COLOR = {
          css: "#00000000",
          rgba: 0
        }, function (e) {
          e.toCss = function (e, t, i, s) {
            return void 0 !== s ? `#${d(e)}${d(t)}${d(i)}${d(s)}` : `#${d(e)}${d(t)}${d(i)}`;
          }, e.toRgba = function (e, t, i, s = 255) {
            return (e << 24 | t << 16 | i << 8 | s) >>> 0;
          };
        }(h = t.channels || (t.channels = {})), function (e) {
          function t(e, t) {
            return a = Math.round(255 * t), [r, o, n] = l.toChannels(e.rgba), {
              css: h.toCss(r, o, n, a),
              rgba: h.toRgba(r, o, n, a)
            };
          }
          e.blend = function (e, t) {
            if (a = (255 & t.rgba) / 255, 1 === a) return {
              css: t.css,
              rgba: t.rgba
            };
            const i = t.rgba >> 24 & 255,
              s = t.rgba >> 16 & 255,
              c = t.rgba >> 8 & 255,
              l = e.rgba >> 24 & 255,
              d = e.rgba >> 16 & 255,
              _ = e.rgba >> 8 & 255;
            return r = l + Math.round((i - l) * a), o = d + Math.round((s - d) * a), n = _ + Math.round((c - _) * a), {
              css: h.toCss(r, o, n),
              rgba: h.toRgba(r, o, n)
            };
          }, e.isOpaque = function (e) {
            return 255 == (255 & e.rgba);
          }, e.ensureContrastRatio = function (e, t, i) {
            const s = l.ensureContrastRatio(e.rgba, t.rgba, i);
            if (s) return l.toColor(s >> 24 & 255, s >> 16 & 255, s >> 8 & 255);
          }, e.opaque = function (e) {
            const t = (255 | e.rgba) >>> 0;
            return [r, o, n] = l.toChannels(t), {
              css: h.toCss(r, o, n),
              rgba: t
            };
          }, e.opacity = t, e.multiplyOpacity = function (e, i) {
            return a = 255 & e.rgba, t(e, a * i / 255);
          }, e.toColorRGB = function (e) {
            return [e.rgba >> 24 & 255, e.rgba >> 16 & 255, e.rgba >> 8 & 255];
          };
        }(t.color || (t.color = {})), function (e) {
          let t, i;
          if (!s.isNode) {
            const e = document.createElement("canvas");
            e.width = 1, e.height = 1;
            const s = e.getContext("2d", {
              willReadFrequently: !0
            });
            s && (t = s, t.globalCompositeOperation = "copy", i = t.createLinearGradient(0, 0, 1, 1));
          }
          e.toColor = function (e) {
            if (e.match(/#[\da-f]{3,8}/i)) switch (e.length) {
              case 4:
                return r = parseInt(e.slice(1, 2).repeat(2), 16), o = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), l.toColor(r, o, n);
              case 5:
                return r = parseInt(e.slice(1, 2).repeat(2), 16), o = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), a = parseInt(e.slice(4, 5).repeat(2), 16), l.toColor(r, o, n, a);
              case 7:
                return {
                  css: e,
                  rgba: (parseInt(e.slice(1), 16) << 8 | 255) >>> 0
                };
              case 9:
                return {
                  css: e,
                  rgba: parseInt(e.slice(1), 16) >>> 0
                };
            }
            const s = e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
            if (s) return r = parseInt(s[1]), o = parseInt(s[2]), n = parseInt(s[3]), a = Math.round(255 * (void 0 === s[5] ? 1 : parseFloat(s[5]))), l.toColor(r, o, n, a);
            if (!t || !i) throw new Error("css.toColor: Unsupported css format");
            if (t.fillStyle = i, t.fillStyle = e, "string" != typeof t.fillStyle) throw new Error("css.toColor: Unsupported css format");
            if (t.fillRect(0, 0, 1, 1), [r, o, n, a] = t.getImageData(0, 0, 1, 1).data, 255 !== a) throw new Error("css.toColor: Unsupported css format");
            return {
              rgba: h.toRgba(r, o, n, a),
              css: e
            };
          };
        }(t.css || (t.css = {})), function (e) {
          function t(e, t, i) {
            const s = e / 255,
              r = t / 255,
              o = i / 255;
            return .2126 * (s <= .03928 ? s / 12.92 : Math.pow((s + .055) / 1.055, 2.4)) + .7152 * (r <= .03928 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4)) + .0722 * (o <= .03928 ? o / 12.92 : Math.pow((o + .055) / 1.055, 2.4));
          }
          e.relativeLuminance = function (e) {
            return t(e >> 16 & 255, e >> 8 & 255, 255 & e);
          }, e.relativeLuminance2 = t;
        }(c = t.rgb || (t.rgb = {})), function (e) {
          function t(e, t, i) {
            const s = e >> 24 & 255,
              r = e >> 16 & 255,
              o = e >> 8 & 255;
            let n = t >> 24 & 255,
              a = t >> 16 & 255,
              h = t >> 8 & 255,
              l = _(c.relativeLuminance2(n, a, h), c.relativeLuminance2(s, r, o));
            for (; l < i && (n > 0 || a > 0 || h > 0);) n -= Math.max(0, Math.ceil(.1 * n)), a -= Math.max(0, Math.ceil(.1 * a)), h -= Math.max(0, Math.ceil(.1 * h)), l = _(c.relativeLuminance2(n, a, h), c.relativeLuminance2(s, r, o));
            return (n << 24 | a << 16 | h << 8 | 255) >>> 0;
          }
          function i(e, t, i) {
            const s = e >> 24 & 255,
              r = e >> 16 & 255,
              o = e >> 8 & 255;
            let n = t >> 24 & 255,
              a = t >> 16 & 255,
              h = t >> 8 & 255,
              l = _(c.relativeLuminance2(n, a, h), c.relativeLuminance2(s, r, o));
            for (; l < i && (n < 255 || a < 255 || h < 255);) n = Math.min(255, n + Math.ceil(.1 * (255 - n))), a = Math.min(255, a + Math.ceil(.1 * (255 - a))), h = Math.min(255, h + Math.ceil(.1 * (255 - h))), l = _(c.relativeLuminance2(n, a, h), c.relativeLuminance2(s, r, o));
            return (n << 24 | a << 16 | h << 8 | 255) >>> 0;
          }
          e.ensureContrastRatio = function (e, s, r) {
            const o = c.relativeLuminance(e >> 8),
              n = c.relativeLuminance(s >> 8);
            if (_(o, n) < r) {
              if (n < o) {
                const n = t(e, s, r),
                  a = _(o, c.relativeLuminance(n >> 8));
                if (a < r) {
                  const t = i(e, s, r);
                  return a > _(o, c.relativeLuminance(t >> 8)) ? n : t;
                }
                return n;
              }
              const a = i(e, s, r),
                h = _(o, c.relativeLuminance(a >> 8));
              if (h < r) {
                const i = t(e, s, r);
                return h > _(o, c.relativeLuminance(i >> 8)) ? a : i;
              }
              return a;
            }
          }, e.reduceLuminance = t, e.increaseLuminance = i, e.toChannels = function (e) {
            return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          }, e.toColor = function (e, t, i, s) {
            return {
              css: h.toCss(e, t, i, s),
              rgba: h.toRgba(e, t, i, s)
            };
          };
        }(l = t.rgba || (t.rgba = {})), t.toPaddedHex = d, t.contrastRatio = _;
      },
      345: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
          constructor() {
            this._listeners = [], this._disposed = !1;
          }
          get event() {
            return this._event || (this._event = e => (this._listeners.push(e), {
              dispose: () => {
                if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
              }
            })), this._event;
          }
          fire(e, t) {
            const i = [];
            for (let e = 0; e < this._listeners.length; e++) i.push(this._listeners[e]);
            for (let s = 0; s < i.length; s++) i[s].call(void 0, e, t);
          }
          dispose() {
            this._listeners && (this._listeners.length = 0), this._disposed = !0;
          }
        }, t.forwardEvent = function (e, t) {
          return e(e => t.fire(e));
        };
      },
      859: (e, t) => {
        function i(e) {
          for (const t of e) t.dispose();
          e.length = 0;
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.Disposable = void 0, t.Disposable = class {
          constructor() {
            this._disposables = [], this._isDisposed = !1;
          }
          dispose() {
            this._isDisposed = !0;
            for (const e of this._disposables) e.dispose();
            this._disposables.length = 0;
          }
          register(e) {
            return this._disposables.push(e), e;
          }
          unregister(e) {
            const t = this._disposables.indexOf(e);
            -1 !== t && this._disposables.splice(t, 1);
          }
        }, t.toDisposable = function (e) {
          return {
            dispose: e
          };
        }, t.disposeArray = i, t.getDisposeArrayDisposable = function (e) {
          return {
            dispose: () => i(e)
          };
        };
      },
      485: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.FourKeyMap = t.TwoKeyMap = void 0;
        class i {
          constructor() {
            this._data = {};
          }
          set(e, t, i) {
            this._data[e] || (this._data[e] = {}), this._data[e][t] = i;
          }
          get(e, t) {
            return this._data[e] ? this._data[e][t] : void 0;
          }
          clear() {
            this._data = {};
          }
        }
        t.TwoKeyMap = i, t.FourKeyMap = class {
          constructor() {
            this._data = new i();
          }
          set(e, t, s, r, o) {
            this._data.get(e, t) || this._data.set(e, t, new i()), this._data.get(e, t).set(s, r, o);
          }
          get(e, t, i, s) {
            var r;
            return null === (r = this._data.get(e, t)) || void 0 === r ? void 0 : r.get(i, s);
          }
          clear() {
            this._data.clear();
          }
        };
      },
      399: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.isChromeOS = t.isLinux = t.isWindows = t.isIphone = t.isIpad = t.isMac = t.getSafariVersion = t.isSafari = t.isLegacyEdge = t.isFirefox = t.isNode = void 0, t.isNode = "undefined" == typeof navigator;
        const i = t.isNode ? "node" : navigator.userAgent,
          s = t.isNode ? "node" : navigator.platform;
        t.isFirefox = i.includes("Firefox"), t.isLegacyEdge = i.includes("Edge"), t.isSafari = /^((?!chrome|android).)*safari/i.test(i), t.getSafariVersion = function () {
          if (!t.isSafari) return 0;
          const e = i.match(/Version\/(\d+)/);
          return null === e || e.length < 2 ? 0 : parseInt(e[1]);
        }, t.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(s), t.isIpad = "iPad" === s, t.isIphone = "iPhone" === s, t.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(s), t.isLinux = s.indexOf("Linux") >= 0, t.isChromeOS = /\bCrOS\b/.test(i);
      },
      385: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.DebouncedIdleTask = t.IdleTaskQueue = t.PriorityTaskQueue = void 0;
        const s = i(399);
        class r {
          constructor() {
            this._tasks = [], this._i = 0;
          }
          enqueue(e) {
            this._tasks.push(e), this._start();
          }
          flush() {
            for (; this._i < this._tasks.length;) this._tasks[this._i]() || this._i++;
            this.clear();
          }
          clear() {
            this._idleCallback && (this._cancelCallback(this._idleCallback), this._idleCallback = void 0), this._i = 0, this._tasks.length = 0;
          }
          _start() {
            this._idleCallback || (this._idleCallback = this._requestCallback(this._process.bind(this)));
          }
          _process(e) {
            this._idleCallback = void 0;
            let t = 0,
              i = 0,
              s = e.timeRemaining(),
              r = 0;
            for (; this._i < this._tasks.length;) {
              if (t = Date.now(), this._tasks[this._i]() || this._i++, t = Math.max(1, Date.now() - t), i = Math.max(t, i), r = e.timeRemaining(), 1.5 * i > r) return s - t < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s - t))}ms`), void this._start();
              s = r;
            }
            this.clear();
          }
        }
        class o extends r {
          _requestCallback(e) {
            return setTimeout(() => e(this._createDeadline(16)));
          }
          _cancelCallback(e) {
            clearTimeout(e);
          }
          _createDeadline(e) {
            const t = Date.now() + e;
            return {
              timeRemaining: () => Math.max(0, t - Date.now())
            };
          }
        }
        t.PriorityTaskQueue = o, t.IdleTaskQueue = !s.isNode && "requestIdleCallback" in window ? class extends r {
          _requestCallback(e) {
            return requestIdleCallback(e);
          }
          _cancelCallback(e) {
            cancelIdleCallback(e);
          }
        } : o, t.DebouncedIdleTask = class {
          constructor() {
            this._queue = new t.IdleTaskQueue();
          }
          set(e) {
            this._queue.clear(), this._queue.enqueue(e);
          }
          flush() {
            this._queue.flush();
          }
        };
      },
      147: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.ExtendedAttrs = t.AttributeData = void 0;
        class i {
          constructor() {
            this.fg = 0, this.bg = 0, this.extended = new s();
          }
          static toColorRGB(e) {
            return [e >>> 16 & 255, e >>> 8 & 255, 255 & e];
          }
          static fromColorRGB(e) {
            return (255 & e[0]) << 16 | (255 & e[1]) << 8 | 255 & e[2];
          }
          clone() {
            const e = new i();
            return e.fg = this.fg, e.bg = this.bg, e.extended = this.extended.clone(), e;
          }
          isInverse() {
            return 67108864 & this.fg;
          }
          isBold() {
            return 134217728 & this.fg;
          }
          isUnderline() {
            return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 1 : 268435456 & this.fg;
          }
          isBlink() {
            return 536870912 & this.fg;
          }
          isInvisible() {
            return 1073741824 & this.fg;
          }
          isItalic() {
            return 67108864 & this.bg;
          }
          isDim() {
            return 134217728 & this.bg;
          }
          isStrikethrough() {
            return 2147483648 & this.fg;
          }
          isProtected() {
            return 536870912 & this.bg;
          }
          getFgColorMode() {
            return 50331648 & this.fg;
          }
          getBgColorMode() {
            return 50331648 & this.bg;
          }
          isFgRGB() {
            return 50331648 == (50331648 & this.fg);
          }
          isBgRGB() {
            return 50331648 == (50331648 & this.bg);
          }
          isFgPalette() {
            return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
          }
          isBgPalette() {
            return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
          }
          isFgDefault() {
            return 0 == (50331648 & this.fg);
          }
          isBgDefault() {
            return 0 == (50331648 & this.bg);
          }
          isAttributeDefault() {
            return 0 === this.fg && 0 === this.bg;
          }
          getFgColor() {
            switch (50331648 & this.fg) {
              case 16777216:
              case 33554432:
                return 255 & this.fg;
              case 50331648:
                return 16777215 & this.fg;
              default:
                return -1;
            }
          }
          getBgColor() {
            switch (50331648 & this.bg) {
              case 16777216:
              case 33554432:
                return 255 & this.bg;
              case 50331648:
                return 16777215 & this.bg;
              default:
                return -1;
            }
          }
          hasExtendedAttrs() {
            return 268435456 & this.bg;
          }
          updateExtended() {
            this.extended.isEmpty() ? this.bg &= -268435457 : this.bg |= 268435456;
          }
          getUnderlineColor() {
            if (268435456 & this.bg && ~this.extended.underlineColor) switch (50331648 & this.extended.underlineColor) {
              case 16777216:
              case 33554432:
                return 255 & this.extended.underlineColor;
              case 50331648:
                return 16777215 & this.extended.underlineColor;
              default:
                return this.getFgColor();
            }
            return this.getFgColor();
          }
          getUnderlineColorMode() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 & this.extended.underlineColor : this.getFgColorMode();
          }
          isUnderlineColorRGB() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
          }
          isUnderlineColorPalette() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
          }
          isUnderlineColorDefault() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
          }
          getUnderlineStyle() {
            return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
          }
        }
        t.AttributeData = i;
        class s {
          constructor(e = 0, t = 0) {
            this._ext = 0, this._urlId = 0, this._ext = e, this._urlId = t;
          }
          get ext() {
            return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
          }
          set ext(e) {
            this._ext = e;
          }
          get underlineStyle() {
            return this._urlId ? 5 : (469762048 & this._ext) >> 26;
          }
          set underlineStyle(e) {
            this._ext &= -469762049, this._ext |= e << 26 & 469762048;
          }
          get underlineColor() {
            return 67108863 & this._ext;
          }
          set underlineColor(e) {
            this._ext &= -67108864, this._ext |= 67108863 & e;
          }
          get urlId() {
            return this._urlId;
          }
          set urlId(e) {
            this._urlId = e;
          }
          clone() {
            return new s(this._ext, this._urlId);
          }
          isEmpty() {
            return 0 === this.underlineStyle && 0 === this._urlId;
          }
        }
        t.ExtendedAttrs = s;
      },
      782: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.CellData = void 0;
        const s = i(133),
          r = i(855),
          o = i(147);
        class n extends o.AttributeData {
          constructor() {
            super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new o.ExtendedAttrs(), this.combinedData = "";
          }
          static fromCharData(e) {
            const t = new n();
            return t.setFromCharData(e), t;
          }
          isCombined() {
            return 2097152 & this.content;
          }
          getWidth() {
            return this.content >> 22;
          }
          getChars() {
            return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s.stringFromCodePoint)(2097151 & this.content) : "";
          }
          getCode() {
            return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
          }
          setFromCharData(e) {
            this.fg = e[r.CHAR_DATA_ATTR_INDEX], this.bg = 0;
            let t = !1;
            if (e[r.CHAR_DATA_CHAR_INDEX].length > 2) t = !0;else if (2 === e[r.CHAR_DATA_CHAR_INDEX].length) {
              const i = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
              if (55296 <= i && i <= 56319) {
                const s = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
                56320 <= s && s <= 57343 ? this.content = 1024 * (i - 55296) + s - 56320 + 65536 | e[r.CHAR_DATA_WIDTH_INDEX] << 22 : t = !0;
              } else t = !0;
            } else this.content = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e[r.CHAR_DATA_WIDTH_INDEX] << 22;
            t && (this.combinedData = e[r.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e[r.CHAR_DATA_WIDTH_INDEX] << 22);
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        t.CellData = n;
      },
      855: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.WHITESPACE_CELL_CODE = t.WHITESPACE_CELL_WIDTH = t.WHITESPACE_CELL_CHAR = t.NULL_CELL_CODE = t.NULL_CELL_WIDTH = t.NULL_CELL_CHAR = t.CHAR_DATA_CODE_INDEX = t.CHAR_DATA_WIDTH_INDEX = t.CHAR_DATA_CHAR_INDEX = t.CHAR_DATA_ATTR_INDEX = t.DEFAULT_EXT = t.DEFAULT_ATTR = t.DEFAULT_COLOR = void 0, t.DEFAULT_COLOR = 0, t.DEFAULT_ATTR = 256 | t.DEFAULT_COLOR << 9, t.DEFAULT_EXT = 0, t.CHAR_DATA_ATTR_INDEX = 0, t.CHAR_DATA_CHAR_INDEX = 1, t.CHAR_DATA_WIDTH_INDEX = 2, t.CHAR_DATA_CODE_INDEX = 3, t.NULL_CELL_CHAR = "", t.NULL_CELL_WIDTH = 1, t.NULL_CELL_CODE = 0, t.WHITESPACE_CELL_CHAR = " ", t.WHITESPACE_CELL_WIDTH = 1, t.WHITESPACE_CELL_CODE = 32;
      },
      133: (e, t) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.Utf8ToUtf32 = t.StringToUtf32 = t.utf32ToString = t.stringFromCodePoint = void 0, t.stringFromCodePoint = function (e) {
          return e > 65535 ? (e -= 65536, String.fromCharCode(55296 + (e >> 10)) + String.fromCharCode(e % 1024 + 56320)) : String.fromCharCode(e);
        }, t.utf32ToString = function (e, t = 0, i = e.length) {
          let s = "";
          for (let r = t; r < i; ++r) {
            let t = e[r];
            t > 65535 ? (t -= 65536, s += String.fromCharCode(55296 + (t >> 10)) + String.fromCharCode(t % 1024 + 56320)) : s += String.fromCharCode(t);
          }
          return s;
        }, t.StringToUtf32 = class {
          constructor() {
            this._interim = 0;
          }
          clear() {
            this._interim = 0;
          }
          decode(e, t) {
            const i = e.length;
            if (!i) return 0;
            let s = 0,
              r = 0;
            if (this._interim) {
              const i = e.charCodeAt(r++);
              56320 <= i && i <= 57343 ? t[s++] = 1024 * (this._interim - 55296) + i - 56320 + 65536 : (t[s++] = this._interim, t[s++] = i), this._interim = 0;
            }
            for (let o = r; o < i; ++o) {
              const r = e.charCodeAt(o);
              if (55296 <= r && r <= 56319) {
                if (++o >= i) return this._interim = r, s;
                const n = e.charCodeAt(o);
                56320 <= n && n <= 57343 ? t[s++] = 1024 * (r - 55296) + n - 56320 + 65536 : (t[s++] = r, t[s++] = n);
              } else 65279 !== r && (t[s++] = r);
            }
            return s;
          }
        }, t.Utf8ToUtf32 = class {
          constructor() {
            this.interim = new Uint8Array(3);
          }
          clear() {
            this.interim.fill(0);
          }
          decode(e, t) {
            const i = e.length;
            if (!i) return 0;
            let s,
              r,
              o,
              n,
              a = 0,
              h = 0,
              c = 0;
            if (this.interim[0]) {
              let s = !1,
                r = this.interim[0];
              r &= 192 == (224 & r) ? 31 : 224 == (240 & r) ? 15 : 7;
              let o,
                n = 0;
              for (; (o = 63 & this.interim[++n]) && n < 4;) r <<= 6, r |= o;
              const h = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4,
                l = h - n;
              for (; c < l;) {
                if (c >= i) return 0;
                if (o = e[c++], 128 != (192 & o)) {
                  c--, s = !0;
                  break;
                }
                this.interim[n++] = o, r <<= 6, r |= 63 & o;
              }
              s || (2 === h ? r < 128 ? c-- : t[a++] = r : 3 === h ? r < 2048 || r >= 55296 && r <= 57343 || 65279 === r || (t[a++] = r) : r < 65536 || r > 1114111 || (t[a++] = r)), this.interim.fill(0);
            }
            const l = i - 4;
            let d = c;
            for (; d < i;) {
              for (; !(!(d < l) || 128 & (s = e[d]) || 128 & (r = e[d + 1]) || 128 & (o = e[d + 2]) || 128 & (n = e[d + 3]));) t[a++] = s, t[a++] = r, t[a++] = o, t[a++] = n, d += 4;
              if (s = e[d++], s < 128) t[a++] = s;else if (192 == (224 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (h = (31 & s) << 6 | 63 & r, h < 128) {
                  d--;
                  continue;
                }
                t[a++] = h;
              } else if (224 == (240 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                if (o = e[d++], 128 != (192 & o)) {
                  d--;
                  continue;
                }
                if (h = (15 & s) << 12 | (63 & r) << 6 | 63 & o, h < 2048 || h >= 55296 && h <= 57343 || 65279 === h) continue;
                t[a++] = h;
              } else if (240 == (248 & s)) {
                if (d >= i) return this.interim[0] = s, a;
                if (r = e[d++], 128 != (192 & r)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                if (o = e[d++], 128 != (192 & o)) {
                  d--;
                  continue;
                }
                if (d >= i) return this.interim[0] = s, this.interim[1] = r, this.interim[2] = o, a;
                if (n = e[d++], 128 != (192 & n)) {
                  d--;
                  continue;
                }
                if (h = (7 & s) << 18 | (63 & r) << 12 | (63 & o) << 6 | 63 & n, h < 65536 || h > 1114111) continue;
                t[a++] = h;
              }
            }
            return a;
          }
        };
      },
      726: (e, t) => {
        function i(e, t, i) {
          t.di$target === t ? t.di$dependencies.push({
            id: e,
            index: i
          }) : (t.di$dependencies = [{
            id: e,
            index: i
          }], t.di$target = t);
        }
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.createDecorator = t.getServiceDependencies = t.serviceRegistry = void 0, t.serviceRegistry = new Map(), t.getServiceDependencies = function (e) {
          return e.di$dependencies || [];
        }, t.createDecorator = function (e) {
          if (t.serviceRegistry.has(e)) return t.serviceRegistry.get(e);
          const s = function (e, t, r) {
            if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
            i(s, e, r);
          };
          return s.toString = () => e, t.serviceRegistry.set(e, s), s;
        };
      },
      97: (e, t, i) => {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.IDecorationService = t.IUnicodeService = t.IOscLinkService = t.IOptionsService = t.ILogService = t.LogLevelEnum = t.IInstantiationService = t.ICharsetService = t.ICoreService = t.ICoreMouseService = t.IBufferService = void 0;
        const s = i(726);
        var r;
        t.IBufferService = (0, s.createDecorator)("BufferService"), t.ICoreMouseService = (0, s.createDecorator)("CoreMouseService"), t.ICoreService = (0, s.createDecorator)("CoreService"), t.ICharsetService = (0, s.createDecorator)("CharsetService"), t.IInstantiationService = (0, s.createDecorator)("InstantiationService"), (r = t.LogLevelEnum || (t.LogLevelEnum = {}))[r.DEBUG = 0] = "DEBUG", r[r.INFO = 1] = "INFO", r[r.WARN = 2] = "WARN", r[r.ERROR = 3] = "ERROR", r[r.OFF = 4] = "OFF", t.ILogService = (0, s.createDecorator)("LogService"), t.IOptionsService = (0, s.createDecorator)("OptionsService"), t.IOscLinkService = (0, s.createDecorator)("OscLinkService"), t.IUnicodeService = (0, s.createDecorator)("UnicodeService"), t.IDecorationService = (0, s.createDecorator)("DecorationService");
      }
    },
    t = {};
  function i(s) {
    var r = t[s];
    if (void 0 !== r) return r.exports;
    var o = t[s] = {
      exports: {}
    };
    return e[s].call(o.exports, o, o.exports, i), o.exports;
  }
  var s = {};
  return (() => {
    var e = s;
    Object.defineProperty(e, "__esModule", {
      value: !0
    }), e.CanvasAddon = void 0;
    const t = i(949),
      r = i(345),
      o = i(859);
    class n extends o.Disposable {
      constructor() {
        super(...arguments), this._onChangeTextureAtlas = this.register(new r.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new r.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event;
      }
      get textureAtlas() {
        var e;
        return null === (e = this._renderer) || void 0 === e ? void 0 : e.textureAtlas;
      }
      activate(e) {
        const i = e._core;
        if (!e.element) return void this.register(i.onWillOpen(() => this.activate(e)));
        this._terminal = e;
        const s = i.coreService,
          n = i.optionsService,
          a = i.screenElement,
          h = i.linkifier2,
          c = i,
          l = c._bufferService,
          d = c._renderService,
          _ = c._characterJoinerService,
          u = c._charSizeService,
          g = c._coreBrowserService,
          f = c._decorationService,
          v = c._themeService;
        this._renderer = new t.CanvasRenderer(e, a, h, l, u, n, _, s, g, f, v), this.register((0, r.forwardEvent)(this._renderer.onChangeTextureAtlas, this._onChangeTextureAtlas)), this.register((0, r.forwardEvent)(this._renderer.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas)), d.setRenderer(this._renderer), d.handleResize(l.cols, l.rows), this.register((0, o.toDisposable)(() => {
          var t;
          d.setRenderer(this._terminal._core._createRenderer()), d.handleResize(e.cols, e.rows), null === (t = this._renderer) || void 0 === t || t.dispose(), this._renderer = void 0;
        }));
      }
    }
    e.CanvasAddon = n;
  })(), s;
})());

/***/ }),

/***/ 8990:
/*!*************************************************************!*\
  !*** ./node_modules/xterm-addon-fit/lib/xterm-addon-fit.js ***!
  \*************************************************************/
/***/ ((module) => {

!function (e, t) {
   true ? module.exports = t() : 0;
}(self, function () {
  return (() => {
    "use strict";

    var e = {};
    return (() => {
      var t = e;
      Object.defineProperty(t, "__esModule", {
        value: !0
      }), t.FitAddon = void 0, t.FitAddon = class {
        constructor() {}
        activate(e) {
          this._terminal = e;
        }
        dispose() {}
        fit() {
          const e = this.proposeDimensions();
          if (!e || !this._terminal || isNaN(e.cols) || isNaN(e.rows)) return;
          const t = this._terminal._core;
          this._terminal.rows === e.rows && this._terminal.cols === e.cols || (t._renderService.clear(), this._terminal.resize(e.cols, e.rows));
        }
        proposeDimensions() {
          if (!this._terminal) return;
          if (!this._terminal.element || !this._terminal.element.parentElement) return;
          const e = this._terminal._core,
            t = e._renderService.dimensions;
          if (0 === t.css.cell.width || 0 === t.css.cell.height) return;
          const r = 0 === this._terminal.options.scrollback ? 0 : e.viewport.scrollBarWidth,
            i = window.getComputedStyle(this._terminal.element.parentElement),
            o = parseInt(i.getPropertyValue("height")),
            s = Math.max(0, parseInt(i.getPropertyValue("width"))),
            n = window.getComputedStyle(this._terminal.element),
            l = o - (parseInt(n.getPropertyValue("padding-top")) + parseInt(n.getPropertyValue("padding-bottom"))),
            a = s - (parseInt(n.getPropertyValue("padding-right")) + parseInt(n.getPropertyValue("padding-left"))) - r;
          return {
            cols: Math.max(2, Math.floor(a / t.css.cell.width)),
            rows: Math.max(1, Math.floor(l / t.css.cell.height))
          };
        }
      };
    })(), e;
  })();
});

/***/ }),

/***/ 3264:
/*!*****************************************************************!*\
  !*** ./node_modules/xterm-addon-image/lib/xterm-addon-image.js ***!
  \*****************************************************************/
/***/ ((module) => {

/*! For license information please see xterm-addon-image.js.LICENSE.txt */
!function (A, t) {
   true ? module.exports = t() : 0;
}(self, function () {
  return (() => {
    "use strict";

    var A = {
        477: (A, t) => {
          function e(A) {
            return 255 & A;
          }
          function i(A) {
            return A >>> 8 & 255;
          }
          function s(A) {
            return A >>> 16 & 255;
          }
          function r(A, t, e, i = 255) {
            return ((255 & i) << 24 | (255 & e) << 16 | (255 & t) << 8 | 255 & A) >>> 0;
          }
          function g(A, t, e) {
            return Math.max(A, Math.min(e, t));
          }
          function a(A, t, e) {
            return e < 0 && (e += 1), e > 1 && (e -= 1), 6 * e < 1 ? t + 6 * (A - t) * e : 2 * e < 1 ? A : 3 * e < 2 ? t + (A - t) * (4 - 6 * e) : t;
          }
          function I(A, t, e) {
            return (4278190080 | Math.round(e / 100 * 255) << 16 | Math.round(t / 100 * 255) << 8 | Math.round(A / 100 * 255)) >>> 0;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.DEFAULT_FOREGROUND = t.DEFAULT_BACKGROUND = t.PALETTE_ANSI_256 = t.PALETTE_VT340_GREY = t.PALETTE_VT340_COLOR = t.normalizeHLS = t.normalizeRGB = t.nearestColorIndex = t.fromRGBA8888 = t.toRGBA8888 = t.alpha = t.blue = t.green = t.red = t.BIG_ENDIAN = void 0, t.BIG_ENDIAN = 255 === new Uint8Array(new Uint32Array([4278190080]).buffer)[0], t.BIG_ENDIAN && console.warn("BE platform detected. This version of node-sixel works only on LE properly."), t.red = e, t.green = i, t.blue = s, t.alpha = function (A) {
            return A >>> 24 & 255;
          }, t.toRGBA8888 = r, t.fromRGBA8888 = function (A) {
            return [255 & A, A >> 8 & 255, A >> 16 & 255, A >>> 24];
          }, t.nearestColorIndex = function (A, t) {
            const r = e(A),
              g = i(A),
              a = s(A);
            let I = Number.MAX_SAFE_INTEGER,
              o = -1;
            for (let A = 0; A < t.length; ++A) {
              const e = r - t[A][0],
                i = g - t[A][1],
                s = a - t[A][2],
                h = e * e + i * i + s * s;
              if (!h) return A;
              h < I && (I = h, o = A);
            }
            return o;
          }, t.normalizeRGB = I, t.normalizeHLS = function (A, t, e) {
            return function (A, t, e) {
              if (!e) {
                const A = Math.round(255 * t);
                return r(A, A, A);
              }
              const i = t < .5 ? t * (1 + e) : t + e - t * e,
                s = 2 * t - i;
              return r(g(0, 255, Math.round(255 * a(i, s, A + 1 / 3))), g(0, 255, Math.round(255 * a(i, s, A))), g(0, 255, Math.round(255 * a(i, s, A - 1 / 3))));
            }((A + 240) / 360, t / 100, e / 100);
          }, t.PALETTE_VT340_COLOR = new Uint32Array([I(0, 0, 0), I(20, 20, 80), I(80, 13, 13), I(20, 80, 20), I(80, 20, 80), I(20, 80, 80), I(80, 80, 20), I(53, 53, 53), I(26, 26, 26), I(33, 33, 60), I(60, 26, 26), I(33, 60, 33), I(60, 33, 60), I(33, 60, 60), I(60, 60, 33), I(80, 80, 80)]), t.PALETTE_VT340_GREY = new Uint32Array([I(0, 0, 0), I(13, 13, 13), I(26, 26, 26), I(40, 40, 40), I(6, 6, 6), I(20, 20, 20), I(33, 33, 33), I(46, 46, 46), I(0, 0, 0), I(13, 13, 13), I(26, 26, 26), I(40, 40, 40), I(6, 6, 6), I(20, 20, 20), I(33, 33, 33), I(46, 46, 46)]), t.PALETTE_ANSI_256 = (() => {
            const A = [r(0, 0, 0), r(205, 0, 0), r(0, 205, 0), r(205, 205, 0), r(0, 0, 238), r(205, 0, 205), r(0, 250, 205), r(229, 229, 229), r(127, 127, 127), r(255, 0, 0), r(0, 255, 0), r(255, 255, 0), r(92, 92, 255), r(255, 0, 255), r(0, 255, 255), r(255, 255, 255)],
              t = [0, 95, 135, 175, 215, 255];
            for (let e = 0; e < 6; ++e) for (let i = 0; i < 6; ++i) for (let s = 0; s < 6; ++s) A.push(r(t[e], t[i], t[s]));
            for (let t = 8; t <= 238; t += 10) A.push(r(t, t, t));
            return new Uint32Array(A);
          })(), t.DEFAULT_BACKGROUND = r(0, 0, 0, 255), t.DEFAULT_FOREGROUND = r(255, 255, 255, 255);
        },
        710: (A, t, e) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.decodeAsync = t.decode = t.Decoder = t.DecoderAsync = void 0;
          const i = e(477),
            s = e(343),
            r = function (A) {
              if ("undefined" != typeof Buffer) return Buffer.from(A, "base64");
              const t = atob(A),
                e = new Uint8Array(t.length);
              for (let A = 0; A < e.length; ++A) e[A] = t.charCodeAt(A);
              return e;
            }(s.LIMITS.BYTES);
          let g;
          const a = new Uint32Array();
          class I {
            constructor() {
              this.bandHandler = A => 1, this.modeHandler = A => 1;
            }
            handle_band(A) {
              return this.bandHandler(A);
            }
            mode_parsed(A) {
              return this.modeHandler(A);
            }
          }
          const o = {
            memoryLimit: 134217728,
            sixelColor: i.DEFAULT_FOREGROUND,
            fillColor: i.DEFAULT_BACKGROUND,
            palette: i.PALETTE_VT340_COLOR,
            paletteLimit: s.LIMITS.PALETTE_SIZE,
            truncate: !0
          };
          function h(A) {
            const t = new I(),
              e = {
                env: {
                  handle_band: t.handle_band.bind(t),
                  mode_parsed: t.mode_parsed.bind(t)
                }
              };
            return WebAssembly.instantiate(g || r, e).then(e => (g = g || e.module, new C(A, e.instance || e, t)));
          }
          t.DecoderAsync = h;
          class C {
            constructor(A, t, e) {
              if (this._PIXEL_OFFSET = s.LIMITS.MAX_WIDTH + 4, this._canvas = a, this._bandWidths = [], this._maxWidth = 0, this._minWidth = s.LIMITS.MAX_WIDTH, this._lastOffset = 0, this._currentHeight = 0, this._opts = Object.assign({}, o, A), this._opts.paletteLimit > s.LIMITS.PALETTE_SIZE) throw new Error(`DecoderOptions.paletteLimit must not exceed ${s.LIMITS.PALETTE_SIZE}`);
              if (t) e.bandHandler = this._handle_band.bind(this), e.modeHandler = this._initCanvas.bind(this);else {
                const A = g || (g = new WebAssembly.Module(r));
                t = new WebAssembly.Instance(A, {
                  env: {
                    handle_band: this._handle_band.bind(this),
                    mode_parsed: this._initCanvas.bind(this)
                  }
                });
              }
              this._instance = t, this._wasm = this._instance.exports, this._chunk = new Uint8Array(this._wasm.memory.buffer, this._wasm.get_chunk_address(), s.LIMITS.CHUNK_SIZE), this._states = new Uint32Array(this._wasm.memory.buffer, this._wasm.get_state_address(), 12), this._palette = new Uint32Array(this._wasm.memory.buffer, this._wasm.get_palette_address(), s.LIMITS.PALETTE_SIZE), this._palette.set(this._opts.palette), this._pSrc = new Uint32Array(this._wasm.memory.buffer, this._wasm.get_p0_address()), this._wasm.init(i.DEFAULT_FOREGROUND, 0, this._opts.paletteLimit, 0);
            }
            get _fillColor() {
              return this._states[0];
            }
            get _truncate() {
              return this._states[8];
            }
            get _rasterWidth() {
              return this._states[6];
            }
            get _rasterHeight() {
              return this._states[7];
            }
            get _width() {
              return this._states[2] ? this._states[2] - 4 : 0;
            }
            get _height() {
              return this._states[3];
            }
            get _level() {
              return this._states[9];
            }
            get _mode() {
              return this._states[10];
            }
            get _paletteLimit() {
              return this._states[11];
            }
            _initCanvas(A) {
              if (2 === A) {
                const A = this.width * this.height;
                if (A > this._canvas.length) {
                  if (this._opts.memoryLimit && 4 * A > this._opts.memoryLimit) throw this.release(), new Error("image exceeds memory limit");
                  this._canvas = new Uint32Array(A);
                }
                this._maxWidth = this._width;
              } else if (1 === A) if (2 === this._level) {
                const A = Math.min(this._rasterWidth, s.LIMITS.MAX_WIDTH) * this._rasterHeight;
                if (A > this._canvas.length) {
                  if (this._opts.memoryLimit && 4 * A > this._opts.memoryLimit) throw this.release(), new Error("image exceeds memory limit");
                  this._canvas = new Uint32Array(A);
                }
              } else this._canvas.length < 65536 && (this._canvas = new Uint32Array(65536));
              return 0;
            }
            _realloc(A, t) {
              const e = A + t;
              if (e > this._canvas.length) {
                if (this._opts.memoryLimit && 4 * e > this._opts.memoryLimit) throw this.release(), new Error("image exceeds memory limit");
                const A = new Uint32Array(65536 * Math.ceil(e / 65536));
                A.set(this._canvas), this._canvas = A;
              }
            }
            _handle_band(A) {
              const t = this._PIXEL_OFFSET;
              let e = this._lastOffset;
              if (2 === this._mode) {
                let i = this.height - this._currentHeight,
                  s = 0;
                for (; s < 6 && i > 0;) this._canvas.set(this._pSrc.subarray(t * s, t * s + A), e + A * s), s++, i--;
                this._lastOffset += A * s, this._currentHeight += s;
              } else if (1 === this._mode) {
                this._realloc(e, 6 * A), this._maxWidth = Math.max(this._maxWidth, A), this._minWidth = Math.min(this._minWidth, A);
                for (let i = 0; i < 6; ++i) this._canvas.set(this._pSrc.subarray(t * i, t * i + A), e + A * i);
                this._bandWidths.push(A), this._lastOffset += 6 * A, this._currentHeight += 6;
              }
              return 0;
            }
            get width() {
              return 1 !== this._mode ? this._width : Math.max(this._maxWidth, this._wasm.current_width());
            }
            get height() {
              return 1 !== this._mode ? this._height : this._wasm.current_width() ? 6 * this._bandWidths.length + this._wasm.current_height() : 6 * this._bandWidths.length;
            }
            get palette() {
              return this._palette.subarray(0, this._paletteLimit);
            }
            get memoryUsage() {
              return this._canvas.byteLength + this._wasm.memory.buffer.byteLength + 8 * this._bandWidths.length;
            }
            get properties() {
              return {
                width: this.width,
                height: this.height,
                mode: this._mode,
                level: this._level,
                truncate: !!this._truncate,
                paletteLimit: this._paletteLimit,
                fillColor: this._fillColor,
                memUsage: this.memoryUsage,
                rasterAttributes: {
                  numerator: this._states[4],
                  denominator: this._states[5],
                  width: this._rasterWidth,
                  height: this._rasterHeight
                }
              };
            }
            init(A = this._opts.fillColor, t = this._opts.palette, e = this._opts.paletteLimit, i = this._opts.truncate) {
              this._wasm.init(this._opts.sixelColor, A, e, i ? 1 : 0), t && this._palette.set(t.subarray(0, s.LIMITS.PALETTE_SIZE)), this._bandWidths.length = 0, this._maxWidth = 0, this._minWidth = s.LIMITS.MAX_WIDTH, this._lastOffset = 0, this._currentHeight = 0;
            }
            decode(A, t = 0, e = A.length) {
              let i = t;
              for (; i < e;) {
                const t = Math.min(e - i, s.LIMITS.CHUNK_SIZE);
                this._chunk.set(A.subarray(i, i += t)), this._wasm.decode(0, t);
              }
            }
            decodeString(A, t = 0, e = A.length) {
              let i = t;
              for (; i < e;) {
                const t = Math.min(e - i, s.LIMITS.CHUNK_SIZE);
                for (let e = 0, s = i; e < t; ++e, ++s) this._chunk[e] = A.charCodeAt(s);
                i += t, this._wasm.decode(0, t);
              }
            }
            get data32() {
              if (0 === this._mode || !this.width || !this.height) return a;
              const A = this._wasm.current_width();
              if (2 === this._mode) {
                let t = this.height - this._currentHeight;
                if (t > 0) {
                  const e = this._PIXEL_OFFSET;
                  let i = this._lastOffset,
                    s = 0;
                  for (; s < 6 && t > 0;) this._canvas.set(this._pSrc.subarray(e * s, e * s + A), i + A * s), s++, t--;
                  t && this._canvas.fill(this._fillColor, i + A * s);
                }
                return this._canvas.subarray(0, this.width * this.height);
              }
              if (1 === this._mode) {
                if (this._minWidth === this._maxWidth) {
                  let t = !1;
                  if (A) if (A !== this._minWidth) t = !0;else {
                    const t = this._PIXEL_OFFSET;
                    let e = this._lastOffset;
                    this._realloc(e, 6 * A);
                    for (let i = 0; i < 6; ++i) this._canvas.set(this._pSrc.subarray(t * i, t * i + A), e + A * i);
                  }
                  if (!t) return this._canvas.subarray(0, this.width * this.height);
                }
                const t = new Uint32Array(this.width * this.height);
                t.fill(this._fillColor);
                let e = 0,
                  i = 0;
                for (let A = 0; A < this._bandWidths.length; ++A) {
                  const s = this._bandWidths[A];
                  for (let A = 0; A < 6; ++A) t.set(this._canvas.subarray(i, i += s), e), e += this.width;
                }
                if (A) {
                  const i = this._PIXEL_OFFSET,
                    s = this._wasm.current_height();
                  for (let r = 0; r < s; ++r) t.set(this._pSrc.subarray(i * r, i * r + A), e + this.width * r);
                }
                return t;
              }
              return a;
            }
            get data8() {
              return new Uint8ClampedArray(this.data32.buffer, 0, this.width * this.height * 4);
            }
            release() {
              this._canvas = a, this._bandWidths.length = 0, this._maxWidth = 0, this._minWidth = s.LIMITS.MAX_WIDTH, this._wasm.init(i.DEFAULT_FOREGROUND, 0, this._opts.paletteLimit, 0);
            }
          }
          t.Decoder = C, t.decode = function (A, t) {
            const e = new C(t);
            return e.init(), "string" == typeof A ? e.decodeString(A) : e.decode(A), {
              width: e.width,
              height: e.height,
              data32: e.data32,
              data8: e.data8
            };
          }, t.decodeAsync = async function (A, t) {
            const e = await h(t);
            return e.init(), "string" == typeof A ? e.decodeString(A) : e.decode(A), {
              width: e.width,
              height: e.height,
              data32: e.data32,
              data8: e.data8
            };
          };
        },
        343: (A, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.LIMITS = void 0, t.LIMITS = {
            CHUNK_SIZE: 16384,
            PALETTE_SIZE: 4096,
            MAX_WIDTH: 16384,
            BYTES: " "
          };
        },
        782: (A, t, e) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ImageRenderer = void 0;
          const i = e(477);
          class s {
            constructor(A, t) {
              this._terminal = A, this._showPlaceholder = t, this._oldOpen = this._terminal._core.open, this._terminal._core.open = A => {
                var t;
                null === (t = this._oldOpen) || void 0 === t || t.call(this._terminal._core, A), this._open();
              }, this._terminal._core.screenElement && this._open(), this._optionsRefresh = this._terminal._core.optionsService.onOptionChange(A => {
                var t;
                "fontSize" === A && (this.rescaleCanvas(), null === (t = this._renderService) || void 0 === t || t.refreshRows(0, this._terminal.rows));
              });
            }
            static createCanvas(A, t, e) {
              const i = A.document.createElement("canvas");
              return i.width = 0 | t, i.height = 0 | e, i;
            }
            static createImageData(A, t, e, i) {
              if ("function" != typeof ImageData) {
                const s = A.createImageData(t, e);
                return i && s.data.set(new Uint8ClampedArray(i, 0, t * e * 4)), s;
              }
              return i ? new ImageData(new Uint8ClampedArray(i, 0, t * e * 4), t, e) : new ImageData(t, e);
            }
            static createImageBitmap(A) {
              return "function" != typeof createImageBitmap ? Promise.resolve(void 0) : createImageBitmap(A);
            }
            dispose() {
              var A, t;
              null === (A = this._optionsRefresh) || void 0 === A || A.dispose(), this._removeLayerFromDom(), this._terminal._core && this._oldOpen && (this._terminal._core.open = this._oldOpen, this._oldOpen = void 0), this._renderService && this._oldSetRenderer && (this._renderService.setRenderer = this._oldSetRenderer, this._oldSetRenderer = void 0), this._renderService = void 0, this.canvas = void 0, this._ctx = void 0, null === (t = this._placeholderBitmap) || void 0 === t || t.close(), this._placeholderBitmap = void 0, this._placeholder = void 0;
            }
            showPlaceholder(A) {
              var t, e;
              A ? this._placeholder || -1 === this.cellSize.height || this._createPlaceHolder(Math.max(this.cellSize.height + 1, 24)) : (null === (t = this._placeholderBitmap) || void 0 === t || t.close(), this._placeholderBitmap = void 0, this._placeholder = void 0), null === (e = this._renderService) || void 0 === e || e.refreshRows(0, this._terminal.rows);
            }
            get dimensions() {
              var A;
              return null === (A = this._renderService) || void 0 === A ? void 0 : A.dimensions;
            }
            get cellSize() {
              var A, t;
              return {
                width: (null === (A = this.dimensions) || void 0 === A ? void 0 : A.css.cell.width) || -1,
                height: (null === (t = this.dimensions) || void 0 === t ? void 0 : t.css.cell.height) || -1
              };
            }
            clearLines(A, t) {
              var e, i, s, r;
              null === (e = this._ctx) || void 0 === e || e.clearRect(0, A * ((null === (i = this.dimensions) || void 0 === i ? void 0 : i.css.cell.height) || 0), (null === (s = this.dimensions) || void 0 === s ? void 0 : s.css.canvas.width) || 0, (++t - A) * ((null === (r = this.dimensions) || void 0 === r ? void 0 : r.css.cell.height) || 0));
            }
            clearAll() {
              var A, t, e;
              null === (A = this._ctx) || void 0 === A || A.clearRect(0, 0, (null === (t = this.canvas) || void 0 === t ? void 0 : t.width) || 0, (null === (e = this.canvas) || void 0 === e ? void 0 : e.height) || 0);
            }
            draw(A, t, e, i, s = 1) {
              if (!this._ctx) return;
              const {
                width: r,
                height: g
              } = this.cellSize;
              if (-1 === r || -1 === g) return;
              this._rescaleImage(A, r, g);
              const a = A.actual,
                I = Math.ceil(a.width / r),
                o = t % I * r,
                h = Math.floor(t / I) * g,
                C = e * r,
                B = i * g,
                n = s * r + o > a.width ? a.width - o : s * r,
                Q = h + g > a.height ? a.height - h : g;
              this._ctx.drawImage(a, Math.floor(o), Math.floor(h), Math.ceil(n), Math.ceil(Q), Math.floor(C), Math.floor(B), Math.ceil(n), Math.ceil(Q));
            }
            extractTile(A, t) {
              const {
                width: e,
                height: i
              } = this.cellSize;
              if (-1 === e || -1 === i) return;
              this._rescaleImage(A, e, i);
              const r = A.actual,
                g = Math.ceil(r.width / e),
                a = t % g * e,
                I = Math.floor(t / g) * i,
                o = e + a > r.width ? r.width - a : e,
                h = I + i > r.height ? r.height - I : i,
                C = s.createCanvas(this._terminal._core._coreBrowserService.window, o, h),
                B = C.getContext("2d");
              return B ? (B.drawImage(r, Math.floor(a), Math.floor(I), Math.floor(o), Math.floor(h), 0, 0, Math.floor(o), Math.floor(h)), C) : void 0;
            }
            drawPlaceholder(A, t, e = 1) {
              if ((this._placeholderBitmap || this._placeholder) && this._ctx) {
                const {
                  width: i,
                  height: s
                } = this.cellSize;
                if (-1 === i || -1 === s) return;
                s >= this._placeholder.height && this._createPlaceHolder(s + 1), this._ctx.drawImage(this._placeholderBitmap || this._placeholder, A * i, t * s % 2 ? 0 : 1, i * e, s, A * i, t * s, i * e, s);
              }
            }
            rescaleCanvas() {
              this.canvas && (this.canvas.width === this.dimensions.css.canvas.width && this.canvas.height === this.dimensions.css.canvas.height || (this.canvas.width = this.dimensions.css.canvas.width || 0, this.canvas.height = this.dimensions.css.canvas.height || 0));
            }
            _rescaleImage(A, t, e) {
              if (t === A.actualCellSize.width && e === A.actualCellSize.height) return;
              const {
                width: i,
                height: r
              } = A.origCellSize;
              if (t === i && e === r) return A.actual = A.orig, A.actualCellSize.width = i, void (A.actualCellSize.height = r);
              const g = s.createCanvas(this._terminal._core._coreBrowserService.window, Math.ceil(A.orig.width * t / i), Math.ceil(A.orig.height * e / r)),
                a = g.getContext("2d");
              a && (a.drawImage(A.orig, 0, 0, g.width, g.height), A.actual = g, A.actualCellSize.width = t, A.actualCellSize.height = e);
            }
            _open() {
              this._renderService = this._terminal._core._renderService, this._oldSetRenderer = this._renderService.setRenderer.bind(this._renderService), this._renderService.setRenderer = A => {
                var t;
                this._removeLayerFromDom(), null === (t = this._oldSetRenderer) || void 0 === t || t.call(this._renderService, A), this._insertLayerToDom();
              }, this._insertLayerToDom(), this._showPlaceholder && this._createPlaceHolder();
            }
            _insertLayerToDom() {
              var A, t, e;
              this.canvas = s.createCanvas(this._terminal._core._coreBrowserService.window, (null === (A = this.dimensions) || void 0 === A ? void 0 : A.css.canvas.width) || 0, (null === (t = this.dimensions) || void 0 === t ? void 0 : t.css.canvas.height) || 0), this.canvas.classList.add("xterm-image-layer"), null === (e = this._terminal._core.screenElement) || void 0 === e || e.appendChild(this.canvas), this._ctx = this.canvas.getContext("2d", {
                alpha: !0,
                desynchronized: !0
              });
            }
            _removeLayerFromDom() {
              var A, t;
              null === (t = null === (A = this.canvas) || void 0 === A ? void 0 : A.parentNode) || void 0 === t || t.removeChild(this.canvas);
            }
            _createPlaceHolder(A = 24) {
              var t;
              null === (t = this._placeholderBitmap) || void 0 === t || t.close(), this._placeholderBitmap = void 0;
              const e = 32,
                r = s.createCanvas(this._terminal._core._coreBrowserService.window, e, A),
                g = r.getContext("2d", {
                  alpha: !1
                });
              if (!g) return;
              const a = s.createImageData(g, e, A),
                I = new Uint32Array(a.data.buffer),
                o = (0, i.toRGBA8888)(0, 0, 0),
                h = (0, i.toRGBA8888)(255, 255, 255);
              I.fill(o);
              for (let t = 0; t < A; ++t) {
                const A = t % 2,
                  i = t * e;
                for (let t = 0; t < e; t += 2) I[i + t + A] = h;
              }
              g.putImageData(a, 0, 0);
              const C = screen.width + e - 1 & -32 || 4096;
              this._placeholder = s.createCanvas(this._terminal._core._coreBrowserService.window, C, A);
              const B = this._placeholder.getContext("2d", {
                alpha: !1
              });
              if (B) {
                for (let A = 0; A < C; A += e) B.drawImage(r, A, 0);
                s.createImageBitmap(this._placeholder).then(A => this._placeholderBitmap = A);
              } else this._placeholder = void 0;
            }
          }
          t.ImageRenderer = s;
        },
        216: (A, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ImageStorage = t.CELL_SIZE_DEFAULT = void 0, t.CELL_SIZE_DEFAULT = {
            width: 7,
            height: 14
          };
          class e {
            constructor(A = 0, t = 0, e = -1, i = -1) {
              this.imageId = e, this.tileId = i, this._ext = 0, this._urlId = 0, this._ext = A, this._urlId = t;
            }
            get ext() {
              return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
            }
            set ext(A) {
              this._ext = A;
            }
            get underlineStyle() {
              return this._urlId ? 5 : (469762048 & this._ext) >> 26;
            }
            set underlineStyle(A) {
              this._ext &= -469762049, this._ext |= A << 26 & 469762048;
            }
            get underlineColor() {
              return 67108863 & this._ext;
            }
            set underlineColor(A) {
              this._ext &= -67108864, this._ext |= 67108863 & A;
            }
            get urlId() {
              return this._urlId;
            }
            set urlId(A) {
              this._urlId = A;
            }
            clone() {
              return new e(this._ext, this._urlId, this.imageId, this.tileId);
            }
            isEmpty() {
              return 0 === this.underlineStyle && 0 === this._urlId && -1 === this.imageId;
            }
          }
          const i = new e();
          t.ImageStorage = class {
            constructor(A, t, e) {
              this._terminal = A, this._renderer = t, this._opts = e, this._images = new Map(), this._lastId = 0, this._lowestId = 0, this._fullyCleared = !1, this._needsFullClear = !1, this._pixelLimit = 25e5;
              try {
                this.setLimit(this._opts.storageLimit);
              } catch (A) {
                console.error(A.message), console.warn(`storageLimit is set to ${this.getLimit()} MB`);
              }
              this._viewportMetrics = {
                cols: this._terminal.cols,
                rows: this._terminal.rows
              };
            }
            dispose() {
              this.reset();
            }
            reset() {
              var A;
              for (const t of this._images.values()) null === (A = t.marker) || void 0 === A || A.dispose();
              this._images.clear(), this._renderer.clearAll();
            }
            getLimit() {
              return 4 * this._pixelLimit / 1e6;
            }
            setLimit(A) {
              if (A < 1 || A > 1e3) throw RangeError("invalid storageLimit, should be at least 1 MB and not exceed 1G");
              this._pixelLimit = A / 4 * 1e6 >>> 0, this._evictOldest(0);
            }
            getUsage() {
              return 4 * this._getStoredPixels() / 1e6;
            }
            _getStoredPixels() {
              let A = 0;
              for (const t of this._images.values()) t.orig && (A += t.orig.width * t.orig.height, t.actual && t.actual !== t.orig && (A += t.actual.width * t.actual.height));
              return A;
            }
            wipeAlternate() {
              var A;
              const t = [];
              for (const [e, i] of this._images.entries()) "alternate" === i.bufferType && (null === (A = i.marker) || void 0 === A || A.dispose(), t.push(e));
              for (const A of t) this._images.delete(A);
              this._needsFullClear = !0, this._fullyCleared = !1;
            }
            advanceCursor(A) {
              if (this._opts.sixelScrolling) {
                let e = this._renderer.cellSize;
                -1 !== e.width && -1 !== e.height || (e = t.CELL_SIZE_DEFAULT);
                const i = Math.ceil(A / e.height);
                for (let A = 1; A < i; ++A) this._terminal._core._inputHandler.lineFeed();
              }
            }
            addImage(A) {
              var e;
              this._evictOldest(A.width * A.height);
              let i = this._renderer.cellSize;
              -1 !== i.width && -1 !== i.height || (i = t.CELL_SIZE_DEFAULT);
              const s = Math.ceil(A.width / i.width),
                r = Math.ceil(A.height / i.height),
                g = ++this._lastId,
                a = this._terminal._core.buffer,
                I = this._terminal.cols,
                o = this._terminal.rows,
                h = a.x,
                C = a.y;
              let B = h,
                n = 0;
              this._opts.sixelScrolling || (a.x = 0, a.y = 0, B = 0), this._terminal._core._inputHandler._dirtyRowTracker.markDirty(a.y);
              for (let A = 0; A < r; ++A) {
                const t = a.lines.get(a.y + a.ybase);
                for (let e = 0; e < s && !(B + e >= I); ++e) this._writeToCell(t, B + e, g, A * s + e), n++;
                if (this._opts.sixelScrolling) A < r - 1 && this._terminal._core._inputHandler.lineFeed();else if (++a.y >= o) break;
                a.x = B;
              }
              this._terminal._core._inputHandler._dirtyRowTracker.markDirty(a.y), this._opts.sixelScrolling ? a.x = B : (a.x = h, a.y = C);
              const Q = [];
              for (const [A, t] of this._images.entries()) t.tileCount < 1 && (null === (e = t.marker) || void 0 === e || e.dispose(), Q.push(A));
              for (const A of Q) this._images.delete(A);
              const l = this._terminal.registerMarker(0);
              null == l || l.onDispose(() => {
                this._images.get(g) && this._images.delete(g);
              }), "alternate" === this._terminal.buffer.active.type && this._evictOnAlternate();
              const c = {
                orig: A,
                origCellSize: i,
                actual: A,
                actualCellSize: Object.assign({}, i),
                marker: l || void 0,
                tileCount: n,
                bufferType: this._terminal.buffer.active.type
              };
              this._images.set(g, c);
            }
            render(A) {
              if (!this._renderer.canvas) return;
              if (!this._images.size) return void (this._fullyCleared || (this._renderer.clearAll(), this._fullyCleared = !0, this._needsFullClear = !1));
              this._needsFullClear && (this._renderer.clearAll(), this._fullyCleared = !0, this._needsFullClear = !1);
              const {
                  start: t,
                  end: e
                } = A,
                s = this._terminal._core.buffer,
                r = this._terminal._core.cols;
              this._renderer.clearLines(t, e), this._renderer.rescaleCanvas();
              for (let A = t; A <= e; ++A) {
                const t = s.lines.get(A + s.ydisp);
                if (!t) return;
                for (let e = 0; e < r; ++e) if (268435456 & t.getBg(e)) {
                  let s = t._extendedAttrs[e] || i;
                  const g = s.imageId;
                  if (void 0 === g || -1 === g) continue;
                  const a = this._images.get(g);
                  if (-1 !== s.tileId) {
                    const I = s.tileId,
                      o = e;
                    let h = 1;
                    for (; ++e < r && 268435456 & t.getBg(e) && (s = t._extendedAttrs[e] || i) && s.imageId === g && s.tileId === I + h;) h++;
                    e--, a ? a.actual && this._renderer.draw(a, I, o, A, h) : this._opts.showPlaceholder && this._renderer.drawPlaceholder(o, A, h), this._fullyCleared = !1;
                  }
                }
              }
            }
            viewportResize(A) {
              var t;
              if (!this._images.size) return void (this._viewportMetrics = A);
              if (this._viewportMetrics.cols >= A.cols) return void (this._viewportMetrics = A);
              const e = this._terminal._core.buffer,
                s = e.lines.length,
                r = this._viewportMetrics.cols - 1;
              for (let g = 0; g < s; ++g) {
                const s = e.lines.get(g);
                if (268435456 & s.getBg(r)) {
                  const e = s._extendedAttrs[r] || i,
                    g = e.imageId;
                  if (void 0 === g || -1 === g) continue;
                  const a = this._images.get(g);
                  if (!a) continue;
                  const I = Math.ceil(((null === (t = a.actual) || void 0 === t ? void 0 : t.width) || 0) / a.actualCellSize.width);
                  if (e.tileId % I + 1 >= I) continue;
                  let o = !1;
                  for (let t = r + 1; t > A.cols; ++t) if (4194303 & s._data[3 * t + 0]) {
                    o = !0;
                    break;
                  }
                  if (o) continue;
                  const h = Math.min(A.cols, I - e.tileId % I + r);
                  let C = e.tileId;
                  for (let A = r + 1; A < h; ++A) this._writeToCell(s, A, g, ++C), a.tileCount++;
                }
              }
              this._viewportMetrics = A;
            }
            getImageAtBufferCell(A, t) {
              var e;
              const s = this._terminal._core.buffer.lines.get(t);
              if (s && 268435456 & s.getBg(A)) {
                const t = s._extendedAttrs[A] || i;
                if (t.imageId && -1 !== t.imageId) return null === (e = this._images.get(t.imageId)) || void 0 === e ? void 0 : e.orig;
              }
            }
            extractTileAtBufferCell(A, t) {
              const e = this._terminal._core.buffer.lines.get(t);
              if (e && 268435456 & e.getBg(A)) {
                const t = e._extendedAttrs[A] || i;
                if (t.imageId && -1 !== t.imageId && -1 !== t.tileId) {
                  const A = this._images.get(t.imageId);
                  if (A) return this._renderer.extractTile(A, t.tileId);
                }
              }
            }
            _evictOldest(A) {
              var t;
              const e = this._getStoredPixels();
              let i = e;
              for (; this._pixelLimit < i + A && this._images.size;) {
                const A = this._images.get(++this._lowestId);
                A && A.orig && (i -= A.orig.width * A.orig.height, A.actual && A.orig !== A.actual && (i -= A.actual.width * A.actual.height), null === (t = A.marker) || void 0 === t || t.dispose(), this._images.delete(this._lowestId));
              }
              return e - i;
            }
            _writeToCell(A, t, i, s) {
              if (268435456 & A._data[3 * t + 2]) {
                const r = A._extendedAttrs[t];
                if (r) {
                  if (void 0 !== r.imageId) {
                    const A = this._images.get(r.imageId);
                    return A && A.tileCount--, r.imageId = i, void (r.tileId = s);
                  }
                  return void (A._extendedAttrs[t] = new e(r.ext, r.urlId, i, s));
                }
              }
              A._data[3 * t + 2] |= 268435456, A._extendedAttrs[t] = new e(0, 0, i, s);
            }
            _evictOnAlternate() {
              var A, t;
              for (const A of this._images.values()) "alternate" === A.bufferType && (A.tileCount = 0);
              const e = this._terminal._core.buffer;
              for (let t = 0; t < this._terminal.rows; ++t) {
                const i = e.lines.get(t);
                if (i) for (let t = 0; t < this._terminal.cols; ++t) if (268435456 & i._data[3 * t + 2]) {
                  const e = null === (A = i._extendedAttrs[t]) || void 0 === A ? void 0 : A.imageId;
                  if (e) {
                    const A = this._images.get(e);
                    A && A.tileCount++;
                  }
                }
              }
              const i = [];
              for (const [A, e] of this._images.entries()) "alternate" !== e.bufferType || e.tileCount || (null === (t = e.marker) || void 0 === t || t.dispose(), i.push(A));
              for (const A of i) this._images.delete(A);
            }
          };
        },
        973: (A, t, e) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.SixelHandler = void 0;
          const i = e(477),
            s = e(782),
            r = e(710),
            g = i.PALETTE_ANSI_256;
          function a(A) {
            return i.BIG_ENDIAN ? A : (255 & A) << 24 | (A >>> 8 & 255) << 16 | (A >>> 16 & 255) << 8 | A >>> 24 & 255;
          }
          g.set(i.PALETTE_VT340_COLOR), t.SixelHandler = class {
            constructor(A, t, e) {
              this._opts = A, this._storage = t, this._coreTerminal = e, this._size = 0, this._aborted = !1, (0, r.DecoderAsync)({
                memoryLimit: 4 * this._opts.pixelLimit,
                palette: g,
                paletteLimit: this._opts.sixelPaletteLimit
              }).then(A => this._dec = A);
            }
            reset() {
              this._dec && (this._dec.release(), this._dec._palette.fill(0), this._dec.init(0, g, this._opts.sixelPaletteLimit));
            }
            hook(A) {
              if (this._size = 0, this._aborted = !1, this._dec) {
                const t = 1 === A.params[1] ? 0 : function (A, t) {
                  let e = 0;
                  if (A.isInverse()) {
                    if (A.isFgDefault()) e = a(t.foreground.rgba);else if (A.isFgRGB()) {
                      const t = A.constructor.toColorRGB(A.getFgColor());
                      e = (0, i.toRGBA8888)(...t);
                    } else e = a(t.ansi[A.getFgColor()].rgba);
                  } else if (A.isBgDefault()) e = a(t.background.rgba);else if (A.isBgRGB()) {
                    const t = A.constructor.toColorRGB(A.getBgColor());
                    e = (0, i.toRGBA8888)(...t);
                  } else e = a(t.ansi[A.getBgColor()].rgba);
                  return e;
                }(this._coreTerminal._core._inputHandler._curAttrData, this._coreTerminal._core._themeService.colors);
                this._dec.init(t, null, this._opts.sixelPaletteLimit);
              }
            }
            put(A, t, e) {
              if (!this._aborted && this._dec) {
                if (this._size += e - t, this._size > this._opts.sixelSizeLimit) return console.warn("SIXEL: too much data, aborting"), this._aborted = !0, void this._dec.release();
                try {
                  this._dec.decode(A, t, e);
                } catch (A) {
                  console.warn(`SIXEL: error while decoding image - ${A}`), this._aborted = !0, this._dec.release();
                }
              }
            }
            unhook(A) {
              var t;
              if (this._aborted || !A || !this._dec) return !0;
              const e = this._dec.width,
                i = this._dec.height;
              if (!e || !i) return i && this._storage.advanceCursor(i), !0;
              const r = s.ImageRenderer.createCanvas(this._coreTerminal._core._coreBrowserService.window, e, i);
              return null === (t = r.getContext("2d")) || void 0 === t || t.putImageData(new ImageData(this._dec.data8, e, i), 0, 0), this._dec.memoryUsage > 4194304 && this._dec.release(), this._storage.addImage(r), !0;
            }
          };
        }
      },
      t = {};
    function e(i) {
      var s = t[i];
      if (void 0 !== s) return s.exports;
      var r = t[i] = {
        exports: {}
      };
      return A[i](r, r.exports, e), r.exports;
    }
    var i = {};
    return (() => {
      var A = i;
      Object.defineProperty(A, "__esModule", {
        value: !0
      }), A.ImageAddon = void 0;
      const t = e(782),
        s = e(216),
        r = e(973),
        g = {
          enableSizeReports: !0,
          pixelLimit: 16777216,
          sixelSupport: !0,
          sixelScrolling: !0,
          sixelPaletteLimit: 256,
          sixelSizeLimit: 25e6,
          storageLimit: 128,
          showPlaceholder: !0
        };
      A.ImageAddon = class {
        constructor(A) {
          this._disposables = [], this._handlers = new Map(), this._opts = Object.assign({}, g, A), this._defaultOpts = Object.assign({}, g, A);
        }
        dispose() {
          for (const A of this._disposables) A.dispose();
          this._disposables.length = 0, this._handlers.clear();
        }
        _disposeLater(...A) {
          for (const t of A) this._disposables.push(t);
        }
        activate(A) {
          if (this._terminal = A, this._renderer = new t.ImageRenderer(A, this._opts.showPlaceholder), this._storage = new s.ImageStorage(A, this._renderer, this._opts), this._opts.enableSizeReports) {
            const t = A.options.windowOptions || {};
            t.getWinSizePixels = !0, t.getCellSizePixels = !0, t.getWinSizeChars = !0, A.options.windowOptions = t;
          }
          if (this._disposeLater(this._renderer, this._storage, A.parser.registerCsiHandler({
            prefix: "?",
            final: "h"
          }, A => this._decset(A)), A.parser.registerCsiHandler({
            prefix: "?",
            final: "l"
          }, A => this._decrst(A)), A.parser.registerCsiHandler({
            final: "c"
          }, A => this._da1(A)), A.parser.registerCsiHandler({
            prefix: "?",
            final: "S"
          }, A => this._xtermGraphicsAttributes(A)), A.onRender(A => {
            var t;
            return null === (t = this._storage) || void 0 === t ? void 0 : t.render(A);
          }), A.parser.registerCsiHandler({
            intermediates: "!",
            final: "p"
          }, () => this.reset()), A.parser.registerEscHandler({
            final: "c"
          }, () => this.reset()), A._core._inputHandler.onRequestReset(() => this.reset()), A.buffer.onBufferChange(() => {
            var A;
            return null === (A = this._storage) || void 0 === A ? void 0 : A.wipeAlternate();
          }), A.onResize(A => {
            var t;
            return null === (t = this._storage) || void 0 === t ? void 0 : t.viewportResize(A);
          })), this._opts.sixelSupport) {
            const t = new r.SixelHandler(this._opts, this._storage, A);
            this._handlers.set("sixel", t), this._disposeLater(A._core._inputHandler._parser.registerDcsHandler({
              final: "q"
            }, t));
          }
        }
        reset() {
          var A;
          this._opts.sixelScrolling = this._defaultOpts.sixelScrolling, this._opts.sixelPaletteLimit = this._defaultOpts.sixelPaletteLimit, null === (A = this._storage) || void 0 === A || A.reset();
          for (const A of this._handlers.values()) A.reset();
          return !1;
        }
        get storageLimit() {
          var A;
          return (null === (A = this._storage) || void 0 === A ? void 0 : A.getLimit()) || -1;
        }
        set storageLimit(A) {
          var t;
          null === (t = this._storage) || void 0 === t || t.setLimit(A), this._opts.storageLimit = A;
        }
        get storageUsage() {
          return this._storage ? this._storage.getUsage() : -1;
        }
        get showPlaceholder() {
          return this._opts.showPlaceholder;
        }
        set showPlaceholder(A) {
          var t;
          this._opts.showPlaceholder = A, null === (t = this._renderer) || void 0 === t || t.showPlaceholder(A);
        }
        getImageAtBufferCell(A, t) {
          var e;
          return null === (e = this._storage) || void 0 === e ? void 0 : e.getImageAtBufferCell(A, t);
        }
        extractTileAtBufferCell(A, t) {
          var e;
          return null === (e = this._storage) || void 0 === e ? void 0 : e.extractTileAtBufferCell(A, t);
        }
        _report(A) {
          var t;
          null === (t = this._terminal) || void 0 === t || t._core.coreService.triggerDataEvent(A);
        }
        _decset(A) {
          for (let t = 0; t < A.length; ++t) 80 === A[t] && (this._opts.sixelScrolling = !1);
          return !1;
        }
        _decrst(A) {
          for (let t = 0; t < A.length; ++t) 80 === A[t] && (this._opts.sixelScrolling = !0);
          return !1;
        }
        _da1(A) {
          return A[0] > 0 || !!this._opts.sixelSupport && (this._report("[?62;4;9;22c"), !0);
        }
        _xtermGraphicsAttributes(A) {
          var t, e, i, r, g, a;
          if (A.length < 2) return !0;
          if (1 === A[0]) switch (A[1]) {
            case 1:
              return this._report(`[?${A[0]};0;${this._opts.sixelPaletteLimit}S`), !0;
            case 2:
              this._opts.sixelPaletteLimit = this._defaultOpts.sixelPaletteLimit, this._report(`[?${A[0]};0;${this._opts.sixelPaletteLimit}S`);
              for (const A of this._handlers.values()) A.reset();
              return !0;
            case 3:
              return A.length > 2 && !(A[2] instanceof Array) && A[2] <= 4096 ? (this._opts.sixelPaletteLimit = A[2], this._report(`[?${A[0]};0;${this._opts.sixelPaletteLimit}S`)) : this._report(`[?${A[0]};2S`), !0;
            case 4:
              return this._report(`[?${A[0]};0;4096S`), !0;
            default:
              return this._report(`[?${A[0]};2S`), !0;
          }
          if (2 === A[0]) switch (A[1]) {
            case 1:
              let I = null === (e = null === (t = this._renderer) || void 0 === t ? void 0 : t.dimensions) || void 0 === e ? void 0 : e.css.canvas.width,
                o = null === (r = null === (i = this._renderer) || void 0 === i ? void 0 : i.dimensions) || void 0 === r ? void 0 : r.css.canvas.height;
              if (!I || !o) {
                const A = s.CELL_SIZE_DEFAULT;
                I = ((null === (g = this._terminal) || void 0 === g ? void 0 : g.cols) || 80) * A.width, o = ((null === (a = this._terminal) || void 0 === a ? void 0 : a.rows) || 24) * A.height;
              }
              if (I * o < this._opts.pixelLimit) this._report(`[?${A[0]};0;${I.toFixed(0)};${o.toFixed(0)}S`);else {
                const t = Math.floor(Math.sqrt(this._opts.pixelLimit));
                this._report(`[?${A[0]};0;${t};${t}S`);
              }
              return !0;
            case 4:
              const h = Math.floor(Math.sqrt(this._opts.pixelLimit));
              return this._report(`[?${A[0]};0;${h};${h}S`), !0;
            default:
              return this._report(`[?${A[0]};2S`), !0;
          }
          return this._report(`[?${A[0]};1S`), !0;
        }
      };
    })(), i;
  })();
});

/***/ }),

/***/ 9696:
/*!*************************************************************************!*\
  !*** ./node_modules/xterm-addon-ligatures/lib/xterm-addon-ligatures.js ***!
  \*************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

/*! For license information please see xterm-addon-ligatures.js.LICENSE.txt */
!function (e, t) {
   true ? module.exports = t(__webpack_require__(/*! fs */ 2089), __webpack_require__(/*! path */ 3056), __webpack_require__(/*! util */ 3837), __webpack_require__(/*! stream */ 3978)) : 0;
}(self, function (e, t, n, s) {
  return (() => {
    var o = {
        185: (e, t) => {
          "use strict";

          function n(e) {
            const t = {};
            for (const [n, o] of Object.entries(e.individual)) t[n] = s(o);
            for (const {
              range: n,
              entry: o
            } of e.range) {
              const e = s(o);
              for (let s = n[0]; s < n[1]; s++) t[s] = e;
            }
            return t;
          }
          function s(e) {
            const t = {};
            return e.forward && (t.forward = n(e.forward)), e.reverse && (t.reverse = n(e.reverse)), e.lookup && (t.lookup = e.lookup), t;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = n;
        },
        98: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(602),
            o = n(593),
            r = n(233),
            a = n(694),
            i = n(532),
            l = n(595),
            u = n(223),
            c = n(439),
            p = n(349),
            f = n(185);
          class h {
            constructor(e, t) {
              this._lookupTrees = [], this._glyphLookups = {}, this._font = e, t.cacheSize > 0 && (this._cache = new o({
                max: t.cacheSize,
                length: (e, t) => t.length
              }));
              const n = (this._font.tables.gsub && this._font.tables.gsub.features.filter(e => "calt" === e.tag) || []).reduce((e, t) => [...e, ...t.feature.lookupListIndexes], []),
                s = this._font.tables.gsub && this._font.tables.gsub.lookups || [],
                a = s.filter((e, t) => n.some(e => e === t));
              for (const [e, t] of a.entries()) {
                const n = [];
                switch (t.lookupType) {
                  case 6:
                    for (const [e, o] of t.subtables.entries()) switch (o.substFormat) {
                      case 1:
                        n.push(l.default(o, s, e));
                        break;
                      case 2:
                        n.push(u.default(o, s, e));
                        break;
                      case 3:
                        n.push(c.default(o, s, e));
                    }
                    break;
                  case 8:
                    for (const [e, s] of t.subtables.entries()) n.push(p.default(s, e));
                }
                const o = f.default(r.default(n));
                this._lookupTrees.push({
                  tree: o,
                  processForward: 8 !== t.lookupType
                });
                for (const t of Object.keys(o)) this._glyphLookups[t] || (this._glyphLookups[t] = []), this._glyphLookups[t].push(e);
              }
            }
            findLigatures(e) {
              const t = this._cache && this._cache.get(e);
              if (t && !Array.isArray(t)) return t;
              const n = [];
              for (const t of e) n.push(this._font.charToGlyphIndex(t));
              if (0 === this._lookupTrees.length) return {
                inputGlyphs: n,
                outputGlyphs: n,
                contextRanges: []
              };
              const s = this._findInternal(n.slice()),
                o = {
                  inputGlyphs: n,
                  outputGlyphs: s.sequence,
                  contextRanges: s.ranges
                };
              return this._cache && this._cache.set(e, o), o;
            }
            findLigatureRanges(e) {
              if (0 === this._lookupTrees.length) return [];
              const t = this._cache && this._cache.get(e);
              if (t) return Array.isArray(t) ? t : t.contextRanges;
              const n = [];
              for (const t of e) n.push(this._font.charToGlyphIndex(t));
              const s = this._findInternal(n);
              return this._cache && this._cache.set(e, s.ranges), s.ranges;
            }
            _findInternal(e) {
              const t = [];
              let n = this._getNextLookup(e, 0);
              for (; null !== n.index;) {
                const s = this._lookupTrees[n.index];
                if (s.processForward) {
                  let o = n.last;
                  for (let r = n.first; r < o; r++) {
                    const n = a.default(s.tree, e, r, r);
                    if (n) {
                      for (let t = 0; t < n.substitutions.length; t++) {
                        const s = n.substitutions[t];
                        null !== s && (e[r + t] = s);
                      }
                      i.default(t, n.contextRange[0] + r, n.contextRange[1] + r), r + n.length >= o && (o = r + n.length + 1), r += n.length - 1;
                    }
                  }
                } else for (let o = n.last - 1; o >= n.first; o--) {
                  const n = a.default(s.tree, e, o, o);
                  if (n) {
                    for (let t = 0; t < n.substitutions.length; t++) {
                      const s = n.substitutions[t];
                      null !== s && (e[o + t] = s);
                    }
                    i.default(t, n.contextRange[0] + o, n.contextRange[1] + o), o -= n.length - 1;
                  }
                }
                n = this._getNextLookup(e, n.index + 1);
              }
              return {
                sequence: e,
                ranges: t
              };
            }
            _getNextLookup(e, t) {
              const n = {
                index: null,
                first: 1 / 0,
                last: -1
              };
              for (let s = 0; s < e.length; s++) {
                const o = this._glyphLookups[e[s]];
                if (o) for (let e = 0; e < o.length; e++) {
                  const r = o[e];
                  if (r >= t) {
                    (null === n.index || r <= n.index) && (n.index = r, n.first > s && (n.first = s), n.last = s + 1);
                    break;
                  }
                }
              }
              return n;
            }
          }
          async function d(e, t) {
            const o = await Promise.resolve().then(() => n(269)).then(t => t.promisify(s.load)(e));
            return new h(o, Object.assign({
              cacheSize: 0
            }, t));
          }
          t.load = async function (e, t) {
            const [s] = await Promise.resolve().then(() => n(781)).then(t => t.listVariants(e));
            if (!s) throw new Error(`Font ${e} not found`);
            return d(s.path, t);
          }, t.loadFile = d, t.loadBuffer = function (e, t) {
            const n = s.parse(e);
            return new h(n, Object.assign({
              cacheSize: 0
            }, t));
          };
        },
        233: (e, t) => {
          "use strict";

          function n(e, t) {
            for (const [n, o] of Object.entries(t.individual)) if (e.individual[n]) s(e.individual[n], o);else {
              let t = !1;
              for (const [a, {
                range: l,
                entry: u
              }] of e.range.entries()) {
                const c = r(Number(n), l);
                if (null !== c.both) {
                  t = !0, e.individual[n] = o, s(e.individual[n], i(u)), e.range.splice(a, 1);
                  for (const t of c.second) Array.isArray(t) ? e.range.push({
                    range: t,
                    entry: i(u)
                  }) : e.individual[t] = i(u);
                }
              }
              t || (e.individual[n] = o);
            }
            for (const {
              range: n,
              entry: a
            } of t.range) {
              let t = [n];
              for (let n = 0; n < e.range.length; n++) {
                const {
                  range: l,
                  entry: u
                } = e.range[n];
                for (const [c, p] of t.entries()) {
                  if (!Array.isArray(p)) {
                    const o = r(p, l);
                    if (null === o.both) continue;
                    e.individual[p] = i(a), s(e.individual[p], i(u)), e.range.splice(n, 1), n--;
                    for (const t of o.second) Array.isArray(t) ? e.range.push({
                      range: t,
                      entry: i(u)
                    }) : e.individual[t] = i(u);
                    t.splice(c, 1, ...o.first);
                    break;
                  }
                  {
                    const r = o(p, l);
                    if (null === r.both) continue;
                    e.range.splice(n, 1), n--;
                    const c = i(u);
                    Array.isArray(r.both) ? e.range.push({
                      range: r.both,
                      entry: c
                    }) : e.individual[r.both] = c, s(c, i(a));
                    for (const t of r.second) Array.isArray(t) ? e.range.push({
                      range: t,
                      entry: i(u)
                    }) : e.individual[t] = i(u);
                    t = r.first;
                  }
                }
              }
              for (const n of Object.keys(e.individual)) for (const [o, l] of t.entries()) {
                if (Array.isArray(l)) {
                  const u = r(Number(n), l);
                  if (null === u.both) continue;
                  s(e.individual[n], i(a)), t.splice(o, 1, ...u.second);
                  break;
                }
                if (Number(n) === l) {
                  s(e.individual[n], i(a));
                  break;
                }
              }
              for (const n of t) Array.isArray(n) ? e.range.push({
                range: n,
                entry: i(a)
              }) : e.individual[n] = i(a);
            }
          }
          function s(e, t) {
            t.lookup && (!e.lookup || e.lookup.index > t.lookup.index || e.lookup.index === t.lookup.index && e.lookup.subIndex > t.lookup.subIndex) && (e.lookup = t.lookup), t.forward && (e.forward ? n(e.forward, t.forward) : e.forward = t.forward), t.reverse && (e.reverse ? n(e.reverse, t.reverse) : e.reverse = t.reverse);
          }
          function o(e, t) {
            const n = {
              first: [],
              second: [],
              both: null
            };
            if (e[0] < t[1] && t[0] < e[1]) {
              const s = Math.max(e[0], t[0]),
                o = Math.min(e[1], t[1]);
              n.both = a(s, o);
            }
            if (e[0] < t[0]) {
              const s = e[0],
                o = Math.min(t[0], e[1]);
              n.first.push(a(s, o));
            } else if (t[0] < e[0]) {
              const s = t[0],
                o = Math.min(t[1], e[0]);
              n.second.push(a(s, o));
            }
            if (e[1] > t[1]) {
              const s = Math.max(e[0], t[1]),
                o = e[1];
              n.first.push(a(s, o));
            } else if (t[1] > e[1]) {
              const s = Math.max(e[1], t[0]),
                o = t[1];
              n.second.push(a(s, o));
            }
            return n;
          }
          function r(e, t) {
            if (e < t[0] || e > t[1]) return {
              first: [e],
              second: [t],
              both: null
            };
            const n = {
              first: [],
              second: [],
              both: e
            };
            return t[0] < e && n.second.push(a(t[0], e)), t[1] > e && n.second.push(a(e + 1, t[1])), n;
          }
          function a(e, t) {
            return t - e == 1 ? e : [e, t];
          }
          function i(e) {
            const t = {};
            return e.forward && (t.forward = l(e.forward)), e.reverse && (t.reverse = l(e.reverse)), e.lookup && (t.lookup = {
              contextRange: e.lookup.contextRange.slice(),
              index: e.lookup.index,
              length: e.lookup.length,
              subIndex: e.lookup.subIndex,
              substitutions: e.lookup.substitutions.slice()
            }), t;
          }
          function l(e) {
            const t = {};
            for (const [n, s] of Object.entries(e.individual)) t[n] = i(s);
            return {
              individual: t,
              range: e.range.map(({
                range: e,
                entry: t
              }) => ({
                range: e.slice(),
                entry: i(t)
              }))
            };
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = function (e) {
            const t = {
              individual: {},
              range: []
            };
            for (const s of e) n(t, s);
            return t;
          };
        },
        532: (e, t) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = function (e, t, n) {
            let s = !1;
            for (let o = 0; o < e.length; o++) {
              const r = e[o];
              if (s) {
                if (n <= r[0]) return e[o - 1][1] = n, e;
                if (n <= r[1]) return e[o - 1][1] = Math.max(n, r[1]), e.splice(o, 1), s = !1, e;
                e.splice(o, 1), o--;
              } else {
                if (n <= r[0]) return e.splice(o, 0, [t, n]), e;
                if (n <= r[1]) return r[0] = Math.min(t, r[0]), e;
                if (!(t < r[1])) continue;
                r[0] = Math.min(t, r[0]), s = !0;
              }
            }
            return s ? e[e.length - 1][1] = n : e.push([t, n]), e;
          };
        },
        595: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(283),
            o = n(267);
          t.default = function (e, t, n) {
            const r = {
                individual: {},
                range: []
              },
              a = s.listGlyphsByIndex(e.coverage);
            for (const {
              glyphId: s,
              index: i
            } of a) {
              const a = e.chainRuleSets[i];
              if (a) for (const [e, i] of a.entries()) {
                let a = o.getInputTree(r, i.lookupRecords, t, 0, s).map(({
                  entry: e,
                  substitution: t
                }) => ({
                  entry: e,
                  substitutions: [t]
                }));
                for (const [e, n] of i.input.entries()) a = o.processInputPosition([n], e + 1, a, i.lookupRecords, t);
                for (const e of i.lookahead) a = o.processLookaheadPosition([e], a);
                for (const e of i.backtrack) a = o.processBacktrackPosition([e], a);
                for (const {
                  entry: t,
                  substitutions: s
                } of a) t.lookup = {
                  substitutions: s,
                  length: i.input.length + 1,
                  index: n,
                  subIndex: e,
                  contextRange: [-1 * i.backtrack.length, 1 + i.input.length + i.lookahead.length]
                };
              }
            }
            return r;
          };
        },
        223: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(233),
            o = n(283),
            r = n(91),
            a = n(267);
          t.default = function (e, t, n) {
            const i = [],
              l = o.listGlyphsByIndex(e.coverage);
            for (const {
              glyphId: s
            } of l) {
              const o = r.default(e.inputClassDef, s);
              for (const [s, l] of o.entries()) {
                if (null === l) continue;
                const o = e.chainClassSet[l];
                if (o) for (const [l, u] of o.entries()) {
                  const o = {
                    individual: {},
                    range: []
                  };
                  let c = a.getInputTree(o, u.lookupRecords, t, 0, s).map(({
                    entry: e,
                    substitution: t
                  }) => ({
                    entry: e,
                    substitutions: [t]
                  }));
                  for (const [n, s] of u.input.entries()) c = a.processInputPosition(r.listClassGlyphs(e.inputClassDef, s), n + 1, c, u.lookupRecords, t);
                  for (const t of u.lookahead) c = a.processLookaheadPosition(r.listClassGlyphs(e.lookaheadClassDef, t), c);
                  for (const t of u.backtrack) c = a.processBacktrackPosition(r.listClassGlyphs(e.backtrackClassDef, t), c);
                  for (const {
                    entry: e,
                    substitutions: t
                  } of c) e.lookup = {
                    substitutions: t,
                    index: n,
                    subIndex: l,
                    length: u.input.length + 1,
                    contextRange: [-1 * u.backtrack.length, 1 + u.input.length + u.lookahead.length]
                  };
                  i.push(o);
                }
              }
            }
            return s.default(i);
          };
        },
        439: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(283),
            o = n(267);
          t.default = function (e, t, n) {
            const r = {
                individual: {},
                range: []
              },
              a = s.listGlyphsByIndex(e.inputCoverage[0]);
            for (const {
              glyphId: i
            } of a) {
              let a = o.getInputTree(r, e.lookupRecords, t, 0, i).map(({
                entry: e,
                substitution: t
              }) => ({
                entry: e,
                substitutions: [t]
              }));
              for (const [n, r] of e.inputCoverage.slice(1).entries()) a = o.processInputPosition(s.listGlyphsByIndex(r).map(e => e.glyphId), n + 1, a, e.lookupRecords, t);
              for (const t of e.lookaheadCoverage) a = o.processLookaheadPosition(s.listGlyphsByIndex(t).map(e => e.glyphId), a);
              for (const t of e.backtrackCoverage) a = o.processBacktrackPosition(s.listGlyphsByIndex(t).map(e => e.glyphId), a);
              for (const {
                entry: t,
                substitutions: s
              } of a) t.lookup = {
                substitutions: s,
                index: n,
                subIndex: 0,
                length: e.inputCoverage.length,
                contextRange: [-1 * e.backtrackCoverage.length, e.inputCoverage.length + e.lookaheadCoverage.length]
              };
            }
            return r;
          };
        },
        349: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(283),
            o = n(267);
          t.default = function (e, t) {
            const n = {
                individual: {},
                range: []
              },
              r = s.listGlyphsByIndex(e.coverage);
            for (const {
              glyphId: a,
              index: i
            } of r) {
              const r = {};
              Array.isArray(a) ? n.range.push({
                entry: r,
                range: a
              }) : n.individual[a] = r;
              let l = [{
                entry: r,
                substitutions: [e.substitutes[i]]
              }];
              for (const t of e.lookaheadCoverage) l = o.processLookaheadPosition(s.listGlyphsByIndex(t).map(e => e.glyphId), l);
              for (const t of e.backtrackCoverage) l = o.processBacktrackPosition(s.listGlyphsByIndex(t).map(e => e.glyphId), l);
              for (const {
                entry: n,
                substitutions: s
              } of l) n.lookup = {
                substitutions: s,
                index: t,
                subIndex: 0,
                length: 1,
                contextRange: [-1 * e.backtrackCoverage.length, 1 + e.lookaheadCoverage.length]
              };
            }
            return n;
          };
        },
        91: (e, t) => {
          "use strict";

          function n(e, t) {
            for (const n of e.ranges) if (n.start <= t && n.end >= t) return n.classId;
            return null;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = function (e, t) {
            return 2 === e.format ? Array.isArray(t) ? function (e, t) {
              let s = t[0],
                o = n(e, s),
                r = t[0] + 1;
              const a = new Map();
              for (; r < t[1];) n(e, r) !== o && (r - s <= 1 ? a.set(s, o) : a.set([s, r], o)), r++;
              return r - s <= 1 ? a.set(s, o) : a.set([s, r], o), a;
            }(e, t) : new Map([[t, n(e, t)]]) : new Map([[t, null]]);
          }, t.listClassGlyphs = function (e, t) {
            if (2 === e.format) {
              const n = [];
              for (const s of e.ranges) s.classId === t && (s.end === s.start ? n.push(s.start) : n.push([s.start, s.end + 1]));
              return n;
            }
            return [];
          };
        },
        283: (e, t) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = function (e, t) {
            switch (e.format) {
              case 1:
                const n = e.glyphs.indexOf(t);
                return -1 !== n ? n : null;
              case 2:
                const s = e.ranges.find(e => e.start <= t && e.end >= t);
                return s ? s.index : null;
            }
          }, t.listGlyphsByIndex = function (e) {
            switch (e.format) {
              case 1:
                return e.glyphs.map((e, t) => ({
                  glyphId: e,
                  index: t
                }));
              case 2:
                let t = [];
                for (const [n, s] of e.ranges.entries()) s.end === s.start ? t.push({
                  glyphId: s.start,
                  index: n
                }) : t.push({
                  glyphId: [s.start, s.end + 1],
                  index: n
                });
                return t;
            }
          };
        },
        267: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(603);
          function o(e, t, n, o, a) {
            const i = [];
            if (Array.isArray(a)) {
              const r = function (e, t, n, o) {
                for (const r of e.filter(e => e.sequenceIndex === n)) for (const e of t[r.lookupListIndex].subtables) {
                  const t = s.getRangeSubstitutionGlyphs(e, o);
                  if (!Array.from(t.values()).every(e => null !== e)) return t;
                }
                return new Map([[o, null]]);
              }(t, n, o, a);
              for (const [t, n] of r) {
                const s = {};
                Array.isArray(t) ? e.range.push({
                  range: t,
                  entry: s
                }) : e.individual[t] = {}, i.push({
                  entry: s,
                  substitution: n
                });
              }
            } else e.individual[a] = {}, i.push({
              entry: e.individual[a],
              substitution: r(t, n, o, a)
            });
            return i;
          }
          function r(e, t, n, o) {
            for (const r of e.filter(e => e.sequenceIndex === n)) for (const e of t[r.lookupListIndex].subtables) {
              const t = s.getIndividualSubstitutionGlyph(e, o);
              if (null !== t) return t;
            }
            return null;
          }
          t.processInputPosition = function (e, t, n, s, r) {
            const a = [];
            for (const i of n) {
              i.entry.forward = {
                individual: {},
                range: []
              };
              for (const n of e) a.push(...o(i.entry.forward, s, r, t, n).map(({
                entry: e,
                substitution: t
              }) => ({
                entry: e,
                substitutions: [...i.substitutions, t]
              })));
            }
            return a;
          }, t.processLookaheadPosition = function (e, t) {
            const n = [];
            for (const s of t) for (const t of e) {
              const e = {};
              s.entry.forward || (s.entry.forward = {
                individual: {},
                range: []
              }), n.push({
                entry: e,
                substitutions: s.substitutions
              }), Array.isArray(t) ? s.entry.forward.range.push({
                entry: e,
                range: t
              }) : s.entry.forward.individual[t] = e;
            }
            return n;
          }, t.processBacktrackPosition = function (e, t) {
            const n = [];
            for (const s of t) for (const t of e) {
              const e = {};
              s.entry.reverse || (s.entry.reverse = {
                individual: {},
                range: []
              }), n.push({
                entry: e,
                substitutions: s.substitutions
              }), Array.isArray(t) ? s.entry.reverse.range.push({
                entry: e,
                range: t
              }) : s.entry.reverse.individual[t] = e;
            }
            return n;
          }, t.getInputTree = o;
        },
        603: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(283);
          function o(e, t) {
            const n = s.default(e.coverage, t);
            if (null === n) return null;
            switch (e.substFormat) {
              case 1:
                return (t + e.deltaGlyphId) % 65536;
              case 2:
                return null != e.substitute[n] ? e.substitute[n] : null;
            }
          }
          t.getRangeSubstitutionGlyphs = function (e, t) {
            let n = t[0],
              s = o(e, n),
              r = t[0] + 1;
            const a = new Map();
            for (; r < t[1];) o(e, r) !== s && (r - n <= 1 ? a.set(n, s) : a.set([n, r], s)), r++;
            return r - n <= 1 ? a.set(n, s) : a.set([n, r], s), a;
          }, t.getIndividualSubstitutionGlyph = o;
        },
        694: (e, t) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = function e(t, n, s, o) {
            let r = t[n[o]];
            if (!r) return;
            let a = r.lookup;
            if (r.reverse) {
              const e = function (e, t, n) {
                let s = e[t[--n]],
                  o = s && s.lookup;
                for (; s && ((!o && s.lookup || s.lookup && o && o.index > s.lookup.index) && (o = s.lookup), !(--n < 0) && s.reverse);) s = s.reverse[t[n]];
                return o;
              }(r.reverse, n, s);
              (!a && e || e && a && (a.index > e.index || a.index === e.index && a.subIndex > e.subIndex)) && (a = e);
            }
            if (++o >= n.length || !r.forward) return a;
            const i = e(r.forward, n, s, o);
            return (!a && i || i && a && (a.index > i.index || a.index === i.index && a.subIndex > i.subIndex)) && (a = i), a;
          };
        },
        814: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(82);
          var o, r;
          !function (e) {
            e.Serif = "serif", e.SansSerif = "sansSerif", e.Monospace = "monospace", e.Cursive = "cursive", e.Unknown = "unknown";
          }(o = t.Type || (t.Type = {})), function (e) {
            e.Regular = "regular", e.Italic = "italic", e.Oblique = "oblique", e.Bold = "bold", e.BoldItalic = "boldItalic", e.BoldOblique = "boldOblique", e.Other = "other";
          }(r = t.Style || (t.Style = {}));
          const a = [" Regular", " Bold", " Bold Italic", " Bold Oblique", " Italic", " Oblique"];
          function i(e) {
            if (!e.os2 && !e.head) return r.Other;
            const t = e.os2 ? 32 & e.os2.fsSelection : 1 & e.head.macStyle,
              n = e.os2 ? 1 & e.os2.fsSelection : e.post ? e.post.italicAngle < 0 : 2 & e.head.macStyle,
              s = e.os2 ? 512 & e.os2.fsSelection : e.post ? e.post.italicAngle > 0 : 0,
              o = e.os2 ? 320 & e.os2.fsSelection : 1;
            return t ? s ? r.BoldOblique : n ? r.BoldItalic : r.Bold : s ? r.Oblique : n ? r.Italic : o ? r.Regular : r.Other;
          }
          t.name = function (e, t) {
            const n = e.names.preferredFamily && e.names.preferredFamily[t] ? e.names.preferredFamily[t] : e.names.fontFamily[t];
            if ("win32" === s.platform()) {
              const s = `${n} ${e.names.preferredSubfamily && e.names.preferredSubfamily[t] ? e.names.preferredSubfamily[t] : e.names.fontSubfamily[t]}`;
              let o = -1;
              for (const e of a) {
                const t = s.lastIndexOf(e);
                if (-1 !== t) {
                  o = t;
                  break;
                }
              }
              return -1 !== o ? s.substring(0, o) : s;
            }
            return n;
          }, t.type = function (e) {
            if (e.os2) switch (e.os2.panose[0]) {
              case 2:
                return 9 === e.os2.panose[3] ? o.Monospace : e.os2.panose[1] >= 11 && e.os2.panose[1] <= 15 || 0 === e.os2.panose[1] ? o.SansSerif : o.Serif;
              case 3:
                return o.Cursive;
            } else if (e.post && e.post.isFixedPitch) return o.Monospace;
            return o.Unknown;
          }, t.style = i;
          const l = [r.Bold, r.BoldItalic, r.BoldOblique];
          t.weight = function (e) {
            return e.os2 ? e.os2.usWeightClass : l.includes(i(e)) ? 700 : 400;
          };
        },
        781: function (e, t, n) {
          "use strict";

          var s = this && this.__rest || function (e, t) {
            var n = {};
            for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && t.indexOf(s) < 0 && (n[s] = e[s]);
            if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
              var o = 0;
              for (s = Object.getOwnPropertySymbols(e); o < s.length; o++) t.indexOf(s[o]) < 0 && (n[s[o]] = e[s[o]]);
            }
            return n;
          };
          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const o = n(459),
            r = n(934),
            a = n(814);
          var i = n(814);
          async function l(e) {
            const t = Object.assign({
                concurrency: 4,
                language: "en"
              }, e),
              n = await o.default({
                extensions: ["ttf", "otf"]
              }),
              a = await async function (e, n, s) {
                const o = [];
                let a = 0;
                const i = async e => {
                    o.push(await (async e => {
                      try {
                        return u(e, await r.default(e), t.language);
                      } catch (e) {
                        if (["TypeError", "SyntaxError", "ReferenceError", "RangeError", "AssertionError"].includes(e.name)) throw e;
                      }
                    })(n[e])), a < n.length && (await i(a++));
                  },
                  l = [];
                for (; a < n.length && a < s; a++) l.push(i(a));
                return await Promise.all(l), o;
              }(0, n, t.concurrency),
              i = {};
            for (let e of a.filter(e => e)) {
              const {
                  name: t
                } = e,
                n = s(e, ["name"]);
              i[t] || (i[t] = []), i[t].push(n);
            }
            return i;
          }
          function u(e, t, n) {
            return {
              name: a.name(t, n),
              path: e,
              type: a.type(t),
              weight: a.weight(t),
              style: a.style(t)
            };
          }
          t.Type = i.Type, t.Style = i.Style, t.list = l, t.listVariants = async function (e, t) {
            return (await l(t))[e] || [];
          }, t.get = async function (e, t) {
            const n = Object.assign({
              language: "en"
            }, t);
            return u(e, await r.default(e), n.language);
          };
        },
        934: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(89),
            o = n(896),
            r = n(380),
            a = n(879),
            i = n(130),
            l = n(731),
            u = n(954);
          var c;
          !function (e) {
            e[e.TrueType = 0] = "TrueType", e[e.CFF = 1] = "CFF", e[e.Woff = 2] = "Woff";
          }(c || (c = {}));
          const p = {
            name: {
              tag: Buffer.from("name"),
              parse: r.default
            },
            ltag: {
              tag: Buffer.from("ltag"),
              parse: a.default
            },
            os2: {
              tag: Buffer.from("OS/2"),
              parse: i.default
            },
            head: {
              tag: Buffer.from("head"),
              parse: l.default
            },
            post: {
              tag: Buffer.from("post"),
              parse: u.default
            }
          };
          t.default = async function (e) {
            return new Promise((t, n) => {
              (async () => {
                const t = o.default(),
                  r = s.createReadStream(e);
                let a = !1;
                const i = () => {
                  a = !0;
                };
                r.once("close", i), r.once("end", i), r.once("error", e => {
                  a = !0, n(e);
                }), r.pipe(t);
                try {
                  switch (function (e) {
                    if (e.equals(f.one) || e.equals(f.true) || e.equals(f.typ1)) return c.TrueType;
                    if (e.equals(f.otto)) return c.CFF;
                    if (e.equals(f.woff)) return c.Woff;
                    throw new Error(`Unsupported signature type: ${e}`);
                  }(await t.read(4))) {
                    case c.TrueType:
                    case c.CFF:
                      const n = (await t.read(2)).readUInt16BE(0);
                      await t.skip(6);
                      const s = await async function (e, t) {
                          const n = {};
                          for (let s = 0; s < t; s++) {
                            const t = await e.read(4),
                              s = await e.read(12);
                            for (const [e, o] of Object.entries(p)) if (t.equals(o.tag) && (n[e] = {
                              offset: s.readUInt32BE(4),
                              length: s.readUInt32BE(8)
                            }, n.name && n.ltag && n.os2)) return n;
                          }
                          return n;
                        }(t, n),
                        o = Object.entries(s).sort((e, t) => e[1].offset - t[1].offset),
                        r = {};
                      for (const [e, n] of o) await t.skip(n.offset - t.offset), r[e] = await t.read(n.length);
                      let a = [];
                      if (r.ltag && (a = p.ltag.parse(r.ltag)), !r.name) throw new Error(`missing required OpenType table 'name' in font file: ${e}`);
                      return {
                        names: p.name.parse(r.name, a),
                        os2: r.os2 && p.os2.parse(r.os2),
                        head: r.head && p.head.parse(r.head),
                        post: r.post && p.post.parse(r.post)
                      };
                    case c.Woff:
                    default:
                      throw new Error("provided font type is not supported yet");
                  }
                } finally {
                  r.unpipe(t), a || (r.destroy(), t.destroy());
                }
              })().then(t, n);
            });
          };
          const f = {
            one: Buffer.from([0, 1, 0, 0]),
            otto: Buffer.from("OTTO"),
            true: Buffer.from("true"),
            typ1: Buffer.from("typ1"),
            woff: Buffer.from("wOFF")
          };
        },
        731: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(980);
          t.default = function (e) {
            return {
              version: s.formatFixed(e.readUInt16BE(0), e.readUInt16BE(2)),
              fontRevision: s.formatFixed(e.readUInt16BE(4), e.readUInt16BE(6)),
              checkSumAdjustment: e.readUInt32BE(8),
              magicNumber: e.readUInt32BE(12),
              flags: e.readUInt16BE(16),
              unitsPerEm: e.readUInt16BE(18),
              created: s.formatLongDateTime(e.readUInt32BE(20), e.readUInt32BE(24)),
              modified: s.formatLongDateTime(e.readUInt32BE(28), e.readUInt32BE(32)),
              xMin: e.readInt16BE(36),
              yMin: e.readInt16BE(38),
              xMax: e.readInt16BE(40),
              yMax: e.readInt16BE(42),
              macStyle: e.readUInt16BE(44),
              lowestRecPPEM: e.readUInt16BE(46),
              fontDirectionHint: e.readInt16BE(48),
              indexToLocFormat: e.readInt16BE(50),
              glyphDataFormat: e.readInt16BE(52)
            };
          };
        },
        879: (e, t) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = function (e) {
            if (1 !== e.readUInt32BE(0)) throw new Error("Unsupported ltag table version.");
            const t = e.readUInt32BE(8),
              n = [];
            for (let s = 0; s < t; s++) {
              let t = "";
              const o = e.readUInt16BE(12 + 4 * s),
                r = e.readUInt16BE(14 + 4 * s);
              for (let n = o; n < o + r; ++n) t += String.fromCharCode(e.readInt8(n));
              n.push(t);
            }
            return n;
          };
        },
        380: (e, t) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const n = ["copyright", "fontFamily", "fontSubfamily", "uniqueID", "fullName", "version", "postScriptName", "trademark", "manufacturer", "designer", "description", "manufacturerURL", "designerURL", "license", "licenseURL", "reserved", "preferredFamily", "preferredSubfamily", "compatibleFullName", "sampleText", "postScriptFindFontName", "wwsFamily", "wwsSubfamily"],
            s = {
              0: "en",
              1: "fr",
              2: "de",
              3: "it",
              4: "nl",
              5: "sv",
              6: "es",
              7: "da",
              8: "pt",
              9: "no",
              10: "he",
              11: "ja",
              12: "ar",
              13: "fi",
              14: "el",
              15: "is",
              16: "mt",
              17: "tr",
              18: "hr",
              19: "zh-Hant",
              20: "ur",
              21: "hi",
              22: "th",
              23: "ko",
              24: "lt",
              25: "pl",
              26: "hu",
              27: "es",
              28: "lv",
              29: "se",
              30: "fo",
              31: "fa",
              32: "ru",
              33: "zh",
              34: "nl-BE",
              35: "ga",
              36: "sq",
              37: "ro",
              38: "cz",
              39: "sk",
              40: "si",
              41: "yi",
              42: "sr",
              43: "mk",
              44: "bg",
              45: "uk",
              46: "be",
              47: "uz",
              48: "kk",
              49: "az-Cyrl",
              50: "az-Arab",
              51: "hy",
              52: "ka",
              53: "mo",
              54: "ky",
              55: "tg",
              56: "tk",
              57: "mn-CN",
              58: "mn",
              59: "ps",
              60: "ks",
              61: "ku",
              62: "sd",
              63: "bo",
              64: "ne",
              65: "sa",
              66: "mr",
              67: "bn",
              68: "as",
              69: "gu",
              70: "pa",
              71: "or",
              72: "ml",
              73: "kn",
              74: "ta",
              75: "te",
              76: "si",
              77: "my",
              78: "km",
              79: "lo",
              80: "vi",
              81: "id",
              82: "tl",
              83: "ms",
              84: "ms-Arab",
              85: "am",
              86: "ti",
              87: "om",
              88: "so",
              89: "sw",
              90: "rw",
              91: "rn",
              92: "ny",
              93: "mg",
              94: "eo",
              128: "cy",
              129: "eu",
              130: "ca",
              131: "la",
              132: "qu",
              133: "gn",
              134: "ay",
              135: "tt",
              136: "ug",
              137: "dz",
              138: "jv",
              139: "su",
              140: "gl",
              141: "af",
              142: "br",
              143: "iu",
              144: "gd",
              145: "gv",
              146: "ga",
              147: "to",
              148: "el-polyton",
              149: "kl",
              150: "az",
              151: "nn"
            },
            o = {
              1078: "af",
              1052: "sq",
              1156: "gsw",
              1118: "am",
              5121: "ar-DZ",
              15361: "ar-BH",
              3073: "ar",
              2049: "ar-IQ",
              11265: "ar-JO",
              13313: "ar-KW",
              12289: "ar-LB",
              4097: "ar-LY",
              6145: "ary",
              8193: "ar-OM",
              16385: "ar-QA",
              1025: "ar-SA",
              10241: "ar-SY",
              7169: "aeb",
              14337: "ar-AE",
              9217: "ar-YE",
              1067: "hy",
              1101: "as",
              2092: "az-Cyrl",
              1068: "az",
              1133: "ba",
              1069: "eu",
              1059: "be",
              2117: "bn",
              1093: "bn-IN",
              8218: "bs-Cyrl",
              5146: "bs",
              1150: "br",
              1026: "bg",
              1027: "ca",
              3076: "zh-HK",
              5124: "zh-MO",
              2052: "zh",
              4100: "zh-SG",
              1028: "zh-TW",
              1155: "co",
              1050: "hr",
              4122: "hr-BA",
              1029: "cs",
              1030: "da",
              1164: "prs",
              1125: "dv",
              2067: "nl-BE",
              1043: "nl",
              3081: "en-AU",
              10249: "en-BZ",
              4105: "en-CA",
              9225: "en-029",
              16393: "en-IN",
              6153: "en-IE",
              8201: "en-JM",
              17417: "en-MY",
              5129: "en-NZ",
              13321: "en-PH",
              18441: "en-SG",
              7177: "en-ZA",
              11273: "en-TT",
              2057: "en-GB",
              1033: "en",
              12297: "en-ZW",
              1061: "et",
              1080: "fo",
              1124: "fil",
              1035: "fi",
              2060: "fr-BE",
              3084: "fr-CA",
              1036: "fr",
              5132: "fr-LU",
              6156: "fr-MC",
              4108: "fr-CH",
              1122: "fy",
              1110: "gl",
              1079: "ka",
              3079: "de-AT",
              1031: "de",
              5127: "de-LI",
              4103: "de-LU",
              2055: "de-CH",
              1032: "el",
              1135: "kl",
              1095: "gu",
              1128: "ha",
              1037: "he",
              1081: "hi",
              1038: "hu",
              1039: "is",
              1136: "ig",
              1057: "id",
              1117: "iu",
              2141: "iu-Latn",
              2108: "ga",
              1076: "xh",
              1077: "zu",
              1040: "it",
              2064: "it-CH",
              1041: "ja",
              1099: "kn",
              1087: "kk",
              1107: "km",
              1158: "quc",
              1159: "rw",
              1089: "sw",
              1111: "kok",
              1042: "ko",
              1088: "ky",
              1108: "lo",
              1062: "lv",
              1063: "lt",
              2094: "dsb",
              1134: "lb",
              1071: "mk",
              2110: "ms-BN",
              1086: "ms",
              1100: "ml",
              1082: "mt",
              1153: "mi",
              1146: "arn",
              1102: "mr",
              1148: "moh",
              1104: "mn",
              2128: "mn-CN",
              1121: "ne",
              1044: "nb",
              2068: "nn",
              1154: "oc",
              1096: "or",
              1123: "ps",
              1045: "pl",
              1046: "pt",
              2070: "pt-PT",
              1094: "pa",
              1131: "qu-BO",
              2155: "qu-EC",
              3179: "qu",
              1048: "ro",
              1047: "rm",
              1049: "ru",
              9275: "smn",
              4155: "smj-NO",
              5179: "smj",
              3131: "se-FI",
              1083: "se",
              2107: "se-SE",
              8251: "sms",
              6203: "sma-NO",
              7227: "sms",
              1103: "sa",
              7194: "sr-Cyrl-BA",
              3098: "sr",
              6170: "sr-Latn-BA",
              2074: "sr-Latn",
              1132: "nso",
              1074: "tn",
              1115: "si",
              1051: "sk",
              1060: "sl",
              11274: "es-AR",
              16394: "es-BO",
              13322: "es-CL",
              9226: "es-CO",
              5130: "es-CR",
              7178: "es-DO",
              12298: "es-EC",
              17418: "es-SV",
              4106: "es-GT",
              18442: "es-HN",
              2058: "es-MX",
              19466: "es-NI",
              6154: "es-PA",
              15370: "es-PY",
              10250: "es-PE",
              20490: "es-PR",
              3082: "es",
              1034: "es",
              21514: "es-US",
              14346: "es-UY",
              8202: "es-VE",
              2077: "sv-FI",
              1053: "sv",
              1114: "syr",
              1064: "tg",
              2143: "tzm",
              1097: "ta",
              1092: "tt",
              1098: "te",
              1054: "th",
              1105: "bo",
              1055: "tr",
              1090: "tk",
              1152: "ug",
              1058: "uk",
              1070: "hsb",
              1056: "ur",
              2115: "uz-Cyrl",
              1091: "uz",
              1066: "vi",
              1106: "cy",
              1160: "wo",
              1157: "sah",
              1144: "ii",
              1130: "yo"
            };
          function r(e, t, n) {
            switch (e) {
              case 0:
                if (65535 === t) return "und";
                if (n) return n[t];
                break;
              case 1:
                return s[t];
              case 3:
                return o[t];
            }
          }
          const a = "utf-16",
            i = {
              0: "macintosh",
              1: "x-mac-japanese",
              2: "x-mac-chinesetrad",
              3: "x-mac-korean",
              6: "x-mac-greek",
              7: "x-mac-cyrillic",
              9: "x-mac-devanagai",
              10: "x-mac-gurmukhi",
              11: "x-mac-gujarati",
              12: "x-mac-oriya",
              13: "x-mac-bengali",
              14: "x-mac-tamil",
              15: "x-mac-telugu",
              16: "x-mac-kannada",
              17: "x-mac-malayalam",
              18: "x-mac-sinhalese",
              19: "x-mac-burmese",
              20: "x-mac-khmer",
              21: "x-mac-thai",
              22: "x-mac-lao",
              23: "x-mac-georgian",
              24: "x-mac-armenian",
              25: "x-mac-chinesesimp",
              26: "x-mac-tibetan",
              27: "x-mac-mongolian",
              28: "x-mac-ethiopic",
              29: "x-mac-ce",
              30: "x-mac-vietnamese",
              31: "x-mac-extarabic"
            },
            l = {
              15: "x-mac-icelandic",
              17: "x-mac-turkish",
              18: "x-mac-croatian",
              24: "x-mac-ce",
              25: "x-mac-ce",
              26: "x-mac-ce",
              27: "x-mac-ce",
              28: "x-mac-ce",
              30: "x-mac-icelandic",
              37: "x-mac-romanian",
              38: "x-mac-ce",
              39: "x-mac-ce",
              40: "x-mac-ce",
              143: "x-mac-inuit",
              146: "x-mac-gaelic"
            };
          function u(e, t, n) {
            switch (e) {
              case 0:
                return a;
              case 1:
                return l[n] || i[t];
              case 3:
                if (1 === t || 10 === t) return a;
            }
          }
          t.default = function (e, t) {
            const s = {},
              o = e.readUInt16BE(2),
              i = e.readUInt16BE(4);
            let l = 6;
            for (let c = 0; c < o; c++) {
              const o = e.readUInt16BE(l + 0),
                c = e.readUInt16BE(l + 2),
                f = e.readUInt16BE(l + 4),
                h = e.readUInt16BE(l + 6),
                d = n[h] || String(h),
                g = e.readUInt16BE(l + 8),
                m = e.readUInt16BE(l + 10),
                y = r(o, f, t),
                v = u(o, c, f);
              if (l += 12, void 0 !== v && void 0 !== y) {
                let t;
                if (v === a) {
                  const n = g / 2,
                    s = Array(n);
                  for (let t = 0; t < n; t++) s[t] = e.readUInt16BE(i + m + 2 * t);
                  t = String.fromCharCode(...s);
                } else t = p(e, i + m, g, v);
                if (t) {
                  let e = s[d];
                  void 0 === e && (e = s[d] = {}), e[y] = t;
                }
              }
            }
            return s;
          };
          const c = {
            "x-mac-croatian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ",
            "x-mac-cyrillic": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю",
            "x-mac-gaelic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ",
            "x-mac-greek": "Ä¹²É³ÖÜ΅àâä΄¨çéèêë£™îï•½‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­",
            "x-mac-icelandic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
            "x-mac-inuit": "ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł",
            "x-mac-ce": "ÄĀāÉĄÖÜáąČäčĆćéŹźĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņŃ¬√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",
            macintosh: "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›ﬁﬂ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
            "x-mac-romanian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
            "x-mac-turkish": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"
          };
          function p(e, t, n, s) {
            const o = c[s];
            if (void 0 === o) return;
            let r = "";
            for (let s = 0; s < n; s++) {
              const n = e.readUInt8(t + s);
              r += n <= 127 ? String.fromCharCode(n) : o[127 & n];
            }
            return r;
          }
        },
        130: (e, t) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = function (e) {
            const t = {
              version: e.readUInt16BE(0),
              xAvgCharWidth: e.readUInt16BE(2),
              usWeightClass: e.readUInt16BE(4),
              usWidthClass: e.readUInt16BE(6),
              fsType: e.readUInt16BE(8),
              ySubscriptXSize: e.readInt16BE(10),
              ySubscriptYSize: e.readInt16BE(12),
              ySubscriptXOffset: e.readInt16BE(14),
              ySubscriptYOffset: e.readInt16BE(16),
              ySuperscriptXSize: e.readInt16BE(18),
              ySuperscriptYSize: e.readInt16BE(20),
              ySuperscriptXOffset: e.readInt16BE(22),
              ySuperscriptYOffset: e.readInt16BE(24),
              yStrikeoutSize: e.readInt16BE(26),
              yStrikeoutPosition: e.readInt16BE(28),
              sFamilyClass: e.readInt16BE(30),
              panose: [e.readUInt8(32), e.readUInt8(33), e.readUInt8(34), e.readUInt8(35), e.readUInt8(36), e.readUInt8(37), e.readUInt8(38), e.readUInt8(39), e.readUInt8(40), e.readUInt8(41)],
              ulUnicodeRange1: e.readUInt32BE(42),
              ulUnicodeRange2: e.readUInt32BE(46),
              ulUnicodeRange3: e.readUInt32BE(50),
              ulUnicodeRange4: e.readUInt32BE(54),
              achVendID: String.fromCharCode(e.readUInt8(58), e.readUInt8(59), e.readUInt8(60), e.readUInt8(61)),
              fsSelection: e.readUInt16BE(62),
              usFirstCharIndex: e.readUInt16BE(64),
              usLastCharIndex: e.readUInt16BE(66),
              sTypoAscender: e.readInt16BE(68),
              sTypoDescender: e.readInt16BE(70),
              sTypoLineGap: e.readInt16BE(72),
              usWinAscent: e.readUInt16BE(74),
              usWinDescent: e.readUInt16BE(76)
            };
            return t.version >= 1 && (t.ulCodePageRange1 = e.readUInt32BE(78), t.ulCodePageRange2 = e.readUInt32BE(82)), t.version >= 2 && (t.sxHeight = e.readInt16BE(86), t.sCapHeight = e.readInt16BE(88), t.usDefaultChar = e.readUInt16BE(90), t.usBreakChar = e.readUInt16BE(92), t.usMaxContent = e.readUInt16BE(94)), t;
          };
        },
        954: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(980);
          t.default = function (e) {
            return {
              version: s.formatFixed(e.readUInt16BE(0), e.readUInt16BE(2)),
              italicAngle: s.formatFixed(e.readUInt16BE(4), e.readUInt16BE(6)),
              underlinePosition: e.readInt16BE(8),
              underlineThickness: e.readInt16BE(10),
              isFixedPitch: e.readUInt32BE(12),
              minMemType42: e.readUInt32BE(16),
              maxMemType42: e.readUInt32BE(20),
              minMemType1: e.readUInt32BE(24),
              maxMemType1: e.readUInt32BE(28)
            };
          };
        },
        980: (e, t) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.formatFixed = function (e, t) {
            return e + t / 65536;
          }, t.formatLongDateTime = function (e, t) {
            return 1e3 * (e * 2 ** 32 + t - 2082844800);
          };
        },
        459: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(56),
            o = n(456),
            r = n(49),
            a = {
              win32: () => process.env.WINDIR ? [s.join(process.env.WINDIR, "Fonts")] : ["C:\\Windows\\Fonts"],
              darwin: () => {
                const e = o.homedir();
                return [...(e ? [s.join(e, "/Library/Fonts")] : []), "/Library/Fonts", "/Network/Library/Fonts", "/System/Library/Fonts", "/System Folder/Fonts"];
              },
              linux: () => {
                const e = o.homedir();
                return ["/usr/share/fonts", "/usr/local/share/fonts", ...(e ? [s.join(e, ".fonts"), s.join(e, ".local/share/fonts")] : [])];
              }
            };
          function i(e) {
            const t = Object.assign({
                extensions: ["ttf", "otf", "ttc", "woff", "woff2"],
                additionalFolders: []
              }, e),
              n = o.platform(),
              s = a[n];
            if (!s) throw new Error(`Unsupported platform: ${n}`);
            const i = s();
            return r.default([...i, ...t.additionalFolders], t.extensions);
          }
          e.exports = Object.assign(i, {
            default: i
          }), t.default = i;
        },
        49: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(89),
            o = n(269),
            r = n(56),
            a = o.promisify(s.readdir),
            i = o.promisify(s.stat);
          async function l(e, t, n = 10) {
            if (n <= 0) return [];
            let s;
            try {
              s = await a(e);
            } catch (e) {
              return [];
            }
            const o = [];
            return await Promise.all(s.map(async s => {
              const a = r.join(e, s);
              let u;
              try {
                u = await i(a);
              } catch (e) {
                return;
              }
              u.isFile() && t.test(a) ? o.push(a) : u.isDirectory() && o.push(...(await l(a, t, n - 1)));
            })), o;
          }
          t.default = async function (e, t) {
            const n = new Set();
            return await Promise.all(e.map(async e => {
              const s = await l(r.resolve(e), new RegExp(`\\.${t.map(e => `(?:${e})`).join("|")}$`));
              for (const e of s) n.add(e);
            })), [...n];
          };
        },
        593: (e, t, n) => {
          "use strict";

          const s = n(411),
            o = Symbol("max"),
            r = Symbol("length"),
            a = Symbol("lengthCalculator"),
            i = Symbol("allowStale"),
            l = Symbol("maxAge"),
            u = Symbol("dispose"),
            c = Symbol("noDisposeOnSet"),
            p = Symbol("lruList"),
            f = Symbol("cache"),
            h = Symbol("updateAgeOnGet"),
            d = () => 1,
            g = (e, t, n) => {
              const s = e[f].get(t);
              if (s) {
                const t = s.value;
                if (m(e, t)) {
                  if (v(e, s), !e[i]) return;
                } else n && (e[h] && (s.value.now = Date.now()), e[p].unshiftNode(s));
                return t.value;
              }
            },
            m = (e, t) => {
              if (!t || !t.maxAge && !e[l]) return !1;
              const n = Date.now() - t.now;
              return t.maxAge ? n > t.maxAge : e[l] && n > e[l];
            },
            y = e => {
              if (e[r] > e[o]) for (let t = e[p].tail; e[r] > e[o] && null !== t;) {
                const n = t.prev;
                v(e, t), t = n;
              }
            },
            v = (e, t) => {
              if (t) {
                const n = t.value;
                e[u] && e[u](n.key, n.value), e[r] -= n.length, e[f].delete(n.key), e[p].removeNode(t);
              }
            };
          class b {
            constructor(e, t, n, s, o) {
              this.key = e, this.value = t, this.length = n, this.now = s, this.maxAge = o || 0;
            }
          }
          const x = (e, t, n, s) => {
            let o = n.value;
            m(e, o) && (v(e, n), e[i] || (o = void 0)), o && t.call(s, o.value, o.key, e);
          };
          e.exports = class {
            constructor(e) {
              if ("number" == typeof e && (e = {
                max: e
              }), e || (e = {}), e.max && ("number" != typeof e.max || e.max < 0)) throw new TypeError("max must be a non-negative number");
              this[o] = e.max || 1 / 0;
              const t = e.length || d;
              if (this[a] = "function" != typeof t ? d : t, this[i] = e.stale || !1, e.maxAge && "number" != typeof e.maxAge) throw new TypeError("maxAge must be a number");
              this[l] = e.maxAge || 0, this[u] = e.dispose, this[c] = e.noDisposeOnSet || !1, this[h] = e.updateAgeOnGet || !1, this.reset();
            }
            set max(e) {
              if ("number" != typeof e || e < 0) throw new TypeError("max must be a non-negative number");
              this[o] = e || 1 / 0, y(this);
            }
            get max() {
              return this[o];
            }
            set allowStale(e) {
              this[i] = !!e;
            }
            get allowStale() {
              return this[i];
            }
            set maxAge(e) {
              if ("number" != typeof e) throw new TypeError("maxAge must be a non-negative number");
              this[l] = e, y(this);
            }
            get maxAge() {
              return this[l];
            }
            set lengthCalculator(e) {
              "function" != typeof e && (e = d), e !== this[a] && (this[a] = e, this[r] = 0, this[p].forEach(e => {
                e.length = this[a](e.value, e.key), this[r] += e.length;
              })), y(this);
            }
            get lengthCalculator() {
              return this[a];
            }
            get length() {
              return this[r];
            }
            get itemCount() {
              return this[p].length;
            }
            rforEach(e, t) {
              t = t || this;
              for (let n = this[p].tail; null !== n;) {
                const s = n.prev;
                x(this, e, n, t), n = s;
              }
            }
            forEach(e, t) {
              t = t || this;
              for (let n = this[p].head; null !== n;) {
                const s = n.next;
                x(this, e, n, t), n = s;
              }
            }
            keys() {
              return this[p].toArray().map(e => e.key);
            }
            values() {
              return this[p].toArray().map(e => e.value);
            }
            reset() {
              this[u] && this[p] && this[p].length && this[p].forEach(e => this[u](e.key, e.value)), this[f] = new Map(), this[p] = new s(), this[r] = 0;
            }
            dump() {
              return this[p].map(e => !m(this, e) && {
                k: e.key,
                v: e.value,
                e: e.now + (e.maxAge || 0)
              }).toArray().filter(e => e);
            }
            dumpLru() {
              return this[p];
            }
            set(e, t, n) {
              if ((n = n || this[l]) && "number" != typeof n) throw new TypeError("maxAge must be a number");
              const s = n ? Date.now() : 0,
                i = this[a](t, e);
              if (this[f].has(e)) {
                if (i > this[o]) return v(this, this[f].get(e)), !1;
                const a = this[f].get(e).value;
                return this[u] && (this[c] || this[u](e, a.value)), a.now = s, a.maxAge = n, a.value = t, this[r] += i - a.length, a.length = i, this.get(e), y(this), !0;
              }
              const h = new b(e, t, i, s, n);
              return h.length > this[o] ? (this[u] && this[u](e, t), !1) : (this[r] += h.length, this[p].unshift(h), this[f].set(e, this[p].head), y(this), !0);
            }
            has(e) {
              if (!this[f].has(e)) return !1;
              const t = this[f].get(e).value;
              return !m(this, t);
            }
            get(e) {
              return g(this, e, !0);
            }
            peek(e) {
              return g(this, e, !1);
            }
            pop() {
              const e = this[p].tail;
              return e ? (v(this, e), e.value) : null;
            }
            del(e) {
              v(this, this[f].get(e));
            }
            load(e) {
              this.reset();
              const t = Date.now();
              for (let n = e.length - 1; n >= 0; n--) {
                const s = e[n],
                  o = s.e || 0;
                if (0 === o) this.set(s.k, s.v);else {
                  const e = o - t;
                  e > 0 && this.set(s.k, s.v, e);
                }
              }
            }
            prune() {
              this[f].forEach((e, t) => g(this, t, !1));
            }
          };
        },
        602: (e, t, n) => {
          "use strict";

          n.r(t), n.d(t, {
            BoundingBox: () => i,
            Font: () => In,
            Glyph: () => le,
            Path: () => u,
            _parse: () => z,
            load: () => Hn,
            loadSync: () => zn,
            parse: () => _n
          });
          var s = n(311),
            o = n.n(s);
          function r(e, t, n, s, o) {
            return Math.pow(1 - o, 3) * e + 3 * Math.pow(1 - o, 2) * o * t + 3 * (1 - o) * Math.pow(o, 2) * n + Math.pow(o, 3) * s;
          }
          function a() {
            this.x1 = Number.NaN, this.y1 = Number.NaN, this.x2 = Number.NaN, this.y2 = Number.NaN;
          }
          a.prototype.isEmpty = function () {
            return isNaN(this.x1) || isNaN(this.y1) || isNaN(this.x2) || isNaN(this.y2);
          }, a.prototype.addPoint = function (e, t) {
            "number" == typeof e && ((isNaN(this.x1) || isNaN(this.x2)) && (this.x1 = e, this.x2 = e), e < this.x1 && (this.x1 = e), e > this.x2 && (this.x2 = e)), "number" == typeof t && ((isNaN(this.y1) || isNaN(this.y2)) && (this.y1 = t, this.y2 = t), t < this.y1 && (this.y1 = t), t > this.y2 && (this.y2 = t));
          }, a.prototype.addX = function (e) {
            this.addPoint(e, null);
          }, a.prototype.addY = function (e) {
            this.addPoint(null, e);
          }, a.prototype.addBezier = function (e, t, n, s, o, a, i, l) {
            const u = [e, t],
              c = [n, s],
              p = [o, a],
              f = [i, l];
            this.addPoint(e, t), this.addPoint(i, l);
            for (let e = 0; e <= 1; e++) {
              const t = 6 * u[e] - 12 * c[e] + 6 * p[e],
                n = -3 * u[e] + 9 * c[e] - 9 * p[e] + 3 * f[e],
                s = 3 * c[e] - 3 * u[e];
              if (0 === n) {
                if (0 === t) continue;
                const n = -s / t;
                0 < n && n < 1 && (0 === e && this.addX(r(u[e], c[e], p[e], f[e], n)), 1 === e && this.addY(r(u[e], c[e], p[e], f[e], n)));
                continue;
              }
              const o = Math.pow(t, 2) - 4 * s * n;
              if (o < 0) continue;
              const a = (-t + Math.sqrt(o)) / (2 * n);
              0 < a && a < 1 && (0 === e && this.addX(r(u[e], c[e], p[e], f[e], a)), 1 === e && this.addY(r(u[e], c[e], p[e], f[e], a)));
              const i = (-t - Math.sqrt(o)) / (2 * n);
              0 < i && i < 1 && (0 === e && this.addX(r(u[e], c[e], p[e], f[e], i)), 1 === e && this.addY(r(u[e], c[e], p[e], f[e], i)));
            }
          }, a.prototype.addQuad = function (e, t, n, s, o, r) {
            const a = e + 2 / 3 * (n - e),
              i = t + 2 / 3 * (s - t),
              l = a + 1 / 3 * (o - e),
              u = i + 1 / 3 * (r - t);
            this.addBezier(e, t, a, i, l, u, o, r);
          };
          const i = a;
          function l() {
            this.commands = [], this.fill = "black", this.stroke = null, this.strokeWidth = 1;
          }
          l.prototype.moveTo = function (e, t) {
            this.commands.push({
              type: "M",
              x: e,
              y: t
            });
          }, l.prototype.lineTo = function (e, t) {
            this.commands.push({
              type: "L",
              x: e,
              y: t
            });
          }, l.prototype.curveTo = l.prototype.bezierCurveTo = function (e, t, n, s, o, r) {
            this.commands.push({
              type: "C",
              x1: e,
              y1: t,
              x2: n,
              y2: s,
              x: o,
              y: r
            });
          }, l.prototype.quadTo = l.prototype.quadraticCurveTo = function (e, t, n, s) {
            this.commands.push({
              type: "Q",
              x1: e,
              y1: t,
              x: n,
              y: s
            });
          }, l.prototype.close = l.prototype.closePath = function () {
            this.commands.push({
              type: "Z"
            });
          }, l.prototype.extend = function (e) {
            if (e.commands) e = e.commands;else if (e instanceof i) {
              const t = e;
              return this.moveTo(t.x1, t.y1), this.lineTo(t.x2, t.y1), this.lineTo(t.x2, t.y2), this.lineTo(t.x1, t.y2), void this.close();
            }
            Array.prototype.push.apply(this.commands, e);
          }, l.prototype.getBoundingBox = function () {
            const e = new i();
            let t = 0,
              n = 0,
              s = 0,
              o = 0;
            for (let r = 0; r < this.commands.length; r++) {
              const a = this.commands[r];
              switch (a.type) {
                case "M":
                  e.addPoint(a.x, a.y), t = s = a.x, n = o = a.y;
                  break;
                case "L":
                  e.addPoint(a.x, a.y), s = a.x, o = a.y;
                  break;
                case "Q":
                  e.addQuad(s, o, a.x1, a.y1, a.x, a.y), s = a.x, o = a.y;
                  break;
                case "C":
                  e.addBezier(s, o, a.x1, a.y1, a.x2, a.y2, a.x, a.y), s = a.x, o = a.y;
                  break;
                case "Z":
                  s = t, o = n;
                  break;
                default:
                  throw new Error("Unexpected path command " + a.type);
              }
            }
            return e.isEmpty() && e.addPoint(0, 0), e;
          }, l.prototype.draw = function (e) {
            e.beginPath();
            for (let t = 0; t < this.commands.length; t += 1) {
              const n = this.commands[t];
              "M" === n.type ? e.moveTo(n.x, n.y) : "L" === n.type ? e.lineTo(n.x, n.y) : "C" === n.type ? e.bezierCurveTo(n.x1, n.y1, n.x2, n.y2, n.x, n.y) : "Q" === n.type ? e.quadraticCurveTo(n.x1, n.y1, n.x, n.y) : "Z" === n.type && e.closePath();
            }
            this.fill && (e.fillStyle = this.fill, e.fill()), this.stroke && (e.strokeStyle = this.stroke, e.lineWidth = this.strokeWidth, e.stroke());
          }, l.prototype.toPathData = function (e) {
            function t(t) {
              return Math.round(t) === t ? "" + Math.round(t) : t.toFixed(e);
            }
            function n() {
              let e = "";
              for (let n = 0; n < arguments.length; n += 1) {
                const s = arguments[n];
                s >= 0 && n > 0 && (e += " "), e += t(s);
              }
              return e;
            }
            e = void 0 !== e ? e : 2;
            let s = "";
            for (let e = 0; e < this.commands.length; e += 1) {
              const t = this.commands[e];
              "M" === t.type ? s += "M" + n(t.x, t.y) : "L" === t.type ? s += "L" + n(t.x, t.y) : "C" === t.type ? s += "C" + n(t.x1, t.y1, t.x2, t.y2, t.x, t.y) : "Q" === t.type ? s += "Q" + n(t.x1, t.y1, t.x, t.y) : "Z" === t.type && (s += "Z");
            }
            return s;
          }, l.prototype.toSVG = function (e) {
            let t = '<path d="';
            return t += this.toPathData(e), t += '"', this.fill && "black" !== this.fill && (null === this.fill ? t += ' fill="none"' : t += ' fill="' + this.fill + '"'), this.stroke && (t += ' stroke="' + this.stroke + '" stroke-width="' + this.strokeWidth + '"'), t += "/>", t;
          }, l.prototype.toDOMElement = function (e) {
            const t = this.toPathData(e),
              n = document.createElementNS("http://www.w3.org/2000/svg", "path");
            return n.setAttribute("d", t), n;
          };
          const u = l;
          function c(e) {
            throw new Error(e);
          }
          function p(e, t) {
            e || c(t);
          }
          const f = {
              fail: c,
              argument: p,
              assert: p
            },
            h = 2147483648,
            d = {},
            g = {},
            m = {};
          function y(e) {
            return function () {
              return e;
            };
          }
          g.BYTE = function (e) {
            return f.argument(e >= 0 && e <= 255, "Byte value should be between 0 and 255."), [e];
          }, m.BYTE = y(1), g.CHAR = function (e) {
            return [e.charCodeAt(0)];
          }, m.CHAR = y(1), g.CHARARRAY = function (e) {
            const t = [];
            for (let n = 0; n < e.length; n += 1) t[n] = e.charCodeAt(n);
            return t;
          }, m.CHARARRAY = function (e) {
            return e.length;
          }, g.USHORT = function (e) {
            return [e >> 8 & 255, 255 & e];
          }, m.USHORT = y(2), g.SHORT = function (e) {
            return e >= 32768 && (e = -(65536 - e)), [e >> 8 & 255, 255 & e];
          }, m.SHORT = y(2), g.UINT24 = function (e) {
            return [e >> 16 & 255, e >> 8 & 255, 255 & e];
          }, m.UINT24 = y(3), g.ULONG = function (e) {
            return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          }, m.ULONG = y(4), g.LONG = function (e) {
            return e >= h && (e = -(2 * h - e)), [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          }, m.LONG = y(4), g.FIXED = g.ULONG, m.FIXED = m.ULONG, g.FWORD = g.SHORT, m.FWORD = m.SHORT, g.UFWORD = g.USHORT, m.UFWORD = m.USHORT, g.LONGDATETIME = function (e) {
            return [0, 0, 0, 0, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          }, m.LONGDATETIME = y(8), g.TAG = function (e) {
            return f.argument(4 === e.length, "Tag should be exactly 4 ASCII characters."), [e.charCodeAt(0), e.charCodeAt(1), e.charCodeAt(2), e.charCodeAt(3)];
          }, m.TAG = y(4), g.Card8 = g.BYTE, m.Card8 = m.BYTE, g.Card16 = g.USHORT, m.Card16 = m.USHORT, g.OffSize = g.BYTE, m.OffSize = m.BYTE, g.SID = g.USHORT, m.SID = m.USHORT, g.NUMBER = function (e) {
            return e >= -107 && e <= 107 ? [e + 139] : e >= 108 && e <= 1131 ? [247 + ((e -= 108) >> 8), 255 & e] : e >= -1131 && e <= -108 ? [251 + ((e = -e - 108) >> 8), 255 & e] : e >= -32768 && e <= 32767 ? g.NUMBER16(e) : g.NUMBER32(e);
          }, m.NUMBER = function (e) {
            return g.NUMBER(e).length;
          }, g.NUMBER16 = function (e) {
            return [28, e >> 8 & 255, 255 & e];
          }, m.NUMBER16 = y(3), g.NUMBER32 = function (e) {
            return [29, e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
          }, m.NUMBER32 = y(5), g.REAL = function (e) {
            let t = e.toString();
            const n = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);
            if (n) {
              const s = parseFloat("1e" + ((n[2] ? +n[2] : 0) + n[1].length));
              t = (Math.round(e * s) / s).toString();
            }
            let s = "";
            for (let e = 0, n = t.length; e < n; e += 1) {
              const n = t[e];
              s += "e" === n ? "-" === t[++e] ? "c" : "b" : "." === n ? "a" : "-" === n ? "e" : n;
            }
            s += 1 & s.length ? "f" : "ff";
            const o = [30];
            for (let e = 0, t = s.length; e < t; e += 2) o.push(parseInt(s.substr(e, 2), 16));
            return o;
          }, m.REAL = function (e) {
            return g.REAL(e).length;
          }, g.NAME = g.CHARARRAY, m.NAME = m.CHARARRAY, g.STRING = g.CHARARRAY, m.STRING = m.CHARARRAY, d.UTF8 = function (e, t, n) {
            const s = [],
              o = n;
            for (let n = 0; n < o; n++, t += 1) s[n] = e.getUint8(t);
            return String.fromCharCode.apply(null, s);
          }, d.UTF16 = function (e, t, n) {
            const s = [],
              o = n / 2;
            for (let n = 0; n < o; n++, t += 2) s[n] = e.getUint16(t);
            return String.fromCharCode.apply(null, s);
          }, g.UTF16 = function (e) {
            const t = [];
            for (let n = 0; n < e.length; n += 1) {
              const s = e.charCodeAt(n);
              t[t.length] = s >> 8 & 255, t[t.length] = 255 & s;
            }
            return t;
          }, m.UTF16 = function (e) {
            return 2 * e.length;
          };
          const v = {
            "x-mac-croatian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ",
            "x-mac-cyrillic": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю",
            "x-mac-gaelic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ",
            "x-mac-greek": "Ä¹²É³ÖÜ΅àâä΄¨çéèêë£™îï•½‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­",
            "x-mac-icelandic": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
            "x-mac-inuit": "ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł",
            "x-mac-ce": "ÄĀāÉĄÖÜáąČäčĆćéŹźĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņŃ¬√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",
            macintosh: "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›ﬁﬂ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
            "x-mac-romanian": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ",
            "x-mac-turkish": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"
          };
          d.MACSTRING = function (e, t, n, s) {
            const o = v[s];
            if (void 0 === o) return;
            let r = "";
            for (let s = 0; s < n; s++) {
              const n = e.getUint8(t + s);
              r += n <= 127 ? String.fromCharCode(n) : o[127 & n];
            }
            return r;
          };
          const b = "function" == typeof WeakMap && new WeakMap();
          let x;
          function S(e) {
            return e >= -128 && e <= 127;
          }
          function U(e, t, n) {
            let s = 0;
            const o = e.length;
            for (; t < o && s < 64 && 0 === e[t];) ++t, ++s;
            return n.push(128 | s - 1), t;
          }
          function T(e, t, n) {
            let s = 0;
            const o = e.length;
            let r = t;
            for (; r < o && s < 64;) {
              const t = e[r];
              if (!S(t)) break;
              if (0 === t && r + 1 < o && 0 === e[r + 1]) break;
              ++r, ++s;
            }
            n.push(s - 1);
            for (let s = t; s < r; ++s) n.push(e[s] + 256 & 255);
            return r;
          }
          function E(e, t, n) {
            let s = 0;
            const o = e.length;
            let r = t;
            for (; r < o && s < 64;) {
              const t = e[r];
              if (0 === t) break;
              if (S(t) && r + 1 < o && S(e[r + 1])) break;
              ++r, ++s;
            }
            n.push(64 | s - 1);
            for (let s = t; s < r; ++s) {
              const t = e[s];
              n.push(t + 65536 >> 8 & 255, t + 256 & 255);
            }
            return r;
          }
          g.MACSTRING = function (e, t) {
            const n = function (e) {
              if (!x) {
                x = {};
                for (let e in v) x[e] = new String(e);
              }
              const t = x[e];
              if (void 0 === t) return;
              if (b) {
                const e = b.get(t);
                if (void 0 !== e) return e;
              }
              const n = v[e];
              if (void 0 === n) return;
              const s = {};
              for (let e = 0; e < n.length; e++) s[n.charCodeAt(e)] = e + 128;
              return b && b.set(t, s), s;
            }(t);
            if (void 0 === n) return;
            const s = [];
            for (let t = 0; t < e.length; t++) {
              let o = e.charCodeAt(t);
              if (o >= 128 && (o = n[o], void 0 === o)) return;
              s[t] = o;
            }
            return s;
          }, m.MACSTRING = function (e, t) {
            const n = g.MACSTRING(e, t);
            return void 0 !== n ? n.length : 0;
          }, g.VARDELTAS = function (e) {
            let t = 0;
            const n = [];
            for (; t < e.length;) {
              const s = e[t];
              t = 0 === s ? U(e, t, n) : s >= -128 && s <= 127 ? T(e, t, n) : E(e, t, n);
            }
            return n;
          }, g.INDEX = function (e) {
            let t = 1;
            const n = [t],
              s = [];
            for (let o = 0; o < e.length; o += 1) {
              const r = g.OBJECT(e[o]);
              Array.prototype.push.apply(s, r), t += r.length, n.push(t);
            }
            if (0 === s.length) return [0, 0];
            const o = [],
              r = 1 + Math.floor(Math.log(t) / Math.log(2)) / 8 | 0,
              a = [void 0, g.BYTE, g.USHORT, g.UINT24, g.ULONG][r];
            for (let e = 0; e < n.length; e += 1) {
              const t = a(n[e]);
              Array.prototype.push.apply(o, t);
            }
            return Array.prototype.concat(g.Card16(e.length), g.OffSize(r), o, s);
          }, m.INDEX = function (e) {
            return g.INDEX(e).length;
          }, g.DICT = function (e) {
            let t = [];
            const n = Object.keys(e),
              s = n.length;
            for (let o = 0; o < s; o += 1) {
              const s = parseInt(n[o], 0),
                r = e[s];
              t = t.concat(g.OPERAND(r.value, r.type)), t = t.concat(g.OPERATOR(s));
            }
            return t;
          }, m.DICT = function (e) {
            return g.DICT(e).length;
          }, g.OPERATOR = function (e) {
            return e < 1200 ? [e] : [12, e - 1200];
          }, g.OPERAND = function (e, t) {
            let n = [];
            if (Array.isArray(t)) for (let s = 0; s < t.length; s += 1) f.argument(e.length === t.length, "Not enough arguments given for type" + t), n = n.concat(g.OPERAND(e[s], t[s]));else if ("SID" === t) n = n.concat(g.NUMBER(e));else if ("offset" === t) n = n.concat(g.NUMBER32(e));else if ("number" === t) n = n.concat(g.NUMBER(e));else {
              if ("real" !== t) throw new Error("Unknown operand type " + t);
              n = n.concat(g.REAL(e));
            }
            return n;
          }, g.OP = g.BYTE, m.OP = m.BYTE;
          const k = "function" == typeof WeakMap && new WeakMap();
          function w(e, t, n) {
            for (let e = 0; e < t.length; e += 1) {
              const n = t[e];
              this[n.name] = n.value;
            }
            if (this.tableName = e, this.fields = t, n) {
              const e = Object.keys(n);
              for (let t = 0; t < e.length; t += 1) {
                const s = e[t],
                  o = n[s];
                void 0 !== this[s] && (this[s] = o);
              }
            }
          }
          function O(e, t, n) {
            void 0 === n && (n = t.length);
            const s = new Array(t.length + 1);
            s[0] = {
              name: e + "Count",
              type: "USHORT",
              value: n
            };
            for (let n = 0; n < t.length; n++) s[n + 1] = {
              name: e + n,
              type: "USHORT",
              value: t[n]
            };
            return s;
          }
          function I(e, t, n) {
            const s = t.length,
              o = new Array(s + 1);
            o[0] = {
              name: e + "Count",
              type: "USHORT",
              value: s
            };
            for (let r = 0; r < s; r++) o[r + 1] = {
              name: e + r,
              type: "TABLE",
              value: n(t[r], r)
            };
            return o;
          }
          function R(e, t, n) {
            const s = t.length;
            let o = [];
            o[0] = {
              name: e + "Count",
              type: "USHORT",
              value: s
            };
            for (let e = 0; e < s; e++) o = o.concat(n(t[e], e));
            return o;
          }
          function L(e) {
            1 === e.format ? w.call(this, "coverageTable", [{
              name: "coverageFormat",
              type: "USHORT",
              value: 1
            }].concat(O("glyph", e.glyphs))) : f.assert(!1, "Can't create coverage table format 2 yet.");
          }
          function B(e) {
            w.call(this, "scriptListTable", R("scriptRecord", e, function (e, t) {
              const n = e.script;
              let s = n.defaultLangSys;
              return f.assert(!!s, "Unable to write GSUB: script " + e.tag + " has no default language system."), [{
                name: "scriptTag" + t,
                type: "TAG",
                value: e.tag
              }, {
                name: "script" + t,
                type: "TABLE",
                value: new w("scriptTable", [{
                  name: "defaultLangSys",
                  type: "TABLE",
                  value: new w("defaultLangSys", [{
                    name: "lookupOrder",
                    type: "USHORT",
                    value: 0
                  }, {
                    name: "reqFeatureIndex",
                    type: "USHORT",
                    value: s.reqFeatureIndex
                  }].concat(O("featureIndex", s.featureIndexes)))
                }].concat(R("langSys", n.langSysRecords, function (e, t) {
                  const n = e.langSys;
                  return [{
                    name: "langSysTag" + t,
                    type: "TAG",
                    value: e.tag
                  }, {
                    name: "langSys" + t,
                    type: "TABLE",
                    value: new w("langSys", [{
                      name: "lookupOrder",
                      type: "USHORT",
                      value: 0
                    }, {
                      name: "reqFeatureIndex",
                      type: "USHORT",
                      value: n.reqFeatureIndex
                    }].concat(O("featureIndex", n.featureIndexes)))
                  }];
                })))
              }];
            }));
          }
          function C(e) {
            w.call(this, "featureListTable", R("featureRecord", e, function (e, t) {
              const n = e.feature;
              return [{
                name: "featureTag" + t,
                type: "TAG",
                value: e.tag
              }, {
                name: "feature" + t,
                type: "TABLE",
                value: new w("featureTable", [{
                  name: "featureParams",
                  type: "USHORT",
                  value: n.featureParams
                }].concat(O("lookupListIndex", n.lookupListIndexes)))
              }];
            }));
          }
          function D(e, t) {
            w.call(this, "lookupListTable", I("lookup", e, function (e) {
              let n = t[e.lookupType];
              return f.assert(!!n, "Unable to write GSUB lookup type " + e.lookupType + " tables."), new w("lookupTable", [{
                name: "lookupType",
                type: "USHORT",
                value: e.lookupType
              }, {
                name: "lookupFlag",
                type: "USHORT",
                value: e.lookupFlag
              }].concat(I("subtable", e.subtables, n)));
            }));
          }
          g.CHARSTRING = function (e) {
            if (k) {
              const t = k.get(e);
              if (void 0 !== t) return t;
            }
            let t = [];
            const n = e.length;
            for (let s = 0; s < n; s += 1) {
              const n = e[s];
              t = t.concat(g[n.type](n.value));
            }
            return k && k.set(e, t), t;
          }, m.CHARSTRING = function (e) {
            return g.CHARSTRING(e).length;
          }, g.OBJECT = function (e) {
            const t = g[e.type];
            return f.argument(void 0 !== t, "No encoding function for type " + e.type), t(e.value);
          }, m.OBJECT = function (e) {
            const t = m[e.type];
            return f.argument(void 0 !== t, "No sizeOf function for type " + e.type), t(e.value);
          }, g.TABLE = function (e) {
            let t = [];
            const n = e.fields.length,
              s = [],
              o = [];
            for (let r = 0; r < n; r += 1) {
              const n = e.fields[r],
                a = g[n.type];
              f.argument(void 0 !== a, "No encoding function for field type " + n.type + " (" + n.name + ")");
              let i = e[n.name];
              void 0 === i && (i = n.value);
              const l = a(i);
              "TABLE" === n.type ? (o.push(t.length), t = t.concat([0, 0]), s.push(l)) : t = t.concat(l);
            }
            for (let n = 0; n < s.length; n += 1) {
              const r = o[n],
                a = t.length;
              f.argument(a < 65536, "Table " + e.tableName + " too big."), t[r] = a >> 8, t[r + 1] = 255 & a, t = t.concat(s[n]);
            }
            return t;
          }, m.TABLE = function (e) {
            let t = 0;
            const n = e.fields.length;
            for (let s = 0; s < n; s += 1) {
              const n = e.fields[s],
                o = m[n.type];
              f.argument(void 0 !== o, "No sizeOf function for field type " + n.type + " (" + n.name + ")");
              let r = e[n.name];
              void 0 === r && (r = n.value), t += o(r), "TABLE" === n.type && (t += 2);
            }
            return t;
          }, g.RECORD = g.TABLE, m.RECORD = m.TABLE, g.LITERAL = function (e) {
            return e;
          }, m.LITERAL = function (e) {
            return e.length;
          }, w.prototype.encode = function () {
            return g.TABLE(this);
          }, w.prototype.sizeOf = function () {
            return m.TABLE(this);
          }, L.prototype = Object.create(w.prototype), L.prototype.constructor = L, B.prototype = Object.create(w.prototype), B.prototype.constructor = B, C.prototype = Object.create(w.prototype), C.prototype.constructor = C, D.prototype = Object.create(w.prototype), D.prototype.constructor = D;
          const M = {
            Table: w,
            Record: w,
            Coverage: L,
            ScriptList: B,
            FeatureList: C,
            LookupList: D,
            ushortList: O,
            tableList: I,
            recordList: R
          };
          function P(e, t) {
            return e.getUint8(t);
          }
          function A(e, t) {
            return e.getUint16(t, !1);
          }
          function G(e, t) {
            return e.getUint32(t, !1);
          }
          function N(e, t) {
            return e.getInt16(t, !1) + e.getUint16(t + 2, !1) / 65535;
          }
          const F = {
            byte: 1,
            uShort: 2,
            short: 2,
            uLong: 4,
            fixed: 4,
            longDateTime: 8,
            tag: 4
          };
          function _(e, t) {
            this.data = e, this.offset = t, this.relativeOffset = 0;
          }
          _.prototype.parseByte = function () {
            const e = this.data.getUint8(this.offset + this.relativeOffset);
            return this.relativeOffset += 1, e;
          }, _.prototype.parseChar = function () {
            const e = this.data.getInt8(this.offset + this.relativeOffset);
            return this.relativeOffset += 1, e;
          }, _.prototype.parseCard8 = _.prototype.parseByte, _.prototype.parseUShort = function () {
            const e = this.data.getUint16(this.offset + this.relativeOffset);
            return this.relativeOffset += 2, e;
          }, _.prototype.parseCard16 = _.prototype.parseUShort, _.prototype.parseSID = _.prototype.parseUShort, _.prototype.parseOffset16 = _.prototype.parseUShort, _.prototype.parseShort = function () {
            const e = this.data.getInt16(this.offset + this.relativeOffset);
            return this.relativeOffset += 2, e;
          }, _.prototype.parseF2Dot14 = function () {
            const e = this.data.getInt16(this.offset + this.relativeOffset) / 16384;
            return this.relativeOffset += 2, e;
          }, _.prototype.parseULong = function () {
            const e = G(this.data, this.offset + this.relativeOffset);
            return this.relativeOffset += 4, e;
          }, _.prototype.parseOffset32 = _.prototype.parseULong, _.prototype.parseFixed = function () {
            const e = N(this.data, this.offset + this.relativeOffset);
            return this.relativeOffset += 4, e;
          }, _.prototype.parseString = function (e) {
            const t = this.data,
              n = this.offset + this.relativeOffset;
            let s = "";
            this.relativeOffset += e;
            for (let o = 0; o < e; o++) s += String.fromCharCode(t.getUint8(n + o));
            return s;
          }, _.prototype.parseTag = function () {
            return this.parseString(4);
          }, _.prototype.parseLongDateTime = function () {
            let e = G(this.data, this.offset + this.relativeOffset + 4);
            return e -= 2082844800, this.relativeOffset += 8, e;
          }, _.prototype.parseVersion = function (e) {
            const t = A(this.data, this.offset + this.relativeOffset),
              n = A(this.data, this.offset + this.relativeOffset + 2);
            return this.relativeOffset += 4, void 0 === e && (e = 4096), t + n / e / 10;
          }, _.prototype.skip = function (e, t) {
            void 0 === t && (t = 1), this.relativeOffset += F[e] * t;
          }, _.prototype.parseULongList = function (e) {
            void 0 === e && (e = this.parseULong());
            const t = new Array(e),
              n = this.data;
            let s = this.offset + this.relativeOffset;
            for (let o = 0; o < e; o++) t[o] = n.getUint32(s), s += 4;
            return this.relativeOffset += 4 * e, t;
          }, _.prototype.parseOffset16List = _.prototype.parseUShortList = function (e) {
            void 0 === e && (e = this.parseUShort());
            const t = new Array(e),
              n = this.data;
            let s = this.offset + this.relativeOffset;
            for (let o = 0; o < e; o++) t[o] = n.getUint16(s), s += 2;
            return this.relativeOffset += 2 * e, t;
          }, _.prototype.parseShortList = function (e) {
            const t = new Array(e),
              n = this.data;
            let s = this.offset + this.relativeOffset;
            for (let o = 0; o < e; o++) t[o] = n.getInt16(s), s += 2;
            return this.relativeOffset += 2 * e, t;
          }, _.prototype.parseByteList = function (e) {
            const t = new Array(e),
              n = this.data;
            let s = this.offset + this.relativeOffset;
            for (let o = 0; o < e; o++) t[o] = n.getUint8(s++);
            return this.relativeOffset += e, t;
          }, _.prototype.parseList = function (e, t) {
            t || (t = e, e = this.parseUShort());
            const n = new Array(e);
            for (let s = 0; s < e; s++) n[s] = t.call(this);
            return n;
          }, _.prototype.parseList32 = function (e, t) {
            t || (t = e, e = this.parseULong());
            const n = new Array(e);
            for (let s = 0; s < e; s++) n[s] = t.call(this);
            return n;
          }, _.prototype.parseRecordList = function (e, t) {
            t || (t = e, e = this.parseUShort());
            const n = new Array(e),
              s = Object.keys(t);
            for (let o = 0; o < e; o++) {
              const e = {};
              for (let n = 0; n < s.length; n++) {
                const o = s[n],
                  r = t[o];
                e[o] = r.call(this);
              }
              n[o] = e;
            }
            return n;
          }, _.prototype.parseRecordList32 = function (e, t) {
            t || (t = e, e = this.parseULong());
            const n = new Array(e),
              s = Object.keys(t);
            for (let o = 0; o < e; o++) {
              const e = {};
              for (let n = 0; n < s.length; n++) {
                const o = s[n],
                  r = t[o];
                e[o] = r.call(this);
              }
              n[o] = e;
            }
            return n;
          }, _.prototype.parseStruct = function (e) {
            if ("function" == typeof e) return e.call(this);
            {
              const t = Object.keys(e),
                n = {};
              for (let s = 0; s < t.length; s++) {
                const o = t[s],
                  r = e[o];
                n[o] = r.call(this);
              }
              return n;
            }
          }, _.prototype.parseValueRecord = function (e) {
            if (void 0 === e && (e = this.parseUShort()), 0 === e) return;
            const t = {};
            return 1 & e && (t.xPlacement = this.parseShort()), 2 & e && (t.yPlacement = this.parseShort()), 4 & e && (t.xAdvance = this.parseShort()), 8 & e && (t.yAdvance = this.parseShort()), 16 & e && (t.xPlaDevice = void 0, this.parseShort()), 32 & e && (t.yPlaDevice = void 0, this.parseShort()), 64 & e && (t.xAdvDevice = void 0, this.parseShort()), 128 & e && (t.yAdvDevice = void 0, this.parseShort()), t;
          }, _.prototype.parseValueRecordList = function () {
            const e = this.parseUShort(),
              t = this.parseUShort(),
              n = new Array(t);
            for (let s = 0; s < t; s++) n[s] = this.parseValueRecord(e);
            return n;
          }, _.prototype.parsePointer = function (e) {
            const t = this.parseOffset16();
            if (t > 0) return new _(this.data, this.offset + t).parseStruct(e);
          }, _.prototype.parsePointer32 = function (e) {
            const t = this.parseOffset32();
            if (t > 0) return new _(this.data, this.offset + t).parseStruct(e);
          }, _.prototype.parseListOfLists = function (e) {
            const t = this.parseOffset16List(),
              n = t.length,
              s = this.relativeOffset,
              o = new Array(n);
            for (let s = 0; s < n; s++) {
              const n = t[s];
              if (0 !== n) {
                if (this.relativeOffset = n, e) {
                  const t = this.parseOffset16List(),
                    r = new Array(t.length);
                  for (let s = 0; s < t.length; s++) this.relativeOffset = n + t[s], r[s] = e.call(this);
                  o[s] = r;
                } else o[s] = this.parseUShortList();
              } else o[s] = void 0;
            }
            return this.relativeOffset = s, o;
          }, _.prototype.parseCoverage = function () {
            const e = this.offset + this.relativeOffset,
              t = this.parseUShort(),
              n = this.parseUShort();
            if (1 === t) return {
              format: 1,
              glyphs: this.parseUShortList(n)
            };
            if (2 === t) {
              const e = new Array(n);
              for (let t = 0; t < n; t++) e[t] = {
                start: this.parseUShort(),
                end: this.parseUShort(),
                index: this.parseUShort()
              };
              return {
                format: 2,
                ranges: e
              };
            }
            throw new Error("0x" + e.toString(16) + ": Coverage format must be 1 or 2.");
          }, _.prototype.parseClassDef = function () {
            const e = this.offset + this.relativeOffset,
              t = this.parseUShort();
            if (1 === t) return {
              format: 1,
              startGlyph: this.parseUShort(),
              classes: this.parseUShortList()
            };
            if (2 === t) return {
              format: 2,
              ranges: this.parseRecordList({
                start: _.uShort,
                end: _.uShort,
                classId: _.uShort
              })
            };
            throw new Error("0x" + e.toString(16) + ": ClassDef format must be 1 or 2.");
          }, _.list = function (e, t) {
            return function () {
              return this.parseList(e, t);
            };
          }, _.list32 = function (e, t) {
            return function () {
              return this.parseList32(e, t);
            };
          }, _.recordList = function (e, t) {
            return function () {
              return this.parseRecordList(e, t);
            };
          }, _.recordList32 = function (e, t) {
            return function () {
              return this.parseRecordList32(e, t);
            };
          }, _.pointer = function (e) {
            return function () {
              return this.parsePointer(e);
            };
          }, _.pointer32 = function (e) {
            return function () {
              return this.parsePointer32(e);
            };
          }, _.tag = _.prototype.parseTag, _.byte = _.prototype.parseByte, _.uShort = _.offset16 = _.prototype.parseUShort, _.uShortList = _.prototype.parseUShortList, _.uLong = _.offset32 = _.prototype.parseULong, _.uLongList = _.prototype.parseULongList, _.struct = _.prototype.parseStruct, _.coverage = _.prototype.parseCoverage, _.classDef = _.prototype.parseClassDef;
          const H = {
            reserved: _.uShort,
            reqFeatureIndex: _.uShort,
            featureIndexes: _.uShortList
          };
          _.prototype.parseScriptList = function () {
            return this.parsePointer(_.recordList({
              tag: _.tag,
              script: _.pointer({
                defaultLangSys: _.pointer(H),
                langSysRecords: _.recordList({
                  tag: _.tag,
                  langSys: _.pointer(H)
                })
              })
            })) || [];
          }, _.prototype.parseFeatureList = function () {
            return this.parsePointer(_.recordList({
              tag: _.tag,
              feature: _.pointer({
                featureParams: _.offset16,
                lookupListIndexes: _.uShortList
              })
            })) || [];
          }, _.prototype.parseLookupList = function (e) {
            return this.parsePointer(_.list(_.pointer(function () {
              const t = this.parseUShort();
              f.argument(1 <= t && t <= 9, "GPOS/GSUB lookup type " + t + " unknown.");
              const n = this.parseUShort(),
                s = 16 & n;
              return {
                lookupType: t,
                lookupFlag: n,
                subtables: this.parseList(_.pointer(e[t])),
                markFilteringSet: s ? this.parseUShort() : void 0
              };
            }))) || [];
          }, _.prototype.parseFeatureVariationsList = function () {
            return this.parsePointer32(function () {
              const e = this.parseUShort(),
                t = this.parseUShort();
              return f.argument(1 === e && t < 1, "GPOS/GSUB feature variations table unknown."), this.parseRecordList32({
                conditionSetOffset: _.offset32,
                featureTableSubstitutionOffset: _.offset32
              });
            }) || [];
          };
          const z = {
            getByte: P,
            getCard8: P,
            getUShort: A,
            getCard16: A,
            getShort: function (e, t) {
              return e.getInt16(t, !1);
            },
            getULong: G,
            getFixed: N,
            getTag: function (e, t) {
              let n = "";
              for (let s = t; s < t + 4; s += 1) n += String.fromCharCode(e.getInt8(s));
              return n;
            },
            getOffset: function (e, t, n) {
              let s = 0;
              for (let o = 0; o < n; o += 1) s <<= 8, s += e.getUint8(t + o);
              return s;
            },
            getBytes: function (e, t, n) {
              const s = [];
              for (let o = t; o < n; o += 1) s.push(e.getUint8(o));
              return s;
            },
            bytesToString: function (e) {
              let t = "";
              for (let n = 0; n < e.length; n += 1) t += String.fromCharCode(e[n]);
              return t;
            },
            Parser: _
          };
          function W(e, t, n) {
            e.segments.push({
              end: t,
              start: t,
              delta: -(t - n),
              offset: 0,
              glyphIndex: n
            });
          }
          const q = function (e, t) {
              const n = {};
              n.version = z.getUShort(e, t), f.argument(0 === n.version, "cmap table version should be 0."), n.numTables = z.getUShort(e, t + 2);
              let s = -1;
              for (let o = n.numTables - 1; o >= 0; o -= 1) {
                const n = z.getUShort(e, t + 4 + 8 * o),
                  r = z.getUShort(e, t + 4 + 8 * o + 2);
                if (3 === n && (0 === r || 1 === r || 10 === r)) {
                  s = z.getULong(e, t + 4 + 8 * o + 4);
                  break;
                }
              }
              if (-1 === s) throw new Error("No valid cmap sub-tables found.");
              const o = new z.Parser(e, t + s);
              if (n.format = o.parseUShort(), 12 === n.format) !function (e, t) {
                let n;
                t.parseUShort(), e.length = t.parseULong(), e.language = t.parseULong(), e.groupCount = n = t.parseULong(), e.glyphIndexMap = {};
                for (let s = 0; s < n; s += 1) {
                  const n = t.parseULong(),
                    s = t.parseULong();
                  let o = t.parseULong();
                  for (let t = n; t <= s; t += 1) e.glyphIndexMap[t] = o, o++;
                }
              }(n, o);else {
                if (4 !== n.format) throw new Error("Only format 4 and 12 cmap tables are supported (found format " + n.format + ").");
                !function (e, t, n, s, o) {
                  let r;
                  e.length = t.parseUShort(), e.language = t.parseUShort(), e.segCount = r = t.parseUShort() >> 1, t.skip("uShort", 3), e.glyphIndexMap = {};
                  const a = new z.Parser(n, s + o + 14),
                    i = new z.Parser(n, s + o + 16 + 2 * r),
                    l = new z.Parser(n, s + o + 16 + 4 * r),
                    u = new z.Parser(n, s + o + 16 + 6 * r);
                  let c = s + o + 16 + 8 * r;
                  for (let t = 0; t < r - 1; t += 1) {
                    let t;
                    const s = a.parseUShort(),
                      o = i.parseUShort(),
                      r = l.parseShort(),
                      p = u.parseUShort();
                    for (let a = o; a <= s; a += 1) 0 !== p ? (c = u.offset + u.relativeOffset - 2, c += p, c += 2 * (a - o), t = z.getUShort(n, c), 0 !== t && (t = t + r & 65535)) : t = a + r & 65535, e.glyphIndexMap[a] = t;
                  }
                }(n, o, e, t, s);
              }
              return n;
            },
            j = function (e) {
              let t,
                n = !0;
              for (t = e.length - 1; t > 0; t -= 1) if (e.get(t).unicode > 65535) {
                console.log("Adding CMAP format 12 (needed!)"), n = !1;
                break;
              }
              let s = [{
                name: "version",
                type: "USHORT",
                value: 0
              }, {
                name: "numTables",
                type: "USHORT",
                value: n ? 1 : 2
              }, {
                name: "platformID",
                type: "USHORT",
                value: 3
              }, {
                name: "encodingID",
                type: "USHORT",
                value: 1
              }, {
                name: "offset",
                type: "ULONG",
                value: n ? 12 : 20
              }];
              n || (s = s.concat([{
                name: "cmap12PlatformID",
                type: "USHORT",
                value: 3
              }, {
                name: "cmap12EncodingID",
                type: "USHORT",
                value: 10
              }, {
                name: "cmap12Offset",
                type: "ULONG",
                value: 0
              }])), s = s.concat([{
                name: "format",
                type: "USHORT",
                value: 4
              }, {
                name: "cmap4Length",
                type: "USHORT",
                value: 0
              }, {
                name: "language",
                type: "USHORT",
                value: 0
              }, {
                name: "segCountX2",
                type: "USHORT",
                value: 0
              }, {
                name: "searchRange",
                type: "USHORT",
                value: 0
              }, {
                name: "entrySelector",
                type: "USHORT",
                value: 0
              }, {
                name: "rangeShift",
                type: "USHORT",
                value: 0
              }]);
              const o = new M.Table("cmap", s);
              for (o.segments = [], t = 0; t < e.length; t += 1) {
                const n = e.get(t);
                for (let e = 0; e < n.unicodes.length; e += 1) W(o, n.unicodes[e], t);
                o.segments = o.segments.sort(function (e, t) {
                  return e.start - t.start;
                });
              }
              !function (e) {
                e.segments.push({
                  end: 65535,
                  start: 65535,
                  delta: 1,
                  offset: 0
                });
              }(o);
              const r = o.segments.length;
              let a = 0,
                i = [],
                l = [],
                u = [],
                c = [],
                p = [],
                f = [];
              for (t = 0; t < r; t += 1) {
                const e = o.segments[t];
                e.end <= 65535 && e.start <= 65535 ? (i = i.concat({
                  name: "end_" + t,
                  type: "USHORT",
                  value: e.end
                }), l = l.concat({
                  name: "start_" + t,
                  type: "USHORT",
                  value: e.start
                }), u = u.concat({
                  name: "idDelta_" + t,
                  type: "SHORT",
                  value: e.delta
                }), c = c.concat({
                  name: "idRangeOffset_" + t,
                  type: "USHORT",
                  value: e.offset
                }), void 0 !== e.glyphId && (p = p.concat({
                  name: "glyph_" + t,
                  type: "USHORT",
                  value: e.glyphId
                }))) : a += 1, n || void 0 === e.glyphIndex || (f = f.concat({
                  name: "cmap12Start_" + t,
                  type: "ULONG",
                  value: e.start
                }), f = f.concat({
                  name: "cmap12End_" + t,
                  type: "ULONG",
                  value: e.end
                }), f = f.concat({
                  name: "cmap12Glyph_" + t,
                  type: "ULONG",
                  value: e.glyphIndex
                }));
              }
              if (o.segCountX2 = 2 * (r - a), o.searchRange = 2 * Math.pow(2, Math.floor(Math.log(r - a) / Math.log(2))), o.entrySelector = Math.log(o.searchRange / 2) / Math.log(2), o.rangeShift = o.segCountX2 - o.searchRange, o.fields = o.fields.concat(i), o.fields.push({
                name: "reservedPad",
                type: "USHORT",
                value: 0
              }), o.fields = o.fields.concat(l), o.fields = o.fields.concat(u), o.fields = o.fields.concat(c), o.fields = o.fields.concat(p), o.cmap4Length = 14 + 2 * i.length + 2 + 2 * l.length + 2 * u.length + 2 * c.length + 2 * p.length, !n) {
                const e = 16 + 4 * f.length;
                o.cmap12Offset = 20 + o.cmap4Length, o.fields = o.fields.concat([{
                  name: "cmap12Format",
                  type: "USHORT",
                  value: 12
                }, {
                  name: "cmap12Reserved",
                  type: "USHORT",
                  value: 0
                }, {
                  name: "cmap12Length",
                  type: "ULONG",
                  value: e
                }, {
                  name: "cmap12Language",
                  type: "ULONG",
                  value: 0
                }, {
                  name: "cmap12nGroups",
                  type: "ULONG",
                  value: f.length / 3
                }]), o.fields = o.fields.concat(f);
              }
              return o;
            },
            X = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "266 ff", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"],
            Y = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "", "endash", "dagger", "daggerdbl", "periodcentered", "", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "", "questiondown", "", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "", "ring", "cedilla", "", "hungarumlaut", "ogonek", "caron", "emdash", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AE", "", "ordfeminine", "", "", "", "", "Lslash", "Oslash", "OE", "ordmasculine", "", "", "", "", "", "ae", "", "", "", "dotlessi", "", "", "lslash", "oslash", "oe", "germandbls"],
            V = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "", "", "isuperior", "", "", "lsuperior", "msuperior", "nsuperior", "osuperior", "", "", "rsuperior", "ssuperior", "tsuperior", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdownsmall", "centoldstyle", "Lslashsmall", "", "", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "", "Dotaccentsmall", "", "", "Macronsmall", "", "", "figuredash", "hypheninferior", "", "", "Ogoneksmall", "Ringsmall", "Cedillasmall", "", "", "", "onequarter", "onehalf", "threequarters", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall"],
            Z = [".notdef", ".null", "nonmarkingreturn", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "Lslash", "lslash", "Scaron", "scaron", "Zcaron", "zcaron", "brokenbar", "Eth", "eth", "Yacute", "yacute", "Thorn", "thorn", "minus", "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf", "onequarter", "threequarters", "franc", "Gbreve", "gbreve", "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute", "Ccaron", "ccaron", "dcroat"];
          function Q(e) {
            this.font = e;
          }
          function J(e) {
            this.cmap = e;
          }
          function K(e, t) {
            this.encoding = e, this.charset = t;
          }
          function $(e) {
            switch (e.version) {
              case 1:
                this.names = Z.slice();
                break;
              case 2:
                this.names = new Array(e.numberOfGlyphs);
                for (let t = 0; t < e.numberOfGlyphs; t++) e.glyphNameIndex[t] < Z.length ? this.names[t] = Z[e.glyphNameIndex[t]] : this.names[t] = e.names[e.glyphNameIndex[t] - Z.length];
                break;
              case 2.5:
                this.names = new Array(e.numberOfGlyphs);
                for (let t = 0; t < e.numberOfGlyphs; t++) this.names[t] = Z[t + e.glyphNameIndex[t]];
                break;
              default:
                this.names = [];
            }
          }
          Q.prototype.charToGlyphIndex = function (e) {
            const t = e.charCodeAt(0),
              n = this.font.glyphs;
            if (n) for (let e = 0; e < n.length; e += 1) {
              const s = n.get(e);
              for (let n = 0; n < s.unicodes.length; n += 1) if (s.unicodes[n] === t) return e;
            }
            return null;
          }, J.prototype.charToGlyphIndex = function (e) {
            return this.cmap.glyphIndexMap[e.charCodeAt(0)] || 0;
          }, K.prototype.charToGlyphIndex = function (e) {
            const t = e.charCodeAt(0),
              n = this.encoding[t];
            return this.charset.indexOf(n);
          }, $.prototype.nameToGlyphIndex = function (e) {
            return this.names.indexOf(e);
          }, $.prototype.glyphIndexToName = function (e) {
            return this.names[e];
          };
          const ee = function (e, t, n, s, o) {
            e.beginPath(), e.moveTo(t, n), e.lineTo(s, o), e.stroke();
          };
          function te(e, t, n, s, o) {
            let r;
            return (t & s) > 0 ? (r = e.parseByte(), 0 == (t & o) && (r = -r), r = n + r) : r = (t & o) > 0 ? n : n + e.parseShort(), r;
          }
          function ne(e, t, n) {
            const s = new z.Parser(t, n);
            let o, r;
            if (e.numberOfContours = s.parseShort(), e._xMin = s.parseShort(), e._yMin = s.parseShort(), e._xMax = s.parseShort(), e._yMax = s.parseShort(), e.numberOfContours > 0) {
              const t = e.endPointIndices = [];
              for (let n = 0; n < e.numberOfContours; n += 1) t.push(s.parseUShort());
              e.instructionLength = s.parseUShort(), e.instructions = [];
              for (let t = 0; t < e.instructionLength; t += 1) e.instructions.push(s.parseByte());
              const n = t[t.length - 1] + 1;
              o = [];
              for (let e = 0; e < n; e += 1) if (r = s.parseByte(), o.push(r), (8 & r) > 0) {
                const t = s.parseByte();
                for (let n = 0; n < t; n += 1) o.push(r), e += 1;
              }
              if (f.argument(o.length === n, "Bad flags."), t.length > 0) {
                const a = [];
                let i;
                if (n > 0) {
                  for (let e = 0; e < n; e += 1) r = o[e], i = {}, i.onCurve = !!(1 & r), i.lastPointOfContour = t.indexOf(e) >= 0, a.push(i);
                  let e = 0;
                  for (let t = 0; t < n; t += 1) r = o[t], i = a[t], i.x = te(s, r, e, 2, 16), e = i.x;
                  let l = 0;
                  for (let e = 0; e < n; e += 1) r = o[e], i = a[e], i.y = te(s, r, l, 4, 32), l = i.y;
                }
                e.points = a;
              } else e.points = [];
            } else if (0 === e.numberOfContours) e.points = [];else {
              e.isComposite = !0, e.points = [], e.components = [];
              let t = !0;
              for (; t;) {
                o = s.parseUShort();
                const n = {
                  glyphIndex: s.parseUShort(),
                  xScale: 1,
                  scale01: 0,
                  scale10: 0,
                  yScale: 1,
                  dx: 0,
                  dy: 0
                };
                (1 & o) > 0 ? (2 & o) > 0 ? (n.dx = s.parseShort(), n.dy = s.parseShort()) : n.matchedPoints = [s.parseUShort(), s.parseUShort()] : (2 & o) > 0 ? (n.dx = s.parseChar(), n.dy = s.parseChar()) : n.matchedPoints = [s.parseByte(), s.parseByte()], (8 & o) > 0 ? n.xScale = n.yScale = s.parseF2Dot14() : (64 & o) > 0 ? (n.xScale = s.parseF2Dot14(), n.yScale = s.parseF2Dot14()) : (128 & o) > 0 && (n.xScale = s.parseF2Dot14(), n.scale01 = s.parseF2Dot14(), n.scale10 = s.parseF2Dot14(), n.yScale = s.parseF2Dot14()), e.components.push(n), t = !!(32 & o);
              }
              if (256 & o) {
                e.instructionLength = s.parseUShort(), e.instructions = [];
                for (let t = 0; t < e.instructionLength; t += 1) e.instructions.push(s.parseByte());
              }
            }
          }
          function se(e, t) {
            const n = [];
            for (let s = 0; s < e.length; s += 1) {
              const o = e[s],
                r = {
                  x: t.xScale * o.x + t.scale01 * o.y + t.dx,
                  y: t.scale10 * o.x + t.yScale * o.y + t.dy,
                  onCurve: o.onCurve,
                  lastPointOfContour: o.lastPointOfContour
                };
              n.push(r);
            }
            return n;
          }
          function oe(e) {
            const t = new u();
            if (!e) return t;
            const n = function (e) {
              const t = [];
              let n = [];
              for (let s = 0; s < e.length; s += 1) {
                const o = e[s];
                n.push(o), o.lastPointOfContour && (t.push(n), n = []);
              }
              return f.argument(0 === n.length, "There are still points left in the current contour."), t;
            }(e);
            for (let e = 0; e < n.length; ++e) {
              const s = n[e];
              let o = null,
                r = s[s.length - 1],
                a = s[0];
              if (r.onCurve) t.moveTo(r.x, r.y);else if (a.onCurve) t.moveTo(a.x, a.y);else {
                const e = {
                  x: .5 * (r.x + a.x),
                  y: .5 * (r.y + a.y)
                };
                t.moveTo(e.x, e.y);
              }
              for (let e = 0; e < s.length; ++e) if (o = r, r = a, a = s[(e + 1) % s.length], r.onCurve) t.lineTo(r.x, r.y);else {
                let e = o,
                  n = a;
                o.onCurve || (e = {
                  x: .5 * (r.x + o.x),
                  y: .5 * (r.y + o.y)
                }, t.lineTo(e.x, e.y)), a.onCurve || (n = {
                  x: .5 * (r.x + a.x),
                  y: .5 * (r.y + a.y)
                }), t.lineTo(e.x, e.y), t.quadraticCurveTo(r.x, r.y, n.x, n.y);
              }
              t.closePath();
            }
            return t;
          }
          function re(e, t) {
            if (t.isComposite) for (let n = 0; n < t.components.length; n += 1) {
              const s = t.components[n],
                o = e.get(s.glyphIndex);
              if (o.getPath(), o.points) {
                let e;
                if (void 0 === s.matchedPoints) e = se(o.points, s);else {
                  if (s.matchedPoints[0] > t.points.length - 1 || s.matchedPoints[1] > o.points.length - 1) throw Error("Matched points out of range in " + t.name);
                  const n = t.points[s.matchedPoints[0]];
                  let r = o.points[s.matchedPoints[1]];
                  const a = {
                    xScale: s.xScale,
                    scale01: s.scale01,
                    scale10: s.scale10,
                    yScale: s.yScale,
                    dx: 0,
                    dy: 0
                  };
                  r = se([r], a)[0], a.dx = n.x - r.x, a.dy = n.y - r.y, e = se(o.points, a);
                }
                t.points = t.points.concat(e);
              }
            }
            return oe(t.points);
          }
          const ae = {
            getPath: oe,
            parse: function (e, t, n, s) {
              const o = new pe.GlyphSet(s);
              for (let r = 0; r < n.length - 1; r += 1) {
                const a = n[r];
                a !== n[r + 1] ? o.push(r, pe.ttfGlyphLoader(s, r, ne, e, t + a, re)) : o.push(r, pe.glyphLoader(s, r));
              }
              return o;
            }
          };
          function ie(e) {
            this.bindConstructorValues(e);
          }
          ie.prototype.bindConstructorValues = function (e) {
            this.index = e.index || 0, this.name = e.name || null, this.unicode = e.unicode || void 0, this.unicodes = e.unicodes || void 0 !== e.unicode ? [e.unicode] : [], e.xMin && (this.xMin = e.xMin), e.yMin && (this.yMin = e.yMin), e.xMax && (this.xMax = e.xMax), e.yMax && (this.yMax = e.yMax), e.advanceWidth && (this.advanceWidth = e.advanceWidth), Object.defineProperty(this, "path", function (e, t) {
              let n = t || new u();
              return {
                configurable: !0,
                get: function () {
                  return "function" == typeof n && (n = n()), n;
                },
                set: function (e) {
                  n = e;
                }
              };
            }(0, e.path));
          }, ie.prototype.addUnicode = function (e) {
            0 === this.unicodes.length && (this.unicode = e), this.unicodes.push(e);
          }, ie.prototype.getBoundingBox = function () {
            return this.path.getBoundingBox();
          }, ie.prototype.getPath = function (e, t, n, s, o) {
            let r, a;
            e = void 0 !== e ? e : 0, t = void 0 !== t ? t : 0, n = void 0 !== n ? n : 72, s || (s = {});
            let i = s.xScale,
              l = s.yScale;
            if (s.hinting && o && o.hinting && (a = this.path && o.hinting.exec(this, n)), a) r = ae.getPath(a).commands, e = Math.round(e), t = Math.round(t), i = l = 1;else {
              r = this.path.commands;
              const e = 1 / this.path.unitsPerEm * n;
              void 0 === i && (i = e), void 0 === l && (l = e);
            }
            const c = new u();
            for (let n = 0; n < r.length; n += 1) {
              const s = r[n];
              "M" === s.type ? c.moveTo(e + s.x * i, t + -s.y * l) : "L" === s.type ? c.lineTo(e + s.x * i, t + -s.y * l) : "Q" === s.type ? c.quadraticCurveTo(e + s.x1 * i, t + -s.y1 * l, e + s.x * i, t + -s.y * l) : "C" === s.type ? c.curveTo(e + s.x1 * i, t + -s.y1 * l, e + s.x2 * i, t + -s.y2 * l, e + s.x * i, t + -s.y * l) : "Z" === s.type && c.closePath();
            }
            return c;
          }, ie.prototype.getContours = function () {
            if (void 0 === this.points) return [];
            const e = [];
            let t = [];
            for (let n = 0; n < this.points.length; n += 1) {
              const s = this.points[n];
              t.push(s), s.lastPointOfContour && (e.push(t), t = []);
            }
            return f.argument(0 === t.length, "There are still points left in the current contour."), e;
          }, ie.prototype.getMetrics = function () {
            const e = this.path.commands,
              t = [],
              n = [];
            for (let s = 0; s < e.length; s += 1) {
              const o = e[s];
              "Z" !== o.type && (t.push(o.x), n.push(o.y)), "Q" !== o.type && "C" !== o.type || (t.push(o.x1), n.push(o.y1)), "C" === o.type && (t.push(o.x2), n.push(o.y2));
            }
            const s = {
              xMin: Math.min.apply(null, t),
              yMin: Math.min.apply(null, n),
              xMax: Math.max.apply(null, t),
              yMax: Math.max.apply(null, n),
              leftSideBearing: this.leftSideBearing
            };
            return isFinite(s.xMin) || (s.xMin = 0), isFinite(s.xMax) || (s.xMax = this.advanceWidth), isFinite(s.yMin) || (s.yMin = 0), isFinite(s.yMax) || (s.yMax = 0), s.rightSideBearing = this.advanceWidth - s.leftSideBearing - (s.xMax - s.xMin), s;
          }, ie.prototype.draw = function (e, t, n, s, o) {
            this.getPath(t, n, s, o).draw(e);
          }, ie.prototype.drawPoints = function (e, t, n, s) {
            function o(t, n, s, o) {
              const r = 2 * Math.PI;
              e.beginPath();
              for (let a = 0; a < t.length; a += 1) e.moveTo(n + t[a].x * o, s + t[a].y * o), e.arc(n + t[a].x * o, s + t[a].y * o, 2, 0, r, !1);
              e.closePath(), e.fill();
            }
            t = void 0 !== t ? t : 0, n = void 0 !== n ? n : 0, s = void 0 !== s ? s : 24;
            const r = 1 / this.path.unitsPerEm * s,
              a = [],
              i = [],
              l = this.path;
            for (let e = 0; e < l.commands.length; e += 1) {
              const t = l.commands[e];
              void 0 !== t.x && a.push({
                x: t.x,
                y: -t.y
              }), void 0 !== t.x1 && i.push({
                x: t.x1,
                y: -t.y1
              }), void 0 !== t.x2 && i.push({
                x: t.x2,
                y: -t.y2
              });
            }
            e.fillStyle = "blue", o(a, t, n, r), e.fillStyle = "red", o(i, t, n, r);
          }, ie.prototype.drawMetrics = function (e, t, n, s) {
            let o;
            t = void 0 !== t ? t : 0, n = void 0 !== n ? n : 0, s = void 0 !== s ? s : 24, o = 1 / this.path.unitsPerEm * s, e.lineWidth = 1, e.strokeStyle = "black", ee(e, t, -1e4, t, 1e4), ee(e, -1e4, n, 1e4, n);
            const r = this.xMin || 0;
            let a = this.yMin || 0;
            const i = this.xMax || 0;
            let l = this.yMax || 0;
            const u = this.advanceWidth || 0;
            e.strokeStyle = "blue", ee(e, t + r * o, -1e4, t + r * o, 1e4), ee(e, t + i * o, -1e4, t + i * o, 1e4), ee(e, -1e4, n + -a * o, 1e4, n + -a * o), ee(e, -1e4, n + -l * o, 1e4, n + -l * o), e.strokeStyle = "green", ee(e, t + u * o, -1e4, t + u * o, 1e4);
          };
          const le = ie;
          function ue(e, t, n) {
            Object.defineProperty(e, t, {
              get: function () {
                return e.path, e[n];
              },
              set: function (t) {
                e[n] = t;
              },
              enumerable: !0,
              configurable: !0
            });
          }
          function ce(e, t) {
            if (this.font = e, this.glyphs = {}, Array.isArray(t)) for (let e = 0; e < t.length; e++) this.glyphs[e] = t[e];
            this.length = t && t.length || 0;
          }
          ce.prototype.get = function (e) {
            return "function" == typeof this.glyphs[e] && (this.glyphs[e] = this.glyphs[e]()), this.glyphs[e];
          }, ce.prototype.push = function (e, t) {
            this.glyphs[e] = t, this.length++;
          };
          const pe = {
            GlyphSet: ce,
            glyphLoader: function (e, t) {
              return new le({
                index: t,
                font: e
              });
            },
            ttfGlyphLoader: function (e, t, n, s, o, r) {
              return function () {
                const a = new le({
                  index: t,
                  font: e
                });
                return a.path = function () {
                  n(a, s, o);
                  const t = r(e.glyphs, a);
                  return t.unitsPerEm = e.unitsPerEm, t;
                }, ue(a, "xMin", "_xMin"), ue(a, "xMax", "_xMax"), ue(a, "yMin", "_yMin"), ue(a, "yMax", "_yMax"), a;
              };
            },
            cffGlyphLoader: function (e, t, n, s) {
              return function () {
                const o = new le({
                  index: t,
                  font: e
                });
                return o.path = function () {
                  const t = n(e, o, s);
                  return t.unitsPerEm = e.unitsPerEm, t;
                }, o;
              };
            }
          };
          function fe(e, t) {
            if (e === t) return !0;
            if (Array.isArray(e) && Array.isArray(t)) {
              if (e.length !== t.length) return !1;
              for (let n = 0; n < e.length; n += 1) if (!fe(e[n], t[n])) return !1;
              return !0;
            }
            return !1;
          }
          function he(e) {
            let t;
            return t = e.length < 1240 ? 107 : e.length < 33900 ? 1131 : 32768, t;
          }
          function de(e, t, n) {
            const s = [],
              o = [],
              r = z.getCard16(e, t);
            let a, i;
            if (0 !== r) {
              const n = z.getByte(e, t + 2);
              a = t + (r + 1) * n + 2;
              let o = t + 3;
              for (let t = 0; t < r + 1; t += 1) s.push(z.getOffset(e, o, n)), o += n;
              i = a + s[r];
            } else i = t + 2;
            for (let t = 0; t < s.length - 1; t += 1) {
              let r = z.getBytes(e, a + s[t], a + s[t + 1]);
              n && (r = n(r)), o.push(r);
            }
            return {
              objects: o,
              startOffset: t,
              endOffset: i
            };
          }
          function ge(e, t) {
            let n, s, o, r;
            if (28 === t) return n = e.parseByte(), s = e.parseByte(), n << 8 | s;
            if (29 === t) return n = e.parseByte(), s = e.parseByte(), o = e.parseByte(), r = e.parseByte(), n << 24 | s << 16 | o << 8 | r;
            if (30 === t) return function (e) {
              let t = "";
              const n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"];
              for (;;) {
                const s = e.parseByte(),
                  o = s >> 4,
                  r = 15 & s;
                if (15 === o) break;
                if (t += n[o], 15 === r) break;
                t += n[r];
              }
              return parseFloat(t);
            }(e);
            if (t >= 32 && t <= 246) return t - 139;
            if (t >= 247 && t <= 250) return n = e.parseByte(), 256 * (t - 247) + n + 108;
            if (t >= 251 && t <= 254) return n = e.parseByte(), 256 * -(t - 251) - n - 108;
            throw new Error("Invalid b0 " + t);
          }
          function me(e, t, n) {
            t = void 0 !== t ? t : 0;
            const s = new z.Parser(e, t),
              o = [];
            let r = [];
            for (n = void 0 !== n ? n : e.length; s.relativeOffset < n;) {
              let e = s.parseByte();
              e <= 21 ? (12 === e && (e = 1200 + s.parseByte()), o.push([e, r]), r = []) : r.push(ge(s, e));
            }
            return function (e) {
              const t = {};
              for (let n = 0; n < e.length; n += 1) {
                const s = e[n][0],
                  o = e[n][1];
                let r;
                if (r = 1 === o.length ? o[0] : o, t.hasOwnProperty(s) && !isNaN(t[s])) throw new Error("Object " + t + " already has key " + s);
                t[s] = r;
              }
              return t;
            }(o);
          }
          function ye(e, t) {
            return t <= 390 ? X[t] : e[t - 391];
          }
          function ve(e, t, n) {
            const s = {};
            let o;
            for (let r = 0; r < t.length; r += 1) {
              const a = t[r];
              if (Array.isArray(a.type)) {
                const t = [];
                t.length = a.type.length;
                for (let s = 0; s < a.type.length; s++) o = void 0 !== e[a.op] ? e[a.op][s] : void 0, void 0 === o && (o = void 0 !== a.value && void 0 !== a.value[s] ? a.value[s] : null), "SID" === a.type[s] && (o = ye(n, o)), t[s] = o;
                s[a.name] = t;
              } else o = e[a.op], void 0 === o && (o = void 0 !== a.value ? a.value : null), "SID" === a.type && (o = ye(n, o)), s[a.name] = o;
            }
            return s;
          }
          const be = [{
              name: "version",
              op: 0,
              type: "SID"
            }, {
              name: "notice",
              op: 1,
              type: "SID"
            }, {
              name: "copyright",
              op: 1200,
              type: "SID"
            }, {
              name: "fullName",
              op: 2,
              type: "SID"
            }, {
              name: "familyName",
              op: 3,
              type: "SID"
            }, {
              name: "weight",
              op: 4,
              type: "SID"
            }, {
              name: "isFixedPitch",
              op: 1201,
              type: "number",
              value: 0
            }, {
              name: "italicAngle",
              op: 1202,
              type: "number",
              value: 0
            }, {
              name: "underlinePosition",
              op: 1203,
              type: "number",
              value: -100
            }, {
              name: "underlineThickness",
              op: 1204,
              type: "number",
              value: 50
            }, {
              name: "paintType",
              op: 1205,
              type: "number",
              value: 0
            }, {
              name: "charstringType",
              op: 1206,
              type: "number",
              value: 2
            }, {
              name: "fontMatrix",
              op: 1207,
              type: ["real", "real", "real", "real", "real", "real"],
              value: [.001, 0, 0, .001, 0, 0]
            }, {
              name: "uniqueId",
              op: 13,
              type: "number"
            }, {
              name: "fontBBox",
              op: 5,
              type: ["number", "number", "number", "number"],
              value: [0, 0, 0, 0]
            }, {
              name: "strokeWidth",
              op: 1208,
              type: "number",
              value: 0
            }, {
              name: "xuid",
              op: 14,
              type: [],
              value: null
            }, {
              name: "charset",
              op: 15,
              type: "offset",
              value: 0
            }, {
              name: "encoding",
              op: 16,
              type: "offset",
              value: 0
            }, {
              name: "charStrings",
              op: 17,
              type: "offset",
              value: 0
            }, {
              name: "private",
              op: 18,
              type: ["number", "offset"],
              value: [0, 0]
            }, {
              name: "ros",
              op: 1230,
              type: ["SID", "SID", "number"]
            }, {
              name: "cidFontVersion",
              op: 1231,
              type: "number",
              value: 0
            }, {
              name: "cidFontRevision",
              op: 1232,
              type: "number",
              value: 0
            }, {
              name: "cidFontType",
              op: 1233,
              type: "number",
              value: 0
            }, {
              name: "cidCount",
              op: 1234,
              type: "number",
              value: 8720
            }, {
              name: "uidBase",
              op: 1235,
              type: "number"
            }, {
              name: "fdArray",
              op: 1236,
              type: "offset"
            }, {
              name: "fdSelect",
              op: 1237,
              type: "offset"
            }, {
              name: "fontName",
              op: 1238,
              type: "SID"
            }],
            xe = [{
              name: "subrs",
              op: 19,
              type: "offset",
              value: 0
            }, {
              name: "defaultWidthX",
              op: 20,
              type: "number",
              value: 0
            }, {
              name: "nominalWidthX",
              op: 21,
              type: "number",
              value: 0
            }];
          function Se(e, t) {
            return ve(me(e, 0, e.byteLength), be, t);
          }
          function Ue(e, t, n, s) {
            return ve(me(e, t, n), xe, s);
          }
          function Te(e, t, n, s) {
            const o = [];
            for (let r = 0; r < n.length; r += 1) {
              const a = Se(new DataView(new Uint8Array(n[r]).buffer), s);
              a._subrs = [], a._subrsBias = 0;
              const i = a.private[0],
                l = a.private[1];
              if (0 !== i && 0 !== l) {
                const n = Ue(e, l + t, i, s);
                if (a._defaultWidthX = n.defaultWidthX, a._nominalWidthX = n.nominalWidthX, 0 !== n.subrs) {
                  const s = de(e, l + n.subrs + t);
                  a._subrs = s.objects, a._subrsBias = he(a._subrs);
                }
                a._privateDict = n;
              }
              o.push(a);
            }
            return o;
          }
          function Ee(e, t, n) {
            let s, o, r, a;
            const i = new u(),
              l = [];
            let c,
              p,
              f,
              h,
              d = 0,
              g = !1,
              m = !1,
              y = 0,
              v = 0;
            if (e.isCIDFont) {
              const n = e.tables.cff.topDict._fdSelect[t.index],
                s = e.tables.cff.topDict._fdArray[n];
              c = s._subrs, p = s._subrsBias, f = s._defaultWidthX, h = s._nominalWidthX;
            } else c = e.tables.cff.topDict._subrs, p = e.tables.cff.topDict._subrsBias, f = e.tables.cff.topDict._defaultWidthX, h = e.tables.cff.topDict._nominalWidthX;
            let b = f;
            function x(e, t) {
              m && i.closePath(), i.moveTo(e, t), m = !0;
            }
            function S() {
              let e;
              e = l.length % 2 != 0, e && !g && (b = l.shift() + h), d += l.length >> 1, l.length = 0, g = !0;
            }
            return function n(u) {
              let f,
                U,
                T,
                E,
                k,
                w,
                O,
                I,
                R,
                L,
                B,
                C,
                D = 0;
              for (; D < u.length;) {
                let M = u[D];
                switch (D += 1, M) {
                  case 1:
                  case 3:
                  case 18:
                  case 23:
                    S();
                    break;
                  case 4:
                    l.length > 1 && !g && (b = l.shift() + h, g = !0), v += l.pop(), x(y, v);
                    break;
                  case 5:
                    for (; l.length > 0;) y += l.shift(), v += l.shift(), i.lineTo(y, v);
                    break;
                  case 6:
                    for (; l.length > 0 && (y += l.shift(), i.lineTo(y, v), 0 !== l.length);) v += l.shift(), i.lineTo(y, v);
                    break;
                  case 7:
                    for (; l.length > 0 && (v += l.shift(), i.lineTo(y, v), 0 !== l.length);) y += l.shift(), i.lineTo(y, v);
                    break;
                  case 8:
                    for (; l.length > 0;) s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + l.shift(), i.curveTo(s, o, r, a, y, v);
                    break;
                  case 10:
                    k = l.pop() + p, w = c[k], w && n(w);
                    break;
                  case 11:
                    return;
                  case 12:
                    switch (M = u[D], D += 1, M) {
                      case 35:
                        s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), O = r + l.shift(), I = a + l.shift(), R = O + l.shift(), L = I + l.shift(), B = R + l.shift(), C = L + l.shift(), y = B + l.shift(), v = C + l.shift(), l.shift(), i.curveTo(s, o, r, a, O, I), i.curveTo(R, L, B, C, y, v);
                        break;
                      case 34:
                        s = y + l.shift(), o = v, r = s + l.shift(), a = o + l.shift(), O = r + l.shift(), I = a, R = O + l.shift(), L = a, B = R + l.shift(), C = v, y = B + l.shift(), i.curveTo(s, o, r, a, O, I), i.curveTo(R, L, B, C, y, v);
                        break;
                      case 36:
                        s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), O = r + l.shift(), I = a, R = O + l.shift(), L = a, B = R + l.shift(), C = L + l.shift(), y = B + l.shift(), i.curveTo(s, o, r, a, O, I), i.curveTo(R, L, B, C, y, v);
                        break;
                      case 37:
                        s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), O = r + l.shift(), I = a + l.shift(), R = O + l.shift(), L = I + l.shift(), B = R + l.shift(), C = L + l.shift(), Math.abs(B - y) > Math.abs(C - v) ? y = B + l.shift() : v = C + l.shift(), i.curveTo(s, o, r, a, O, I), i.curveTo(R, L, B, C, y, v);
                        break;
                      default:
                        console.log("Glyph " + t.index + ": unknown operator 1200" + M), l.length = 0;
                    }
                    break;
                  case 14:
                    l.length > 0 && !g && (b = l.shift() + h, g = !0), m && (i.closePath(), m = !1);
                    break;
                  case 19:
                  case 20:
                    S(), D += d + 7 >> 3;
                    break;
                  case 21:
                    l.length > 2 && !g && (b = l.shift() + h, g = !0), v += l.pop(), y += l.pop(), x(y, v);
                    break;
                  case 22:
                    l.length > 1 && !g && (b = l.shift() + h, g = !0), y += l.pop(), x(y, v);
                    break;
                  case 24:
                    for (; l.length > 2;) s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + l.shift(), i.curveTo(s, o, r, a, y, v);
                    y += l.shift(), v += l.shift(), i.lineTo(y, v);
                    break;
                  case 25:
                    for (; l.length > 6;) y += l.shift(), v += l.shift(), i.lineTo(y, v);
                    s = y + l.shift(), o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + l.shift(), i.curveTo(s, o, r, a, y, v);
                    break;
                  case 26:
                    for (l.length % 2 && (y += l.shift()); l.length > 0;) s = y, o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r, v = a + l.shift(), i.curveTo(s, o, r, a, y, v);
                    break;
                  case 27:
                    for (l.length % 2 && (v += l.shift()); l.length > 0;) s = y + l.shift(), o = v, r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a, i.curveTo(s, o, r, a, y, v);
                    break;
                  case 28:
                    f = u[D], U = u[D + 1], l.push((f << 24 | U << 16) >> 16), D += 2;
                    break;
                  case 29:
                    k = l.pop() + e.gsubrsBias, w = e.gsubrs[k], w && n(w);
                    break;
                  case 30:
                    for (; l.length > 0 && (s = y, o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + (1 === l.length ? l.shift() : 0), i.curveTo(s, o, r, a, y, v), 0 !== l.length);) s = y + l.shift(), o = v, r = s + l.shift(), a = o + l.shift(), v = a + l.shift(), y = r + (1 === l.length ? l.shift() : 0), i.curveTo(s, o, r, a, y, v);
                    break;
                  case 31:
                    for (; l.length > 0 && (s = y + l.shift(), o = v, r = s + l.shift(), a = o + l.shift(), v = a + l.shift(), y = r + (1 === l.length ? l.shift() : 0), i.curveTo(s, o, r, a, y, v), 0 !== l.length);) s = y, o = v + l.shift(), r = s + l.shift(), a = o + l.shift(), y = r + l.shift(), v = a + (1 === l.length ? l.shift() : 0), i.curveTo(s, o, r, a, y, v);
                    break;
                  default:
                    M < 32 ? console.log("Glyph " + t.index + ": unknown operator " + M) : M < 247 ? l.push(M - 139) : M < 251 ? (f = u[D], D += 1, l.push(256 * (M - 247) + f + 108)) : M < 255 ? (f = u[D], D += 1, l.push(256 * -(M - 251) - f - 108)) : (f = u[D], U = u[D + 1], T = u[D + 2], E = u[D + 3], D += 4, l.push((f << 24 | U << 16 | T << 8 | E) / 65536));
                }
              }
            }(n), t.advanceWidth = b, i;
          }
          function ke(e, t) {
            let n,
              s = X.indexOf(e);
            return s >= 0 && (n = s), s = t.indexOf(e), s >= 0 ? n = s + X.length : (n = X.length + t.length, t.push(e)), n;
          }
          function we(e, t, n) {
            const s = {};
            for (let o = 0; o < e.length; o += 1) {
              const r = e[o];
              let a = t[r.name];
              void 0 === a || fe(a, r.value) || ("SID" === r.type && (a = ke(a, n)), s[r.op] = {
                name: r.name,
                type: r.type,
                value: a
              });
            }
            return s;
          }
          function Oe(e, t) {
            const n = new M.Record("Top DICT", [{
              name: "dict",
              type: "DICT",
              value: {}
            }]);
            return n.dict = we(be, e, t), n;
          }
          function Ie(e) {
            const t = new M.Record("Top DICT INDEX", [{
              name: "topDicts",
              type: "INDEX",
              value: []
            }]);
            return t.topDicts = [{
              name: "topDict_0",
              type: "TABLE",
              value: e
            }], t;
          }
          function Re(e) {
            const t = [],
              n = e.path;
            t.push({
              name: "width",
              type: "NUMBER",
              value: e.advanceWidth
            });
            let s = 0,
              o = 0;
            for (let e = 0; e < n.commands.length; e += 1) {
              let r,
                a,
                i = n.commands[e];
              if ("Q" === i.type) {
                const e = 1 / 3,
                  t = 2 / 3;
                i = {
                  type: "C",
                  x: i.x,
                  y: i.y,
                  x1: e * s + t * i.x1,
                  y1: e * o + t * i.y1,
                  x2: e * i.x + t * i.x1,
                  y2: e * i.y + t * i.y1
                };
              }
              if ("M" === i.type) r = Math.round(i.x - s), a = Math.round(i.y - o), t.push({
                name: "dx",
                type: "NUMBER",
                value: r
              }), t.push({
                name: "dy",
                type: "NUMBER",
                value: a
              }), t.push({
                name: "rmoveto",
                type: "OP",
                value: 21
              }), s = Math.round(i.x), o = Math.round(i.y);else if ("L" === i.type) r = Math.round(i.x - s), a = Math.round(i.y - o), t.push({
                name: "dx",
                type: "NUMBER",
                value: r
              }), t.push({
                name: "dy",
                type: "NUMBER",
                value: a
              }), t.push({
                name: "rlineto",
                type: "OP",
                value: 5
              }), s = Math.round(i.x), o = Math.round(i.y);else if ("C" === i.type) {
                const e = Math.round(i.x1 - s),
                  n = Math.round(i.y1 - o),
                  l = Math.round(i.x2 - i.x1),
                  u = Math.round(i.y2 - i.y1);
                r = Math.round(i.x - i.x2), a = Math.round(i.y - i.y2), t.push({
                  name: "dx1",
                  type: "NUMBER",
                  value: e
                }), t.push({
                  name: "dy1",
                  type: "NUMBER",
                  value: n
                }), t.push({
                  name: "dx2",
                  type: "NUMBER",
                  value: l
                }), t.push({
                  name: "dy2",
                  type: "NUMBER",
                  value: u
                }), t.push({
                  name: "dx",
                  type: "NUMBER",
                  value: r
                }), t.push({
                  name: "dy",
                  type: "NUMBER",
                  value: a
                }), t.push({
                  name: "rrcurveto",
                  type: "OP",
                  value: 8
                }), s = Math.round(i.x), o = Math.round(i.y);
              }
            }
            return t.push({
              name: "endchar",
              type: "OP",
              value: 14
            }), t;
          }
          const Le = function (e, t, n) {
              n.tables.cff = {};
              const s = function (e, t) {
                  const n = {};
                  return n.formatMajor = z.getCard8(e, t), n.formatMinor = z.getCard8(e, t + 1), n.size = z.getCard8(e, t + 2), n.offsetSize = z.getCard8(e, t + 3), n.startOffset = t, n.endOffset = t + 4, n;
                }(e, t),
                o = de(e, s.endOffset, z.bytesToString),
                r = de(e, o.endOffset),
                a = de(e, r.endOffset, z.bytesToString),
                i = de(e, a.endOffset);
              n.gsubrs = i.objects, n.gsubrsBias = he(n.gsubrs);
              const l = Te(e, t, r.objects, a.objects);
              if (1 !== l.length) throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = " + l.length);
              const u = l[0];
              if (n.tables.cff.topDict = u, u._privateDict && (n.defaultWidthX = u._privateDict.defaultWidthX, n.nominalWidthX = u._privateDict.nominalWidthX), void 0 !== u.ros[0] && void 0 !== u.ros[1] && (n.isCIDFont = !0), n.isCIDFont) {
                let s = u.fdArray,
                  o = u.fdSelect;
                if (0 === s || 0 === o) throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
                s += t;
                const r = Te(e, t, de(e, s).objects, a.objects);
                u._fdArray = r, o += t, u._fdSelect = function (e, t, n, s) {
                  const o = [];
                  let r;
                  const a = new z.Parser(e, t),
                    i = a.parseCard8();
                  if (0 === i) for (let e = 0; e < n; e++) {
                    if (r = a.parseCard8(), r >= s) throw new Error("CFF table CID Font FDSelect has bad FD index value " + r + " (FD count " + s + ")");
                    o.push(r);
                  } else {
                    if (3 !== i) throw new Error("CFF Table CID Font FDSelect table has unsupported format " + i);
                    {
                      const e = a.parseCard16();
                      let t,
                        i = a.parseCard16();
                      if (0 !== i) throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID " + i);
                      for (let l = 0; l < e; l++) {
                        if (r = a.parseCard8(), t = a.parseCard16(), r >= s) throw new Error("CFF table CID Font FDSelect has bad FD index value " + r + " (FD count " + s + ")");
                        if (t > n) throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID " + t);
                        for (; i < t; i++) o.push(r);
                        i = t;
                      }
                      if (t !== n) throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID " + t);
                    }
                  }
                  return o;
                }(e, o, n.numGlyphs, r.length);
              }
              const c = t + u.private[1],
                p = Ue(e, c, u.private[0], a.objects);
              if (n.defaultWidthX = p.defaultWidthX, n.nominalWidthX = p.nominalWidthX, 0 !== p.subrs) {
                const t = de(e, c + p.subrs);
                n.subrs = t.objects, n.subrsBias = he(n.subrs);
              } else n.subrs = [], n.subrsBias = 0;
              const f = de(e, t + u.charStrings);
              n.nGlyphs = f.objects.length;
              const h = function (e, t, n, s) {
                let o, r;
                const a = new z.Parser(e, t);
                n -= 1;
                const i = [".notdef"],
                  l = a.parseCard8();
                if (0 === l) for (let e = 0; e < n; e += 1) o = a.parseSID(), i.push(ye(s, o));else if (1 === l) for (; i.length <= n;) {
                  o = a.parseSID(), r = a.parseCard8();
                  for (let e = 0; e <= r; e += 1) i.push(ye(s, o)), o += 1;
                } else {
                  if (2 !== l) throw new Error("Unknown charset format " + l);
                  for (; i.length <= n;) {
                    o = a.parseSID(), r = a.parseCard16();
                    for (let e = 0; e <= r; e += 1) i.push(ye(s, o)), o += 1;
                  }
                }
                return i;
              }(e, t + u.charset, n.nGlyphs, a.objects);
              0 === u.encoding ? n.cffEncoding = new K(Y, h) : 1 === u.encoding ? n.cffEncoding = new K(V, h) : n.cffEncoding = function (e, t, n) {
                let s;
                const o = {},
                  r = new z.Parser(e, t),
                  a = r.parseCard8();
                if (0 === a) {
                  const e = r.parseCard8();
                  for (let t = 0; t < e; t += 1) s = r.parseCard8(), o[s] = t;
                } else {
                  if (1 !== a) throw new Error("Unknown encoding format " + a);
                  {
                    const e = r.parseCard8();
                    s = 1;
                    for (let t = 0; t < e; t += 1) {
                      const e = r.parseCard8(),
                        t = r.parseCard8();
                      for (let n = e; n <= e + t; n += 1) o[n] = s, s += 1;
                    }
                  }
                }
                return new K(o, n);
              }(e, t + u.encoding, h), n.encoding = n.encoding || n.cffEncoding, n.glyphs = new pe.GlyphSet(n);
              for (let e = 0; e < n.nGlyphs; e += 1) {
                const t = f.objects[e];
                n.glyphs.push(e, pe.cffGlyphLoader(n, e, Ee, t));
              }
            },
            Be = function (e, t) {
              const n = new M.Table("CFF ", [{
                  name: "header",
                  type: "RECORD"
                }, {
                  name: "nameIndex",
                  type: "RECORD"
                }, {
                  name: "topDictIndex",
                  type: "RECORD"
                }, {
                  name: "stringIndex",
                  type: "RECORD"
                }, {
                  name: "globalSubrIndex",
                  type: "RECORD"
                }, {
                  name: "charsets",
                  type: "RECORD"
                }, {
                  name: "charStringsIndex",
                  type: "RECORD"
                }, {
                  name: "privateDict",
                  type: "RECORD"
                }]),
                s = 1 / t.unitsPerEm,
                o = {
                  version: t.version,
                  fullName: t.fullName,
                  familyName: t.familyName,
                  weight: t.weightName,
                  fontBBox: t.fontBBox || [0, 0, 0, 0],
                  fontMatrix: [s, 0, 0, s, 0, 0],
                  charset: 999,
                  encoding: 0,
                  charStrings: 999,
                  private: [0, 999]
                },
                r = [];
              let a;
              for (let t = 1; t < e.length; t += 1) a = e.get(t), r.push(a.name);
              const i = [];
              n.header = new M.Record("Header", [{
                name: "major",
                type: "Card8",
                value: 1
              }, {
                name: "minor",
                type: "Card8",
                value: 0
              }, {
                name: "hdrSize",
                type: "Card8",
                value: 4
              }, {
                name: "major",
                type: "Card8",
                value: 1
              }]), n.nameIndex = function (e) {
                const t = new M.Record("Name INDEX", [{
                  name: "names",
                  type: "INDEX",
                  value: []
                }]);
                t.names = [];
                for (let n = 0; n < e.length; n += 1) t.names.push({
                  name: "name_" + n,
                  type: "NAME",
                  value: e[n]
                });
                return t;
              }([t.postScriptName]);
              let l = Oe(o, i);
              n.topDictIndex = Ie(l), n.globalSubrIndex = new M.Record("Global Subr INDEX", [{
                name: "subrs",
                type: "INDEX",
                value: []
              }]), n.charsets = function (e, t) {
                const n = new M.Record("Charsets", [{
                  name: "format",
                  type: "Card8",
                  value: 0
                }]);
                for (let s = 0; s < e.length; s += 1) {
                  const o = ke(e[s], t);
                  n.fields.push({
                    name: "glyph_" + s,
                    type: "SID",
                    value: o
                  });
                }
                return n;
              }(r, i), n.charStringsIndex = function (e) {
                const t = new M.Record("CharStrings INDEX", [{
                  name: "charStrings",
                  type: "INDEX",
                  value: []
                }]);
                for (let n = 0; n < e.length; n += 1) {
                  const s = e.get(n),
                    o = Re(s);
                  t.charStrings.push({
                    name: s.name,
                    type: "CHARSTRING",
                    value: o
                  });
                }
                return t;
              }(e), n.privateDict = function (e, t) {
                const n = new M.Record("Private DICT", [{
                  name: "dict",
                  type: "DICT",
                  value: {}
                }]);
                return n.dict = we(xe, {}, t), n;
              }(0, i), n.stringIndex = function (e) {
                const t = new M.Record("String INDEX", [{
                  name: "strings",
                  type: "INDEX",
                  value: []
                }]);
                t.strings = [];
                for (let n = 0; n < e.length; n += 1) t.strings.push({
                  name: "string_" + n,
                  type: "STRING",
                  value: e[n]
                });
                return t;
              }(i);
              const u = n.header.sizeOf() + n.nameIndex.sizeOf() + n.topDictIndex.sizeOf() + n.stringIndex.sizeOf() + n.globalSubrIndex.sizeOf();
              return o.charset = u, o.encoding = 0, o.charStrings = o.charset + n.charsets.sizeOf(), o.private[1] = o.charStrings + n.charStringsIndex.sizeOf(), l = Oe(o, i), n.topDictIndex = Ie(l), n;
            },
            Ce = function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              return n.version = s.parseVersion(), n.fontRevision = Math.round(1e3 * s.parseFixed()) / 1e3, n.checkSumAdjustment = s.parseULong(), n.magicNumber = s.parseULong(), f.argument(1594834165 === n.magicNumber, "Font header has wrong magic number."), n.flags = s.parseUShort(), n.unitsPerEm = s.parseUShort(), n.created = s.parseLongDateTime(), n.modified = s.parseLongDateTime(), n.xMin = s.parseShort(), n.yMin = s.parseShort(), n.xMax = s.parseShort(), n.yMax = s.parseShort(), n.macStyle = s.parseUShort(), n.lowestRecPPEM = s.parseUShort(), n.fontDirectionHint = s.parseShort(), n.indexToLocFormat = s.parseShort(), n.glyphDataFormat = s.parseShort(), n;
            },
            De = function (e) {
              const t = Math.round(new Date().getTime() / 1e3) + 2082844800;
              let n = t;
              return e.createdTimestamp && (n = e.createdTimestamp + 2082844800), new M.Table("head", [{
                name: "version",
                type: "FIXED",
                value: 65536
              }, {
                name: "fontRevision",
                type: "FIXED",
                value: 65536
              }, {
                name: "checkSumAdjustment",
                type: "ULONG",
                value: 0
              }, {
                name: "magicNumber",
                type: "ULONG",
                value: 1594834165
              }, {
                name: "flags",
                type: "USHORT",
                value: 0
              }, {
                name: "unitsPerEm",
                type: "USHORT",
                value: 1e3
              }, {
                name: "created",
                type: "LONGDATETIME",
                value: n
              }, {
                name: "modified",
                type: "LONGDATETIME",
                value: t
              }, {
                name: "xMin",
                type: "SHORT",
                value: 0
              }, {
                name: "yMin",
                type: "SHORT",
                value: 0
              }, {
                name: "xMax",
                type: "SHORT",
                value: 0
              }, {
                name: "yMax",
                type: "SHORT",
                value: 0
              }, {
                name: "macStyle",
                type: "USHORT",
                value: 0
              }, {
                name: "lowestRecPPEM",
                type: "USHORT",
                value: 0
              }, {
                name: "fontDirectionHint",
                type: "SHORT",
                value: 2
              }, {
                name: "indexToLocFormat",
                type: "SHORT",
                value: 0
              }, {
                name: "glyphDataFormat",
                type: "SHORT",
                value: 0
              }], e);
            },
            Me = function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              return n.version = s.parseVersion(), n.ascender = s.parseShort(), n.descender = s.parseShort(), n.lineGap = s.parseShort(), n.advanceWidthMax = s.parseUShort(), n.minLeftSideBearing = s.parseShort(), n.minRightSideBearing = s.parseShort(), n.xMaxExtent = s.parseShort(), n.caretSlopeRise = s.parseShort(), n.caretSlopeRun = s.parseShort(), n.caretOffset = s.parseShort(), s.relativeOffset += 8, n.metricDataFormat = s.parseShort(), n.numberOfHMetrics = s.parseUShort(), n;
            },
            Pe = function (e) {
              return new M.Table("hhea", [{
                name: "version",
                type: "FIXED",
                value: 65536
              }, {
                name: "ascender",
                type: "FWORD",
                value: 0
              }, {
                name: "descender",
                type: "FWORD",
                value: 0
              }, {
                name: "lineGap",
                type: "FWORD",
                value: 0
              }, {
                name: "advanceWidthMax",
                type: "UFWORD",
                value: 0
              }, {
                name: "minLeftSideBearing",
                type: "FWORD",
                value: 0
              }, {
                name: "minRightSideBearing",
                type: "FWORD",
                value: 0
              }, {
                name: "xMaxExtent",
                type: "FWORD",
                value: 0
              }, {
                name: "caretSlopeRise",
                type: "SHORT",
                value: 1
              }, {
                name: "caretSlopeRun",
                type: "SHORT",
                value: 0
              }, {
                name: "caretOffset",
                type: "SHORT",
                value: 0
              }, {
                name: "reserved1",
                type: "SHORT",
                value: 0
              }, {
                name: "reserved2",
                type: "SHORT",
                value: 0
              }, {
                name: "reserved3",
                type: "SHORT",
                value: 0
              }, {
                name: "reserved4",
                type: "SHORT",
                value: 0
              }, {
                name: "metricDataFormat",
                type: "SHORT",
                value: 0
              }, {
                name: "numberOfHMetrics",
                type: "USHORT",
                value: 0
              }], e);
            },
            Ae = function (e, t, n, s, o) {
              let r, a;
              const i = new z.Parser(e, t);
              for (let e = 0; e < s; e += 1) {
                e < n && (r = i.parseUShort(), a = i.parseShort());
                const t = o.get(e);
                t.advanceWidth = r, t.leftSideBearing = a;
              }
            },
            Ge = function (e) {
              const t = new M.Table("hmtx", []);
              for (let n = 0; n < e.length; n += 1) {
                const s = e.get(n),
                  o = s.advanceWidth || 0,
                  r = s.leftSideBearing || 0;
                t.fields.push({
                  name: "advanceWidth_" + n,
                  type: "USHORT",
                  value: o
                }), t.fields.push({
                  name: "leftSideBearing_" + n,
                  type: "SHORT",
                  value: r
                });
              }
              return t;
            },
            Ne = function (e) {
              const t = new M.Table("ltag", [{
                name: "version",
                type: "ULONG",
                value: 1
              }, {
                name: "flags",
                type: "ULONG",
                value: 0
              }, {
                name: "numTags",
                type: "ULONG",
                value: e.length
              }]);
              let n = "";
              const s = 12 + 4 * e.length;
              for (let o = 0; o < e.length; ++o) {
                let r = n.indexOf(e[o]);
                r < 0 && (r = n.length, n += e[o]), t.fields.push({
                  name: "offset " + o,
                  type: "USHORT",
                  value: s + r
                }), t.fields.push({
                  name: "length " + o,
                  type: "USHORT",
                  value: e[o].length
                });
              }
              return t.fields.push({
                name: "stringPool",
                type: "CHARARRAY",
                value: n
              }), t;
            },
            Fe = function (e, t) {
              const n = new z.Parser(e, t),
                s = n.parseULong();
              f.argument(1 === s, "Unsupported ltag table version."), n.skip("uLong", 1);
              const o = n.parseULong(),
                r = [];
              for (let s = 0; s < o; s++) {
                let s = "";
                const o = t + n.parseUShort(),
                  a = n.parseUShort();
                for (let t = o; t < o + a; ++t) s += String.fromCharCode(e.getInt8(t));
                r.push(s);
              }
              return r;
            },
            _e = function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              return n.version = s.parseVersion(), n.numGlyphs = s.parseUShort(), 1 === n.version && (n.maxPoints = s.parseUShort(), n.maxContours = s.parseUShort(), n.maxCompositePoints = s.parseUShort(), n.maxCompositeContours = s.parseUShort(), n.maxZones = s.parseUShort(), n.maxTwilightPoints = s.parseUShort(), n.maxStorage = s.parseUShort(), n.maxFunctionDefs = s.parseUShort(), n.maxInstructionDefs = s.parseUShort(), n.maxStackElements = s.parseUShort(), n.maxSizeOfInstructions = s.parseUShort(), n.maxComponentElements = s.parseUShort(), n.maxComponentDepth = s.parseUShort()), n;
            },
            He = function (e) {
              return new M.Table("maxp", [{
                name: "version",
                type: "FIXED",
                value: 20480
              }, {
                name: "numGlyphs",
                type: "USHORT",
                value: e
              }]);
            },
            ze = ["copyright", "fontFamily", "fontSubfamily", "uniqueID", "fullName", "version", "postScriptName", "trademark", "manufacturer", "designer", "description", "manufacturerURL", "designerURL", "license", "licenseURL", "reserved", "preferredFamily", "preferredSubfamily", "compatibleFullName", "sampleText", "postScriptFindFontName", "wwsFamily", "wwsSubfamily"],
            We = {
              0: "en",
              1: "fr",
              2: "de",
              3: "it",
              4: "nl",
              5: "sv",
              6: "es",
              7: "da",
              8: "pt",
              9: "no",
              10: "he",
              11: "ja",
              12: "ar",
              13: "fi",
              14: "el",
              15: "is",
              16: "mt",
              17: "tr",
              18: "hr",
              19: "zh-Hant",
              20: "ur",
              21: "hi",
              22: "th",
              23: "ko",
              24: "lt",
              25: "pl",
              26: "hu",
              27: "es",
              28: "lv",
              29: "se",
              30: "fo",
              31: "fa",
              32: "ru",
              33: "zh",
              34: "nl-BE",
              35: "ga",
              36: "sq",
              37: "ro",
              38: "cz",
              39: "sk",
              40: "si",
              41: "yi",
              42: "sr",
              43: "mk",
              44: "bg",
              45: "uk",
              46: "be",
              47: "uz",
              48: "kk",
              49: "az-Cyrl",
              50: "az-Arab",
              51: "hy",
              52: "ka",
              53: "mo",
              54: "ky",
              55: "tg",
              56: "tk",
              57: "mn-CN",
              58: "mn",
              59: "ps",
              60: "ks",
              61: "ku",
              62: "sd",
              63: "bo",
              64: "ne",
              65: "sa",
              66: "mr",
              67: "bn",
              68: "as",
              69: "gu",
              70: "pa",
              71: "or",
              72: "ml",
              73: "kn",
              74: "ta",
              75: "te",
              76: "si",
              77: "my",
              78: "km",
              79: "lo",
              80: "vi",
              81: "id",
              82: "tl",
              83: "ms",
              84: "ms-Arab",
              85: "am",
              86: "ti",
              87: "om",
              88: "so",
              89: "sw",
              90: "rw",
              91: "rn",
              92: "ny",
              93: "mg",
              94: "eo",
              128: "cy",
              129: "eu",
              130: "ca",
              131: "la",
              132: "qu",
              133: "gn",
              134: "ay",
              135: "tt",
              136: "ug",
              137: "dz",
              138: "jv",
              139: "su",
              140: "gl",
              141: "af",
              142: "br",
              143: "iu",
              144: "gd",
              145: "gv",
              146: "ga",
              147: "to",
              148: "el-polyton",
              149: "kl",
              150: "az",
              151: "nn"
            },
            qe = {
              0: 0,
              1: 0,
              2: 0,
              3: 0,
              4: 0,
              5: 0,
              6: 0,
              7: 0,
              8: 0,
              9: 0,
              10: 5,
              11: 1,
              12: 4,
              13: 0,
              14: 6,
              15: 0,
              16: 0,
              17: 0,
              18: 0,
              19: 2,
              20: 4,
              21: 9,
              22: 21,
              23: 3,
              24: 29,
              25: 29,
              26: 29,
              27: 29,
              28: 29,
              29: 0,
              30: 0,
              31: 4,
              32: 7,
              33: 25,
              34: 0,
              35: 0,
              36: 0,
              37: 0,
              38: 29,
              39: 29,
              40: 0,
              41: 5,
              42: 7,
              43: 7,
              44: 7,
              45: 7,
              46: 7,
              47: 7,
              48: 7,
              49: 7,
              50: 4,
              51: 24,
              52: 23,
              53: 7,
              54: 7,
              55: 7,
              56: 7,
              57: 27,
              58: 7,
              59: 4,
              60: 4,
              61: 4,
              62: 4,
              63: 26,
              64: 9,
              65: 9,
              66: 9,
              67: 13,
              68: 13,
              69: 11,
              70: 10,
              71: 12,
              72: 17,
              73: 16,
              74: 14,
              75: 15,
              76: 18,
              77: 19,
              78: 20,
              79: 22,
              80: 30,
              81: 0,
              82: 0,
              83: 0,
              84: 4,
              85: 28,
              86: 28,
              87: 28,
              88: 0,
              89: 0,
              90: 0,
              91: 0,
              92: 0,
              93: 0,
              94: 0,
              128: 0,
              129: 0,
              130: 0,
              131: 0,
              132: 0,
              133: 0,
              134: 0,
              135: 7,
              136: 4,
              137: 26,
              138: 0,
              139: 0,
              140: 0,
              141: 0,
              142: 0,
              143: 28,
              144: 0,
              145: 0,
              146: 0,
              147: 0,
              148: 6,
              149: 0,
              150: 0,
              151: 0
            },
            je = {
              1078: "af",
              1052: "sq",
              1156: "gsw",
              1118: "am",
              5121: "ar-DZ",
              15361: "ar-BH",
              3073: "ar",
              2049: "ar-IQ",
              11265: "ar-JO",
              13313: "ar-KW",
              12289: "ar-LB",
              4097: "ar-LY",
              6145: "ary",
              8193: "ar-OM",
              16385: "ar-QA",
              1025: "ar-SA",
              10241: "ar-SY",
              7169: "aeb",
              14337: "ar-AE",
              9217: "ar-YE",
              1067: "hy",
              1101: "as",
              2092: "az-Cyrl",
              1068: "az",
              1133: "ba",
              1069: "eu",
              1059: "be",
              2117: "bn",
              1093: "bn-IN",
              8218: "bs-Cyrl",
              5146: "bs",
              1150: "br",
              1026: "bg",
              1027: "ca",
              3076: "zh-HK",
              5124: "zh-MO",
              2052: "zh",
              4100: "zh-SG",
              1028: "zh-TW",
              1155: "co",
              1050: "hr",
              4122: "hr-BA",
              1029: "cs",
              1030: "da",
              1164: "prs",
              1125: "dv",
              2067: "nl-BE",
              1043: "nl",
              3081: "en-AU",
              10249: "en-BZ",
              4105: "en-CA",
              9225: "en-029",
              16393: "en-IN",
              6153: "en-IE",
              8201: "en-JM",
              17417: "en-MY",
              5129: "en-NZ",
              13321: "en-PH",
              18441: "en-SG",
              7177: "en-ZA",
              11273: "en-TT",
              2057: "en-GB",
              1033: "en",
              12297: "en-ZW",
              1061: "et",
              1080: "fo",
              1124: "fil",
              1035: "fi",
              2060: "fr-BE",
              3084: "fr-CA",
              1036: "fr",
              5132: "fr-LU",
              6156: "fr-MC",
              4108: "fr-CH",
              1122: "fy",
              1110: "gl",
              1079: "ka",
              3079: "de-AT",
              1031: "de",
              5127: "de-LI",
              4103: "de-LU",
              2055: "de-CH",
              1032: "el",
              1135: "kl",
              1095: "gu",
              1128: "ha",
              1037: "he",
              1081: "hi",
              1038: "hu",
              1039: "is",
              1136: "ig",
              1057: "id",
              1117: "iu",
              2141: "iu-Latn",
              2108: "ga",
              1076: "xh",
              1077: "zu",
              1040: "it",
              2064: "it-CH",
              1041: "ja",
              1099: "kn",
              1087: "kk",
              1107: "km",
              1158: "quc",
              1159: "rw",
              1089: "sw",
              1111: "kok",
              1042: "ko",
              1088: "ky",
              1108: "lo",
              1062: "lv",
              1063: "lt",
              2094: "dsb",
              1134: "lb",
              1071: "mk",
              2110: "ms-BN",
              1086: "ms",
              1100: "ml",
              1082: "mt",
              1153: "mi",
              1146: "arn",
              1102: "mr",
              1148: "moh",
              1104: "mn",
              2128: "mn-CN",
              1121: "ne",
              1044: "nb",
              2068: "nn",
              1154: "oc",
              1096: "or",
              1123: "ps",
              1045: "pl",
              1046: "pt",
              2070: "pt-PT",
              1094: "pa",
              1131: "qu-BO",
              2155: "qu-EC",
              3179: "qu",
              1048: "ro",
              1047: "rm",
              1049: "ru",
              9275: "smn",
              4155: "smj-NO",
              5179: "smj",
              3131: "se-FI",
              1083: "se",
              2107: "se-SE",
              8251: "sms",
              6203: "sma-NO",
              7227: "sms",
              1103: "sa",
              7194: "sr-Cyrl-BA",
              3098: "sr",
              6170: "sr-Latn-BA",
              2074: "sr-Latn",
              1132: "nso",
              1074: "tn",
              1115: "si",
              1051: "sk",
              1060: "sl",
              11274: "es-AR",
              16394: "es-BO",
              13322: "es-CL",
              9226: "es-CO",
              5130: "es-CR",
              7178: "es-DO",
              12298: "es-EC",
              17418: "es-SV",
              4106: "es-GT",
              18442: "es-HN",
              2058: "es-MX",
              19466: "es-NI",
              6154: "es-PA",
              15370: "es-PY",
              10250: "es-PE",
              20490: "es-PR",
              3082: "es",
              1034: "es",
              21514: "es-US",
              14346: "es-UY",
              8202: "es-VE",
              2077: "sv-FI",
              1053: "sv",
              1114: "syr",
              1064: "tg",
              2143: "tzm",
              1097: "ta",
              1092: "tt",
              1098: "te",
              1054: "th",
              1105: "bo",
              1055: "tr",
              1090: "tk",
              1152: "ug",
              1058: "uk",
              1070: "hsb",
              1056: "ur",
              2115: "uz-Cyrl",
              1091: "uz",
              1066: "vi",
              1106: "cy",
              1160: "wo",
              1157: "sah",
              1144: "ii",
              1130: "yo"
            };
          function Xe(e, t, n) {
            switch (e) {
              case 0:
                if (65535 === t) return "und";
                if (n) return n[t];
                break;
              case 1:
                return We[t];
              case 3:
                return je[t];
            }
          }
          const Ye = "utf-16",
            Ve = {
              0: "macintosh",
              1: "x-mac-japanese",
              2: "x-mac-chinesetrad",
              3: "x-mac-korean",
              6: "x-mac-greek",
              7: "x-mac-cyrillic",
              9: "x-mac-devanagai",
              10: "x-mac-gurmukhi",
              11: "x-mac-gujarati",
              12: "x-mac-oriya",
              13: "x-mac-bengali",
              14: "x-mac-tamil",
              15: "x-mac-telugu",
              16: "x-mac-kannada",
              17: "x-mac-malayalam",
              18: "x-mac-sinhalese",
              19: "x-mac-burmese",
              20: "x-mac-khmer",
              21: "x-mac-thai",
              22: "x-mac-lao",
              23: "x-mac-georgian",
              24: "x-mac-armenian",
              25: "x-mac-chinesesimp",
              26: "x-mac-tibetan",
              27: "x-mac-mongolian",
              28: "x-mac-ethiopic",
              29: "x-mac-ce",
              30: "x-mac-vietnamese",
              31: "x-mac-extarabic"
            },
            Ze = {
              15: "x-mac-icelandic",
              17: "x-mac-turkish",
              18: "x-mac-croatian",
              24: "x-mac-ce",
              25: "x-mac-ce",
              26: "x-mac-ce",
              27: "x-mac-ce",
              28: "x-mac-ce",
              30: "x-mac-icelandic",
              37: "x-mac-romanian",
              38: "x-mac-ce",
              39: "x-mac-ce",
              40: "x-mac-ce",
              143: "x-mac-inuit",
              146: "x-mac-gaelic"
            };
          function Qe(e, t, n) {
            switch (e) {
              case 0:
                return Ye;
              case 1:
                return Ze[n] || Ve[t];
              case 3:
                if (1 === t || 10 === t) return Ye;
            }
          }
          function Je(e) {
            const t = {};
            for (let n in e) t[e[n]] = parseInt(n);
            return t;
          }
          function Ke(e, t, n, s, o, r) {
            return new M.Record("NameRecord", [{
              name: "platformID",
              type: "USHORT",
              value: e
            }, {
              name: "encodingID",
              type: "USHORT",
              value: t
            }, {
              name: "languageID",
              type: "USHORT",
              value: n
            }, {
              name: "nameID",
              type: "USHORT",
              value: s
            }, {
              name: "length",
              type: "USHORT",
              value: o
            }, {
              name: "offset",
              type: "USHORT",
              value: r
            }]);
          }
          function $e(e, t) {
            let n = function (e, t) {
              const n = e.length,
                s = t.length - n + 1;
              e: for (let o = 0; o < s; o++) for (; o < s; o++) {
                for (let s = 0; s < n; s++) if (t[o + s] !== e[s]) continue e;
                return o;
              }
              return -1;
            }(e, t);
            if (n < 0) {
              n = t.length;
              let s = 0;
              const o = e.length;
              for (; s < o; ++s) t.push(e[s]);
            }
            return n;
          }
          const et = function (e, t, n) {
              const s = {},
                o = new z.Parser(e, t),
                r = o.parseUShort(),
                a = o.parseUShort(),
                i = o.offset + o.parseUShort();
              for (let t = 0; t < a; t++) {
                const t = o.parseUShort(),
                  r = o.parseUShort(),
                  a = o.parseUShort(),
                  l = o.parseUShort(),
                  u = ze[l] || l,
                  c = o.parseUShort(),
                  p = o.parseUShort(),
                  f = Xe(t, a, n),
                  h = Qe(t, r, a);
                if (void 0 !== h && void 0 !== f) {
                  let t;
                  if (t = h === Ye ? d.UTF16(e, i + p, c) : d.MACSTRING(e, i + p, c, h), t) {
                    let e = s[u];
                    void 0 === e && (e = s[u] = {}), e[f] = t;
                  }
                }
              }
              let l = 0;
              return 1 === r && o.parseUShort(), s;
            },
            tt = function (e, t) {
              let n;
              const s = [],
                o = {},
                r = Je(ze);
              for (let t in e) {
                let a = r[t];
                if (void 0 === a && (a = t), n = parseInt(a), isNaN(n)) throw new Error('Name table entry "' + t + '" does not exist, see nameTableNames for complete list.');
                o[n] = e[t], s.push(n);
              }
              const a = Je(We),
                i = Je(je),
                l = [],
                u = [];
              for (let e = 0; e < s.length; e++) {
                n = s[e];
                const r = o[n];
                for (let e in r) {
                  const s = r[e];
                  let o = 1,
                    c = a[e],
                    p = qe[c];
                  const f = Qe(o, p, c);
                  let h = g.MACSTRING(s, f);
                  void 0 === h && (o = 0, c = t.indexOf(e), c < 0 && (c = t.length, t.push(e)), p = 4, h = g.UTF16(s));
                  const d = $e(h, u);
                  l.push(Ke(o, p, c, n, h.length, d));
                  const m = i[e];
                  if (void 0 !== m) {
                    const e = g.UTF16(s),
                      t = $e(e, u);
                    l.push(Ke(3, 1, m, n, e.length, t));
                  }
                }
              }
              l.sort(function (e, t) {
                return e.platformID - t.platformID || e.encodingID - t.encodingID || e.languageID - t.languageID || e.nameID - t.nameID;
              });
              const c = new M.Table("name", [{
                name: "format",
                type: "USHORT",
                value: 0
              }, {
                name: "count",
                type: "USHORT",
                value: l.length
              }, {
                name: "stringOffset",
                type: "USHORT",
                value: 6 + 12 * l.length
              }]);
              for (let e = 0; e < l.length; e++) c.fields.push({
                name: "record_" + e,
                type: "RECORD",
                value: l[e]
              });
              return c.fields.push({
                name: "strings",
                type: "LITERAL",
                value: u
              }), c;
            },
            nt = [{
              begin: 0,
              end: 127
            }, {
              begin: 128,
              end: 255
            }, {
              begin: 256,
              end: 383
            }, {
              begin: 384,
              end: 591
            }, {
              begin: 592,
              end: 687
            }, {
              begin: 688,
              end: 767
            }, {
              begin: 768,
              end: 879
            }, {
              begin: 880,
              end: 1023
            }, {
              begin: 11392,
              end: 11519
            }, {
              begin: 1024,
              end: 1279
            }, {
              begin: 1328,
              end: 1423
            }, {
              begin: 1424,
              end: 1535
            }, {
              begin: 42240,
              end: 42559
            }, {
              begin: 1536,
              end: 1791
            }, {
              begin: 1984,
              end: 2047
            }, {
              begin: 2304,
              end: 2431
            }, {
              begin: 2432,
              end: 2559
            }, {
              begin: 2560,
              end: 2687
            }, {
              begin: 2688,
              end: 2815
            }, {
              begin: 2816,
              end: 2943
            }, {
              begin: 2944,
              end: 3071
            }, {
              begin: 3072,
              end: 3199
            }, {
              begin: 3200,
              end: 3327
            }, {
              begin: 3328,
              end: 3455
            }, {
              begin: 3584,
              end: 3711
            }, {
              begin: 3712,
              end: 3839
            }, {
              begin: 4256,
              end: 4351
            }, {
              begin: 6912,
              end: 7039
            }, {
              begin: 4352,
              end: 4607
            }, {
              begin: 7680,
              end: 7935
            }, {
              begin: 7936,
              end: 8191
            }, {
              begin: 8192,
              end: 8303
            }, {
              begin: 8304,
              end: 8351
            }, {
              begin: 8352,
              end: 8399
            }, {
              begin: 8400,
              end: 8447
            }, {
              begin: 8448,
              end: 8527
            }, {
              begin: 8528,
              end: 8591
            }, {
              begin: 8592,
              end: 8703
            }, {
              begin: 8704,
              end: 8959
            }, {
              begin: 8960,
              end: 9215
            }, {
              begin: 9216,
              end: 9279
            }, {
              begin: 9280,
              end: 9311
            }, {
              begin: 9312,
              end: 9471
            }, {
              begin: 9472,
              end: 9599
            }, {
              begin: 9600,
              end: 9631
            }, {
              begin: 9632,
              end: 9727
            }, {
              begin: 9728,
              end: 9983
            }, {
              begin: 9984,
              end: 10175
            }, {
              begin: 12288,
              end: 12351
            }, {
              begin: 12352,
              end: 12447
            }, {
              begin: 12448,
              end: 12543
            }, {
              begin: 12544,
              end: 12591
            }, {
              begin: 12592,
              end: 12687
            }, {
              begin: 43072,
              end: 43135
            }, {
              begin: 12800,
              end: 13055
            }, {
              begin: 13056,
              end: 13311
            }, {
              begin: 44032,
              end: 55215
            }, {
              begin: 55296,
              end: 57343
            }, {
              begin: 67840,
              end: 67871
            }, {
              begin: 19968,
              end: 40959
            }, {
              begin: 57344,
              end: 63743
            }, {
              begin: 12736,
              end: 12783
            }, {
              begin: 64256,
              end: 64335
            }, {
              begin: 64336,
              end: 65023
            }, {
              begin: 65056,
              end: 65071
            }, {
              begin: 65040,
              end: 65055
            }, {
              begin: 65104,
              end: 65135
            }, {
              begin: 65136,
              end: 65279
            }, {
              begin: 65280,
              end: 65519
            }, {
              begin: 65520,
              end: 65535
            }, {
              begin: 3840,
              end: 4095
            }, {
              begin: 1792,
              end: 1871
            }, {
              begin: 1920,
              end: 1983
            }, {
              begin: 3456,
              end: 3583
            }, {
              begin: 4096,
              end: 4255
            }, {
              begin: 4608,
              end: 4991
            }, {
              begin: 5024,
              end: 5119
            }, {
              begin: 5120,
              end: 5759
            }, {
              begin: 5760,
              end: 5791
            }, {
              begin: 5792,
              end: 5887
            }, {
              begin: 6016,
              end: 6143
            }, {
              begin: 6144,
              end: 6319
            }, {
              begin: 10240,
              end: 10495
            }, {
              begin: 40960,
              end: 42127
            }, {
              begin: 5888,
              end: 5919
            }, {
              begin: 66304,
              end: 66351
            }, {
              begin: 66352,
              end: 66383
            }, {
              begin: 66560,
              end: 66639
            }, {
              begin: 118784,
              end: 119039
            }, {
              begin: 119808,
              end: 120831
            }, {
              begin: 1044480,
              end: 1048573
            }, {
              begin: 65024,
              end: 65039
            }, {
              begin: 917504,
              end: 917631
            }, {
              begin: 6400,
              end: 6479
            }, {
              begin: 6480,
              end: 6527
            }, {
              begin: 6528,
              end: 6623
            }, {
              begin: 6656,
              end: 6687
            }, {
              begin: 11264,
              end: 11359
            }, {
              begin: 11568,
              end: 11647
            }, {
              begin: 19904,
              end: 19967
            }, {
              begin: 43008,
              end: 43055
            }, {
              begin: 65536,
              end: 65663
            }, {
              begin: 65856,
              end: 65935
            }, {
              begin: 66432,
              end: 66463
            }, {
              begin: 66464,
              end: 66527
            }, {
              begin: 66640,
              end: 66687
            }, {
              begin: 66688,
              end: 66735
            }, {
              begin: 67584,
              end: 67647
            }, {
              begin: 68096,
              end: 68191
            }, {
              begin: 119552,
              end: 119647
            }, {
              begin: 73728,
              end: 74751
            }, {
              begin: 119648,
              end: 119679
            }, {
              begin: 7040,
              end: 7103
            }, {
              begin: 7168,
              end: 7247
            }, {
              begin: 7248,
              end: 7295
            }, {
              begin: 43136,
              end: 43231
            }, {
              begin: 43264,
              end: 43311
            }, {
              begin: 43312,
              end: 43359
            }, {
              begin: 43520,
              end: 43615
            }, {
              begin: 65936,
              end: 65999
            }, {
              begin: 66e3,
              end: 66047
            }, {
              begin: 66208,
              end: 66271
            }, {
              begin: 127024,
              end: 127135
            }],
            st = function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              n.version = s.parseUShort(), n.xAvgCharWidth = s.parseShort(), n.usWeightClass = s.parseUShort(), n.usWidthClass = s.parseUShort(), n.fsType = s.parseUShort(), n.ySubscriptXSize = s.parseShort(), n.ySubscriptYSize = s.parseShort(), n.ySubscriptXOffset = s.parseShort(), n.ySubscriptYOffset = s.parseShort(), n.ySuperscriptXSize = s.parseShort(), n.ySuperscriptYSize = s.parseShort(), n.ySuperscriptXOffset = s.parseShort(), n.ySuperscriptYOffset = s.parseShort(), n.yStrikeoutSize = s.parseShort(), n.yStrikeoutPosition = s.parseShort(), n.sFamilyClass = s.parseShort(), n.panose = [];
              for (let e = 0; e < 10; e++) n.panose[e] = s.parseByte();
              return n.ulUnicodeRange1 = s.parseULong(), n.ulUnicodeRange2 = s.parseULong(), n.ulUnicodeRange3 = s.parseULong(), n.ulUnicodeRange4 = s.parseULong(), n.achVendID = String.fromCharCode(s.parseByte(), s.parseByte(), s.parseByte(), s.parseByte()), n.fsSelection = s.parseUShort(), n.usFirstCharIndex = s.parseUShort(), n.usLastCharIndex = s.parseUShort(), n.sTypoAscender = s.parseShort(), n.sTypoDescender = s.parseShort(), n.sTypoLineGap = s.parseShort(), n.usWinAscent = s.parseUShort(), n.usWinDescent = s.parseUShort(), n.version >= 1 && (n.ulCodePageRange1 = s.parseULong(), n.ulCodePageRange2 = s.parseULong()), n.version >= 2 && (n.sxHeight = s.parseShort(), n.sCapHeight = s.parseShort(), n.usDefaultChar = s.parseUShort(), n.usBreakChar = s.parseUShort(), n.usMaxContent = s.parseUShort()), n;
            },
            ot = function (e) {
              return new M.Table("OS/2", [{
                name: "version",
                type: "USHORT",
                value: 3
              }, {
                name: "xAvgCharWidth",
                type: "SHORT",
                value: 0
              }, {
                name: "usWeightClass",
                type: "USHORT",
                value: 0
              }, {
                name: "usWidthClass",
                type: "USHORT",
                value: 0
              }, {
                name: "fsType",
                type: "USHORT",
                value: 0
              }, {
                name: "ySubscriptXSize",
                type: "SHORT",
                value: 650
              }, {
                name: "ySubscriptYSize",
                type: "SHORT",
                value: 699
              }, {
                name: "ySubscriptXOffset",
                type: "SHORT",
                value: 0
              }, {
                name: "ySubscriptYOffset",
                type: "SHORT",
                value: 140
              }, {
                name: "ySuperscriptXSize",
                type: "SHORT",
                value: 650
              }, {
                name: "ySuperscriptYSize",
                type: "SHORT",
                value: 699
              }, {
                name: "ySuperscriptXOffset",
                type: "SHORT",
                value: 0
              }, {
                name: "ySuperscriptYOffset",
                type: "SHORT",
                value: 479
              }, {
                name: "yStrikeoutSize",
                type: "SHORT",
                value: 49
              }, {
                name: "yStrikeoutPosition",
                type: "SHORT",
                value: 258
              }, {
                name: "sFamilyClass",
                type: "SHORT",
                value: 0
              }, {
                name: "bFamilyType",
                type: "BYTE",
                value: 0
              }, {
                name: "bSerifStyle",
                type: "BYTE",
                value: 0
              }, {
                name: "bWeight",
                type: "BYTE",
                value: 0
              }, {
                name: "bProportion",
                type: "BYTE",
                value: 0
              }, {
                name: "bContrast",
                type: "BYTE",
                value: 0
              }, {
                name: "bStrokeVariation",
                type: "BYTE",
                value: 0
              }, {
                name: "bArmStyle",
                type: "BYTE",
                value: 0
              }, {
                name: "bLetterform",
                type: "BYTE",
                value: 0
              }, {
                name: "bMidline",
                type: "BYTE",
                value: 0
              }, {
                name: "bXHeight",
                type: "BYTE",
                value: 0
              }, {
                name: "ulUnicodeRange1",
                type: "ULONG",
                value: 0
              }, {
                name: "ulUnicodeRange2",
                type: "ULONG",
                value: 0
              }, {
                name: "ulUnicodeRange3",
                type: "ULONG",
                value: 0
              }, {
                name: "ulUnicodeRange4",
                type: "ULONG",
                value: 0
              }, {
                name: "achVendID",
                type: "CHARARRAY",
                value: "XXXX"
              }, {
                name: "fsSelection",
                type: "USHORT",
                value: 0
              }, {
                name: "usFirstCharIndex",
                type: "USHORT",
                value: 0
              }, {
                name: "usLastCharIndex",
                type: "USHORT",
                value: 0
              }, {
                name: "sTypoAscender",
                type: "SHORT",
                value: 0
              }, {
                name: "sTypoDescender",
                type: "SHORT",
                value: 0
              }, {
                name: "sTypoLineGap",
                type: "SHORT",
                value: 0
              }, {
                name: "usWinAscent",
                type: "USHORT",
                value: 0
              }, {
                name: "usWinDescent",
                type: "USHORT",
                value: 0
              }, {
                name: "ulCodePageRange1",
                type: "ULONG",
                value: 0
              }, {
                name: "ulCodePageRange2",
                type: "ULONG",
                value: 0
              }, {
                name: "sxHeight",
                type: "SHORT",
                value: 0
              }, {
                name: "sCapHeight",
                type: "SHORT",
                value: 0
              }, {
                name: "usDefaultChar",
                type: "USHORT",
                value: 0
              }, {
                name: "usBreakChar",
                type: "USHORT",
                value: 0
              }, {
                name: "usMaxContext",
                type: "USHORT",
                value: 0
              }], e);
            },
            rt = function (e) {
              for (let t = 0; t < nt.length; t += 1) {
                const n = nt[t];
                if (e >= n.begin && e < n.end) return t;
              }
              return -1;
            },
            at = function (e, t) {
              const n = {},
                s = new z.Parser(e, t);
              switch (n.version = s.parseVersion(), n.italicAngle = s.parseFixed(), n.underlinePosition = s.parseShort(), n.underlineThickness = s.parseShort(), n.isFixedPitch = s.parseULong(), n.minMemType42 = s.parseULong(), n.maxMemType42 = s.parseULong(), n.minMemType1 = s.parseULong(), n.maxMemType1 = s.parseULong(), n.version) {
                case 1:
                  n.names = Z.slice();
                  break;
                case 2:
                  n.numberOfGlyphs = s.parseUShort(), n.glyphNameIndex = new Array(n.numberOfGlyphs);
                  for (let e = 0; e < n.numberOfGlyphs; e++) n.glyphNameIndex[e] = s.parseUShort();
                  n.names = [];
                  for (let e = 0; e < n.numberOfGlyphs; e++) if (n.glyphNameIndex[e] >= Z.length) {
                    const e = s.parseChar();
                    n.names.push(s.parseString(e));
                  }
                  break;
                case 2.5:
                  n.numberOfGlyphs = s.parseUShort(), n.offset = new Array(n.numberOfGlyphs);
                  for (let e = 0; e < n.numberOfGlyphs; e++) n.offset[e] = s.parseChar();
              }
              return n;
            },
            it = function () {
              return new M.Table("post", [{
                name: "version",
                type: "FIXED",
                value: 196608
              }, {
                name: "italicAngle",
                type: "FIXED",
                value: 0
              }, {
                name: "underlinePosition",
                type: "FWORD",
                value: 0
              }, {
                name: "underlineThickness",
                type: "FWORD",
                value: 0
              }, {
                name: "isFixedPitch",
                type: "ULONG",
                value: 0
              }, {
                name: "minMemType42",
                type: "ULONG",
                value: 0
              }, {
                name: "maxMemType42",
                type: "ULONG",
                value: 0
              }, {
                name: "minMemType1",
                type: "ULONG",
                value: 0
              }, {
                name: "maxMemType1",
                type: "ULONG",
                value: 0
              }]);
            },
            lt = new Array(9);
          lt[1] = function () {
            const e = this.offset + this.relativeOffset,
              t = this.parseUShort();
            return 1 === t ? {
              substFormat: 1,
              coverage: this.parsePointer(_.coverage),
              deltaGlyphId: this.parseUShort()
            } : 2 === t ? {
              substFormat: 2,
              coverage: this.parsePointer(_.coverage),
              substitute: this.parseOffset16List()
            } : void f.assert(!1, "0x" + e.toString(16) + ": lookup type 1 format must be 1 or 2.");
          }, lt[2] = function () {
            const e = this.parseUShort();
            return f.argument(1 === e, "GSUB Multiple Substitution Subtable identifier-format must be 1"), {
              substFormat: e,
              coverage: this.parsePointer(_.coverage),
              sequences: this.parseListOfLists()
            };
          }, lt[3] = function () {
            const e = this.parseUShort();
            return f.argument(1 === e, "GSUB Alternate Substitution Subtable identifier-format must be 1"), {
              substFormat: e,
              coverage: this.parsePointer(_.coverage),
              alternateSets: this.parseListOfLists()
            };
          }, lt[4] = function () {
            const e = this.parseUShort();
            return f.argument(1 === e, "GSUB ligature table identifier-format must be 1"), {
              substFormat: e,
              coverage: this.parsePointer(_.coverage),
              ligatureSets: this.parseListOfLists(function () {
                return {
                  ligGlyph: this.parseUShort(),
                  components: this.parseUShortList(this.parseUShort() - 1)
                };
              })
            };
          };
          const ut = {
            sequenceIndex: _.uShort,
            lookupListIndex: _.uShort
          };
          lt[5] = function () {
            const e = this.offset + this.relativeOffset,
              t = this.parseUShort();
            if (1 === t) return {
              substFormat: t,
              coverage: this.parsePointer(_.coverage),
              ruleSets: this.parseListOfLists(function () {
                const e = this.parseUShort(),
                  t = this.parseUShort();
                return {
                  input: this.parseUShortList(e - 1),
                  lookupRecords: this.parseRecordList(t, ut)
                };
              })
            };
            if (2 === t) return {
              substFormat: t,
              coverage: this.parsePointer(_.coverage),
              classDef: this.parsePointer(_.classDef),
              classSets: this.parseListOfLists(function () {
                const e = this.parseUShort(),
                  t = this.parseUShort();
                return {
                  classes: this.parseUShortList(e - 1),
                  lookupRecords: this.parseRecordList(t, ut)
                };
              })
            };
            if (3 === t) {
              const e = this.parseUShort(),
                n = this.parseUShort();
              return {
                substFormat: t,
                coverages: this.parseList(e, _.pointer(_.coverage)),
                lookupRecords: this.parseRecordList(n, ut)
              };
            }
            f.assert(!1, "0x" + e.toString(16) + ": lookup type 5 format must be 1, 2 or 3.");
          }, lt[6] = function () {
            const e = this.offset + this.relativeOffset,
              t = this.parseUShort();
            return 1 === t ? {
              substFormat: 1,
              coverage: this.parsePointer(_.coverage),
              chainRuleSets: this.parseListOfLists(function () {
                return {
                  backtrack: this.parseUShortList(),
                  input: this.parseUShortList(this.parseShort() - 1),
                  lookahead: this.parseUShortList(),
                  lookupRecords: this.parseRecordList(ut)
                };
              })
            } : 2 === t ? {
              substFormat: 2,
              coverage: this.parsePointer(_.coverage),
              backtrackClassDef: this.parsePointer(_.classDef),
              inputClassDef: this.parsePointer(_.classDef),
              lookaheadClassDef: this.parsePointer(_.classDef),
              chainClassSet: this.parseListOfLists(function () {
                return {
                  backtrack: this.parseUShortList(),
                  input: this.parseUShortList(this.parseShort() - 1),
                  lookahead: this.parseUShortList(),
                  lookupRecords: this.parseRecordList(ut)
                };
              })
            } : 3 === t ? {
              substFormat: 3,
              backtrackCoverage: this.parseList(_.pointer(_.coverage)),
              inputCoverage: this.parseList(_.pointer(_.coverage)),
              lookaheadCoverage: this.parseList(_.pointer(_.coverage)),
              lookupRecords: this.parseRecordList(ut)
            } : void f.assert(!1, "0x" + e.toString(16) + ": lookup type 6 format must be 1, 2 or 3.");
          }, lt[7] = function () {
            const e = this.parseUShort();
            f.argument(1 === e, "GSUB Extension Substitution subtable identifier-format must be 1");
            const t = this.parseUShort(),
              n = new _(this.data, this.offset + this.parseULong());
            return {
              substFormat: 1,
              lookupType: t,
              extension: lt[t].call(n)
            };
          }, lt[8] = function () {
            const e = this.parseUShort();
            return f.argument(1 === e, "GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"), {
              substFormat: e,
              coverage: this.parsePointer(_.coverage),
              backtrackCoverage: this.parseList(_.pointer(_.coverage)),
              lookaheadCoverage: this.parseList(_.pointer(_.coverage)),
              substitutes: this.parseUShortList()
            };
          };
          const ct = new Array(9);
          ct[1] = function (e) {
            return 1 === e.substFormat ? new M.Table("substitutionTable", [{
              name: "substFormat",
              type: "USHORT",
              value: 1
            }, {
              name: "coverage",
              type: "TABLE",
              value: new M.Coverage(e.coverage)
            }, {
              name: "deltaGlyphID",
              type: "USHORT",
              value: e.deltaGlyphId
            }]) : new M.Table("substitutionTable", [{
              name: "substFormat",
              type: "USHORT",
              value: 2
            }, {
              name: "coverage",
              type: "TABLE",
              value: new M.Coverage(e.coverage)
            }].concat(M.ushortList("substitute", e.substitute)));
          }, ct[3] = function (e) {
            return f.assert(1 === e.substFormat, "Lookup type 3 substFormat must be 1."), new M.Table("substitutionTable", [{
              name: "substFormat",
              type: "USHORT",
              value: 1
            }, {
              name: "coverage",
              type: "TABLE",
              value: new M.Coverage(e.coverage)
            }].concat(M.tableList("altSet", e.alternateSets, function (e) {
              return new M.Table("alternateSetTable", M.ushortList("alternate", e));
            })));
          }, ct[4] = function (e) {
            return f.assert(1 === e.substFormat, "Lookup type 4 substFormat must be 1."), new M.Table("substitutionTable", [{
              name: "substFormat",
              type: "USHORT",
              value: 1
            }, {
              name: "coverage",
              type: "TABLE",
              value: new M.Coverage(e.coverage)
            }].concat(M.tableList("ligSet", e.ligatureSets, function (e) {
              return new M.Table("ligatureSetTable", M.tableList("ligature", e, function (e) {
                return new M.Table("ligatureTable", [{
                  name: "ligGlyph",
                  type: "USHORT",
                  value: e.ligGlyph
                }].concat(M.ushortList("component", e.components, e.components.length + 1)));
              }));
            })));
          };
          const pt = function (e, t) {
              const n = new _(e, t = t || 0),
                s = n.parseVersion(1);
              return f.argument(1 === s || 1.1 === s, "Unsupported GSUB table version."), 1 === s ? {
                version: s,
                scripts: n.parseScriptList(),
                features: n.parseFeatureList(),
                lookups: n.parseLookupList(lt)
              } : {
                version: s,
                scripts: n.parseScriptList(),
                features: n.parseFeatureList(),
                lookups: n.parseLookupList(lt),
                variations: n.parseFeatureVariationsList()
              };
            },
            ft = function (e) {
              return new M.Table("GSUB", [{
                name: "version",
                type: "ULONG",
                value: 65536
              }, {
                name: "scripts",
                type: "TABLE",
                value: new M.ScriptList(e.scripts)
              }, {
                name: "features",
                type: "TABLE",
                value: new M.FeatureList(e.features)
              }, {
                name: "lookups",
                type: "TABLE",
                value: new M.LookupList(e.lookups, ct)
              }]);
            },
            ht = function (e, t) {
              const n = new z.Parser(e, t),
                s = n.parseULong();
              f.argument(1 === s, "Unsupported META table version."), n.parseULong(), n.parseULong();
              const o = n.parseULong(),
                r = {};
              for (let s = 0; s < o; s++) {
                const s = n.parseTag(),
                  o = n.parseULong(),
                  a = n.parseULong(),
                  i = d.UTF8(e, t + o, a);
                r[s] = i;
              }
              return r;
            },
            dt = function (e) {
              const t = Object.keys(e).length;
              let n = "";
              const s = 16 + 12 * t,
                o = new M.Table("meta", [{
                  name: "version",
                  type: "ULONG",
                  value: 1
                }, {
                  name: "flags",
                  type: "ULONG",
                  value: 0
                }, {
                  name: "offset",
                  type: "ULONG",
                  value: s
                }, {
                  name: "numTags",
                  type: "ULONG",
                  value: t
                }]);
              for (let t in e) {
                const r = n.length;
                n += e[t], o.fields.push({
                  name: "tag " + t,
                  type: "TAG",
                  value: t
                }), o.fields.push({
                  name: "offset " + t,
                  type: "ULONG",
                  value: s + r
                }), o.fields.push({
                  name: "length " + t,
                  type: "ULONG",
                  value: e[t].length
                });
              }
              return o.fields.push({
                name: "stringPool",
                type: "CHARARRAY",
                value: n
              }), o;
            };
          function gt(e) {
            return Math.log(e) / Math.log(2) | 0;
          }
          function mt(e) {
            for (; e.length % 4 != 0;) e.push(0);
            let t = 0;
            for (let n = 0; n < e.length; n += 4) t += (e[n] << 24) + (e[n + 1] << 16) + (e[n + 2] << 8) + e[n + 3];
            return t %= Math.pow(2, 32), t;
          }
          function yt(e, t, n, s) {
            return new M.Record("Table Record", [{
              name: "tag",
              type: "TAG",
              value: void 0 !== e ? e : ""
            }, {
              name: "checkSum",
              type: "ULONG",
              value: void 0 !== t ? t : 0
            }, {
              name: "offset",
              type: "ULONG",
              value: void 0 !== n ? n : 0
            }, {
              name: "length",
              type: "ULONG",
              value: void 0 !== s ? s : 0
            }]);
          }
          function vt(e) {
            const t = new M.Table("sfnt", [{
              name: "version",
              type: "TAG",
              value: "OTTO"
            }, {
              name: "numTables",
              type: "USHORT",
              value: 0
            }, {
              name: "searchRange",
              type: "USHORT",
              value: 0
            }, {
              name: "entrySelector",
              type: "USHORT",
              value: 0
            }, {
              name: "rangeShift",
              type: "USHORT",
              value: 0
            }]);
            t.tables = e, t.numTables = e.length;
            const n = Math.pow(2, gt(t.numTables));
            t.searchRange = 16 * n, t.entrySelector = gt(n), t.rangeShift = 16 * t.numTables - t.searchRange;
            const s = [],
              o = [];
            let r = t.sizeOf() + yt().sizeOf() * t.numTables;
            for (; r % 4 != 0;) r += 1, o.push({
              name: "padding",
              type: "BYTE",
              value: 0
            });
            for (let t = 0; t < e.length; t += 1) {
              const n = e[t];
              f.argument(4 === n.tableName.length, "Table name" + n.tableName + " is invalid.");
              const a = n.sizeOf(),
                i = yt(n.tableName, mt(n.encode()), r, a);
              for (s.push({
                name: i.tag + " Table Record",
                type: "RECORD",
                value: i
              }), o.push({
                name: n.tableName + " table",
                type: "RECORD",
                value: n
              }), r += a, f.argument(!isNaN(r), "Something went wrong calculating the offset."); r % 4 != 0;) r += 1, o.push({
                name: "padding",
                type: "BYTE",
                value: 0
              });
            }
            return s.sort(function (e, t) {
              return e.value.tag > t.value.tag ? 1 : -1;
            }), t.fields = t.fields.concat(s), t.fields = t.fields.concat(o), t;
          }
          function bt(e, t, n) {
            for (let n = 0; n < t.length; n += 1) {
              const s = e.charToGlyphIndex(t[n]);
              if (s > 0) return e.glyphs.get(s).getMetrics();
            }
            return n;
          }
          function xt(e) {
            let t = 0;
            for (let n = 0; n < e.length; n += 1) t += e[n];
            return t / e.length;
          }
          const St = function (e) {
            const t = [],
              n = [],
              s = [],
              o = [],
              r = [],
              a = [],
              i = [];
            let l,
              u = 0,
              c = 0,
              p = 0,
              f = 0,
              h = 0;
            for (let d = 0; d < e.glyphs.length; d += 1) {
              const g = e.glyphs.get(d),
                m = 0 | g.unicode;
              if (isNaN(g.advanceWidth)) throw new Error("Glyph " + g.name + " (" + d + "): advanceWidth is not a number.");
              (l > m || void 0 === l) && m > 0 && (l = m), u < m && (u = m);
              const y = rt(m);
              if (y < 32) c |= 1 << y;else if (y < 64) p |= 1 << y - 32;else if (y < 96) f |= 1 << y - 64;else {
                if (!(y < 123)) throw new Error("Unicode ranges bits > 123 are reserved for internal usage");
                h |= 1 << y - 96;
              }
              if (".notdef" === g.name) continue;
              const v = g.getMetrics();
              t.push(v.xMin), n.push(v.yMin), s.push(v.xMax), o.push(v.yMax), a.push(v.leftSideBearing), i.push(v.rightSideBearing), r.push(g.advanceWidth);
            }
            const d = {
              xMin: Math.min.apply(null, t),
              yMin: Math.min.apply(null, n),
              xMax: Math.max.apply(null, s),
              yMax: Math.max.apply(null, o),
              advanceWidthMax: Math.max.apply(null, r),
              advanceWidthAvg: xt(r),
              minLeftSideBearing: Math.min.apply(null, a),
              maxLeftSideBearing: Math.max.apply(null, a),
              minRightSideBearing: Math.min.apply(null, i)
            };
            d.ascender = e.ascender, d.descender = e.descender;
            const g = De({
                flags: 3,
                unitsPerEm: e.unitsPerEm,
                xMin: d.xMin,
                yMin: d.yMin,
                xMax: d.xMax,
                yMax: d.yMax,
                lowestRecPPEM: 3,
                createdTimestamp: e.createdTimestamp
              }),
              m = Pe({
                ascender: d.ascender,
                descender: d.descender,
                advanceWidthMax: d.advanceWidthMax,
                minLeftSideBearing: d.minLeftSideBearing,
                minRightSideBearing: d.minRightSideBearing,
                xMaxExtent: d.maxLeftSideBearing + (d.xMax - d.xMin),
                numberOfHMetrics: e.glyphs.length
              }),
              y = He(e.glyphs.length),
              v = ot({
                xAvgCharWidth: Math.round(d.advanceWidthAvg),
                usWeightClass: e.tables.os2.usWeightClass,
                usWidthClass: e.tables.os2.usWidthClass,
                usFirstCharIndex: l,
                usLastCharIndex: u,
                ulUnicodeRange1: c,
                ulUnicodeRange2: p,
                ulUnicodeRange3: f,
                ulUnicodeRange4: h,
                fsSelection: e.tables.os2.fsSelection,
                sTypoAscender: d.ascender,
                sTypoDescender: d.descender,
                sTypoLineGap: 0,
                usWinAscent: d.yMax,
                usWinDescent: Math.abs(d.yMin),
                ulCodePageRange1: 1,
                sxHeight: bt(e, "xyvw", {
                  yMax: Math.round(d.ascender / 2)
                }).yMax,
                sCapHeight: bt(e, "HIKLEFJMNTZBDPRAGOQSUVWXY", d).yMax,
                usDefaultChar: e.hasChar(" ") ? 32 : 0,
                usBreakChar: e.hasChar(" ") ? 32 : 0
              }),
              b = Ge(e.glyphs),
              x = j(e.glyphs),
              S = e.getEnglishName("fontFamily"),
              U = e.getEnglishName("fontSubfamily"),
              T = S + " " + U;
            let E = e.getEnglishName("postScriptName");
            E || (E = S.replace(/\s/g, "") + "-" + U);
            const k = {};
            for (let t in e.names) k[t] = e.names[t];
            k.uniqueID || (k.uniqueID = {
              en: e.getEnglishName("manufacturer") + ":" + T
            }), k.postScriptName || (k.postScriptName = {
              en: E
            }), k.preferredFamily || (k.preferredFamily = e.names.fontFamily), k.preferredSubfamily || (k.preferredSubfamily = e.names.fontSubfamily);
            const w = [],
              O = tt(k, w),
              I = w.length > 0 ? Ne(w) : void 0,
              R = it(),
              L = Be(e.glyphs, {
                version: e.getEnglishName("version"),
                fullName: T,
                familyName: S,
                weightName: U,
                postScriptName: E,
                unitsPerEm: e.unitsPerEm,
                fontBBox: [0, d.yMin, d.ascender, d.advanceWidthMax]
              }),
              B = e.metas && Object.keys(e.metas).length > 0 ? dt(e.metas) : void 0,
              C = [g, m, y, v, O, x, R, L, b];
            I && C.push(I), e.tables.gsub && C.push(ft(e.tables.gsub)), B && C.push(B);
            const D = vt(C),
              M = mt(D.encode()),
              P = D.fields;
            let A = !1;
            for (let e = 0; e < P.length; e += 1) if ("head table" === P[e].name) {
              P[e].value.checkSumAdjustment = 2981146554 - M, A = !0;
              break;
            }
            if (!A) throw new Error("Could not find head table with checkSum to adjust.");
            return D;
          };
          function Ut(e, t) {
            let n = 0,
              s = e.length - 1;
            for (; n <= s;) {
              const o = n + s >>> 1,
                r = e[o].tag;
              if (r === t) return o;
              r < t ? n = o + 1 : s = o - 1;
            }
            return -n - 1;
          }
          function Tt(e, t) {
            let n = 0,
              s = e.length - 1;
            for (; n <= s;) {
              const o = n + s >>> 1,
                r = e[o];
              if (r === t) return o;
              r < t ? n = o + 1 : s = o - 1;
            }
            return -n - 1;
          }
          function Et(e, t) {
            let n,
              s = 0,
              o = e.length - 1;
            for (; s <= o;) {
              const r = s + o >>> 1;
              n = e[r];
              const a = n.start;
              if (a === t) return n;
              a < t ? s = r + 1 : o = r - 1;
            }
            if (s > 0) return n = e[s - 1], t > n.end ? 0 : n;
          }
          function kt(e, t) {
            this.font = e, this.tableName = t;
          }
          kt.prototype = {
            searchTag: Ut,
            binSearch: Tt,
            getTable: function (e) {
              let t = this.font.tables[this.tableName];
              return !t && e && (t = this.font.tables[this.tableName] = this.createDefaultTable()), t;
            },
            getScriptNames: function () {
              let e = this.getTable();
              return e ? e.scripts.map(function (e) {
                return e.tag;
              }) : [];
            },
            getDefaultScriptName: function () {
              let e = this.getTable();
              if (!e) return;
              let t = !1;
              for (let n = 0; n < e.scripts.length; n++) {
                const s = e.scripts[n].tag;
                if ("DFLT" === s) return s;
                "latn" === s && (t = !0);
              }
              return t ? "latn" : void 0;
            },
            getScriptTable: function (e, t) {
              const n = this.getTable(t);
              if (n) {
                e = e || "DFLT";
                const s = n.scripts,
                  o = Ut(n.scripts, e);
                if (o >= 0) return s[o].script;
                if (t) {
                  const t = {
                    tag: e,
                    script: {
                      defaultLangSys: {
                        reserved: 0,
                        reqFeatureIndex: 65535,
                        featureIndexes: []
                      },
                      langSysRecords: []
                    }
                  };
                  return s.splice(-1 - o, 0, t), t.script;
                }
              }
            },
            getLangSysTable: function (e, t, n) {
              const s = this.getScriptTable(e, n);
              if (s) {
                if (!t || "dflt" === t || "DFLT" === t) return s.defaultLangSys;
                const e = Ut(s.langSysRecords, t);
                if (e >= 0) return s.langSysRecords[e].langSys;
                if (n) {
                  const n = {
                    tag: t,
                    langSys: {
                      reserved: 0,
                      reqFeatureIndex: 65535,
                      featureIndexes: []
                    }
                  };
                  return s.langSysRecords.splice(-1 - e, 0, n), n.langSys;
                }
              }
            },
            getFeatureTable: function (e, t, n, s) {
              const o = this.getLangSysTable(e, t, s);
              if (o) {
                let e;
                const t = o.featureIndexes,
                  r = this.font.tables[this.tableName].features;
                for (let s = 0; s < t.length; s++) if (e = r[t[s]], e.tag === n) return e.feature;
                if (s) {
                  const s = r.length;
                  return f.assert(0 === s || n >= r[s - 1].tag, "Features must be added in alphabetical order."), e = {
                    tag: n,
                    feature: {
                      params: 0,
                      lookupListIndexes: []
                    }
                  }, r.push(e), t.push(s), e.feature;
                }
              }
            },
            getLookupTables: function (e, t, n, s, o) {
              const r = this.getFeatureTable(e, t, n, o),
                a = [];
              if (r) {
                let e;
                const t = r.lookupListIndexes,
                  n = this.font.tables[this.tableName].lookups;
                for (let o = 0; o < t.length; o++) e = n[t[o]], e.lookupType === s && a.push(e);
                if (0 === a.length && o) {
                  e = {
                    lookupType: s,
                    lookupFlag: 0,
                    subtables: [],
                    markFilteringSet: void 0
                  };
                  const o = n.length;
                  return n.push(e), t.push(o), [e];
                }
              }
              return a;
            },
            getGlyphClass: function (e, t) {
              switch (e.format) {
                case 1:
                  return e.startGlyph <= t && t < e.startGlyph + e.classes.length ? e.classes[t - e.startGlyph] : 0;
                case 2:
                  const n = Et(e.ranges, t);
                  return n ? n.classId : 0;
              }
            },
            getCoverageIndex: function (e, t) {
              switch (e.format) {
                case 1:
                  const n = Tt(e.glyphs, t);
                  return n >= 0 ? n : -1;
                case 2:
                  const s = Et(e.ranges, t);
                  return s ? s.index + t - s.start : -1;
              }
            },
            expandCoverage: function (e) {
              if (1 === e.format) return e.glyphs;
              {
                const t = [],
                  n = e.ranges;
                for (let e = 0; e < n.length; e++) {
                  const s = n[e],
                    o = s.start,
                    r = s.end;
                  for (let e = o; e <= r; e++) t.push(e);
                }
                return t;
              }
            }
          };
          const wt = kt;
          function Ot(e) {
            wt.call(this, e, "gpos");
          }
          Ot.prototype = wt.prototype, Ot.prototype.getKerningValue = function (e, t, n) {
            for (let s = 0; s < e.length; s++) {
              const o = e[s].subtables;
              for (let e = 0; e < o.length; e++) {
                const s = o[e],
                  r = this.getCoverageIndex(s.coverage, t);
                if (!(r < 0)) switch (s.posFormat) {
                  case 1:
                    let e = s.pairSets[r];
                    for (let t = 0; t < e.length; t++) {
                      let s = e[t];
                      if (s.secondGlyph === n) return s.value1 && s.value1.xAdvance || 0;
                    }
                    break;
                  case 2:
                    const o = this.getGlyphClass(s.classDef1, t),
                      a = this.getGlyphClass(s.classDef2, n),
                      i = s.classRecords[o][a];
                    return i.value1 && i.value1.xAdvance || 0;
                }
              }
            }
            return 0;
          }, Ot.prototype.getKerningTables = function (e, t) {
            if (this.font.tables.gpos) return this.getLookupTables(e, t, "kern", 2);
          };
          const It = Ot;
          function Rt(e) {
            wt.call(this, e, "gsub");
          }
          function Lt(e, t) {
            const n = e.length;
            if (n !== t.length) return !1;
            for (let s = 0; s < n; s++) if (e[s] !== t[s]) return !1;
            return !0;
          }
          function Bt(e, t, n) {
            const s = e.subtables;
            for (let e = 0; e < s.length; e++) {
              const n = s[e];
              if (n.substFormat === t) return n;
            }
            if (n) return s.push(n), n;
          }
          Rt.prototype = wt.prototype, Rt.prototype.createDefaultTable = function () {
            return {
              version: 1,
              scripts: [{
                tag: "DFLT",
                script: {
                  defaultLangSys: {
                    reserved: 0,
                    reqFeatureIndex: 65535,
                    featureIndexes: []
                  },
                  langSysRecords: []
                }
              }],
              features: [],
              lookups: []
            };
          }, Rt.prototype.getSingle = function (e, t, n) {
            const s = [],
              o = this.getLookupTables(t, n, e, 1);
            for (let e = 0; e < o.length; e++) {
              const t = o[e].subtables;
              for (let e = 0; e < t.length; e++) {
                const n = t[e],
                  o = this.expandCoverage(n.coverage);
                let r;
                if (1 === n.substFormat) {
                  const e = n.deltaGlyphId;
                  for (r = 0; r < o.length; r++) {
                    const t = o[r];
                    s.push({
                      sub: t,
                      by: t + e
                    });
                  }
                } else {
                  const e = n.substitute;
                  for (r = 0; r < o.length; r++) s.push({
                    sub: o[r],
                    by: e[r]
                  });
                }
              }
            }
            return s;
          }, Rt.prototype.getAlternates = function (e, t, n) {
            const s = [],
              o = this.getLookupTables(t, n, e, 3);
            for (let e = 0; e < o.length; e++) {
              const t = o[e].subtables;
              for (let e = 0; e < t.length; e++) {
                const n = t[e],
                  o = this.expandCoverage(n.coverage),
                  r = n.alternateSets;
                for (let e = 0; e < o.length; e++) s.push({
                  sub: o[e],
                  by: r[e]
                });
              }
            }
            return s;
          }, Rt.prototype.getLigatures = function (e, t, n) {
            const s = [],
              o = this.getLookupTables(t, n, e, 4);
            for (let e = 0; e < o.length; e++) {
              const t = o[e].subtables;
              for (let e = 0; e < t.length; e++) {
                const n = t[e],
                  o = this.expandCoverage(n.coverage),
                  r = n.ligatureSets;
                for (let e = 0; e < o.length; e++) {
                  const t = o[e],
                    n = r[e];
                  for (let e = 0; e < n.length; e++) {
                    const o = n[e];
                    s.push({
                      sub: [t].concat(o.components),
                      by: o.ligGlyph
                    });
                  }
                }
              }
            }
            return s;
          }, Rt.prototype.addSingle = function (e, t, n, s) {
            const o = Bt(this.getLookupTables(n, s, e, 1, !0)[0], 2, {
              substFormat: 2,
              coverage: {
                format: 1,
                glyphs: []
              },
              substitute: []
            });
            f.assert(1 === o.coverage.format, "Ligature: unable to modify coverage table format " + o.coverage.format);
            const r = t.sub;
            let a = this.binSearch(o.coverage.glyphs, r);
            a < 0 && (a = -1 - a, o.coverage.glyphs.splice(a, 0, r), o.substitute.splice(a, 0, 0)), o.substitute[a] = t.by;
          }, Rt.prototype.addAlternate = function (e, t, n, s) {
            const o = Bt(this.getLookupTables(n, s, e, 3, !0)[0], 1, {
              substFormat: 1,
              coverage: {
                format: 1,
                glyphs: []
              },
              alternateSets: []
            });
            f.assert(1 === o.coverage.format, "Ligature: unable to modify coverage table format " + o.coverage.format);
            const r = t.sub;
            let a = this.binSearch(o.coverage.glyphs, r);
            a < 0 && (a = -1 - a, o.coverage.glyphs.splice(a, 0, r), o.alternateSets.splice(a, 0, 0)), o.alternateSets[a] = t.by;
          }, Rt.prototype.addLigature = function (e, t, n, s) {
            const o = this.getLookupTables(n, s, e, 4, !0)[0];
            let r = o.subtables[0];
            r || (r = {
              substFormat: 1,
              coverage: {
                format: 1,
                glyphs: []
              },
              ligatureSets: []
            }, o.subtables[0] = r), f.assert(1 === r.coverage.format, "Ligature: unable to modify coverage table format " + r.coverage.format);
            const a = t.sub[0],
              i = t.sub.slice(1),
              l = {
                ligGlyph: t.by,
                components: i
              };
            let u = this.binSearch(r.coverage.glyphs, a);
            if (u >= 0) {
              const e = r.ligatureSets[u];
              for (let t = 0; t < e.length; t++) if (Lt(e[t].components, i)) return;
              e.push(l);
            } else u = -1 - u, r.coverage.glyphs.splice(u, 0, a), r.ligatureSets.splice(u, 0, [l]);
          }, Rt.prototype.getFeature = function (e, t, n) {
            if (/ss\d\d/.test(e)) return this.getSingle(e, t, n);
            switch (e) {
              case "aalt":
              case "salt":
                return this.getSingle(e, t, n).concat(this.getAlternates(e, t, n));
              case "dlig":
              case "liga":
              case "rlig":
                return this.getLigatures(e, t, n);
            }
          }, Rt.prototype.add = function (e, t, n, s) {
            if (/ss\d\d/.test(e)) return this.addSingle(e, t, n, s);
            switch (e) {
              case "aalt":
              case "salt":
                return "number" == typeof t.by ? this.addSingle(e, t, n, s) : this.addAlternate(e, t, n, s);
              case "dlig":
              case "liga":
              case "rlig":
                return this.addLigature(e, t, n, s);
            }
          };
          const Ct = Rt;
          function Dt(e) {
            const t = new ArrayBuffer(e.length),
              n = new Uint8Array(t);
            for (let t = 0; t < e.length; ++t) n[t] = e[t];
            return t;
          }
          function Mt(e, t) {
            if (!e) throw t;
          }
          let Pt, At, Gt, Nt;
          function Ft(e) {
            this.font = e, this._fpgmState = this._prepState = void 0, this._errorState = 0;
          }
          function _t(e) {
            return e;
          }
          function Ht(e) {
            return Math.sign(e) * Math.round(Math.abs(e));
          }
          function zt(e) {
            return Math.sign(e) * Math.round(Math.abs(2 * e)) / 2;
          }
          function Wt(e) {
            return Math.sign(e) * (Math.round(Math.abs(e) + .5) - .5);
          }
          function qt(e) {
            return Math.sign(e) * Math.ceil(Math.abs(e));
          }
          function jt(e) {
            return Math.sign(e) * Math.floor(Math.abs(e));
          }
          const Xt = function (e) {
              const t = this.srPeriod;
              let n = this.srPhase,
                s = 1;
              return e < 0 && (e = -e, s = -1), e += this.srThreshold - n, e = Math.trunc(e / t) * t, (e += n) < 0 ? n * s : e * s;
            },
            Yt = {
              x: 1,
              y: 0,
              axis: "x",
              distance: function (e, t, n, s) {
                return (n ? e.xo : e.x) - (s ? t.xo : t.x);
              },
              interpolate: function (e, t, n, s) {
                let o, r, a, i, l, u, c;
                if (!s || s === this) return o = e.xo - t.xo, r = e.xo - n.xo, l = t.x - t.xo, u = n.x - n.xo, a = Math.abs(o), i = Math.abs(r), c = a + i, 0 === c ? void (e.x = e.xo + (l + u) / 2) : void (e.x = e.xo + (l * i + u * a) / c);
                o = s.distance(e, t, !0, !0), r = s.distance(e, n, !0, !0), l = s.distance(t, t, !1, !0), u = s.distance(n, n, !1, !0), a = Math.abs(o), i = Math.abs(r), c = a + i, 0 !== c ? Yt.setRelative(e, e, (l * i + u * a) / c, s, !0) : Yt.setRelative(e, e, (l + u) / 2, s, !0);
              },
              normalSlope: Number.NEGATIVE_INFINITY,
              setRelative: function (e, t, n, s, o) {
                if (!s || s === this) return void (e.x = (o ? t.xo : t.x) + n);
                const r = o ? t.xo : t.x,
                  a = o ? t.yo : t.y,
                  i = r + n * s.x,
                  l = a + n * s.y;
                e.x = i + (e.y - l) / s.normalSlope;
              },
              slope: 0,
              touch: function (e) {
                e.xTouched = !0;
              },
              touched: function (e) {
                return e.xTouched;
              },
              untouch: function (e) {
                e.xTouched = !1;
              }
            },
            Vt = {
              x: 0,
              y: 1,
              axis: "y",
              distance: function (e, t, n, s) {
                return (n ? e.yo : e.y) - (s ? t.yo : t.y);
              },
              interpolate: function (e, t, n, s) {
                let o, r, a, i, l, u, c;
                if (!s || s === this) return o = e.yo - t.yo, r = e.yo - n.yo, l = t.y - t.yo, u = n.y - n.yo, a = Math.abs(o), i = Math.abs(r), c = a + i, 0 === c ? void (e.y = e.yo + (l + u) / 2) : void (e.y = e.yo + (l * i + u * a) / c);
                o = s.distance(e, t, !0, !0), r = s.distance(e, n, !0, !0), l = s.distance(t, t, !1, !0), u = s.distance(n, n, !1, !0), a = Math.abs(o), i = Math.abs(r), c = a + i, 0 !== c ? Vt.setRelative(e, e, (l * i + u * a) / c, s, !0) : Vt.setRelative(e, e, (l + u) / 2, s, !0);
              },
              normalSlope: 0,
              setRelative: function (e, t, n, s, o) {
                if (!s || s === this) return void (e.y = (o ? t.yo : t.y) + n);
                const r = o ? t.xo : t.x,
                  a = o ? t.yo : t.y,
                  i = r + n * s.x,
                  l = a + n * s.y;
                e.y = l + s.normalSlope * (e.x - i);
              },
              slope: Number.POSITIVE_INFINITY,
              touch: function (e) {
                e.yTouched = !0;
              },
              touched: function (e) {
                return e.yTouched;
              },
              untouch: function (e) {
                e.yTouched = !1;
              }
            };
          function Zt(e, t) {
            this.x = e, this.y = t, this.axis = void 0, this.slope = t / e, this.normalSlope = -e / t, Object.freeze(this);
          }
          function Qt(e, t) {
            const n = Math.sqrt(e * e + t * t);
            return t /= n, 1 == (e /= n) && 0 === t ? Yt : 0 === e && 1 === t ? Vt : new Zt(e, t);
          }
          function Jt(e, t, n, s) {
            this.x = this.xo = Math.round(64 * e) / 64, this.y = this.yo = Math.round(64 * t) / 64, this.lastPointOfContour = n, this.onCurve = s, this.prevPointOnContour = void 0, this.nextPointOnContour = void 0, this.xTouched = !1, this.yTouched = !1, Object.preventExtensions(this);
          }
          Object.freeze(Yt), Object.freeze(Vt), Zt.prototype.distance = function (e, t, n, s) {
            return this.x * Yt.distance(e, t, n, s) + this.y * Vt.distance(e, t, n, s);
          }, Zt.prototype.interpolate = function (e, t, n, s) {
            let o, r, a, i, l, u, c;
            a = s.distance(e, t, !0, !0), i = s.distance(e, n, !0, !0), o = s.distance(t, t, !1, !0), r = s.distance(n, n, !1, !0), l = Math.abs(a), u = Math.abs(i), c = l + u, 0 !== c ? this.setRelative(e, e, (o * u + r * l) / c, s, !0) : this.setRelative(e, e, (o + r) / 2, s, !0);
          }, Zt.prototype.setRelative = function (e, t, n, s, o) {
            s = s || this;
            const r = o ? t.xo : t.x,
              a = o ? t.yo : t.y,
              i = r + n * s.x,
              l = a + n * s.y,
              u = s.normalSlope,
              c = this.slope,
              p = e.x,
              f = e.y;
            e.x = (c * p - u * i + l - f) / (c - u), e.y = c * (e.x - p) + f;
          }, Zt.prototype.touch = function (e) {
            e.xTouched = !0, e.yTouched = !0;
          }, Jt.prototype.nextTouched = function (e) {
            let t = this.nextPointOnContour;
            for (; !e.touched(t) && t !== this;) t = t.nextPointOnContour;
            return t;
          }, Jt.prototype.prevTouched = function (e) {
            let t = this.prevPointOnContour;
            for (; !e.touched(t) && t !== this;) t = t.prevPointOnContour;
            return t;
          };
          const Kt = Object.freeze(new Jt(0, 0)),
            $t = {
              cvCutIn: 17 / 16,
              deltaBase: 9,
              deltaShift: .125,
              loop: 1,
              minDis: 1,
              autoFlip: !0
            };
          function en(e, t) {
            switch (this.env = e, this.stack = [], this.prog = t, e) {
              case "glyf":
                this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
              case "prep":
                this.fv = this.pv = this.dpv = Yt, this.round = Ht;
            }
          }
          function tn(e) {
            const t = e.tZone = new Array(e.gZone.length);
            for (let e = 0; e < t.length; e++) t[e] = new Jt(0, 0);
          }
          function nn(e, t) {
            const n = e.prog;
            let s,
              o = e.ip,
              r = 1;
            do {
              if (s = n[++o], 88 === s) r++;else if (89 === s) r--;else if (64 === s) o += n[o + 1] + 1;else if (65 === s) o += 2 * n[o + 1] + 1;else if (s >= 176 && s <= 183) o += s - 176 + 1;else if (s >= 184 && s <= 191) o += 2 * (s - 184 + 1);else if (t && 1 === r && 27 === s) break;
            } while (r > 0);
            e.ip = o;
          }
          function sn(e, t) {
            exports.DEBUG && console.log(t.step, "SVTCA[" + e.axis + "]"), t.fv = t.pv = t.dpv = e;
          }
          function on(e, t) {
            exports.DEBUG && console.log(t.step, "SPVTCA[" + e.axis + "]"), t.pv = t.dpv = e;
          }
          function rn(e, t) {
            exports.DEBUG && console.log(t.step, "SFVTCA[" + e.axis + "]"), t.fv = e;
          }
          function an(e, t) {
            const n = t.stack,
              s = n.pop(),
              o = n.pop(),
              r = t.z2[s],
              a = t.z1[o];
            let i, l;
            exports.DEBUG && console.log("SPVTL[" + e + "]", s, o), e ? (i = r.y - a.y, l = a.x - r.x) : (i = a.x - r.x, l = a.y - r.y), t.pv = t.dpv = Qt(i, l);
          }
          function ln(e, t) {
            const n = t.stack,
              s = n.pop(),
              o = n.pop(),
              r = t.z2[s],
              a = t.z1[o];
            let i, l;
            exports.DEBUG && console.log("SFVTL[" + e + "]", s, o), e ? (i = r.y - a.y, l = a.x - r.x) : (i = a.x - r.x, l = a.y - r.y), t.fv = Qt(i, l);
          }
          function un(e) {
            exports.DEBUG && console.log(e.step, "POP[]"), e.stack.pop();
          }
          function cn(e, t) {
            const n = t.stack.pop(),
              s = t.z0[n],
              o = t.fv,
              r = t.pv;
            exports.DEBUG && console.log(t.step, "MDAP[" + e + "]", n);
            let a = r.distance(s, Kt);
            e && (a = t.round(a)), o.setRelative(s, Kt, a, r), o.touch(s), t.rp0 = t.rp1 = n;
          }
          function pn(e, t) {
            const n = t.z2,
              s = n.length - 2;
            let o, r, a;
            exports.DEBUG && console.log(t.step, "IUP[" + e.axis + "]");
            for (let t = 0; t < s; t++) o = n[t], e.touched(o) || (r = o.prevTouched(e), r !== o && (a = o.nextTouched(e), r === a && e.setRelative(o, o, e.distance(r, r, !1, !0), e, !0), e.interpolate(o, r, a, e)));
          }
          function fn(e, t) {
            const n = t.stack,
              s = e ? t.rp1 : t.rp2,
              o = (e ? t.z0 : t.z1)[s],
              r = t.fv,
              a = t.pv;
            let i = t.loop;
            const l = t.z2;
            for (; i--;) {
              const s = n.pop(),
                u = l[s],
                c = a.distance(o, o, !1, !0);
              r.setRelative(u, u, c, a), r.touch(u), exports.DEBUG && console.log(t.step, (t.loop > 1 ? "loop " + (t.loop - i) + ": " : "") + "SHP[" + (e ? "rp1" : "rp2") + "]", s);
            }
            t.loop = 1;
          }
          function hn(e, t) {
            const n = t.stack,
              s = e ? t.rp1 : t.rp2,
              o = (e ? t.z0 : t.z1)[s],
              r = t.fv,
              a = t.pv,
              i = n.pop(),
              l = t.z2[t.contours[i]];
            let u = l;
            exports.DEBUG && console.log(t.step, "SHC[" + e + "]", i);
            const c = a.distance(o, o, !1, !0);
            do {
              u !== o && r.setRelative(u, u, c, a), u = u.nextPointOnContour;
            } while (u !== l);
          }
          function dn(e, t) {
            const n = t.stack,
              s = e ? t.rp1 : t.rp2,
              o = (e ? t.z0 : t.z1)[s],
              r = t.fv,
              a = t.pv,
              i = n.pop();
            let l, u;
            switch (exports.DEBUG && console.log(t.step, "SHZ[" + e + "]", i), i) {
              case 0:
                l = t.tZone;
                break;
              case 1:
                l = t.gZone;
                break;
              default:
                throw new Error("Invalid zone");
            }
            const c = a.distance(o, o, !1, !0),
              p = l.length - 2;
            for (let e = 0; e < p; e++) u = l[e], r.setRelative(u, u, c, a);
          }
          function gn(e, t) {
            const n = t.stack,
              s = n.pop() / 64,
              o = n.pop(),
              r = t.z1[o],
              a = t.z0[t.rp0],
              i = t.fv,
              l = t.pv;
            i.setRelative(r, a, s, l), i.touch(r), exports.DEBUG && console.log(t.step, "MSIRP[" + e + "]", s, o), t.rp1 = t.rp0, t.rp2 = o, e && (t.rp0 = o);
          }
          function mn(e, t) {
            const n = t.stack,
              s = n.pop(),
              o = n.pop(),
              r = t.z0[o],
              a = t.fv,
              i = t.pv;
            let l = t.cvt[s];
            exports.DEBUG && console.log(t.step, "MIAP[" + e + "]", s, "(", l, ")", o);
            let u = i.distance(r, Kt);
            e && (Math.abs(u - l) < t.cvCutIn && (u = l), u = t.round(u)), a.setRelative(r, Kt, u, i), 0 === t.zp0 && (r.xo = r.x, r.yo = r.y), a.touch(r), t.rp0 = t.rp1 = o;
          }
          function yn(e, t) {
            const n = t.stack,
              s = n.pop(),
              o = t.z2[s];
            exports.DEBUG && console.log(t.step, "GC[" + e + "]", s), n.push(64 * t.dpv.distance(o, Kt, e, !1));
          }
          function vn(e, t) {
            const n = t.stack,
              s = n.pop(),
              o = n.pop(),
              r = t.z1[s],
              a = t.z0[o],
              i = t.dpv.distance(a, r, e, e);
            exports.DEBUG && console.log(t.step, "MD[" + e + "]", s, o, "->", i), t.stack.push(Math.round(64 * i));
          }
          function bn(e, t) {
            const n = t.stack,
              s = n.pop(),
              o = t.fv,
              r = t.pv,
              a = t.ppem,
              i = t.deltaBase + 16 * (e - 1),
              l = t.deltaShift,
              u = t.z0;
            exports.DEBUG && console.log(t.step, "DELTAP[" + e + "]", s, n);
            for (let e = 0; e < s; e++) {
              const e = n.pop(),
                s = n.pop();
              if (i + ((240 & s) >> 4) !== a) continue;
              let c = (15 & s) - 8;
              c >= 0 && c++, exports.DEBUG && console.log(t.step, "DELTAPFIX", e, "by", c * l);
              const p = u[e];
              o.setRelative(p, p, c * l, r);
            }
          }
          function xn(e, t) {
            const n = t.stack,
              s = n.pop();
            exports.DEBUG && console.log(t.step, "ROUND[]"), n.push(64 * t.round(s / 64));
          }
          function Sn(e, t) {
            const n = t.stack,
              s = n.pop(),
              o = t.ppem,
              r = t.deltaBase + 16 * (e - 1),
              a = t.deltaShift;
            exports.DEBUG && console.log(t.step, "DELTAC[" + e + "]", s, n);
            for (let e = 0; e < s; e++) {
              const e = n.pop(),
                s = n.pop();
              if (r + ((240 & s) >> 4) !== o) continue;
              let i = (15 & s) - 8;
              i >= 0 && i++;
              const l = i * a;
              exports.DEBUG && console.log(t.step, "DELTACFIX", e, "by", l), t.cvt[e] += l;
            }
          }
          function Un(e, t) {
            const n = t.stack,
              s = n.pop(),
              o = n.pop(),
              r = t.z2[s],
              a = t.z1[o];
            let i, l;
            exports.DEBUG && console.log(t.step, "SDPVTL[" + e + "]", s, o), e ? (i = r.y - a.y, l = a.x - r.x) : (i = a.x - r.x, l = a.y - r.y), t.dpv = Qt(i, l);
          }
          function Tn(e, t) {
            const n = t.stack,
              s = t.prog;
            let o = t.ip;
            exports.DEBUG && console.log(t.step, "PUSHB[" + e + "]");
            for (let t = 0; t < e; t++) n.push(s[++o]);
            t.ip = o;
          }
          function En(e, t) {
            let n = t.ip;
            const s = t.prog,
              o = t.stack;
            exports.DEBUG && console.log(t.ip, "PUSHW[" + e + "]");
            for (let t = 0; t < e; t++) {
              let e = s[++n] << 8 | s[++n];
              32768 & e && (e = -(1 + (65535 ^ e))), o.push(e);
            }
            t.ip = n;
          }
          function kn(e, t, n, s, o, r) {
            const a = r.stack,
              i = e && a.pop(),
              l = a.pop(),
              u = r.rp0,
              c = r.z0[u],
              p = r.z1[l],
              f = r.minDis,
              h = r.fv,
              d = r.dpv;
            let g, m, y, v;
            m = g = d.distance(p, c, !0, !0), y = m >= 0 ? 1 : -1, m = Math.abs(m), e && (v = r.cvt[i], s && Math.abs(m - v) < r.cvCutIn && (m = v)), n && m < f && (m = f), s && (m = r.round(m)), h.setRelative(p, c, y * m, d), h.touch(p), exports.DEBUG && console.log(r.step, (e ? "MIRP[" : "MDRP[") + (t ? "M" : "m") + (n ? ">" : "_") + (s ? "R" : "_") + (0 === o ? "Gr" : 1 === o ? "Bl" : 2 === o ? "Wh" : "") + "]", e ? i + "(" + r.cvt[i] + "," + v + ")" : "", l, "(d =", g, "->", y * m, ")"), r.rp1 = r.rp0, r.rp2 = l, t && (r.rp0 = l);
          }
          Ft.prototype.exec = function (e, t) {
            if ("number" != typeof t) throw new Error("Point size is not a number!");
            if (this._errorState > 2) return;
            const n = this.font;
            let s = this._prepState;
            if (!s || s.ppem !== t) {
              let e = this._fpgmState;
              if (!e) {
                en.prototype = $t, e = this._fpgmState = new en("fpgm", n.tables.fpgm), e.funcs = [], e.font = n, exports.DEBUG && (console.log("---EXEC FPGM---"), e.step = -1);
                try {
                  At(e);
                } catch (e) {
                  return console.log("Hinting error in FPGM:" + e), void (this._errorState = 3);
                }
              }
              en.prototype = e, s = this._prepState = new en("prep", n.tables.prep), s.ppem = t;
              const o = n.tables.cvt;
              if (o) {
                const e = s.cvt = new Array(o.length),
                  r = t / n.unitsPerEm;
                for (let t = 0; t < o.length; t++) e[t] = o[t] * r;
              } else s.cvt = [];
              exports.DEBUG && (console.log("---EXEC PREP---"), s.step = -1);
              try {
                At(s);
              } catch (e) {
                this._errorState < 2 && console.log("Hinting error in PREP:" + e), this._errorState = 2;
              }
            }
            if (!(this._errorState > 1)) try {
              return Gt(e, s);
            } catch (e) {
              return this._errorState < 1 && (console.log("Hinting error:" + e), console.log("Note: further hinting errors are silenced")), void (this._errorState = 1);
            }
          }, Gt = function (e, t) {
            const n = t.ppem / t.font.unitsPerEm,
              s = n;
            let o,
              r,
              a,
              i = e.components;
            if (en.prototype = t, i) {
              const l = t.font;
              r = [], o = [];
              for (let e = 0; e < i.length; e++) {
                const t = i[e],
                  u = l.glyphs.get(t.glyphIndex);
                a = new en("glyf", u.instructions), exports.DEBUG && (console.log("---EXEC COMP " + e + "---"), a.step = -1), Nt(u, a, n, s);
                const c = Math.round(t.dx * n),
                  p = Math.round(t.dy * s),
                  f = a.gZone,
                  h = a.contours;
                for (let e = 0; e < f.length; e++) {
                  const t = f[e];
                  t.xTouched = t.yTouched = !1, t.xo = t.x = t.x + c, t.yo = t.y = t.y + p;
                }
                const d = r.length;
                r.push.apply(r, f);
                for (let e = 0; e < h.length; e++) o.push(h[e] + d);
              }
              e.instructions && !a.inhibitGridFit && (a = new en("glyf", e.instructions), a.gZone = a.z0 = a.z1 = a.z2 = r, a.contours = o, r.push(new Jt(0, 0), new Jt(Math.round(e.advanceWidth * n), 0)), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), a.step = -1), At(a), r.length -= 2);
            } else a = new en("glyf", e.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), a.step = -1), Nt(e, a, n, s), r = a.gZone;
            return r;
          }, Nt = function (e, t, n, s) {
            const o = e.points || [],
              r = o.length,
              a = t.gZone = t.z0 = t.z1 = t.z2 = [],
              i = t.contours = [];
            let l, u, c;
            for (let e = 0; e < r; e++) l = o[e], a[e] = new Jt(l.x * n, l.y * s, l.lastPointOfContour, l.onCurve);
            for (let e = 0; e < r; e++) l = a[e], u || (u = l, i.push(e)), l.lastPointOfContour ? (l.nextPointOnContour = u, u.prevPointOnContour = l, u = void 0) : (c = a[e + 1], l.nextPointOnContour = c, c.prevPointOnContour = l);
            if (!t.inhibitGridFit) {
              if (exports.DEBUG) {
                console.log("PROCESSING GLYPH", t.stack);
                for (let e = 0; e < r; e++) console.log(e, a[e].x, a[e].y);
              }
              if (a.push(new Jt(0, 0), new Jt(Math.round(e.advanceWidth * n), 0)), At(t), a.length -= 2, exports.DEBUG) {
                console.log("FINISHED GLYPH", t.stack);
                for (let e = 0; e < r; e++) console.log(e, a[e].x, a[e].y);
              }
            }
          }, At = function (e) {
            let t = e.prog;
            if (!t) return;
            const n = t.length;
            let s;
            for (e.ip = 0; e.ip < n; e.ip++) {
              if (exports.DEBUG && e.step++, s = Pt[t[e.ip]], !s) throw new Error("unknown instruction: 0x" + Number(t[e.ip]).toString(16));
              s(e);
            }
          }, Pt = [sn.bind(void 0, Vt), sn.bind(void 0, Yt), on.bind(void 0, Vt), on.bind(void 0, Yt), rn.bind(void 0, Vt), rn.bind(void 0, Yt), an.bind(void 0, 0), an.bind(void 0, 1), ln.bind(void 0, 0), ln.bind(void 0, 1), function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "SPVFS[]", n, s), e.pv = e.dpv = Qt(s, n);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "SPVFS[]", n, s), e.fv = Qt(s, n);
          }, function (e) {
            const t = e.stack,
              n = e.pv;
            exports.DEBUG && console.log(e.step, "GPV[]"), t.push(16384 * n.x), t.push(16384 * n.y);
          }, function (e) {
            const t = e.stack,
              n = e.fv;
            exports.DEBUG && console.log(e.step, "GFV[]"), t.push(16384 * n.x), t.push(16384 * n.y);
          }, function (e) {
            e.fv = e.pv, exports.DEBUG && console.log(e.step, "SFVTPV[]");
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop(),
              o = t.pop(),
              r = t.pop(),
              a = t.pop(),
              i = e.z0,
              l = e.z1,
              u = i[n],
              c = i[s],
              p = l[o],
              f = l[r],
              h = e.z2[a];
            exports.DEBUG && console.log("ISECT[], ", n, s, o, r, a);
            const d = u.x,
              g = u.y,
              m = c.x,
              y = c.y,
              v = p.x,
              b = p.y,
              x = f.x,
              S = f.y,
              U = (d - m) * (b - S) - (g - y) * (v - x),
              T = d * y - g * m,
              E = v * S - b * x;
            h.x = (T * (v - x) - E * (d - m)) / U, h.y = (T * (b - S) - E * (g - y)) / U;
          }, function (e) {
            e.rp0 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP0[]", e.rp0);
          }, function (e) {
            e.rp1 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP1[]", e.rp1);
          }, function (e) {
            e.rp2 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP2[]", e.rp2);
          }, function (e) {
            const t = e.stack.pop();
            switch (exports.DEBUG && console.log(e.step, "SZP0[]", t), e.zp0 = t, t) {
              case 0:
                e.tZone || tn(e), e.z0 = e.tZone;
                break;
              case 1:
                e.z0 = e.gZone;
                break;
              default:
                throw new Error("Invalid zone pointer");
            }
          }, function (e) {
            const t = e.stack.pop();
            switch (exports.DEBUG && console.log(e.step, "SZP1[]", t), e.zp1 = t, t) {
              case 0:
                e.tZone || tn(e), e.z1 = e.tZone;
                break;
              case 1:
                e.z1 = e.gZone;
                break;
              default:
                throw new Error("Invalid zone pointer");
            }
          }, function (e) {
            const t = e.stack.pop();
            switch (exports.DEBUG && console.log(e.step, "SZP2[]", t), e.zp2 = t, t) {
              case 0:
                e.tZone || tn(e), e.z2 = e.tZone;
                break;
              case 1:
                e.z2 = e.gZone;
                break;
              default:
                throw new Error("Invalid zone pointer");
            }
          }, function (e) {
            const t = e.stack.pop();
            switch (exports.DEBUG && console.log(e.step, "SZPS[]", t), e.zp0 = e.zp1 = e.zp2 = t, t) {
              case 0:
                e.tZone || tn(e), e.z0 = e.z1 = e.z2 = e.tZone;
                break;
              case 1:
                e.z0 = e.z1 = e.z2 = e.gZone;
                break;
              default:
                throw new Error("Invalid zone pointer");
            }
          }, function (e) {
            e.loop = e.stack.pop(), exports.DEBUG && console.log(e.step, "SLOOP[]", e.loop);
          }, function (e) {
            exports.DEBUG && console.log(e.step, "RTG[]"), e.round = Ht;
          }, function (e) {
            exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Wt;
          }, function (e) {
            const t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "SMD[]", t), e.minDis = t / 64;
          }, function (e) {
            exports.DEBUG && console.log(e.step, "ELSE[]"), nn(e, !1);
          }, function (e) {
            const t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "JMPR[]", t), e.ip += t - 1;
          }, function (e) {
            const t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "SCVTCI[]", t), e.cvCutIn = t / 64;
          }, void 0, void 0, function (e) {
            const t = e.stack;
            exports.DEBUG && console.log(e.step, "DUP[]"), t.push(t[t.length - 1]);
          }, un, function (e) {
            exports.DEBUG && console.log(e.step, "CLEAR[]"), e.stack.length = 0;
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "SWAP[]"), t.push(n), t.push(s);
          }, function (e) {
            const t = e.stack;
            exports.DEBUG && console.log(e.step, "DEPTH[]"), t.push(t.length);
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "CINDEX[]", n), t.push(t[t.length - n]);
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "MINDEX[]", n), t.push(t.splice(t.length - n, 1)[0]);
          }, void 0, void 0, void 0, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "LOOPCALL[]", n, s);
            const o = e.ip,
              r = e.prog;
            e.prog = e.funcs[n];
            for (let t = 0; t < s; t++) At(e), exports.DEBUG && console.log(++e.step, t + 1 < s ? "next loopcall" : "done loopcall", t);
            e.ip = o, e.prog = r;
          }, function (e) {
            const t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "CALL[]", t);
            const n = e.ip,
              s = e.prog;
            e.prog = e.funcs[t], At(e), e.ip = n, e.prog = s, exports.DEBUG && console.log(++e.step, "returning from", t);
          }, function (e) {
            if ("fpgm" !== e.env) throw new Error("FDEF not allowed here");
            const t = e.stack,
              n = e.prog;
            let s = e.ip;
            const o = t.pop(),
              r = s;
            for (exports.DEBUG && console.log(e.step, "FDEF[]", o); 45 !== n[++s];);
            e.ip = s, e.funcs[o] = n.slice(r + 1, s);
          }, void 0, cn.bind(void 0, 0), cn.bind(void 0, 1), pn.bind(void 0, Vt), pn.bind(void 0, Yt), fn.bind(void 0, 0), fn.bind(void 0, 1), hn.bind(void 0, 0), hn.bind(void 0, 1), dn.bind(void 0, 0), dn.bind(void 0, 1), function (e) {
            const t = e.stack;
            let n = e.loop;
            const s = e.fv,
              o = t.pop() / 64,
              r = e.z2;
            for (; n--;) {
              const a = t.pop(),
                i = r[a];
              exports.DEBUG && console.log(e.step, (e.loop > 1 ? "loop " + (e.loop - n) + ": " : "") + "SHPIX[]", a, o), s.setRelative(i, i, o), s.touch(i);
            }
            e.loop = 1;
          }, function (e) {
            const t = e.stack,
              n = e.rp1,
              s = e.rp2;
            let o = e.loop;
            const r = e.z0[n],
              a = e.z1[s],
              i = e.fv,
              l = e.dpv,
              u = e.z2;
            for (; o--;) {
              const c = t.pop(),
                p = u[c];
              exports.DEBUG && console.log(e.step, (e.loop > 1 ? "loop " + (e.loop - o) + ": " : "") + "IP[]", c, n, "<->", s), i.interpolate(p, r, a, l), i.touch(p);
            }
            e.loop = 1;
          }, gn.bind(void 0, 0), gn.bind(void 0, 1), function (e) {
            const t = e.stack,
              n = e.rp0,
              s = e.z0[n];
            let o = e.loop;
            const r = e.fv,
              a = e.pv,
              i = e.z1;
            for (; o--;) {
              const n = t.pop(),
                l = i[n];
              exports.DEBUG && console.log(e.step, (e.loop > 1 ? "loop " + (e.loop - o) + ": " : "") + "ALIGNRP[]", n), r.setRelative(l, s, 0, a), r.touch(l);
            }
            e.loop = 1;
          }, function (e) {
            exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = zt;
          }, mn.bind(void 0, 0), mn.bind(void 0, 1), function (e) {
            const t = e.prog;
            let n = e.ip;
            const s = e.stack,
              o = t[++n];
            exports.DEBUG && console.log(e.step, "NPUSHB[]", o);
            for (let e = 0; e < o; e++) s.push(t[++n]);
            e.ip = n;
          }, function (e) {
            let t = e.ip;
            const n = e.prog,
              s = e.stack,
              o = n[++t];
            exports.DEBUG && console.log(e.step, "NPUSHW[]", o);
            for (let e = 0; e < o; e++) {
              let e = n[++t] << 8 | n[++t];
              32768 & e && (e = -(1 + (65535 ^ e))), s.push(e);
            }
            e.ip = t;
          }, function (e) {
            const t = e.stack;
            let n = e.store;
            n || (n = e.store = []);
            const s = t.pop(),
              o = t.pop();
            exports.DEBUG && console.log(e.step, "WS", s, o), n[o] = s;
          }, function (e) {
            const t = e.stack,
              n = e.store,
              s = t.pop();
            exports.DEBUG && console.log(e.step, "RS", s);
            const o = n && n[s] || 0;
            t.push(o);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "WCVTP", n, s), e.cvt[s] = n / 64;
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "RCVT", n), t.push(64 * e.cvt[n]);
          }, yn.bind(void 0, 0), yn.bind(void 0, 1), void 0, vn.bind(void 0, 0), vn.bind(void 0, 1), function (e) {
            exports.DEBUG && console.log(e.step, "MPPEM[]"), e.stack.push(e.ppem);
          }, void 0, function (e) {
            exports.DEBUG && console.log(e.step, "FLIPON[]"), e.autoFlip = !0;
          }, void 0, void 0, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "LT[]", n, s), t.push(s < n ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "LTEQ[]", n, s), t.push(s <= n ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "GT[]", n, s), t.push(s > n ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "GTEQ[]", n, s), t.push(s >= n ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "EQ[]", n, s), t.push(n === s ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "NEQ[]", n, s), t.push(n !== s ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "ODD[]", n), t.push(Math.trunc(n) % 2 ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "EVEN[]", n), t.push(Math.trunc(n) % 2 ? 0 : 1);
          }, function (e) {
            let t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "IF[]", t), t || (nn(e, !0), exports.DEBUG && console.log(e.step, "EIF[]"));
          }, function (e) {
            exports.DEBUG && console.log(e.step, "EIF[]");
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "AND[]", n, s), t.push(n && s ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "OR[]", n, s), t.push(n || s ? 1 : 0);
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "NOT[]", n), t.push(n ? 0 : 1);
          }, bn.bind(void 0, 1), function (e) {
            const t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "SDB[]", t), e.deltaBase = t;
          }, function (e) {
            const t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "SDS[]", t), e.deltaShift = Math.pow(.5, t);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "ADD[]", n, s), t.push(s + n);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "SUB[]", n, s), t.push(s - n);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "DIV[]", n, s), t.push(64 * s / n);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "MUL[]", n, s), t.push(s * n / 64);
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "ABS[]", n), t.push(Math.abs(n));
          }, function (e) {
            const t = e.stack;
            let n = t.pop();
            exports.DEBUG && console.log(e.step, "NEG[]", n), t.push(-n);
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "FLOOR[]", n), t.push(64 * Math.floor(n / 64));
          }, function (e) {
            const t = e.stack,
              n = t.pop();
            exports.DEBUG && console.log(e.step, "CEILING[]", n), t.push(64 * Math.ceil(n / 64));
          }, xn.bind(void 0, 0), xn.bind(void 0, 1), xn.bind(void 0, 2), xn.bind(void 0, 3), void 0, void 0, void 0, void 0, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "WCVTF[]", n, s), e.cvt[s] = n * e.ppem / e.font.unitsPerEm;
          }, bn.bind(void 0, 2), bn.bind(void 0, 3), Sn.bind(void 0, 1), Sn.bind(void 0, 2), Sn.bind(void 0, 3), function (e) {
            let t,
              n = e.stack.pop();
            switch (exports.DEBUG && console.log(e.step, "SROUND[]", n), e.round = Xt, 192 & n) {
              case 0:
                t = .5;
                break;
              case 64:
                t = 1;
                break;
              case 128:
                t = 2;
                break;
              default:
                throw new Error("invalid SROUND value");
            }
            switch (e.srPeriod = t, 48 & n) {
              case 0:
                e.srPhase = 0;
                break;
              case 16:
                e.srPhase = .25 * t;
                break;
              case 32:
                e.srPhase = .5 * t;
                break;
              case 48:
                e.srPhase = .75 * t;
                break;
              default:
                throw new Error("invalid SROUND value");
            }
            n &= 15, e.srThreshold = 0 === n ? 0 : (n / 8 - .5) * t;
          }, function (e) {
            let t,
              n = e.stack.pop();
            switch (exports.DEBUG && console.log(e.step, "S45ROUND[]", n), e.round = Xt, 192 & n) {
              case 0:
                t = Math.sqrt(2) / 2;
                break;
              case 64:
                t = Math.sqrt(2);
                break;
              case 128:
                t = 2 * Math.sqrt(2);
                break;
              default:
                throw new Error("invalid S45ROUND value");
            }
            switch (e.srPeriod = t, 48 & n) {
              case 0:
                e.srPhase = 0;
                break;
              case 16:
                e.srPhase = .25 * t;
                break;
              case 32:
                e.srPhase = .5 * t;
                break;
              case 48:
                e.srPhase = .75 * t;
                break;
              default:
                throw new Error("invalid S45ROUND value");
            }
            n &= 15, e.srThreshold = 0 === n ? 0 : (n / 8 - .5) * t;
          }, void 0, void 0, function (e) {
            exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = _t;
          }, void 0, function (e) {
            exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = qt;
          }, function (e) {
            exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = jt;
          }, un, un, void 0, void 0, void 0, void 0, void 0, function (e) {
            const t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "SCANCTRL[]", t);
          }, Un.bind(void 0, 0), Un.bind(void 0, 1), function (e) {
            const t = e.stack,
              n = t.pop();
            let s = 0;
            exports.DEBUG && console.log(e.step, "GETINFO[]", n), 1 & n && (s = 35), 32 & n && (s |= 4096), t.push(s);
          }, void 0, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop(),
              o = t.pop();
            exports.DEBUG && console.log(e.step, "ROLL[]"), t.push(s), t.push(n), t.push(o);
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "MAX[]", n, s), t.push(Math.max(s, n));
          }, function (e) {
            const t = e.stack,
              n = t.pop(),
              s = t.pop();
            exports.DEBUG && console.log(e.step, "MIN[]", n, s), t.push(Math.min(s, n));
          }, function (e) {
            const t = e.stack.pop();
            exports.DEBUG && console.log(e.step, "SCANTYPE[]", t);
          }, function (e) {
            const t = e.stack.pop();
            let n = e.stack.pop();
            switch (exports.DEBUG && console.log(e.step, "INSTCTRL[]", t, n), t) {
              case 1:
                return void (e.inhibitGridFit = !!n);
              case 2:
                return void (e.ignoreCvt = !!n);
              default:
                throw new Error("invalid INSTCTRL[] selector");
            }
          }, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, Tn.bind(void 0, 1), Tn.bind(void 0, 2), Tn.bind(void 0, 3), Tn.bind(void 0, 4), Tn.bind(void 0, 5), Tn.bind(void 0, 6), Tn.bind(void 0, 7), Tn.bind(void 0, 8), En.bind(void 0, 1), En.bind(void 0, 2), En.bind(void 0, 3), En.bind(void 0, 4), En.bind(void 0, 5), En.bind(void 0, 6), En.bind(void 0, 7), En.bind(void 0, 8), kn.bind(void 0, 0, 0, 0, 0, 0), kn.bind(void 0, 0, 0, 0, 0, 1), kn.bind(void 0, 0, 0, 0, 0, 2), kn.bind(void 0, 0, 0, 0, 0, 3), kn.bind(void 0, 0, 0, 0, 1, 0), kn.bind(void 0, 0, 0, 0, 1, 1), kn.bind(void 0, 0, 0, 0, 1, 2), kn.bind(void 0, 0, 0, 0, 1, 3), kn.bind(void 0, 0, 0, 1, 0, 0), kn.bind(void 0, 0, 0, 1, 0, 1), kn.bind(void 0, 0, 0, 1, 0, 2), kn.bind(void 0, 0, 0, 1, 0, 3), kn.bind(void 0, 0, 0, 1, 1, 0), kn.bind(void 0, 0, 0, 1, 1, 1), kn.bind(void 0, 0, 0, 1, 1, 2), kn.bind(void 0, 0, 0, 1, 1, 3), kn.bind(void 0, 0, 1, 0, 0, 0), kn.bind(void 0, 0, 1, 0, 0, 1), kn.bind(void 0, 0, 1, 0, 0, 2), kn.bind(void 0, 0, 1, 0, 0, 3), kn.bind(void 0, 0, 1, 0, 1, 0), kn.bind(void 0, 0, 1, 0, 1, 1), kn.bind(void 0, 0, 1, 0, 1, 2), kn.bind(void 0, 0, 1, 0, 1, 3), kn.bind(void 0, 0, 1, 1, 0, 0), kn.bind(void 0, 0, 1, 1, 0, 1), kn.bind(void 0, 0, 1, 1, 0, 2), kn.bind(void 0, 0, 1, 1, 0, 3), kn.bind(void 0, 0, 1, 1, 1, 0), kn.bind(void 0, 0, 1, 1, 1, 1), kn.bind(void 0, 0, 1, 1, 1, 2), kn.bind(void 0, 0, 1, 1, 1, 3), kn.bind(void 0, 1, 0, 0, 0, 0), kn.bind(void 0, 1, 0, 0, 0, 1), kn.bind(void 0, 1, 0, 0, 0, 2), kn.bind(void 0, 1, 0, 0, 0, 3), kn.bind(void 0, 1, 0, 0, 1, 0), kn.bind(void 0, 1, 0, 0, 1, 1), kn.bind(void 0, 1, 0, 0, 1, 2), kn.bind(void 0, 1, 0, 0, 1, 3), kn.bind(void 0, 1, 0, 1, 0, 0), kn.bind(void 0, 1, 0, 1, 0, 1), kn.bind(void 0, 1, 0, 1, 0, 2), kn.bind(void 0, 1, 0, 1, 0, 3), kn.bind(void 0, 1, 0, 1, 1, 0), kn.bind(void 0, 1, 0, 1, 1, 1), kn.bind(void 0, 1, 0, 1, 1, 2), kn.bind(void 0, 1, 0, 1, 1, 3), kn.bind(void 0, 1, 1, 0, 0, 0), kn.bind(void 0, 1, 1, 0, 0, 1), kn.bind(void 0, 1, 1, 0, 0, 2), kn.bind(void 0, 1, 1, 0, 0, 3), kn.bind(void 0, 1, 1, 0, 1, 0), kn.bind(void 0, 1, 1, 0, 1, 1), kn.bind(void 0, 1, 1, 0, 1, 2), kn.bind(void 0, 1, 1, 0, 1, 3), kn.bind(void 0, 1, 1, 1, 0, 0), kn.bind(void 0, 1, 1, 1, 0, 1), kn.bind(void 0, 1, 1, 1, 0, 2), kn.bind(void 0, 1, 1, 1, 0, 3), kn.bind(void 0, 1, 1, 1, 1, 0), kn.bind(void 0, 1, 1, 1, 1, 1), kn.bind(void 0, 1, 1, 1, 1, 2), kn.bind(void 0, 1, 1, 1, 1, 3)];
          const wn = Ft;
          function On(e) {
            (e = e || {}).empty || (Mt(e.familyName, "When creating a new Font object, familyName is required."), Mt(e.styleName, "When creating a new Font object, styleName is required."), Mt(e.unitsPerEm, "When creating a new Font object, unitsPerEm is required."), Mt(e.ascender, "When creating a new Font object, ascender is required."), Mt(e.descender, "When creating a new Font object, descender is required."), Mt(e.descender < 0, "Descender should be negative (e.g. -512)."), this.names = {
              fontFamily: {
                en: e.familyName || " "
              },
              fontSubfamily: {
                en: e.styleName || " "
              },
              fullName: {
                en: e.fullName || e.familyName + " " + e.styleName
              },
              postScriptName: {
                en: e.postScriptName || e.familyName + e.styleName
              },
              designer: {
                en: e.designer || " "
              },
              designerURL: {
                en: e.designerURL || " "
              },
              manufacturer: {
                en: e.manufacturer || " "
              },
              manufacturerURL: {
                en: e.manufacturerURL || " "
              },
              license: {
                en: e.license || " "
              },
              licenseURL: {
                en: e.licenseURL || " "
              },
              version: {
                en: e.version || "Version 0.1"
              },
              description: {
                en: e.description || " "
              },
              copyright: {
                en: e.copyright || " "
              },
              trademark: {
                en: e.trademark || " "
              }
            }, this.unitsPerEm = e.unitsPerEm || 1e3, this.ascender = e.ascender, this.descender = e.descender, this.createdTimestamp = e.createdTimestamp, this.tables = {
              os2: {
                usWeightClass: e.weightClass || this.usWeightClasses.MEDIUM,
                usWidthClass: e.widthClass || this.usWidthClasses.MEDIUM,
                fsSelection: e.fsSelection || this.fsSelectionValues.REGULAR
              }
            }), this.supported = !0, this.glyphs = new pe.GlyphSet(this, e.glyphs || []), this.encoding = new Q(this), this.position = new It(this), this.substitution = new Ct(this), this.tables = this.tables || {}, Object.defineProperty(this, "hinting", {
              get: function () {
                return this._hinting ? this._hinting : "truetype" === this.outlinesFormat ? this._hinting = new wn(this) : void 0;
              }
            });
          }
          On.prototype.hasChar = function (e) {
            return null !== this.encoding.charToGlyphIndex(e);
          }, On.prototype.charToGlyphIndex = function (e) {
            return this.encoding.charToGlyphIndex(e);
          }, On.prototype.charToGlyph = function (e) {
            const t = this.charToGlyphIndex(e);
            let n = this.glyphs.get(t);
            return n || (n = this.glyphs.get(0)), n;
          }, On.prototype.stringToGlyphs = function (e, t) {
            t = t || this.defaultRenderOptions;
            const n = [];
            for (let t = 0; t < e.length; t += 1) {
              const s = e[t];
              n.push(this.charToGlyphIndex(s));
            }
            let s = n.length;
            if (t.features) {
              const e = t.script || this.substitution.getDefaultScriptName();
              let o = [];
              t.features.liga && (o = o.concat(this.substitution.getFeature("liga", e, t.language))), t.features.rlig && (o = o.concat(this.substitution.getFeature("rlig", e, t.language)));
              for (let e = 0; e < s; e += 1) for (let t = 0; t < o.length; t++) {
                const r = o[t],
                  a = r.sub,
                  i = a.length;
                let l = 0;
                for (; l < i && a[l] === n[e + l];) l++;
                l === i && (n.splice(e, i, r.by), s = s - i + 1);
              }
            }
            const o = new Array(s),
              r = this.glyphs.get(0);
            for (let e = 0; e < s; e += 1) o[e] = this.glyphs.get(n[e]) || r;
            return o;
          }, On.prototype.nameToGlyphIndex = function (e) {
            return this.glyphNames.nameToGlyphIndex(e);
          }, On.prototype.nameToGlyph = function (e) {
            const t = this.nameToGlyphIndex(e);
            let n = this.glyphs.get(t);
            return n || (n = this.glyphs.get(0)), n;
          }, On.prototype.glyphIndexToName = function (e) {
            return this.glyphNames.glyphIndexToName ? this.glyphNames.glyphIndexToName(e) : "";
          }, On.prototype.getKerningValue = function (e, t) {
            return e = e.index || e, t = t.index || t, this.kerningPairs[e + "," + t] || 0;
          }, On.prototype.defaultRenderOptions = {
            kerning: !0,
            features: {
              liga: !0,
              rlig: !0
            }
          }, On.prototype.forEachGlyph = function (e, t, n, s, o, r) {
            t = void 0 !== t ? t : 0, n = void 0 !== n ? n : 0, s = void 0 !== s ? s : 72, o = o || this.defaultRenderOptions;
            const a = 1 / this.unitsPerEm * s,
              i = this.stringToGlyphs(e, o);
            let l;
            if (o.kerning) {
              const e = o.script || this.position.getDefaultScriptName();
              l = this.position.getKerningTables(e, o.language);
            }
            for (let e = 0; e < i.length; e += 1) {
              const u = i[e];
              r.call(this, u, t, n, s, o), u.advanceWidth && (t += u.advanceWidth * a), o.kerning && e < i.length - 1 && (t += (l ? this.position.getKerningValue(l, u.index, i[e + 1].index) : this.getKerningValue(u, i[e + 1])) * a), o.letterSpacing ? t += o.letterSpacing * s : o.tracking && (t += o.tracking / 1e3 * s);
            }
            return t;
          }, On.prototype.getPath = function (e, t, n, s, o) {
            const r = new u();
            return this.forEachGlyph(e, t, n, s, o, function (e, t, n, s) {
              const a = e.getPath(t, n, s, o, this);
              r.extend(a);
            }), r;
          }, On.prototype.getPaths = function (e, t, n, s, o) {
            const r = [];
            return this.forEachGlyph(e, t, n, s, o, function (e, t, n, s) {
              const a = e.getPath(t, n, s, o, this);
              r.push(a);
            }), r;
          }, On.prototype.getAdvanceWidth = function (e, t, n) {
            return this.forEachGlyph(e, 0, 0, t, n, function () {});
          }, On.prototype.draw = function (e, t, n, s, o, r) {
            this.getPath(t, n, s, o, r).draw(e);
          }, On.prototype.drawPoints = function (e, t, n, s, o, r) {
            this.forEachGlyph(t, n, s, o, r, function (t, n, s, o) {
              t.drawPoints(e, n, s, o);
            });
          }, On.prototype.drawMetrics = function (e, t, n, s, o, r) {
            this.forEachGlyph(t, n, s, o, r, function (t, n, s, o) {
              t.drawMetrics(e, n, s, o);
            });
          }, On.prototype.getEnglishName = function (e) {
            const t = this.names[e];
            if (t) return t.en;
          }, On.prototype.validate = function () {
            const e = [],
              t = this;
            function n(t, n) {
              t || e.push(n);
            }
            function s(e) {
              const s = t.getEnglishName(e);
              n(s && s.trim().length > 0, "No English " + e + " specified.");
            }
            s("fontFamily"), s("weightName"), s("manufacturer"), s("copyright"), s("version"), n(this.unitsPerEm > 0, "No unitsPerEm specified.");
          }, On.prototype.toTables = function () {
            return St(this);
          }, On.prototype.toBuffer = function () {
            return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
          }, On.prototype.toArrayBuffer = function () {
            const e = this.toTables().encode(),
              t = new ArrayBuffer(e.length),
              n = new Uint8Array(t);
            for (let t = 0; t < e.length; t++) n[t] = e[t];
            return t;
          }, On.prototype.download = function (e) {
            const t = this.getEnglishName("fontFamily"),
              s = this.getEnglishName("fontSubfamily");
            e = e || t.replace(/\s/g, "") + "-" + s + ".otf";
            const o = this.toArrayBuffer();
            if ("undefined" != typeof window) window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem, window.requestFileSystem(window.TEMPORARY, o.byteLength, function (t) {
              t.root.getFile(e, {
                create: !0
              }, function (e) {
                e.createWriter(function (t) {
                  const n = new DataView(o),
                    s = new Blob([n], {
                      type: "font/opentype"
                    });
                  t.write(s), t.addEventListener("writeend", function () {
                    location.href = e.toURL();
                  }, !1);
                });
              });
            }, function (e) {
              throw new Error(e.name + ": " + e.message);
            });else {
              const t = n(89),
                s = function (e) {
                  const t = new Buffer(e.byteLength),
                    n = new Uint8Array(e);
                  for (let e = 0; e < t.length; ++e) t[e] = n[e];
                  return t;
                }(o);
              t.writeFileSync(e, s);
            }
          }, On.prototype.fsSelectionValues = {
            ITALIC: 1,
            UNDERSCORE: 2,
            NEGATIVE: 4,
            OUTLINED: 8,
            STRIKEOUT: 16,
            BOLD: 32,
            REGULAR: 64,
            USER_TYPO_METRICS: 128,
            WWS: 256,
            OBLIQUE: 512
          }, On.prototype.usWidthClasses = {
            ULTRA_CONDENSED: 1,
            EXTRA_CONDENSED: 2,
            CONDENSED: 3,
            SEMI_CONDENSED: 4,
            MEDIUM: 5,
            SEMI_EXPANDED: 6,
            EXPANDED: 7,
            EXTRA_EXPANDED: 8,
            ULTRA_EXPANDED: 9
          }, On.prototype.usWeightClasses = {
            THIN: 100,
            EXTRA_LIGHT: 200,
            LIGHT: 300,
            NORMAL: 400,
            MEDIUM: 500,
            SEMI_BOLD: 600,
            BOLD: 700,
            EXTRA_BOLD: 800,
            BLACK: 900
          };
          const In = On;
          function Rn(e, t, n) {
            const s = {},
              o = new z.Parser(e, t);
            return s.tag = o.parseTag(), s.minValue = o.parseFixed(), s.defaultValue = o.parseFixed(), s.maxValue = o.parseFixed(), o.skip("uShort", 1), s.name = n[o.parseUShort()] || {}, s;
          }
          function Ln(e, t, n, s) {
            const o = {},
              r = new z.Parser(e, t);
            o.name = s[r.parseUShort()] || {}, r.skip("uShort", 1), o.coordinates = {};
            for (let e = 0; e < n.length; ++e) o.coordinates[n[e].tag] = r.parseFixed();
            return o;
          }
          const Bn = function (e, t, n) {
              const s = new z.Parser(e, t),
                o = s.parseULong();
              f.argument(65536 === o, "Unsupported fvar table version.");
              const r = s.parseOffset16();
              s.skip("uShort", 1);
              const a = s.parseUShort(),
                i = s.parseUShort(),
                l = s.parseUShort(),
                u = s.parseUShort(),
                c = [];
              for (let s = 0; s < a; s++) c.push(Rn(e, t + r + s * i, n));
              const p = [],
                h = t + r + a * i;
              for (let t = 0; t < l; t++) p.push(Ln(e, h + t * u, c, n));
              return {
                axes: c,
                instances: p
              };
            },
            Cn = new Array(10);
          Cn[1] = function () {
            const e = this.offset + this.relativeOffset,
              t = this.parseUShort();
            return 1 === t ? {
              posFormat: 1,
              coverage: this.parsePointer(_.coverage),
              value: this.parseValueRecord()
            } : 2 === t ? {
              posFormat: 2,
              coverage: this.parsePointer(_.coverage),
              values: this.parseValueRecordList()
            } : void f.assert(!1, "0x" + e.toString(16) + ": GPOS lookup type 1 format must be 1 or 2.");
          }, Cn[2] = function () {
            const e = this.offset + this.relativeOffset,
              t = this.parseUShort(),
              n = this.parsePointer(_.coverage),
              s = this.parseUShort(),
              o = this.parseUShort();
            if (1 === t) return {
              posFormat: t,
              coverage: n,
              valueFormat1: s,
              valueFormat2: o,
              pairSets: this.parseList(_.pointer(_.list(function () {
                return {
                  secondGlyph: this.parseUShort(),
                  value1: this.parseValueRecord(s),
                  value2: this.parseValueRecord(o)
                };
              })))
            };
            if (2 === t) {
              const e = this.parsePointer(_.classDef),
                r = this.parsePointer(_.classDef),
                a = this.parseUShort(),
                i = this.parseUShort();
              return {
                posFormat: t,
                coverage: n,
                valueFormat1: s,
                valueFormat2: o,
                classDef1: e,
                classDef2: r,
                class1Count: a,
                class2Count: i,
                classRecords: this.parseList(a, _.list(i, function () {
                  return {
                    value1: this.parseValueRecord(s),
                    value2: this.parseValueRecord(o)
                  };
                }))
              };
            }
            f.assert(!1, "0x" + e.toString(16) + ": GPOS lookup type 2 format must be 1 or 2.");
          }, Cn[3] = function () {
            return {
              error: "GPOS Lookup 3 not supported"
            };
          }, Cn[4] = function () {
            return {
              error: "GPOS Lookup 4 not supported"
            };
          }, Cn[5] = function () {
            return {
              error: "GPOS Lookup 5 not supported"
            };
          }, Cn[6] = function () {
            return {
              error: "GPOS Lookup 6 not supported"
            };
          }, Cn[7] = function () {
            return {
              error: "GPOS Lookup 7 not supported"
            };
          }, Cn[8] = function () {
            return {
              error: "GPOS Lookup 8 not supported"
            };
          }, Cn[9] = function () {
            return {
              error: "GPOS Lookup 9 not supported"
            };
          };
          new Array(10);
          const Dn = function (e, t) {
              const n = new _(e, t = t || 0),
                s = n.parseVersion(1);
              return f.argument(1 === s || 1.1 === s, "Unsupported GPOS table version " + s), 1 === s ? {
                version: s,
                scripts: n.parseScriptList(),
                features: n.parseFeatureList(),
                lookups: n.parseLookupList(Cn)
              } : {
                version: s,
                scripts: n.parseScriptList(),
                features: n.parseFeatureList(),
                lookups: n.parseLookupList(Cn),
                variations: n.parseFeatureVariationsList()
              };
            },
            Mn = function (e, t) {
              const n = new z.Parser(e, t),
                s = n.parseUShort();
              if (0 === s) return function (e) {
                const t = {};
                e.skip("uShort");
                const n = e.parseUShort();
                f.argument(0 === n, "Unsupported kern sub-table version."), e.skip("uShort", 2);
                const s = e.parseUShort();
                e.skip("uShort", 3);
                for (let n = 0; n < s; n += 1) {
                  const n = e.parseUShort(),
                    s = e.parseUShort(),
                    o = e.parseShort();
                  t[n + "," + s] = o;
                }
                return t;
              }(n);
              if (1 === s) return function (e) {
                const t = {};
                e.skip("uShort"), e.parseULong() > 1 && console.warn("Only the first kern subtable is supported."), e.skip("uLong");
                const n = 255 & e.parseUShort();
                if (e.skip("uShort"), 0 === n) {
                  const n = e.parseUShort();
                  e.skip("uShort", 3);
                  for (let s = 0; s < n; s += 1) {
                    const n = e.parseUShort(),
                      s = e.parseUShort(),
                      o = e.parseShort();
                    t[n + "," + s] = o;
                  }
                }
                return t;
              }(n);
              throw new Error("Unsupported kern table version (" + s + ").");
            },
            Pn = function (e, t, n, s) {
              const o = new z.Parser(e, t),
                r = s ? o.parseUShort : o.parseULong,
                a = [];
              for (let e = 0; e < n + 1; e += 1) {
                let e = r.call(o);
                s && (e *= 2), a.push(e);
              }
              return a;
            };
          function An(e, t) {
            n(89).readFile(e, function (e, n) {
              if (e) return t(e.message);
              t(null, Dt(n));
            });
          }
          function Gn(e, t) {
            const n = new XMLHttpRequest();
            n.open("get", e, !0), n.responseType = "arraybuffer", n.onload = function () {
              return n.response ? t(null, n.response) : t("Font could not be loaded: " + n.statusText);
            }, n.onerror = function () {
              t("Font could not be loaded");
            }, n.send();
          }
          function Nn(e, t) {
            const n = [];
            let s = 12;
            for (let o = 0; o < t; o += 1) {
              const t = z.getTag(e, s),
                o = z.getULong(e, s + 4),
                r = z.getULong(e, s + 8),
                a = z.getULong(e, s + 12);
              n.push({
                tag: t,
                checksum: o,
                offset: r,
                length: a,
                compression: !1
              }), s += 16;
            }
            return n;
          }
          function Fn(e, t) {
            if ("WOFF" === t.compression) {
              const n = new Uint8Array(e.buffer, t.offset + 2, t.compressedLength - 2),
                s = new Uint8Array(t.length);
              if (o()(n, s), s.byteLength !== t.length) throw new Error("Decompression error: " + t.tag + " decompressed length doesn't match recorded length");
              return {
                data: new DataView(s.buffer, 0),
                offset: 0
              };
            }
            return {
              data: e,
              offset: t.offset
            };
          }
          function _n(e) {
            let t, n;
            const s = new In({
                empty: !0
              }),
              o = new DataView(e, 0);
            let r,
              a = [];
            const i = z.getTag(o, 0);
            if (i === String.fromCharCode(0, 1, 0, 0) || "true" === i || "typ1" === i) s.outlinesFormat = "truetype", r = z.getUShort(o, 4), a = Nn(o, r);else if ("OTTO" === i) s.outlinesFormat = "cff", r = z.getUShort(o, 4), a = Nn(o, r);else {
              if ("wOFF" !== i) throw new Error("Unsupported OpenType signature " + i);
              {
                const e = z.getTag(o, 4);
                if (e === String.fromCharCode(0, 1, 0, 0)) s.outlinesFormat = "truetype";else {
                  if ("OTTO" !== e) throw new Error("Unsupported OpenType flavor " + i);
                  s.outlinesFormat = "cff";
                }
                r = z.getUShort(o, 12), a = function (e, t) {
                  const n = [];
                  let s = 44;
                  for (let o = 0; o < t; o += 1) {
                    const t = z.getTag(e, s),
                      o = z.getULong(e, s + 4),
                      r = z.getULong(e, s + 8),
                      a = z.getULong(e, s + 12);
                    let i;
                    i = r < a && "WOFF", n.push({
                      tag: t,
                      offset: o,
                      compression: i,
                      compressedLength: r,
                      length: a
                    }), s += 20;
                  }
                  return n;
                }(o, r);
              }
            }
            let l, u, c, p, f, h, d, g, m, y, v;
            for (let e = 0; e < r; e += 1) {
              const r = a[e];
              let i;
              switch (r.tag) {
                case "cmap":
                  i = Fn(o, r), s.tables.cmap = q(i.data, i.offset), s.encoding = new J(s.tables.cmap);
                  break;
                case "cvt ":
                  i = Fn(o, r), v = new z.Parser(i.data, i.offset), s.tables.cvt = v.parseShortList(r.length / 2);
                  break;
                case "fvar":
                  u = r;
                  break;
                case "fpgm":
                  i = Fn(o, r), v = new z.Parser(i.data, i.offset), s.tables.fpgm = v.parseByteList(r.length);
                  break;
                case "head":
                  i = Fn(o, r), s.tables.head = Ce(i.data, i.offset), s.unitsPerEm = s.tables.head.unitsPerEm, t = s.tables.head.indexToLocFormat;
                  break;
                case "hhea":
                  i = Fn(o, r), s.tables.hhea = Me(i.data, i.offset), s.ascender = s.tables.hhea.ascender, s.descender = s.tables.hhea.descender, s.numberOfHMetrics = s.tables.hhea.numberOfHMetrics;
                  break;
                case "hmtx":
                  h = r;
                  break;
                case "ltag":
                  i = Fn(o, r), n = Fe(i.data, i.offset);
                  break;
                case "maxp":
                  i = Fn(o, r), s.tables.maxp = _e(i.data, i.offset), s.numGlyphs = s.tables.maxp.numGlyphs;
                  break;
                case "name":
                  m = r;
                  break;
                case "OS/2":
                  i = Fn(o, r), s.tables.os2 = st(i.data, i.offset);
                  break;
                case "post":
                  i = Fn(o, r), s.tables.post = at(i.data, i.offset), s.glyphNames = new $(s.tables.post);
                  break;
                case "prep":
                  i = Fn(o, r), v = new z.Parser(i.data, i.offset), s.tables.prep = v.parseByteList(r.length);
                  break;
                case "glyf":
                  c = r;
                  break;
                case "loca":
                  g = r;
                  break;
                case "CFF ":
                  l = r;
                  break;
                case "kern":
                  d = r;
                  break;
                case "GPOS":
                  p = r;
                  break;
                case "GSUB":
                  f = r;
                  break;
                case "meta":
                  y = r;
              }
            }
            const b = Fn(o, m);
            if (s.tables.name = et(b.data, b.offset, n), s.names = s.tables.name, c && g) {
              const e = 0 === t,
                n = Fn(o, g),
                r = Pn(n.data, n.offset, s.numGlyphs, e),
                a = Fn(o, c);
              s.glyphs = ae.parse(a.data, a.offset, r, s);
            } else {
              if (!l) throw new Error("Font doesn't contain TrueType or CFF outlines.");
              {
                const e = Fn(o, l);
                Le(e.data, e.offset, s);
              }
            }
            const x = Fn(o, h);
            if (Ae(x.data, x.offset, s.numberOfHMetrics, s.numGlyphs, s.glyphs), function (e) {
              let t;
              const n = e.tables.cmap.glyphIndexMap,
                s = Object.keys(n);
              for (let o = 0; o < s.length; o += 1) {
                const r = s[o],
                  a = n[r];
                t = e.glyphs.get(a), t.addUnicode(parseInt(r));
              }
              for (let n = 0; n < e.glyphs.length; n += 1) t = e.glyphs.get(n), e.cffEncoding ? e.isCIDFont ? t.name = "gid" + n : t.name = e.cffEncoding.charset[n] : e.glyphNames.names && (t.name = e.glyphNames.glyphIndexToName(n));
            }(s), d) {
              const e = Fn(o, d);
              s.kerningPairs = Mn(e.data, e.offset);
            } else s.kerningPairs = {};
            if (p) {
              const e = Fn(o, p);
              s.tables.gpos = Dn(e.data, e.offset);
            }
            if (f) {
              const e = Fn(o, f);
              s.tables.gsub = pt(e.data, e.offset);
            }
            if (u) {
              const e = Fn(o, u);
              s.tables.fvar = Bn(e.data, e.offset, s.names);
            }
            if (y) {
              const e = Fn(o, y);
              s.tables.meta = ht(e.data, e.offset), s.metas = s.tables.meta;
            }
            return s;
          }
          function Hn(e, t) {
            ("undefined" == typeof window ? An : Gn)(e, function (e, n) {
              if (e) return t(e);
              let s;
              try {
                s = _n(n);
              } catch (e) {
                return t(e, null);
              }
              return t(null, s);
            });
          }
          function zn(e) {
            return _n(Dt(n(89).readFileSync(e)));
          }
        },
        896: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(978);
          class o extends s.Writable {
            constructor() {
              super(...arguments), this.offset = 0, this._waiters = [], this._closed = !1;
            }
            _write(e, t, n) {
              let s = 0;
              const o = () => {
                for (; this._waiters.length > 0;) {
                  const t = this._waiters[0];
                  if (this._buffer) {
                    const o = this._buffer.size - this._buffer.offset;
                    if (!(o + e.length >= t.size)) {
                      if (!t.skip) {
                        const t = Buffer.alloc(o + e.length);
                        this._buffer.buf.copy(t, 0, this._buffer.offset, this._buffer.size), e.copy(t, o, 0, e.length), this._buffer.buf = t;
                      }
                      this._buffer.offset = 0, this._buffer.size = o + e.length, n();
                      break;
                    }
                    if (t.skip) this._buffer = void 0, t.resolve();else {
                      const n = Math.min(o, t.size),
                        s = Buffer.alloc(t.size);
                      this._buffer.buf.copy(s, 0, this._buffer.offset, this._buffer.offset + n), e.copy(s, n, 0, t.size - n), t.resolve(s);
                    }
                    if (this.offset += t.size, this._waiters.shift(), this._buffer = void 0, o + e.length === t.size) {
                      n();
                      break;
                    }
                    s += t.size - o;
                  } else {
                    if (!(e.length - s >= t.size)) {
                      this._buffer = {
                        buf: t.skip ? void 0 : e.slice(s),
                        offset: 0,
                        size: e.length - s
                      }, s = e.length, n();
                      break;
                    }
                    if (t.skip ? t.resolve() : t.resolve(e.slice(s, s + t.size)), this.offset += t.size, this._waiters.shift(), s += t.size, e.length === s) {
                      n();
                      break;
                    }
                  }
                }
                this._processTrigger = e.length - s > 0 ? o : void 0;
              };
              o();
            }
            _destroy(e, t) {
              this._processTrigger = void 0;
              for (const t of this._waiters) t.reject(e || new Error("stream destroyed"));
              this._waiters = [], this._closed = !0;
            }
            _final(e) {
              this._processTrigger = void 0;
              for (const e of this._waiters) e.reject(new Error("not enough data in stream"));
              this._waiters = [], this._closed = !0;
            }
            read(e) {
              return new Promise((t, n) => {
                this._closed && n(new Error("stream is closed")), this._waiters.push({
                  resolve: t,
                  reject: n,
                  size: e,
                  skip: !1
                }), this._processTrigger && this._processTrigger();
              });
            }
            skip(e) {
              return new Promise((t, n) => {
                this._closed && n(new Error("stream is closed")), this._waiters.push({
                  resolve: t,
                  reject: n,
                  size: e,
                  skip: !0
                }), this._processTrigger && this._processTrigger();
              });
            }
          }
          function r() {
            return new o();
          }
          e.exports = Object.assign(r, {
            default: r
          }), t.default = r;
        },
        311: e => {
          function t() {
            this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
          }
          function n(e, n) {
            this.source = e, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = n, this.destLen = 0, this.ltree = new t(), this.dtree = new t();
          }
          var s = new t(),
            o = new t(),
            r = new Uint8Array(30),
            a = new Uint16Array(30),
            i = new Uint8Array(30),
            l = new Uint16Array(30),
            u = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
            c = new t(),
            p = new Uint8Array(320);
          function f(e, t, n, s) {
            var o, r;
            for (o = 0; o < n; ++o) e[o] = 0;
            for (o = 0; o < 30 - n; ++o) e[o + n] = o / n | 0;
            for (r = s, o = 0; o < 30; ++o) t[o] = r, r += 1 << e[o];
          }
          var h = new Uint16Array(16);
          function d(e, t, n, s) {
            var o, r;
            for (o = 0; o < 16; ++o) e.table[o] = 0;
            for (o = 0; o < s; ++o) e.table[t[n + o]]++;
            for (e.table[0] = 0, r = 0, o = 0; o < 16; ++o) h[o] = r, r += e.table[o];
            for (o = 0; o < s; ++o) t[n + o] && (e.trans[h[t[n + o]]++] = o);
          }
          function g(e) {
            e.bitcount-- || (e.tag = e.source[e.sourceIndex++], e.bitcount = 7);
            var t = 1 & e.tag;
            return e.tag >>>= 1, t;
          }
          function m(e, t, n) {
            if (!t) return n;
            for (; e.bitcount < 24;) e.tag |= e.source[e.sourceIndex++] << e.bitcount, e.bitcount += 8;
            var s = e.tag & 65535 >>> 16 - t;
            return e.tag >>>= t, e.bitcount -= t, s + n;
          }
          function y(e, t) {
            for (; e.bitcount < 24;) e.tag |= e.source[e.sourceIndex++] << e.bitcount, e.bitcount += 8;
            var n = 0,
              s = 0,
              o = 0,
              r = e.tag;
            do {
              s = 2 * s + (1 & r), r >>>= 1, ++o, n += t.table[o], s -= t.table[o];
            } while (s >= 0);
            return e.tag = r, e.bitcount -= o, t.trans[n + s];
          }
          function v(e, t, n) {
            var s, o, r, a, i, l;
            for (s = m(e, 5, 257), o = m(e, 5, 1), r = m(e, 4, 4), a = 0; a < 19; ++a) p[a] = 0;
            for (a = 0; a < r; ++a) {
              var f = m(e, 3, 0);
              p[u[a]] = f;
            }
            for (d(c, p, 0, 19), i = 0; i < s + o;) {
              var h = y(e, c);
              switch (h) {
                case 16:
                  var g = p[i - 1];
                  for (l = m(e, 2, 3); l; --l) p[i++] = g;
                  break;
                case 17:
                  for (l = m(e, 3, 3); l; --l) p[i++] = 0;
                  break;
                case 18:
                  for (l = m(e, 7, 11); l; --l) p[i++] = 0;
                  break;
                default:
                  p[i++] = h;
              }
            }
            d(t, p, 0, s), d(n, p, s, o);
          }
          function b(e, t, n) {
            for (;;) {
              var s,
                o,
                u,
                c,
                p = y(e, t);
              if (256 === p) return 0;
              if (p < 256) e.dest[e.destLen++] = p;else for (s = m(e, r[p -= 257], a[p]), o = y(e, n), c = u = e.destLen - m(e, i[o], l[o]); c < u + s; ++c) e.dest[e.destLen++] = e.dest[c];
            }
          }
          function x(e) {
            for (var t, n; e.bitcount > 8;) e.sourceIndex--, e.bitcount -= 8;
            if ((t = 256 * (t = e.source[e.sourceIndex + 1]) + e.source[e.sourceIndex]) !== (65535 & ~(256 * e.source[e.sourceIndex + 3] + e.source[e.sourceIndex + 2]))) return -3;
            for (e.sourceIndex += 4, n = t; n; --n) e.dest[e.destLen++] = e.source[e.sourceIndex++];
            return e.bitcount = 0, 0;
          }
          !function (e, t) {
            var n;
            for (n = 0; n < 7; ++n) e.table[n] = 0;
            for (e.table[7] = 24, e.table[8] = 152, e.table[9] = 112, n = 0; n < 24; ++n) e.trans[n] = 256 + n;
            for (n = 0; n < 144; ++n) e.trans[24 + n] = n;
            for (n = 0; n < 8; ++n) e.trans[168 + n] = 280 + n;
            for (n = 0; n < 112; ++n) e.trans[176 + n] = 144 + n;
            for (n = 0; n < 5; ++n) t.table[n] = 0;
            for (t.table[5] = 32, n = 0; n < 32; ++n) t.trans[n] = n;
          }(s, o), f(r, a, 4, 3), f(i, l, 2, 1), r[28] = 0, a[28] = 258, e.exports = function (e, t) {
            var r,
              a,
              i = new n(e, t);
            do {
              switch (r = g(i), m(i, 2, 0)) {
                case 0:
                  a = x(i);
                  break;
                case 1:
                  a = b(i, s, o);
                  break;
                case 2:
                  v(i, i.ltree, i.dtree), a = b(i, i.ltree, i.dtree);
                  break;
                default:
                  a = -3;
              }
              if (0 !== a) throw new Error("Data error");
            } while (!r);
            return i.destLen < i.dest.length ? "function" == typeof i.dest.slice ? i.dest.slice(0, i.destLen) : i.dest.subarray(0, i.destLen) : i.dest;
          };
        },
        371: e => {
          "use strict";

          e.exports = function (e) {
            e.prototype[Symbol.iterator] = function* () {
              for (let e = this.head; e; e = e.next) yield e.value;
            };
          };
        },
        411: (e, t, n) => {
          "use strict";

          function s(e) {
            var t = this;
            if (t instanceof s || (t = new s()), t.tail = null, t.head = null, t.length = 0, e && "function" == typeof e.forEach) e.forEach(function (e) {
              t.push(e);
            });else if (arguments.length > 0) for (var n = 0, o = arguments.length; n < o; n++) t.push(arguments[n]);
            return t;
          }
          function o(e, t, n) {
            var s = t === e.head ? new i(n, null, t, e) : new i(n, t, t.next, e);
            return null === s.next && (e.tail = s), null === s.prev && (e.head = s), e.length++, s;
          }
          function r(e, t) {
            e.tail = new i(t, e.tail, null, e), e.head || (e.head = e.tail), e.length++;
          }
          function a(e, t) {
            e.head = new i(t, null, e.head, e), e.tail || (e.tail = e.head), e.length++;
          }
          function i(e, t, n, s) {
            if (!(this instanceof i)) return new i(e, t, n, s);
            this.list = s, this.value = e, t ? (t.next = this, this.prev = t) : this.prev = null, n ? (n.prev = this, this.next = n) : this.next = null;
          }
          e.exports = s, s.Node = i, s.create = s, s.prototype.removeNode = function (e) {
            if (e.list !== this) throw new Error("removing node which does not belong to this list");
            var t = e.next,
              n = e.prev;
            return t && (t.prev = n), n && (n.next = t), e === this.head && (this.head = t), e === this.tail && (this.tail = n), e.list.length--, e.next = null, e.prev = null, e.list = null, t;
          }, s.prototype.unshiftNode = function (e) {
            if (e !== this.head) {
              e.list && e.list.removeNode(e);
              var t = this.head;
              e.list = this, e.next = t, t && (t.prev = e), this.head = e, this.tail || (this.tail = e), this.length++;
            }
          }, s.prototype.pushNode = function (e) {
            if (e !== this.tail) {
              e.list && e.list.removeNode(e);
              var t = this.tail;
              e.list = this, e.prev = t, t && (t.next = e), this.tail = e, this.head || (this.head = e), this.length++;
            }
          }, s.prototype.push = function () {
            for (var e = 0, t = arguments.length; e < t; e++) r(this, arguments[e]);
            return this.length;
          }, s.prototype.unshift = function () {
            for (var e = 0, t = arguments.length; e < t; e++) a(this, arguments[e]);
            return this.length;
          }, s.prototype.pop = function () {
            if (this.tail) {
              var e = this.tail.value;
              return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, e;
            }
          }, s.prototype.shift = function () {
            if (this.head) {
              var e = this.head.value;
              return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, e;
            }
          }, s.prototype.forEach = function (e, t) {
            t = t || this;
            for (var n = this.head, s = 0; null !== n; s++) e.call(t, n.value, s, this), n = n.next;
          }, s.prototype.forEachReverse = function (e, t) {
            t = t || this;
            for (var n = this.tail, s = this.length - 1; null !== n; s--) e.call(t, n.value, s, this), n = n.prev;
          }, s.prototype.get = function (e) {
            for (var t = 0, n = this.head; null !== n && t < e; t++) n = n.next;
            if (t === e && null !== n) return n.value;
          }, s.prototype.getReverse = function (e) {
            for (var t = 0, n = this.tail; null !== n && t < e; t++) n = n.prev;
            if (t === e && null !== n) return n.value;
          }, s.prototype.map = function (e, t) {
            t = t || this;
            for (var n = new s(), o = this.head; null !== o;) n.push(e.call(t, o.value, this)), o = o.next;
            return n;
          }, s.prototype.mapReverse = function (e, t) {
            t = t || this;
            for (var n = new s(), o = this.tail; null !== o;) n.push(e.call(t, o.value, this)), o = o.prev;
            return n;
          }, s.prototype.reduce = function (e, t) {
            var n,
              s = this.head;
            if (arguments.length > 1) n = t;else {
              if (!this.head) throw new TypeError("Reduce of empty list with no initial value");
              s = this.head.next, n = this.head.value;
            }
            for (var o = 0; null !== s; o++) n = e(n, s.value, o), s = s.next;
            return n;
          }, s.prototype.reduceReverse = function (e, t) {
            var n,
              s = this.tail;
            if (arguments.length > 1) n = t;else {
              if (!this.tail) throw new TypeError("Reduce of empty list with no initial value");
              s = this.tail.prev, n = this.tail.value;
            }
            for (var o = this.length - 1; null !== s; o--) n = e(n, s.value, o), s = s.prev;
            return n;
          }, s.prototype.toArray = function () {
            for (var e = new Array(this.length), t = 0, n = this.head; null !== n; t++) e[t] = n.value, n = n.next;
            return e;
          }, s.prototype.toArrayReverse = function () {
            for (var e = new Array(this.length), t = 0, n = this.tail; null !== n; t++) e[t] = n.value, n = n.prev;
            return e;
          }, s.prototype.slice = function (e, t) {
            (t = t || this.length) < 0 && (t += this.length), (e = e || 0) < 0 && (e += this.length);
            var n = new s();
            if (t < e || t < 0) return n;
            e < 0 && (e = 0), t > this.length && (t = this.length);
            for (var o = 0, r = this.head; null !== r && o < e; o++) r = r.next;
            for (; null !== r && o < t; o++, r = r.next) n.push(r.value);
            return n;
          }, s.prototype.sliceReverse = function (e, t) {
            (t = t || this.length) < 0 && (t += this.length), (e = e || 0) < 0 && (e += this.length);
            var n = new s();
            if (t < e || t < 0) return n;
            e < 0 && (e = 0), t > this.length && (t = this.length);
            for (var o = this.length, r = this.tail; null !== r && o > t; o--) r = r.prev;
            for (; null !== r && o > e; o--, r = r.prev) n.push(r.value);
            return n;
          }, s.prototype.splice = function (e, t, ...n) {
            e > this.length && (e = this.length - 1), e < 0 && (e = this.length + e);
            for (var s = 0, r = this.head; null !== r && s < e; s++) r = r.next;
            var a = [];
            for (s = 0; r && s < t; s++) a.push(r.value), r = this.removeNode(r);
            for (null === r && (r = this.tail), r !== this.head && r !== this.tail && (r = r.prev), s = 0; s < n.length; s++) r = o(this, r, n[s]);
            return a;
          }, s.prototype.reverse = function () {
            for (var e = this.head, t = this.tail, n = e; null !== n; n = n.prev) {
              var s = n.prev;
              n.prev = n.next, n.next = s;
            }
            return this.head = t, this.tail = e, this;
          };
          try {
            n(371)(s);
          } catch (e) {}
        },
        109: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          });
          const s = n(98),
            o = n(104);
          let r;
          t.default = async function (e, t) {
            var n, i;
            if (!r) {
              if ("undefined" != typeof navigator && "fonts" in navigator) {
                try {
                  const e = await (null === (i = (n = navigator.permissions).request) || void 0 === i ? void 0 : i.call(n, {
                    name: "local-fonts"
                  }));
                  if (e && "granted" !== e.state) throw new Error("Permission to access local fonts not granted.");
                } catch (e) {
                  if ("TypeError" !== e.name) throw e;
                }
                const e = {};
                try {
                  const t = await navigator.fonts.query();
                  for (const n of t) e.hasOwnProperty(n.family) || (e[n.family] = []), e[n.family].push(n);
                  r = Promise.resolve(e);
                } catch (e) {
                  console.error(e.name, e.message);
                }
              } else if ("object" != typeof process && "queryLocalFonts" in window) {
                const e = {};
                try {
                  const t = await window.queryLocalFonts();
                  for (const n of t) e.hasOwnProperty(n.family) || (e[n.family] = []), e[n.family].push(n);
                  r = Promise.resolve(e);
                } catch (e) {
                  console.error(e.name, e.message);
                }
              }
              r || (r = Promise.resolve({}));
            }
            const l = await r;
            for (const n of (0, o.default)(e)) {
              if (a.includes(n)) return;
              if (l.hasOwnProperty(n) && l[n].length > 0) {
                const e = l[n][0];
                if ("blob" in e) {
                  const n = await e.blob(),
                    o = await n.arrayBuffer();
                  return (0, s.loadBuffer)(o, {
                    cacheSize: t
                  });
                }
                return;
              }
            }
          };
          const a = ["serif", "sans-serif", "cursive", "fantasy", "monospace", "system-ui", "emoji", "math", "fangsong"];
        },
        833: (e, t, n) => {
          "use strict";

          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.enableLigatures = void 0;
          const s = n(109);
          t.enableLigatures = function (e, t = []) {
            let n,
              o,
              r,
              a = 0;
            return e.registerCharacterJoiner(i => {
              const l = e.options.fontFamily;
              if (l && (0 === a || n !== l)) {
                o = void 0, a = 1, n = l;
                const t = n;
                (0, s.default)(t, 1e5).then(n => {
                  t === e.options.fontFamily && (a = 2, o = n, n && e.refresh(0, e.rows - 1));
                }).catch(n => {
                  t === e.options.fontFamily && (a = 3, "debug" === e.options.logLevel && console.debug(r, new Error("Failure while loading font")), o = void 0, r = n);
                });
              }
              return o && 2 === a ? o.findLigatureRanges(i).map(e => [e[0], e[1]]) : function (e, t) {
                const n = [];
                for (let s = 0; s < e.length; s++) for (let o = 0; o < t.length; o++) if (e.startsWith(t[o], s)) {
                  n.push([s, s + t[o].length]), s += t[o].length - 1;
                  break;
                }
                return n;
              }(i, t);
            });
          };
        },
        104: (e, t) => {
          "use strict";

          function n(e, t) {
            let n = "",
              s = !1;
            for (; e.offset < e.input.length;) {
              const r = e.input[e.offset++];
              if (s) /[\dA-Fa-f]/.test(r) ? (e.offset--, n += o(e)) : "\n" !== r && (n += r), s = !1;else switch (r) {
                case t:
                  return n;
                case "\\":
                  s = !0;
                  break;
                default:
                  n += r;
              }
            }
            throw new Error("Unterminated string");
          }
          function s(e) {
            let t = "",
              n = !1;
            for (; e.offset < e.input.length;) {
              const s = e.input[e.offset++];
              if (n) /[\dA-Fa-f]/.test(s) ? (e.offset--, t += o(e)) : t += s, n = !1;else switch (s) {
                case "\\":
                  n = !0;
                  break;
                case ",":
                  return t;
                default:
                  /\s/.test(s) ? t.endsWith(" ") || (t += " ") : t += s;
              }
            }
            return t;
          }
          function o(e) {
            let t = "";
            for (; e.offset < e.input.length;) {
              const n = e.input[e.offset++];
              if (/\s/.test(n)) return r(t);
              if (t.length >= 6 || !/[\dA-Fa-f]/.test(n)) return e.offset--, r(t);
              t += n;
            }
            return r(t);
          }
          function r(e) {
            return String.fromCodePoint(parseInt(e, 16));
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.default = function (e) {
            if ("string" != typeof e) throw new Error("Font family must be a string");
            const t = {
                input: e,
                offset: 0
              },
              o = [];
            let r = "";
            for (; t.offset < t.input.length;) {
              const e = t.input[t.offset++];
              switch (e) {
                case "'":
                case '"':
                  r += n(t, e);
                  break;
                case ",":
                  o.push(r), r = "";
                  break;
                default:
                  /\s/.test(e) || (t.offset--, r += s(t), o.push(r), r = "");
              }
            }
            return o;
          };
        },
        89: t => {
          "use strict";

          t.exports = e;
        },
        56: e => {
          "use strict";

          e.exports = t;
        },
        978: e => {
          "use strict";

          e.exports = s;
        },
        269: e => {
          "use strict";

          e.exports = n;
        },
        82: () => {},
        456: () => {}
      },
      r = {};
    function a(e) {
      var t = r[e];
      if (void 0 !== t) return t.exports;
      var n = r[e] = {
        exports: {}
      };
      return o[e].call(n.exports, n, n.exports, a), n.exports;
    }
    a.n = e => {
      var t = e && e.__esModule ? () => e.default : () => e;
      return a.d(t, {
        a: t
      }), t;
    }, a.d = (e, t) => {
      for (var n in t) a.o(t, n) && !a.o(e, n) && Object.defineProperty(e, n, {
        enumerable: !0,
        get: t[n]
      });
    }, a.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), a.r = e => {
      "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
        value: "Module"
      }), Object.defineProperty(e, "__esModule", {
        value: !0
      });
    };
    var i = {};
    return (() => {
      "use strict";

      var e = i;
      Object.defineProperty(e, "__esModule", {
        value: !0
      }), e.LigaturesAddon = void 0;
      const t = a(833);
      e.LigaturesAddon = class {
        constructor(e) {
          this._fallbackLigatures = ((null == e ? void 0 : e.fallbackLigatures) || ["<--", "<---", "<<-", "<-", "->", "->>", "--\x3e", "---\x3e", "<==", "<===", "<<=", "<=", "=>", "=>>", "==>", "===>", ">=", ">>=", "<->", "<--\x3e", "<---\x3e", "<----\x3e", "<=>", "<==>", "<===>", "<====>", "--------\x3e", "<~~", "<~", "~>", "~~>", "::", ":::", "==", "!=", "===", "!==", ":=", ":-", ":+", "<*", "<*>", "*>", "<|", "<|>", "|>", "+:", "-:", "=:", ":>", "++", "+++", "\x3c!--", "\x3c!---", "<***>"]).sort((e, t) => t.length - e.length);
        }
        activate(e) {
          this._terminal = e, this._characterJoinerId = (0, t.enableLigatures)(e, this._fallbackLigatures);
        }
        dispose() {
          var e;
          void 0 !== this._characterJoinerId && (null === (e = this._terminal) || void 0 === e || e.deregisterCharacterJoiner(this._characterJoinerId), this._characterJoinerId = void 0);
        }
      };
    })(), i;
  })();
});

/***/ }),

/***/ 6317:
/*!*******************************************************************!*\
  !*** ./node_modules/xterm-addon-search/lib/xterm-addon-search.js ***!
  \*******************************************************************/
/***/ ((module) => {

!function (e, t) {
   true ? module.exports = t() : 0;
}(self, function () {
  return (() => {
    "use strict";

    var e = {
        345: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
            constructor() {
              this._listeners = [], this._disposed = !1;
            }
            get event() {
              return this._event || (this._event = e => (this._listeners.push(e), {
                dispose: () => {
                  if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
                }
              })), this._event;
            }
            fire(e, t) {
              const s = [];
              for (let e = 0; e < this._listeners.length; e++) s.push(this._listeners[e]);
              for (let i = 0; i < s.length; i++) s[i].call(void 0, e, t);
            }
            dispose() {
              this._listeners && (this._listeners.length = 0), this._disposed = !0;
            }
          }, t.forwardEvent = function (e, t) {
            return e(e => t.fire(e));
          };
        },
        859: (e, t) => {
          function s(e) {
            for (const t of e) t.dispose();
            e.length = 0;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.Disposable = void 0, t.Disposable = class {
            constructor() {
              this._disposables = [], this._isDisposed = !1;
            }
            dispose() {
              this._isDisposed = !0;
              for (const e of this._disposables) e.dispose();
              this._disposables.length = 0;
            }
            register(e) {
              return this._disposables.push(e), e;
            }
            unregister(e) {
              const t = this._disposables.indexOf(e);
              -1 !== t && this._disposables.splice(t, 1);
            }
          }, t.toDisposable = function (e) {
            return {
              dispose: e
            };
          }, t.disposeArray = s, t.getDisposeArrayDisposable = function (e) {
            return {
              dispose: () => s(e)
            };
          };
        }
      },
      t = {};
    function s(i) {
      var r = t[i];
      if (void 0 !== r) return r.exports;
      var n = t[i] = {
        exports: {}
      };
      return e[i](n, n.exports, s), n.exports;
    }
    var i = {};
    return (() => {
      var e = i;
      Object.defineProperty(e, "__esModule", {
        value: !0
      }), e.SearchAddon = void 0;
      const t = s(345),
        r = s(859),
        n = " ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";
      class o extends r.Disposable {
        constructor() {
          super(...arguments), this._linesCacheTimeoutId = 0, this._onDidChangeResults = this.register(new t.EventEmitter()), this.onDidChangeResults = this._onDidChangeResults.event;
        }
        activate(e) {
          this._terminal = e, this._onDataDisposable = this.register(this._terminal.onWriteParsed(() => this._updateMatches())), this._onResizeDisposable = this.register(this._terminal.onResize(() => this._updateMatches())), this.register((0, r.toDisposable)(() => {
            var e, t;
            this.clearDecorations(), null === (e = this._onDataDisposable) || void 0 === e || e.dispose(), null === (t = this._onResizeDisposable) || void 0 === t || t.dispose();
          }));
        }
        _updateMatches() {
          var e;
          this._highlightTimeout && window.clearTimeout(this._highlightTimeout), this._cachedSearchTerm && (null === (e = this._lastSearchOptions) || void 0 === e ? void 0 : e.decorations) && (this._highlightTimeout = setTimeout(() => {
            var e, t;
            this.findPrevious(this._cachedSearchTerm, Object.assign(Object.assign({}, this._lastSearchOptions), {
              incremental: !0,
              noScroll: !0
            })), this._resultIndex = this._searchResults ? this._searchResults.size - 1 : -1, this._onDidChangeResults.fire({
              resultIndex: this._resultIndex,
              resultCount: null !== (t = null === (e = this._searchResults) || void 0 === e ? void 0 : e.size) && void 0 !== t ? t : -1
            });
          }, 200));
        }
        clearDecorations(e) {
          var t, s, i, r;
          null === (t = this._selectedDecoration) || void 0 === t || t.dispose(), null === (s = this._searchResults) || void 0 === s || s.clear(), null === (i = this._resultDecorations) || void 0 === i || i.forEach(e => {
            for (const t of e) t.dispose();
          }), null === (r = this._resultDecorations) || void 0 === r || r.clear(), this._searchResults = void 0, this._resultDecorations = void 0, e || (this._cachedSearchTerm = void 0);
        }
        clearActiveDecoration() {
          var e;
          null === (e = this._selectedDecoration) || void 0 === e || e.dispose(), this._selectedDecoration = void 0;
        }
        findNext(e, t) {
          if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
          return this._lastSearchOptions = t, (null == t ? void 0 : t.decorations) && (void 0 === this._resultIndex && void 0 !== this._cachedSearchTerm && e === this._cachedSearchTerm || this._highlightAllMatches(e, t)), this._fireResults(e, this._findNextAndSelect(e, t), t);
        }
        _highlightAllMatches(e, t) {
          if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
          if (!e || 0 === e.length) return void this.clearDecorations();
          t = t || {}, this.clearDecorations(!0), this._searchResults = new Map(), this._resultDecorations = new Map();
          const s = this._resultDecorations;
          let i = this._find(e, 0, 0, t);
          for (; i && !this._searchResults.get(`${i.row}-${i.col}`);) if (this._searchResults.set(`${i.row}-${i.col}`, i), i = this._find(e, i.col + i.term.length >= this._terminal.cols ? i.row + 1 : i.row, i.col + i.term.length >= this._terminal.cols ? 0 : i.col + 1, t), this._searchResults.size > 1e3) return this.clearDecorations(), void (this._resultIndex = void 0);
          this._searchResults.forEach(e => {
            const i = this._createResultDecoration(e, t.decorations);
            if (i) {
              const e = s.get(i.marker.line) || [];
              e.push(i), s.set(i.marker.line, e);
            }
          });
        }
        _find(e, t, s, i) {
          var r;
          if (!this._terminal || !e || 0 === e.length) return null === (r = this._terminal) || void 0 === r || r.clearSelection(), void this.clearDecorations();
          if (s > this._terminal.cols) throw new Error(`Invalid col: ${s} to search in terminal of ${this._terminal.cols} cols`);
          let n;
          this._initLinesCache();
          const o = {
            startRow: t,
            startCol: s
          };
          if (n = this._findInLine(e, o, i), !n) for (let s = t + 1; s < this._terminal.buffer.active.baseY + this._terminal.rows && (o.startRow = s, o.startCol = 0, n = this._findInLine(e, o, i), !n); s++);
          return n;
        }
        _findNextAndSelect(e, t) {
          var s;
          if (!this._terminal || !e || 0 === e.length) return null === (s = this._terminal) || void 0 === s || s.clearSelection(), this.clearDecorations(), this._cachedSearchTerm = void 0, this._resultIndex = -1, !1;
          this._cachedSearchTerm !== e && (this._resultIndex = void 0, this._terminal.clearSelection());
          let i,
            r = 0,
            n = 0;
          if (this._terminal.hasSelection()) {
            const e = !!t && t.incremental;
            i = this._terminal.getSelectionPosition(), n = e ? i.start.y : i.end.y, r = e ? i.start.x : i.end.x;
          }
          this._initLinesCache();
          const o = {
            startRow: n,
            startCol: r
          };
          let l = this._findInLine(e, o, t);
          if (!l) for (let s = n + 1; s < this._terminal.buffer.active.baseY + this._terminal.rows && (o.startRow = s, o.startCol = 0, l = this._findInLine(e, o, t), !l); s++);
          if (!l && 0 !== n) for (let s = 0; s < n && (o.startRow = s, o.startCol = 0, l = this._findInLine(e, o, t), !l); s++);
          return !l && i && (o.startRow = i.start.y, o.startCol = 0, l = this._findInLine(e, o, t)), this._searchResults && (0 === this._searchResults.size ? this._resultIndex = -1 : void 0 === this._resultIndex ? this._resultIndex = 0 : (this._resultIndex++, this._resultIndex >= this._searchResults.size && (this._resultIndex = 0))), this._selectResult(l, null == t ? void 0 : t.decorations, null == t ? void 0 : t.noScroll);
        }
        findPrevious(e, t) {
          if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
          return this._lastSearchOptions = t, (null == t ? void 0 : t.decorations) && (void 0 === this._resultIndex && void 0 !== this._cachedSearchTerm && e === this._cachedSearchTerm || this._highlightAllMatches(e, t)), this._fireResults(e, this._findPreviousAndSelect(e, t), t);
        }
        _fireResults(e, t, s) {
          var i;
          return (null == s ? void 0 : s.decorations) && (void 0 !== this._resultIndex && void 0 !== (null === (i = this._searchResults) || void 0 === i ? void 0 : i.size) ? this._onDidChangeResults.fire({
            resultIndex: this._resultIndex,
            resultCount: this._searchResults.size
          }) : this._onDidChangeResults.fire(void 0)), this._cachedSearchTerm = e, t;
        }
        _findPreviousAndSelect(e, t) {
          var s;
          if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
          let i;
          if (!this._terminal || !e || 0 === e.length) return i = void 0, null === (s = this._terminal) || void 0 === s || s.clearSelection(), this.clearDecorations(), this._resultIndex = -1, !1;
          this._cachedSearchTerm !== e && (this._resultIndex = void 0, this._terminal.clearSelection());
          let r = this._terminal.buffer.active.baseY + this._terminal.rows,
            n = this._terminal.cols;
          const o = !0,
            l = !!t && t.incremental;
          let h;
          this._terminal.hasSelection() && (h = this._terminal.getSelectionPosition(), r = h.start.y, n = h.start.x), this._initLinesCache();
          const a = {
            startRow: r,
            startCol: n
          };
          if (l ? (i = this._findInLine(e, a, t, !1), i && i.row === r && i.col === n || (h && (a.startRow = h.end.y, a.startCol = h.end.x), i = this._findInLine(e, a, t, !0))) : i = this._findInLine(e, a, t, o), !i) {
            a.startCol = Math.max(a.startCol, this._terminal.cols);
            for (let s = r - 1; s >= 0 && (a.startRow = s, i = this._findInLine(e, a, t, o), !i); s--);
          }
          if (!i && r !== this._terminal.buffer.active.baseY + this._terminal.rows) for (let s = this._terminal.buffer.active.baseY + this._terminal.rows; s >= r && (a.startRow = s, i = this._findInLine(e, a, t, o), !i); s--);
          return this._searchResults && (0 === this._searchResults.size ? this._resultIndex = -1 : void 0 === this._resultIndex || this._resultIndex < 0 ? this._resultIndex = this._searchResults.size - 1 : (this._resultIndex--, -1 === this._resultIndex && (this._resultIndex = this._searchResults.size - 1))), !(i || !h) || this._selectResult(i, null == t ? void 0 : t.decorations, null == t ? void 0 : t.noScroll);
        }
        _initLinesCache() {
          const e = this._terminal;
          this._linesCache || (this._linesCache = new Array(e.buffer.active.length), this._cursorMoveListener = e.onCursorMove(() => this._destroyLinesCache()), this._resizeListener = e.onResize(() => this._destroyLinesCache())), window.clearTimeout(this._linesCacheTimeoutId), this._linesCacheTimeoutId = window.setTimeout(() => this._destroyLinesCache(), 15e3);
        }
        _destroyLinesCache() {
          this._linesCache = void 0, this._cursorMoveListener && (this._cursorMoveListener.dispose(), this._cursorMoveListener = void 0), this._resizeListener && (this._resizeListener.dispose(), this._resizeListener = void 0), this._linesCacheTimeoutId && (window.clearTimeout(this._linesCacheTimeoutId), this._linesCacheTimeoutId = 0);
        }
        _isWholeWord(e, t, s) {
          return (0 === e || n.includes(t[e - 1])) && (e + s.length === t.length || n.includes(t[e + s.length]));
        }
        _findInLine(e, t, s = {}, i = !1) {
          var r;
          const n = this._terminal,
            o = t.startRow,
            l = t.startCol,
            h = n.buffer.active.getLine(o);
          if (null == h ? void 0 : h.isWrapped) return i ? void (t.startCol += n.cols) : (t.startRow--, t.startCol += n.cols, this._findInLine(e, t, s));
          let a = null === (r = this._linesCache) || void 0 === r ? void 0 : r[o];
          a || (a = this._translateBufferLineToStringWithWrap(o, !0), this._linesCache && (this._linesCache[o] = a));
          const [c, d] = a,
            u = this._bufferColsToStringOffset(o, l),
            _ = s.caseSensitive ? e : e.toLowerCase(),
            f = s.caseSensitive ? c : c.toLowerCase();
          let v = -1;
          if (s.regex) {
            const t = RegExp(_, "g");
            let s;
            if (i) for (; s = t.exec(f.slice(0, u));) v = t.lastIndex - s[0].length, e = s[0], t.lastIndex -= e.length - 1;else s = t.exec(f.slice(u)), s && s[0].length > 0 && (v = u + (t.lastIndex - s[0].length), e = s[0]);
          } else i ? u - _.length >= 0 && (v = f.lastIndexOf(_, u - _.length)) : v = f.indexOf(_, u);
          if (v >= 0) {
            if (s.wholeWord && !this._isWholeWord(v, f, e)) return;
            let t = 0;
            for (; t < d.length - 1 && v >= d[t + 1];) t++;
            let i = t;
            for (; i < d.length - 1 && v + e.length >= d[i + 1];) i++;
            const r = v - d[t],
              l = v + e.length - d[i],
              h = this._stringLengthToBufferSize(o + t, r);
            return {
              term: e,
              col: h,
              row: o + t,
              size: this._stringLengthToBufferSize(o + i, l) - h + n.cols * (i - t)
            };
          }
        }
        _stringLengthToBufferSize(e, t) {
          const s = this._terminal.buffer.active.getLine(e);
          if (!s) return 0;
          for (let e = 0; e < t; e++) {
            const i = s.getCell(e);
            if (!i) break;
            const r = i.getChars();
            r.length > 1 && (t -= r.length - 1);
            const n = s.getCell(e + 1);
            n && 0 === n.getWidth() && t++;
          }
          return t;
        }
        _bufferColsToStringOffset(e, t) {
          const s = this._terminal;
          let i = e,
            r = 0,
            n = s.buffer.active.getLine(i);
          for (; t > 0 && n;) {
            for (let e = 0; e < t && e < s.cols; e++) {
              const t = n.getCell(e);
              if (!t) break;
              t.getWidth() && (r += 0 === t.getCode() ? 1 : t.getChars().length);
            }
            if (i++, n = s.buffer.active.getLine(i), n && !n.isWrapped) break;
            t -= s.cols;
          }
          return r;
        }
        _translateBufferLineToStringWithWrap(e, t) {
          var s;
          const i = this._terminal,
            r = [],
            n = [0];
          let o = i.buffer.active.getLine(e);
          for (; o;) {
            const l = i.buffer.active.getLine(e + 1),
              h = !!l && l.isWrapped;
            let a = o.translateToString(!h && t);
            if (h && l) {
              const e = o.getCell(o.length - 1);
              e && 0 === e.getCode() && 1 === e.getWidth() && 2 === (null === (s = l.getCell(0)) || void 0 === s ? void 0 : s.getWidth()) && (a = a.slice(0, -1));
            }
            if (r.push(a), !h) break;
            n.push(n[n.length - 1] + a.length), e++, o = l;
          }
          return [r.join(""), n];
        }
        _selectResult(e, t, s) {
          var i, r;
          const n = this._terminal;
          if (this.clearActiveDecoration(), !e) return n.clearSelection(), !1;
          if (n.select(e.col, e.row, e.size), t) {
            const s = n.registerMarker(-n.buffer.active.baseY - n.buffer.active.cursorY + e.row);
            s && (this._selectedDecoration = n.registerDecoration({
              marker: s,
              x: e.col,
              width: e.size,
              backgroundColor: t.activeMatchBackground,
              layer: "top",
              overviewRulerOptions: {
                color: t.activeMatchColorOverviewRuler
              }
            }), null === (i = this._selectedDecoration) || void 0 === i || i.onRender(e => this._applyStyles(e, t.activeMatchBorder, !0)), null === (r = this._selectedDecoration) || void 0 === r || r.onDispose(() => s.dispose()));
          }
          if (!s && (e.row >= n.buffer.active.viewportY + n.rows || e.row < n.buffer.active.viewportY)) {
            let t = e.row - n.buffer.active.viewportY;
            t -= Math.floor(n.rows / 2), n.scrollLines(t);
          }
          return !0;
        }
        _applyStyles(e, t, s) {
          e.clientWidth <= 0 || (e.classList.contains("xterm-find-result-decoration") || (e.classList.add("xterm-find-result-decoration"), t && (e.style.outline = `1px solid ${t}`)), s && e.classList.add("xterm-find-active-result-decoration"));
        }
        _createResultDecoration(e, t) {
          var s;
          const i = this._terminal,
            r = i.registerMarker(-i.buffer.active.baseY - i.buffer.active.cursorY + e.row);
          if (!r) return;
          const n = i.registerDecoration({
            marker: r,
            x: e.col,
            width: e.size,
            backgroundColor: t.matchBackground,
            overviewRulerOptions: (null === (s = this._resultDecorations) || void 0 === s ? void 0 : s.get(r.line)) ? void 0 : {
              color: t.matchOverviewRuler,
              position: "center"
            }
          });
          return null == n || n.onRender(e => this._applyStyles(e, t.matchBorder, !1)), null == n || n.onDispose(() => r.dispose()), n;
        }
      }
      e.SearchAddon = o;
    })(), i;
  })();
});

/***/ }),

/***/ 1088:
/*!*************************************************************************!*\
  !*** ./node_modules/xterm-addon-serialize/lib/xterm-addon-serialize.js ***!
  \*************************************************************************/
/***/ (function(module) {

!function (t, e) {
   true ? module.exports = e() : 0;
}(this, function () {
  return (() => {
    "use strict";

    var t = {};
    return (() => {
      var e = t;
      function s(t, e, s) {
        return Math.max(e, Math.min(t, s));
      }
      Object.defineProperty(e, "__esModule", {
        value: !0
      }), e.HTMLSerializeHandler = e.SerializeAddon = void 0;
      class i {
        constructor(t) {
          this._buffer = t;
        }
        serialize(t) {
          const e = this._buffer.getNullCell(),
            s = this._buffer.getNullCell();
          let i = e;
          const r = t.start.x,
            l = t.end.x,
            o = t.start.y,
            n = t.end.y;
          this._beforeSerialize(l - r, r, l);
          for (let h = r; h <= l; h++) {
            const r = this._buffer.getLine(h);
            if (r) {
              const l = h !== t.start.x ? 0 : o,
                u = h !== t.end.x ? r.length : n;
              for (let t = l; t < u; t++) {
                const l = r.getCell(t, i === e ? s : e);
                l ? (this._nextCell(l, i, h, t), i = l) : console.warn(`Can't get cell at row=${h}, col=${t}`);
              }
            }
            this._rowEnd(h, h === l);
          }
          return this._afterSerialize(), this._serializeString();
        }
        _nextCell(t, e, s, i) {}
        _rowEnd(t, e) {}
        _beforeSerialize(t, e, s) {}
        _afterSerialize() {}
        _serializeString() {
          return "";
        }
      }
      function r(t, e) {
        return t.getFgColorMode() === e.getFgColorMode() && t.getFgColor() === e.getFgColor();
      }
      function l(t, e) {
        return t.getBgColorMode() === e.getBgColorMode() && t.getBgColor() === e.getBgColor();
      }
      function o(t, e) {
        return t.isInverse() === e.isInverse() && t.isBold() === e.isBold() && t.isUnderline() === e.isUnderline() && t.isBlink() === e.isBlink() && t.isInvisible() === e.isInvisible() && t.isItalic() === e.isItalic() && t.isDim() === e.isDim() && t.isStrikethrough() === e.isStrikethrough();
      }
      class n extends i {
        constructor(t, e) {
          super(t), this._terminal = e, this._rowIndex = 0, this._allRows = new Array(), this._allRowSeparators = new Array(), this._currentRow = "", this._nullCellCount = 0, this._cursorStyle = this._buffer.getNullCell(), this._cursorStyleRow = 0, this._cursorStyleCol = 0, this._backgroundCell = this._buffer.getNullCell(), this._firstRow = 0, this._lastCursorRow = 0, this._lastCursorCol = 0, this._lastContentCursorRow = 0, this._lastContentCursorCol = 0, this._thisRowLastChar = this._buffer.getNullCell(), this._thisRowLastSecondChar = this._buffer.getNullCell(), this._nextRowFirstChar = this._buffer.getNullCell();
        }
        _beforeSerialize(t, e, s) {
          this._allRows = new Array(t), this._lastContentCursorRow = e, this._lastCursorRow = e, this._firstRow = e;
        }
        _rowEnd(t, e) {
          var s;
          this._nullCellCount > 0 && !l(this._cursorStyle, this._backgroundCell) && (this._currentRow += `[${this._nullCellCount}X`);
          let i = "";
          if (!e) {
            t - this._firstRow >= this._terminal.rows && (null === (s = this._buffer.getLine(this._cursorStyleRow)) || void 0 === s || s.getCell(this._cursorStyleCol, this._backgroundCell));
            const e = this._buffer.getLine(t),
              r = this._buffer.getLine(t + 1);
            if (r.isWrapped) {
              i = "";
              const s = e.getCell(e.length - 1, this._thisRowLastChar),
                o = e.getCell(e.length - 2, this._thisRowLastSecondChar),
                n = r.getCell(0, this._nextRowFirstChar),
                h = n.getWidth() > 1;
              let u = !1;
              (n.getChars() && h ? this._nullCellCount <= 1 : this._nullCellCount <= 0) && ((s.getChars() || 0 === s.getWidth()) && l(s, n) && (u = !0), h && (o.getChars() || 0 === o.getWidth()) && l(s, n) && l(o, n) && (u = !0)), u || (i = "-".repeat(this._nullCellCount + 1), i += "[1D[1X", this._nullCellCount > 0 && (i += "[A", i += `[${e.length - this._nullCellCount}C`, i += `[${this._nullCellCount}X`, i += `[${e.length - this._nullCellCount}D`, i += "[B"), this._lastContentCursorRow = t + 1, this._lastContentCursorCol = 0, this._lastCursorRow = t + 1, this._lastCursorCol = 0);
            } else i = "\r\n", this._lastCursorRow = t + 1, this._lastCursorCol = 0;
          }
          this._allRows[this._rowIndex] = this._currentRow, this._allRowSeparators[this._rowIndex++] = i, this._currentRow = "", this._nullCellCount = 0;
        }
        _diffStyle(t, e) {
          const s = [],
            i = !r(t, e),
            n = !l(t, e),
            h = !o(t, e);
          if (i || n || h) if (t.isAttributeDefault()) e.isAttributeDefault() || s.push(0);else {
            if (i) {
              const e = t.getFgColor();
              t.isFgRGB() ? s.push(38, 2, e >>> 16 & 255, e >>> 8 & 255, 255 & e) : t.isFgPalette() ? e >= 16 ? s.push(38, 5, e) : s.push(8 & e ? 90 + (7 & e) : 30 + (7 & e)) : s.push(39);
            }
            if (n) {
              const e = t.getBgColor();
              t.isBgRGB() ? s.push(48, 2, e >>> 16 & 255, e >>> 8 & 255, 255 & e) : t.isBgPalette() ? e >= 16 ? s.push(48, 5, e) : s.push(8 & e ? 100 + (7 & e) : 40 + (7 & e)) : s.push(49);
            }
            h && (t.isInverse() !== e.isInverse() && s.push(t.isInverse() ? 7 : 27), t.isBold() !== e.isBold() && s.push(t.isBold() ? 1 : 22), t.isUnderline() !== e.isUnderline() && s.push(t.isUnderline() ? 4 : 24), t.isBlink() !== e.isBlink() && s.push(t.isBlink() ? 5 : 25), t.isInvisible() !== e.isInvisible() && s.push(t.isInvisible() ? 8 : 28), t.isItalic() !== e.isItalic() && s.push(t.isItalic() ? 3 : 23), t.isDim() !== e.isDim() && s.push(t.isDim() ? 2 : 22), t.isStrikethrough() !== e.isStrikethrough() && s.push(t.isStrikethrough() ? 9 : 29));
          }
          return s;
        }
        _nextCell(t, e, s, i) {
          if (0 === t.getWidth()) return;
          const r = "" === t.getChars(),
            o = this._diffStyle(t, this._cursorStyle);
          if (r ? !l(this._cursorStyle, t) : o.length > 0) {
            this._nullCellCount > 0 && (l(this._cursorStyle, this._backgroundCell) || (this._currentRow += `[${this._nullCellCount}X`), this._currentRow += `[${this._nullCellCount}C`, this._nullCellCount = 0), this._lastContentCursorRow = this._lastCursorRow = s, this._lastContentCursorCol = this._lastCursorCol = i, this._currentRow += `[${o.join(";")}m`;
            const t = this._buffer.getLine(s);
            void 0 !== t && (t.getCell(i, this._cursorStyle), this._cursorStyleRow = s, this._cursorStyleCol = i);
          }
          r ? this._nullCellCount += t.getWidth() : (this._nullCellCount > 0 && (l(this._cursorStyle, this._backgroundCell) || (this._currentRow += `[${this._nullCellCount}X`), this._currentRow += `[${this._nullCellCount}C`, this._nullCellCount = 0), this._currentRow += t.getChars(), this._lastContentCursorRow = this._lastCursorRow = s, this._lastContentCursorCol = this._lastCursorCol = i + t.getWidth());
        }
        _serializeString() {
          let t = this._allRows.length;
          this._buffer.length - this._firstRow <= this._terminal.rows && (t = this._lastContentCursorRow + 1 - this._firstRow, this._lastCursorCol = this._lastContentCursorCol, this._lastCursorRow = this._lastContentCursorRow);
          let e = "";
          for (let s = 0; s < t; s++) e += this._allRows[s], s + 1 < t && (e += this._allRowSeparators[s]);
          const s = this._buffer.baseY + this._buffer.cursorY,
            i = this._buffer.cursorX;
          var r;
          (s !== this._lastCursorRow || i !== this._lastCursorCol) && ((r = s - this._lastCursorRow) > 0 ? e += `[${r}B` : r < 0 && (e += `[${-r}A`), (t => {
            t > 0 ? e += `[${t}C` : t < 0 && (e += `[${-t}D`);
          })(i - this._lastCursorCol));
          const l = this._terminal._core._inputHandler._curAttrData,
            o = this._diffStyle(l, this._cursorStyle);
          return o.length > 0 && (e += `[${o.join(";")}m`), e;
        }
      }
      e.SerializeAddon = class {
        constructor() {}
        activate(t) {
          this._terminal = t;
        }
        _serializeBuffer(t, e, i) {
          const r = e.length,
            l = new n(e, t),
            o = void 0 === i ? r : s(i + t.rows, 0, r);
          return l.serialize({
            start: {
              x: r - o,
              y: 0
            },
            end: {
              x: r - 1,
              y: t.cols
            }
          });
        }
        _serializeBufferAsHTML(t, e) {
          var i, r;
          const l = t.buffer.active,
            o = new h(l, t, e);
          if (null === (i = e.onlySelection) || void 0 === i || !i) {
            const i = l.length,
              r = e.scrollback,
              n = void 0 === r ? i : s(r + t.rows, 0, i);
            return o.serialize({
              start: {
                x: i - n,
                y: 0
              },
              end: {
                x: i - 1,
                y: t.cols
              }
            });
          }
          const n = null === (r = this._terminal) || void 0 === r ? void 0 : r.getSelectionPosition();
          return void 0 !== n ? o.serialize({
            start: {
              x: n.start.y,
              y: n.start.x
            },
            end: {
              x: n.end.y,
              y: n.end.x
            }
          }) : "";
        }
        _serializeModes(t) {
          let e = "";
          const s = t.modes;
          if (s.applicationCursorKeysMode && (e += "[?1h"), s.applicationKeypadMode && (e += "[?66h"), s.bracketedPasteMode && (e += "[?2004h"), s.insertMode && (e += "[4h"), s.originMode && (e += "[?6h"), s.reverseWraparoundMode && (e += "[?45h"), s.sendFocusMode && (e += "[?1004h"), !1 === s.wraparoundMode && (e += "[?7l"), "none" !== s.mouseTrackingMode) switch (s.mouseTrackingMode) {
            case "x10":
              e += "[?9h";
              break;
            case "vt200":
              e += "[?1000h";
              break;
            case "drag":
              e += "[?1002h";
              break;
            case "any":
              e += "[?1003h";
          }
          return e;
        }
        serialize(t) {
          if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
          let e = this._serializeBuffer(this._terminal, this._terminal.buffer.normal, null == t ? void 0 : t.scrollback);
          return (null == t ? void 0 : t.excludeAltBuffer) || "alternate" !== this._terminal.buffer.active.type || (e += `[?1049h[H${this._serializeBuffer(this._terminal, this._terminal.buffer.alternate, void 0)}`), (null == t ? void 0 : t.excludeModes) || (e += this._serializeModes(this._terminal)), e;
        }
        serializeAsHTML(t) {
          if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
          return this._serializeBufferAsHTML(this._terminal, t || {});
        }
        dispose() {}
      };
      class h extends i {
        constructor(t, e, s) {
          super(t), this._terminal = e, this._options = s, this._currentRow = "", this._htmlContent = "", this._colors = e._core._themeService.colors;
        }
        _padStart(t, e, s) {
          return e >>= 0, s = null != s ? s : " ", t.length > e ? t : ((e -= t.length) > s.length && (s += s.repeat(e / s.length)), s.slice(0, e) + t);
        }
        _beforeSerialize(t, e, s) {
          var i, r, l, o, n;
          this._htmlContent += "<html><body>\x3c!--StartFragment--\x3e<pre>";
          let h = "#000000",
            u = "#ffffff";
          null !== (i = this._options.includeGlobalBackground) && void 0 !== i && i && (h = null !== (l = null === (r = this._terminal.options.theme) || void 0 === r ? void 0 : r.foreground) && void 0 !== l ? l : "#ffffff", u = null !== (n = null === (o = this._terminal.options.theme) || void 0 === o ? void 0 : o.background) && void 0 !== n ? n : "#000000");
          const a = [];
          a.push("color: " + h + ";"), a.push("background-color: " + u + ";"), a.push("font-family: " + this._terminal.options.fontFamily + ";"), a.push("font-size: " + this._terminal.options.fontSize + "px;"), this._htmlContent += "<div style='" + a.join(" ") + "'>";
        }
        _afterSerialize() {
          this._htmlContent += "</div>", this._htmlContent += "</pre>\x3c!--EndFragment--\x3e</body></html>";
        }
        _rowEnd(t, e) {
          this._htmlContent += "<div><span>" + this._currentRow + "</span></div>", this._currentRow = "";
        }
        _getHexColor(t, e) {
          const s = e ? t.getFgColor() : t.getBgColor();
          return (e ? t.isFgRGB() : t.isBgRGB()) ? [s >> 16 & 255, s >> 8 & 255, 255 & s].map(t => this._padStart(t.toString(16), 2, "0")).join("") : (e ? t.isFgPalette() : t.isBgPalette()) ? this._colors.ansi[s].css : void 0;
        }
        _diffStyle(t, e) {
          const s = [],
            i = !r(t, e),
            n = !l(t, e),
            h = !o(t, e);
          if (i || n || h) {
            const e = this._getHexColor(t, !0);
            e && s.push("color: " + e + ";");
            const i = this._getHexColor(t, !1);
            return i && s.push("background-color: " + i + ";"), t.isInverse() && s.push("color: #000000; background-color: #BFBFBF;"), t.isBold() && s.push("font-weight: bold;"), t.isUnderline() && s.push("text-decoration: underline;"), t.isBlink() && s.push("text-decoration: blink;"), t.isInvisible() && s.push("visibility: hidden;"), t.isItalic() && s.push("font-style: italic;"), t.isDim() && s.push("opacity: 0.5;"), t.isStrikethrough() && s.push("text-decoration: line-through;"), s;
          }
        }
        _nextCell(t, e, s, i) {
          if (0 === t.getWidth()) return;
          const r = "" === t.getChars(),
            l = this._diffStyle(t, e);
          l && (this._currentRow += 0 === l.length ? "</span><span>" : "</span><span style='" + l.join(" ") + "'>"), this._currentRow += r ? " " : t.getChars();
        }
        _serializeString() {
          return this._htmlContent;
        }
      }
      e.HTMLSerializeHandler = h;
    })(), t;
  })();
});

/***/ }),

/***/ 8731:
/*!*************************************************************************!*\
  !*** ./node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js ***!
  \*************************************************************************/
/***/ (function(module) {

!function (e, t) {
   true ? module.exports = t() : 0;
}(this, function () {
  return (() => {
    "use strict";

    var e = {
        433: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.UnicodeV11 = void 0;
          const o = [[768, 879], [1155, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1541], [1552, 1562], [1564, 1564], [1611, 1631], [1648, 1648], [1750, 1757], [1759, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2045, 2045], [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2093], [2137, 2139], [2259, 2306], [2362, 2362], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2391], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2558, 2558], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2641, 2641], [2672, 2673], [2677, 2677], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2810, 2815], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2884], [2893, 2893], [2902, 2902], [2914, 2915], [2946, 2946], [3008, 3008], [3021, 3021], [3072, 3072], [3076, 3076], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3170, 3171], [3201, 3201], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3328, 3329], [3387, 3388], [3393, 3396], [3405, 3405], [3426, 3427], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3981, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4151], [4153, 4154], [4157, 4158], [4184, 4185], [4190, 4192], [4209, 4212], [4226, 4226], [4229, 4230], [4237, 4237], [4253, 4253], [4448, 4607], [4957, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6158], [6277, 6278], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6683, 6683], [6742, 6742], [6744, 6750], [6752, 6752], [6754, 6754], [6757, 6764], [6771, 6780], [6783, 6783], [6832, 6846], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7040, 7041], [7074, 7077], [7080, 7081], [7083, 7085], [7142, 7142], [7144, 7145], [7149, 7149], [7151, 7153], [7212, 7219], [7222, 7223], [7376, 7378], [7380, 7392], [7394, 7400], [7405, 7405], [7412, 7412], [7416, 7417], [7616, 7673], [7675, 7679], [8203, 8207], [8234, 8238], [8288, 8292], [8294, 8303], [8400, 8432], [11503, 11505], [11647, 11647], [11744, 11775], [12330, 12333], [12441, 12442], [42607, 42610], [42612, 42621], [42654, 42655], [42736, 42737], [43010, 43010], [43014, 43014], [43019, 43019], [43045, 43046], [43204, 43205], [43232, 43249], [43263, 43263], [43302, 43309], [43335, 43345], [43392, 43394], [43443, 43443], [43446, 43449], [43452, 43453], [43493, 43493], [43561, 43566], [43569, 43570], [43573, 43574], [43587, 43587], [43596, 43596], [43644, 43644], [43696, 43696], [43698, 43700], [43703, 43704], [43710, 43711], [43713, 43713], [43756, 43757], [43766, 43766], [44005, 44005], [44008, 44008], [44013, 44013], [64286, 64286], [65024, 65039], [65056, 65071], [65279, 65279], [65529, 65531]],
            n = [[66045, 66045], [66272, 66272], [66422, 66426], [68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [68325, 68326], [68900, 68903], [69446, 69456], [69633, 69633], [69688, 69702], [69759, 69761], [69811, 69814], [69817, 69818], [69821, 69821], [69837, 69837], [69888, 69890], [69927, 69931], [69933, 69940], [70003, 70003], [70016, 70017], [70070, 70078], [70089, 70092], [70191, 70193], [70196, 70196], [70198, 70199], [70206, 70206], [70367, 70367], [70371, 70378], [70400, 70401], [70459, 70460], [70464, 70464], [70502, 70508], [70512, 70516], [70712, 70719], [70722, 70724], [70726, 70726], [70750, 70750], [70835, 70840], [70842, 70842], [70847, 70848], [70850, 70851], [71090, 71093], [71100, 71101], [71103, 71104], [71132, 71133], [71219, 71226], [71229, 71229], [71231, 71232], [71339, 71339], [71341, 71341], [71344, 71349], [71351, 71351], [71453, 71455], [71458, 71461], [71463, 71467], [71727, 71735], [71737, 71738], [72148, 72151], [72154, 72155], [72160, 72160], [72193, 72202], [72243, 72248], [72251, 72254], [72263, 72263], [72273, 72278], [72281, 72283], [72330, 72342], [72344, 72345], [72752, 72758], [72760, 72765], [72767, 72767], [72850, 72871], [72874, 72880], [72882, 72883], [72885, 72886], [73009, 73014], [73018, 73018], [73020, 73021], [73023, 73029], [73031, 73031], [73104, 73105], [73109, 73109], [73111, 73111], [73459, 73460], [78896, 78904], [92912, 92916], [92976, 92982], [94031, 94031], [94095, 94098], [113821, 113822], [113824, 113827], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [121344, 121398], [121403, 121452], [121461, 121461], [121476, 121476], [121499, 121503], [121505, 121519], [122880, 122886], [122888, 122904], [122907, 122913], [122915, 122916], [122918, 122922], [123184, 123190], [123628, 123631], [125136, 125142], [125252, 125258], [917505, 917505], [917536, 917631], [917760, 917999]],
            r = [[4352, 4447], [8986, 8987], [9001, 9002], [9193, 9196], [9200, 9200], [9203, 9203], [9725, 9726], [9748, 9749], [9800, 9811], [9855, 9855], [9875, 9875], [9889, 9889], [9898, 9899], [9917, 9918], [9924, 9925], [9934, 9934], [9940, 9940], [9962, 9962], [9970, 9971], [9973, 9973], [9978, 9978], [9981, 9981], [9989, 9989], [9994, 9995], [10024, 10024], [10060, 10060], [10062, 10062], [10067, 10069], [10071, 10071], [10133, 10135], [10160, 10160], [10175, 10175], [11035, 11036], [11088, 11088], [11093, 11093], [11904, 11929], [11931, 12019], [12032, 12245], [12272, 12283], [12288, 12329], [12334, 12350], [12353, 12438], [12443, 12543], [12549, 12591], [12593, 12686], [12688, 12730], [12736, 12771], [12784, 12830], [12832, 12871], [12880, 19903], [19968, 42124], [42128, 42182], [43360, 43388], [44032, 55203], [63744, 64255], [65040, 65049], [65072, 65106], [65108, 65126], [65128, 65131], [65281, 65376], [65504, 65510]],
            i = [[94176, 94179], [94208, 100343], [100352, 101106], [110592, 110878], [110928, 110930], [110948, 110951], [110960, 111355], [126980, 126980], [127183, 127183], [127374, 127374], [127377, 127386], [127488, 127490], [127504, 127547], [127552, 127560], [127568, 127569], [127584, 127589], [127744, 127776], [127789, 127797], [127799, 127868], [127870, 127891], [127904, 127946], [127951, 127955], [127968, 127984], [127988, 127988], [127992, 128062], [128064, 128064], [128066, 128252], [128255, 128317], [128331, 128334], [128336, 128359], [128378, 128378], [128405, 128406], [128420, 128420], [128507, 128591], [128640, 128709], [128716, 128716], [128720, 128722], [128725, 128725], [128747, 128748], [128756, 128762], [128992, 129003], [129293, 129393], [129395, 129398], [129402, 129442], [129445, 129450], [129454, 129482], [129485, 129535], [129648, 129651], [129656, 129658], [129664, 129666], [129680, 129685], [131072, 196605], [196608, 262141]];
          let d;
          function c(e, t) {
            let o,
              n = 0,
              r = t.length - 1;
            if (e < t[0][0] || e > t[r][1]) return !1;
            for (; r >= n;) if (o = n + r >> 1, e > t[o][1]) n = o + 1;else {
              if (!(e < t[o][0])) return !0;
              r = o - 1;
            }
            return !1;
          }
          t.UnicodeV11 = class {
            constructor() {
              if (this.version = "11", !d) {
                d = new Uint8Array(65536), d.fill(1), d[0] = 0, d.fill(0, 1, 32), d.fill(0, 127, 160);
                for (let e = 0; e < o.length; ++e) d.fill(0, o[e][0], o[e][1] + 1);
                for (let e = 0; e < r.length; ++e) d.fill(2, r[e][0], r[e][1] + 1);
              }
            }
            wcwidth(e) {
              return e < 32 ? 0 : e < 127 ? 1 : e < 65536 ? d[e] : c(e, n) ? 0 : c(e, i) ? 2 : 1;
            }
          };
        }
      },
      t = {};
    function o(n) {
      var r = t[n];
      if (void 0 !== r) return r.exports;
      var i = t[n] = {
        exports: {}
      };
      return e[n](i, i.exports, o), i.exports;
    }
    var n = {};
    return (() => {
      var e = n;
      Object.defineProperty(e, "__esModule", {
        value: !0
      }), e.Unicode11Addon = void 0;
      const t = o(433);
      e.Unicode11Addon = class {
        activate(e) {
          e.unicode.register(new t.UnicodeV11());
        }
        dispose() {}
      };
    })(), n;
  })();
});

/***/ }),

/***/ 1218:
/*!*****************************************************************!*\
  !*** ./node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js ***!
  \*****************************************************************/
/***/ ((module) => {

!function (e, t) {
   true ? module.exports = t() : 0;
}(self, function () {
  return (() => {
    "use strict";

    var e = {
        965: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.GlyphRenderer = void 0;
          const s = i(381),
            r = i(855),
            o = i(859),
            n = i(374),
            a = i(509),
            h = 11,
            l = h * Float32Array.BYTES_PER_ELEMENT;
          let c,
            d = 0,
            _ = 0,
            u = 0;
          class g extends o.Disposable {
            constructor(e, t, i) {
              super(), this._terminal = e, this._gl = t, this._dimensions = i, this._activeBuffer = 0, this._vertices = {
                count: 0,
                attributes: new Float32Array(0),
                attributesBuffers: [new Float32Array(0), new Float32Array(0)]
              };
              const r = this._gl;
              void 0 === a.TextureAtlas.maxAtlasPages && (a.TextureAtlas.maxAtlasPages = Math.min(32, (0, n.throwIfFalsy)(r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS))), a.TextureAtlas.maxTextureSize = (0, n.throwIfFalsy)(r.getParameter(r.MAX_TEXTURE_SIZE))), this._program = (0, n.throwIfFalsy)((0, s.createProgram)(r, "#version 300 es\nlayout (location = 0) in vec2 a_unitquad;\nlayout (location = 1) in vec2 a_cellpos;\nlayout (location = 2) in vec2 a_offset;\nlayout (location = 3) in vec2 a_size;\nlayout (location = 4) in float a_texpage;\nlayout (location = 5) in vec2 a_texcoord;\nlayout (location = 6) in vec2 a_texsize;\n\nuniform mat4 u_projection;\nuniform vec2 u_resolution;\n\nout vec2 v_texcoord;\nflat out int v_texpage;\n\nvoid main() {\n  vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);\n  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n  v_texpage = int(a_texpage);\n  v_texcoord = a_texcoord + a_unitquad * a_texsize;\n}", function (e) {
                let t = "";
                for (let i = 1; i < e; i++) t += ` else if (v_texpage == ${i}) { outColor = texture(u_texture[${i}], v_texcoord); }`;
                return `#version 300 es\nprecision lowp float;\n\nin vec2 v_texcoord;\nflat in int v_texpage;\n\nuniform sampler2D u_texture[${e}];\n\nout vec4 outColor;\n\nvoid main() {\n  if (v_texpage == 0) {\n    outColor = texture(u_texture[0], v_texcoord);\n  } ${t}\n}`;
              }(a.TextureAtlas.maxAtlasPages))), this.register((0, o.toDisposable)(() => r.deleteProgram(this._program))), this._projectionLocation = (0, n.throwIfFalsy)(r.getUniformLocation(this._program, "u_projection")), this._resolutionLocation = (0, n.throwIfFalsy)(r.getUniformLocation(this._program, "u_resolution")), this._textureLocation = (0, n.throwIfFalsy)(r.getUniformLocation(this._program, "u_texture")), this._vertexArrayObject = r.createVertexArray(), r.bindVertexArray(this._vertexArrayObject);
              const h = new Float32Array([0, 0, 1, 0, 0, 1, 1, 1]),
                c = r.createBuffer();
              this.register((0, o.toDisposable)(() => r.deleteBuffer(c))), r.bindBuffer(r.ARRAY_BUFFER, c), r.bufferData(r.ARRAY_BUFFER, h, r.STATIC_DRAW), r.enableVertexAttribArray(0), r.vertexAttribPointer(0, 2, this._gl.FLOAT, !1, 0, 0);
              const d = new Uint8Array([0, 1, 2, 3]),
                _ = r.createBuffer();
              this.register((0, o.toDisposable)(() => r.deleteBuffer(_))), r.bindBuffer(r.ELEMENT_ARRAY_BUFFER, _), r.bufferData(r.ELEMENT_ARRAY_BUFFER, d, r.STATIC_DRAW), this._attributesBuffer = (0, n.throwIfFalsy)(r.createBuffer()), this.register((0, o.toDisposable)(() => r.deleteBuffer(this._attributesBuffer))), r.bindBuffer(r.ARRAY_BUFFER, this._attributesBuffer), r.enableVertexAttribArray(2), r.vertexAttribPointer(2, 2, r.FLOAT, !1, l, 0), r.vertexAttribDivisor(2, 1), r.enableVertexAttribArray(3), r.vertexAttribPointer(3, 2, r.FLOAT, !1, l, 2 * Float32Array.BYTES_PER_ELEMENT), r.vertexAttribDivisor(3, 1), r.enableVertexAttribArray(4), r.vertexAttribPointer(4, 1, r.FLOAT, !1, l, 4 * Float32Array.BYTES_PER_ELEMENT), r.vertexAttribDivisor(4, 1), r.enableVertexAttribArray(5), r.vertexAttribPointer(5, 2, r.FLOAT, !1, l, 5 * Float32Array.BYTES_PER_ELEMENT), r.vertexAttribDivisor(5, 1), r.enableVertexAttribArray(6), r.vertexAttribPointer(6, 2, r.FLOAT, !1, l, 7 * Float32Array.BYTES_PER_ELEMENT), r.vertexAttribDivisor(6, 1), r.enableVertexAttribArray(1), r.vertexAttribPointer(1, 2, r.FLOAT, !1, l, 9 * Float32Array.BYTES_PER_ELEMENT), r.vertexAttribDivisor(1, 1), r.useProgram(this._program);
              const u = new Int32Array(a.TextureAtlas.maxAtlasPages);
              for (let e = 0; e < a.TextureAtlas.maxAtlasPages; e++) u[e] = e;
              r.uniform1iv(this._textureLocation, u), r.uniformMatrix4fv(this._projectionLocation, !1, s.PROJECTION_MATRIX), this._atlasTextures = [];
              for (let e = 0; e < a.TextureAtlas.maxAtlasPages; e++) {
                const t = new s.GLTexture((0, n.throwIfFalsy)(r.createTexture()));
                this.register((0, o.toDisposable)(() => r.deleteTexture(t.texture))), r.activeTexture(r.TEXTURE0 + e), r.bindTexture(r.TEXTURE_2D, t.texture), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, 1, 1, 0, r.RGBA, r.UNSIGNED_BYTE, new Uint8Array([255, 0, 0, 255])), this._atlasTextures[e] = t;
              }
              r.enable(r.BLEND), r.blendFunc(r.SRC_ALPHA, r.ONE_MINUS_SRC_ALPHA), this.handleResize();
            }
            beginFrame() {
              return !this._atlas || this._atlas.beginFrame();
            }
            updateCell(e, t, i, s, r, o, n, a) {
              this._updateCell(this._vertices.attributes, e, t, i, s, r, o, n, a);
            }
            _updateCell(e, t, i, s, o, n, a, l, g) {
              d = (i * this._terminal.cols + t) * h, s !== r.NULL_CELL_CODE && void 0 !== s ? this._atlas && (c = l && l.length > 1 ? this._atlas.getRasterizedGlyphCombinedChar(l, o, n, a) : this._atlas.getRasterizedGlyph(s, o, n, a), _ = Math.floor((this._dimensions.device.cell.width - this._dimensions.device.char.width) / 2), o !== g && c.offset.x > _ ? (u = c.offset.x - _, e[d] = -(c.offset.x - u) + this._dimensions.device.char.left, e[d + 1] = -c.offset.y + this._dimensions.device.char.top, e[d + 2] = (c.size.x - u) / this._dimensions.device.canvas.width, e[d + 3] = c.size.y / this._dimensions.device.canvas.height, e[d + 4] = c.texturePage, e[d + 5] = c.texturePositionClipSpace.x + u / this._atlas.pages[c.texturePage].canvas.width, e[d + 6] = c.texturePositionClipSpace.y, e[d + 7] = c.sizeClipSpace.x - u / this._atlas.pages[c.texturePage].canvas.width, e[d + 8] = c.sizeClipSpace.y) : (e[d] = -c.offset.x + this._dimensions.device.char.left, e[d + 1] = -c.offset.y + this._dimensions.device.char.top, e[d + 2] = c.size.x / this._dimensions.device.canvas.width, e[d + 3] = c.size.y / this._dimensions.device.canvas.height, e[d + 4] = c.texturePage, e[d + 5] = c.texturePositionClipSpace.x, e[d + 6] = c.texturePositionClipSpace.y, e[d + 7] = c.sizeClipSpace.x, e[d + 8] = c.sizeClipSpace.y)) : e.fill(0, d, d + h - 1 - 2);
            }
            clear() {
              const e = this._terminal,
                t = e.cols * e.rows * h;
              this._vertices.count !== t ? this._vertices.attributes = new Float32Array(t) : this._vertices.attributes.fill(0);
              let i = 0;
              for (; i < this._vertices.attributesBuffers.length; i++) this._vertices.count !== t ? this._vertices.attributesBuffers[i] = new Float32Array(t) : this._vertices.attributesBuffers[i].fill(0);
              this._vertices.count = t, i = 0;
              for (let t = 0; t < e.rows; t++) for (let s = 0; s < e.cols; s++) this._vertices.attributes[i + 9] = s / e.cols, this._vertices.attributes[i + 10] = t / e.rows, i += h;
            }
            handleResize() {
              const e = this._gl;
              e.viewport(0, 0, e.canvas.width, e.canvas.height), e.uniform2f(this._resolutionLocation, e.canvas.width, e.canvas.height), this.clear();
            }
            render(e) {
              if (!this._atlas) return;
              const t = this._gl;
              t.useProgram(this._program), t.bindVertexArray(this._vertexArrayObject), this._activeBuffer = (this._activeBuffer + 1) % 2;
              const i = this._vertices.attributesBuffers[this._activeBuffer];
              let s = 0;
              for (let t = 0; t < e.lineLengths.length; t++) {
                const r = t * this._terminal.cols * h,
                  o = this._vertices.attributes.subarray(r, r + e.lineLengths[t] * h);
                i.set(o, s), s += o.length;
              }
              t.bindBuffer(t.ARRAY_BUFFER, this._attributesBuffer), t.bufferData(t.ARRAY_BUFFER, i.subarray(0, s), t.STREAM_DRAW);
              for (let e = 0; e < this._atlas.pages.length; e++) this._atlas.pages[e].version !== this._atlasTextures[e].version && this._bindAtlasPageTexture(t, this._atlas, e);
              t.drawElementsInstanced(t.TRIANGLE_STRIP, 4, t.UNSIGNED_BYTE, 0, s / h);
            }
            setAtlas(e) {
              this._atlas = e;
              for (const e of this._atlasTextures) e.version = -1;
            }
            _bindAtlasPageTexture(e, t, i) {
              e.activeTexture(e.TEXTURE0 + i), e.bindTexture(e.TEXTURE_2D, this._atlasTextures[i].texture), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, t.pages[i].canvas), e.generateMipmap(e.TEXTURE_2D), this._atlasTextures[i].version = t.pages[i].version;
            }
            setDimensions(e) {
              this._dimensions = e;
            }
          }
          t.GlyphRenderer = g;
        },
        742: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.RectangleRenderer = void 0;
          const s = i(381),
            r = i(310),
            o = i(859),
            n = i(237),
            a = i(374),
            h = 8 * Float32Array.BYTES_PER_ELEMENT;
          let l = 0,
            c = !1,
            d = 0,
            _ = 0,
            u = 0,
            g = 0,
            v = 0,
            f = 0;
          class C extends o.Disposable {
            constructor(e, t, i, r) {
              super(), this._terminal = e, this._gl = t, this._dimensions = i, this._themeService = r, this._vertices = {
                count: 0,
                attributes: new Float32Array(160)
              };
              const n = this._gl;
              this._program = (0, a.throwIfFalsy)((0, s.createProgram)(n, "#version 300 es\nlayout (location = 0) in vec2 a_position;\nlayout (location = 1) in vec2 a_size;\nlayout (location = 2) in vec4 a_color;\nlayout (location = 3) in vec2 a_unitquad;\n\nuniform mat4 u_projection;\n\nout vec4 v_color;\n\nvoid main() {\n  vec2 zeroToOne = a_position + (a_unitquad * a_size);\n  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n  v_color = a_color;\n}", "#version 300 es\nprecision lowp float;\n\nin vec4 v_color;\n\nout vec4 outColor;\n\nvoid main() {\n  outColor = v_color;\n}")), this.register((0, o.toDisposable)(() => n.deleteProgram(this._program))), this._projectionLocation = (0, a.throwIfFalsy)(n.getUniformLocation(this._program, "u_projection")), this._vertexArrayObject = n.createVertexArray(), n.bindVertexArray(this._vertexArrayObject);
              const l = new Float32Array([0, 0, 1, 0, 0, 1, 1, 1]),
                c = n.createBuffer();
              this.register((0, o.toDisposable)(() => n.deleteBuffer(c))), n.bindBuffer(n.ARRAY_BUFFER, c), n.bufferData(n.ARRAY_BUFFER, l, n.STATIC_DRAW), n.enableVertexAttribArray(3), n.vertexAttribPointer(3, 2, this._gl.FLOAT, !1, 0, 0);
              const d = new Uint8Array([0, 1, 2, 3]),
                _ = n.createBuffer();
              this.register((0, o.toDisposable)(() => n.deleteBuffer(_))), n.bindBuffer(n.ELEMENT_ARRAY_BUFFER, _), n.bufferData(n.ELEMENT_ARRAY_BUFFER, d, n.STATIC_DRAW), this._attributesBuffer = (0, a.throwIfFalsy)(n.createBuffer()), this.register((0, o.toDisposable)(() => n.deleteBuffer(this._attributesBuffer))), n.bindBuffer(n.ARRAY_BUFFER, this._attributesBuffer), n.enableVertexAttribArray(0), n.vertexAttribPointer(0, 2, n.FLOAT, !1, h, 0), n.vertexAttribDivisor(0, 1), n.enableVertexAttribArray(1), n.vertexAttribPointer(1, 2, n.FLOAT, !1, h, 2 * Float32Array.BYTES_PER_ELEMENT), n.vertexAttribDivisor(1, 1), n.enableVertexAttribArray(2), n.vertexAttribPointer(2, 4, n.FLOAT, !1, h, 4 * Float32Array.BYTES_PER_ELEMENT), n.vertexAttribDivisor(2, 1), this._updateCachedColors(r.colors), this.register(this._themeService.onChangeColors(e => {
                this._updateCachedColors(e), this._updateViewportRectangle();
              }));
            }
            render() {
              const e = this._gl;
              e.useProgram(this._program), e.bindVertexArray(this._vertexArrayObject), e.uniformMatrix4fv(this._projectionLocation, !1, s.PROJECTION_MATRIX), e.bindBuffer(e.ARRAY_BUFFER, this._attributesBuffer), e.bufferData(e.ARRAY_BUFFER, this._vertices.attributes, e.DYNAMIC_DRAW), e.drawElementsInstanced(this._gl.TRIANGLE_STRIP, 4, e.UNSIGNED_BYTE, 0, this._vertices.count);
            }
            handleResize() {
              this._updateViewportRectangle();
            }
            setDimensions(e) {
              this._dimensions = e;
            }
            _updateCachedColors(e) {
              this._bgFloat = this._colorToFloat32Array(e.background);
            }
            _updateViewportRectangle() {
              this._addRectangleFloat(this._vertices.attributes, 0, 0, 0, this._terminal.cols * this._dimensions.device.cell.width, this._terminal.rows * this._dimensions.device.cell.height, this._bgFloat);
            }
            updateBackgrounds(e) {
              const t = this._terminal,
                i = this._vertices;
              let s,
                o,
                n,
                a,
                h,
                l,
                c,
                d,
                _,
                u,
                g,
                v = 1;
              for (s = 0; s < t.rows; s++) {
                for (n = -1, a = 0, h = 0, l = !1, o = 0; o < t.cols; o++) c = (s * t.cols + o) * r.RENDER_MODEL_INDICIES_PER_CELL, d = e.cells[c + r.RENDER_MODEL_BG_OFFSET], _ = e.cells[c + r.RENDER_MODEL_FG_OFFSET], u = !!(67108864 & _), (d !== a || _ !== h && (l || u)) && ((0 !== a || l && 0 !== h) && (g = 8 * v++, this._updateRectangle(i, g, h, a, n, o, s)), n = o, a = d, h = _, l = u);
                (0 !== a || l && 0 !== h) && (g = 8 * v++, this._updateRectangle(i, g, h, a, n, t.cols, s));
              }
              i.count = v;
            }
            _updateRectangle(e, t, i, r, o, a, h) {
              if (c = !1, 67108864 & i) switch (50331648 & i) {
                case 16777216:
                case 33554432:
                  l = this._themeService.colors.ansi[255 & i].rgba;
                  break;
                case 50331648:
                  l = (16777215 & i) << 8;
                  break;
                default:
                  l = this._themeService.colors.foreground.rgba;
              } else switch (50331648 & r) {
                case 16777216:
                case 33554432:
                  l = this._themeService.colors.ansi[255 & r].rgba;
                  break;
                case 50331648:
                  l = (16777215 & r) << 8;
                  break;
                default:
                  l = this._themeService.colors.background.rgba, c = !0;
              }
              e.attributes.length < t + 4 && (e.attributes = (0, s.expandFloat32Array)(e.attributes, this._terminal.rows * this._terminal.cols * 8)), d = o * this._dimensions.device.cell.width, _ = h * this._dimensions.device.cell.height, u = (l >> 24 & 255) / 255, g = (l >> 16 & 255) / 255, v = (l >> 8 & 255) / 255, f = !c && 134217728 & r ? n.DIM_OPACITY : 1, this._addRectangle(e.attributes, t, d, _, (a - o) * this._dimensions.device.cell.width, this._dimensions.device.cell.height, u, g, v, f);
            }
            _addRectangle(e, t, i, s, r, o, n, a, h, l) {
              e[t] = i / this._dimensions.device.canvas.width, e[t + 1] = s / this._dimensions.device.canvas.height, e[t + 2] = r / this._dimensions.device.canvas.width, e[t + 3] = o / this._dimensions.device.canvas.height, e[t + 4] = n, e[t + 5] = a, e[t + 6] = h, e[t + 7] = l;
            }
            _addRectangleFloat(e, t, i, s, r, o, n) {
              e[t] = i / this._dimensions.device.canvas.width, e[t + 1] = s / this._dimensions.device.canvas.height, e[t + 2] = r / this._dimensions.device.canvas.width, e[t + 3] = o / this._dimensions.device.canvas.height, e[t + 4] = n[0], e[t + 5] = n[1], e[t + 6] = n[2], e[t + 7] = n[3];
            }
            _colorToFloat32Array(e) {
              return new Float32Array([(e.rgba >> 24 & 255) / 255, (e.rgba >> 16 & 255) / 255, (e.rgba >> 8 & 255) / 255, (255 & e.rgba) / 255]);
            }
          }
          t.RectangleRenderer = C;
        },
        310: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.RenderModel = t.COMBINED_CHAR_BIT_MASK = t.RENDER_MODEL_EXT_OFFSET = t.RENDER_MODEL_FG_OFFSET = t.RENDER_MODEL_BG_OFFSET = t.RENDER_MODEL_INDICIES_PER_CELL = void 0;
          const s = i(296);
          t.RENDER_MODEL_INDICIES_PER_CELL = 4, t.RENDER_MODEL_BG_OFFSET = 1, t.RENDER_MODEL_FG_OFFSET = 2, t.RENDER_MODEL_EXT_OFFSET = 3, t.COMBINED_CHAR_BIT_MASK = 2147483648, t.RenderModel = class {
            constructor() {
              this.cells = new Uint32Array(0), this.lineLengths = new Uint32Array(0), this.selection = (0, s.createSelectionRenderModel)();
            }
            resize(e, i) {
              const s = e * i * t.RENDER_MODEL_INDICIES_PER_CELL;
              s !== this.cells.length && (this.cells = new Uint32Array(s), this.lineLengths = new Uint32Array(i));
            }
            clear() {
              this.cells.fill(0, 0), this.lineLengths.fill(0, 0);
            }
          };
        },
        666: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.JoinedCellData = t.WebglRenderer = void 0;
          const s = i(820),
            r = i(274),
            o = i(627),
            n = i(56),
            a = i(374),
            h = i(147),
            l = i(782),
            c = i(855),
            d = i(345),
            _ = i(859),
            u = i(965),
            g = i(742),
            v = i(461),
            f = i(733),
            C = i(310);
          class p extends _.Disposable {
            constructor(e, t, i, h, c, u, g, p, m) {
              super(), this._terminal = e, this._characterJoinerService = t, this._charSizeService = i, this._coreBrowserService = h, this._decorationService = u, this._optionsService = g, this._themeService = p, this._model = new C.RenderModel(), this._workCell = new l.CellData(), this._onChangeTextureAtlas = this.register(new d.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new d.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = this.register(new d.EventEmitter()), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._onRequestRedraw = this.register(new d.EventEmitter()), this.onRequestRedraw = this._onRequestRedraw.event, this._onContextLoss = this.register(new d.EventEmitter()), this.onContextLoss = this._onContextLoss.event, this.register(this._themeService.onChangeColors(() => this._handleColorChange())), this._cellColorResolver = new r.CellColorResolver(this._terminal, this._model.selection, this._decorationService, this._coreBrowserService, this._themeService), this._core = this._terminal._core, this._renderLayers = [new f.LinkRenderLayer(this._core.screenElement, 2, this._terminal, this._core.linkifier2, this._coreBrowserService, g, this._themeService), new v.CursorRenderLayer(e, this._core.screenElement, 3, this._onRequestRedraw, this._coreBrowserService, c, g, this._themeService)], this.dimensions = (0, a.createRenderDimensions)(), this._devicePixelRatio = this._coreBrowserService.dpr, this._updateDimensions(), this.register(g.onOptionChange(() => this._handleOptionsChanged())), this._canvas = document.createElement("canvas");
              const x = {
                antialias: !1,
                depth: !1,
                preserveDrawingBuffer: m
              };
              if (this._gl = this._canvas.getContext("webgl2", x), !this._gl) throw new Error("WebGL2 not supported " + this._gl);
              this.register((0, s.addDisposableDomListener)(this._canvas, "webglcontextlost", e => {
                console.log("webglcontextlost event received"), e.preventDefault(), this._contextRestorationTimeout = setTimeout(() => {
                  this._contextRestorationTimeout = void 0, console.warn("webgl context not restored; firing onContextLoss"), this._onContextLoss.fire(e);
                }, 3e3);
              })), this.register((0, s.addDisposableDomListener)(this._canvas, "webglcontextrestored", e => {
                console.warn("webglcontextrestored event received"), clearTimeout(this._contextRestorationTimeout), this._contextRestorationTimeout = void 0, (0, o.removeTerminalFromCache)(this._terminal), this._initializeWebGLState(), this._requestRedrawViewport();
              })), this.register((0, n.observeDevicePixelDimensions)(this._canvas, this._coreBrowserService.window, (e, t) => this._setCanvasDevicePixelDimensions(e, t))), this._core.screenElement.appendChild(this._canvas), [this._rectangleRenderer, this._glyphRenderer] = this._initializeWebGLState(), this._isAttached = this._coreBrowserService.window.document.body.contains(this._core.screenElement), this.register((0, _.toDisposable)(() => {
                var e;
                for (const e of this._renderLayers) e.dispose();
                null === (e = this._canvas.parentElement) || void 0 === e || e.removeChild(this._canvas), (0, o.removeTerminalFromCache)(this._terminal);
              }));
            }
            get textureAtlas() {
              var e;
              return null === (e = this._charAtlas) || void 0 === e ? void 0 : e.pages[0].canvas;
            }
            _handleColorChange() {
              this._refreshCharAtlas(), this._clearModel(!0);
            }
            handleDevicePixelRatioChange() {
              this._devicePixelRatio !== this._coreBrowserService.dpr && (this._devicePixelRatio = this._coreBrowserService.dpr, this.handleResize(this._terminal.cols, this._terminal.rows));
            }
            handleResize(e, t) {
              this._updateDimensions(), this._model.resize(this._terminal.cols, this._terminal.rows);
              for (const e of this._renderLayers) e.resize(this._terminal, this.dimensions);
              this._canvas.width = this.dimensions.device.canvas.width, this._canvas.height = this.dimensions.device.canvas.height, this._canvas.style.width = `${this.dimensions.css.canvas.width}px`, this._canvas.style.height = `${this.dimensions.css.canvas.height}px`, this._core.screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._core.screenElement.style.height = `${this.dimensions.css.canvas.height}px`, this._rectangleRenderer.setDimensions(this.dimensions), this._rectangleRenderer.handleResize(), this._glyphRenderer.setDimensions(this.dimensions), this._glyphRenderer.handleResize(), this._refreshCharAtlas(), this._clearModel(!1);
            }
            handleCharSizeChanged() {
              this.handleResize(this._terminal.cols, this._terminal.rows);
            }
            handleBlur() {
              for (const e of this._renderLayers) e.handleBlur(this._terminal);
              this._requestRedrawViewport();
            }
            handleFocus() {
              for (const e of this._renderLayers) e.handleFocus(this._terminal);
              this._requestRedrawViewport();
            }
            handleSelectionChanged(e, t, i) {
              for (const s of this._renderLayers) s.handleSelectionChanged(this._terminal, e, t, i);
              this._model.selection.update(this._terminal, e, t, i), this._requestRedrawViewport();
            }
            handleCursorMove() {
              for (const e of this._renderLayers) e.handleCursorMove(this._terminal);
            }
            _handleOptionsChanged() {
              this._updateDimensions(), this._refreshCharAtlas();
            }
            _initializeWebGLState() {
              var e, t;
              return null === (e = this._rectangleRenderer) || void 0 === e || e.dispose(), null === (t = this._glyphRenderer) || void 0 === t || t.dispose(), this._rectangleRenderer = this.register(new g.RectangleRenderer(this._terminal, this._gl, this.dimensions, this._themeService)), this._glyphRenderer = this.register(new u.GlyphRenderer(this._terminal, this._gl, this.dimensions)), this.handleCharSizeChanged(), [this._rectangleRenderer, this._glyphRenderer];
            }
            _refreshCharAtlas() {
              var e;
              if (this.dimensions.device.char.width <= 0 && this.dimensions.device.char.height <= 0) return void (this._isAttached = !1);
              const t = (0, o.acquireTextureAtlas)(this._terminal, this._optionsService.rawOptions, this._themeService.colors, this.dimensions.device.cell.width, this.dimensions.device.cell.height, this.dimensions.device.char.width, this.dimensions.device.char.height, this._coreBrowserService.dpr);
              this._charAtlas !== t && (null === (e = this._charAtlasDisposable) || void 0 === e || e.dispose(), this._onChangeTextureAtlas.fire(t.pages[0].canvas), this._charAtlasDisposable = (0, _.getDisposeArrayDisposable)([(0, d.forwardEvent)(t.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas), (0, d.forwardEvent)(t.onRemoveTextureAtlasCanvas, this._onRemoveTextureAtlasCanvas)])), this._charAtlas = t, this._charAtlas.warmUp(), this._glyphRenderer.setAtlas(this._charAtlas);
            }
            _clearModel(e) {
              this._model.clear(), e && this._glyphRenderer.clear();
            }
            clearTextureAtlas() {
              var e;
              null === (e = this._charAtlas) || void 0 === e || e.clearTexture(), this._clearModel(!0), this._requestRedrawViewport();
            }
            clear() {
              this._clearModel(!0);
              for (const e of this._renderLayers) e.reset(this._terminal);
            }
            registerCharacterJoiner(e) {
              return -1;
            }
            deregisterCharacterJoiner(e) {
              return !1;
            }
            renderRows(e, t) {
              if (!this._isAttached) {
                if (!(this._coreBrowserService.window.document.body.contains(this._core.screenElement) && this._charSizeService.width && this._charSizeService.height)) return;
                this._updateDimensions(), this._refreshCharAtlas(), this._isAttached = !0;
              }
              for (const i of this._renderLayers) i.handleGridChanged(this._terminal, e, t);
              this._glyphRenderer.beginFrame() && this._clearModel(!0), this._updateModel(e, t), this._rectangleRenderer.render(), this._glyphRenderer.render(this._model);
            }
            _updateModel(e, t) {
              const i = this._core;
              let s,
                r,
                o,
                n,
                a,
                h,
                l,
                d,
                _,
                u,
                g,
                v,
                f,
                p = this._workCell;
              for (r = e; r <= t && (o = r + i.buffer.ydisp, n = i.buffer.lines.get(o), n); r++) for (this._model.lineLengths[r] = 0, a = this._characterJoinerService.getJoinedCharacters(o), v = 0; v < i.cols; v++) if (s = this._cellColorResolver.result.bg, n.loadCell(v, p), 0 === v && (s = this._cellColorResolver.result.bg), h = !1, l = v, a.length > 0 && v === a[0][0] && (h = !0, d = a.shift(), p = new m(p, n.translateToString(!0, d[0], d[1]), d[1] - d[0]), l = d[1] - 1), _ = p.getChars(), u = p.getCode(), g = (r * i.cols + v) * C.RENDER_MODEL_INDICIES_PER_CELL, this._cellColorResolver.resolve(p, v, o), u !== c.NULL_CELL_CODE && (this._model.lineLengths[r] = v + 1), (this._model.cells[g] !== u || this._model.cells[g + C.RENDER_MODEL_BG_OFFSET] !== this._cellColorResolver.result.bg || this._model.cells[g + C.RENDER_MODEL_FG_OFFSET] !== this._cellColorResolver.result.fg || this._model.cells[g + C.RENDER_MODEL_EXT_OFFSET] !== this._cellColorResolver.result.ext) && (_.length > 1 && (u |= C.COMBINED_CHAR_BIT_MASK), this._model.cells[g] = u, this._model.cells[g + C.RENDER_MODEL_BG_OFFSET] = this._cellColorResolver.result.bg, this._model.cells[g + C.RENDER_MODEL_FG_OFFSET] = this._cellColorResolver.result.fg, this._model.cells[g + C.RENDER_MODEL_EXT_OFFSET] = this._cellColorResolver.result.ext, this._glyphRenderer.updateCell(v, r, u, this._cellColorResolver.result.bg, this._cellColorResolver.result.fg, this._cellColorResolver.result.ext, _, s), h)) for (p = this._workCell, v++; v < l; v++) f = (r * i.cols + v) * C.RENDER_MODEL_INDICIES_PER_CELL, this._glyphRenderer.updateCell(v, r, c.NULL_CELL_CODE, 0, 0, 0, c.NULL_CELL_CHAR, 0), this._model.cells[f] = c.NULL_CELL_CODE, this._model.cells[f + C.RENDER_MODEL_BG_OFFSET] = this._cellColorResolver.result.bg, this._model.cells[f + C.RENDER_MODEL_FG_OFFSET] = this._cellColorResolver.result.fg, this._model.cells[f + C.RENDER_MODEL_EXT_OFFSET] = this._cellColorResolver.result.ext;
              this._rectangleRenderer.updateBackgrounds(this._model);
            }
            _updateDimensions() {
              this._charSizeService.width && this._charSizeService.height && (this.dimensions.device.char.width = Math.floor(this._charSizeService.width * this._devicePixelRatio), this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * this._devicePixelRatio), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.top = 1 === this._optionsService.rawOptions.lineHeight ? 0 : Math.round((this.dimensions.device.cell.height - this.dimensions.device.char.height) / 2), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.char.left = Math.floor(this._optionsService.rawOptions.letterSpacing / 2), this.dimensions.device.canvas.height = this._terminal.rows * this.dimensions.device.cell.height, this.dimensions.device.canvas.width = this._terminal.cols * this.dimensions.device.cell.width, this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / this._devicePixelRatio), this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / this._devicePixelRatio), this.dimensions.css.cell.height = this.dimensions.device.cell.height / this._devicePixelRatio, this.dimensions.css.cell.width = this.dimensions.device.cell.width / this._devicePixelRatio);
            }
            _setCanvasDevicePixelDimensions(e, t) {
              this._canvas.width === e && this._canvas.height === t || (this._canvas.width = e, this._canvas.height = t, this._requestRedrawViewport());
            }
            _requestRedrawViewport() {
              this._onRequestRedraw.fire({
                start: 0,
                end: this._terminal.rows - 1
              });
            }
          }
          t.WebglRenderer = p;
          class m extends h.AttributeData {
            constructor(e, t, i) {
              super(), this.content = 0, this.combinedData = "", this.fg = e.fg, this.bg = e.bg, this.combinedData = t, this._width = i;
            }
            isCombined() {
              return 2097152;
            }
            getWidth() {
              return this._width;
            }
            getChars() {
              return this.combinedData;
            }
            getCode() {
              return 2097151;
            }
            setFromCharData(e) {
              throw new Error("not implemented");
            }
            getAsCharData() {
              return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
            }
          }
          t.JoinedCellData = m;
        },
        381: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.GLTexture = t.expandFloat32Array = t.createShader = t.createProgram = t.PROJECTION_MATRIX = void 0;
          const s = i(374);
          function r(e, t, i) {
            const r = (0, s.throwIfFalsy)(e.createShader(t));
            if (e.shaderSource(r, i), e.compileShader(r), e.getShaderParameter(r, e.COMPILE_STATUS)) return r;
            console.error(e.getShaderInfoLog(r)), e.deleteShader(r);
          }
          t.PROJECTION_MATRIX = new Float32Array([2, 0, 0, 0, 0, -2, 0, 0, 0, 0, 1, 0, -1, 1, 0, 1]), t.createProgram = function (e, t, i) {
            const o = (0, s.throwIfFalsy)(e.createProgram());
            if (e.attachShader(o, (0, s.throwIfFalsy)(r(e, e.VERTEX_SHADER, t))), e.attachShader(o, (0, s.throwIfFalsy)(r(e, e.FRAGMENT_SHADER, i))), e.linkProgram(o), e.getProgramParameter(o, e.LINK_STATUS)) return o;
            console.error(e.getProgramInfoLog(o)), e.deleteProgram(o);
          }, t.createShader = r, t.expandFloat32Array = function (e, t) {
            const i = Math.min(2 * e.length, t),
              s = new Float32Array(i);
            for (let t = 0; t < e.length; t++) s[t] = e[t];
            return s;
          }, t.GLTexture = class {
            constructor(e) {
              this.texture = e, this.version = -1;
            }
          };
        },
        592: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BaseRenderLayer = void 0;
          const s = i(627),
            r = i(237),
            o = i(374),
            n = i(859);
          class a extends n.Disposable {
            constructor(e, t, i, s, r, o, a, h) {
              super(), this._container = t, this._alpha = r, this._coreBrowserService = o, this._optionsService = a, this._themeService = h, this._deviceCharWidth = 0, this._deviceCharHeight = 0, this._deviceCellWidth = 0, this._deviceCellHeight = 0, this._deviceCharLeft = 0, this._deviceCharTop = 0, this._canvas = document.createElement("canvas"), this._canvas.classList.add(`xterm-${i}-layer`), this._canvas.style.zIndex = s.toString(), this._initCanvas(), this._container.appendChild(this._canvas), this.register(this._themeService.onChangeColors(t => {
                this._refreshCharAtlas(e, t), this.reset(e);
              })), this.register((0, n.toDisposable)(() => {
                var e;
                this._canvas.remove(), null === (e = this._charAtlas) || void 0 === e || e.dispose();
              }));
            }
            _initCanvas() {
              this._ctx = (0, o.throwIfFalsy)(this._canvas.getContext("2d", {
                alpha: this._alpha
              })), this._alpha || this._clearAll();
            }
            handleBlur(e) {}
            handleFocus(e) {}
            handleCursorMove(e) {}
            handleGridChanged(e, t, i) {}
            handleSelectionChanged(e, t, i, s = !1) {}
            _setTransparency(e, t) {
              if (t === this._alpha) return;
              const i = this._canvas;
              this._alpha = t, this._canvas = this._canvas.cloneNode(), this._initCanvas(), this._container.replaceChild(this._canvas, i), this._refreshCharAtlas(e, this._themeService.colors), this.handleGridChanged(e, 0, e.rows - 1);
            }
            _refreshCharAtlas(e, t) {
              this._deviceCharWidth <= 0 && this._deviceCharHeight <= 0 || (this._charAtlas = (0, s.acquireTextureAtlas)(e, this._optionsService.rawOptions, t, this._deviceCellWidth, this._deviceCellHeight, this._deviceCharWidth, this._deviceCharHeight, this._coreBrowserService.dpr), this._charAtlas.warmUp());
            }
            resize(e, t) {
              this._deviceCellWidth = t.device.cell.width, this._deviceCellHeight = t.device.cell.height, this._deviceCharWidth = t.device.char.width, this._deviceCharHeight = t.device.char.height, this._deviceCharLeft = t.device.char.left, this._deviceCharTop = t.device.char.top, this._canvas.width = t.device.canvas.width, this._canvas.height = t.device.canvas.height, this._canvas.style.width = `${t.css.canvas.width}px`, this._canvas.style.height = `${t.css.canvas.height}px`, this._alpha || this._clearAll(), this._refreshCharAtlas(e, this._themeService.colors);
            }
            _fillCells(e, t, i, s) {
              this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight);
            }
            _fillBottomLineAtCells(e, t, i = 1) {
              this._ctx.fillRect(e * this._deviceCellWidth, (t + 1) * this._deviceCellHeight - this._coreBrowserService.dpr - 1, i * this._deviceCellWidth, this._coreBrowserService.dpr);
            }
            _fillLeftLineAtCell(e, t, i) {
              this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, this._coreBrowserService.dpr * i, this._deviceCellHeight);
            }
            _strokeRectAtCell(e, t, i, s) {
              this._ctx.lineWidth = this._coreBrowserService.dpr, this._ctx.strokeRect(e * this._deviceCellWidth + this._coreBrowserService.dpr / 2, t * this._deviceCellHeight + this._coreBrowserService.dpr / 2, i * this._deviceCellWidth - this._coreBrowserService.dpr, s * this._deviceCellHeight - this._coreBrowserService.dpr);
            }
            _clearAll() {
              this._alpha ? this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(0, 0, this._canvas.width, this._canvas.height));
            }
            _clearCells(e, t, i, s) {
              this._alpha ? this._ctx.clearRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight) : (this._ctx.fillStyle = this._themeService.colors.background.css, this._ctx.fillRect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, s * this._deviceCellHeight));
            }
            _fillCharTrueColor(e, t, i, s) {
              this._ctx.font = this._getFont(e, !1, !1), this._ctx.textBaseline = r.TEXT_BASELINE, this._clipCell(i, s, t.getWidth()), this._ctx.fillText(t.getChars(), i * this._deviceCellWidth + this._deviceCharLeft, s * this._deviceCellHeight + this._deviceCharTop + this._deviceCharHeight);
            }
            _clipCell(e, t, i) {
              this._ctx.beginPath(), this._ctx.rect(e * this._deviceCellWidth, t * this._deviceCellHeight, i * this._deviceCellWidth, this._deviceCellHeight), this._ctx.clip();
            }
            _getFont(e, t, i) {
              return `${i ? "italic" : ""} ${t ? e.options.fontWeightBold : e.options.fontWeight} ${e.options.fontSize * this._coreBrowserService.dpr}px ${e.options.fontFamily}`;
            }
          }
          t.BaseRenderLayer = a;
        },
        461: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CursorRenderLayer = void 0;
          const s = i(592),
            r = i(782),
            o = i(859);
          class n extends s.BaseRenderLayer {
            constructor(e, t, i, s, n, a, h, l) {
              super(e, t, "cursor", i, !0, n, h, l), this._onRequestRefreshRowsEvent = s, this._coreService = a, this._cell = new r.CellData(), this._state = {
                x: 0,
                y: 0,
                isFocused: !1,
                style: "",
                width: 0
              }, this._cursorRenderers = {
                bar: this._renderBarCursor.bind(this),
                block: this._renderBlockCursor.bind(this),
                underline: this._renderUnderlineCursor.bind(this)
              }, this._handleOptionsChanged(e), this.register(h.onOptionChange(() => this._handleOptionsChanged(e))), this.register((0, o.toDisposable)(() => {
                var e;
                null === (e = this._cursorBlinkStateManager) || void 0 === e || e.dispose(), this._cursorBlinkStateManager = void 0;
              }));
            }
            resize(e, t) {
              super.resize(e, t), this._state = {
                x: 0,
                y: 0,
                isFocused: !1,
                style: "",
                width: 0
              };
            }
            reset(e) {
              var t;
              this._clearCursor(), null === (t = this._cursorBlinkStateManager) || void 0 === t || t.restartBlinkAnimation(e), this._handleOptionsChanged(e);
            }
            handleBlur(e) {
              var t;
              null === (t = this._cursorBlinkStateManager) || void 0 === t || t.pause(), this._onRequestRefreshRowsEvent.fire({
                start: e.buffer.active.cursorY,
                end: e.buffer.active.cursorY
              });
            }
            handleFocus(e) {
              var t;
              null === (t = this._cursorBlinkStateManager) || void 0 === t || t.resume(e), this._onRequestRefreshRowsEvent.fire({
                start: e.buffer.active.cursorY,
                end: e.buffer.active.cursorY
              });
            }
            _handleOptionsChanged(e) {
              var t;
              e.options.cursorBlink ? this._cursorBlinkStateManager || (this._cursorBlinkStateManager = new a(() => {
                this._render(e, !0);
              }, this._coreBrowserService)) : (null === (t = this._cursorBlinkStateManager) || void 0 === t || t.dispose(), this._cursorBlinkStateManager = void 0), this._onRequestRefreshRowsEvent.fire({
                start: e.buffer.active.cursorY,
                end: e.buffer.active.cursorY
              });
            }
            handleCursorMove(e) {
              var t;
              null === (t = this._cursorBlinkStateManager) || void 0 === t || t.restartBlinkAnimation(e);
            }
            handleGridChanged(e, t, i) {
              !this._cursorBlinkStateManager || this._cursorBlinkStateManager.isPaused ? this._render(e, !1) : this._cursorBlinkStateManager.restartBlinkAnimation(e);
            }
            _render(e, t) {
              if (!this._coreService.isCursorInitialized || this._coreService.isCursorHidden) return void this._clearCursor();
              const i = e.buffer.active.baseY + e.buffer.active.cursorY,
                s = i - e.buffer.active.viewportY,
                r = Math.min(e.buffer.active.cursorX, e.cols - 1);
              if (s < 0 || s >= e.rows) this._clearCursor();else if (e._core.buffer.lines.get(i).loadCell(r, this._cell), void 0 !== this._cell.content) {
                if (!this._coreBrowserService.isFocused) {
                  this._clearCursor(), this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css;
                  const t = e.options.cursorStyle;
                  return t && "block" !== t ? this._cursorRenderers[t](e, r, s, this._cell) : this._renderBlurCursor(e, r, s, this._cell), this._ctx.restore(), this._state.x = r, this._state.y = s, this._state.isFocused = !1, this._state.style = t, void (this._state.width = this._cell.getWidth());
                }
                if (!this._cursorBlinkStateManager || this._cursorBlinkStateManager.isCursorVisible) {
                  if (this._state) {
                    if (this._state.x === r && this._state.y === s && this._state.isFocused === this._coreBrowserService.isFocused && this._state.style === e.options.cursorStyle && this._state.width === this._cell.getWidth()) return;
                    this._clearCursor();
                  }
                  this._ctx.save(), this._cursorRenderers[e.options.cursorStyle || "block"](e, r, s, this._cell), this._ctx.restore(), this._state.x = r, this._state.y = s, this._state.isFocused = !1, this._state.style = e.options.cursorStyle, this._state.width = this._cell.getWidth();
                } else this._clearCursor();
              }
            }
            _clearCursor() {
              this._state && (this._coreBrowserService.dpr < 1 ? this._clearAll() : this._clearCells(this._state.x, this._state.y, this._state.width, 1), this._state = {
                x: 0,
                y: 0,
                isFocused: !1,
                style: "",
                width: 0
              });
            }
            _renderBarCursor(e, t, i, s) {
              this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillLeftLineAtCell(t, i, this._optionsService.rawOptions.cursorWidth), this._ctx.restore();
            }
            _renderBlockCursor(e, t, i, s) {
              this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillCells(t, i, s.getWidth(), 1), this._ctx.fillStyle = this._themeService.colors.cursorAccent.css, this._fillCharTrueColor(e, s, t, i), this._ctx.restore();
            }
            _renderUnderlineCursor(e, t, i, s) {
              this._ctx.save(), this._ctx.fillStyle = this._themeService.colors.cursor.css, this._fillBottomLineAtCells(t, i), this._ctx.restore();
            }
            _renderBlurCursor(e, t, i, s) {
              this._ctx.save(), this._ctx.strokeStyle = this._themeService.colors.cursor.css, this._strokeRectAtCell(t, i, s.getWidth(), 1), this._ctx.restore();
            }
          }
          t.CursorRenderLayer = n;
          class a {
            constructor(e, t) {
              this._renderCallback = e, this._coreBrowserService = t, this.isCursorVisible = !0, this._coreBrowserService.isFocused && this._restartInterval();
            }
            get isPaused() {
              return !(this._blinkStartTimeout || this._blinkInterval);
            }
            dispose() {
              this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout && (this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout), this._blinkStartTimeout = void 0), this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
            }
            restartBlinkAnimation(e) {
              this.isPaused || (this._animationTimeRestarted = Date.now(), this.isCursorVisible = !0, this._animationFrame || (this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                this._renderCallback(), this._animationFrame = void 0;
              })));
            }
            _restartInterval(e = 600) {
              this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout = this._coreBrowserService.window.setTimeout(() => {
                if (this._animationTimeRestarted) {
                  const e = 600 - (Date.now() - this._animationTimeRestarted);
                  if (this._animationTimeRestarted = void 0, e > 0) return void this._restartInterval(e);
                }
                this.isCursorVisible = !1, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                  this._renderCallback(), this._animationFrame = void 0;
                }), this._blinkInterval = this._coreBrowserService.window.setInterval(() => {
                  if (this._animationTimeRestarted) {
                    const e = 600 - (Date.now() - this._animationTimeRestarted);
                    return this._animationTimeRestarted = void 0, void this._restartInterval(e);
                  }
                  this.isCursorVisible = !this.isCursorVisible, this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
                    this._renderCallback(), this._animationFrame = void 0;
                  });
                }, 600);
              }, e);
            }
            pause() {
              this.isCursorVisible = !0, this._blinkInterval && (this._coreBrowserService.window.clearInterval(this._blinkInterval), this._blinkInterval = void 0), this._blinkStartTimeout && (this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout), this._blinkStartTimeout = void 0), this._animationFrame && (this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
            }
            resume(e) {
              this.pause(), this._animationTimeRestarted = void 0, this._restartInterval(), this.restartBlinkAnimation(e);
            }
          }
        },
        733: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.LinkRenderLayer = void 0;
          const s = i(197),
            r = i(237),
            o = i(592);
          class n extends o.BaseRenderLayer {
            constructor(e, t, i, s, r, o, n) {
              super(i, e, "link", t, !0, r, o, n), this.register(s.onShowLinkUnderline(e => this._handleShowLinkUnderline(e))), this.register(s.onHideLinkUnderline(e => this._handleHideLinkUnderline(e)));
            }
            resize(e, t) {
              super.resize(e, t), this._state = void 0;
            }
            reset(e) {
              this._clearCurrentLink();
            }
            _clearCurrentLink() {
              if (this._state) {
                this._clearCells(this._state.x1, this._state.y1, this._state.cols - this._state.x1, 1);
                const e = this._state.y2 - this._state.y1 - 1;
                e > 0 && this._clearCells(0, this._state.y1 + 1, this._state.cols, e), this._clearCells(0, this._state.y2, this._state.x2, 1), this._state = void 0;
              }
            }
            _handleShowLinkUnderline(e) {
              if (e.fg === r.INVERTED_DEFAULT_COLOR ? this._ctx.fillStyle = this._themeService.colors.background.css : void 0 !== e.fg && (0, s.is256Color)(e.fg) ? this._ctx.fillStyle = this._themeService.colors.ansi[e.fg].css : this._ctx.fillStyle = this._themeService.colors.foreground.css, e.y1 === e.y2) this._fillBottomLineAtCells(e.x1, e.y1, e.x2 - e.x1);else {
                this._fillBottomLineAtCells(e.x1, e.y1, e.cols - e.x1);
                for (let t = e.y1 + 1; t < e.y2; t++) this._fillBottomLineAtCells(0, t, e.cols);
                this._fillBottomLineAtCells(0, e.y2, e.x2);
              }
              this._state = e;
            }
            _handleHideLinkUnderline(e) {
              this._clearCurrentLink();
            }
          }
          t.LinkRenderLayer = n;
        },
        820: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.addDisposableDomListener = void 0, t.addDisposableDomListener = function (e, t, i, s) {
            e.addEventListener(t, i, s);
            let r = !1;
            return {
              dispose: () => {
                r || (r = !0, e.removeEventListener(t, i, s));
              }
            };
          };
        },
        274: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CellColorResolver = void 0;
          let i,
            s = 0,
            r = 0,
            o = !1,
            n = !1,
            a = !1;
          t.CellColorResolver = class {
            constructor(e, t, i, s, r) {
              this._terminal = e, this._selectionRenderModel = t, this._decorationService = i, this._coreBrowserService = s, this._themeService = r, this.result = {
                fg: 0,
                bg: 0,
                ext: 0
              };
            }
            resolve(e, t, h) {
              this.result.bg = e.bg, this.result.fg = e.fg, this.result.ext = 268435456 & e.bg ? e.extended.ext : 0, r = 0, s = 0, n = !1, o = !1, a = !1, i = this._themeService.colors, this._decorationService.forEachDecorationAtCell(t, h, "bottom", e => {
                e.backgroundColorRGB && (r = e.backgroundColorRGB.rgba >> 8 & 16777215, n = !0), e.foregroundColorRGB && (s = e.foregroundColorRGB.rgba >> 8 & 16777215, o = !0);
              }), a = this._selectionRenderModel.isCellSelected(this._terminal, t, h), a && (r = (this._coreBrowserService.isFocused ? i.selectionBackgroundOpaque : i.selectionInactiveBackgroundOpaque).rgba >> 8 & 16777215, n = !0, i.selectionForeground && (s = i.selectionForeground.rgba >> 8 & 16777215, o = !0)), this._decorationService.forEachDecorationAtCell(t, h, "top", e => {
                e.backgroundColorRGB && (r = e.backgroundColorRGB.rgba >> 8 & 16777215, n = !0), e.foregroundColorRGB && (s = e.foregroundColorRGB.rgba >> 8 & 16777215, o = !0);
              }), n && (r = a ? -16777216 & e.bg & -134217729 | r | 50331648 : -16777216 & e.bg | r | 50331648), o && (s = -16777216 & e.fg & -67108865 | s | 50331648), 67108864 & this.result.fg && (n && !o && (s = 0 == (50331648 & this.result.bg) ? -134217728 & this.result.fg | 16777215 & i.background.rgba >> 8 | 50331648 : -134217728 & this.result.fg | 67108863 & this.result.bg, o = !0), !n && o && (r = 0 == (50331648 & this.result.fg) ? -67108864 & this.result.bg | 16777215 & i.foreground.rgba >> 8 | 50331648 : -67108864 & this.result.bg | 67108863 & this.result.fg, n = !0)), i = void 0, this.result.bg = n ? r : this.result.bg, this.result.fg = o ? s : this.result.fg;
            }
          };
        },
        627: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.removeTerminalFromCache = t.acquireTextureAtlas = void 0;
          const s = i(509),
            r = i(197),
            o = [];
          t.acquireTextureAtlas = function (e, t, i, n, a, h, l, c) {
            const d = (0, r.generateConfig)(n, a, h, l, t, i, c);
            for (let t = 0; t < o.length; t++) {
              const i = o[t],
                s = i.ownedBy.indexOf(e);
              if (s >= 0) {
                if ((0, r.configEquals)(i.config, d)) return i.atlas;
                1 === i.ownedBy.length ? (i.atlas.dispose(), o.splice(t, 1)) : i.ownedBy.splice(s, 1);
                break;
              }
            }
            for (let t = 0; t < o.length; t++) {
              const i = o[t];
              if ((0, r.configEquals)(i.config, d)) return i.ownedBy.push(e), i.atlas;
            }
            const _ = e._core,
              u = {
                atlas: new s.TextureAtlas(document, d, _.unicodeService),
                config: d,
                ownedBy: [e]
              };
            return o.push(u), u.atlas;
          }, t.removeTerminalFromCache = function (e) {
            for (let t = 0; t < o.length; t++) {
              const i = o[t].ownedBy.indexOf(e);
              if (-1 !== i) {
                1 === o[t].ownedBy.length ? (o[t].atlas.dispose(), o.splice(t, 1)) : o[t].ownedBy.splice(i, 1);
                break;
              }
            }
          };
        },
        197: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.is256Color = t.configEquals = t.generateConfig = void 0;
          const s = i(160);
          t.generateConfig = function (e, t, i, r, o, n, a) {
            const h = {
              foreground: n.foreground,
              background: n.background,
              cursor: s.NULL_COLOR,
              cursorAccent: s.NULL_COLOR,
              selectionForeground: s.NULL_COLOR,
              selectionBackgroundTransparent: s.NULL_COLOR,
              selectionBackgroundOpaque: s.NULL_COLOR,
              selectionInactiveBackgroundTransparent: s.NULL_COLOR,
              selectionInactiveBackgroundOpaque: s.NULL_COLOR,
              ansi: n.ansi.slice(),
              contrastCache: n.contrastCache
            };
            return {
              customGlyphs: o.customGlyphs,
              devicePixelRatio: a,
              letterSpacing: o.letterSpacing,
              lineHeight: o.lineHeight,
              deviceCellWidth: e,
              deviceCellHeight: t,
              deviceCharWidth: i,
              deviceCharHeight: r,
              fontFamily: o.fontFamily,
              fontSize: o.fontSize,
              fontWeight: o.fontWeight,
              fontWeightBold: o.fontWeightBold,
              allowTransparency: o.allowTransparency,
              drawBoldTextInBrightColors: o.drawBoldTextInBrightColors,
              minimumContrastRatio: o.minimumContrastRatio,
              colors: h
            };
          }, t.configEquals = function (e, t) {
            for (let i = 0; i < e.colors.ansi.length; i++) if (e.colors.ansi[i].rgba !== t.colors.ansi[i].rgba) return !1;
            return e.devicePixelRatio === t.devicePixelRatio && e.customGlyphs === t.customGlyphs && e.lineHeight === t.lineHeight && e.letterSpacing === t.letterSpacing && e.fontFamily === t.fontFamily && e.fontSize === t.fontSize && e.fontWeight === t.fontWeight && e.fontWeightBold === t.fontWeightBold && e.allowTransparency === t.allowTransparency && e.deviceCharWidth === t.deviceCharWidth && e.deviceCharHeight === t.deviceCharHeight && e.drawBoldTextInBrightColors === t.drawBoldTextInBrightColors && e.minimumContrastRatio === t.minimumContrastRatio && e.colors.foreground.rgba === t.colors.foreground.rgba && e.colors.background.rgba === t.colors.background.rgba;
          }, t.is256Color = function (e) {
            return 16777216 == (50331648 & e) || 33554432 == (50331648 & e);
          };
        },
        237: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.TEXT_BASELINE = t.DIM_OPACITY = t.INVERTED_DEFAULT_COLOR = void 0;
          const s = i(399);
          t.INVERTED_DEFAULT_COLOR = 257, t.DIM_OPACITY = .5, t.TEXT_BASELINE = s.isFirefox || s.isLegacyEdge ? "bottom" : "ideographic";
        },
        860: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.tryDrawCustomChar = t.powerlineDefinitions = t.boxDrawingDefinitions = t.blockElementDefinitions = void 0;
          const s = i(374);
          t.blockElementDefinitions = {
            "▀": [{
              x: 0,
              y: 0,
              w: 8,
              h: 4
            }],
            "▁": [{
              x: 0,
              y: 7,
              w: 8,
              h: 1
            }],
            "▂": [{
              x: 0,
              y: 6,
              w: 8,
              h: 2
            }],
            "▃": [{
              x: 0,
              y: 5,
              w: 8,
              h: 3
            }],
            "▄": [{
              x: 0,
              y: 4,
              w: 8,
              h: 4
            }],
            "▅": [{
              x: 0,
              y: 3,
              w: 8,
              h: 5
            }],
            "▆": [{
              x: 0,
              y: 2,
              w: 8,
              h: 6
            }],
            "▇": [{
              x: 0,
              y: 1,
              w: 8,
              h: 7
            }],
            "█": [{
              x: 0,
              y: 0,
              w: 8,
              h: 8
            }],
            "▉": [{
              x: 0,
              y: 0,
              w: 7,
              h: 8
            }],
            "▊": [{
              x: 0,
              y: 0,
              w: 6,
              h: 8
            }],
            "▋": [{
              x: 0,
              y: 0,
              w: 5,
              h: 8
            }],
            "▌": [{
              x: 0,
              y: 0,
              w: 4,
              h: 8
            }],
            "▍": [{
              x: 0,
              y: 0,
              w: 3,
              h: 8
            }],
            "▎": [{
              x: 0,
              y: 0,
              w: 2,
              h: 8
            }],
            "▏": [{
              x: 0,
              y: 0,
              w: 1,
              h: 8
            }],
            "▐": [{
              x: 4,
              y: 0,
              w: 4,
              h: 8
            }],
            "▔": [{
              x: 0,
              y: 0,
              w: 8,
              h: 1
            }],
            "▕": [{
              x: 7,
              y: 0,
              w: 1,
              h: 8
            }],
            "▖": [{
              x: 0,
              y: 4,
              w: 4,
              h: 4
            }],
            "▗": [{
              x: 4,
              y: 4,
              w: 4,
              h: 4
            }],
            "▘": [{
              x: 0,
              y: 0,
              w: 4,
              h: 4
            }],
            "▙": [{
              x: 0,
              y: 0,
              w: 4,
              h: 8
            }, {
              x: 0,
              y: 4,
              w: 8,
              h: 4
            }],
            "▚": [{
              x: 0,
              y: 0,
              w: 4,
              h: 4
            }, {
              x: 4,
              y: 4,
              w: 4,
              h: 4
            }],
            "▛": [{
              x: 0,
              y: 0,
              w: 4,
              h: 8
            }, {
              x: 4,
              y: 0,
              w: 4,
              h: 4
            }],
            "▜": [{
              x: 0,
              y: 0,
              w: 8,
              h: 4
            }, {
              x: 4,
              y: 0,
              w: 4,
              h: 8
            }],
            "▝": [{
              x: 4,
              y: 0,
              w: 4,
              h: 4
            }],
            "▞": [{
              x: 4,
              y: 0,
              w: 4,
              h: 4
            }, {
              x: 0,
              y: 4,
              w: 4,
              h: 4
            }],
            "▟": [{
              x: 4,
              y: 0,
              w: 4,
              h: 8
            }, {
              x: 0,
              y: 4,
              w: 8,
              h: 4
            }],
            "🭰": [{
              x: 1,
              y: 0,
              w: 1,
              h: 8
            }],
            "🭱": [{
              x: 2,
              y: 0,
              w: 1,
              h: 8
            }],
            "🭲": [{
              x: 3,
              y: 0,
              w: 1,
              h: 8
            }],
            "🭳": [{
              x: 4,
              y: 0,
              w: 1,
              h: 8
            }],
            "🭴": [{
              x: 5,
              y: 0,
              w: 1,
              h: 8
            }],
            "🭵": [{
              x: 6,
              y: 0,
              w: 1,
              h: 8
            }],
            "🭶": [{
              x: 0,
              y: 1,
              w: 8,
              h: 1
            }],
            "🭷": [{
              x: 0,
              y: 2,
              w: 8,
              h: 1
            }],
            "🭸": [{
              x: 0,
              y: 3,
              w: 8,
              h: 1
            }],
            "🭹": [{
              x: 0,
              y: 4,
              w: 8,
              h: 1
            }],
            "🭺": [{
              x: 0,
              y: 5,
              w: 8,
              h: 1
            }],
            "🭻": [{
              x: 0,
              y: 6,
              w: 8,
              h: 1
            }],
            "🭼": [{
              x: 0,
              y: 0,
              w: 1,
              h: 8
            }, {
              x: 0,
              y: 7,
              w: 8,
              h: 1
            }],
            "🭽": [{
              x: 0,
              y: 0,
              w: 1,
              h: 8
            }, {
              x: 0,
              y: 0,
              w: 8,
              h: 1
            }],
            "🭾": [{
              x: 7,
              y: 0,
              w: 1,
              h: 8
            }, {
              x: 0,
              y: 0,
              w: 8,
              h: 1
            }],
            "🭿": [{
              x: 7,
              y: 0,
              w: 1,
              h: 8
            }, {
              x: 0,
              y: 7,
              w: 8,
              h: 1
            }],
            "🮀": [{
              x: 0,
              y: 0,
              w: 8,
              h: 1
            }, {
              x: 0,
              y: 7,
              w: 8,
              h: 1
            }],
            "🮁": [{
              x: 0,
              y: 0,
              w: 8,
              h: 1
            }, {
              x: 0,
              y: 2,
              w: 8,
              h: 1
            }, {
              x: 0,
              y: 4,
              w: 8,
              h: 1
            }, {
              x: 0,
              y: 7,
              w: 8,
              h: 1
            }],
            "🮂": [{
              x: 0,
              y: 0,
              w: 8,
              h: 2
            }],
            "🮃": [{
              x: 0,
              y: 0,
              w: 8,
              h: 3
            }],
            "🮄": [{
              x: 0,
              y: 0,
              w: 8,
              h: 5
            }],
            "🮅": [{
              x: 0,
              y: 0,
              w: 8,
              h: 6
            }],
            "🮆": [{
              x: 0,
              y: 0,
              w: 8,
              h: 7
            }],
            "🮇": [{
              x: 6,
              y: 0,
              w: 2,
              h: 8
            }],
            "🮈": [{
              x: 5,
              y: 0,
              w: 3,
              h: 8
            }],
            "🮉": [{
              x: 3,
              y: 0,
              w: 5,
              h: 8
            }],
            "🮊": [{
              x: 2,
              y: 0,
              w: 6,
              h: 8
            }],
            "🮋": [{
              x: 1,
              y: 0,
              w: 7,
              h: 8
            }],
            "🮕": [{
              x: 0,
              y: 0,
              w: 2,
              h: 2
            }, {
              x: 4,
              y: 0,
              w: 2,
              h: 2
            }, {
              x: 2,
              y: 2,
              w: 2,
              h: 2
            }, {
              x: 6,
              y: 2,
              w: 2,
              h: 2
            }, {
              x: 0,
              y: 4,
              w: 2,
              h: 2
            }, {
              x: 4,
              y: 4,
              w: 2,
              h: 2
            }, {
              x: 2,
              y: 6,
              w: 2,
              h: 2
            }, {
              x: 6,
              y: 6,
              w: 2,
              h: 2
            }],
            "🮖": [{
              x: 2,
              y: 0,
              w: 2,
              h: 2
            }, {
              x: 6,
              y: 0,
              w: 2,
              h: 2
            }, {
              x: 0,
              y: 2,
              w: 2,
              h: 2
            }, {
              x: 4,
              y: 2,
              w: 2,
              h: 2
            }, {
              x: 2,
              y: 4,
              w: 2,
              h: 2
            }, {
              x: 6,
              y: 4,
              w: 2,
              h: 2
            }, {
              x: 0,
              y: 6,
              w: 2,
              h: 2
            }, {
              x: 4,
              y: 6,
              w: 2,
              h: 2
            }],
            "🮗": [{
              x: 0,
              y: 2,
              w: 8,
              h: 2
            }, {
              x: 0,
              y: 6,
              w: 8,
              h: 2
            }]
          };
          const r = {
            "░": [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0]],
            "▒": [[1, 0], [0, 0], [0, 1], [0, 0]],
            "▓": [[0, 1], [1, 1], [1, 0], [1, 1]]
          };
          t.boxDrawingDefinitions = {
            "─": {
              1: "M0,.5 L1,.5"
            },
            "━": {
              3: "M0,.5 L1,.5"
            },
            "│": {
              1: "M.5,0 L.5,1"
            },
            "┃": {
              3: "M.5,0 L.5,1"
            },
            "┌": {
              1: "M0.5,1 L.5,.5 L1,.5"
            },
            "┏": {
              3: "M0.5,1 L.5,.5 L1,.5"
            },
            "┐": {
              1: "M0,.5 L.5,.5 L.5,1"
            },
            "┓": {
              3: "M0,.5 L.5,.5 L.5,1"
            },
            "└": {
              1: "M.5,0 L.5,.5 L1,.5"
            },
            "┗": {
              3: "M.5,0 L.5,.5 L1,.5"
            },
            "┘": {
              1: "M.5,0 L.5,.5 L0,.5"
            },
            "┛": {
              3: "M.5,0 L.5,.5 L0,.5"
            },
            "├": {
              1: "M.5,0 L.5,1 M.5,.5 L1,.5"
            },
            "┣": {
              3: "M.5,0 L.5,1 M.5,.5 L1,.5"
            },
            "┤": {
              1: "M.5,0 L.5,1 M.5,.5 L0,.5"
            },
            "┫": {
              3: "M.5,0 L.5,1 M.5,.5 L0,.5"
            },
            "┬": {
              1: "M0,.5 L1,.5 M.5,.5 L.5,1"
            },
            "┳": {
              3: "M0,.5 L1,.5 M.5,.5 L.5,1"
            },
            "┴": {
              1: "M0,.5 L1,.5 M.5,.5 L.5,0"
            },
            "┻": {
              3: "M0,.5 L1,.5 M.5,.5 L.5,0"
            },
            "┼": {
              1: "M0,.5 L1,.5 M.5,0 L.5,1"
            },
            "╋": {
              3: "M0,.5 L1,.5 M.5,0 L.5,1"
            },
            "╴": {
              1: "M.5,.5 L0,.5"
            },
            "╸": {
              3: "M.5,.5 L0,.5"
            },
            "╵": {
              1: "M.5,.5 L.5,0"
            },
            "╹": {
              3: "M.5,.5 L.5,0"
            },
            "╶": {
              1: "M.5,.5 L1,.5"
            },
            "╺": {
              3: "M.5,.5 L1,.5"
            },
            "╷": {
              1: "M.5,.5 L.5,1"
            },
            "╻": {
              3: "M.5,.5 L.5,1"
            },
            "═": {
              1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
            },
            "║": {
              1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
            },
            "╒": {
              1: (e, t) => `M.5,1 L.5,${.5 - t} L1,${.5 - t} M.5,${.5 + t} L1,${.5 + t}`
            },
            "╓": {
              1: (e, t) => `M${.5 - e},1 L${.5 - e},.5 L1,.5 M${.5 + e},.5 L${.5 + e},1`
            },
            "╔": {
              1: (e, t) => `M1,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1`
            },
            "╕": {
              1: (e, t) => `M0,${.5 - t} L.5,${.5 - t} L.5,1 M0,${.5 + t} L.5,${.5 + t}`
            },
            "╖": {
              1: (e, t) => `M${.5 + e},1 L${.5 + e},.5 L0,.5 M${.5 - e},.5 L${.5 - e},1`
            },
            "╗": {
              1: (e, t) => `M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M0,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},1`
            },
            "╘": {
              1: (e, t) => `M.5,0 L.5,${.5 + t} L1,${.5 + t} M.5,${.5 - t} L1,${.5 - t}`
            },
            "╙": {
              1: (e, t) => `M1,.5 L${.5 - e},.5 L${.5 - e},0 M${.5 + e},.5 L${.5 + e},0`
            },
            "╚": {
              1: (e, t) => `M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0 M1,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},0`
            },
            "╛": {
              1: (e, t) => `M0,${.5 + t} L.5,${.5 + t} L.5,0 M0,${.5 - t} L.5,${.5 - t}`
            },
            "╜": {
              1: (e, t) => `M0,.5 L${.5 + e},.5 L${.5 + e},0 M${.5 - e},.5 L${.5 - e},0`
            },
            "╝": {
              1: (e, t) => `M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M0,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},0`
            },
            "╞": {
              1: (e, t) => `M.5,0 L.5,1 M.5,${.5 - t} L1,${.5 - t} M.5,${.5 + t} L1,${.5 + t}`
            },
            "╟": {
              1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1 M${.5 + e},.5 L1,.5`
            },
            "╠": {
              1: (e, t) => `M${.5 - e},0 L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
            },
            "╡": {
              1: (e, t) => `M.5,0 L.5,1 M0,${.5 - t} L.5,${.5 - t} M0,${.5 + t} L.5,${.5 + t}`
            },
            "╢": {
              1: (e, t) => `M0,.5 L${.5 - e},.5 M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
            },
            "╣": {
              1: (e, t) => `M${.5 + e},0 L${.5 + e},1 M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0`
            },
            "╤": {
              1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t} M.5,${.5 + t} L.5,1`
            },
            "╥": {
              1: (e, t) => `M0,.5 L1,.5 M${.5 - e},.5 L${.5 - e},1 M${.5 + e},.5 L${.5 + e},1`
            },
            "╦": {
              1: (e, t) => `M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1`
            },
            "╧": {
              1: (e, t) => `M.5,0 L.5,${.5 - t} M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
            },
            "╨": {
              1: (e, t) => `M0,.5 L1,.5 M${.5 - e},.5 L${.5 - e},0 M${.5 + e},.5 L${.5 + e},0`
            },
            "╩": {
              1: (e, t) => `M0,${.5 + t} L1,${.5 + t} M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
            },
            "╪": {
              1: (e, t) => `M.5,0 L.5,1 M0,${.5 - t} L1,${.5 - t} M0,${.5 + t} L1,${.5 + t}`
            },
            "╫": {
              1: (e, t) => `M0,.5 L1,.5 M${.5 - e},0 L${.5 - e},1 M${.5 + e},0 L${.5 + e},1`
            },
            "╬": {
              1: (e, t) => `M0,${.5 + t} L${.5 - e},${.5 + t} L${.5 - e},1 M1,${.5 + t} L${.5 + e},${.5 + t} L${.5 + e},1 M0,${.5 - t} L${.5 - e},${.5 - t} L${.5 - e},0 M1,${.5 - t} L${.5 + e},${.5 - t} L${.5 + e},0`
            },
            "╱": {
              1: "M1,0 L0,1"
            },
            "╲": {
              1: "M0,0 L1,1"
            },
            "╳": {
              1: "M1,0 L0,1 M0,0 L1,1"
            },
            "╼": {
              1: "M.5,.5 L0,.5",
              3: "M.5,.5 L1,.5"
            },
            "╽": {
              1: "M.5,.5 L.5,0",
              3: "M.5,.5 L.5,1"
            },
            "╾": {
              1: "M.5,.5 L1,.5",
              3: "M.5,.5 L0,.5"
            },
            "╿": {
              1: "M.5,.5 L.5,1",
              3: "M.5,.5 L.5,0"
            },
            "┍": {
              1: "M.5,.5 L.5,1",
              3: "M.5,.5 L1,.5"
            },
            "┎": {
              1: "M.5,.5 L1,.5",
              3: "M.5,.5 L.5,1"
            },
            "┑": {
              1: "M.5,.5 L.5,1",
              3: "M.5,.5 L0,.5"
            },
            "┒": {
              1: "M.5,.5 L0,.5",
              3: "M.5,.5 L.5,1"
            },
            "┕": {
              1: "M.5,.5 L.5,0",
              3: "M.5,.5 L1,.5"
            },
            "┖": {
              1: "M.5,.5 L1,.5",
              3: "M.5,.5 L.5,0"
            },
            "┙": {
              1: "M.5,.5 L.5,0",
              3: "M.5,.5 L0,.5"
            },
            "┚": {
              1: "M.5,.5 L0,.5",
              3: "M.5,.5 L.5,0"
            },
            "┝": {
              1: "M.5,0 L.5,1",
              3: "M.5,.5 L1,.5"
            },
            "┞": {
              1: "M0.5,1 L.5,.5 L1,.5",
              3: "M.5,.5 L.5,0"
            },
            "┟": {
              1: "M.5,0 L.5,.5 L1,.5",
              3: "M.5,.5 L.5,1"
            },
            "┠": {
              1: "M.5,.5 L1,.5",
              3: "M.5,0 L.5,1"
            },
            "┡": {
              1: "M.5,.5 L.5,1",
              3: "M.5,0 L.5,.5 L1,.5"
            },
            "┢": {
              1: "M.5,.5 L.5,0",
              3: "M0.5,1 L.5,.5 L1,.5"
            },
            "┥": {
              1: "M.5,0 L.5,1",
              3: "M.5,.5 L0,.5"
            },
            "┦": {
              1: "M0,.5 L.5,.5 L.5,1",
              3: "M.5,.5 L.5,0"
            },
            "┧": {
              1: "M.5,0 L.5,.5 L0,.5",
              3: "M.5,.5 L.5,1"
            },
            "┨": {
              1: "M.5,.5 L0,.5",
              3: "M.5,0 L.5,1"
            },
            "┩": {
              1: "M.5,.5 L.5,1",
              3: "M.5,0 L.5,.5 L0,.5"
            },
            "┪": {
              1: "M.5,.5 L.5,0",
              3: "M0,.5 L.5,.5 L.5,1"
            },
            "┭": {
              1: "M0.5,1 L.5,.5 L1,.5",
              3: "M.5,.5 L0,.5"
            },
            "┮": {
              1: "M0,.5 L.5,.5 L.5,1",
              3: "M.5,.5 L1,.5"
            },
            "┯": {
              1: "M.5,.5 L.5,1",
              3: "M0,.5 L1,.5"
            },
            "┰": {
              1: "M0,.5 L1,.5",
              3: "M.5,.5 L.5,1"
            },
            "┱": {
              1: "M.5,.5 L1,.5",
              3: "M0,.5 L.5,.5 L.5,1"
            },
            "┲": {
              1: "M.5,.5 L0,.5",
              3: "M0.5,1 L.5,.5 L1,.5"
            },
            "┵": {
              1: "M.5,0 L.5,.5 L1,.5",
              3: "M.5,.5 L0,.5"
            },
            "┶": {
              1: "M.5,0 L.5,.5 L0,.5",
              3: "M.5,.5 L1,.5"
            },
            "┷": {
              1: "M.5,.5 L.5,0",
              3: "M0,.5 L1,.5"
            },
            "┸": {
              1: "M0,.5 L1,.5",
              3: "M.5,.5 L.5,0"
            },
            "┹": {
              1: "M.5,.5 L1,.5",
              3: "M.5,0 L.5,.5 L0,.5"
            },
            "┺": {
              1: "M.5,.5 L0,.5",
              3: "M.5,0 L.5,.5 L1,.5"
            },
            "┽": {
              1: "M.5,0 L.5,1 M.5,.5 L1,.5",
              3: "M.5,.5 L0,.5"
            },
            "┾": {
              1: "M.5,0 L.5,1 M.5,.5 L0,.5",
              3: "M.5,.5 L1,.5"
            },
            "┿": {
              1: "M.5,0 L.5,1",
              3: "M0,.5 L1,.5"
            },
            "╀": {
              1: "M0,.5 L1,.5 M.5,.5 L.5,1",
              3: "M.5,.5 L.5,0"
            },
            "╁": {
              1: "M.5,.5 L.5,0 M0,.5 L1,.5",
              3: "M.5,.5 L.5,1"
            },
            "╂": {
              1: "M0,.5 L1,.5",
              3: "M.5,0 L.5,1"
            },
            "╃": {
              1: "M0.5,1 L.5,.5 L1,.5",
              3: "M.5,0 L.5,.5 L0,.5"
            },
            "╄": {
              1: "M0,.5 L.5,.5 L.5,1",
              3: "M.5,0 L.5,.5 L1,.5"
            },
            "╅": {
              1: "M.5,0 L.5,.5 L1,.5",
              3: "M0,.5 L.5,.5 L.5,1"
            },
            "╆": {
              1: "M.5,0 L.5,.5 L0,.5",
              3: "M0.5,1 L.5,.5 L1,.5"
            },
            "╇": {
              1: "M.5,.5 L.5,1",
              3: "M.5,.5 L.5,0 M0,.5 L1,.5"
            },
            "╈": {
              1: "M.5,.5 L.5,0",
              3: "M0,.5 L1,.5 M.5,.5 L.5,1"
            },
            "╉": {
              1: "M.5,.5 L1,.5",
              3: "M.5,0 L.5,1 M.5,.5 L0,.5"
            },
            "╊": {
              1: "M.5,.5 L0,.5",
              3: "M.5,0 L.5,1 M.5,.5 L1,.5"
            },
            "╌": {
              1: "M.1,.5 L.4,.5 M.6,.5 L.9,.5"
            },
            "╍": {
              3: "M.1,.5 L.4,.5 M.6,.5 L.9,.5"
            },
            "┄": {
              1: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"
            },
            "┅": {
              3: "M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"
            },
            "┈": {
              1: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"
            },
            "┉": {
              3: "M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"
            },
            "╎": {
              1: "M.5,.1 L.5,.4 M.5,.6 L.5,.9"
            },
            "╏": {
              3: "M.5,.1 L.5,.4 M.5,.6 L.5,.9"
            },
            "┆": {
              1: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"
            },
            "┇": {
              3: "M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"
            },
            "┊": {
              1: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"
            },
            "┋": {
              3: "M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"
            },
            "╭": {
              1: (e, t) => `M.5,1 L.5,${.5 + t / .15 * .5} C.5,${.5 + t / .15 * .5},.5,.5,1,.5`
            },
            "╮": {
              1: (e, t) => `M.5,1 L.5,${.5 + t / .15 * .5} C.5,${.5 + t / .15 * .5},.5,.5,0,.5`
            },
            "╯": {
              1: (e, t) => `M.5,0 L.5,${.5 - t / .15 * .5} C.5,${.5 - t / .15 * .5},.5,.5,0,.5`
            },
            "╰": {
              1: (e, t) => `M.5,0 L.5,${.5 - t / .15 * .5} C.5,${.5 - t / .15 * .5},.5,.5,1,.5`
            }
          }, t.powerlineDefinitions = {
            "": {
              d: "M0,0 L1,.5 L0,1",
              type: 0,
              rightPadding: 2
            },
            "": {
              d: "M-1,-.5 L1,.5 L-1,1.5",
              type: 1,
              leftPadding: 1,
              rightPadding: 1
            },
            "": {
              d: "M1,0 L0,.5 L1,1",
              type: 0,
              leftPadding: 2
            },
            "": {
              d: "M2,-.5 L0,.5 L2,1.5",
              type: 1,
              leftPadding: 1,
              rightPadding: 1
            },
            "": {
              d: "M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",
              type: 0,
              rightPadding: 1
            },
            "": {
              d: "M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",
              type: 1,
              rightPadding: 1
            },
            "": {
              d: "M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",
              type: 0,
              leftPadding: 1
            },
            "": {
              d: "M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",
              type: 1,
              leftPadding: 1
            },
            "": {
              d: "M-.5,-.5 L1.5,1.5 L-.5,1.5",
              type: 0
            },
            "": {
              d: "M-.5,-.5 L1.5,1.5",
              type: 1,
              leftPadding: 1,
              rightPadding: 1
            },
            "": {
              d: "M1.5,-.5 L-.5,1.5 L1.5,1.5",
              type: 0
            },
            "": {
              d: "M1.5,-.5 L-.5,1.5 L-.5,-.5",
              type: 0
            },
            "": {
              d: "M1.5,-.5 L-.5,1.5",
              type: 1,
              leftPadding: 1,
              rightPadding: 1
            },
            "": {
              d: "M-.5,-.5 L1.5,1.5 L1.5,-.5",
              type: 0
            }
          }, t.powerlineDefinitions[""] = t.powerlineDefinitions[""], t.powerlineDefinitions[""] = t.powerlineDefinitions[""], t.tryDrawCustomChar = function (e, i, n, l, c, d, _, u) {
            const g = t.blockElementDefinitions[i];
            if (g) return function (e, t, i, s, r, o) {
              for (let n = 0; n < t.length; n++) {
                const a = t[n],
                  h = r / 8,
                  l = o / 8;
                e.fillRect(i + a.x * h, s + a.y * l, a.w * h, a.h * l);
              }
            }(e, g, n, l, c, d), !0;
            const v = r[i];
            if (v) return function (e, t, i, r, n, a) {
              let h = o.get(t);
              h || (h = new Map(), o.set(t, h));
              const l = e.fillStyle;
              if ("string" != typeof l) throw new Error(`Unexpected fillStyle type "${l}"`);
              let c = h.get(l);
              if (!c) {
                const i = t[0].length,
                  r = t.length,
                  o = document.createElement("canvas");
                o.width = i, o.height = r;
                const n = (0, s.throwIfFalsy)(o.getContext("2d")),
                  a = new ImageData(i, r);
                let d, _, u, g;
                if (l.startsWith("#")) d = parseInt(l.slice(1, 3), 16), _ = parseInt(l.slice(3, 5), 16), u = parseInt(l.slice(5, 7), 16), g = l.length > 7 && parseInt(l.slice(7, 9), 16) || 1;else {
                  if (!l.startsWith("rgba")) throw new Error(`Unexpected fillStyle color format "${l}" when drawing pattern glyph`);
                  [d, _, u, g] = l.substring(5, l.length - 1).split(",").map(e => parseFloat(e));
                }
                for (let e = 0; e < r; e++) for (let s = 0; s < i; s++) a.data[4 * (e * i + s)] = d, a.data[4 * (e * i + s) + 1] = _, a.data[4 * (e * i + s) + 2] = u, a.data[4 * (e * i + s) + 3] = t[e][s] * (255 * g);
                n.putImageData(a, 0, 0), c = (0, s.throwIfFalsy)(e.createPattern(o, null)), h.set(l, c);
              }
              e.fillStyle = c, e.fillRect(i, r, n, a);
            }(e, v, n, l, c, d), !0;
            const f = t.boxDrawingDefinitions[i];
            if (f) return function (e, t, i, s, r, o, n) {
              e.strokeStyle = e.fillStyle;
              for (const [l, c] of Object.entries(t)) {
                let t;
                e.beginPath(), e.lineWidth = n * Number.parseInt(l), t = "function" == typeof c ? c(.15, .15 / o * r) : c;
                for (const l of t.split(" ")) {
                  const t = l[0],
                    c = a[t];
                  if (!c) {
                    console.error(`Could not find drawing instructions for "${t}"`);
                    continue;
                  }
                  const d = l.substring(1).split(",");
                  d[0] && d[1] && c(e, h(d, r, o, i, s, !0, n));
                }
                e.stroke(), e.closePath();
              }
            }(e, f, n, l, c, d, u), !0;
            const C = t.powerlineDefinitions[i];
            return !!C && (function (e, t, i, s, r, o, n, l) {
              var c, d;
              const _ = new Path2D();
              _.rect(i, s, r, o), e.clip(_), e.beginPath();
              const u = n / 12;
              e.lineWidth = l * u;
              for (const n of t.d.split(" ")) {
                const _ = n[0],
                  g = a[_];
                if (!g) {
                  console.error(`Could not find drawing instructions for "${_}"`);
                  continue;
                }
                const v = n.substring(1).split(",");
                v[0] && v[1] && g(e, h(v, r, o, i, s, !1, l, (null !== (c = t.leftPadding) && void 0 !== c ? c : 0) * (u / 2), (null !== (d = t.rightPadding) && void 0 !== d ? d : 0) * (u / 2)));
              }
              1 === t.type ? (e.strokeStyle = e.fillStyle, e.stroke()) : e.fill(), e.closePath();
            }(e, C, n, l, c, d, _, u), !0);
          };
          const o = new Map();
          function n(e, t, i = 0) {
            return Math.max(Math.min(e, t), i);
          }
          const a = {
            C: (e, t) => e.bezierCurveTo(t[0], t[1], t[2], t[3], t[4], t[5]),
            L: (e, t) => e.lineTo(t[0], t[1]),
            M: (e, t) => e.moveTo(t[0], t[1])
          };
          function h(e, t, i, s, r, o, a, h = 0, l = 0) {
            const c = e.map(e => parseFloat(e) || parseInt(e));
            if (c.length < 2) throw new Error("Too few arguments for instruction");
            for (let e = 0; e < c.length; e += 2) c[e] *= t - h * a - l * a, o && 0 !== c[e] && (c[e] = n(Math.round(c[e] + .5) - .5, t, 0)), c[e] += s + h * a;
            for (let e = 1; e < c.length; e += 2) c[e] *= i, o && 0 !== c[e] && (c[e] = n(Math.round(c[e] + .5) - .5, i, 0)), c[e] += r;
            return c;
          }
        },
        56: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.observeDevicePixelDimensions = void 0;
          const s = i(859);
          t.observeDevicePixelDimensions = function (e, t, i) {
            let r = new t.ResizeObserver(t => {
              const s = t.find(t => t.target === e);
              if (!s) return;
              if (!("devicePixelContentBoxSize" in s)) return null == r || r.disconnect(), void (r = void 0);
              const o = s.devicePixelContentBoxSize[0].inlineSize,
                n = s.devicePixelContentBoxSize[0].blockSize;
              o > 0 && n > 0 && i(o, n);
            });
            try {
              r.observe(e, {
                box: ["device-pixel-content-box"]
              });
            } catch (e) {
              r.disconnect(), r = void 0;
            }
            return (0, s.toDisposable)(() => null == r ? void 0 : r.disconnect());
          };
        },
        374: (e, t) => {
          function i(e) {
            return 57508 <= e && e <= 57558;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.createRenderDimensions = t.excludeFromContrastRatioDemands = t.isRestrictedPowerlineGlyph = t.isPowerlineGlyph = t.throwIfFalsy = void 0, t.throwIfFalsy = function (e) {
            if (!e) throw new Error("value must not be falsy");
            return e;
          }, t.isPowerlineGlyph = i, t.isRestrictedPowerlineGlyph = function (e) {
            return 57520 <= e && e <= 57527;
          }, t.excludeFromContrastRatioDemands = function (e) {
            return i(e) || function (e) {
              return 9472 <= e && e <= 9631;
            }(e);
          }, t.createRenderDimensions = function () {
            return {
              css: {
                canvas: {
                  width: 0,
                  height: 0
                },
                cell: {
                  width: 0,
                  height: 0
                }
              },
              device: {
                canvas: {
                  width: 0,
                  height: 0
                },
                cell: {
                  width: 0,
                  height: 0
                },
                char: {
                  width: 0,
                  height: 0,
                  left: 0,
                  top: 0
                }
              }
            };
          };
        },
        296: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.createSelectionRenderModel = void 0;
          class i {
            constructor() {
              this.clear();
            }
            clear() {
              this.hasSelection = !1, this.columnSelectMode = !1, this.viewportStartRow = 0, this.viewportEndRow = 0, this.viewportCappedStartRow = 0, this.viewportCappedEndRow = 0, this.startCol = 0, this.endCol = 0, this.selectionStart = void 0, this.selectionEnd = void 0;
            }
            update(e, t, i, s = !1) {
              if (this.selectionStart = t, this.selectionEnd = i, !t || !i || t[0] === i[0] && t[1] === i[1]) return void this.clear();
              const r = t[1] - e.buffer.active.viewportY,
                o = i[1] - e.buffer.active.viewportY,
                n = Math.max(r, 0),
                a = Math.min(o, e.rows - 1);
              n >= e.rows || a < 0 ? this.clear() : (this.hasSelection = !0, this.columnSelectMode = s, this.viewportStartRow = r, this.viewportEndRow = o, this.viewportCappedStartRow = n, this.viewportCappedEndRow = a, this.startCol = t[0], this.endCol = i[0]);
            }
            isCellSelected(e, t, i) {
              return !!this.hasSelection && (i -= e.buffer.active.viewportY, this.columnSelectMode ? this.startCol <= this.endCol ? t >= this.startCol && i >= this.viewportCappedStartRow && t < this.endCol && i <= this.viewportCappedEndRow : t < this.startCol && i >= this.viewportCappedStartRow && t >= this.endCol && i <= this.viewportCappedEndRow : i > this.viewportStartRow && i < this.viewportEndRow || this.viewportStartRow === this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportEndRow && t < this.endCol || this.viewportStartRow < this.viewportEndRow && i === this.viewportStartRow && t >= this.startCol);
            }
          }
          t.createSelectionRenderModel = function () {
            return new i();
          };
        },
        509: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.TextureAtlas = void 0;
          const s = i(237),
            r = i(855),
            o = i(147),
            n = i(160),
            a = i(860),
            h = i(374),
            l = i(485),
            c = i(385),
            d = i(345),
            _ = {
              texturePage: 0,
              texturePosition: {
                x: 0,
                y: 0
              },
              texturePositionClipSpace: {
                x: 0,
                y: 0
              },
              offset: {
                x: 0,
                y: 0
              },
              size: {
                x: 0,
                y: 0
              },
              sizeClipSpace: {
                x: 0,
                y: 0
              }
            };
          let u;
          class g {
            constructor(e, t, i) {
              this._document = e, this._config = t, this._unicodeService = i, this._didWarmUp = !1, this._cacheMap = new l.FourKeyMap(), this._cacheMapCombined = new l.FourKeyMap(), this._pages = [], this._activePages = [], this._workBoundingBox = {
                top: 0,
                left: 0,
                bottom: 0,
                right: 0
              }, this._workAttributeData = new o.AttributeData(), this._textureSize = 512, this._onAddTextureAtlasCanvas = new d.EventEmitter(), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = new d.EventEmitter(), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._requestClearModel = !1, this._createNewPage(), this._tmpCanvas = C(e, 4 * this._config.deviceCellWidth + 4, this._config.deviceCellHeight + 4), this._tmpCtx = (0, h.throwIfFalsy)(this._tmpCanvas.getContext("2d", {
                alpha: this._config.allowTransparency,
                willReadFrequently: !0
              }));
            }
            get pages() {
              return this._pages;
            }
            dispose() {
              for (const e of this.pages) e.canvas.remove();
              this._onAddTextureAtlasCanvas.dispose();
            }
            warmUp() {
              this._didWarmUp || (this._doWarmUp(), this._didWarmUp = !0);
            }
            _doWarmUp() {
              const e = new c.IdleTaskQueue();
              for (let t = 33; t < 126; t++) e.enqueue(() => {
                if (!this._cacheMap.get(t, r.DEFAULT_COLOR, r.DEFAULT_COLOR, r.DEFAULT_EXT)) {
                  const e = this._drawToCache(t, r.DEFAULT_COLOR, r.DEFAULT_COLOR, r.DEFAULT_EXT);
                  this._cacheMap.set(t, r.DEFAULT_COLOR, r.DEFAULT_COLOR, r.DEFAULT_EXT, e);
                }
              });
            }
            beginFrame() {
              return this._requestClearModel;
            }
            clearTexture() {
              if (0 !== this._pages[0].currentRow.x || 0 !== this._pages[0].currentRow.y) {
                for (const e of this._pages) e.clear();
                this._cacheMap.clear(), this._cacheMapCombined.clear(), this._didWarmUp = !1;
              }
            }
            _createNewPage() {
              g.maxAtlasPages && this._pages.length >= Math.max(4, g.maxAtlasPages / 2) && queueMicrotask(() => {
                const e = this._pages.filter(e => 2 * e.canvas.width <= (g.maxTextureSize || 4096)).sort((e, t) => t.canvas.width !== e.canvas.width ? t.canvas.width - e.canvas.width : t.percentageUsed - e.percentageUsed);
                let t = -1,
                  i = 0;
                for (let s = 0; s < e.length; s++) if (e[s].canvas.width !== i) t = s, i = e[s].canvas.width;else if (s - t == 3) break;
                const s = e.slice(t, t + 4),
                  r = s.map(e => e.glyphs[0].texturePage).sort((e, t) => e > t ? 1 : -1),
                  o = r[0],
                  n = this._mergePages(s, o);
                n.version++, this._pages[o] = n;
                for (let e = r.length - 1; e >= 1; e--) this._deletePage(r[e]);
                this._requestClearModel = !0, this._onAddTextureAtlasCanvas.fire(n.canvas);
              });
              const e = new v(this._document, this._textureSize);
              return this._pages.push(e), this._activePages.push(e), this._onAddTextureAtlasCanvas.fire(e.canvas), e;
            }
            _mergePages(e, t) {
              const i = 2 * e[0].canvas.width,
                s = new v(this._document, i, e);
              for (const [r, o] of e.entries()) {
                const e = r * o.canvas.width % i,
                  n = Math.floor(r / 2) * o.canvas.height;
                s.ctx.drawImage(o.canvas, e, n);
                for (const s of o.glyphs) s.texturePage = t, s.sizeClipSpace.x = s.size.x / i, s.sizeClipSpace.y = s.size.y / i, s.texturePosition.x += e, s.texturePosition.y += n, s.texturePositionClipSpace.x = s.texturePosition.x / i, s.texturePositionClipSpace.y = s.texturePosition.y / i;
                this._onRemoveTextureAtlasCanvas.fire(o.canvas);
                const a = this._activePages.indexOf(o);
                -1 !== a && this._activePages.splice(a, 1);
              }
              return s;
            }
            _deletePage(e) {
              this._pages.splice(e, 1);
              for (let t = e; t < this._pages.length; t++) {
                const e = this._pages[t];
                for (const t of e.glyphs) t.texturePage--;
                e.version++;
              }
            }
            getRasterizedGlyphCombinedChar(e, t, i, s) {
              return this._getFromCacheMap(this._cacheMapCombined, e, t, i, s);
            }
            getRasterizedGlyph(e, t, i, s) {
              return this._getFromCacheMap(this._cacheMap, e, t, i, s);
            }
            _getFromCacheMap(e, t, i, s, r) {
              return u = e.get(t, i, s, r), u || (u = this._drawToCache(t, i, s, r), e.set(t, i, s, r, u)), u;
            }
            _getColorFromAnsiIndex(e) {
              if (e >= this._config.colors.ansi.length) throw new Error("No color found for idx " + e);
              return this._config.colors.ansi[e];
            }
            _getBackgroundColor(e, t, i, r) {
              if (this._config.allowTransparency) return n.NULL_COLOR;
              let a;
              switch (e) {
                case 16777216:
                case 33554432:
                  a = this._getColorFromAnsiIndex(t);
                  break;
                case 50331648:
                  const e = o.AttributeData.toColorRGB(t);
                  a = n.rgba.toColor(e[0], e[1], e[2]);
                  break;
                default:
                  a = i ? this._config.colors.foreground : this._config.colors.background;
              }
              return r && (a = n.color.blend(this._config.colors.background, n.color.multiplyOpacity(a, s.DIM_OPACITY))), a;
            }
            _getForegroundColor(e, t, i, r, a, h, l, c, d, _) {
              const u = this._getMinimumContrastColor(e, t, i, r, a, h, !1, d, _);
              if (u) return u;
              let g;
              switch (a) {
                case 16777216:
                case 33554432:
                  this._config.drawBoldTextInBrightColors && d && h < 8 && (h += 8), g = this._getColorFromAnsiIndex(h);
                  break;
                case 50331648:
                  const e = o.AttributeData.toColorRGB(h);
                  g = n.rgba.toColor(e[0], e[1], e[2]);
                  break;
                default:
                  g = l ? this._config.colors.background : this._config.colors.foreground;
              }
              return this._config.allowTransparency && (g = n.color.opaque(g)), c && (g = n.color.multiplyOpacity(g, s.DIM_OPACITY)), g;
            }
            _resolveBackgroundRgba(e, t, i) {
              switch (e) {
                case 16777216:
                case 33554432:
                  return this._getColorFromAnsiIndex(t).rgba;
                case 50331648:
                  return t << 8;
                default:
                  return i ? this._config.colors.foreground.rgba : this._config.colors.background.rgba;
              }
            }
            _resolveForegroundRgba(e, t, i, s) {
              switch (e) {
                case 16777216:
                case 33554432:
                  return this._config.drawBoldTextInBrightColors && s && t < 8 && (t += 8), this._getColorFromAnsiIndex(t).rgba;
                case 50331648:
                  return t << 8;
                default:
                  return i ? this._config.colors.background.rgba : this._config.colors.foreground.rgba;
              }
            }
            _getMinimumContrastColor(e, t, i, s, r, o, a, h, l) {
              if (1 === this._config.minimumContrastRatio || l) return;
              const c = this._config.colors.contrastCache.getColor(e, s);
              if (void 0 !== c) return c || void 0;
              const d = this._resolveBackgroundRgba(t, i, a),
                _ = this._resolveForegroundRgba(r, o, a, h),
                u = n.rgba.ensureContrastRatio(d, _, this._config.minimumContrastRatio);
              if (!u) return void this._config.colors.contrastCache.setColor(e, s, null);
              const g = n.rgba.toColor(u >> 24 & 255, u >> 16 & 255, u >> 8 & 255);
              return this._config.colors.contrastCache.setColor(e, s, g), g;
            }
            _drawToCache(e, t, i, r) {
              const n = "number" == typeof e ? String.fromCharCode(e) : e,
                l = this._config.deviceCellWidth * Math.max(n.length, 2) + 4;
              this._tmpCanvas.width < l && (this._tmpCanvas.width = l);
              const c = this._config.deviceCellHeight + 8;
              if (this._tmpCanvas.height < c && (this._tmpCanvas.height = c), this._tmpCtx.save(), this._workAttributeData.fg = i, this._workAttributeData.bg = t, this._workAttributeData.extended.ext = r, this._workAttributeData.isInvisible()) return _;
              const d = !!this._workAttributeData.isBold(),
                u = !!this._workAttributeData.isInverse(),
                g = !!this._workAttributeData.isDim(),
                v = !!this._workAttributeData.isItalic(),
                C = !!this._workAttributeData.isUnderline(),
                p = !!this._workAttributeData.isStrikethrough();
              let m = this._workAttributeData.getFgColor(),
                x = this._workAttributeData.getFgColorMode(),
                L = this._workAttributeData.getBgColor(),
                w = this._workAttributeData.getBgColorMode();
              if (u) {
                const e = m;
                m = L, L = e;
                const t = x;
                x = w, w = t;
              }
              const b = this._getBackgroundColor(w, L, u, g);
              this._tmpCtx.globalCompositeOperation = "copy", this._tmpCtx.fillStyle = b.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.globalCompositeOperation = "source-over";
              const M = d ? this._config.fontWeightBold : this._config.fontWeight,
                R = v ? "italic" : "";
              this._tmpCtx.font = `${R} ${M} ${this._config.fontSize * this._config.devicePixelRatio}px ${this._config.fontFamily}`, this._tmpCtx.textBaseline = s.TEXT_BASELINE;
              const y = 1 === n.length && (0, h.isPowerlineGlyph)(n.charCodeAt(0)),
                A = 1 === n.length && (0, h.isRestrictedPowerlineGlyph)(n.charCodeAt(0)),
                E = this._getForegroundColor(t, w, L, i, x, m, u, g, d, (0, h.excludeFromContrastRatioDemands)(n.charCodeAt(0)));
              this._tmpCtx.fillStyle = E.css;
              const T = A ? 0 : 4;
              let S = !1;
              !1 !== this._config.customGlyphs && (S = (0, a.tryDrawCustomChar)(this._tmpCtx, n, T, T, this._config.deviceCellWidth, this._config.deviceCellHeight, this._config.fontSize, this._config.devicePixelRatio));
              let D,
                B = !y;
              if (D = "number" == typeof e ? this._unicodeService.wcwidth(e) : this._unicodeService.getStringCellWidth(e), C) {
                this._tmpCtx.save();
                const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 15)),
                  t = e % 2 == 1 ? .5 : 0;
                if (this._tmpCtx.lineWidth = e, this._workAttributeData.isUnderlineColorDefault()) this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle;else if (this._workAttributeData.isUnderlineColorRGB()) B = !1, this._tmpCtx.strokeStyle = `rgb(${o.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else {
                  B = !1;
                  let e = this._workAttributeData.getUnderlineColor();
                  this._config.drawBoldTextInBrightColors && this._workAttributeData.isBold() && e < 8 && (e += 8), this._tmpCtx.strokeStyle = this._getColorFromAnsiIndex(e).css;
                }
                this._tmpCtx.beginPath();
                const i = T,
                  s = Math.ceil(T + this._config.deviceCharHeight) - t,
                  r = T + this._config.deviceCharHeight + e - t,
                  a = Math.ceil(T + this._config.deviceCharHeight + 2 * e) - t;
                for (let o = 0; o < D; o++) {
                  this._tmpCtx.save();
                  const n = i + o * this._config.deviceCellWidth,
                    h = i + (o + 1) * this._config.deviceCellWidth,
                    l = n + this._config.deviceCellWidth / 2;
                  switch (this._workAttributeData.extended.underlineStyle) {
                    case 2:
                      this._tmpCtx.moveTo(n, s), this._tmpCtx.lineTo(h, s), this._tmpCtx.moveTo(n, a), this._tmpCtx.lineTo(h, a);
                      break;
                    case 3:
                      const i = e <= 1 ? a : Math.ceil(T + this._config.deviceCharHeight - e / 2) - t,
                        o = e <= 1 ? s : Math.ceil(T + this._config.deviceCharHeight + e / 2) - t,
                        c = new Path2D();
                      c.rect(n, s, this._config.deviceCellWidth, a - s), this._tmpCtx.clip(c), this._tmpCtx.moveTo(n - this._config.deviceCellWidth / 2, r), this._tmpCtx.bezierCurveTo(n - this._config.deviceCellWidth / 2, o, n, o, n, r), this._tmpCtx.bezierCurveTo(n, i, l, i, l, r), this._tmpCtx.bezierCurveTo(l, o, h, o, h, r), this._tmpCtx.bezierCurveTo(h, i, h + this._config.deviceCellWidth / 2, i, h + this._config.deviceCellWidth / 2, r);
                      break;
                    case 4:
                      this._tmpCtx.setLineDash([2 * this._config.devicePixelRatio, this._config.devicePixelRatio]), this._tmpCtx.moveTo(n, s), this._tmpCtx.lineTo(h, s);
                      break;
                    case 5:
                      this._tmpCtx.setLineDash([4 * this._config.devicePixelRatio, 3 * this._config.devicePixelRatio]), this._tmpCtx.moveTo(n, s), this._tmpCtx.lineTo(h, s);
                      break;
                    default:
                      this._tmpCtx.moveTo(n, s), this._tmpCtx.lineTo(h, s);
                  }
                  this._tmpCtx.stroke(), this._tmpCtx.restore();
                }
                if (this._tmpCtx.restore(), !S && this._config.fontSize >= 12 && !this._config.allowTransparency && " " !== n) {
                  this._tmpCtx.save(), this._tmpCtx.textBaseline = "alphabetic";
                  const t = this._tmpCtx.measureText(n);
                  if (this._tmpCtx.restore(), "actualBoundingBoxDescent" in t && t.actualBoundingBoxDescent > 0) {
                    this._tmpCtx.save();
                    const t = new Path2D();
                    t.rect(i, s - Math.ceil(e / 2), this._config.deviceCellWidth, a - s + Math.ceil(e / 2)), this._tmpCtx.clip(t), this._tmpCtx.lineWidth = 3 * this._config.devicePixelRatio, this._tmpCtx.strokeStyle = b.css, this._tmpCtx.strokeText(n, T, T + this._config.deviceCharHeight), this._tmpCtx.restore();
                  }
                }
              }
              if (S || this._tmpCtx.fillText(n, T, T + this._config.deviceCharHeight), "_" === n && !this._config.allowTransparency) {
                let e = f(this._tmpCtx.getImageData(T, T, this._config.deviceCellWidth, this._config.deviceCellHeight), b, E, B);
                if (e) for (let t = 1; t <= 5 && (this._tmpCtx.save(), this._tmpCtx.fillStyle = b.css, this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height), this._tmpCtx.restore(), this._tmpCtx.fillText(n, T, T + this._config.deviceCharHeight - t), e = f(this._tmpCtx.getImageData(T, T, this._config.deviceCellWidth, this._config.deviceCellHeight), b, E, B), e); t++);
              }
              if (p) {
                const e = Math.max(1, Math.floor(this._config.fontSize * this._config.devicePixelRatio / 10)),
                  t = this._tmpCtx.lineWidth % 2 == 1 ? .5 : 0;
                this._tmpCtx.lineWidth = e, this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle, this._tmpCtx.beginPath(), this._tmpCtx.moveTo(T, T + Math.floor(this._config.deviceCharHeight / 2) - t), this._tmpCtx.lineTo(T + this._config.deviceCharWidth * D, T + Math.floor(this._config.deviceCharHeight / 2) - t), this._tmpCtx.stroke();
              }
              this._tmpCtx.restore();
              const P = this._tmpCtx.getImageData(0, 0, this._tmpCanvas.width, this._tmpCanvas.height);
              let F;
              if (F = this._config.allowTransparency ? function (e) {
                for (let t = 0; t < e.data.length; t += 4) if (e.data[t + 3] > 0) return !1;
                return !0;
              }(P) : f(P, b, E, B), F) return _;
              const I = this._findGlyphBoundingBox(P, this._workBoundingBox, l, A, S, T);
              let $, k;
              for (;;) {
                if (0 === this._activePages.length) {
                  const e = this._createNewPage();
                  $ = e, k = e.currentRow, k.height = I.size.y;
                  break;
                }
                $ = this._activePages[this._activePages.length - 1], k = $.currentRow;
                for (const e of this._activePages) I.size.y <= e.currentRow.height && ($ = e, k = e.currentRow);
                for (let e = this._activePages.length - 1; e >= 0; e--) for (const t of this._activePages[e].fixedRows) t.height <= k.height && I.size.y <= t.height && ($ = this._activePages[e], k = t);
                if (k.y + I.size.y >= $.canvas.height || k.height > I.size.y + 2) {
                  let e = !1;
                  if ($.currentRow.y + $.currentRow.height + I.size.y >= $.canvas.height) {
                    let t;
                    for (const e of this._activePages) if (e.currentRow.y + e.currentRow.height + I.size.y < e.canvas.height) {
                      t = e;
                      break;
                    }
                    if (t) $ = t;else {
                      const t = this._createNewPage();
                      $ = t, k = t.currentRow, k.height = I.size.y, e = !0;
                    }
                  }
                  e || ($.currentRow.height > 0 && $.fixedRows.push($.currentRow), k = {
                    x: 0,
                    y: $.currentRow.y + $.currentRow.height,
                    height: I.size.y
                  }, $.fixedRows.push(k), $.currentRow = {
                    x: 0,
                    y: k.y + k.height,
                    height: 0
                  });
                }
                if (k.x + I.size.x <= $.canvas.width) break;
                k === $.currentRow ? (k.x = 0, k.y += k.height, k.height = 0) : $.fixedRows.splice($.fixedRows.indexOf(k), 1);
              }
              return I.texturePage = this._pages.indexOf($), I.texturePosition.x = k.x, I.texturePosition.y = k.y, I.texturePositionClipSpace.x = k.x / $.canvas.width, I.texturePositionClipSpace.y = k.y / $.canvas.height, I.sizeClipSpace.x /= $.canvas.width, I.sizeClipSpace.y /= $.canvas.height, k.height = Math.max(k.height, I.size.y), k.x += I.size.x, $.ctx.putImageData(P, I.texturePosition.x - this._workBoundingBox.left, I.texturePosition.y - this._workBoundingBox.top, this._workBoundingBox.left, this._workBoundingBox.top, I.size.x, I.size.y), $.addGlyph(I), $.version++, I;
            }
            _findGlyphBoundingBox(e, t, i, s, r, o) {
              t.top = 0;
              const n = s ? this._config.deviceCellHeight : this._tmpCanvas.height,
                a = s ? this._config.deviceCellWidth : i;
              let h = !1;
              for (let i = 0; i < n; i++) {
                for (let s = 0; s < a; s++) {
                  const r = i * this._tmpCanvas.width * 4 + 4 * s + 3;
                  if (0 !== e.data[r]) {
                    t.top = i, h = !0;
                    break;
                  }
                }
                if (h) break;
              }
              t.left = 0, h = !1;
              for (let i = 0; i < o + a; i++) {
                for (let s = 0; s < n; s++) {
                  const r = s * this._tmpCanvas.width * 4 + 4 * i + 3;
                  if (0 !== e.data[r]) {
                    t.left = i, h = !0;
                    break;
                  }
                }
                if (h) break;
              }
              t.right = a, h = !1;
              for (let i = o + a - 1; i >= o; i--) {
                for (let s = 0; s < n; s++) {
                  const r = s * this._tmpCanvas.width * 4 + 4 * i + 3;
                  if (0 !== e.data[r]) {
                    t.right = i, h = !0;
                    break;
                  }
                }
                if (h) break;
              }
              t.bottom = n, h = !1;
              for (let i = n - 1; i >= 0; i--) {
                for (let s = 0; s < a; s++) {
                  const r = i * this._tmpCanvas.width * 4 + 4 * s + 3;
                  if (0 !== e.data[r]) {
                    t.bottom = i, h = !0;
                    break;
                  }
                }
                if (h) break;
              }
              return {
                texturePage: 0,
                texturePosition: {
                  x: 0,
                  y: 0
                },
                texturePositionClipSpace: {
                  x: 0,
                  y: 0
                },
                size: {
                  x: t.right - t.left + 1,
                  y: t.bottom - t.top + 1
                },
                sizeClipSpace: {
                  x: t.right - t.left + 1,
                  y: t.bottom - t.top + 1
                },
                offset: {
                  x: -t.left + o + (s || r ? Math.floor((this._config.deviceCellWidth - this._config.deviceCharWidth) / 2) : 0),
                  y: -t.top + o + (s || r ? 1 === this._config.lineHeight ? 0 : Math.round((this._config.deviceCellHeight - this._config.deviceCharHeight) / 2) : 0)
                }
              };
            }
          }
          t.TextureAtlas = g;
          class v {
            constructor(e, t, i) {
              if (this._usedPixels = 0, this._glyphs = [], this.version = 0, this.currentRow = {
                x: 0,
                y: 0,
                height: 0
              }, this.fixedRows = [], i) for (const e of i) this._glyphs.push(...e.glyphs), this._usedPixels += e._usedPixels;
              this.canvas = C(e, t, t), this.ctx = (0, h.throwIfFalsy)(this.canvas.getContext("2d", {
                alpha: !0
              }));
            }
            get percentageUsed() {
              return this._usedPixels / (this.canvas.width * this.canvas.height);
            }
            get glyphs() {
              return this._glyphs;
            }
            addGlyph(e) {
              this._glyphs.push(e), this._usedPixels += e.size.x * e.size.y;
            }
            clear() {
              this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), this.currentRow.x = 0, this.currentRow.y = 0, this.currentRow.height = 0, this.fixedRows.length = 0, this.version++;
            }
          }
          function f(e, t, i, s) {
            const r = t.rgba >>> 24,
              o = t.rgba >>> 16 & 255,
              n = t.rgba >>> 8 & 255,
              a = i.rgba >>> 24,
              h = i.rgba >>> 16 & 255,
              l = i.rgba >>> 8 & 255,
              c = Math.floor((Math.abs(r - a) + Math.abs(o - h) + Math.abs(n - l)) / 12);
            let d = !0;
            for (let t = 0; t < e.data.length; t += 4) e.data[t] === r && e.data[t + 1] === o && e.data[t + 2] === n || s && Math.abs(e.data[t] - r) + Math.abs(e.data[t + 1] - o) + Math.abs(e.data[t + 2] - n) < c ? e.data[t + 3] = 0 : d = !1;
            return d;
          }
          function C(e, t, i) {
            const s = e.createElement("canvas");
            return s.width = t, s.height = i, s;
          }
        },
        160: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.contrastRatio = t.toPaddedHex = t.rgba = t.rgb = t.css = t.color = t.channels = t.NULL_COLOR = void 0;
          const s = i(399);
          let r = 0,
            o = 0,
            n = 0,
            a = 0;
          var h, l, c;
          function d(e) {
            const t = e.toString(16);
            return t.length < 2 ? "0" + t : t;
          }
          function _(e, t) {
            return e < t ? (t + .05) / (e + .05) : (e + .05) / (t + .05);
          }
          t.NULL_COLOR = {
            css: "#00000000",
            rgba: 0
          }, function (e) {
            e.toCss = function (e, t, i, s) {
              return void 0 !== s ? `#${d(e)}${d(t)}${d(i)}${d(s)}` : `#${d(e)}${d(t)}${d(i)}`;
            }, e.toRgba = function (e, t, i, s = 255) {
              return (e << 24 | t << 16 | i << 8 | s) >>> 0;
            };
          }(h = t.channels || (t.channels = {})), function (e) {
            function t(e, t) {
              return a = Math.round(255 * t), [r, o, n] = c.toChannels(e.rgba), {
                css: h.toCss(r, o, n, a),
                rgba: h.toRgba(r, o, n, a)
              };
            }
            e.blend = function (e, t) {
              if (a = (255 & t.rgba) / 255, 1 === a) return {
                css: t.css,
                rgba: t.rgba
              };
              const i = t.rgba >> 24 & 255,
                s = t.rgba >> 16 & 255,
                l = t.rgba >> 8 & 255,
                c = e.rgba >> 24 & 255,
                d = e.rgba >> 16 & 255,
                _ = e.rgba >> 8 & 255;
              return r = c + Math.round((i - c) * a), o = d + Math.round((s - d) * a), n = _ + Math.round((l - _) * a), {
                css: h.toCss(r, o, n),
                rgba: h.toRgba(r, o, n)
              };
            }, e.isOpaque = function (e) {
              return 255 == (255 & e.rgba);
            }, e.ensureContrastRatio = function (e, t, i) {
              const s = c.ensureContrastRatio(e.rgba, t.rgba, i);
              if (s) return c.toColor(s >> 24 & 255, s >> 16 & 255, s >> 8 & 255);
            }, e.opaque = function (e) {
              const t = (255 | e.rgba) >>> 0;
              return [r, o, n] = c.toChannels(t), {
                css: h.toCss(r, o, n),
                rgba: t
              };
            }, e.opacity = t, e.multiplyOpacity = function (e, i) {
              return a = 255 & e.rgba, t(e, a * i / 255);
            }, e.toColorRGB = function (e) {
              return [e.rgba >> 24 & 255, e.rgba >> 16 & 255, e.rgba >> 8 & 255];
            };
          }(t.color || (t.color = {})), function (e) {
            let t, i;
            if (!s.isNode) {
              const e = document.createElement("canvas");
              e.width = 1, e.height = 1;
              const s = e.getContext("2d", {
                willReadFrequently: !0
              });
              s && (t = s, t.globalCompositeOperation = "copy", i = t.createLinearGradient(0, 0, 1, 1));
            }
            e.toColor = function (e) {
              if (e.match(/#[\da-f]{3,8}/i)) switch (e.length) {
                case 4:
                  return r = parseInt(e.slice(1, 2).repeat(2), 16), o = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), c.toColor(r, o, n);
                case 5:
                  return r = parseInt(e.slice(1, 2).repeat(2), 16), o = parseInt(e.slice(2, 3).repeat(2), 16), n = parseInt(e.slice(3, 4).repeat(2), 16), a = parseInt(e.slice(4, 5).repeat(2), 16), c.toColor(r, o, n, a);
                case 7:
                  return {
                    css: e,
                    rgba: (parseInt(e.slice(1), 16) << 8 | 255) >>> 0
                  };
                case 9:
                  return {
                    css: e,
                    rgba: parseInt(e.slice(1), 16) >>> 0
                  };
              }
              const s = e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
              if (s) return r = parseInt(s[1]), o = parseInt(s[2]), n = parseInt(s[3]), a = Math.round(255 * (void 0 === s[5] ? 1 : parseFloat(s[5]))), c.toColor(r, o, n, a);
              if (!t || !i) throw new Error("css.toColor: Unsupported css format");
              if (t.fillStyle = i, t.fillStyle = e, "string" != typeof t.fillStyle) throw new Error("css.toColor: Unsupported css format");
              if (t.fillRect(0, 0, 1, 1), [r, o, n, a] = t.getImageData(0, 0, 1, 1).data, 255 !== a) throw new Error("css.toColor: Unsupported css format");
              return {
                rgba: h.toRgba(r, o, n, a),
                css: e
              };
            };
          }(t.css || (t.css = {})), function (e) {
            function t(e, t, i) {
              const s = e / 255,
                r = t / 255,
                o = i / 255;
              return .2126 * (s <= .03928 ? s / 12.92 : Math.pow((s + .055) / 1.055, 2.4)) + .7152 * (r <= .03928 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4)) + .0722 * (o <= .03928 ? o / 12.92 : Math.pow((o + .055) / 1.055, 2.4));
            }
            e.relativeLuminance = function (e) {
              return t(e >> 16 & 255, e >> 8 & 255, 255 & e);
            }, e.relativeLuminance2 = t;
          }(l = t.rgb || (t.rgb = {})), function (e) {
            function t(e, t, i) {
              const s = e >> 24 & 255,
                r = e >> 16 & 255,
                o = e >> 8 & 255;
              let n = t >> 24 & 255,
                a = t >> 16 & 255,
                h = t >> 8 & 255,
                c = _(l.relativeLuminance2(n, a, h), l.relativeLuminance2(s, r, o));
              for (; c < i && (n > 0 || a > 0 || h > 0);) n -= Math.max(0, Math.ceil(.1 * n)), a -= Math.max(0, Math.ceil(.1 * a)), h -= Math.max(0, Math.ceil(.1 * h)), c = _(l.relativeLuminance2(n, a, h), l.relativeLuminance2(s, r, o));
              return (n << 24 | a << 16 | h << 8 | 255) >>> 0;
            }
            function i(e, t, i) {
              const s = e >> 24 & 255,
                r = e >> 16 & 255,
                o = e >> 8 & 255;
              let n = t >> 24 & 255,
                a = t >> 16 & 255,
                h = t >> 8 & 255,
                c = _(l.relativeLuminance2(n, a, h), l.relativeLuminance2(s, r, o));
              for (; c < i && (n < 255 || a < 255 || h < 255);) n = Math.min(255, n + Math.ceil(.1 * (255 - n))), a = Math.min(255, a + Math.ceil(.1 * (255 - a))), h = Math.min(255, h + Math.ceil(.1 * (255 - h))), c = _(l.relativeLuminance2(n, a, h), l.relativeLuminance2(s, r, o));
              return (n << 24 | a << 16 | h << 8 | 255) >>> 0;
            }
            e.ensureContrastRatio = function (e, s, r) {
              const o = l.relativeLuminance(e >> 8),
                n = l.relativeLuminance(s >> 8);
              if (_(o, n) < r) {
                if (n < o) {
                  const n = t(e, s, r),
                    a = _(o, l.relativeLuminance(n >> 8));
                  if (a < r) {
                    const t = i(e, s, r);
                    return a > _(o, l.relativeLuminance(t >> 8)) ? n : t;
                  }
                  return n;
                }
                const a = i(e, s, r),
                  h = _(o, l.relativeLuminance(a >> 8));
                if (h < r) {
                  const i = t(e, s, r);
                  return h > _(o, l.relativeLuminance(i >> 8)) ? a : i;
                }
                return a;
              }
            }, e.reduceLuminance = t, e.increaseLuminance = i, e.toChannels = function (e) {
              return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
            }, e.toColor = function (e, t, i, s) {
              return {
                css: h.toCss(e, t, i, s),
                rgba: h.toRgba(e, t, i, s)
              };
            };
          }(c = t.rgba || (t.rgba = {})), t.toPaddedHex = d, t.contrastRatio = _;
        },
        345: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
            constructor() {
              this._listeners = [], this._disposed = !1;
            }
            get event() {
              return this._event || (this._event = e => (this._listeners.push(e), {
                dispose: () => {
                  if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
                }
              })), this._event;
            }
            fire(e, t) {
              const i = [];
              for (let e = 0; e < this._listeners.length; e++) i.push(this._listeners[e]);
              for (let s = 0; s < i.length; s++) i[s].call(void 0, e, t);
            }
            dispose() {
              this._listeners && (this._listeners.length = 0), this._disposed = !0;
            }
          }, t.forwardEvent = function (e, t) {
            return e(e => t.fire(e));
          };
        },
        859: (e, t) => {
          function i(e) {
            for (const t of e) t.dispose();
            e.length = 0;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.Disposable = void 0, t.Disposable = class {
            constructor() {
              this._disposables = [], this._isDisposed = !1;
            }
            dispose() {
              this._isDisposed = !0;
              for (const e of this._disposables) e.dispose();
              this._disposables.length = 0;
            }
            register(e) {
              return this._disposables.push(e), e;
            }
            unregister(e) {
              const t = this._disposables.indexOf(e);
              -1 !== t && this._disposables.splice(t, 1);
            }
          }, t.toDisposable = function (e) {
            return {
              dispose: e
            };
          }, t.disposeArray = i, t.getDisposeArrayDisposable = function (e) {
            return {
              dispose: () => i(e)
            };
          };
        },
        485: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.FourKeyMap = t.TwoKeyMap = void 0;
          class i {
            constructor() {
              this._data = {};
            }
            set(e, t, i) {
              this._data[e] || (this._data[e] = {}), this._data[e][t] = i;
            }
            get(e, t) {
              return this._data[e] ? this._data[e][t] : void 0;
            }
            clear() {
              this._data = {};
            }
          }
          t.TwoKeyMap = i, t.FourKeyMap = class {
            constructor() {
              this._data = new i();
            }
            set(e, t, s, r, o) {
              this._data.get(e, t) || this._data.set(e, t, new i()), this._data.get(e, t).set(s, r, o);
            }
            get(e, t, i, s) {
              var r;
              return null === (r = this._data.get(e, t)) || void 0 === r ? void 0 : r.get(i, s);
            }
            clear() {
              this._data.clear();
            }
          };
        },
        399: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.isChromeOS = t.isLinux = t.isWindows = t.isIphone = t.isIpad = t.isMac = t.getSafariVersion = t.isSafari = t.isLegacyEdge = t.isFirefox = t.isNode = void 0, t.isNode = "undefined" == typeof navigator;
          const i = t.isNode ? "node" : navigator.userAgent,
            s = t.isNode ? "node" : navigator.platform;
          t.isFirefox = i.includes("Firefox"), t.isLegacyEdge = i.includes("Edge"), t.isSafari = /^((?!chrome|android).)*safari/i.test(i), t.getSafariVersion = function () {
            if (!t.isSafari) return 0;
            const e = i.match(/Version\/(\d+)/);
            return null === e || e.length < 2 ? 0 : parseInt(e[1]);
          }, t.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(s), t.isIpad = "iPad" === s, t.isIphone = "iPhone" === s, t.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(s), t.isLinux = s.indexOf("Linux") >= 0, t.isChromeOS = /\bCrOS\b/.test(i);
        },
        385: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.DebouncedIdleTask = t.IdleTaskQueue = t.PriorityTaskQueue = void 0;
          const s = i(399);
          class r {
            constructor() {
              this._tasks = [], this._i = 0;
            }
            enqueue(e) {
              this._tasks.push(e), this._start();
            }
            flush() {
              for (; this._i < this._tasks.length;) this._tasks[this._i]() || this._i++;
              this.clear();
            }
            clear() {
              this._idleCallback && (this._cancelCallback(this._idleCallback), this._idleCallback = void 0), this._i = 0, this._tasks.length = 0;
            }
            _start() {
              this._idleCallback || (this._idleCallback = this._requestCallback(this._process.bind(this)));
            }
            _process(e) {
              this._idleCallback = void 0;
              let t = 0,
                i = 0,
                s = e.timeRemaining(),
                r = 0;
              for (; this._i < this._tasks.length;) {
                if (t = Date.now(), this._tasks[this._i]() || this._i++, t = Math.max(1, Date.now() - t), i = Math.max(t, i), r = e.timeRemaining(), 1.5 * i > r) return s - t < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s - t))}ms`), void this._start();
                s = r;
              }
              this.clear();
            }
          }
          class o extends r {
            _requestCallback(e) {
              return setTimeout(() => e(this._createDeadline(16)));
            }
            _cancelCallback(e) {
              clearTimeout(e);
            }
            _createDeadline(e) {
              const t = Date.now() + e;
              return {
                timeRemaining: () => Math.max(0, t - Date.now())
              };
            }
          }
          t.PriorityTaskQueue = o, t.IdleTaskQueue = !s.isNode && "requestIdleCallback" in window ? class extends r {
            _requestCallback(e) {
              return requestIdleCallback(e);
            }
            _cancelCallback(e) {
              cancelIdleCallback(e);
            }
          } : o, t.DebouncedIdleTask = class {
            constructor() {
              this._queue = new t.IdleTaskQueue();
            }
            set(e) {
              this._queue.clear(), this._queue.enqueue(e);
            }
            flush() {
              this._queue.flush();
            }
          };
        },
        147: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ExtendedAttrs = t.AttributeData = void 0;
          class i {
            constructor() {
              this.fg = 0, this.bg = 0, this.extended = new s();
            }
            static toColorRGB(e) {
              return [e >>> 16 & 255, e >>> 8 & 255, 255 & e];
            }
            static fromColorRGB(e) {
              return (255 & e[0]) << 16 | (255 & e[1]) << 8 | 255 & e[2];
            }
            clone() {
              const e = new i();
              return e.fg = this.fg, e.bg = this.bg, e.extended = this.extended.clone(), e;
            }
            isInverse() {
              return 67108864 & this.fg;
            }
            isBold() {
              return 134217728 & this.fg;
            }
            isUnderline() {
              return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 1 : 268435456 & this.fg;
            }
            isBlink() {
              return 536870912 & this.fg;
            }
            isInvisible() {
              return 1073741824 & this.fg;
            }
            isItalic() {
              return 67108864 & this.bg;
            }
            isDim() {
              return 134217728 & this.bg;
            }
            isStrikethrough() {
              return 2147483648 & this.fg;
            }
            isProtected() {
              return 536870912 & this.bg;
            }
            getFgColorMode() {
              return 50331648 & this.fg;
            }
            getBgColorMode() {
              return 50331648 & this.bg;
            }
            isFgRGB() {
              return 50331648 == (50331648 & this.fg);
            }
            isBgRGB() {
              return 50331648 == (50331648 & this.bg);
            }
            isFgPalette() {
              return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
            }
            isBgPalette() {
              return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
            }
            isFgDefault() {
              return 0 == (50331648 & this.fg);
            }
            isBgDefault() {
              return 0 == (50331648 & this.bg);
            }
            isAttributeDefault() {
              return 0 === this.fg && 0 === this.bg;
            }
            getFgColor() {
              switch (50331648 & this.fg) {
                case 16777216:
                case 33554432:
                  return 255 & this.fg;
                case 50331648:
                  return 16777215 & this.fg;
                default:
                  return -1;
              }
            }
            getBgColor() {
              switch (50331648 & this.bg) {
                case 16777216:
                case 33554432:
                  return 255 & this.bg;
                case 50331648:
                  return 16777215 & this.bg;
                default:
                  return -1;
              }
            }
            hasExtendedAttrs() {
              return 268435456 & this.bg;
            }
            updateExtended() {
              this.extended.isEmpty() ? this.bg &= -268435457 : this.bg |= 268435456;
            }
            getUnderlineColor() {
              if (268435456 & this.bg && ~this.extended.underlineColor) switch (50331648 & this.extended.underlineColor) {
                case 16777216:
                case 33554432:
                  return 255 & this.extended.underlineColor;
                case 50331648:
                  return 16777215 & this.extended.underlineColor;
                default:
                  return this.getFgColor();
              }
              return this.getFgColor();
            }
            getUnderlineColorMode() {
              return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 & this.extended.underlineColor : this.getFgColorMode();
            }
            isUnderlineColorRGB() {
              return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
            }
            isUnderlineColorPalette() {
              return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
            }
            isUnderlineColorDefault() {
              return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
            }
            getUnderlineStyle() {
              return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
            }
          }
          t.AttributeData = i;
          class s {
            constructor(e = 0, t = 0) {
              this._ext = 0, this._urlId = 0, this._ext = e, this._urlId = t;
            }
            get ext() {
              return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
            }
            set ext(e) {
              this._ext = e;
            }
            get underlineStyle() {
              return this._urlId ? 5 : (469762048 & this._ext) >> 26;
            }
            set underlineStyle(e) {
              this._ext &= -469762049, this._ext |= e << 26 & 469762048;
            }
            get underlineColor() {
              return 67108863 & this._ext;
            }
            set underlineColor(e) {
              this._ext &= -67108864, this._ext |= 67108863 & e;
            }
            get urlId() {
              return this._urlId;
            }
            set urlId(e) {
              this._urlId = e;
            }
            clone() {
              return new s(this._ext, this._urlId);
            }
            isEmpty() {
              return 0 === this.underlineStyle && 0 === this._urlId;
            }
          }
          t.ExtendedAttrs = s;
        },
        782: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CellData = void 0;
          const s = i(133),
            r = i(855),
            o = i(147);
          class n extends o.AttributeData {
            constructor() {
              super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new o.ExtendedAttrs(), this.combinedData = "";
            }
            static fromCharData(e) {
              const t = new n();
              return t.setFromCharData(e), t;
            }
            isCombined() {
              return 2097152 & this.content;
            }
            getWidth() {
              return this.content >> 22;
            }
            getChars() {
              return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s.stringFromCodePoint)(2097151 & this.content) : "";
            }
            getCode() {
              return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
            }
            setFromCharData(e) {
              this.fg = e[r.CHAR_DATA_ATTR_INDEX], this.bg = 0;
              let t = !1;
              if (e[r.CHAR_DATA_CHAR_INDEX].length > 2) t = !0;else if (2 === e[r.CHAR_DATA_CHAR_INDEX].length) {
                const i = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
                if (55296 <= i && i <= 56319) {
                  const s = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
                  56320 <= s && s <= 57343 ? this.content = 1024 * (i - 55296) + s - 56320 + 65536 | e[r.CHAR_DATA_WIDTH_INDEX] << 22 : t = !0;
                } else t = !0;
              } else this.content = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e[r.CHAR_DATA_WIDTH_INDEX] << 22;
              t && (this.combinedData = e[r.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e[r.CHAR_DATA_WIDTH_INDEX] << 22);
            }
            getAsCharData() {
              return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
            }
          }
          t.CellData = n;
        },
        855: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.WHITESPACE_CELL_CODE = t.WHITESPACE_CELL_WIDTH = t.WHITESPACE_CELL_CHAR = t.NULL_CELL_CODE = t.NULL_CELL_WIDTH = t.NULL_CELL_CHAR = t.CHAR_DATA_CODE_INDEX = t.CHAR_DATA_WIDTH_INDEX = t.CHAR_DATA_CHAR_INDEX = t.CHAR_DATA_ATTR_INDEX = t.DEFAULT_EXT = t.DEFAULT_ATTR = t.DEFAULT_COLOR = void 0, t.DEFAULT_COLOR = 0, t.DEFAULT_ATTR = 256 | t.DEFAULT_COLOR << 9, t.DEFAULT_EXT = 0, t.CHAR_DATA_ATTR_INDEX = 0, t.CHAR_DATA_CHAR_INDEX = 1, t.CHAR_DATA_WIDTH_INDEX = 2, t.CHAR_DATA_CODE_INDEX = 3, t.NULL_CELL_CHAR = "", t.NULL_CELL_WIDTH = 1, t.NULL_CELL_CODE = 0, t.WHITESPACE_CELL_CHAR = " ", t.WHITESPACE_CELL_WIDTH = 1, t.WHITESPACE_CELL_CODE = 32;
        },
        133: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.Utf8ToUtf32 = t.StringToUtf32 = t.utf32ToString = t.stringFromCodePoint = void 0, t.stringFromCodePoint = function (e) {
            return e > 65535 ? (e -= 65536, String.fromCharCode(55296 + (e >> 10)) + String.fromCharCode(e % 1024 + 56320)) : String.fromCharCode(e);
          }, t.utf32ToString = function (e, t = 0, i = e.length) {
            let s = "";
            for (let r = t; r < i; ++r) {
              let t = e[r];
              t > 65535 ? (t -= 65536, s += String.fromCharCode(55296 + (t >> 10)) + String.fromCharCode(t % 1024 + 56320)) : s += String.fromCharCode(t);
            }
            return s;
          }, t.StringToUtf32 = class {
            constructor() {
              this._interim = 0;
            }
            clear() {
              this._interim = 0;
            }
            decode(e, t) {
              const i = e.length;
              if (!i) return 0;
              let s = 0,
                r = 0;
              if (this._interim) {
                const i = e.charCodeAt(r++);
                56320 <= i && i <= 57343 ? t[s++] = 1024 * (this._interim - 55296) + i - 56320 + 65536 : (t[s++] = this._interim, t[s++] = i), this._interim = 0;
              }
              for (let o = r; o < i; ++o) {
                const r = e.charCodeAt(o);
                if (55296 <= r && r <= 56319) {
                  if (++o >= i) return this._interim = r, s;
                  const n = e.charCodeAt(o);
                  56320 <= n && n <= 57343 ? t[s++] = 1024 * (r - 55296) + n - 56320 + 65536 : (t[s++] = r, t[s++] = n);
                } else 65279 !== r && (t[s++] = r);
              }
              return s;
            }
          }, t.Utf8ToUtf32 = class {
            constructor() {
              this.interim = new Uint8Array(3);
            }
            clear() {
              this.interim.fill(0);
            }
            decode(e, t) {
              const i = e.length;
              if (!i) return 0;
              let s,
                r,
                o,
                n,
                a = 0,
                h = 0,
                l = 0;
              if (this.interim[0]) {
                let s = !1,
                  r = this.interim[0];
                r &= 192 == (224 & r) ? 31 : 224 == (240 & r) ? 15 : 7;
                let o,
                  n = 0;
                for (; (o = 63 & this.interim[++n]) && n < 4;) r <<= 6, r |= o;
                const h = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4,
                  c = h - n;
                for (; l < c;) {
                  if (l >= i) return 0;
                  if (o = e[l++], 128 != (192 & o)) {
                    l--, s = !0;
                    break;
                  }
                  this.interim[n++] = o, r <<= 6, r |= 63 & o;
                }
                s || (2 === h ? r < 128 ? l-- : t[a++] = r : 3 === h ? r < 2048 || r >= 55296 && r <= 57343 || 65279 === r || (t[a++] = r) : r < 65536 || r > 1114111 || (t[a++] = r)), this.interim.fill(0);
              }
              const c = i - 4;
              let d = l;
              for (; d < i;) {
                for (; !(!(d < c) || 128 & (s = e[d]) || 128 & (r = e[d + 1]) || 128 & (o = e[d + 2]) || 128 & (n = e[d + 3]));) t[a++] = s, t[a++] = r, t[a++] = o, t[a++] = n, d += 4;
                if (s = e[d++], s < 128) t[a++] = s;else if (192 == (224 & s)) {
                  if (d >= i) return this.interim[0] = s, a;
                  if (r = e[d++], 128 != (192 & r)) {
                    d--;
                    continue;
                  }
                  if (h = (31 & s) << 6 | 63 & r, h < 128) {
                    d--;
                    continue;
                  }
                  t[a++] = h;
                } else if (224 == (240 & s)) {
                  if (d >= i) return this.interim[0] = s, a;
                  if (r = e[d++], 128 != (192 & r)) {
                    d--;
                    continue;
                  }
                  if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                  if (o = e[d++], 128 != (192 & o)) {
                    d--;
                    continue;
                  }
                  if (h = (15 & s) << 12 | (63 & r) << 6 | 63 & o, h < 2048 || h >= 55296 && h <= 57343 || 65279 === h) continue;
                  t[a++] = h;
                } else if (240 == (248 & s)) {
                  if (d >= i) return this.interim[0] = s, a;
                  if (r = e[d++], 128 != (192 & r)) {
                    d--;
                    continue;
                  }
                  if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                  if (o = e[d++], 128 != (192 & o)) {
                    d--;
                    continue;
                  }
                  if (d >= i) return this.interim[0] = s, this.interim[1] = r, this.interim[2] = o, a;
                  if (n = e[d++], 128 != (192 & n)) {
                    d--;
                    continue;
                  }
                  if (h = (7 & s) << 18 | (63 & r) << 12 | (63 & o) << 6 | 63 & n, h < 65536 || h > 1114111) continue;
                  t[a++] = h;
                }
              }
              return a;
            }
          };
        }
      },
      t = {};
    function i(s) {
      var r = t[s];
      if (void 0 !== r) return r.exports;
      var o = t[s] = {
        exports: {}
      };
      return e[s](o, o.exports, i), o.exports;
    }
    var s = {};
    return (() => {
      var e = s;
      Object.defineProperty(e, "__esModule", {
        value: !0
      }), e.WebglAddon = void 0;
      const t = i(345),
        r = i(859),
        o = i(399),
        n = i(666);
      class a extends r.Disposable {
        constructor(e) {
          if (o.isSafari && (0, o.getSafariVersion)() < 16) throw new Error("Webgl2 is only supported on Safari 16 and above");
          super(), this._preserveDrawingBuffer = e, this._onChangeTextureAtlas = this.register(new t.EventEmitter()), this.onChangeTextureAtlas = this._onChangeTextureAtlas.event, this._onAddTextureAtlasCanvas = this.register(new t.EventEmitter()), this.onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event, this._onRemoveTextureAtlasCanvas = this.register(new t.EventEmitter()), this.onRemoveTextureAtlasCanvas = this._onRemoveTextureAtlasCanvas.event, this._onContextLoss = this.register(new t.EventEmitter()), this.onContextLoss = this._onContextLoss.event;
        }
        activate(e) {
          const i = e._core;
          if (!e.element) return void this.register(i.onWillOpen(() => this.activate(e)));
          this._terminal = e;
          const s = i.coreService,
            o = i.optionsService,
            a = i,
            h = a._renderService,
            l = a._characterJoinerService,
            c = a._charSizeService,
            d = a._coreBrowserService,
            _ = a._decorationService,
            u = a._themeService;
          this._renderer = this.register(new n.WebglRenderer(e, l, c, d, s, _, o, u, this._preserveDrawingBuffer)), this.register((0, t.forwardEvent)(this._renderer.onContextLoss, this._onContextLoss)), this.register((0, t.forwardEvent)(this._renderer.onChangeTextureAtlas, this._onChangeTextureAtlas)), this.register((0, t.forwardEvent)(this._renderer.onAddTextureAtlasCanvas, this._onAddTextureAtlasCanvas)), this.register((0, t.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas, this._onRemoveTextureAtlasCanvas)), h.setRenderer(this._renderer), this.register((0, r.toDisposable)(() => {
            const t = this._terminal._core._renderService;
            t.setRenderer(this._terminal._core._createRenderer()), t.handleResize(e.cols, e.rows);
          }));
        }
        get textureAtlas() {
          var e;
          return null === (e = this._renderer) || void 0 === e ? void 0 : e.textureAtlas;
        }
        clearTextureAtlas() {
          var e;
          null === (e = this._renderer) || void 0 === e || e.clearTextureAtlas();
        }
      }
      e.WebglAddon = a;
    })(), s;
  })();
});

/***/ }),

/***/ 6333:
/*!*****************************************!*\
  !*** ./node_modules/xterm/lib/xterm.js ***!
  \*****************************************/
/***/ ((module) => {

!function (e, t) {
  if (true) module.exports = t();else { var s, i; }
}(self, function () {
  return (() => {
    "use strict";

    var e = {
        4567: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.AccessibilityManager = void 0;
          const s = i(9042),
            r = i(6114),
            n = i(9924),
            o = i(3656),
            a = i(844),
            h = i(5596),
            c = i(9631);
          class l extends a.Disposable {
            constructor(e, t) {
              super(), this._terminal = e, this._renderService = t, this._liveRegionLineCount = 0, this._charsToConsume = [], this._charsToAnnounce = "", this._accessibilityTreeRoot = document.createElement("div"), this._accessibilityTreeRoot.classList.add("xterm-accessibility"), this._accessibilityTreeRoot.tabIndex = 0, this._rowContainer = document.createElement("div"), this._rowContainer.setAttribute("role", "list"), this._rowContainer.classList.add("xterm-accessibility-tree"), this._rowElements = [];
              for (let e = 0; e < this._terminal.rows; e++) this._rowElements[e] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[e]);
              if (this._topBoundaryFocusListener = e => this._handleBoundaryFocus(e, 0), this._bottomBoundaryFocusListener = e => this._handleBoundaryFocus(e, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions(), this._accessibilityTreeRoot.appendChild(this._rowContainer), this._renderRowsDebouncer = new n.TimeBasedDebouncer(this._renderRows.bind(this)), this._refreshRows(), this._liveRegion = document.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityTreeRoot.appendChild(this._liveRegion), !this._terminal.element) throw new Error("Cannot enable accessibility before Terminal.open");
              this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityTreeRoot), this.register(this._renderRowsDebouncer), this.register(this._terminal.onResize(e => this._handleResize(e.rows))), this.register(this._terminal.onRender(e => this._refreshRows(e.start, e.end))), this.register(this._terminal.onScroll(() => this._refreshRows())), this.register(this._terminal.onA11yChar(e => this._handleChar(e))), this.register(this._terminal.onLineFeed(() => this._handleChar("\n"))), this.register(this._terminal.onA11yTab(e => this._handleTab(e))), this.register(this._terminal.onKey(e => this._handleKey(e.key))), this.register(this._terminal.onBlur(() => this._clearLiveRegion())), this.register(this._renderService.onDimensionsChange(() => this._refreshRowsDimensions())), this._screenDprMonitor = new h.ScreenDprMonitor(window), this.register(this._screenDprMonitor), this._screenDprMonitor.setListener(() => this._refreshRowsDimensions()), this.register((0, o.addDisposableDomListener)(window, "resize", () => this._refreshRowsDimensions())), this.register((0, a.toDisposable)(() => {
                (0, c.removeElementFromParent)(this._accessibilityTreeRoot), this._rowElements.length = 0;
              }));
            }
            _handleBoundaryFocus(e, t) {
              const i = e.target,
                s = this._rowElements[0 === t ? 1 : this._rowElements.length - 2];
              if (i.getAttribute("aria-posinset") === (0 === t ? "1" : `${this._terminal.buffer.lines.length}`)) return;
              if (e.relatedTarget !== s) return;
              let r, n;
              if (0 === t ? (r = i, n = this._rowElements.pop(), this._rowContainer.removeChild(n)) : (r = this._rowElements.shift(), n = i, this._rowContainer.removeChild(r)), r.removeEventListener("focus", this._topBoundaryFocusListener), n.removeEventListener("focus", this._bottomBoundaryFocusListener), 0 === t) {
                const e = this._createAccessibilityTreeNode();
                this._rowElements.unshift(e), this._rowContainer.insertAdjacentElement("afterbegin", e);
              } else {
                const e = this._createAccessibilityTreeNode();
                this._rowElements.push(e), this._rowContainer.appendChild(e);
              }
              this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._terminal.scrollLines(0 === t ? -1 : 1), this._rowElements[0 === t ? 1 : this._rowElements.length - 2].focus(), e.preventDefault(), e.stopImmediatePropagation();
            }
            _handleResize(e) {
              this._rowElements[this._rowElements.length - 1].removeEventListener("focus", this._bottomBoundaryFocusListener);
              for (let e = this._rowContainer.children.length; e < this._terminal.rows; e++) this._rowElements[e] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[e]);
              for (; this._rowElements.length > e;) this._rowContainer.removeChild(this._rowElements.pop());
              this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions();
            }
            _createAccessibilityTreeNode() {
              const e = document.createElement("div");
              return e.setAttribute("role", "listitem"), e.tabIndex = -1, this._refreshRowDimensions(e), e;
            }
            _handleTab(e) {
              for (let t = 0; t < e; t++) this._handleChar(" ");
            }
            _handleChar(e) {
              this._liveRegionLineCount < 21 && (this._charsToConsume.length > 0 ? this._charsToConsume.shift() !== e && (this._charsToAnnounce += e) : this._charsToAnnounce += e, "\n" === e && (this._liveRegionLineCount++, 21 === this._liveRegionLineCount && (this._liveRegion.textContent += s.tooMuchOutput)), r.isMac && this._liveRegion.textContent && this._liveRegion.textContent.length > 0 && !this._liveRegion.parentNode && setTimeout(() => {
                this._accessibilityTreeRoot.appendChild(this._liveRegion);
              }, 0));
            }
            _clearLiveRegion() {
              this._liveRegion.textContent = "", this._liveRegionLineCount = 0, r.isMac && (0, c.removeElementFromParent)(this._liveRegion);
            }
            _handleKey(e) {
              this._clearLiveRegion(), /\p{Control}/u.test(e) || this._charsToConsume.push(e);
            }
            _refreshRows(e, t) {
              this._renderRowsDebouncer.refresh(e, t, this._terminal.rows);
            }
            _renderRows(e, t) {
              const i = this._terminal.buffer,
                s = i.lines.length.toString();
              for (let r = e; r <= t; r++) {
                const e = i.translateBufferLineToString(i.ydisp + r, !0),
                  t = (i.ydisp + r + 1).toString(),
                  n = this._rowElements[r];
                n && (0 === e.length ? n.innerText = " " : n.textContent = e, n.setAttribute("aria-posinset", t), n.setAttribute("aria-setsize", s));
              }
              this._announceCharacters();
            }
            _refreshRowsDimensions() {
              if (this._renderService.dimensions.css.cell.height) {
                this._accessibilityTreeRoot.style.width = `${this._renderService.dimensions.css.canvas.width}px`, this._rowElements.length !== this._terminal.rows && this._handleResize(this._terminal.rows);
                for (let e = 0; e < this._terminal.rows; e++) this._refreshRowDimensions(this._rowElements[e]);
              }
            }
            _refreshRowDimensions(e) {
              e.style.height = `${this._renderService.dimensions.css.cell.height}px`;
            }
            _announceCharacters() {
              0 !== this._charsToAnnounce.length && (this._liveRegion.textContent += this._charsToAnnounce, this._charsToAnnounce = "");
            }
          }
          t.AccessibilityManager = l;
        },
        3614: (e, t) => {
          function i(e) {
            return e.replace(/\r?\n/g, "\r");
          }
          function s(e, t) {
            return t ? "[200~" + e + "[201~" : e;
          }
          function r(e, t, r) {
            e = s(e = i(e), r.decPrivateModes.bracketedPasteMode), r.triggerDataEvent(e, !0), t.value = "";
          }
          function n(e, t, i) {
            const s = i.getBoundingClientRect(),
              r = e.clientX - s.left - 10,
              n = e.clientY - s.top - 10;
            t.style.width = "20px", t.style.height = "20px", t.style.left = `${r}px`, t.style.top = `${n}px`, t.style.zIndex = "1000", t.focus();
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.rightClickHandler = t.moveTextAreaUnderMouseCursor = t.paste = t.handlePasteEvent = t.copyHandler = t.bracketTextForPaste = t.prepareTextForTerminal = void 0, t.prepareTextForTerminal = i, t.bracketTextForPaste = s, t.copyHandler = function (e, t) {
            e.clipboardData && e.clipboardData.setData("text/plain", t.selectionText), e.preventDefault();
          }, t.handlePasteEvent = function (e, t, i) {
            e.stopPropagation(), e.clipboardData && r(e.clipboardData.getData("text/plain"), t, i);
          }, t.paste = r, t.moveTextAreaUnderMouseCursor = n, t.rightClickHandler = function (e, t, i, s, r) {
            n(e, t, i), r && s.rightClickSelect(e), t.value = s.selectionText, t.select();
          };
        },
        7239: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ColorContrastCache = void 0;
          const s = i(1505);
          t.ColorContrastCache = class {
            constructor() {
              this._color = new s.TwoKeyMap(), this._css = new s.TwoKeyMap();
            }
            setCss(e, t, i) {
              this._css.set(e, t, i);
            }
            getCss(e, t) {
              return this._css.get(e, t);
            }
            setColor(e, t, i) {
              this._color.set(e, t, i);
            }
            getColor(e, t) {
              return this._color.get(e, t);
            }
            clear() {
              this._color.clear(), this._css.clear();
            }
          };
        },
        9631: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.removeElementFromParent = void 0, t.removeElementFromParent = function (...e) {
            var t;
            for (const i of e) null === (t = null == i ? void 0 : i.parentElement) || void 0 === t || t.removeChild(i);
          };
        },
        3656: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.addDisposableDomListener = void 0, t.addDisposableDomListener = function (e, t, i, s) {
            e.addEventListener(t, i, s);
            let r = !1;
            return {
              dispose: () => {
                r || (r = !0, e.removeEventListener(t, i, s));
              }
            };
          };
        },
        6465: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.Linkifier2 = void 0;
          const n = i(2585),
            o = i(8460),
            a = i(844),
            h = i(3656);
          let c = class extends a.Disposable {
            constructor(e) {
              super(), this._bufferService = e, this._linkProviders = [], this._linkCacheDisposables = [], this._isMouseOut = !0, this._activeLine = -1, this._onShowLinkUnderline = this.register(new o.EventEmitter()), this.onShowLinkUnderline = this._onShowLinkUnderline.event, this._onHideLinkUnderline = this.register(new o.EventEmitter()), this.onHideLinkUnderline = this._onHideLinkUnderline.event, this.register((0, a.getDisposeArrayDisposable)(this._linkCacheDisposables)), this.register((0, a.toDisposable)(() => {
                this._lastMouseEvent = void 0;
              }));
            }
            get currentLink() {
              return this._currentLink;
            }
            registerLinkProvider(e) {
              return this._linkProviders.push(e), {
                dispose: () => {
                  const t = this._linkProviders.indexOf(e);
                  -1 !== t && this._linkProviders.splice(t, 1);
                }
              };
            }
            attachToDom(e, t, i) {
              this._element = e, this._mouseService = t, this._renderService = i, this.register((0, h.addDisposableDomListener)(this._element, "mouseleave", () => {
                this._isMouseOut = !0, this._clearCurrentLink();
              })), this.register((0, h.addDisposableDomListener)(this._element, "mousemove", this._handleMouseMove.bind(this))), this.register((0, h.addDisposableDomListener)(this._element, "mousedown", this._handleMouseDown.bind(this))), this.register((0, h.addDisposableDomListener)(this._element, "mouseup", this._handleMouseUp.bind(this)));
            }
            _handleMouseMove(e) {
              if (this._lastMouseEvent = e, !this._element || !this._mouseService) return;
              const t = this._positionFromMouseEvent(e, this._element, this._mouseService);
              if (!t) return;
              this._isMouseOut = !1;
              const i = e.composedPath();
              for (let e = 0; e < i.length; e++) {
                const t = i[e];
                if (t.classList.contains("xterm")) break;
                if (t.classList.contains("xterm-hover")) return;
              }
              this._lastBufferCell && t.x === this._lastBufferCell.x && t.y === this._lastBufferCell.y || (this._handleHover(t), this._lastBufferCell = t);
            }
            _handleHover(e) {
              if (this._activeLine !== e.y) return this._clearCurrentLink(), void this._askForLink(e, !1);
              this._currentLink && this._linkAtPosition(this._currentLink.link, e) || (this._clearCurrentLink(), this._askForLink(e, !0));
            }
            _askForLink(e, t) {
              var i, s;
              this._activeProviderReplies && t || (null === (i = this._activeProviderReplies) || void 0 === i || i.forEach(e => {
                null == e || e.forEach(e => {
                  e.link.dispose && e.link.dispose();
                });
              }), this._activeProviderReplies = new Map(), this._activeLine = e.y);
              let r = !1;
              for (const [i, n] of this._linkProviders.entries()) t ? (null === (s = this._activeProviderReplies) || void 0 === s ? void 0 : s.get(i)) && (r = this._checkLinkProviderResult(i, e, r)) : n.provideLinks(e.y, t => {
                var s, n;
                if (this._isMouseOut) return;
                const o = null == t ? void 0 : t.map(e => ({
                  link: e
                }));
                null === (s = this._activeProviderReplies) || void 0 === s || s.set(i, o), r = this._checkLinkProviderResult(i, e, r), (null === (n = this._activeProviderReplies) || void 0 === n ? void 0 : n.size) === this._linkProviders.length && this._removeIntersectingLinks(e.y, this._activeProviderReplies);
              });
            }
            _removeIntersectingLinks(e, t) {
              const i = new Set();
              for (let s = 0; s < t.size; s++) {
                const r = t.get(s);
                if (r) for (let t = 0; t < r.length; t++) {
                  const s = r[t],
                    n = s.link.range.start.y < e ? 0 : s.link.range.start.x,
                    o = s.link.range.end.y > e ? this._bufferService.cols : s.link.range.end.x;
                  for (let e = n; e <= o; e++) {
                    if (i.has(e)) {
                      r.splice(t--, 1);
                      break;
                    }
                    i.add(e);
                  }
                }
              }
            }
            _checkLinkProviderResult(e, t, i) {
              var s;
              if (!this._activeProviderReplies) return i;
              const r = this._activeProviderReplies.get(e);
              let n = !1;
              for (let t = 0; t < e; t++) this._activeProviderReplies.has(t) && !this._activeProviderReplies.get(t) || (n = !0);
              if (!n && r) {
                const e = r.find(e => this._linkAtPosition(e.link, t));
                e && (i = !0, this._handleNewLink(e));
              }
              if (this._activeProviderReplies.size === this._linkProviders.length && !i) for (let e = 0; e < this._activeProviderReplies.size; e++) {
                const r = null === (s = this._activeProviderReplies.get(e)) || void 0 === s ? void 0 : s.find(e => this._linkAtPosition(e.link, t));
                if (r) {
                  i = !0, this._handleNewLink(r);
                  break;
                }
              }
              return i;
            }
            _handleMouseDown() {
              this._mouseDownLink = this._currentLink;
            }
            _handleMouseUp(e) {
              if (!this._element || !this._mouseService || !this._currentLink) return;
              const t = this._positionFromMouseEvent(e, this._element, this._mouseService);
              t && this._mouseDownLink === this._currentLink && this._linkAtPosition(this._currentLink.link, t) && this._currentLink.link.activate(e, this._currentLink.link.text);
            }
            _clearCurrentLink(e, t) {
              this._element && this._currentLink && this._lastMouseEvent && (!e || !t || this._currentLink.link.range.start.y >= e && this._currentLink.link.range.end.y <= t) && (this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent), this._currentLink = void 0, (0, a.disposeArray)(this._linkCacheDisposables));
            }
            _handleNewLink(e) {
              if (!this._element || !this._lastMouseEvent || !this._mouseService) return;
              const t = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
              t && this._linkAtPosition(e.link, t) && (this._currentLink = e, this._currentLink.state = {
                decorations: {
                  underline: void 0 === e.link.decorations || e.link.decorations.underline,
                  pointerCursor: void 0 === e.link.decorations || e.link.decorations.pointerCursor
                },
                isHovered: !0
              }, this._linkHover(this._element, e.link, this._lastMouseEvent), e.link.decorations = {}, Object.defineProperties(e.link.decorations, {
                pointerCursor: {
                  get: () => {
                    var e, t;
                    return null === (t = null === (e = this._currentLink) || void 0 === e ? void 0 : e.state) || void 0 === t ? void 0 : t.decorations.pointerCursor;
                  },
                  set: e => {
                    var t, i;
                    (null === (t = this._currentLink) || void 0 === t ? void 0 : t.state) && this._currentLink.state.decorations.pointerCursor !== e && (this._currentLink.state.decorations.pointerCursor = e, this._currentLink.state.isHovered && (null === (i = this._element) || void 0 === i || i.classList.toggle("xterm-cursor-pointer", e)));
                  }
                },
                underline: {
                  get: () => {
                    var e, t;
                    return null === (t = null === (e = this._currentLink) || void 0 === e ? void 0 : e.state) || void 0 === t ? void 0 : t.decorations.underline;
                  },
                  set: t => {
                    var i, s, r;
                    (null === (i = this._currentLink) || void 0 === i ? void 0 : i.state) && (null === (r = null === (s = this._currentLink) || void 0 === s ? void 0 : s.state) || void 0 === r ? void 0 : r.decorations.underline) !== t && (this._currentLink.state.decorations.underline = t, this._currentLink.state.isHovered && this._fireUnderlineEvent(e.link, t));
                  }
                }
              }), this._renderService && this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e => {
                const t = 0 === e.start ? 0 : e.start + 1 + this._bufferService.buffer.ydisp,
                  i = this._currentLink ? this._lastMouseEvent : void 0;
                if (this._clearCurrentLink(t, e.end + 1 + this._bufferService.buffer.ydisp), i && this._element) {
                  const e = this._positionFromMouseEvent(i, this._element, this._mouseService);
                  e && this._askForLink(e, !1);
                }
              })));
            }
            _linkHover(e, t, i) {
              var s;
              (null === (s = this._currentLink) || void 0 === s ? void 0 : s.state) && (this._currentLink.state.isHovered = !0, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t, !0), this._currentLink.state.decorations.pointerCursor && e.classList.add("xterm-cursor-pointer")), t.hover && t.hover(i, t.text);
            }
            _fireUnderlineEvent(e, t) {
              const i = e.range,
                s = this._bufferService.buffer.ydisp,
                r = this._createLinkUnderlineEvent(i.start.x - 1, i.start.y - s - 1, i.end.x, i.end.y - s - 1, void 0);
              (t ? this._onShowLinkUnderline : this._onHideLinkUnderline).fire(r);
            }
            _linkLeave(e, t, i) {
              var s;
              (null === (s = this._currentLink) || void 0 === s ? void 0 : s.state) && (this._currentLink.state.isHovered = !1, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(t, !1), this._currentLink.state.decorations.pointerCursor && e.classList.remove("xterm-cursor-pointer")), t.leave && t.leave(i, t.text);
            }
            _linkAtPosition(e, t) {
              const i = e.range.start.y * this._bufferService.cols + e.range.start.x,
                s = e.range.end.y * this._bufferService.cols + e.range.end.x,
                r = t.y * this._bufferService.cols + t.x;
              return i <= r && r <= s;
            }
            _positionFromMouseEvent(e, t, i) {
              const s = i.getCoords(e, t, this._bufferService.cols, this._bufferService.rows);
              if (s) return {
                x: s[0],
                y: s[1] + this._bufferService.buffer.ydisp
              };
            }
            _createLinkUnderlineEvent(e, t, i, s, r) {
              return {
                x1: e,
                y1: t,
                x2: i,
                y2: s,
                cols: this._bufferService.cols,
                fg: r
              };
            }
          };
          c = s([r(0, n.IBufferService)], c), t.Linkifier2 = c;
        },
        9042: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.tooMuchOutput = t.promptLabel = void 0, t.promptLabel = "Terminal input", t.tooMuchOutput = "Too much output to announce, navigate to rows manually to read";
        },
        3730: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.OscLinkProvider = void 0;
          const n = i(511),
            o = i(2585);
          let a = class {
            constructor(e, t, i) {
              this._bufferService = e, this._optionsService = t, this._oscLinkService = i;
            }
            provideLinks(e, t) {
              var i;
              const s = this._bufferService.buffer.lines.get(e - 1);
              if (!s) return void t(void 0);
              const r = [],
                o = this._optionsService.rawOptions.linkHandler,
                a = new n.CellData(),
                c = s.getTrimmedLength();
              let l = -1,
                d = -1,
                _ = !1;
              for (let t = 0; t < c; t++) if (-1 !== d || s.hasContent(t)) {
                if (s.loadCell(t, a), a.hasExtendedAttrs() && a.extended.urlId) {
                  if (-1 === d) {
                    d = t, l = a.extended.urlId;
                    continue;
                  }
                  _ = a.extended.urlId !== l;
                } else -1 !== d && (_ = !0);
                if (_ || -1 !== d && t === c - 1) {
                  const s = null === (i = this._oscLinkService.getLinkData(l)) || void 0 === i ? void 0 : i.uri;
                  if (s) {
                    const i = {
                      start: {
                        x: d + 1,
                        y: e
                      },
                      end: {
                        x: t + (_ || t !== c - 1 ? 0 : 1),
                        y: e
                      }
                    };
                    let n = !1;
                    if (!(null == o ? void 0 : o.allowNonHttpProtocols)) try {
                      const e = new URL(s);
                      ["http:", "https:"].includes(e.protocol) || (n = !0);
                    } catch (e) {
                      n = !0;
                    }
                    n || r.push({
                      text: s,
                      range: i,
                      activate: (e, t) => o ? o.activate(e, t, i) : h(0, t),
                      hover: (e, t) => {
                        var s;
                        return null === (s = null == o ? void 0 : o.hover) || void 0 === s ? void 0 : s.call(o, e, t, i);
                      },
                      leave: (e, t) => {
                        var s;
                        return null === (s = null == o ? void 0 : o.leave) || void 0 === s ? void 0 : s.call(o, e, t, i);
                      }
                    });
                  }
                  _ = !1, a.hasExtendedAttrs() && a.extended.urlId ? (d = t, l = a.extended.urlId) : (d = -1, l = -1);
                }
              }
              t(r);
            }
          };
          function h(e, t) {
            if (confirm(`Do you want to navigate to ${t}?\n\nWARNING: This link could potentially be dangerous`)) {
              const e = window.open();
              if (e) {
                try {
                  e.opener = null;
                } catch (e) {}
                e.location.href = t;
              } else console.warn("Opening link blocked as opener could not be cleared");
            }
          }
          a = s([r(0, o.IBufferService), r(1, o.IOptionsService), r(2, o.IOscLinkService)], a), t.OscLinkProvider = a;
        },
        6193: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.RenderDebouncer = void 0, t.RenderDebouncer = class {
            constructor(e, t) {
              this._parentWindow = e, this._renderCallback = t, this._refreshCallbacks = [];
            }
            dispose() {
              this._animationFrame && (this._parentWindow.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
            }
            addRefreshCallback(e) {
              return this._refreshCallbacks.push(e), this._animationFrame || (this._animationFrame = this._parentWindow.requestAnimationFrame(() => this._innerRefresh())), this._animationFrame;
            }
            refresh(e, t, i) {
              this._rowCount = i, e = void 0 !== e ? e : 0, t = void 0 !== t ? t : this._rowCount - 1, this._rowStart = void 0 !== this._rowStart ? Math.min(this._rowStart, e) : e, this._rowEnd = void 0 !== this._rowEnd ? Math.max(this._rowEnd, t) : t, this._animationFrame || (this._animationFrame = this._parentWindow.requestAnimationFrame(() => this._innerRefresh()));
            }
            _innerRefresh() {
              if (this._animationFrame = void 0, void 0 === this._rowStart || void 0 === this._rowEnd || void 0 === this._rowCount) return void this._runRefreshCallbacks();
              const e = Math.max(this._rowStart, 0),
                t = Math.min(this._rowEnd, this._rowCount - 1);
              this._rowStart = void 0, this._rowEnd = void 0, this._renderCallback(e, t), this._runRefreshCallbacks();
            }
            _runRefreshCallbacks() {
              for (const e of this._refreshCallbacks) e(0);
              this._refreshCallbacks = [];
            }
          };
        },
        5596: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ScreenDprMonitor = void 0;
          const s = i(844);
          class r extends s.Disposable {
            constructor(e) {
              super(), this._parentWindow = e, this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this.register((0, s.toDisposable)(() => {
                this.clearListener();
              }));
            }
            setListener(e) {
              this._listener && this.clearListener(), this._listener = e, this._outerListener = () => {
                this._listener && (this._listener(this._parentWindow.devicePixelRatio, this._currentDevicePixelRatio), this._updateDpr());
              }, this._updateDpr();
            }
            _updateDpr() {
              var e;
              this._outerListener && (null === (e = this._resolutionMediaMatchList) || void 0 === e || e.removeListener(this._outerListener), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._resolutionMediaMatchList = this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`), this._resolutionMediaMatchList.addListener(this._outerListener));
            }
            clearListener() {
              this._resolutionMediaMatchList && this._listener && this._outerListener && (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._listener = void 0, this._outerListener = void 0);
            }
          }
          t.ScreenDprMonitor = r;
        },
        3236: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.Terminal = void 0;
          const s = i(2950),
            r = i(1680),
            n = i(3614),
            o = i(2584),
            a = i(5435),
            h = i(9312),
            c = i(6114),
            l = i(3656),
            d = i(9042),
            _ = i(4567),
            u = i(1296),
            f = i(7399),
            v = i(8460),
            g = i(8437),
            p = i(3230),
            S = i(4725),
            m = i(428),
            C = i(8934),
            b = i(6465),
            y = i(5114),
            w = i(8969),
            E = i(8055),
            L = i(4269),
            k = i(5941),
            R = i(3107),
            D = i(5744),
            A = i(9074),
            x = i(2585),
            B = i(3730),
            T = i(844),
            M = i(6731),
            O = "undefined" != typeof window ? window.document : null;
          class I extends w.CoreTerminal {
            constructor(e = {}) {
              super(e), this.browser = c, this._keyDownHandled = !1, this._keyDownSeen = !1, this._keyPressHandled = !1, this._unprocessedDeadKey = !1, this._onCursorMove = this.register(new v.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onKey = this.register(new v.EventEmitter()), this.onKey = this._onKey.event, this._onRender = this.register(new v.EventEmitter()), this.onRender = this._onRender.event, this._onSelectionChange = this.register(new v.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onTitleChange = this.register(new v.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onBell = this.register(new v.EventEmitter()), this.onBell = this._onBell.event, this._onFocus = this.register(new v.EventEmitter()), this._onBlur = this.register(new v.EventEmitter()), this._onA11yCharEmitter = this.register(new v.EventEmitter()), this._onA11yTabEmitter = this.register(new v.EventEmitter()), this._onWillOpen = this.register(new v.EventEmitter()), this._setup(), this.linkifier2 = this.register(this._instantiationService.createInstance(b.Linkifier2)), this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(B.OscLinkProvider)), this._decorationService = this._instantiationService.createInstance(A.DecorationService), this._instantiationService.setService(x.IDecorationService, this._decorationService), this.register(this._inputHandler.onRequestBell(() => this._onBell.fire())), this.register(this._inputHandler.onRequestRefreshRows((e, t) => this.refresh(e, t))), this.register(this._inputHandler.onRequestSendFocus(() => this._reportFocus())), this.register(this._inputHandler.onRequestReset(() => this.reset())), this.register(this._inputHandler.onRequestWindowsOptionsReport(e => this._reportWindowsOptions(e))), this.register(this._inputHandler.onColor(e => this._handleColorEvent(e))), this.register((0, v.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, v.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, v.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, v.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this.register(this._bufferService.onResize(e => this._afterResize(e.cols, e.rows))), this.register((0, T.toDisposable)(() => {
                var e, t;
                this._customKeyEventHandler = void 0, null === (t = null === (e = this.element) || void 0 === e ? void 0 : e.parentNode) || void 0 === t || t.removeChild(this.element);
              }));
            }
            get onFocus() {
              return this._onFocus.event;
            }
            get onBlur() {
              return this._onBlur.event;
            }
            get onA11yChar() {
              return this._onA11yCharEmitter.event;
            }
            get onA11yTab() {
              return this._onA11yTabEmitter.event;
            }
            get onWillOpen() {
              return this._onWillOpen.event;
            }
            _handleColorEvent(e) {
              if (this._themeService) for (const t of e) {
                let e,
                  i = "";
                switch (t.index) {
                  case 256:
                    e = "foreground", i = "10";
                    break;
                  case 257:
                    e = "background", i = "11";
                    break;
                  case 258:
                    e = "cursor", i = "12";
                    break;
                  default:
                    e = "ansi", i = "4;" + t.index;
                }
                switch (t.type) {
                  case 0:
                    const s = E.color.toColorRGB("ansi" === e ? this._themeService.colors.ansi[t.index] : this._themeService.colors[e]);
                    this.coreService.triggerDataEvent(`${o.C0.ESC}]${i};${(0, k.toRgbString)(s)}${o.C1_ESCAPED.ST}`);
                    break;
                  case 1:
                    if ("ansi" === e) this._themeService.modifyColors(e => e.ansi[t.index] = E.rgba.toColor(...t.color));else {
                      const i = e;
                      this._themeService.modifyColors(e => e[i] = E.rgba.toColor(...t.color));
                    }
                    break;
                  case 2:
                    this._themeService.restoreColor(t.index);
                }
              }
            }
            _setup() {
              super._setup(), this._customKeyEventHandler = void 0;
            }
            get buffer() {
              return this.buffers.active;
            }
            focus() {
              this.textarea && this.textarea.focus({
                preventScroll: !0
              });
            }
            _handleScreenReaderModeOptionChange(e) {
              var t;
              e ? !this._accessibilityManager && this._renderService && (this._accessibilityManager = new _.AccessibilityManager(this, this._renderService)) : (null === (t = this._accessibilityManager) || void 0 === t || t.dispose(), this._accessibilityManager = void 0);
            }
            _handleTextAreaFocus(e) {
              this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(o.C0.ESC + "[I"), this.updateCursorStyle(e), this.element.classList.add("focus"), this._showCursor(), this._onFocus.fire();
            }
            blur() {
              var e;
              return null === (e = this.textarea) || void 0 === e ? void 0 : e.blur();
            }
            _handleTextAreaBlur() {
              this.textarea.value = "", this.refresh(this.buffer.y, this.buffer.y), this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(o.C0.ESC + "[O"), this.element.classList.remove("focus"), this._onBlur.fire();
            }
            _syncTextArea() {
              if (!this.textarea || !this.buffer.isCursorInViewport || this._compositionHelper.isComposing || !this._renderService) return;
              const e = this.buffer.ybase + this.buffer.y,
                t = this.buffer.lines.get(e);
              if (!t) return;
              const i = Math.min(this.buffer.x, this.cols - 1),
                s = this._renderService.dimensions.css.cell.height,
                r = t.getWidth(i),
                n = this._renderService.dimensions.css.cell.width * r,
                o = this.buffer.y * this._renderService.dimensions.css.cell.height,
                a = i * this._renderService.dimensions.css.cell.width;
              this.textarea.style.left = a + "px", this.textarea.style.top = o + "px", this.textarea.style.width = n + "px", this.textarea.style.height = s + "px", this.textarea.style.lineHeight = s + "px", this.textarea.style.zIndex = "-5";
            }
            _initGlobal() {
              this._bindKeys(), this.register((0, l.addDisposableDomListener)(this.element, "copy", e => {
                this.hasSelection() && (0, n.copyHandler)(e, this._selectionService);
              }));
              const e = e => (0, n.handlePasteEvent)(e, this.textarea, this.coreService);
              this.register((0, l.addDisposableDomListener)(this.textarea, "paste", e)), this.register((0, l.addDisposableDomListener)(this.element, "paste", e)), c.isFirefox ? this.register((0, l.addDisposableDomListener)(this.element, "mousedown", e => {
                2 === e.button && (0, n.rightClickHandler)(e, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
              })) : this.register((0, l.addDisposableDomListener)(this.element, "contextmenu", e => {
                (0, n.rightClickHandler)(e, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
              })), c.isLinux && this.register((0, l.addDisposableDomListener)(this.element, "auxclick", e => {
                1 === e.button && (0, n.moveTextAreaUnderMouseCursor)(e, this.textarea, this.screenElement);
              }));
            }
            _bindKeys() {
              this.register((0, l.addDisposableDomListener)(this.textarea, "keyup", e => this._keyUp(e), !0)), this.register((0, l.addDisposableDomListener)(this.textarea, "keydown", e => this._keyDown(e), !0)), this.register((0, l.addDisposableDomListener)(this.textarea, "keypress", e => this._keyPress(e), !0)), this.register((0, l.addDisposableDomListener)(this.textarea, "compositionstart", () => this._compositionHelper.compositionstart())), this.register((0, l.addDisposableDomListener)(this.textarea, "compositionupdate", e => this._compositionHelper.compositionupdate(e))), this.register((0, l.addDisposableDomListener)(this.textarea, "compositionend", () => this._compositionHelper.compositionend())), this.register((0, l.addDisposableDomListener)(this.textarea, "input", e => this._inputEvent(e), !0)), this.register(this.onRender(() => this._compositionHelper.updateCompositionElements()));
            }
            open(e) {
              var t;
              if (!e) throw new Error("Terminal requires a parent element.");
              e.isConnected || this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"), this._document = e.ownerDocument, this.element = this._document.createElement("div"), this.element.dir = "ltr", this.element.classList.add("terminal"), this.element.classList.add("xterm"), this.element.setAttribute("tabindex", "0"), e.appendChild(this.element);
              const i = O.createDocumentFragment();
              this._viewportElement = O.createElement("div"), this._viewportElement.classList.add("xterm-viewport"), i.appendChild(this._viewportElement), this._viewportScrollArea = O.createElement("div"), this._viewportScrollArea.classList.add("xterm-scroll-area"), this._viewportElement.appendChild(this._viewportScrollArea), this.screenElement = O.createElement("div"), this.screenElement.classList.add("xterm-screen"), this._helperContainer = O.createElement("div"), this._helperContainer.classList.add("xterm-helpers"), this.screenElement.appendChild(this._helperContainer), i.appendChild(this.screenElement), this.textarea = O.createElement("textarea"), this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", d.promptLabel), c.isChromeOS || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._coreBrowserService = this._instantiationService.createInstance(y.CoreBrowserService, this.textarea, null !== (t = this._document.defaultView) && void 0 !== t ? t : window), this._instantiationService.setService(S.ICoreBrowserService, this._coreBrowserService), this.register((0, l.addDisposableDomListener)(this.textarea, "focus", e => this._handleTextAreaFocus(e))), this.register((0, l.addDisposableDomListener)(this.textarea, "blur", () => this._handleTextAreaBlur())), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(m.CharSizeService, this._document, this._helperContainer), this._instantiationService.setService(S.ICharSizeService, this._charSizeService), this._themeService = this._instantiationService.createInstance(M.ThemeService), this._instantiationService.setService(S.IThemeService, this._themeService), this._characterJoinerService = this._instantiationService.createInstance(L.CharacterJoinerService), this._instantiationService.setService(S.ICharacterJoinerService, this._characterJoinerService), this._renderService = this.register(this._instantiationService.createInstance(p.RenderService, this.rows, this.screenElement)), this._instantiationService.setService(S.IRenderService, this._renderService), this.register(this._renderService.onRenderedViewportChange(e => this._onRender.fire(e))), this.onResize(e => this._renderService.resize(e.cols, e.rows)), this._compositionView = O.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(s.CompositionHelper, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this.element.appendChild(i);
              try {
                this._onWillOpen.fire(this.element);
              } catch (e) {}
              this._renderService.hasRenderer() || this._renderService.setRenderer(this._createRenderer()), this._mouseService = this._instantiationService.createInstance(C.MouseService), this._instantiationService.setService(S.IMouseService, this._mouseService), this.viewport = this._instantiationService.createInstance(r.Viewport, e => this.scrollLines(e, !0, 1), this._viewportElement, this._viewportScrollArea), this.register(this._inputHandler.onRequestSyncScrollBar(() => this.viewport.syncScrollArea())), this.register(this.viewport), this.register(this.onCursorMove(() => {
                this._renderService.handleCursorMove(), this._syncTextArea();
              })), this.register(this.onResize(() => this._renderService.handleResize(this.cols, this.rows))), this.register(this.onBlur(() => this._renderService.handleBlur())), this.register(this.onFocus(() => this._renderService.handleFocus())), this.register(this._renderService.onDimensionsChange(() => this.viewport.syncScrollArea())), this._selectionService = this.register(this._instantiationService.createInstance(h.SelectionService, this.element, this.screenElement, this.linkifier2)), this._instantiationService.setService(S.ISelectionService, this._selectionService), this.register(this._selectionService.onRequestScrollLines(e => this.scrollLines(e.amount, e.suppressScrollEvent))), this.register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire())), this.register(this._selectionService.onRequestRedraw(e => this._renderService.handleSelectionChanged(e.start, e.end, e.columnSelectMode))), this.register(this._selectionService.onLinuxMouseSelection(e => {
                this.textarea.value = e, this.textarea.focus(), this.textarea.select();
              })), this.register(this._onScroll.event(e => {
                this.viewport.syncScrollArea(), this._selectionService.refresh();
              })), this.register((0, l.addDisposableDomListener)(this._viewportElement, "scroll", () => this._selectionService.refresh())), this.linkifier2.attachToDom(this.screenElement, this._mouseService, this._renderService), this.register(this._instantiationService.createInstance(R.BufferDecorationRenderer, this.screenElement)), this.register((0, l.addDisposableDomListener)(this.element, "mousedown", e => this._selectionService.handleMouseDown(e))), this.coreMouseService.areMouseEventsActive ? (this._selectionService.disable(), this.element.classList.add("enable-mouse-events")) : this._selectionService.enable(), this.options.screenReaderMode && (this._accessibilityManager = new _.AccessibilityManager(this, this._renderService)), this.register(this.optionsService.onSpecificOptionChange("screenReaderMode", e => this._handleScreenReaderModeOptionChange(e))), this.options.overviewRulerWidth && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(D.OverviewRulerRenderer, this._viewportElement, this.screenElement))), this.optionsService.onSpecificOptionChange("overviewRulerWidth", e => {
                !this._overviewRulerRenderer && e && this._viewportElement && this.screenElement && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(D.OverviewRulerRenderer, this._viewportElement, this.screenElement)));
              }), this._charSizeService.measure(), this.refresh(0, this.rows - 1), this._initGlobal(), this.bindMouse();
            }
            _createRenderer() {
              return this._instantiationService.createInstance(u.DomRenderer, this.element, this.screenElement, this._viewportElement, this.linkifier2);
            }
            bindMouse() {
              const e = this,
                t = this.element;
              function i(t) {
                const i = e._mouseService.getMouseReportCoords(t, e.screenElement);
                if (!i) return !1;
                let s, r;
                switch (t.overrideType || t.type) {
                  case "mousemove":
                    r = 32, void 0 === t.buttons ? (s = 3, void 0 !== t.button && (s = t.button < 3 ? t.button : 3)) : s = 1 & t.buttons ? 0 : 4 & t.buttons ? 1 : 2 & t.buttons ? 2 : 3;
                    break;
                  case "mouseup":
                    r = 0, s = t.button < 3 ? t.button : 3;
                    break;
                  case "mousedown":
                    r = 1, s = t.button < 3 ? t.button : 3;
                    break;
                  case "wheel":
                    if (0 === e.viewport.getLinesScrolled(t)) return !1;
                    r = t.deltaY < 0 ? 0 : 1, s = 4;
                    break;
                  default:
                    return !1;
                }
                return !(void 0 === r || void 0 === s || s > 4) && e.coreMouseService.triggerMouseEvent({
                  col: i.col,
                  row: i.row,
                  x: i.x,
                  y: i.y,
                  button: s,
                  action: r,
                  ctrl: t.ctrlKey,
                  alt: t.altKey,
                  shift: t.shiftKey
                });
              }
              const s = {
                  mouseup: null,
                  wheel: null,
                  mousedrag: null,
                  mousemove: null
                },
                r = {
                  mouseup: e => (i(e), e.buttons || (this._document.removeEventListener("mouseup", s.mouseup), s.mousedrag && this._document.removeEventListener("mousemove", s.mousedrag)), this.cancel(e)),
                  wheel: e => (i(e), this.cancel(e, !0)),
                  mousedrag: e => {
                    e.buttons && i(e);
                  },
                  mousemove: e => {
                    e.buttons || i(e);
                  }
                };
              this.register(this.coreMouseService.onProtocolChange(e => {
                e ? ("debug" === this.optionsService.rawOptions.logLevel && this._logService.debug("Binding to mouse events:", this.coreMouseService.explainEvents(e)), this.element.classList.add("enable-mouse-events"), this._selectionService.disable()) : (this._logService.debug("Unbinding from mouse events."), this.element.classList.remove("enable-mouse-events"), this._selectionService.enable()), 8 & e ? s.mousemove || (t.addEventListener("mousemove", r.mousemove), s.mousemove = r.mousemove) : (t.removeEventListener("mousemove", s.mousemove), s.mousemove = null), 16 & e ? s.wheel || (t.addEventListener("wheel", r.wheel, {
                  passive: !1
                }), s.wheel = r.wheel) : (t.removeEventListener("wheel", s.wheel), s.wheel = null), 2 & e ? s.mouseup || (s.mouseup = r.mouseup) : (this._document.removeEventListener("mouseup", s.mouseup), s.mouseup = null), 4 & e ? s.mousedrag || (s.mousedrag = r.mousedrag) : (this._document.removeEventListener("mousemove", s.mousedrag), s.mousedrag = null);
              })), this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol, this.register((0, l.addDisposableDomListener)(t, "mousedown", e => {
                if (e.preventDefault(), this.focus(), this.coreMouseService.areMouseEventsActive && !this._selectionService.shouldForceSelection(e)) return i(e), s.mouseup && this._document.addEventListener("mouseup", s.mouseup), s.mousedrag && this._document.addEventListener("mousemove", s.mousedrag), this.cancel(e);
              })), this.register((0, l.addDisposableDomListener)(t, "wheel", e => {
                if (!s.wheel) {
                  if (!this.buffer.hasScrollback) {
                    const t = this.viewport.getLinesScrolled(e);
                    if (0 === t) return;
                    const i = o.C0.ESC + (this.coreService.decPrivateModes.applicationCursorKeys ? "O" : "[") + (e.deltaY < 0 ? "A" : "B");
                    let s = "";
                    for (let e = 0; e < Math.abs(t); e++) s += i;
                    return this.coreService.triggerDataEvent(s, !0), this.cancel(e, !0);
                  }
                  return this.viewport.handleWheel(e) ? this.cancel(e) : void 0;
                }
              }, {
                passive: !1
              })), this.register((0, l.addDisposableDomListener)(t, "touchstart", e => {
                if (!this.coreMouseService.areMouseEventsActive) return this.viewport.handleTouchStart(e), this.cancel(e);
              }, {
                passive: !0
              })), this.register((0, l.addDisposableDomListener)(t, "touchmove", e => {
                if (!this.coreMouseService.areMouseEventsActive) return this.viewport.handleTouchMove(e) ? void 0 : this.cancel(e);
              }, {
                passive: !1
              }));
            }
            refresh(e, t) {
              var i;
              null === (i = this._renderService) || void 0 === i || i.refreshRows(e, t);
            }
            updateCursorStyle(e) {
              var t;
              (null === (t = this._selectionService) || void 0 === t ? void 0 : t.shouldColumnSelect(e)) ? this.element.classList.add("column-select") : this.element.classList.remove("column-select");
            }
            _showCursor() {
              this.coreService.isCursorInitialized || (this.coreService.isCursorInitialized = !0, this.refresh(this.buffer.y, this.buffer.y));
            }
            scrollLines(e, t, i = 0) {
              super.scrollLines(e, t, i), this.refresh(0, this.rows - 1);
            }
            paste(e) {
              (0, n.paste)(e, this.textarea, this.coreService);
            }
            attachCustomKeyEventHandler(e) {
              this._customKeyEventHandler = e;
            }
            registerLinkProvider(e) {
              return this.linkifier2.registerLinkProvider(e);
            }
            registerCharacterJoiner(e) {
              if (!this._characterJoinerService) throw new Error("Terminal must be opened first");
              const t = this._characterJoinerService.register(e);
              return this.refresh(0, this.rows - 1), t;
            }
            deregisterCharacterJoiner(e) {
              if (!this._characterJoinerService) throw new Error("Terminal must be opened first");
              this._characterJoinerService.deregister(e) && this.refresh(0, this.rows - 1);
            }
            get markers() {
              return this.buffer.markers;
            }
            addMarker(e) {
              return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + e);
            }
            registerDecoration(e) {
              return this._decorationService.registerDecoration(e);
            }
            hasSelection() {
              return !!this._selectionService && this._selectionService.hasSelection;
            }
            select(e, t, i) {
              this._selectionService.setSelection(e, t, i);
            }
            getSelection() {
              return this._selectionService ? this._selectionService.selectionText : "";
            }
            getSelectionPosition() {
              if (this._selectionService && this._selectionService.hasSelection) return {
                start: {
                  x: this._selectionService.selectionStart[0],
                  y: this._selectionService.selectionStart[1]
                },
                end: {
                  x: this._selectionService.selectionEnd[0],
                  y: this._selectionService.selectionEnd[1]
                }
              };
            }
            clearSelection() {
              var e;
              null === (e = this._selectionService) || void 0 === e || e.clearSelection();
            }
            selectAll() {
              var e;
              null === (e = this._selectionService) || void 0 === e || e.selectAll();
            }
            selectLines(e, t) {
              var i;
              null === (i = this._selectionService) || void 0 === i || i.selectLines(e, t);
            }
            _keyDown(e) {
              if (this._keyDownHandled = !1, this._keyDownSeen = !0, this._customKeyEventHandler && !1 === this._customKeyEventHandler(e)) return !1;
              const t = this.browser.isMac && this.options.macOptionIsMeta && e.altKey;
              if (!t && !this._compositionHelper.keydown(e)) return this.options.scrollOnUserInput && this.buffer.ybase !== this.buffer.ydisp && this._bufferService.scrollToBottom(), !1;
              t || "Dead" !== e.key && "AltGraph" !== e.key || (this._unprocessedDeadKey = !0);
              const i = (0, f.evaluateKeyboardEvent)(e, this.coreService.decPrivateModes.applicationCursorKeys, this.browser.isMac, this.options.macOptionIsMeta);
              if (this.updateCursorStyle(e), 3 === i.type || 2 === i.type) {
                const t = this.rows - 1;
                return this.scrollLines(2 === i.type ? -t : t), this.cancel(e, !0);
              }
              return 1 === i.type && this.selectAll(), !!this._isThirdLevelShift(this.browser, e) || (i.cancel && this.cancel(e, !0), !i.key || !!(e.key && !e.ctrlKey && !e.altKey && !e.metaKey && 1 === e.key.length && e.key.charCodeAt(0) >= 65 && e.key.charCodeAt(0) <= 90) || (this._unprocessedDeadKey ? (this._unprocessedDeadKey = !1, !0) : (i.key !== o.C0.ETX && i.key !== o.C0.CR || (this.textarea.value = ""), this._onKey.fire({
                key: i.key,
                domEvent: e
              }), this._showCursor(), this.coreService.triggerDataEvent(i.key, !0), !this.optionsService.rawOptions.screenReaderMode || e.altKey || e.ctrlKey ? this.cancel(e, !0) : void (this._keyDownHandled = !0))));
            }
            _isThirdLevelShift(e, t) {
              const i = e.isMac && !this.options.macOptionIsMeta && t.altKey && !t.ctrlKey && !t.metaKey || e.isWindows && t.altKey && t.ctrlKey && !t.metaKey || e.isWindows && t.getModifierState("AltGraph");
              return "keypress" === t.type ? i : i && (!t.keyCode || t.keyCode > 47);
            }
            _keyUp(e) {
              this._keyDownSeen = !1, this._customKeyEventHandler && !1 === this._customKeyEventHandler(e) || (function (e) {
                return 16 === e.keyCode || 17 === e.keyCode || 18 === e.keyCode;
              }(e) || this.focus(), this.updateCursorStyle(e), this._keyPressHandled = !1);
            }
            _keyPress(e) {
              let t;
              if (this._keyPressHandled = !1, this._keyDownHandled) return !1;
              if (this._customKeyEventHandler && !1 === this._customKeyEventHandler(e)) return !1;
              if (this.cancel(e), e.charCode) t = e.charCode;else if (null === e.which || void 0 === e.which) t = e.keyCode;else {
                if (0 === e.which || 0 === e.charCode) return !1;
                t = e.which;
              }
              return !(!t || (e.altKey || e.ctrlKey || e.metaKey) && !this._isThirdLevelShift(this.browser, e) || (t = String.fromCharCode(t), this._onKey.fire({
                key: t,
                domEvent: e
              }), this._showCursor(), this.coreService.triggerDataEvent(t, !0), this._keyPressHandled = !0, this._unprocessedDeadKey = !1, 0));
            }
            _inputEvent(e) {
              if (e.data && "insertText" === e.inputType && (!e.composed || !this._keyDownSeen) && !this.optionsService.rawOptions.screenReaderMode) {
                if (this._keyPressHandled) return !1;
                this._unprocessedDeadKey = !1;
                const t = e.data;
                return this.coreService.triggerDataEvent(t, !0), this.cancel(e), !0;
              }
              return !1;
            }
            resize(e, t) {
              e !== this.cols || t !== this.rows ? super.resize(e, t) : this._charSizeService && !this._charSizeService.hasValidSize && this._charSizeService.measure();
            }
            _afterResize(e, t) {
              var i, s;
              null === (i = this._charSizeService) || void 0 === i || i.measure(), null === (s = this.viewport) || void 0 === s || s.syncScrollArea(!0);
            }
            clear() {
              if (0 !== this.buffer.ybase || 0 !== this.buffer.y) {
                this.buffer.clearAllMarkers(), this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)), this.buffer.lines.length = 1, this.buffer.ydisp = 0, this.buffer.ybase = 0, this.buffer.y = 0;
                for (let e = 1; e < this.rows; e++) this.buffer.lines.push(this.buffer.getBlankLine(g.DEFAULT_ATTR_DATA));
                this.refresh(0, this.rows - 1), this._onScroll.fire({
                  position: this.buffer.ydisp,
                  source: 0
                });
              }
            }
            reset() {
              var e, t;
              this.options.rows = this.rows, this.options.cols = this.cols;
              const i = this._customKeyEventHandler;
              this._setup(), super.reset(), null === (e = this._selectionService) || void 0 === e || e.reset(), this._decorationService.reset(), this._customKeyEventHandler = i, this.refresh(0, this.rows - 1), null === (t = this.viewport) || void 0 === t || t.syncScrollArea();
            }
            clearTextureAtlas() {
              var e;
              null === (e = this._renderService) || void 0 === e || e.clearTextureAtlas();
            }
            _reportFocus() {
              var e;
              (null === (e = this.element) || void 0 === e ? void 0 : e.classList.contains("focus")) ? this.coreService.triggerDataEvent(o.C0.ESC + "[I") : this.coreService.triggerDataEvent(o.C0.ESC + "[O");
            }
            _reportWindowsOptions(e) {
              if (this._renderService) switch (e) {
                case a.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:
                  const e = this._renderService.dimensions.css.canvas.width.toFixed(0),
                    t = this._renderService.dimensions.css.canvas.height.toFixed(0);
                  this.coreService.triggerDataEvent(`${o.C0.ESC}[4;${t};${e}t`);
                  break;
                case a.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:
                  const i = this._renderService.dimensions.css.cell.width.toFixed(0),
                    s = this._renderService.dimensions.css.cell.height.toFixed(0);
                  this.coreService.triggerDataEvent(`${o.C0.ESC}[6;${s};${i}t`);
              }
            }
            cancel(e, t) {
              if (this.options.cancelEvents || t) return e.preventDefault(), e.stopPropagation(), !1;
            }
          }
          t.Terminal = I;
        },
        9924: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.TimeBasedDebouncer = void 0, t.TimeBasedDebouncer = class {
            constructor(e, t = 1e3) {
              this._renderCallback = e, this._debounceThresholdMS = t, this._lastRefreshMs = 0, this._additionalRefreshRequested = !1;
            }
            dispose() {
              this._refreshTimeoutID && clearTimeout(this._refreshTimeoutID);
            }
            refresh(e, t, i) {
              this._rowCount = i, e = void 0 !== e ? e : 0, t = void 0 !== t ? t : this._rowCount - 1, this._rowStart = void 0 !== this._rowStart ? Math.min(this._rowStart, e) : e, this._rowEnd = void 0 !== this._rowEnd ? Math.max(this._rowEnd, t) : t;
              const s = Date.now();
              if (s - this._lastRefreshMs >= this._debounceThresholdMS) this._lastRefreshMs = s, this._innerRefresh();else if (!this._additionalRefreshRequested) {
                const e = s - this._lastRefreshMs,
                  t = this._debounceThresholdMS - e;
                this._additionalRefreshRequested = !0, this._refreshTimeoutID = window.setTimeout(() => {
                  this._lastRefreshMs = Date.now(), this._innerRefresh(), this._additionalRefreshRequested = !1, this._refreshTimeoutID = void 0;
                }, t);
              }
            }
            _innerRefresh() {
              if (void 0 === this._rowStart || void 0 === this._rowEnd || void 0 === this._rowCount) return;
              const e = Math.max(this._rowStart, 0),
                t = Math.min(this._rowEnd, this._rowCount - 1);
              this._rowStart = void 0, this._rowEnd = void 0, this._renderCallback(e, t);
            }
          };
        },
        1680: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.Viewport = void 0;
          const n = i(844),
            o = i(3656),
            a = i(4725),
            h = i(2585);
          let c = class extends n.Disposable {
            constructor(e, t, i, s, r, n, a, h, c) {
              super(), this._scrollLines = e, this._viewportElement = t, this._scrollArea = i, this._bufferService = s, this._optionsService = r, this._charSizeService = n, this._renderService = a, this._coreBrowserService = h, this.scrollBarWidth = 0, this._currentRowHeight = 0, this._currentDeviceCellHeight = 0, this._lastRecordedBufferLength = 0, this._lastRecordedViewportHeight = 0, this._lastRecordedBufferHeight = 0, this._lastTouchY = 0, this._lastScrollTop = 0, this._wheelPartialScroll = 0, this._refreshAnimationFrame = null, this._ignoreNextScrollEvent = !1, this._smoothScrollState = {
                startTime: 0,
                origin: -1,
                target: -1
              }, this.scrollBarWidth = this._viewportElement.offsetWidth - this._scrollArea.offsetWidth || 15, this.register((0, o.addDisposableDomListener)(this._viewportElement, "scroll", this._handleScroll.bind(this))), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer)), this._renderDimensions = this._renderService.dimensions, this.register(this._renderService.onDimensionsChange(e => this._renderDimensions = e)), this._handleThemeChange(c.colors), this.register(c.onChangeColors(e => this._handleThemeChange(e))), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.syncScrollArea())), setTimeout(() => this.syncScrollArea(), 0);
            }
            _handleThemeChange(e) {
              this._viewportElement.style.backgroundColor = e.background.css;
            }
            _refresh(e) {
              if (e) return this._innerRefresh(), void (null !== this._refreshAnimationFrame && this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));
              null === this._refreshAnimationFrame && (this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh()));
            }
            _innerRefresh() {
              if (this._charSizeService.height > 0) {
                this._currentRowHeight = this._renderService.dimensions.device.cell.height / this._coreBrowserService.dpr, this._currentDeviceCellHeight = this._renderService.dimensions.device.cell.height, this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
                const e = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderService.dimensions.css.canvas.height);
                this._lastRecordedBufferHeight !== e && (this._lastRecordedBufferHeight = e, this._scrollArea.style.height = this._lastRecordedBufferHeight + "px");
              }
              const e = this._bufferService.buffer.ydisp * this._currentRowHeight;
              this._viewportElement.scrollTop !== e && (this._ignoreNextScrollEvent = !0, this._viewportElement.scrollTop = e), this._refreshAnimationFrame = null;
            }
            syncScrollArea(e = !1) {
              if (this._lastRecordedBufferLength !== this._bufferService.buffer.lines.length) return this._lastRecordedBufferLength = this._bufferService.buffer.lines.length, void this._refresh(e);
              this._lastRecordedViewportHeight === this._renderService.dimensions.css.canvas.height && this._lastScrollTop === this._activeBuffer.ydisp * this._currentRowHeight && this._renderDimensions.device.cell.height === this._currentDeviceCellHeight || this._refresh(e);
            }
            _handleScroll(e) {
              if (this._lastScrollTop = this._viewportElement.scrollTop, !this._viewportElement.offsetParent) return;
              if (this._ignoreNextScrollEvent) return this._ignoreNextScrollEvent = !1, void this._scrollLines(0);
              const t = Math.round(this._lastScrollTop / this._currentRowHeight) - this._bufferService.buffer.ydisp;
              this._scrollLines(t);
            }
            _smoothScroll() {
              if (this._isDisposed || -1 === this._smoothScrollState.origin || -1 === this._smoothScrollState.target) return;
              const e = this._smoothScrollPercent();
              this._viewportElement.scrollTop = this._smoothScrollState.origin + Math.round(e * (this._smoothScrollState.target - this._smoothScrollState.origin)), e < 1 ? this._coreBrowserService.window.requestAnimationFrame(() => this._smoothScroll()) : this._clearSmoothScrollState();
            }
            _smoothScrollPercent() {
              return this._optionsService.rawOptions.smoothScrollDuration && this._smoothScrollState.startTime ? Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollDuration, 1), 0) : 1;
            }
            _clearSmoothScrollState() {
              this._smoothScrollState.startTime = 0, this._smoothScrollState.origin = -1, this._smoothScrollState.target = -1;
            }
            _bubbleScroll(e, t) {
              const i = this._viewportElement.scrollTop + this._lastRecordedViewportHeight;
              return !(t < 0 && 0 !== this._viewportElement.scrollTop || t > 0 && i < this._lastRecordedBufferHeight) || (e.cancelable && e.preventDefault(), !1);
            }
            handleWheel(e) {
              const t = this._getPixelsScrolled(e);
              return 0 !== t && (this._optionsService.rawOptions.smoothScrollDuration ? (this._smoothScrollState.startTime = Date.now(), this._smoothScrollPercent() < 1 ? (this._smoothScrollState.origin = this._viewportElement.scrollTop, -1 === this._smoothScrollState.target ? this._smoothScrollState.target = this._viewportElement.scrollTop + t : this._smoothScrollState.target += t, this._smoothScrollState.target = Math.max(Math.min(this._smoothScrollState.target, this._viewportElement.scrollHeight), 0), this._smoothScroll()) : this._clearSmoothScrollState()) : this._viewportElement.scrollTop += t, this._bubbleScroll(e, t));
            }
            _getPixelsScrolled(e) {
              if (0 === e.deltaY || e.shiftKey) return 0;
              let t = this._applyScrollModifier(e.deltaY, e);
              return e.deltaMode === WheelEvent.DOM_DELTA_LINE ? t *= this._currentRowHeight : e.deltaMode === WheelEvent.DOM_DELTA_PAGE && (t *= this._currentRowHeight * this._bufferService.rows), t;
            }
            getLinesScrolled(e) {
              if (0 === e.deltaY || e.shiftKey) return 0;
              let t = this._applyScrollModifier(e.deltaY, e);
              return e.deltaMode === WheelEvent.DOM_DELTA_PIXEL ? (t /= this._currentRowHeight + 0, this._wheelPartialScroll += t, t = Math.floor(Math.abs(this._wheelPartialScroll)) * (this._wheelPartialScroll > 0 ? 1 : -1), this._wheelPartialScroll %= 1) : e.deltaMode === WheelEvent.DOM_DELTA_PAGE && (t *= this._bufferService.rows), t;
            }
            _applyScrollModifier(e, t) {
              const i = this._optionsService.rawOptions.fastScrollModifier;
              return "alt" === i && t.altKey || "ctrl" === i && t.ctrlKey || "shift" === i && t.shiftKey ? e * this._optionsService.rawOptions.fastScrollSensitivity * this._optionsService.rawOptions.scrollSensitivity : e * this._optionsService.rawOptions.scrollSensitivity;
            }
            handleTouchStart(e) {
              this._lastTouchY = e.touches[0].pageY;
            }
            handleTouchMove(e) {
              const t = this._lastTouchY - e.touches[0].pageY;
              return this._lastTouchY = e.touches[0].pageY, 0 !== t && (this._viewportElement.scrollTop += t, this._bubbleScroll(e, t));
            }
          };
          c = s([r(3, h.IBufferService), r(4, h.IOptionsService), r(5, a.ICharSizeService), r(6, a.IRenderService), r(7, a.ICoreBrowserService), r(8, a.IThemeService)], c), t.Viewport = c;
        },
        3107: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BufferDecorationRenderer = void 0;
          const n = i(3656),
            o = i(4725),
            a = i(844),
            h = i(2585);
          let c = class extends a.Disposable {
            constructor(e, t, i, s) {
              super(), this._screenElement = e, this._bufferService = t, this._decorationService = i, this._renderService = s, this._decorationElements = new Map(), this._altBufferIsActive = !1, this._dimensionsChanged = !1, this._container = document.createElement("div"), this._container.classList.add("xterm-decoration-container"), this._screenElement.appendChild(this._container), this.register(this._renderService.onRenderedViewportChange(() => this._doRefreshDecorations())), this.register(this._renderService.onDimensionsChange(() => {
                this._dimensionsChanged = !0, this._queueRefresh();
              })), this.register((0, n.addDisposableDomListener)(window, "resize", () => this._queueRefresh())), this.register(this._bufferService.buffers.onBufferActivate(() => {
                this._altBufferIsActive = this._bufferService.buffer === this._bufferService.buffers.alt;
              })), this.register(this._decorationService.onDecorationRegistered(() => this._queueRefresh())), this.register(this._decorationService.onDecorationRemoved(e => this._removeDecoration(e))), this.register((0, a.toDisposable)(() => {
                this._container.remove(), this._decorationElements.clear();
              }));
            }
            _queueRefresh() {
              void 0 === this._animationFrame && (this._animationFrame = this._renderService.addRefreshCallback(() => {
                this._doRefreshDecorations(), this._animationFrame = void 0;
              }));
            }
            _doRefreshDecorations() {
              for (const e of this._decorationService.decorations) this._renderDecoration(e);
              this._dimensionsChanged = !1;
            }
            _renderDecoration(e) {
              this._refreshStyle(e), this._dimensionsChanged && this._refreshXPosition(e);
            }
            _createElement(e) {
              var t;
              const i = document.createElement("div");
              i.classList.add("xterm-decoration"), i.style.width = `${Math.round((e.options.width || 1) * this._renderService.dimensions.css.cell.width)}px`, i.style.height = (e.options.height || 1) * this._renderService.dimensions.css.cell.height + "px", i.style.top = (e.marker.line - this._bufferService.buffers.active.ydisp) * this._renderService.dimensions.css.cell.height + "px", i.style.lineHeight = `${this._renderService.dimensions.css.cell.height}px`;
              const s = null !== (t = e.options.x) && void 0 !== t ? t : 0;
              return s && s > this._bufferService.cols && (i.style.display = "none"), this._refreshXPosition(e, i), i;
            }
            _refreshStyle(e) {
              const t = e.marker.line - this._bufferService.buffers.active.ydisp;
              if (t < 0 || t >= this._bufferService.rows) e.element && (e.element.style.display = "none", e.onRenderEmitter.fire(e.element));else {
                let i = this._decorationElements.get(e);
                i || (i = this._createElement(e), e.element = i, this._decorationElements.set(e, i), this._container.appendChild(i)), i.style.top = t * this._renderService.dimensions.css.cell.height + "px", i.style.display = this._altBufferIsActive ? "none" : "block", e.onRenderEmitter.fire(i);
              }
            }
            _refreshXPosition(e, t = e.element) {
              var i;
              if (!t) return;
              const s = null !== (i = e.options.x) && void 0 !== i ? i : 0;
              "right" === (e.options.anchor || "left") ? t.style.right = s ? s * this._renderService.dimensions.css.cell.width + "px" : "" : t.style.left = s ? s * this._renderService.dimensions.css.cell.width + "px" : "";
            }
            _removeDecoration(e) {
              var t;
              null === (t = this._decorationElements.get(e)) || void 0 === t || t.remove(), this._decorationElements.delete(e), e.dispose();
            }
          };
          c = s([r(1, h.IBufferService), r(2, h.IDecorationService), r(3, o.IRenderService)], c), t.BufferDecorationRenderer = c;
        },
        5871: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ColorZoneStore = void 0, t.ColorZoneStore = class {
            constructor() {
              this._zones = [], this._zonePool = [], this._zonePoolIndex = 0, this._linePadding = {
                full: 0,
                left: 0,
                center: 0,
                right: 0
              };
            }
            get zones() {
              return this._zonePool.length = Math.min(this._zonePool.length, this._zones.length), this._zones;
            }
            clear() {
              this._zones.length = 0, this._zonePoolIndex = 0;
            }
            addDecoration(e) {
              if (e.options.overviewRulerOptions) {
                for (const t of this._zones) if (t.color === e.options.overviewRulerOptions.color && t.position === e.options.overviewRulerOptions.position) {
                  if (this._lineIntersectsZone(t, e.marker.line)) return;
                  if (this._lineAdjacentToZone(t, e.marker.line, e.options.overviewRulerOptions.position)) return void this._addLineToZone(t, e.marker.line);
                }
                if (this._zonePoolIndex < this._zonePool.length) return this._zonePool[this._zonePoolIndex].color = e.options.overviewRulerOptions.color, this._zonePool[this._zonePoolIndex].position = e.options.overviewRulerOptions.position, this._zonePool[this._zonePoolIndex].startBufferLine = e.marker.line, this._zonePool[this._zonePoolIndex].endBufferLine = e.marker.line, void this._zones.push(this._zonePool[this._zonePoolIndex++]);
                this._zones.push({
                  color: e.options.overviewRulerOptions.color,
                  position: e.options.overviewRulerOptions.position,
                  startBufferLine: e.marker.line,
                  endBufferLine: e.marker.line
                }), this._zonePool.push(this._zones[this._zones.length - 1]), this._zonePoolIndex++;
              }
            }
            setPadding(e) {
              this._linePadding = e;
            }
            _lineIntersectsZone(e, t) {
              return t >= e.startBufferLine && t <= e.endBufferLine;
            }
            _lineAdjacentToZone(e, t, i) {
              return t >= e.startBufferLine - this._linePadding[i || "full"] && t <= e.endBufferLine + this._linePadding[i || "full"];
            }
            _addLineToZone(e, t) {
              e.startBufferLine = Math.min(e.startBufferLine, t), e.endBufferLine = Math.max(e.endBufferLine, t);
            }
          };
        },
        5744: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.OverviewRulerRenderer = void 0;
          const n = i(5871),
            o = i(3656),
            a = i(4725),
            h = i(844),
            c = i(2585),
            l = {
              full: 0,
              left: 0,
              center: 0,
              right: 0
            },
            d = {
              full: 0,
              left: 0,
              center: 0,
              right: 0
            },
            _ = {
              full: 0,
              left: 0,
              center: 0,
              right: 0
            };
          let u = class extends h.Disposable {
            constructor(e, t, i, s, r, o, a) {
              var c;
              super(), this._viewportElement = e, this._screenElement = t, this._bufferService = i, this._decorationService = s, this._renderService = r, this._optionsService = o, this._coreBrowseService = a, this._colorZoneStore = new n.ColorZoneStore(), this._shouldUpdateDimensions = !0, this._shouldUpdateAnchor = !0, this._lastKnownBufferLength = 0, this._canvas = document.createElement("canvas"), this._canvas.classList.add("xterm-decoration-overview-ruler"), this._refreshCanvasDimensions(), null === (c = this._viewportElement.parentElement) || void 0 === c || c.insertBefore(this._canvas, this._viewportElement);
              const l = this._canvas.getContext("2d");
              if (!l) throw new Error("Ctx cannot be null");
              this._ctx = l, this._registerDecorationListeners(), this._registerBufferChangeListeners(), this._registerDimensionChangeListeners(), this.register((0, h.toDisposable)(() => {
                var e;
                null === (e = this._canvas) || void 0 === e || e.remove();
              }));
            }
            get _width() {
              return this._optionsService.options.overviewRulerWidth || 0;
            }
            _registerDecorationListeners() {
              this.register(this._decorationService.onDecorationRegistered(() => this._queueRefresh(void 0, !0))), this.register(this._decorationService.onDecorationRemoved(() => this._queueRefresh(void 0, !0)));
            }
            _registerBufferChangeListeners() {
              this.register(this._renderService.onRenderedViewportChange(() => this._queueRefresh())), this.register(this._bufferService.buffers.onBufferActivate(() => {
                this._canvas.style.display = this._bufferService.buffer === this._bufferService.buffers.alt ? "none" : "block";
              })), this.register(this._bufferService.onScroll(() => {
                this._lastKnownBufferLength !== this._bufferService.buffers.normal.lines.length && (this._refreshDrawHeightConstants(), this._refreshColorZonePadding());
              }));
            }
            _registerDimensionChangeListeners() {
              this.register(this._renderService.onRender(() => {
                this._containerHeight && this._containerHeight === this._screenElement.clientHeight || (this._queueRefresh(!0), this._containerHeight = this._screenElement.clientHeight);
              })), this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth", () => this._queueRefresh(!0))), this.register((0, o.addDisposableDomListener)(this._coreBrowseService.window, "resize", () => this._queueRefresh(!0))), this._queueRefresh(!0);
            }
            _refreshDrawConstants() {
              const e = Math.floor(this._canvas.width / 3),
                t = Math.ceil(this._canvas.width / 3);
              d.full = this._canvas.width, d.left = e, d.center = t, d.right = e, this._refreshDrawHeightConstants(), _.full = 0, _.left = 0, _.center = d.left, _.right = d.left + d.center;
            }
            _refreshDrawHeightConstants() {
              l.full = Math.round(2 * this._coreBrowseService.dpr);
              const e = this._canvas.height / this._bufferService.buffer.lines.length,
                t = Math.round(Math.max(Math.min(e, 12), 6) * this._coreBrowseService.dpr);
              l.left = t, l.center = t, l.right = t;
            }
            _refreshColorZonePadding() {
              this._colorZoneStore.setPadding({
                full: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * l.full),
                left: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * l.left),
                center: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * l.center),
                right: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * l.right)
              }), this._lastKnownBufferLength = this._bufferService.buffers.normal.lines.length;
            }
            _refreshCanvasDimensions() {
              this._canvas.style.width = `${this._width}px`, this._canvas.width = Math.round(this._width * this._coreBrowseService.dpr), this._canvas.style.height = `${this._screenElement.clientHeight}px`, this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowseService.dpr), this._refreshDrawConstants(), this._refreshColorZonePadding();
            }
            _refreshDecorations() {
              this._shouldUpdateDimensions && this._refreshCanvasDimensions(), this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height), this._colorZoneStore.clear();
              for (const e of this._decorationService.decorations) this._colorZoneStore.addDecoration(e);
              this._ctx.lineWidth = 1;
              const e = this._colorZoneStore.zones;
              for (const t of e) "full" !== t.position && this._renderColorZone(t);
              for (const t of e) "full" === t.position && this._renderColorZone(t);
              this._shouldUpdateDimensions = !1, this._shouldUpdateAnchor = !1;
            }
            _renderColorZone(e) {
              this._ctx.fillStyle = e.color, this._ctx.fillRect(_[e.position || "full"], Math.round((this._canvas.height - 1) * (e.startBufferLine / this._bufferService.buffers.active.lines.length) - l[e.position || "full"] / 2), d[e.position || "full"], Math.round((this._canvas.height - 1) * ((e.endBufferLine - e.startBufferLine) / this._bufferService.buffers.active.lines.length) + l[e.position || "full"]));
            }
            _queueRefresh(e, t) {
              this._shouldUpdateDimensions = e || this._shouldUpdateDimensions, this._shouldUpdateAnchor = t || this._shouldUpdateAnchor, void 0 === this._animationFrame && (this._animationFrame = this._coreBrowseService.window.requestAnimationFrame(() => {
                this._refreshDecorations(), this._animationFrame = void 0;
              }));
            }
          };
          u = s([r(2, c.IBufferService), r(3, c.IDecorationService), r(4, a.IRenderService), r(5, c.IOptionsService), r(6, a.ICoreBrowserService)], u), t.OverviewRulerRenderer = u;
        },
        2950: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CompositionHelper = void 0;
          const n = i(4725),
            o = i(2585),
            a = i(2584);
          let h = class {
            constructor(e, t, i, s, r, n) {
              this._textarea = e, this._compositionView = t, this._bufferService = i, this._optionsService = s, this._coreService = r, this._renderService = n, this._isComposing = !1, this._isSendingComposition = !1, this._compositionPosition = {
                start: 0,
                end: 0
              }, this._dataAlreadySent = "";
            }
            get isComposing() {
              return this._isComposing;
            }
            compositionstart() {
              this._isComposing = !0, this._compositionPosition.start = this._textarea.value.length, this._compositionView.textContent = "", this._dataAlreadySent = "", this._compositionView.classList.add("active");
            }
            compositionupdate(e) {
              this._compositionView.textContent = e.data, this.updateCompositionElements(), setTimeout(() => {
                this._compositionPosition.end = this._textarea.value.length;
              }, 0);
            }
            compositionend() {
              this._finalizeComposition(!0);
            }
            keydown(e) {
              if (this._isComposing || this._isSendingComposition) {
                if (229 === e.keyCode) return !1;
                if (16 === e.keyCode || 17 === e.keyCode || 18 === e.keyCode) return !1;
                this._finalizeComposition(!1);
              }
              return 229 !== e.keyCode || (this._handleAnyTextareaChanges(), !1);
            }
            _finalizeComposition(e) {
              if (this._compositionView.classList.remove("active"), this._isComposing = !1, e) {
                const e = {
                  start: this._compositionPosition.start,
                  end: this._compositionPosition.end
                };
                this._isSendingComposition = !0, setTimeout(() => {
                  if (this._isSendingComposition) {
                    let t;
                    this._isSendingComposition = !1, e.start += this._dataAlreadySent.length, t = this._isComposing ? this._textarea.value.substring(e.start, e.end) : this._textarea.value.substring(e.start), t.length > 0 && this._coreService.triggerDataEvent(t, !0);
                  }
                }, 0);
              } else {
                this._isSendingComposition = !1;
                const e = this._textarea.value.substring(this._compositionPosition.start, this._compositionPosition.end);
                this._coreService.triggerDataEvent(e, !0);
              }
            }
            _handleAnyTextareaChanges() {
              const e = this._textarea.value;
              setTimeout(() => {
                if (!this._isComposing) {
                  const t = this._textarea.value,
                    i = t.replace(e, "");
                  this._dataAlreadySent = i, t.length > e.length ? this._coreService.triggerDataEvent(i, !0) : t.length < e.length ? this._coreService.triggerDataEvent(`${a.C0.DEL}`, !0) : t.length === e.length && t !== e && this._coreService.triggerDataEvent(t, !0);
                }
              }, 0);
            }
            updateCompositionElements(e) {
              if (this._isComposing) {
                if (this._bufferService.buffer.isCursorInViewport) {
                  const e = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1),
                    t = this._renderService.dimensions.css.cell.height,
                    i = this._bufferService.buffer.y * this._renderService.dimensions.css.cell.height,
                    s = e * this._renderService.dimensions.css.cell.width;
                  this._compositionView.style.left = s + "px", this._compositionView.style.top = i + "px", this._compositionView.style.height = t + "px", this._compositionView.style.lineHeight = t + "px", this._compositionView.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._compositionView.style.fontSize = this._optionsService.rawOptions.fontSize + "px";
                  const r = this._compositionView.getBoundingClientRect();
                  this._textarea.style.left = s + "px", this._textarea.style.top = i + "px", this._textarea.style.width = Math.max(r.width, 1) + "px", this._textarea.style.height = Math.max(r.height, 1) + "px", this._textarea.style.lineHeight = r.height + "px";
                }
                e || setTimeout(() => this.updateCompositionElements(!0), 0);
              }
            }
          };
          h = s([r(2, o.IBufferService), r(3, o.IOptionsService), r(4, o.ICoreService), r(5, n.IRenderService)], h), t.CompositionHelper = h;
        },
        9806: (e, t) => {
          function i(e, t, i) {
            const s = i.getBoundingClientRect(),
              r = e.getComputedStyle(i),
              n = parseInt(r.getPropertyValue("padding-left")),
              o = parseInt(r.getPropertyValue("padding-top"));
            return [t.clientX - s.left - n, t.clientY - s.top - o];
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.getCoords = t.getCoordsRelativeToElement = void 0, t.getCoordsRelativeToElement = i, t.getCoords = function (e, t, s, r, n, o, a, h, c) {
            if (!o) return;
            const l = i(e, t, s);
            return l ? (l[0] = Math.ceil((l[0] + (c ? a / 2 : 0)) / a), l[1] = Math.ceil(l[1] / h), l[0] = Math.min(Math.max(l[0], 1), r + (c ? 1 : 0)), l[1] = Math.min(Math.max(l[1], 1), n), l) : void 0;
          };
        },
        9504: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.moveToCellSequence = void 0;
          const s = i(2584);
          function r(e, t, i, s) {
            const r = e - n(e, i),
              a = t - n(t, i),
              l = Math.abs(r - a) - function (e, t, i) {
                let s = 0;
                const r = e - n(e, i),
                  a = t - n(t, i);
                for (let n = 0; n < Math.abs(r - a); n++) {
                  const a = "A" === o(e, t) ? -1 : 1,
                    h = i.buffer.lines.get(r + a * n);
                  (null == h ? void 0 : h.isWrapped) && s++;
                }
                return s;
              }(e, t, i);
            return c(l, h(o(e, t), s));
          }
          function n(e, t) {
            let i = 0,
              s = t.buffer.lines.get(e),
              r = null == s ? void 0 : s.isWrapped;
            for (; r && e >= 0 && e < t.rows;) i++, s = t.buffer.lines.get(--e), r = null == s ? void 0 : s.isWrapped;
            return i;
          }
          function o(e, t) {
            return e > t ? "A" : "B";
          }
          function a(e, t, i, s, r, n) {
            let o = e,
              a = t,
              h = "";
            for (; o !== i || a !== s;) o += r ? 1 : -1, r && o > n.cols - 1 ? (h += n.buffer.translateBufferLineToString(a, !1, e, o), o = 0, e = 0, a++) : !r && o < 0 && (h += n.buffer.translateBufferLineToString(a, !1, 0, e + 1), o = n.cols - 1, e = o, a--);
            return h + n.buffer.translateBufferLineToString(a, !1, e, o);
          }
          function h(e, t) {
            const i = t ? "O" : "[";
            return s.C0.ESC + i + e;
          }
          function c(e, t) {
            e = Math.floor(e);
            let i = "";
            for (let s = 0; s < e; s++) i += t;
            return i;
          }
          t.moveToCellSequence = function (e, t, i, s) {
            const o = i.buffer.x,
              l = i.buffer.y;
            if (!i.buffer.hasScrollback) return function (e, t, i, s, o, l) {
              return 0 === r(t, s, o, l).length ? "" : c(a(e, t, e, t - n(t, o), !1, o).length, h("D", l));
            }(o, l, 0, t, i, s) + r(l, t, i, s) + function (e, t, i, s, o, l) {
              let d;
              d = r(t, s, o, l).length > 0 ? s - n(s, o) : t;
              const _ = s,
                u = function (e, t, i, s, o, a) {
                  let h;
                  return h = r(i, s, o, a).length > 0 ? s - n(s, o) : t, e < i && h <= s || e >= i && h < s ? "C" : "D";
                }(e, t, i, s, o, l);
              return c(a(e, d, i, _, "C" === u, o).length, h(u, l));
            }(o, l, e, t, i, s);
            let d;
            if (l === t) return d = o > e ? "D" : "C", c(Math.abs(o - e), h(d, s));
            d = l > t ? "D" : "C";
            const _ = Math.abs(l - t);
            return c(function (e, t) {
              return t.cols - e;
            }(l > t ? e : o, i) + (_ - 1) * i.cols + 1 + ((l > t ? o : e) - 1), h(d, s));
          };
        },
        1296: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.DomRenderer = void 0;
          const n = i(9631),
            o = i(3787),
            a = i(2223),
            h = i(6171),
            c = i(4725),
            l = i(8055),
            d = i(8460),
            _ = i(844),
            u = i(2585),
            f = "xterm-dom-renderer-owner-",
            v = "xterm-focus";
          let g = 1,
            p = class extends _.Disposable {
              constructor(e, t, i, s, r, a, c, l, u, v) {
                super(), this._element = e, this._screenElement = t, this._viewportElement = i, this._linkifier2 = s, this._charSizeService = a, this._optionsService = c, this._bufferService = l, this._coreBrowserService = u, this._terminalClass = g++, this._rowElements = [], this._cellToRowElements = [], this.onRequestRedraw = this.register(new d.EventEmitter()).event, this._rowContainer = document.createElement("div"), this._rowContainer.classList.add("xterm-rows"), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = document.createElement("div"), this._selectionContainer.classList.add("xterm-selection"), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = (0, h.createRenderDimensions)(), this._updateDimensions(), this.register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this.register(v.onChangeColors(e => this._injectCss(e))), this._injectCss(v.colors), this._rowFactory = r.createInstance(o.DomRendererRowFactory, document), this._element.classList.add(f + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this.register(this._linkifier2.onShowLinkUnderline(e => this._handleLinkHover(e))), this.register(this._linkifier2.onHideLinkUnderline(e => this._handleLinkLeave(e))), this.register((0, _.toDisposable)(() => {
                  this._element.classList.remove(f + this._terminalClass), (0, n.removeElementFromParent)(this._rowContainer, this._selectionContainer, this._themeStyleElement, this._dimensionsStyleElement);
                }));
              }
              _updateDimensions() {
                const e = this._coreBrowserService.dpr;
                this.dimensions.device.char.width = this._charSizeService.width * e, this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * e), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.left = 0, this.dimensions.device.char.top = 0, this.dimensions.device.canvas.width = this.dimensions.device.cell.width * this._bufferService.cols, this.dimensions.device.canvas.height = this.dimensions.device.cell.height * this._bufferService.rows, this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / e), this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / e), this.dimensions.css.cell.width = this.dimensions.css.canvas.width / this._bufferService.cols, this.dimensions.css.cell.height = this.dimensions.css.canvas.height / this._bufferService.rows;
                for (const e of this._rowElements) e.style.width = `${this.dimensions.css.canvas.width}px`, e.style.height = `${this.dimensions.css.cell.height}px`, e.style.lineHeight = `${this.dimensions.css.cell.height}px`, e.style.overflow = "hidden";
                this._dimensionsStyleElement || (this._dimensionsStyleElement = document.createElement("style"), this._screenElement.appendChild(this._dimensionsStyleElement));
                const t = `${this._terminalSelector} .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: ${this.dimensions.css.cell.width}px}`;
                this._dimensionsStyleElement.textContent = t, this._selectionContainer.style.height = this._viewportElement.style.height, this._screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._screenElement.style.height = `${this.dimensions.css.canvas.height}px`;
              }
              _injectCss(e) {
                this._themeStyleElement || (this._themeStyleElement = document.createElement("style"), this._screenElement.appendChild(this._themeStyleElement));
                let t = `${this._terminalSelector} .xterm-rows { color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px;}`;
                t += `${this._terminalSelector} span:not(.${o.BOLD_CLASS}) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.${o.BOLD_CLASS} { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.${o.ITALIC_CLASS} { font-style: italic;}`, t += "@keyframes blink_box_shadow_" + this._terminalClass + " { 50% {  box-shadow: none; }}", t += "@keyframes blink_block_" + this._terminalClass + " { 0% {" + `  background-color: ${e.cursor.css};` + `  color: ${e.cursorAccent.css}; } 50% {` + `  background-color: ${e.cursorAccent.css};` + `  color: ${e.cursor.css}; }}`, t += `${this._terminalSelector} .xterm-rows:not(.xterm-focus) .${o.CURSOR_CLASS}.${o.CURSOR_STYLE_BLOCK_CLASS} { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .xterm-rows.xterm-focus .${o.CURSOR_CLASS}.${o.CURSOR_BLINK_CLASS}:not(.${o.CURSOR_STYLE_BLOCK_CLASS}) { animation: blink_box_shadow_` + this._terminalClass + " 1s step-end infinite;}" + `${this._terminalSelector} .xterm-rows.xterm-focus .${o.CURSOR_CLASS}.${o.CURSOR_BLINK_CLASS}.${o.CURSOR_STYLE_BLOCK_CLASS} { animation: blink_block_` + this._terminalClass + " 1s step-end infinite;}" + `${this._terminalSelector} .xterm-rows.xterm-focus .${o.CURSOR_CLASS}.${o.CURSOR_STYLE_BLOCK_CLASS} {` + ` background-color: ${e.cursor.css};` + ` color: ${e.cursorAccent.css};}` + `${this._terminalSelector} .xterm-rows .${o.CURSOR_CLASS}.${o.CURSOR_STYLE_BAR_CLASS} {` + ` box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}` + `${this._terminalSelector} .xterm-rows .${o.CURSOR_CLASS}.${o.CURSOR_STYLE_UNDERLINE_CLASS} {` + ` box-shadow: 0 -1px 0 ${e.cursor.css} inset;}`, t += `${this._terminalSelector} .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .xterm-selection div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .xterm-selection div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;
                for (const [i, s] of e.ansi.entries()) t += `${this._terminalSelector} .xterm-fg-${i} { color: ${s.css}; }${this._terminalSelector} .xterm-bg-${i} { background-color: ${s.css}; }`;
                t += `${this._terminalSelector} .xterm-fg-${a.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(e.background).css}; }${this._terminalSelector} .xterm-bg-${a.INVERTED_DEFAULT_COLOR} { background-color: ${e.foreground.css}; }`, this._themeStyleElement.textContent = t;
              }
              handleDevicePixelRatioChange() {
                this._updateDimensions();
              }
              _refreshRowElements(e, t) {
                for (let e = this._rowElements.length; e <= t; e++) {
                  const e = document.createElement("div");
                  this._rowContainer.appendChild(e), this._rowElements.push(e);
                }
                for (; this._rowElements.length > t;) this._rowContainer.removeChild(this._rowElements.pop());
              }
              handleResize(e, t) {
                this._refreshRowElements(e, t), this._updateDimensions();
              }
              handleCharSizeChanged() {
                this._updateDimensions();
              }
              handleBlur() {
                this._rowContainer.classList.remove(v);
              }
              handleFocus() {
                this._rowContainer.classList.add(v);
              }
              handleSelectionChanged(e, t, i) {
                for (; this._selectionContainer.children.length;) this._selectionContainer.removeChild(this._selectionContainer.children[0]);
                if (this._rowFactory.handleSelectionChanged(e, t, i), this.renderRows(0, this._bufferService.rows - 1), !e || !t) return;
                const s = e[1] - this._bufferService.buffer.ydisp,
                  r = t[1] - this._bufferService.buffer.ydisp,
                  n = Math.max(s, 0),
                  o = Math.min(r, this._bufferService.rows - 1);
                if (n >= this._bufferService.rows || o < 0) return;
                const a = document.createDocumentFragment();
                if (i) {
                  const i = e[0] > t[0];
                  a.appendChild(this._createSelectionElement(n, i ? t[0] : e[0], i ? e[0] : t[0], o - n + 1));
                } else {
                  const i = s === n ? e[0] : 0,
                    h = n === r ? t[0] : this._bufferService.cols;
                  a.appendChild(this._createSelectionElement(n, i, h));
                  const c = o - n - 1;
                  if (a.appendChild(this._createSelectionElement(n + 1, 0, this._bufferService.cols, c)), n !== o) {
                    const e = r === o ? t[0] : this._bufferService.cols;
                    a.appendChild(this._createSelectionElement(o, 0, e));
                  }
                }
                this._selectionContainer.appendChild(a);
              }
              _createSelectionElement(e, t, i, s = 1) {
                const r = document.createElement("div");
                return r.style.height = s * this.dimensions.css.cell.height + "px", r.style.top = e * this.dimensions.css.cell.height + "px", r.style.left = t * this.dimensions.css.cell.width + "px", r.style.width = this.dimensions.css.cell.width * (i - t) + "px", r;
              }
              handleCursorMove() {}
              _handleOptionsChanged() {
                this._updateDimensions();
              }
              clear() {
                for (const e of this._rowElements) e.replaceChildren();
              }
              renderRows(e, t) {
                const i = this._bufferService.buffer.ybase + this._bufferService.buffer.y,
                  s = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1),
                  r = this._optionsService.rawOptions.cursorBlink;
                for (let n = e; n <= t; n++) {
                  const e = this._rowElements[n],
                    t = n + this._bufferService.buffer.ydisp,
                    o = this._bufferService.buffer.lines.get(t),
                    a = this._optionsService.rawOptions.cursorStyle;
                  this._cellToRowElements[n] && this._cellToRowElements[n].length === this._bufferService.cols || (this._cellToRowElements[n] = new Int16Array(this._bufferService.cols)), e.replaceChildren(this._rowFactory.createRow(o, t, t === i, a, s, r, this.dimensions.css.cell.width, this._bufferService.cols, this._cellToRowElements[n]));
                }
              }
              get _terminalSelector() {
                return `.${f}${this._terminalClass}`;
              }
              _handleLinkHover(e) {
                this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, !0);
              }
              _handleLinkLeave(e) {
                this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, !1);
              }
              _setCellUnderline(e, t, i, s, r, n) {
                if (e = this._cellToRowElements[i][e], t = this._cellToRowElements[s][t], -1 !== e && -1 !== t) for (; e !== t || i !== s;) {
                  const t = this._rowElements[i];
                  if (!t) return;
                  const s = t.children[e];
                  s && (s.style.textDecoration = n ? "underline" : "none"), ++e >= r && (e = 0, i++);
                }
              }
            };
          p = s([r(4, u.IInstantiationService), r(5, c.ICharSizeService), r(6, u.IOptionsService), r(7, u.IBufferService), r(8, c.ICoreBrowserService), r(9, c.IThemeService)], p), t.DomRenderer = p;
        },
        3787: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.DomRendererRowFactory = t.CURSOR_STYLE_UNDERLINE_CLASS = t.CURSOR_STYLE_BAR_CLASS = t.CURSOR_STYLE_BLOCK_CLASS = t.CURSOR_BLINK_CLASS = t.CURSOR_CLASS = t.STRIKETHROUGH_CLASS = t.UNDERLINE_CLASS = t.ITALIC_CLASS = t.DIM_CLASS = t.BOLD_CLASS = void 0;
          const n = i(2223),
            o = i(643),
            a = i(511),
            h = i(2585),
            c = i(8055),
            l = i(4725),
            d = i(4269),
            _ = i(6171),
            u = i(3734);
          t.BOLD_CLASS = "xterm-bold", t.DIM_CLASS = "xterm-dim", t.ITALIC_CLASS = "xterm-italic", t.UNDERLINE_CLASS = "xterm-underline", t.STRIKETHROUGH_CLASS = "xterm-strikethrough", t.CURSOR_CLASS = "xterm-cursor", t.CURSOR_BLINK_CLASS = "xterm-cursor-blink", t.CURSOR_STYLE_BLOCK_CLASS = "xterm-cursor-block", t.CURSOR_STYLE_BAR_CLASS = "xterm-cursor-bar", t.CURSOR_STYLE_UNDERLINE_CLASS = "xterm-cursor-underline";
          let f = class {
            constructor(e, t, i, s, r, n, o) {
              this._document = e, this._characterJoinerService = t, this._optionsService = i, this._coreBrowserService = s, this._coreService = r, this._decorationService = n, this._themeService = o, this._workCell = new a.CellData(), this._columnSelectMode = !1;
            }
            handleSelectionChanged(e, t, i) {
              this._selectionStart = e, this._selectionEnd = t, this._columnSelectMode = i;
            }
            createRow(e, i, s, r, a, h, l, _, f) {
              const g = this._document.createDocumentFragment(),
                p = this._characterJoinerService.getJoinedCharacters(i);
              let S = 0;
              for (let t = Math.min(e.length, _) - 1; t >= 0; t--) if (e.loadCell(t, this._workCell).getCode() !== o.NULL_CELL_CODE || s && t === a) {
                S = t + 1;
                break;
              }
              const m = this._themeService.colors;
              let C = -1,
                b = 0;
              for (; b < S; b++) {
                e.loadCell(b, this._workCell);
                let _ = this._workCell.getWidth();
                if (0 === _) {
                  f[b] = C;
                  continue;
                }
                let S = !1,
                  y = b,
                  w = this._workCell;
                if (p.length > 0 && b === p[0][0]) {
                  S = !0;
                  const t = p.shift();
                  w = new d.JoinedCellData(this._workCell, e.translateToString(!0, t[0], t[1]), t[1] - t[0]), y = t[1] - 1, _ = w.getWidth();
                }
                const E = this._document.createElement("span");
                if (_ > 1 && (E.style.width = l * _ + "px"), S && (E.style.display = "inline", a >= b && a <= y && (a = b)), !this._coreService.isCursorHidden && s && b === a) switch (E.classList.add(t.CURSOR_CLASS), h && E.classList.add(t.CURSOR_BLINK_CLASS), r) {
                  case "bar":
                    E.classList.add(t.CURSOR_STYLE_BAR_CLASS);
                    break;
                  case "underline":
                    E.classList.add(t.CURSOR_STYLE_UNDERLINE_CLASS);
                    break;
                  default:
                    E.classList.add(t.CURSOR_STYLE_BLOCK_CLASS);
                }
                if (w.isBold() && E.classList.add(t.BOLD_CLASS), w.isItalic() && E.classList.add(t.ITALIC_CLASS), w.isDim() && E.classList.add(t.DIM_CLASS), w.isInvisible() ? E.textContent = o.WHITESPACE_CELL_CHAR : E.textContent = w.getChars() || o.WHITESPACE_CELL_CHAR, w.isUnderline() && (E.classList.add(`${t.UNDERLINE_CLASS}-${w.extended.underlineStyle}`), " " === E.textContent && (E.textContent = " "), !w.isUnderlineColorDefault())) if (w.isUnderlineColorRGB()) E.style.textDecorationColor = `rgb(${u.AttributeData.toColorRGB(w.getUnderlineColor()).join(",")})`;else {
                  let e = w.getUnderlineColor();
                  this._optionsService.rawOptions.drawBoldTextInBrightColors && w.isBold() && e < 8 && (e += 8), E.style.textDecorationColor = m.ansi[e].css;
                }
                w.isStrikethrough() && E.classList.add(t.STRIKETHROUGH_CLASS);
                let L = w.getFgColor(),
                  k = w.getFgColorMode(),
                  R = w.getBgColor(),
                  D = w.getBgColorMode();
                const A = !!w.isInverse();
                if (A) {
                  const e = L;
                  L = R, R = e;
                  const t = k;
                  k = D, D = t;
                }
                let x,
                  B,
                  T = !1;
                this._decorationService.forEachDecorationAtCell(b, i, void 0, e => {
                  "top" !== e.options.layer && T || (e.backgroundColorRGB && (D = 50331648, R = e.backgroundColorRGB.rgba >> 8 & 16777215, x = e.backgroundColorRGB), e.foregroundColorRGB && (k = 50331648, L = e.foregroundColorRGB.rgba >> 8 & 16777215, B = e.foregroundColorRGB), T = "top" === e.options.layer);
                });
                const M = this._isCellInSelection(b, i);
                let O;
                switch (T || m.selectionForeground && M && (k = 50331648, L = m.selectionForeground.rgba >> 8 & 16777215, B = m.selectionForeground), M && (x = this._coreBrowserService.isFocused ? m.selectionBackgroundOpaque : m.selectionInactiveBackgroundOpaque, T = !0), T && E.classList.add("xterm-decoration-top"), D) {
                  case 16777216:
                  case 33554432:
                    O = m.ansi[R], E.classList.add(`xterm-bg-${R}`);
                    break;
                  case 50331648:
                    O = c.rgba.toColor(R >> 16, R >> 8 & 255, 255 & R), this._addStyle(E, `background-color:#${v((R >>> 0).toString(16), "0", 6)}`);
                    break;
                  default:
                    A ? (O = m.foreground, E.classList.add(`xterm-bg-${n.INVERTED_DEFAULT_COLOR}`)) : O = m.background;
                }
                switch (x || w.isDim() && (x = c.color.multiplyOpacity(O, .5)), k) {
                  case 16777216:
                  case 33554432:
                    w.isBold() && L < 8 && this._optionsService.rawOptions.drawBoldTextInBrightColors && (L += 8), this._applyMinimumContrast(E, O, m.ansi[L], w, x, void 0) || E.classList.add(`xterm-fg-${L}`);
                    break;
                  case 50331648:
                    const e = c.rgba.toColor(L >> 16 & 255, L >> 8 & 255, 255 & L);
                    this._applyMinimumContrast(E, O, e, w, x, B) || this._addStyle(E, `color:#${v(L.toString(16), "0", 6)}`);
                    break;
                  default:
                    this._applyMinimumContrast(E, O, m.foreground, w, x, void 0) || A && E.classList.add(`xterm-fg-${n.INVERTED_DEFAULT_COLOR}`);
                }
                g.appendChild(E), f[b] = ++C, b = y;
              }
              return b < _ - 1 && f.subarray(b).fill(++C), g;
            }
            _applyMinimumContrast(e, t, i, s, r, n) {
              if (1 === this._optionsService.rawOptions.minimumContrastRatio || (0, _.excludeFromContrastRatioDemands)(s.getCode())) return !1;
              let o;
              return r || n || (o = this._themeService.colors.contrastCache.getColor(t.rgba, i.rgba)), void 0 === o && (o = c.color.ensureContrastRatio(r || t, n || i, this._optionsService.rawOptions.minimumContrastRatio), this._themeService.colors.contrastCache.setColor((r || t).rgba, (n || i).rgba, null != o ? o : null)), !!o && (this._addStyle(e, `color:${o.css}`), !0);
            }
            _addStyle(e, t) {
              e.setAttribute("style", `${e.getAttribute("style") || ""}${t};`);
            }
            _isCellInSelection(e, t) {
              const i = this._selectionStart,
                s = this._selectionEnd;
              return !(!i || !s) && (this._columnSelectMode ? i[0] <= s[0] ? e >= i[0] && t >= i[1] && e < s[0] && t <= s[1] : e < i[0] && t >= i[1] && e >= s[0] && t <= s[1] : t > i[1] && t < s[1] || i[1] === s[1] && t === i[1] && e >= i[0] && e < s[0] || i[1] < s[1] && t === s[1] && e < s[0] || i[1] < s[1] && t === i[1] && e >= i[0]);
            }
          };
          function v(e, t, i) {
            for (; e.length < i;) e = t + e;
            return e;
          }
          f = s([r(1, l.ICharacterJoinerService), r(2, h.IOptionsService), r(3, l.ICoreBrowserService), r(4, h.ICoreService), r(5, h.IDecorationService), r(6, l.IThemeService)], f), t.DomRendererRowFactory = f;
        },
        2223: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.TEXT_BASELINE = t.DIM_OPACITY = t.INVERTED_DEFAULT_COLOR = void 0;
          const s = i(6114);
          t.INVERTED_DEFAULT_COLOR = 257, t.DIM_OPACITY = .5, t.TEXT_BASELINE = s.isFirefox || s.isLegacyEdge ? "bottom" : "ideographic";
        },
        6171: (e, t) => {
          function i(e) {
            return 57508 <= e && e <= 57558;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.createRenderDimensions = t.excludeFromContrastRatioDemands = t.isRestrictedPowerlineGlyph = t.isPowerlineGlyph = t.throwIfFalsy = void 0, t.throwIfFalsy = function (e) {
            if (!e) throw new Error("value must not be falsy");
            return e;
          }, t.isPowerlineGlyph = i, t.isRestrictedPowerlineGlyph = function (e) {
            return 57520 <= e && e <= 57527;
          }, t.excludeFromContrastRatioDemands = function (e) {
            return i(e) || function (e) {
              return 9472 <= e && e <= 9631;
            }(e);
          }, t.createRenderDimensions = function () {
            return {
              css: {
                canvas: {
                  width: 0,
                  height: 0
                },
                cell: {
                  width: 0,
                  height: 0
                }
              },
              device: {
                canvas: {
                  width: 0,
                  height: 0
                },
                cell: {
                  width: 0,
                  height: 0
                },
                char: {
                  width: 0,
                  height: 0,
                  left: 0,
                  top: 0
                }
              }
            };
          };
        },
        456: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.SelectionModel = void 0, t.SelectionModel = class {
            constructor(e) {
              this._bufferService = e, this.isSelectAllActive = !1, this.selectionStartLength = 0;
            }
            clearSelection() {
              this.selectionStart = void 0, this.selectionEnd = void 0, this.isSelectAllActive = !1, this.selectionStartLength = 0;
            }
            get finalSelectionStart() {
              return this.isSelectAllActive ? [0, 0] : this.selectionEnd && this.selectionStart && this.areSelectionValuesReversed() ? this.selectionEnd : this.selectionStart;
            }
            get finalSelectionEnd() {
              if (this.isSelectAllActive) return [this._bufferService.cols, this._bufferService.buffer.ybase + this._bufferService.rows - 1];
              if (this.selectionStart) {
                if (!this.selectionEnd || this.areSelectionValuesReversed()) {
                  const e = this.selectionStart[0] + this.selectionStartLength;
                  return e > this._bufferService.cols ? e % this._bufferService.cols == 0 ? [this._bufferService.cols, this.selectionStart[1] + Math.floor(e / this._bufferService.cols) - 1] : [e % this._bufferService.cols, this.selectionStart[1] + Math.floor(e / this._bufferService.cols)] : [e, this.selectionStart[1]];
                }
                if (this.selectionStartLength && this.selectionEnd[1] === this.selectionStart[1]) {
                  const e = this.selectionStart[0] + this.selectionStartLength;
                  return e > this._bufferService.cols ? [e % this._bufferService.cols, this.selectionStart[1] + Math.floor(e / this._bufferService.cols)] : [Math.max(e, this.selectionEnd[0]), this.selectionEnd[1]];
                }
                return this.selectionEnd;
              }
            }
            areSelectionValuesReversed() {
              const e = this.selectionStart,
                t = this.selectionEnd;
              return !(!e || !t) && (e[1] > t[1] || e[1] === t[1] && e[0] > t[0]);
            }
            handleTrim(e) {
              return this.selectionStart && (this.selectionStart[1] -= e), this.selectionEnd && (this.selectionEnd[1] -= e), this.selectionEnd && this.selectionEnd[1] < 0 ? (this.clearSelection(), !0) : (this.selectionStart && this.selectionStart[1] < 0 && (this.selectionStart[1] = 0), !1);
            }
          };
        },
        428: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CharSizeService = void 0;
          const n = i(2585),
            o = i(8460),
            a = i(844);
          let h = class extends a.Disposable {
            constructor(e, t, i) {
              super(), this._optionsService = i, this.width = 0, this.height = 0, this._onCharSizeChange = this.register(new o.EventEmitter()), this.onCharSizeChange = this._onCharSizeChange.event, this._measureStrategy = new c(e, t, this._optionsService), this.register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], () => this.measure()));
            }
            get hasValidSize() {
              return this.width > 0 && this.height > 0;
            }
            measure() {
              const e = this._measureStrategy.measure();
              e.width === this.width && e.height === this.height || (this.width = e.width, this.height = e.height, this._onCharSizeChange.fire());
            }
          };
          h = s([r(2, n.IOptionsService)], h), t.CharSizeService = h;
          class c {
            constructor(e, t, i) {
              this._document = e, this._parentElement = t, this._optionsService = i, this._result = {
                width: 0,
                height: 0
              }, this._measureElement = this._document.createElement("span"), this._measureElement.classList.add("xterm-char-measure-element"), this._measureElement.textContent = "W", this._measureElement.setAttribute("aria-hidden", "true"), this._parentElement.appendChild(this._measureElement);
            }
            measure() {
              this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`;
              const e = this._measureElement.getBoundingClientRect();
              return 0 !== e.width && 0 !== e.height && (this._result.width = e.width, this._result.height = Math.ceil(e.height)), this._result;
            }
          }
        },
        4269: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CharacterJoinerService = t.JoinedCellData = void 0;
          const n = i(3734),
            o = i(643),
            a = i(511),
            h = i(2585);
          class c extends n.AttributeData {
            constructor(e, t, i) {
              super(), this.content = 0, this.combinedData = "", this.fg = e.fg, this.bg = e.bg, this.combinedData = t, this._width = i;
            }
            isCombined() {
              return 2097152;
            }
            getWidth() {
              return this._width;
            }
            getChars() {
              return this.combinedData;
            }
            getCode() {
              return 2097151;
            }
            setFromCharData(e) {
              throw new Error("not implemented");
            }
            getAsCharData() {
              return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
            }
          }
          t.JoinedCellData = c;
          let l = class e {
            constructor(e) {
              this._bufferService = e, this._characterJoiners = [], this._nextCharacterJoinerId = 0, this._workCell = new a.CellData();
            }
            register(e) {
              const t = {
                id: this._nextCharacterJoinerId++,
                handler: e
              };
              return this._characterJoiners.push(t), t.id;
            }
            deregister(e) {
              for (let t = 0; t < this._characterJoiners.length; t++) if (this._characterJoiners[t].id === e) return this._characterJoiners.splice(t, 1), !0;
              return !1;
            }
            getJoinedCharacters(e) {
              if (0 === this._characterJoiners.length) return [];
              const t = this._bufferService.buffer.lines.get(e);
              if (!t || 0 === t.length) return [];
              const i = [],
                s = t.translateToString(!0);
              let r = 0,
                n = 0,
                a = 0,
                h = t.getFg(0),
                c = t.getBg(0);
              for (let e = 0; e < t.getTrimmedLength(); e++) if (t.loadCell(e, this._workCell), 0 !== this._workCell.getWidth()) {
                if (this._workCell.fg !== h || this._workCell.bg !== c) {
                  if (e - r > 1) {
                    const e = this._getJoinedRanges(s, a, n, t, r);
                    for (let t = 0; t < e.length; t++) i.push(e[t]);
                  }
                  r = e, a = n, h = this._workCell.fg, c = this._workCell.bg;
                }
                n += this._workCell.getChars().length || o.WHITESPACE_CELL_CHAR.length;
              }
              if (this._bufferService.cols - r > 1) {
                const e = this._getJoinedRanges(s, a, n, t, r);
                for (let t = 0; t < e.length; t++) i.push(e[t]);
              }
              return i;
            }
            _getJoinedRanges(t, i, s, r, n) {
              const o = t.substring(i, s);
              let a = [];
              try {
                a = this._characterJoiners[0].handler(o);
              } catch (e) {
                console.error(e);
              }
              for (let t = 1; t < this._characterJoiners.length; t++) try {
                const i = this._characterJoiners[t].handler(o);
                for (let t = 0; t < i.length; t++) e._mergeRanges(a, i[t]);
              } catch (e) {
                console.error(e);
              }
              return this._stringRangesToCellRanges(a, r, n), a;
            }
            _stringRangesToCellRanges(e, t, i) {
              let s = 0,
                r = !1,
                n = 0,
                a = e[s];
              if (a) {
                for (let h = i; h < this._bufferService.cols; h++) {
                  const i = t.getWidth(h),
                    c = t.getString(h).length || o.WHITESPACE_CELL_CHAR.length;
                  if (0 !== i) {
                    if (!r && a[0] <= n && (a[0] = h, r = !0), a[1] <= n) {
                      if (a[1] = h, a = e[++s], !a) break;
                      a[0] <= n ? (a[0] = h, r = !0) : r = !1;
                    }
                    n += c;
                  }
                }
                a && (a[1] = this._bufferService.cols);
              }
            }
            static _mergeRanges(e, t) {
              let i = !1;
              for (let s = 0; s < e.length; s++) {
                const r = e[s];
                if (i) {
                  if (t[1] <= r[0]) return e[s - 1][1] = t[1], e;
                  if (t[1] <= r[1]) return e[s - 1][1] = Math.max(t[1], r[1]), e.splice(s, 1), e;
                  e.splice(s, 1), s--;
                } else {
                  if (t[1] <= r[0]) return e.splice(s, 0, t), e;
                  if (t[1] <= r[1]) return r[0] = Math.min(t[0], r[0]), e;
                  t[0] < r[1] && (r[0] = Math.min(t[0], r[0]), i = !0);
                }
              }
              return i ? e[e.length - 1][1] = t[1] : e.push(t), e;
            }
          };
          l = s([r(0, h.IBufferService)], l), t.CharacterJoinerService = l;
        },
        5114: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CoreBrowserService = void 0, t.CoreBrowserService = class {
            constructor(e, t) {
              this._textarea = e, this.window = t, this._isFocused = !1, this._cachedIsFocused = void 0, this._textarea.addEventListener("focus", () => this._isFocused = !0), this._textarea.addEventListener("blur", () => this._isFocused = !1);
            }
            get dpr() {
              return this.window.devicePixelRatio;
            }
            get isFocused() {
              return void 0 === this._cachedIsFocused && (this._cachedIsFocused = this._isFocused && this._textarea.ownerDocument.hasFocus(), queueMicrotask(() => this._cachedIsFocused = void 0)), this._cachedIsFocused;
            }
          };
        },
        8934: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.MouseService = void 0;
          const n = i(4725),
            o = i(9806);
          let a = class {
            constructor(e, t) {
              this._renderService = e, this._charSizeService = t;
            }
            getCoords(e, t, i, s, r) {
              return (0, o.getCoords)(window, e, t, i, s, this._charSizeService.hasValidSize, this._renderService.dimensions.css.cell.width, this._renderService.dimensions.css.cell.height, r);
            }
            getMouseReportCoords(e, t) {
              const i = (0, o.getCoordsRelativeToElement)(window, e, t);
              if (!(!this._charSizeService.hasValidSize || i[0] < 0 || i[1] < 0 || i[0] >= this._renderService.dimensions.css.canvas.width || i[1] >= this._renderService.dimensions.css.canvas.height)) return {
                col: Math.floor(i[0] / this._renderService.dimensions.css.cell.width),
                row: Math.floor(i[1] / this._renderService.dimensions.css.cell.height),
                x: Math.floor(i[0]),
                y: Math.floor(i[1])
              };
            }
          };
          a = s([r(0, n.IRenderService), r(1, n.ICharSizeService)], a), t.MouseService = a;
        },
        3230: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.RenderService = void 0;
          const n = i(6193),
            o = i(8460),
            a = i(844),
            h = i(5596),
            c = i(3656),
            l = i(2585),
            d = i(4725),
            _ = i(7226);
          let u = class extends a.Disposable {
            constructor(e, t, i, s, r, a, l, d) {
              if (super(), this._rowCount = e, this._charSizeService = s, this._pausedResizeTask = new _.DebouncedIdleTask(), this._isPaused = !1, this._needsFullRefresh = !1, this._isNextRenderRedrawOnly = !0, this._needsSelectionRefresh = !1, this._canvasWidth = 0, this._canvasHeight = 0, this._selectionState = {
                start: void 0,
                end: void 0,
                columnSelectMode: !1
              }, this._onDimensionsChange = this.register(new o.EventEmitter()), this.onDimensionsChange = this._onDimensionsChange.event, this._onRenderedViewportChange = this.register(new o.EventEmitter()), this.onRenderedViewportChange = this._onRenderedViewportChange.event, this._onRender = this.register(new o.EventEmitter()), this.onRender = this._onRender.event, this._onRefreshRequest = this.register(new o.EventEmitter()), this.onRefreshRequest = this._onRefreshRequest.event, this.register({
                dispose: () => {
                  var e;
                  return null === (e = this._renderer) || void 0 === e ? void 0 : e.dispose();
                }
              }), this._renderDebouncer = new n.RenderDebouncer(l.window, (e, t) => this._renderRows(e, t)), this.register(this._renderDebouncer), this._screenDprMonitor = new h.ScreenDprMonitor(l.window), this._screenDprMonitor.setListener(() => this.handleDevicePixelRatioChange()), this.register(this._screenDprMonitor), this.register(a.onResize(() => this._fullRefresh())), this.register(a.buffers.onBufferActivate(() => {
                var e;
                return null === (e = this._renderer) || void 0 === e ? void 0 : e.clear();
              })), this.register(i.onOptionChange(() => this._handleOptionsChanged())), this.register(this._charSizeService.onCharSizeChange(() => this.handleCharSizeChanged())), this.register(r.onDecorationRegistered(() => this._fullRefresh())), this.register(r.onDecorationRemoved(() => this._fullRefresh())), this.register(i.onMultipleOptionChange(["customGlyphs", "drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio"], () => {
                this.clear(), this.handleResize(a.cols, a.rows), this._fullRefresh();
              })), this.register(i.onMultipleOptionChange(["cursorBlink", "cursorStyle"], () => this.refreshRows(a.buffer.y, a.buffer.y, !0))), this.register((0, c.addDisposableDomListener)(l.window, "resize", () => this.handleDevicePixelRatioChange())), this.register(d.onChangeColors(() => this._fullRefresh())), "IntersectionObserver" in l.window) {
                const e = new l.window.IntersectionObserver(e => this._handleIntersectionChange(e[e.length - 1]), {
                  threshold: 0
                });
                e.observe(t), this.register({
                  dispose: () => e.disconnect()
                });
              }
            }
            get dimensions() {
              return this._renderer.dimensions;
            }
            _handleIntersectionChange(e) {
              this._isPaused = void 0 === e.isIntersecting ? 0 === e.intersectionRatio : !e.isIntersecting, this._isPaused || this._charSizeService.hasValidSize || this._charSizeService.measure(), !this._isPaused && this._needsFullRefresh && (this._pausedResizeTask.flush(), this.refreshRows(0, this._rowCount - 1), this._needsFullRefresh = !1);
            }
            refreshRows(e, t, i = !1) {
              this._isPaused ? this._needsFullRefresh = !0 : (i || (this._isNextRenderRedrawOnly = !1), this._renderDebouncer.refresh(e, t, this._rowCount));
            }
            _renderRows(e, t) {
              this._renderer && (this._renderer.renderRows(e, t), this._needsSelectionRefresh && (this._renderer.handleSelectionChanged(this._selectionState.start, this._selectionState.end, this._selectionState.columnSelectMode), this._needsSelectionRefresh = !1), this._isNextRenderRedrawOnly || this._onRenderedViewportChange.fire({
                start: e,
                end: t
              }), this._onRender.fire({
                start: e,
                end: t
              }), this._isNextRenderRedrawOnly = !0);
            }
            resize(e, t) {
              this._rowCount = t, this._fireOnCanvasResize();
            }
            _handleOptionsChanged() {
              this._renderer && (this.refreshRows(0, this._rowCount - 1), this._fireOnCanvasResize());
            }
            _fireOnCanvasResize() {
              this._renderer && (this._renderer.dimensions.css.canvas.width === this._canvasWidth && this._renderer.dimensions.css.canvas.height === this._canvasHeight || this._onDimensionsChange.fire(this._renderer.dimensions));
            }
            hasRenderer() {
              return !!this._renderer;
            }
            setRenderer(e) {
              var t;
              null === (t = this._renderer) || void 0 === t || t.dispose(), this._renderer = e, this._renderer.onRequestRedraw(e => this.refreshRows(e.start, e.end, !0)), this._needsSelectionRefresh = !0, this._fullRefresh();
            }
            addRefreshCallback(e) {
              return this._renderDebouncer.addRefreshCallback(e);
            }
            _fullRefresh() {
              this._isPaused ? this._needsFullRefresh = !0 : this.refreshRows(0, this._rowCount - 1);
            }
            clearTextureAtlas() {
              var e, t;
              this._renderer && (null === (t = (e = this._renderer).clearTextureAtlas) || void 0 === t || t.call(e), this._fullRefresh());
            }
            handleDevicePixelRatioChange() {
              this._charSizeService.measure(), this._renderer && (this._renderer.handleDevicePixelRatioChange(), this.refreshRows(0, this._rowCount - 1));
            }
            handleResize(e, t) {
              this._renderer && (this._isPaused ? this._pausedResizeTask.set(() => this._renderer.handleResize(e, t)) : this._renderer.handleResize(e, t), this._fullRefresh());
            }
            handleCharSizeChanged() {
              var e;
              null === (e = this._renderer) || void 0 === e || e.handleCharSizeChanged();
            }
            handleBlur() {
              var e;
              null === (e = this._renderer) || void 0 === e || e.handleBlur();
            }
            handleFocus() {
              var e;
              null === (e = this._renderer) || void 0 === e || e.handleFocus();
            }
            handleSelectionChanged(e, t, i) {
              var s;
              this._selectionState.start = e, this._selectionState.end = t, this._selectionState.columnSelectMode = i, null === (s = this._renderer) || void 0 === s || s.handleSelectionChanged(e, t, i);
            }
            handleCursorMove() {
              var e;
              null === (e = this._renderer) || void 0 === e || e.handleCursorMove();
            }
            clear() {
              var e;
              null === (e = this._renderer) || void 0 === e || e.clear();
            }
          };
          u = s([r(2, l.IOptionsService), r(3, d.ICharSizeService), r(4, l.IDecorationService), r(5, l.IBufferService), r(6, d.ICoreBrowserService), r(7, d.IThemeService)], u), t.RenderService = u;
        },
        9312: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.SelectionService = void 0;
          const n = i(6114),
            o = i(456),
            a = i(511),
            h = i(8460),
            c = i(4725),
            l = i(2585),
            d = i(9806),
            _ = i(9504),
            u = i(844),
            f = i(4841),
            v = String.fromCharCode(160),
            g = new RegExp(v, "g");
          let p = class extends u.Disposable {
            constructor(e, t, i, s, r, n, c, l, d) {
              super(), this._element = e, this._screenElement = t, this._linkifier = i, this._bufferService = s, this._coreService = r, this._mouseService = n, this._optionsService = c, this._renderService = l, this._coreBrowserService = d, this._dragScrollAmount = 0, this._enabled = !0, this._workCell = new a.CellData(), this._mouseDownTimeStamp = 0, this._oldHasSelection = !1, this._oldSelectionStart = void 0, this._oldSelectionEnd = void 0, this._onLinuxMouseSelection = this.register(new h.EventEmitter()), this.onLinuxMouseSelection = this._onLinuxMouseSelection.event, this._onRedrawRequest = this.register(new h.EventEmitter()), this.onRequestRedraw = this._onRedrawRequest.event, this._onSelectionChange = this.register(new h.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onRequestScrollLines = this.register(new h.EventEmitter()), this.onRequestScrollLines = this._onRequestScrollLines.event, this._mouseMoveListener = e => this._handleMouseMove(e), this._mouseUpListener = e => this._handleMouseUp(e), this._coreService.onUserInput(() => {
                this.hasSelection && this.clearSelection();
              }), this._trimListener = this._bufferService.buffer.lines.onTrim(e => this._handleTrim(e)), this.register(this._bufferService.buffers.onBufferActivate(e => this._handleBufferActivate(e))), this.enable(), this._model = new o.SelectionModel(this._bufferService), this._activeSelectionMode = 0, this.register((0, u.toDisposable)(() => {
                this._removeMouseDownListeners();
              }));
            }
            reset() {
              this.clearSelection();
            }
            disable() {
              this.clearSelection(), this._enabled = !1;
            }
            enable() {
              this._enabled = !0;
            }
            get selectionStart() {
              return this._model.finalSelectionStart;
            }
            get selectionEnd() {
              return this._model.finalSelectionEnd;
            }
            get hasSelection() {
              const e = this._model.finalSelectionStart,
                t = this._model.finalSelectionEnd;
              return !(!e || !t || e[0] === t[0] && e[1] === t[1]);
            }
            get selectionText() {
              const e = this._model.finalSelectionStart,
                t = this._model.finalSelectionEnd;
              if (!e || !t) return "";
              const i = this._bufferService.buffer,
                s = [];
              if (3 === this._activeSelectionMode) {
                if (e[0] === t[0]) return "";
                const r = e[0] < t[0] ? e[0] : t[0],
                  n = e[0] < t[0] ? t[0] : e[0];
                for (let o = e[1]; o <= t[1]; o++) {
                  const e = i.translateBufferLineToString(o, !0, r, n);
                  s.push(e);
                }
              } else {
                const r = e[1] === t[1] ? t[0] : void 0;
                s.push(i.translateBufferLineToString(e[1], !0, e[0], r));
                for (let r = e[1] + 1; r <= t[1] - 1; r++) {
                  const e = i.lines.get(r),
                    t = i.translateBufferLineToString(r, !0);
                  (null == e ? void 0 : e.isWrapped) ? s[s.length - 1] += t : s.push(t);
                }
                if (e[1] !== t[1]) {
                  const e = i.lines.get(t[1]),
                    r = i.translateBufferLineToString(t[1], !0, 0, t[0]);
                  e && e.isWrapped ? s[s.length - 1] += r : s.push(r);
                }
              }
              return s.map(e => e.replace(g, " ")).join(n.isWindows ? "\r\n" : "\n");
            }
            clearSelection() {
              this._model.clearSelection(), this._removeMouseDownListeners(), this.refresh(), this._onSelectionChange.fire();
            }
            refresh(e) {
              this._refreshAnimationFrame || (this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._refresh())), n.isLinux && e && this.selectionText.length && this._onLinuxMouseSelection.fire(this.selectionText);
            }
            _refresh() {
              this._refreshAnimationFrame = void 0, this._onRedrawRequest.fire({
                start: this._model.finalSelectionStart,
                end: this._model.finalSelectionEnd,
                columnSelectMode: 3 === this._activeSelectionMode
              });
            }
            _isClickInSelection(e) {
              const t = this._getMouseBufferCoords(e),
                i = this._model.finalSelectionStart,
                s = this._model.finalSelectionEnd;
              return !!(i && s && t) && this._areCoordsInSelection(t, i, s);
            }
            isCellInSelection(e, t) {
              const i = this._model.finalSelectionStart,
                s = this._model.finalSelectionEnd;
              return !(!i || !s) && this._areCoordsInSelection([e, t], i, s);
            }
            _areCoordsInSelection(e, t, i) {
              return e[1] > t[1] && e[1] < i[1] || t[1] === i[1] && e[1] === t[1] && e[0] >= t[0] && e[0] < i[0] || t[1] < i[1] && e[1] === i[1] && e[0] < i[0] || t[1] < i[1] && e[1] === t[1] && e[0] >= t[0];
            }
            _selectWordAtCursor(e, t) {
              var i, s;
              const r = null === (s = null === (i = this._linkifier.currentLink) || void 0 === i ? void 0 : i.link) || void 0 === s ? void 0 : s.range;
              if (r) return this._model.selectionStart = [r.start.x - 1, r.start.y - 1], this._model.selectionStartLength = (0, f.getRangeLength)(r, this._bufferService.cols), this._model.selectionEnd = void 0, !0;
              const n = this._getMouseBufferCoords(e);
              return !!n && (this._selectWordAt(n, t), this._model.selectionEnd = void 0, !0);
            }
            selectAll() {
              this._model.isSelectAllActive = !0, this.refresh(), this._onSelectionChange.fire();
            }
            selectLines(e, t) {
              this._model.clearSelection(), e = Math.max(e, 0), t = Math.min(t, this._bufferService.buffer.lines.length - 1), this._model.selectionStart = [0, e], this._model.selectionEnd = [this._bufferService.cols, t], this.refresh(), this._onSelectionChange.fire();
            }
            _handleTrim(e) {
              this._model.handleTrim(e) && this.refresh();
            }
            _getMouseBufferCoords(e) {
              const t = this._mouseService.getCoords(e, this._screenElement, this._bufferService.cols, this._bufferService.rows, !0);
              if (t) return t[0]--, t[1]--, t[1] += this._bufferService.buffer.ydisp, t;
            }
            _getMouseEventScrollAmount(e) {
              let t = (0, d.getCoordsRelativeToElement)(this._coreBrowserService.window, e, this._screenElement)[1];
              const i = this._renderService.dimensions.css.canvas.height;
              return t >= 0 && t <= i ? 0 : (t > i && (t -= i), t = Math.min(Math.max(t, -50), 50), t /= 50, t / Math.abs(t) + Math.round(14 * t));
            }
            shouldForceSelection(e) {
              return n.isMac ? e.altKey && this._optionsService.rawOptions.macOptionClickForcesSelection : e.shiftKey;
            }
            handleMouseDown(e) {
              if (this._mouseDownTimeStamp = e.timeStamp, (2 !== e.button || !this.hasSelection) && 0 === e.button) {
                if (!this._enabled) {
                  if (!this.shouldForceSelection(e)) return;
                  e.stopPropagation();
                }
                e.preventDefault(), this._dragScrollAmount = 0, this._enabled && e.shiftKey ? this._handleIncrementalClick(e) : 1 === e.detail ? this._handleSingleClick(e) : 2 === e.detail ? this._handleDoubleClick(e) : 3 === e.detail && this._handleTripleClick(e), this._addMouseDownListeners(), this.refresh(!0);
              }
            }
            _addMouseDownListeners() {
              this._screenElement.ownerDocument && (this._screenElement.ownerDocument.addEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.addEventListener("mouseup", this._mouseUpListener)), this._dragScrollIntervalTimer = this._coreBrowserService.window.setInterval(() => this._dragScroll(), 50);
            }
            _removeMouseDownListeners() {
              this._screenElement.ownerDocument && (this._screenElement.ownerDocument.removeEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.removeEventListener("mouseup", this._mouseUpListener)), this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer), this._dragScrollIntervalTimer = void 0;
            }
            _handleIncrementalClick(e) {
              this._model.selectionStart && (this._model.selectionEnd = this._getMouseBufferCoords(e));
            }
            _handleSingleClick(e) {
              if (this._model.selectionStartLength = 0, this._model.isSelectAllActive = !1, this._activeSelectionMode = this.shouldColumnSelect(e) ? 3 : 0, this._model.selectionStart = this._getMouseBufferCoords(e), !this._model.selectionStart) return;
              this._model.selectionEnd = void 0;
              const t = this._bufferService.buffer.lines.get(this._model.selectionStart[1]);
              t && t.length !== this._model.selectionStart[0] && 0 === t.hasWidth(this._model.selectionStart[0]) && this._model.selectionStart[0]++;
            }
            _handleDoubleClick(e) {
              this._selectWordAtCursor(e, !0) && (this._activeSelectionMode = 1);
            }
            _handleTripleClick(e) {
              const t = this._getMouseBufferCoords(e);
              t && (this._activeSelectionMode = 2, this._selectLineAt(t[1]));
            }
            shouldColumnSelect(e) {
              return e.altKey && !(n.isMac && this._optionsService.rawOptions.macOptionClickForcesSelection);
            }
            _handleMouseMove(e) {
              if (e.stopImmediatePropagation(), !this._model.selectionStart) return;
              const t = this._model.selectionEnd ? [this._model.selectionEnd[0], this._model.selectionEnd[1]] : null;
              if (this._model.selectionEnd = this._getMouseBufferCoords(e), !this._model.selectionEnd) return void this.refresh(!0);
              2 === this._activeSelectionMode ? this._model.selectionEnd[1] < this._model.selectionStart[1] ? this._model.selectionEnd[0] = 0 : this._model.selectionEnd[0] = this._bufferService.cols : 1 === this._activeSelectionMode && this._selectToWordAt(this._model.selectionEnd), this._dragScrollAmount = this._getMouseEventScrollAmount(e), 3 !== this._activeSelectionMode && (this._dragScrollAmount > 0 ? this._model.selectionEnd[0] = this._bufferService.cols : this._dragScrollAmount < 0 && (this._model.selectionEnd[0] = 0));
              const i = this._bufferService.buffer;
              if (this._model.selectionEnd[1] < i.lines.length) {
                const e = i.lines.get(this._model.selectionEnd[1]);
                e && 0 === e.hasWidth(this._model.selectionEnd[0]) && this._model.selectionEnd[0]++;
              }
              t && t[0] === this._model.selectionEnd[0] && t[1] === this._model.selectionEnd[1] || this.refresh(!0);
            }
            _dragScroll() {
              if (this._model.selectionEnd && this._model.selectionStart && this._dragScrollAmount) {
                this._onRequestScrollLines.fire({
                  amount: this._dragScrollAmount,
                  suppressScrollEvent: !1
                });
                const e = this._bufferService.buffer;
                this._dragScrollAmount > 0 ? (3 !== this._activeSelectionMode && (this._model.selectionEnd[0] = this._bufferService.cols), this._model.selectionEnd[1] = Math.min(e.ydisp + this._bufferService.rows, e.lines.length - 1)) : (3 !== this._activeSelectionMode && (this._model.selectionEnd[0] = 0), this._model.selectionEnd[1] = e.ydisp), this.refresh();
              }
            }
            _handleMouseUp(e) {
              const t = e.timeStamp - this._mouseDownTimeStamp;
              if (this._removeMouseDownListeners(), this.selectionText.length <= 1 && t < 500 && e.altKey && this._optionsService.rawOptions.altClickMovesCursor) {
                if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
                  const t = this._mouseService.getCoords(e, this._element, this._bufferService.cols, this._bufferService.rows, !1);
                  if (t && void 0 !== t[0] && void 0 !== t[1]) {
                    const e = (0, _.moveToCellSequence)(t[0] - 1, t[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
                    this._coreService.triggerDataEvent(e, !0);
                  }
                }
              } else this._fireEventIfSelectionChanged();
            }
            _fireEventIfSelectionChanged() {
              const e = this._model.finalSelectionStart,
                t = this._model.finalSelectionEnd,
                i = !(!e || !t || e[0] === t[0] && e[1] === t[1]);
              i ? e && t && (this._oldSelectionStart && this._oldSelectionEnd && e[0] === this._oldSelectionStart[0] && e[1] === this._oldSelectionStart[1] && t[0] === this._oldSelectionEnd[0] && t[1] === this._oldSelectionEnd[1] || this._fireOnSelectionChange(e, t, i)) : this._oldHasSelection && this._fireOnSelectionChange(e, t, i);
            }
            _fireOnSelectionChange(e, t, i) {
              this._oldSelectionStart = e, this._oldSelectionEnd = t, this._oldHasSelection = i, this._onSelectionChange.fire();
            }
            _handleBufferActivate(e) {
              this.clearSelection(), this._trimListener.dispose(), this._trimListener = e.activeBuffer.lines.onTrim(e => this._handleTrim(e));
            }
            _convertViewportColToCharacterIndex(e, t) {
              let i = t;
              for (let s = 0; t >= s; s++) {
                const r = e.loadCell(s, this._workCell).getChars().length;
                0 === this._workCell.getWidth() ? i-- : r > 1 && t !== s && (i += r - 1);
              }
              return i;
            }
            setSelection(e, t, i) {
              this._model.clearSelection(), this._removeMouseDownListeners(), this._model.selectionStart = [e, t], this._model.selectionStartLength = i, this.refresh(), this._fireEventIfSelectionChanged();
            }
            rightClickSelect(e) {
              this._isClickInSelection(e) || (this._selectWordAtCursor(e, !1) && this.refresh(!0), this._fireEventIfSelectionChanged());
            }
            _getWordAt(e, t, i = !0, s = !0) {
              if (e[0] >= this._bufferService.cols) return;
              const r = this._bufferService.buffer,
                n = r.lines.get(e[1]);
              if (!n) return;
              const o = r.translateBufferLineToString(e[1], !1);
              let a = this._convertViewportColToCharacterIndex(n, e[0]),
                h = a;
              const c = e[0] - a;
              let l = 0,
                d = 0,
                _ = 0,
                u = 0;
              if (" " === o.charAt(a)) {
                for (; a > 0 && " " === o.charAt(a - 1);) a--;
                for (; h < o.length && " " === o.charAt(h + 1);) h++;
              } else {
                let t = e[0],
                  i = e[0];
                0 === n.getWidth(t) && (l++, t--), 2 === n.getWidth(i) && (d++, i++);
                const s = n.getString(i).length;
                for (s > 1 && (u += s - 1, h += s - 1); t > 0 && a > 0 && !this._isCharWordSeparator(n.loadCell(t - 1, this._workCell));) {
                  n.loadCell(t - 1, this._workCell);
                  const e = this._workCell.getChars().length;
                  0 === this._workCell.getWidth() ? (l++, t--) : e > 1 && (_ += e - 1, a -= e - 1), a--, t--;
                }
                for (; i < n.length && h + 1 < o.length && !this._isCharWordSeparator(n.loadCell(i + 1, this._workCell));) {
                  n.loadCell(i + 1, this._workCell);
                  const e = this._workCell.getChars().length;
                  2 === this._workCell.getWidth() ? (d++, i++) : e > 1 && (u += e - 1, h += e - 1), h++, i++;
                }
              }
              h++;
              let f = a + c - l + _,
                v = Math.min(this._bufferService.cols, h - a + l + d - _ - u);
              if (t || "" !== o.slice(a, h).trim()) {
                if (i && 0 === f && 32 !== n.getCodePoint(0)) {
                  const t = r.lines.get(e[1] - 1);
                  if (t && n.isWrapped && 32 !== t.getCodePoint(this._bufferService.cols - 1)) {
                    const t = this._getWordAt([this._bufferService.cols - 1, e[1] - 1], !1, !0, !1);
                    if (t) {
                      const e = this._bufferService.cols - t.start;
                      f -= e, v += e;
                    }
                  }
                }
                if (s && f + v === this._bufferService.cols && 32 !== n.getCodePoint(this._bufferService.cols - 1)) {
                  const t = r.lines.get(e[1] + 1);
                  if ((null == t ? void 0 : t.isWrapped) && 32 !== t.getCodePoint(0)) {
                    const t = this._getWordAt([0, e[1] + 1], !1, !1, !0);
                    t && (v += t.length);
                  }
                }
                return {
                  start: f,
                  length: v
                };
              }
            }
            _selectWordAt(e, t) {
              const i = this._getWordAt(e, t);
              if (i) {
                for (; i.start < 0;) i.start += this._bufferService.cols, e[1]--;
                this._model.selectionStart = [i.start, e[1]], this._model.selectionStartLength = i.length;
              }
            }
            _selectToWordAt(e) {
              const t = this._getWordAt(e, !0);
              if (t) {
                let i = e[1];
                for (; t.start < 0;) t.start += this._bufferService.cols, i--;
                if (!this._model.areSelectionValuesReversed()) for (; t.start + t.length > this._bufferService.cols;) t.length -= this._bufferService.cols, i++;
                this._model.selectionEnd = [this._model.areSelectionValuesReversed() ? t.start : t.start + t.length, i];
              }
            }
            _isCharWordSeparator(e) {
              return 0 !== e.getWidth() && this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars()) >= 0;
            }
            _selectLineAt(e) {
              const t = this._bufferService.buffer.getWrappedRangeForLine(e),
                i = {
                  start: {
                    x: 0,
                    y: t.first
                  },
                  end: {
                    x: this._bufferService.cols - 1,
                    y: t.last
                  }
                };
              this._model.selectionStart = [0, t.first], this._model.selectionEnd = void 0, this._model.selectionStartLength = (0, f.getRangeLength)(i, this._bufferService.cols);
            }
          };
          p = s([r(3, l.IBufferService), r(4, l.ICoreService), r(5, c.IMouseService), r(6, l.IOptionsService), r(7, c.IRenderService), r(8, c.ICoreBrowserService)], p), t.SelectionService = p;
        },
        4725: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.IThemeService = t.ICharacterJoinerService = t.ISelectionService = t.IRenderService = t.IMouseService = t.ICoreBrowserService = t.ICharSizeService = void 0;
          const s = i(8343);
          t.ICharSizeService = (0, s.createDecorator)("CharSizeService"), t.ICoreBrowserService = (0, s.createDecorator)("CoreBrowserService"), t.IMouseService = (0, s.createDecorator)("MouseService"), t.IRenderService = (0, s.createDecorator)("RenderService"), t.ISelectionService = (0, s.createDecorator)("SelectionService"), t.ICharacterJoinerService = (0, s.createDecorator)("CharacterJoinerService"), t.IThemeService = (0, s.createDecorator)("ThemeService");
        },
        6731: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ThemeService = t.DEFAULT_ANSI_COLORS = void 0;
          const n = i(7239),
            o = i(8055),
            a = i(8460),
            h = i(844),
            c = i(2585),
            l = o.css.toColor("#ffffff"),
            d = o.css.toColor("#000000"),
            _ = o.css.toColor("#ffffff"),
            u = o.css.toColor("#000000"),
            f = {
              css: "rgba(255, 255, 255, 0.3)",
              rgba: 4294967117
            };
          t.DEFAULT_ANSI_COLORS = Object.freeze((() => {
            const e = [o.css.toColor("#2e3436"), o.css.toColor("#cc0000"), o.css.toColor("#4e9a06"), o.css.toColor("#c4a000"), o.css.toColor("#3465a4"), o.css.toColor("#75507b"), o.css.toColor("#06989a"), o.css.toColor("#d3d7cf"), o.css.toColor("#555753"), o.css.toColor("#ef2929"), o.css.toColor("#8ae234"), o.css.toColor("#fce94f"), o.css.toColor("#729fcf"), o.css.toColor("#ad7fa8"), o.css.toColor("#34e2e2"), o.css.toColor("#eeeeec")],
              t = [0, 95, 135, 175, 215, 255];
            for (let i = 0; i < 216; i++) {
              const s = t[i / 36 % 6 | 0],
                r = t[i / 6 % 6 | 0],
                n = t[i % 6];
              e.push({
                css: o.channels.toCss(s, r, n),
                rgba: o.channels.toRgba(s, r, n)
              });
            }
            for (let t = 0; t < 24; t++) {
              const i = 8 + 10 * t;
              e.push({
                css: o.channels.toCss(i, i, i),
                rgba: o.channels.toRgba(i, i, i)
              });
            }
            return e;
          })());
          let v = class extends h.Disposable {
            constructor(e) {
              super(), this._optionsService = e, this._onChangeColors = this.register(new a.EventEmitter()), this.onChangeColors = this._onChangeColors.event, this._contrastCache = new n.ColorContrastCache(), this._colors = {
                foreground: l,
                background: d,
                cursor: _,
                cursorAccent: u,
                selectionForeground: void 0,
                selectionBackgroundTransparent: f,
                selectionBackgroundOpaque: o.color.blend(d, f),
                selectionInactiveBackgroundTransparent: f,
                selectionInactiveBackgroundOpaque: o.color.blend(d, f),
                ansi: t.DEFAULT_ANSI_COLORS.slice(),
                contrastCache: this._contrastCache
              }, this._updateRestoreColors(), this._setTheme(this._optionsService.rawOptions.theme), this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio", () => this._contrastCache.clear())), this.register(this._optionsService.onSpecificOptionChange("theme", () => this._setTheme(this._optionsService.rawOptions.theme)));
            }
            get colors() {
              return this._colors;
            }
            _setTheme(e = {}) {
              const i = this._colors;
              if (i.foreground = g(e.foreground, l), i.background = g(e.background, d), i.cursor = g(e.cursor, _), i.cursorAccent = g(e.cursorAccent, u), i.selectionBackgroundTransparent = g(e.selectionBackground, f), i.selectionBackgroundOpaque = o.color.blend(i.background, i.selectionBackgroundTransparent), i.selectionInactiveBackgroundTransparent = g(e.selectionInactiveBackground, i.selectionBackgroundTransparent), i.selectionInactiveBackgroundOpaque = o.color.blend(i.background, i.selectionInactiveBackgroundTransparent), i.selectionForeground = e.selectionForeground ? g(e.selectionForeground, o.NULL_COLOR) : void 0, i.selectionForeground === o.NULL_COLOR && (i.selectionForeground = void 0), o.color.isOpaque(i.selectionBackgroundTransparent)) {
                const e = .3;
                i.selectionBackgroundTransparent = o.color.opacity(i.selectionBackgroundTransparent, e);
              }
              if (o.color.isOpaque(i.selectionInactiveBackgroundTransparent)) {
                const e = .3;
                i.selectionInactiveBackgroundTransparent = o.color.opacity(i.selectionInactiveBackgroundTransparent, e);
              }
              if (i.ansi = t.DEFAULT_ANSI_COLORS.slice(), i.ansi[0] = g(e.black, t.DEFAULT_ANSI_COLORS[0]), i.ansi[1] = g(e.red, t.DEFAULT_ANSI_COLORS[1]), i.ansi[2] = g(e.green, t.DEFAULT_ANSI_COLORS[2]), i.ansi[3] = g(e.yellow, t.DEFAULT_ANSI_COLORS[3]), i.ansi[4] = g(e.blue, t.DEFAULT_ANSI_COLORS[4]), i.ansi[5] = g(e.magenta, t.DEFAULT_ANSI_COLORS[5]), i.ansi[6] = g(e.cyan, t.DEFAULT_ANSI_COLORS[6]), i.ansi[7] = g(e.white, t.DEFAULT_ANSI_COLORS[7]), i.ansi[8] = g(e.brightBlack, t.DEFAULT_ANSI_COLORS[8]), i.ansi[9] = g(e.brightRed, t.DEFAULT_ANSI_COLORS[9]), i.ansi[10] = g(e.brightGreen, t.DEFAULT_ANSI_COLORS[10]), i.ansi[11] = g(e.brightYellow, t.DEFAULT_ANSI_COLORS[11]), i.ansi[12] = g(e.brightBlue, t.DEFAULT_ANSI_COLORS[12]), i.ansi[13] = g(e.brightMagenta, t.DEFAULT_ANSI_COLORS[13]), i.ansi[14] = g(e.brightCyan, t.DEFAULT_ANSI_COLORS[14]), i.ansi[15] = g(e.brightWhite, t.DEFAULT_ANSI_COLORS[15]), e.extendedAnsi) {
                const s = Math.min(i.ansi.length - 16, e.extendedAnsi.length);
                for (let r = 0; r < s; r++) i.ansi[r + 16] = g(e.extendedAnsi[r], t.DEFAULT_ANSI_COLORS[r + 16]);
              }
              this._contrastCache.clear(), this._updateRestoreColors(), this._onChangeColors.fire(this.colors);
            }
            restoreColor(e) {
              this._restoreColor(e), this._onChangeColors.fire(this.colors);
            }
            _restoreColor(e) {
              if (void 0 !== e) switch (e) {
                case 256:
                  this._colors.foreground = this._restoreColors.foreground;
                  break;
                case 257:
                  this._colors.background = this._restoreColors.background;
                  break;
                case 258:
                  this._colors.cursor = this._restoreColors.cursor;
                  break;
                default:
                  this._colors.ansi[e] = this._restoreColors.ansi[e];
              } else for (let e = 0; e < this._restoreColors.ansi.length; ++e) this._colors.ansi[e] = this._restoreColors.ansi[e];
            }
            modifyColors(e) {
              e(this._colors), this._onChangeColors.fire(this.colors);
            }
            _updateRestoreColors() {
              this._restoreColors = {
                foreground: this._colors.foreground,
                background: this._colors.background,
                cursor: this._colors.cursor,
                ansi: this._colors.ansi.slice()
              };
            }
          };
          function g(e, t) {
            if (void 0 !== e) try {
              return o.css.toColor(e);
            } catch (e) {}
            return t;
          }
          v = s([r(0, c.IOptionsService)], v), t.ThemeService = v;
        },
        6349: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CircularList = void 0;
          const s = i(8460),
            r = i(844);
          class n extends r.Disposable {
            constructor(e) {
              super(), this._maxLength = e, this.onDeleteEmitter = this.register(new s.EventEmitter()), this.onDelete = this.onDeleteEmitter.event, this.onInsertEmitter = this.register(new s.EventEmitter()), this.onInsert = this.onInsertEmitter.event, this.onTrimEmitter = this.register(new s.EventEmitter()), this.onTrim = this.onTrimEmitter.event, this._array = new Array(this._maxLength), this._startIndex = 0, this._length = 0;
            }
            get maxLength() {
              return this._maxLength;
            }
            set maxLength(e) {
              if (this._maxLength === e) return;
              const t = new Array(e);
              for (let i = 0; i < Math.min(e, this.length); i++) t[i] = this._array[this._getCyclicIndex(i)];
              this._array = t, this._maxLength = e, this._startIndex = 0;
            }
            get length() {
              return this._length;
            }
            set length(e) {
              if (e > this._length) for (let t = this._length; t < e; t++) this._array[t] = void 0;
              this._length = e;
            }
            get(e) {
              return this._array[this._getCyclicIndex(e)];
            }
            set(e, t) {
              this._array[this._getCyclicIndex(e)] = t;
            }
            push(e) {
              this._array[this._getCyclicIndex(this._length)] = e, this._length === this._maxLength ? (this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1)) : this._length++;
            }
            recycle() {
              if (this._length !== this._maxLength) throw new Error("Can only recycle when the buffer is full");
              return this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1), this._array[this._getCyclicIndex(this._length - 1)];
            }
            get isFull() {
              return this._length === this._maxLength;
            }
            pop() {
              return this._array[this._getCyclicIndex(this._length-- - 1)];
            }
            splice(e, t, ...i) {
              if (t) {
                for (let i = e; i < this._length - t; i++) this._array[this._getCyclicIndex(i)] = this._array[this._getCyclicIndex(i + t)];
                this._length -= t, this.onDeleteEmitter.fire({
                  index: e,
                  amount: t
                });
              }
              for (let t = this._length - 1; t >= e; t--) this._array[this._getCyclicIndex(t + i.length)] = this._array[this._getCyclicIndex(t)];
              for (let t = 0; t < i.length; t++) this._array[this._getCyclicIndex(e + t)] = i[t];
              if (i.length && this.onInsertEmitter.fire({
                index: e,
                amount: i.length
              }), this._length + i.length > this._maxLength) {
                const e = this._length + i.length - this._maxLength;
                this._startIndex += e, this._length = this._maxLength, this.onTrimEmitter.fire(e);
              } else this._length += i.length;
            }
            trimStart(e) {
              e > this._length && (e = this._length), this._startIndex += e, this._length -= e, this.onTrimEmitter.fire(e);
            }
            shiftElements(e, t, i) {
              if (!(t <= 0)) {
                if (e < 0 || e >= this._length) throw new Error("start argument out of range");
                if (e + i < 0) throw new Error("Cannot shift elements in list beyond index 0");
                if (i > 0) {
                  for (let s = t - 1; s >= 0; s--) this.set(e + s + i, this.get(e + s));
                  const s = e + t + i - this._length;
                  if (s > 0) for (this._length += s; this._length > this._maxLength;) this._length--, this._startIndex++, this.onTrimEmitter.fire(1);
                } else for (let s = 0; s < t; s++) this.set(e + s + i, this.get(e + s));
              }
            }
            _getCyclicIndex(e) {
              return (this._startIndex + e) % this._maxLength;
            }
          }
          t.CircularList = n;
        },
        1439: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.clone = void 0, t.clone = function e(t, i = 5) {
            if ("object" != typeof t) return t;
            const s = Array.isArray(t) ? [] : {};
            for (const r in t) s[r] = i <= 1 ? t[r] : t[r] && e(t[r], i - 1);
            return s;
          };
        },
        8055: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.contrastRatio = t.toPaddedHex = t.rgba = t.rgb = t.css = t.color = t.channels = t.NULL_COLOR = void 0;
          const s = i(6114);
          let r = 0,
            n = 0,
            o = 0,
            a = 0;
          var h, c, l;
          function d(e) {
            const t = e.toString(16);
            return t.length < 2 ? "0" + t : t;
          }
          function _(e, t) {
            return e < t ? (t + .05) / (e + .05) : (e + .05) / (t + .05);
          }
          t.NULL_COLOR = {
            css: "#00000000",
            rgba: 0
          }, function (e) {
            e.toCss = function (e, t, i, s) {
              return void 0 !== s ? `#${d(e)}${d(t)}${d(i)}${d(s)}` : `#${d(e)}${d(t)}${d(i)}`;
            }, e.toRgba = function (e, t, i, s = 255) {
              return (e << 24 | t << 16 | i << 8 | s) >>> 0;
            };
          }(h = t.channels || (t.channels = {})), function (e) {
            function t(e, t) {
              return a = Math.round(255 * t), [r, n, o] = l.toChannels(e.rgba), {
                css: h.toCss(r, n, o, a),
                rgba: h.toRgba(r, n, o, a)
              };
            }
            e.blend = function (e, t) {
              if (a = (255 & t.rgba) / 255, 1 === a) return {
                css: t.css,
                rgba: t.rgba
              };
              const i = t.rgba >> 24 & 255,
                s = t.rgba >> 16 & 255,
                c = t.rgba >> 8 & 255,
                l = e.rgba >> 24 & 255,
                d = e.rgba >> 16 & 255,
                _ = e.rgba >> 8 & 255;
              return r = l + Math.round((i - l) * a), n = d + Math.round((s - d) * a), o = _ + Math.round((c - _) * a), {
                css: h.toCss(r, n, o),
                rgba: h.toRgba(r, n, o)
              };
            }, e.isOpaque = function (e) {
              return 255 == (255 & e.rgba);
            }, e.ensureContrastRatio = function (e, t, i) {
              const s = l.ensureContrastRatio(e.rgba, t.rgba, i);
              if (s) return l.toColor(s >> 24 & 255, s >> 16 & 255, s >> 8 & 255);
            }, e.opaque = function (e) {
              const t = (255 | e.rgba) >>> 0;
              return [r, n, o] = l.toChannels(t), {
                css: h.toCss(r, n, o),
                rgba: t
              };
            }, e.opacity = t, e.multiplyOpacity = function (e, i) {
              return a = 255 & e.rgba, t(e, a * i / 255);
            }, e.toColorRGB = function (e) {
              return [e.rgba >> 24 & 255, e.rgba >> 16 & 255, e.rgba >> 8 & 255];
            };
          }(t.color || (t.color = {})), function (e) {
            let t, i;
            if (!s.isNode) {
              const e = document.createElement("canvas");
              e.width = 1, e.height = 1;
              const s = e.getContext("2d", {
                willReadFrequently: !0
              });
              s && (t = s, t.globalCompositeOperation = "copy", i = t.createLinearGradient(0, 0, 1, 1));
            }
            e.toColor = function (e) {
              if (e.match(/#[\da-f]{3,8}/i)) switch (e.length) {
                case 4:
                  return r = parseInt(e.slice(1, 2).repeat(2), 16), n = parseInt(e.slice(2, 3).repeat(2), 16), o = parseInt(e.slice(3, 4).repeat(2), 16), l.toColor(r, n, o);
                case 5:
                  return r = parseInt(e.slice(1, 2).repeat(2), 16), n = parseInt(e.slice(2, 3).repeat(2), 16), o = parseInt(e.slice(3, 4).repeat(2), 16), a = parseInt(e.slice(4, 5).repeat(2), 16), l.toColor(r, n, o, a);
                case 7:
                  return {
                    css: e,
                    rgba: (parseInt(e.slice(1), 16) << 8 | 255) >>> 0
                  };
                case 9:
                  return {
                    css: e,
                    rgba: parseInt(e.slice(1), 16) >>> 0
                  };
              }
              const s = e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
              if (s) return r = parseInt(s[1]), n = parseInt(s[2]), o = parseInt(s[3]), a = Math.round(255 * (void 0 === s[5] ? 1 : parseFloat(s[5]))), l.toColor(r, n, o, a);
              if (!t || !i) throw new Error("css.toColor: Unsupported css format");
              if (t.fillStyle = i, t.fillStyle = e, "string" != typeof t.fillStyle) throw new Error("css.toColor: Unsupported css format");
              if (t.fillRect(0, 0, 1, 1), [r, n, o, a] = t.getImageData(0, 0, 1, 1).data, 255 !== a) throw new Error("css.toColor: Unsupported css format");
              return {
                rgba: h.toRgba(r, n, o, a),
                css: e
              };
            };
          }(t.css || (t.css = {})), function (e) {
            function t(e, t, i) {
              const s = e / 255,
                r = t / 255,
                n = i / 255;
              return .2126 * (s <= .03928 ? s / 12.92 : Math.pow((s + .055) / 1.055, 2.4)) + .7152 * (r <= .03928 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4)) + .0722 * (n <= .03928 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4));
            }
            e.relativeLuminance = function (e) {
              return t(e >> 16 & 255, e >> 8 & 255, 255 & e);
            }, e.relativeLuminance2 = t;
          }(c = t.rgb || (t.rgb = {})), function (e) {
            function t(e, t, i) {
              const s = e >> 24 & 255,
                r = e >> 16 & 255,
                n = e >> 8 & 255;
              let o = t >> 24 & 255,
                a = t >> 16 & 255,
                h = t >> 8 & 255,
                l = _(c.relativeLuminance2(o, a, h), c.relativeLuminance2(s, r, n));
              for (; l < i && (o > 0 || a > 0 || h > 0);) o -= Math.max(0, Math.ceil(.1 * o)), a -= Math.max(0, Math.ceil(.1 * a)), h -= Math.max(0, Math.ceil(.1 * h)), l = _(c.relativeLuminance2(o, a, h), c.relativeLuminance2(s, r, n));
              return (o << 24 | a << 16 | h << 8 | 255) >>> 0;
            }
            function i(e, t, i) {
              const s = e >> 24 & 255,
                r = e >> 16 & 255,
                n = e >> 8 & 255;
              let o = t >> 24 & 255,
                a = t >> 16 & 255,
                h = t >> 8 & 255,
                l = _(c.relativeLuminance2(o, a, h), c.relativeLuminance2(s, r, n));
              for (; l < i && (o < 255 || a < 255 || h < 255);) o = Math.min(255, o + Math.ceil(.1 * (255 - o))), a = Math.min(255, a + Math.ceil(.1 * (255 - a))), h = Math.min(255, h + Math.ceil(.1 * (255 - h))), l = _(c.relativeLuminance2(o, a, h), c.relativeLuminance2(s, r, n));
              return (o << 24 | a << 16 | h << 8 | 255) >>> 0;
            }
            e.ensureContrastRatio = function (e, s, r) {
              const n = c.relativeLuminance(e >> 8),
                o = c.relativeLuminance(s >> 8);
              if (_(n, o) < r) {
                if (o < n) {
                  const o = t(e, s, r),
                    a = _(n, c.relativeLuminance(o >> 8));
                  if (a < r) {
                    const t = i(e, s, r);
                    return a > _(n, c.relativeLuminance(t >> 8)) ? o : t;
                  }
                  return o;
                }
                const a = i(e, s, r),
                  h = _(n, c.relativeLuminance(a >> 8));
                if (h < r) {
                  const i = t(e, s, r);
                  return h > _(n, c.relativeLuminance(i >> 8)) ? a : i;
                }
                return a;
              }
            }, e.reduceLuminance = t, e.increaseLuminance = i, e.toChannels = function (e) {
              return [e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, 255 & e];
            }, e.toColor = function (e, t, i, s) {
              return {
                css: h.toCss(e, t, i, s),
                rgba: h.toRgba(e, t, i, s)
              };
            };
          }(l = t.rgba || (t.rgba = {})), t.toPaddedHex = d, t.contrastRatio = _;
        },
        8969: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CoreTerminal = void 0;
          const s = i(844),
            r = i(2585),
            n = i(4348),
            o = i(7866),
            a = i(744),
            h = i(7302),
            c = i(6975),
            l = i(8460),
            d = i(1753),
            _ = i(1480),
            u = i(7994),
            f = i(9282),
            v = i(5435),
            g = i(5981),
            p = i(2660);
          let S = !1;
          class m extends s.Disposable {
            constructor(e) {
              super(), this._onBinary = this.register(new l.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new l.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new l.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new l.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new l.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new l.EventEmitter()), this._instantiationService = new n.InstantiationService(), this.optionsService = this.register(new h.OptionsService(e)), this._instantiationService.setService(r.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(a.BufferService)), this._instantiationService.setService(r.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(o.LogService)), this._instantiationService.setService(r.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(c.CoreService)), this._instantiationService.setService(r.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(d.CoreMouseService)), this._instantiationService.setService(r.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(_.UnicodeService)), this._instantiationService.setService(r.IUnicodeService, this.unicodeService), this._charsetService = this._instantiationService.createInstance(u.CharsetService), this._instantiationService.setService(r.ICharsetService, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(p.OscLinkService), this._instantiationService.setService(r.IOscLinkService, this._oscLinkService), this._inputHandler = this.register(new v.InputHandler(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this.register((0, l.forwardEvent)(this._inputHandler.onLineFeed, this._onLineFeed)), this.register(this._inputHandler), this.register((0, l.forwardEvent)(this._bufferService.onResize, this._onResize)), this.register((0, l.forwardEvent)(this.coreService.onData, this._onData)), this.register((0, l.forwardEvent)(this.coreService.onBinary, this._onBinary)), this.register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom())), this.register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this.register(this.optionsService.onSpecificOptionChange("windowsMode", e => this._handleWindowsModeOptionChange(e))), this.register(this._bufferService.onScroll(e => {
                this._onScroll.fire({
                  position: this._bufferService.buffer.ydisp,
                  source: 0
                }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
              })), this.register(this._inputHandler.onScroll(e => {
                this._onScroll.fire({
                  position: this._bufferService.buffer.ydisp,
                  source: 0
                }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
              })), this._writeBuffer = this.register(new g.WriteBuffer((e, t) => this._inputHandler.parse(e, t))), this.register((0, l.forwardEvent)(this._writeBuffer.onWriteParsed, this._onWriteParsed)), this.register((0, s.toDisposable)(() => {
                var e;
                null === (e = this._windowsMode) || void 0 === e || e.dispose(), this._windowsMode = void 0;
              }));
            }
            get onScroll() {
              return this._onScrollApi || (this._onScrollApi = this.register(new l.EventEmitter()), this._onScroll.event(e => {
                var t;
                null === (t = this._onScrollApi) || void 0 === t || t.fire(e.position);
              })), this._onScrollApi.event;
            }
            get cols() {
              return this._bufferService.cols;
            }
            get rows() {
              return this._bufferService.rows;
            }
            get buffers() {
              return this._bufferService.buffers;
            }
            get options() {
              return this.optionsService.options;
            }
            set options(e) {
              for (const t in e) this.optionsService.options[t] = e[t];
            }
            write(e, t) {
              this._writeBuffer.write(e, t);
            }
            writeSync(e, t) {
              this._logService.logLevel <= r.LogLevelEnum.WARN && !S && (this._logService.warn("writeSync is unreliable and will be removed soon."), S = !0), this._writeBuffer.writeSync(e, t);
            }
            resize(e, t) {
              isNaN(e) || isNaN(t) || (e = Math.max(e, a.MINIMUM_COLS), t = Math.max(t, a.MINIMUM_ROWS), this._bufferService.resize(e, t));
            }
            scroll(e, t = !1) {
              this._bufferService.scroll(e, t);
            }
            scrollLines(e, t, i) {
              this._bufferService.scrollLines(e, t, i);
            }
            scrollPages(e) {
              this._bufferService.scrollPages(e);
            }
            scrollToTop() {
              this._bufferService.scrollToTop();
            }
            scrollToBottom() {
              this._bufferService.scrollToBottom();
            }
            scrollToLine(e) {
              this._bufferService.scrollToLine(e);
            }
            registerEscHandler(e, t) {
              return this._inputHandler.registerEscHandler(e, t);
            }
            registerDcsHandler(e, t) {
              return this._inputHandler.registerDcsHandler(e, t);
            }
            registerCsiHandler(e, t) {
              return this._inputHandler.registerCsiHandler(e, t);
            }
            registerOscHandler(e, t) {
              return this._inputHandler.registerOscHandler(e, t);
            }
            _setup() {
              this.optionsService.rawOptions.windowsMode && this._enableWindowsMode();
            }
            reset() {
              this._inputHandler.reset(), this._bufferService.reset(), this._charsetService.reset(), this.coreService.reset(), this.coreMouseService.reset();
            }
            _handleWindowsModeOptionChange(e) {
              var t;
              e ? this._enableWindowsMode() : (null === (t = this._windowsMode) || void 0 === t || t.dispose(), this._windowsMode = void 0);
            }
            _enableWindowsMode() {
              if (!this._windowsMode) {
                const e = [];
                e.push(this.onLineFeed(f.updateWindowsModeWrappedState.bind(null, this._bufferService))), e.push(this.registerCsiHandler({
                  final: "H"
                }, () => ((0, f.updateWindowsModeWrappedState)(this._bufferService), !1))), this._windowsMode = {
                  dispose: () => {
                    for (const t of e) t.dispose();
                  }
                };
              }
            }
          }
          t.CoreTerminal = m;
        },
        8460: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.forwardEvent = t.EventEmitter = void 0, t.EventEmitter = class {
            constructor() {
              this._listeners = [], this._disposed = !1;
            }
            get event() {
              return this._event || (this._event = e => (this._listeners.push(e), {
                dispose: () => {
                  if (!this._disposed) for (let t = 0; t < this._listeners.length; t++) if (this._listeners[t] === e) return void this._listeners.splice(t, 1);
                }
              })), this._event;
            }
            fire(e, t) {
              const i = [];
              for (let e = 0; e < this._listeners.length; e++) i.push(this._listeners[e]);
              for (let s = 0; s < i.length; s++) i[s].call(void 0, e, t);
            }
            dispose() {
              this._listeners && (this._listeners.length = 0), this._disposed = !0;
            }
          }, t.forwardEvent = function (e, t) {
            return e(e => t.fire(e));
          };
        },
        5435: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.InputHandler = t.WindowsOptionsReportType = void 0;
          const n = i(2584),
            o = i(7116),
            a = i(2015),
            h = i(844),
            c = i(482),
            l = i(8437),
            d = i(8460),
            _ = i(643),
            u = i(511),
            f = i(3734),
            v = i(2585),
            g = i(6242),
            p = i(6351),
            S = i(5941),
            m = {
              "(": 0,
              ")": 1,
              "*": 2,
              "+": 3,
              "-": 1,
              ".": 2
            },
            C = 131072;
          function b(e, t) {
            if (e > 24) return t.setWinLines || !1;
            switch (e) {
              case 1:
                return !!t.restoreWin;
              case 2:
                return !!t.minimizeWin;
              case 3:
                return !!t.setWinPosition;
              case 4:
                return !!t.setWinSizePixels;
              case 5:
                return !!t.raiseWin;
              case 6:
                return !!t.lowerWin;
              case 7:
                return !!t.refreshWin;
              case 8:
                return !!t.setWinSizeChars;
              case 9:
                return !!t.maximizeWin;
              case 10:
                return !!t.fullscreenWin;
              case 11:
                return !!t.getWinState;
              case 13:
                return !!t.getWinPosition;
              case 14:
                return !!t.getWinSizePixels;
              case 15:
                return !!t.getScreenSizePixels;
              case 16:
                return !!t.getCellSizePixels;
              case 18:
                return !!t.getWinSizeChars;
              case 19:
                return !!t.getScreenSizeChars;
              case 20:
                return !!t.getIconTitle;
              case 21:
                return !!t.getWinTitle;
              case 22:
                return !!t.pushTitle;
              case 23:
                return !!t.popTitle;
              case 24:
                return !!t.setWinLines;
            }
            return !1;
          }
          var y;
          !function (e) {
            e[e.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", e[e.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
          }(y = t.WindowsOptionsReportType || (t.WindowsOptionsReportType = {}));
          let w = 0;
          class E extends h.Disposable {
            constructor(e, t, i, s, r, h, _, f, v = new a.EscapeSequenceParser()) {
              super(), this._bufferService = e, this._charsetService = t, this._coreService = i, this._logService = s, this._optionsService = r, this._oscLinkService = h, this._coreMouseService = _, this._unicodeService = f, this._parser = v, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new c.StringToUtf32(), this._utf8Decoder = new c.Utf8ToUtf32(), this._workCell = new u.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new d.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new d.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new d.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new d.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new d.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new d.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new d.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new d.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new d.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new d.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new d.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new d.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new d.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = {
                paused: !1,
                cursorStartX: 0,
                cursorStartY: 0,
                decodedLength: 0,
                position: 0
              }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new L(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer)), this._parser.setCsiHandlerFallback((e, t) => {
                this._logService.debug("Unknown CSI code: ", {
                  identifier: this._parser.identToString(e),
                  params: t.toArray()
                });
              }), this._parser.setEscHandlerFallback(e => {
                this._logService.debug("Unknown ESC code: ", {
                  identifier: this._parser.identToString(e)
                });
              }), this._parser.setExecuteHandlerFallback(e => {
                this._logService.debug("Unknown EXECUTE code: ", {
                  code: e
                });
              }), this._parser.setOscHandlerFallback((e, t, i) => {
                this._logService.debug("Unknown OSC code: ", {
                  identifier: e,
                  action: t,
                  data: i
                });
              }), this._parser.setDcsHandlerFallback((e, t, i) => {
                "HOOK" === t && (i = i.toArray()), this._logService.debug("Unknown DCS code: ", {
                  identifier: this._parser.identToString(e),
                  action: t,
                  payload: i
                });
              }), this._parser.setPrintHandler((e, t, i) => this.print(e, t, i)), this._parser.registerCsiHandler({
                final: "@"
              }, e => this.insertChars(e)), this._parser.registerCsiHandler({
                intermediates: " ",
                final: "@"
              }, e => this.scrollLeft(e)), this._parser.registerCsiHandler({
                final: "A"
              }, e => this.cursorUp(e)), this._parser.registerCsiHandler({
                intermediates: " ",
                final: "A"
              }, e => this.scrollRight(e)), this._parser.registerCsiHandler({
                final: "B"
              }, e => this.cursorDown(e)), this._parser.registerCsiHandler({
                final: "C"
              }, e => this.cursorForward(e)), this._parser.registerCsiHandler({
                final: "D"
              }, e => this.cursorBackward(e)), this._parser.registerCsiHandler({
                final: "E"
              }, e => this.cursorNextLine(e)), this._parser.registerCsiHandler({
                final: "F"
              }, e => this.cursorPrecedingLine(e)), this._parser.registerCsiHandler({
                final: "G"
              }, e => this.cursorCharAbsolute(e)), this._parser.registerCsiHandler({
                final: "H"
              }, e => this.cursorPosition(e)), this._parser.registerCsiHandler({
                final: "I"
              }, e => this.cursorForwardTab(e)), this._parser.registerCsiHandler({
                final: "J"
              }, e => this.eraseInDisplay(e, !1)), this._parser.registerCsiHandler({
                prefix: "?",
                final: "J"
              }, e => this.eraseInDisplay(e, !0)), this._parser.registerCsiHandler({
                final: "K"
              }, e => this.eraseInLine(e, !1)), this._parser.registerCsiHandler({
                prefix: "?",
                final: "K"
              }, e => this.eraseInLine(e, !0)), this._parser.registerCsiHandler({
                final: "L"
              }, e => this.insertLines(e)), this._parser.registerCsiHandler({
                final: "M"
              }, e => this.deleteLines(e)), this._parser.registerCsiHandler({
                final: "P"
              }, e => this.deleteChars(e)), this._parser.registerCsiHandler({
                final: "S"
              }, e => this.scrollUp(e)), this._parser.registerCsiHandler({
                final: "T"
              }, e => this.scrollDown(e)), this._parser.registerCsiHandler({
                final: "X"
              }, e => this.eraseChars(e)), this._parser.registerCsiHandler({
                final: "Z"
              }, e => this.cursorBackwardTab(e)), this._parser.registerCsiHandler({
                final: "`"
              }, e => this.charPosAbsolute(e)), this._parser.registerCsiHandler({
                final: "a"
              }, e => this.hPositionRelative(e)), this._parser.registerCsiHandler({
                final: "b"
              }, e => this.repeatPrecedingCharacter(e)), this._parser.registerCsiHandler({
                final: "c"
              }, e => this.sendDeviceAttributesPrimary(e)), this._parser.registerCsiHandler({
                prefix: ">",
                final: "c"
              }, e => this.sendDeviceAttributesSecondary(e)), this._parser.registerCsiHandler({
                final: "d"
              }, e => this.linePosAbsolute(e)), this._parser.registerCsiHandler({
                final: "e"
              }, e => this.vPositionRelative(e)), this._parser.registerCsiHandler({
                final: "f"
              }, e => this.hVPosition(e)), this._parser.registerCsiHandler({
                final: "g"
              }, e => this.tabClear(e)), this._parser.registerCsiHandler({
                final: "h"
              }, e => this.setMode(e)), this._parser.registerCsiHandler({
                prefix: "?",
                final: "h"
              }, e => this.setModePrivate(e)), this._parser.registerCsiHandler({
                final: "l"
              }, e => this.resetMode(e)), this._parser.registerCsiHandler({
                prefix: "?",
                final: "l"
              }, e => this.resetModePrivate(e)), this._parser.registerCsiHandler({
                final: "m"
              }, e => this.charAttributes(e)), this._parser.registerCsiHandler({
                final: "n"
              }, e => this.deviceStatus(e)), this._parser.registerCsiHandler({
                prefix: "?",
                final: "n"
              }, e => this.deviceStatusPrivate(e)), this._parser.registerCsiHandler({
                intermediates: "!",
                final: "p"
              }, e => this.softReset(e)), this._parser.registerCsiHandler({
                intermediates: " ",
                final: "q"
              }, e => this.setCursorStyle(e)), this._parser.registerCsiHandler({
                final: "r"
              }, e => this.setScrollRegion(e)), this._parser.registerCsiHandler({
                final: "s"
              }, e => this.saveCursor(e)), this._parser.registerCsiHandler({
                final: "t"
              }, e => this.windowOptions(e)), this._parser.registerCsiHandler({
                final: "u"
              }, e => this.restoreCursor(e)), this._parser.registerCsiHandler({
                intermediates: "'",
                final: "}"
              }, e => this.insertColumns(e)), this._parser.registerCsiHandler({
                intermediates: "'",
                final: "~"
              }, e => this.deleteColumns(e)), this._parser.registerCsiHandler({
                intermediates: '"',
                final: "q"
              }, e => this.selectProtected(e)), this._parser.registerCsiHandler({
                intermediates: "$",
                final: "p"
              }, e => this.requestMode(e, !0)), this._parser.registerCsiHandler({
                prefix: "?",
                intermediates: "$",
                final: "p"
              }, e => this.requestMode(e, !1)), this._parser.setExecuteHandler(n.C0.BEL, () => this.bell()), this._parser.setExecuteHandler(n.C0.LF, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.VT, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.FF, () => this.lineFeed()), this._parser.setExecuteHandler(n.C0.CR, () => this.carriageReturn()), this._parser.setExecuteHandler(n.C0.BS, () => this.backspace()), this._parser.setExecuteHandler(n.C0.HT, () => this.tab()), this._parser.setExecuteHandler(n.C0.SO, () => this.shiftOut()), this._parser.setExecuteHandler(n.C0.SI, () => this.shiftIn()), this._parser.setExecuteHandler(n.C1.IND, () => this.index()), this._parser.setExecuteHandler(n.C1.NEL, () => this.nextLine()), this._parser.setExecuteHandler(n.C1.HTS, () => this.tabSet()), this._parser.registerOscHandler(0, new g.OscHandler(e => (this.setTitle(e), this.setIconName(e), !0))), this._parser.registerOscHandler(1, new g.OscHandler(e => this.setIconName(e))), this._parser.registerOscHandler(2, new g.OscHandler(e => this.setTitle(e))), this._parser.registerOscHandler(4, new g.OscHandler(e => this.setOrReportIndexedColor(e))), this._parser.registerOscHandler(8, new g.OscHandler(e => this.setHyperlink(e))), this._parser.registerOscHandler(10, new g.OscHandler(e => this.setOrReportFgColor(e))), this._parser.registerOscHandler(11, new g.OscHandler(e => this.setOrReportBgColor(e))), this._parser.registerOscHandler(12, new g.OscHandler(e => this.setOrReportCursorColor(e))), this._parser.registerOscHandler(104, new g.OscHandler(e => this.restoreIndexedColor(e))), this._parser.registerOscHandler(110, new g.OscHandler(e => this.restoreFgColor(e))), this._parser.registerOscHandler(111, new g.OscHandler(e => this.restoreBgColor(e))), this._parser.registerOscHandler(112, new g.OscHandler(e => this.restoreCursorColor(e))), this._parser.registerEscHandler({
                final: "7"
              }, () => this.saveCursor()), this._parser.registerEscHandler({
                final: "8"
              }, () => this.restoreCursor()), this._parser.registerEscHandler({
                final: "D"
              }, () => this.index()), this._parser.registerEscHandler({
                final: "E"
              }, () => this.nextLine()), this._parser.registerEscHandler({
                final: "H"
              }, () => this.tabSet()), this._parser.registerEscHandler({
                final: "M"
              }, () => this.reverseIndex()), this._parser.registerEscHandler({
                final: "="
              }, () => this.keypadApplicationMode()), this._parser.registerEscHandler({
                final: ">"
              }, () => this.keypadNumericMode()), this._parser.registerEscHandler({
                final: "c"
              }, () => this.fullReset()), this._parser.registerEscHandler({
                final: "n"
              }, () => this.setgLevel(2)), this._parser.registerEscHandler({
                final: "o"
              }, () => this.setgLevel(3)), this._parser.registerEscHandler({
                final: "|"
              }, () => this.setgLevel(3)), this._parser.registerEscHandler({
                final: "}"
              }, () => this.setgLevel(2)), this._parser.registerEscHandler({
                final: "~"
              }, () => this.setgLevel(1)), this._parser.registerEscHandler({
                intermediates: "%",
                final: "@"
              }, () => this.selectDefaultCharset()), this._parser.registerEscHandler({
                intermediates: "%",
                final: "G"
              }, () => this.selectDefaultCharset());
              for (const e in o.CHARSETS) this._parser.registerEscHandler({
                intermediates: "(",
                final: e
              }, () => this.selectCharset("(" + e)), this._parser.registerEscHandler({
                intermediates: ")",
                final: e
              }, () => this.selectCharset(")" + e)), this._parser.registerEscHandler({
                intermediates: "*",
                final: e
              }, () => this.selectCharset("*" + e)), this._parser.registerEscHandler({
                intermediates: "+",
                final: e
              }, () => this.selectCharset("+" + e)), this._parser.registerEscHandler({
                intermediates: "-",
                final: e
              }, () => this.selectCharset("-" + e)), this._parser.registerEscHandler({
                intermediates: ".",
                final: e
              }, () => this.selectCharset("." + e)), this._parser.registerEscHandler({
                intermediates: "/",
                final: e
              }, () => this.selectCharset("/" + e));
              this._parser.registerEscHandler({
                intermediates: "#",
                final: "8"
              }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler(e => (this._logService.error("Parsing error: ", e), e)), this._parser.registerDcsHandler({
                intermediates: "$",
                final: "q"
              }, new p.DcsHandler((e, t) => this.requestStatusString(e, t)));
            }
            getAttrData() {
              return this._curAttrData;
            }
            _preserveStack(e, t, i, s) {
              this._parseStack.paused = !0, this._parseStack.cursorStartX = e, this._parseStack.cursorStartY = t, this._parseStack.decodedLength = i, this._parseStack.position = s;
            }
            _logSlowResolvingAsync(e) {
              this._logService.logLevel <= v.LogLevelEnum.WARN && Promise.race([e, new Promise((e, t) => setTimeout(() => t("#SLOW_TIMEOUT"), 5e3))]).catch(e => {
                if ("#SLOW_TIMEOUT" !== e) throw e;
                console.warn("async parser handler taking longer than 5000 ms");
              });
            }
            _getCurrentLinkId() {
              return this._curAttrData.extended.urlId;
            }
            parse(e, t) {
              let i,
                s = this._activeBuffer.x,
                r = this._activeBuffer.y,
                n = 0;
              const o = this._parseStack.paused;
              if (o) {
                if (i = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, t)) return this._logSlowResolvingAsync(i), i;
                s = this._parseStack.cursorStartX, r = this._parseStack.cursorStartY, this._parseStack.paused = !1, e.length > C && (n = this._parseStack.position + C);
              }
              if (this._logService.logLevel <= v.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + ("string" == typeof e ? ` "${e}"` : ` "${Array.prototype.map.call(e, e => String.fromCharCode(e)).join("")}"`), "string" == typeof e ? e.split("").map(e => e.charCodeAt(0)) : e), this._parseBuffer.length < e.length && this._parseBuffer.length < C && (this._parseBuffer = new Uint32Array(Math.min(e.length, C))), o || this._dirtyRowTracker.clearRange(), e.length > C) for (let t = n; t < e.length; t += C) {
                const n = t + C < e.length ? t + C : e.length,
                  o = "string" == typeof e ? this._stringDecoder.decode(e.substring(t, n), this._parseBuffer) : this._utf8Decoder.decode(e.subarray(t, n), this._parseBuffer);
                if (i = this._parser.parse(this._parseBuffer, o)) return this._preserveStack(s, r, o, t), this._logSlowResolvingAsync(i), i;
              } else if (!o) {
                const t = "string" == typeof e ? this._stringDecoder.decode(e, this._parseBuffer) : this._utf8Decoder.decode(e, this._parseBuffer);
                if (i = this._parser.parse(this._parseBuffer, t)) return this._preserveStack(s, r, t, 0), this._logSlowResolvingAsync(i), i;
              }
              this._activeBuffer.x === s && this._activeBuffer.y === r || this._onCursorMove.fire(), this._onRequestRefreshRows.fire(this._dirtyRowTracker.start, this._dirtyRowTracker.end);
            }
            print(e, t, i) {
              let s, r;
              const n = this._charsetService.charset,
                o = this._optionsService.rawOptions.screenReaderMode,
                a = this._bufferService.cols,
                h = this._coreService.decPrivateModes.wraparound,
                l = this._coreService.modes.insertMode,
                d = this._curAttrData;
              let u = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
              this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && i - t > 0 && 2 === u.getWidth(this._activeBuffer.x - 1) && u.setCellFromCodePoint(this._activeBuffer.x - 1, 0, 1, d.fg, d.bg, d.extended);
              for (let f = t; f < i; ++f) {
                if (s = e[f], r = this._unicodeService.wcwidth(s), s < 127 && n) {
                  const e = n[String.fromCharCode(s)];
                  e && (s = e.charCodeAt(0));
                }
                if (o && this._onA11yChar.fire((0, c.stringFromCodePoint)(s)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), r || !this._activeBuffer.x) {
                  if (this._activeBuffer.x + r - 1 >= a) if (h) {
                    for (; this._activeBuffer.x < a;) u.setCellFromCodePoint(this._activeBuffer.x++, 0, 1, d.fg, d.bg, d.extended);
                    this._activeBuffer.x = 0, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), u = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
                  } else if (this._activeBuffer.x = a - 1, 2 === r) continue;
                  if (l && (u.insertCells(this._activeBuffer.x, r, this._activeBuffer.getNullCell(d), d), 2 === u.getWidth(a - 1) && u.setCellFromCodePoint(a - 1, _.NULL_CELL_CODE, _.NULL_CELL_WIDTH, d.fg, d.bg, d.extended)), u.setCellFromCodePoint(this._activeBuffer.x++, s, r, d.fg, d.bg, d.extended), r > 0) for (; --r;) u.setCellFromCodePoint(this._activeBuffer.x++, 0, 0, d.fg, d.bg, d.extended);
                } else u.getWidth(this._activeBuffer.x - 1) ? u.addCodepointToCell(this._activeBuffer.x - 1, s) : u.addCodepointToCell(this._activeBuffer.x - 2, s);
              }
              i - t > 0 && (u.loadCell(this._activeBuffer.x - 1, this._workCell), 2 === this._workCell.getWidth() || this._workCell.getCode() > 65535 ? this._parser.precedingCodepoint = 0 : this._workCell.isCombined() ? this._parser.precedingCodepoint = this._workCell.getChars().charCodeAt(0) : this._parser.precedingCodepoint = this._workCell.content), this._activeBuffer.x < a && i - t > 0 && 0 === u.getWidth(this._activeBuffer.x) && !u.hasContent(this._activeBuffer.x) && u.setCellFromCodePoint(this._activeBuffer.x, 0, 1, d.fg, d.bg, d.extended), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
            }
            registerCsiHandler(e, t) {
              return "t" !== e.final || e.prefix || e.intermediates ? this._parser.registerCsiHandler(e, t) : this._parser.registerCsiHandler(e, e => !b(e.params[0], this._optionsService.rawOptions.windowOptions) || t(e));
            }
            registerDcsHandler(e, t) {
              return this._parser.registerDcsHandler(e, new p.DcsHandler(t));
            }
            registerEscHandler(e, t) {
              return this._parser.registerEscHandler(e, t);
            }
            registerOscHandler(e, t) {
              return this._parser.registerOscHandler(e, new g.OscHandler(t));
            }
            bell() {
              return this._onRequestBell.fire(), !0;
            }
            lineFeed() {
              return this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._optionsService.rawOptions.convertEol && (this._activeBuffer.x = 0), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.x >= this._bufferService.cols && this._activeBuffer.x--, this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._onLineFeed.fire(), !0;
            }
            carriageReturn() {
              return this._activeBuffer.x = 0, !0;
            }
            backspace() {
              var e;
              if (!this._coreService.decPrivateModes.reverseWraparound) return this._restrictCursor(), this._activeBuffer.x > 0 && this._activeBuffer.x--, !0;
              if (this._restrictCursor(this._bufferService.cols), this._activeBuffer.x > 0) this._activeBuffer.x--;else if (0 === this._activeBuffer.x && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && (null === (e = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)) || void 0 === e ? void 0 : e.isWrapped)) {
                this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !1, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
                const e = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
                e.hasWidth(this._activeBuffer.x) && !e.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
              }
              return this._restrictCursor(), !0;
            }
            tab() {
              if (this._activeBuffer.x >= this._bufferService.cols) return !0;
              const e = this._activeBuffer.x;
              return this._activeBuffer.x = this._activeBuffer.nextStop(), this._optionsService.rawOptions.screenReaderMode && this._onA11yTab.fire(this._activeBuffer.x - e), !0;
            }
            shiftOut() {
              return this._charsetService.setgLevel(1), !0;
            }
            shiftIn() {
              return this._charsetService.setgLevel(0), !0;
            }
            _restrictCursor(e = this._bufferService.cols - 1) {
              this._activeBuffer.x = Math.min(e, Math.max(0, this._activeBuffer.x)), this._activeBuffer.y = this._coreService.decPrivateModes.origin ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y)) : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y)), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
            }
            _setCursor(e, t) {
              this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = e, this._activeBuffer.y = this._activeBuffer.scrollTop + t) : (this._activeBuffer.x = e, this._activeBuffer.y = t), this._restrictCursor(), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
            }
            _moveCursor(e, t) {
              this._restrictCursor(), this._setCursor(this._activeBuffer.x + e, this._activeBuffer.y + t);
            }
            cursorUp(e) {
              const t = this._activeBuffer.y - this._activeBuffer.scrollTop;
              return t >= 0 ? this._moveCursor(0, -Math.min(t, e.params[0] || 1)) : this._moveCursor(0, -(e.params[0] || 1)), !0;
            }
            cursorDown(e) {
              const t = this._activeBuffer.scrollBottom - this._activeBuffer.y;
              return t >= 0 ? this._moveCursor(0, Math.min(t, e.params[0] || 1)) : this._moveCursor(0, e.params[0] || 1), !0;
            }
            cursorForward(e) {
              return this._moveCursor(e.params[0] || 1, 0), !0;
            }
            cursorBackward(e) {
              return this._moveCursor(-(e.params[0] || 1), 0), !0;
            }
            cursorNextLine(e) {
              return this.cursorDown(e), this._activeBuffer.x = 0, !0;
            }
            cursorPrecedingLine(e) {
              return this.cursorUp(e), this._activeBuffer.x = 0, !0;
            }
            cursorCharAbsolute(e) {
              return this._setCursor((e.params[0] || 1) - 1, this._activeBuffer.y), !0;
            }
            cursorPosition(e) {
              return this._setCursor(e.length >= 2 ? (e.params[1] || 1) - 1 : 0, (e.params[0] || 1) - 1), !0;
            }
            charPosAbsolute(e) {
              return this._setCursor((e.params[0] || 1) - 1, this._activeBuffer.y), !0;
            }
            hPositionRelative(e) {
              return this._moveCursor(e.params[0] || 1, 0), !0;
            }
            linePosAbsolute(e) {
              return this._setCursor(this._activeBuffer.x, (e.params[0] || 1) - 1), !0;
            }
            vPositionRelative(e) {
              return this._moveCursor(0, e.params[0] || 1), !0;
            }
            hVPosition(e) {
              return this.cursorPosition(e), !0;
            }
            tabClear(e) {
              const t = e.params[0];
              return 0 === t ? delete this._activeBuffer.tabs[this._activeBuffer.x] : 3 === t && (this._activeBuffer.tabs = {}), !0;
            }
            cursorForwardTab(e) {
              if (this._activeBuffer.x >= this._bufferService.cols) return !0;
              let t = e.params[0] || 1;
              for (; t--;) this._activeBuffer.x = this._activeBuffer.nextStop();
              return !0;
            }
            cursorBackwardTab(e) {
              if (this._activeBuffer.x >= this._bufferService.cols) return !0;
              let t = e.params[0] || 1;
              for (; t--;) this._activeBuffer.x = this._activeBuffer.prevStop();
              return !0;
            }
            selectProtected(e) {
              const t = e.params[0];
              return 1 === t && (this._curAttrData.bg |= 536870912), 2 !== t && 0 !== t || (this._curAttrData.bg &= -536870913), !0;
            }
            _eraseInBufferLine(e, t, i, s = !1, r = !1) {
              const n = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
              n.replaceCells(t, i, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData(), r), s && (n.isWrapped = !1);
            }
            _resetBufferLine(e, t = !1) {
              const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
              i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()), t), this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + e), i.isWrapped = !1;
            }
            eraseInDisplay(e, t = !1) {
              let i;
              switch (this._restrictCursor(this._bufferService.cols), e.params[0]) {
                case 0:
                  for (i = this._activeBuffer.y, this._dirtyRowTracker.markDirty(i), this._eraseInBufferLine(i++, this._activeBuffer.x, this._bufferService.cols, 0 === this._activeBuffer.x, t); i < this._bufferService.rows; i++) this._resetBufferLine(i, t);
                  this._dirtyRowTracker.markDirty(i);
                  break;
                case 1:
                  for (i = this._activeBuffer.y, this._dirtyRowTracker.markDirty(i), this._eraseInBufferLine(i, 0, this._activeBuffer.x + 1, !0, t), this._activeBuffer.x + 1 >= this._bufferService.cols && (this._activeBuffer.lines.get(i + 1).isWrapped = !1); i--;) this._resetBufferLine(i, t);
                  this._dirtyRowTracker.markDirty(0);
                  break;
                case 2:
                  for (i = this._bufferService.rows, this._dirtyRowTracker.markDirty(i - 1); i--;) this._resetBufferLine(i, t);
                  this._dirtyRowTracker.markDirty(0);
                  break;
                case 3:
                  const e = this._activeBuffer.lines.length - this._bufferService.rows;
                  e > 0 && (this._activeBuffer.lines.trimStart(e), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - e, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - e, 0), this._onScroll.fire(0));
              }
              return !0;
            }
            eraseInLine(e, t = !1) {
              switch (this._restrictCursor(this._bufferService.cols), e.params[0]) {
                case 0:
                  this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, 0 === this._activeBuffer.x, t);
                  break;
                case 1:
                  this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, !1, t);
                  break;
                case 2:
                  this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, !0, t);
              }
              return this._dirtyRowTracker.markDirty(this._activeBuffer.y), !0;
            }
            insertLines(e) {
              this._restrictCursor();
              let t = e.params[0] || 1;
              if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
              const i = this._activeBuffer.ybase + this._activeBuffer.y,
                s = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom,
                r = this._bufferService.rows - 1 + this._activeBuffer.ybase - s + 1;
              for (; t--;) this._activeBuffer.lines.splice(r - 1, 1), this._activeBuffer.lines.splice(i, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
              return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
            }
            deleteLines(e) {
              this._restrictCursor();
              let t = e.params[0] || 1;
              if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
              const i = this._activeBuffer.ybase + this._activeBuffer.y;
              let s;
              for (s = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, s = this._bufferService.rows - 1 + this._activeBuffer.ybase - s; t--;) this._activeBuffer.lines.splice(i, 1), this._activeBuffer.lines.splice(s, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
              return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
            }
            insertChars(e) {
              this._restrictCursor();
              const t = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
              return t && (t.insertCells(this._activeBuffer.x, e.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
            }
            deleteChars(e) {
              this._restrictCursor();
              const t = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
              return t && (t.deleteCells(this._activeBuffer.x, e.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
            }
            scrollUp(e) {
              let t = e.params[0] || 1;
              for (; t--;) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
              return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
            }
            scrollDown(e) {
              let t = e.params[0] || 1;
              for (; t--;) this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 0, this._activeBuffer.getBlankLine(l.DEFAULT_ATTR_DATA));
              return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
            }
            scrollLeft(e) {
              if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
              const t = e.params[0] || 1;
              for (let e = this._activeBuffer.scrollTop; e <= this._activeBuffer.scrollBottom; ++e) {
                const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
                i.deleteCells(0, t, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), i.isWrapped = !1;
              }
              return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
            }
            scrollRight(e) {
              if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
              const t = e.params[0] || 1;
              for (let e = this._activeBuffer.scrollTop; e <= this._activeBuffer.scrollBottom; ++e) {
                const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
                i.insertCells(0, t, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), i.isWrapped = !1;
              }
              return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
            }
            insertColumns(e) {
              if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
              const t = e.params[0] || 1;
              for (let e = this._activeBuffer.scrollTop; e <= this._activeBuffer.scrollBottom; ++e) {
                const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
                i.insertCells(this._activeBuffer.x, t, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), i.isWrapped = !1;
              }
              return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
            }
            deleteColumns(e) {
              if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) return !0;
              const t = e.params[0] || 1;
              for (let e = this._activeBuffer.scrollTop; e <= this._activeBuffer.scrollBottom; ++e) {
                const i = this._activeBuffer.lines.get(this._activeBuffer.ybase + e);
                i.deleteCells(this._activeBuffer.x, t, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), i.isWrapped = !1;
              }
              return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
            }
            eraseChars(e) {
              this._restrictCursor();
              const t = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
              return t && (t.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (e.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
            }
            repeatPrecedingCharacter(e) {
              if (!this._parser.precedingCodepoint) return !0;
              const t = e.params[0] || 1,
                i = new Uint32Array(t);
              for (let e = 0; e < t; ++e) i[e] = this._parser.precedingCodepoint;
              return this.print(i, 0, i.length), !0;
            }
            sendDeviceAttributesPrimary(e) {
              return e.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(n.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(n.C0.ESC + "[?6c")), !0;
            }
            sendDeviceAttributesSecondary(e) {
              return e.params[0] > 0 || (this._is("xterm") ? this._coreService.triggerDataEvent(n.C0.ESC + "[>0;276;0c") : this._is("rxvt-unicode") ? this._coreService.triggerDataEvent(n.C0.ESC + "[>85;95;0c") : this._is("linux") ? this._coreService.triggerDataEvent(e.params[0] + "c") : this._is("screen") && this._coreService.triggerDataEvent(n.C0.ESC + "[>83;40003;0c")), !0;
            }
            _is(e) {
              return 0 === (this._optionsService.rawOptions.termName + "").indexOf(e);
            }
            setMode(e) {
              for (let t = 0; t < e.length; t++) switch (e.params[t]) {
                case 4:
                  this._coreService.modes.insertMode = !0;
                  break;
                case 20:
                  this._optionsService.options.convertEol = !0;
              }
              return !0;
            }
            setModePrivate(e) {
              for (let t = 0; t < e.length; t++) switch (e.params[t]) {
                case 1:
                  this._coreService.decPrivateModes.applicationCursorKeys = !0;
                  break;
                case 2:
                  this._charsetService.setgCharset(0, o.DEFAULT_CHARSET), this._charsetService.setgCharset(1, o.DEFAULT_CHARSET), this._charsetService.setgCharset(2, o.DEFAULT_CHARSET), this._charsetService.setgCharset(3, o.DEFAULT_CHARSET);
                  break;
                case 3:
                  this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(132, this._bufferService.rows), this._onRequestReset.fire());
                  break;
                case 6:
                  this._coreService.decPrivateModes.origin = !0, this._setCursor(0, 0);
                  break;
                case 7:
                  this._coreService.decPrivateModes.wraparound = !0;
                  break;
                case 12:
                  this._optionsService.options.cursorBlink = !0;
                  break;
                case 45:
                  this._coreService.decPrivateModes.reverseWraparound = !0;
                  break;
                case 66:
                  this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = !0, this._onRequestSyncScrollBar.fire();
                  break;
                case 9:
                  this._coreMouseService.activeProtocol = "X10";
                  break;
                case 1e3:
                  this._coreMouseService.activeProtocol = "VT200";
                  break;
                case 1002:
                  this._coreMouseService.activeProtocol = "DRAG";
                  break;
                case 1003:
                  this._coreMouseService.activeProtocol = "ANY";
                  break;
                case 1004:
                  this._coreService.decPrivateModes.sendFocus = !0, this._onRequestSendFocus.fire();
                  break;
                case 1005:
                  this._logService.debug("DECSET 1005 not supported (see #2507)");
                  break;
                case 1006:
                  this._coreMouseService.activeEncoding = "SGR";
                  break;
                case 1015:
                  this._logService.debug("DECSET 1015 not supported (see #2507)");
                  break;
                case 1016:
                  this._coreMouseService.activeEncoding = "SGR_PIXELS";
                  break;
                case 25:
                  this._coreService.isCursorHidden = !1;
                  break;
                case 1048:
                  this.saveCursor();
                  break;
                case 1049:
                  this.saveCursor();
                case 47:
                case 1047:
                  this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()), this._coreService.isCursorInitialized = !0, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
                  break;
                case 2004:
                  this._coreService.decPrivateModes.bracketedPasteMode = !0;
              }
              return !0;
            }
            resetMode(e) {
              for (let t = 0; t < e.length; t++) switch (e.params[t]) {
                case 4:
                  this._coreService.modes.insertMode = !1;
                  break;
                case 20:
                  this._optionsService.options.convertEol = !1;
              }
              return !0;
            }
            resetModePrivate(e) {
              for (let t = 0; t < e.length; t++) switch (e.params[t]) {
                case 1:
                  this._coreService.decPrivateModes.applicationCursorKeys = !1;
                  break;
                case 3:
                  this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(80, this._bufferService.rows), this._onRequestReset.fire());
                  break;
                case 6:
                  this._coreService.decPrivateModes.origin = !1, this._setCursor(0, 0);
                  break;
                case 7:
                  this._coreService.decPrivateModes.wraparound = !1;
                  break;
                case 12:
                  this._optionsService.options.cursorBlink = !1;
                  break;
                case 45:
                  this._coreService.decPrivateModes.reverseWraparound = !1;
                  break;
                case 66:
                  this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = !1, this._onRequestSyncScrollBar.fire();
                  break;
                case 9:
                case 1e3:
                case 1002:
                case 1003:
                  this._coreMouseService.activeProtocol = "NONE";
                  break;
                case 1004:
                  this._coreService.decPrivateModes.sendFocus = !1;
                  break;
                case 1005:
                  this._logService.debug("DECRST 1005 not supported (see #2507)");
                  break;
                case 1006:
                case 1016:
                  this._coreMouseService.activeEncoding = "DEFAULT";
                  break;
                case 1015:
                  this._logService.debug("DECRST 1015 not supported (see #2507)");
                  break;
                case 25:
                  this._coreService.isCursorHidden = !0;
                  break;
                case 1048:
                  this.restoreCursor();
                  break;
                case 1049:
                case 47:
                case 1047:
                  this._bufferService.buffers.activateNormalBuffer(), 1049 === e.params[t] && this.restoreCursor(), this._coreService.isCursorInitialized = !0, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
                  break;
                case 2004:
                  this._coreService.decPrivateModes.bracketedPasteMode = !1;
              }
              return !0;
            }
            requestMode(e, t) {
              const i = this._coreService.decPrivateModes,
                {
                  activeProtocol: s,
                  activeEncoding: r
                } = this._coreMouseService,
                o = this._coreService,
                {
                  buffers: a,
                  cols: h
                } = this._bufferService,
                {
                  active: c,
                  alt: l
                } = a,
                d = this._optionsService.rawOptions,
                _ = e => e ? 1 : 2,
                u = e.params[0];
              return f = u, v = t ? 2 === u ? 3 : 4 === u ? _(o.modes.insertMode) : 12 === u ? 4 : 20 === u ? _(d.convertEol) : 0 : 1 === u ? _(i.applicationCursorKeys) : 3 === u ? d.windowOptions.setWinLines ? 80 === h ? 2 : 132 === h ? 1 : 0 : 0 : 6 === u ? _(i.origin) : 7 === u ? _(i.wraparound) : 8 === u ? 3 : 9 === u ? _("X10" === s) : 12 === u ? _(d.cursorBlink) : 25 === u ? _(!o.isCursorHidden) : 45 === u ? _(i.reverseWraparound) : 66 === u ? _(i.applicationKeypad) : 1e3 === u ? _("VT200" === s) : 1002 === u ? _("DRAG" === s) : 1003 === u ? _("ANY" === s) : 1004 === u ? _(i.sendFocus) : 1005 === u ? 4 : 1006 === u ? _("SGR" === r) : 1015 === u ? 4 : 1016 === u ? _("SGR_PIXELS" === r) : 1048 === u ? 1 : 47 === u || 1047 === u || 1049 === u ? _(c === l) : 2004 === u ? _(i.bracketedPasteMode) : 0, o.triggerDataEvent(`${n.C0.ESC}[${t ? "" : "?"}${f};${v}$y`), !0;
              var f, v;
            }
            _updateAttrColor(e, t, i, s, r) {
              return 2 === t ? (e |= 50331648, e &= -16777216, e |= f.AttributeData.fromColorRGB([i, s, r])) : 5 === t && (e &= -50331904, e |= 33554432 | 255 & i), e;
            }
            _extractColor(e, t, i) {
              const s = [0, 0, -1, 0, 0, 0];
              let r = 0,
                n = 0;
              do {
                if (s[n + r] = e.params[t + n], e.hasSubParams(t + n)) {
                  const i = e.getSubParams(t + n);
                  let o = 0;
                  do {
                    5 === s[1] && (r = 1), s[n + o + 1 + r] = i[o];
                  } while (++o < i.length && o + n + 1 + r < s.length);
                  break;
                }
                if (5 === s[1] && n + r >= 2 || 2 === s[1] && n + r >= 5) break;
                s[1] && (r = 1);
              } while (++n + t < e.length && n + r < s.length);
              for (let e = 2; e < s.length; ++e) -1 === s[e] && (s[e] = 0);
              switch (s[0]) {
                case 38:
                  i.fg = this._updateAttrColor(i.fg, s[1], s[3], s[4], s[5]);
                  break;
                case 48:
                  i.bg = this._updateAttrColor(i.bg, s[1], s[3], s[4], s[5]);
                  break;
                case 58:
                  i.extended = i.extended.clone(), i.extended.underlineColor = this._updateAttrColor(i.extended.underlineColor, s[1], s[3], s[4], s[5]);
              }
              return n;
            }
            _processUnderline(e, t) {
              t.extended = t.extended.clone(), (!~e || e > 5) && (e = 1), t.extended.underlineStyle = e, t.fg |= 268435456, 0 === e && (t.fg &= -268435457), t.updateExtended();
            }
            _processSGR0(e) {
              e.fg = l.DEFAULT_ATTR_DATA.fg, e.bg = l.DEFAULT_ATTR_DATA.bg, e.extended = e.extended.clone(), e.extended.underlineStyle = 0, e.extended.underlineColor &= -67108864, e.updateExtended();
            }
            charAttributes(e) {
              if (1 === e.length && 0 === e.params[0]) return this._processSGR0(this._curAttrData), !0;
              const t = e.length;
              let i;
              const s = this._curAttrData;
              for (let r = 0; r < t; r++) i = e.params[r], i >= 30 && i <= 37 ? (s.fg &= -50331904, s.fg |= 16777216 | i - 30) : i >= 40 && i <= 47 ? (s.bg &= -50331904, s.bg |= 16777216 | i - 40) : i >= 90 && i <= 97 ? (s.fg &= -50331904, s.fg |= 16777224 | i - 90) : i >= 100 && i <= 107 ? (s.bg &= -50331904, s.bg |= 16777224 | i - 100) : 0 === i ? this._processSGR0(s) : 1 === i ? s.fg |= 134217728 : 3 === i ? s.bg |= 67108864 : 4 === i ? (s.fg |= 268435456, this._processUnderline(e.hasSubParams(r) ? e.getSubParams(r)[0] : 1, s)) : 5 === i ? s.fg |= 536870912 : 7 === i ? s.fg |= 67108864 : 8 === i ? s.fg |= 1073741824 : 9 === i ? s.fg |= 2147483648 : 2 === i ? s.bg |= 134217728 : 21 === i ? this._processUnderline(2, s) : 22 === i ? (s.fg &= -134217729, s.bg &= -134217729) : 23 === i ? s.bg &= -67108865 : 24 === i ? (s.fg &= -268435457, this._processUnderline(0, s)) : 25 === i ? s.fg &= -536870913 : 27 === i ? s.fg &= -67108865 : 28 === i ? s.fg &= -1073741825 : 29 === i ? s.fg &= 2147483647 : 39 === i ? (s.fg &= -67108864, s.fg |= 16777215 & l.DEFAULT_ATTR_DATA.fg) : 49 === i ? (s.bg &= -67108864, s.bg |= 16777215 & l.DEFAULT_ATTR_DATA.bg) : 38 === i || 48 === i || 58 === i ? r += this._extractColor(e, r, s) : 59 === i ? (s.extended = s.extended.clone(), s.extended.underlineColor = -1, s.updateExtended()) : 100 === i ? (s.fg &= -67108864, s.fg |= 16777215 & l.DEFAULT_ATTR_DATA.fg, s.bg &= -67108864, s.bg |= 16777215 & l.DEFAULT_ATTR_DATA.bg) : this._logService.debug("Unknown SGR attribute: %d.", i);
              return !0;
            }
            deviceStatus(e) {
              switch (e.params[0]) {
                case 5:
                  this._coreService.triggerDataEvent(`${n.C0.ESC}[0n`);
                  break;
                case 6:
                  const e = this._activeBuffer.y + 1,
                    t = this._activeBuffer.x + 1;
                  this._coreService.triggerDataEvent(`${n.C0.ESC}[${e};${t}R`);
              }
              return !0;
            }
            deviceStatusPrivate(e) {
              if (6 === e.params[0]) {
                const e = this._activeBuffer.y + 1,
                  t = this._activeBuffer.x + 1;
                this._coreService.triggerDataEvent(`${n.C0.ESC}[?${e};${t}R`);
              }
              return !0;
            }
            softReset(e) {
              return this._coreService.isCursorHidden = !1, this._onRequestSyncScrollBar.fire(), this._activeBuffer.scrollTop = 0, this._activeBuffer.scrollBottom = this._bufferService.rows - 1, this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._coreService.reset(), this._charsetService.reset(), this._activeBuffer.savedX = 0, this._activeBuffer.savedY = this._activeBuffer.ybase, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, this._coreService.decPrivateModes.origin = !1, !0;
            }
            setCursorStyle(e) {
              const t = e.params[0] || 1;
              switch (t) {
                case 1:
                case 2:
                  this._optionsService.options.cursorStyle = "block";
                  break;
                case 3:
                case 4:
                  this._optionsService.options.cursorStyle = "underline";
                  break;
                case 5:
                case 6:
                  this._optionsService.options.cursorStyle = "bar";
              }
              const i = t % 2 == 1;
              return this._optionsService.options.cursorBlink = i, !0;
            }
            setScrollRegion(e) {
              const t = e.params[0] || 1;
              let i;
              return (e.length < 2 || (i = e.params[1]) > this._bufferService.rows || 0 === i) && (i = this._bufferService.rows), i > t && (this._activeBuffer.scrollTop = t - 1, this._activeBuffer.scrollBottom = i - 1, this._setCursor(0, 0)), !0;
            }
            windowOptions(e) {
              if (!b(e.params[0], this._optionsService.rawOptions.windowOptions)) return !0;
              const t = e.length > 1 ? e.params[1] : 0;
              switch (e.params[0]) {
                case 14:
                  2 !== t && this._onRequestWindowsOptionsReport.fire(y.GET_WIN_SIZE_PIXELS);
                  break;
                case 16:
                  this._onRequestWindowsOptionsReport.fire(y.GET_CELL_SIZE_PIXELS);
                  break;
                case 18:
                  this._bufferService && this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
                  break;
                case 22:
                  0 !== t && 2 !== t || (this._windowTitleStack.push(this._windowTitle), this._windowTitleStack.length > 10 && this._windowTitleStack.shift()), 0 !== t && 1 !== t || (this._iconNameStack.push(this._iconName), this._iconNameStack.length > 10 && this._iconNameStack.shift());
                  break;
                case 23:
                  0 !== t && 2 !== t || this._windowTitleStack.length && this.setTitle(this._windowTitleStack.pop()), 0 !== t && 1 !== t || this._iconNameStack.length && this.setIconName(this._iconNameStack.pop());
              }
              return !0;
            }
            saveCursor(e) {
              return this._activeBuffer.savedX = this._activeBuffer.x, this._activeBuffer.savedY = this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, !0;
            }
            restoreCursor(e) {
              return this._activeBuffer.x = this._activeBuffer.savedX || 0, this._activeBuffer.y = Math.max(this._activeBuffer.savedY - this._activeBuffer.ybase, 0), this._curAttrData.fg = this._activeBuffer.savedCurAttrData.fg, this._curAttrData.bg = this._activeBuffer.savedCurAttrData.bg, this._charsetService.charset = this._savedCharset, this._activeBuffer.savedCharset && (this._charsetService.charset = this._activeBuffer.savedCharset), this._restrictCursor(), !0;
            }
            setTitle(e) {
              return this._windowTitle = e, this._onTitleChange.fire(e), !0;
            }
            setIconName(e) {
              return this._iconName = e, !0;
            }
            setOrReportIndexedColor(e) {
              const t = [],
                i = e.split(";");
              for (; i.length > 1;) {
                const e = i.shift(),
                  s = i.shift();
                if (/^\d+$/.exec(e)) {
                  const i = parseInt(e);
                  if (0 <= i && i < 256) if ("?" === s) t.push({
                    type: 0,
                    index: i
                  });else {
                    const e = (0, S.parseColor)(s);
                    e && t.push({
                      type: 1,
                      index: i,
                      color: e
                    });
                  }
                }
              }
              return t.length && this._onColor.fire(t), !0;
            }
            setHyperlink(e) {
              const t = e.split(";");
              return !(t.length < 2) && (t[1] ? this._createHyperlink(t[0], t[1]) : !t[0] && this._finishHyperlink());
            }
            _createHyperlink(e, t) {
              this._getCurrentLinkId() && this._finishHyperlink();
              const i = e.split(":");
              let s;
              const r = i.findIndex(e => e.startsWith("id="));
              return -1 !== r && (s = i[r].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({
                id: s,
                uri: t
              }), this._curAttrData.updateExtended(), !0;
            }
            _finishHyperlink() {
              return this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = 0, this._curAttrData.updateExtended(), !0;
            }
            _setOrReportSpecialColor(e, t) {
              const i = e.split(";");
              for (let e = 0; e < i.length && !(t >= this._specialColors.length); ++e, ++t) if ("?" === i[e]) this._onColor.fire([{
                type: 0,
                index: this._specialColors[t]
              }]);else {
                const s = (0, S.parseColor)(i[e]);
                s && this._onColor.fire([{
                  type: 1,
                  index: this._specialColors[t],
                  color: s
                }]);
              }
              return !0;
            }
            setOrReportFgColor(e) {
              return this._setOrReportSpecialColor(e, 0);
            }
            setOrReportBgColor(e) {
              return this._setOrReportSpecialColor(e, 1);
            }
            setOrReportCursorColor(e) {
              return this._setOrReportSpecialColor(e, 2);
            }
            restoreIndexedColor(e) {
              if (!e) return this._onColor.fire([{
                type: 2
              }]), !0;
              const t = [],
                i = e.split(";");
              for (let e = 0; e < i.length; ++e) if (/^\d+$/.exec(i[e])) {
                const s = parseInt(i[e]);
                0 <= s && s < 256 && t.push({
                  type: 2,
                  index: s
                });
              }
              return t.length && this._onColor.fire(t), !0;
            }
            restoreFgColor(e) {
              return this._onColor.fire([{
                type: 2,
                index: 256
              }]), !0;
            }
            restoreBgColor(e) {
              return this._onColor.fire([{
                type: 2,
                index: 257
              }]), !0;
            }
            restoreCursorColor(e) {
              return this._onColor.fire([{
                type: 2,
                index: 258
              }]), !0;
            }
            nextLine() {
              return this._activeBuffer.x = 0, this.index(), !0;
            }
            keypadApplicationMode() {
              return this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = !0, this._onRequestSyncScrollBar.fire(), !0;
            }
            keypadNumericMode() {
              return this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = !1, this._onRequestSyncScrollBar.fire(), !0;
            }
            selectDefaultCharset() {
              return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, o.DEFAULT_CHARSET), !0;
            }
            selectCharset(e) {
              return 2 !== e.length ? (this.selectDefaultCharset(), !0) : ("/" === e[0] || this._charsetService.setgCharset(m[e[0]], o.CHARSETS[e[1]] || o.DEFAULT_CHARSET), !0);
            }
            index() {
              return this._restrictCursor(), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._restrictCursor(), !0;
            }
            tabSet() {
              return this._activeBuffer.tabs[this._activeBuffer.x] = !0, !0;
            }
            reverseIndex() {
              if (this._restrictCursor(), this._activeBuffer.y === this._activeBuffer.scrollTop) {
                const e = this._activeBuffer.scrollBottom - this._activeBuffer.scrollTop;
                this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase + this._activeBuffer.y, e, 1), this._activeBuffer.lines.set(this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.getBlankLine(this._eraseAttrData())), this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
              } else this._activeBuffer.y--, this._restrictCursor();
              return !0;
            }
            fullReset() {
              return this._parser.reset(), this._onRequestReset.fire(), !0;
            }
            reset() {
              this._curAttrData = l.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = l.DEFAULT_ATTR_DATA.clone();
            }
            _eraseAttrData() {
              return this._eraseAttrDataInternal.bg &= -67108864, this._eraseAttrDataInternal.bg |= 67108863 & this._curAttrData.bg, this._eraseAttrDataInternal;
            }
            setgLevel(e) {
              return this._charsetService.setgLevel(e), !0;
            }
            screenAlignmentPattern() {
              const e = new u.CellData();
              e.content = 1 << 22 | "E".charCodeAt(0), e.fg = this._curAttrData.fg, e.bg = this._curAttrData.bg, this._setCursor(0, 0);
              for (let t = 0; t < this._bufferService.rows; ++t) {
                const i = this._activeBuffer.ybase + this._activeBuffer.y + t,
                  s = this._activeBuffer.lines.get(i);
                s && (s.fill(e), s.isWrapped = !1);
              }
              return this._dirtyRowTracker.markAllDirty(), this._setCursor(0, 0), !0;
            }
            requestStatusString(e, t) {
              const i = this._bufferService.buffer,
                s = this._optionsService.rawOptions;
              return (e => (this._coreService.triggerDataEvent(`${n.C0.ESC}${e}${n.C0.ESC}\\`), !0))('"q' === e ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : '"p' === e ? 'P1$r61;1"p' : "r" === e ? `P1$r${i.scrollTop + 1};${i.scrollBottom + 1}r` : "m" === e ? "P1$r0m" : " q" === e ? `P1$r${{
                block: 2,
                underline: 4,
                bar: 6
              }[s.cursorStyle] - (s.cursorBlink ? 1 : 0)} q` : "P0$r");
            }
            markRangeDirty(e, t) {
              this._dirtyRowTracker.markRangeDirty(e, t);
            }
          }
          t.InputHandler = E;
          let L = class {
            constructor(e) {
              this._bufferService = e, this.clearRange();
            }
            clearRange() {
              this.start = this._bufferService.buffer.y, this.end = this._bufferService.buffer.y;
            }
            markDirty(e) {
              e < this.start ? this.start = e : e > this.end && (this.end = e);
            }
            markRangeDirty(e, t) {
              e > t && (w = e, e = t, t = w), e < this.start && (this.start = e), t > this.end && (this.end = t);
            }
            markAllDirty() {
              this.markRangeDirty(0, this._bufferService.rows - 1);
            }
          };
          L = s([r(0, v.IBufferService)], L);
        },
        844: (e, t) => {
          function i(e) {
            for (const t of e) t.dispose();
            e.length = 0;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.getDisposeArrayDisposable = t.disposeArray = t.toDisposable = t.Disposable = void 0, t.Disposable = class {
            constructor() {
              this._disposables = [], this._isDisposed = !1;
            }
            dispose() {
              this._isDisposed = !0;
              for (const e of this._disposables) e.dispose();
              this._disposables.length = 0;
            }
            register(e) {
              return this._disposables.push(e), e;
            }
            unregister(e) {
              const t = this._disposables.indexOf(e);
              -1 !== t && this._disposables.splice(t, 1);
            }
          }, t.toDisposable = function (e) {
            return {
              dispose: e
            };
          }, t.disposeArray = i, t.getDisposeArrayDisposable = function (e) {
            return {
              dispose: () => i(e)
            };
          };
        },
        1505: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.FourKeyMap = t.TwoKeyMap = void 0;
          class i {
            constructor() {
              this._data = {};
            }
            set(e, t, i) {
              this._data[e] || (this._data[e] = {}), this._data[e][t] = i;
            }
            get(e, t) {
              return this._data[e] ? this._data[e][t] : void 0;
            }
            clear() {
              this._data = {};
            }
          }
          t.TwoKeyMap = i, t.FourKeyMap = class {
            constructor() {
              this._data = new i();
            }
            set(e, t, s, r, n) {
              this._data.get(e, t) || this._data.set(e, t, new i()), this._data.get(e, t).set(s, r, n);
            }
            get(e, t, i, s) {
              var r;
              return null === (r = this._data.get(e, t)) || void 0 === r ? void 0 : r.get(i, s);
            }
            clear() {
              this._data.clear();
            }
          };
        },
        6114: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.isChromeOS = t.isLinux = t.isWindows = t.isIphone = t.isIpad = t.isMac = t.getSafariVersion = t.isSafari = t.isLegacyEdge = t.isFirefox = t.isNode = void 0, t.isNode = "undefined" == typeof navigator;
          const i = t.isNode ? "node" : navigator.userAgent,
            s = t.isNode ? "node" : navigator.platform;
          t.isFirefox = i.includes("Firefox"), t.isLegacyEdge = i.includes("Edge"), t.isSafari = /^((?!chrome|android).)*safari/i.test(i), t.getSafariVersion = function () {
            if (!t.isSafari) return 0;
            const e = i.match(/Version\/(\d+)/);
            return null === e || e.length < 2 ? 0 : parseInt(e[1]);
          }, t.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(s), t.isIpad = "iPad" === s, t.isIphone = "iPhone" === s, t.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(s), t.isLinux = s.indexOf("Linux") >= 0, t.isChromeOS = /\bCrOS\b/.test(i);
        },
        6106: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.SortedList = void 0;
          let i = 0;
          t.SortedList = class {
            constructor(e) {
              this._getKey = e, this._array = [];
            }
            clear() {
              this._array.length = 0;
            }
            insert(e) {
              0 !== this._array.length ? (i = this._search(this._getKey(e), 0, this._array.length - 1), this._array.splice(i, 0, e)) : this._array.push(e);
            }
            delete(e) {
              if (0 === this._array.length) return !1;
              const t = this._getKey(e);
              if (void 0 === t) return !1;
              if (i = this._search(t, 0, this._array.length - 1), -1 === i) return !1;
              if (this._getKey(this._array[i]) !== t) return !1;
              do {
                if (this._array[i] === e) return this._array.splice(i, 1), !0;
              } while (++i < this._array.length && this._getKey(this._array[i]) === t);
              return !1;
            }
            *getKeyIterator(e) {
              if (0 !== this._array.length && (i = this._search(e, 0, this._array.length - 1), !(i < 0 || i >= this._array.length) && this._getKey(this._array[i]) === e)) do {
                yield this._array[i];
              } while (++i < this._array.length && this._getKey(this._array[i]) === e);
            }
            forEachByKey(e, t) {
              if (0 !== this._array.length && (i = this._search(e, 0, this._array.length - 1), !(i < 0 || i >= this._array.length) && this._getKey(this._array[i]) === e)) do {
                t(this._array[i]);
              } while (++i < this._array.length && this._getKey(this._array[i]) === e);
            }
            values() {
              return this._array.values();
            }
            _search(e, t, i) {
              if (i < t) return t;
              let s = Math.floor((t + i) / 2);
              const r = this._getKey(this._array[s]);
              if (r > e) return this._search(e, t, s - 1);
              if (r < e) return this._search(e, s + 1, i);
              for (; s > 0 && this._getKey(this._array[s - 1]) === e;) s--;
              return s;
            }
          };
        },
        7226: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.DebouncedIdleTask = t.IdleTaskQueue = t.PriorityTaskQueue = void 0;
          const s = i(6114);
          class r {
            constructor() {
              this._tasks = [], this._i = 0;
            }
            enqueue(e) {
              this._tasks.push(e), this._start();
            }
            flush() {
              for (; this._i < this._tasks.length;) this._tasks[this._i]() || this._i++;
              this.clear();
            }
            clear() {
              this._idleCallback && (this._cancelCallback(this._idleCallback), this._idleCallback = void 0), this._i = 0, this._tasks.length = 0;
            }
            _start() {
              this._idleCallback || (this._idleCallback = this._requestCallback(this._process.bind(this)));
            }
            _process(e) {
              this._idleCallback = void 0;
              let t = 0,
                i = 0,
                s = e.timeRemaining(),
                r = 0;
              for (; this._i < this._tasks.length;) {
                if (t = Date.now(), this._tasks[this._i]() || this._i++, t = Math.max(1, Date.now() - t), i = Math.max(t, i), r = e.timeRemaining(), 1.5 * i > r) return s - t < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s - t))}ms`), void this._start();
                s = r;
              }
              this.clear();
            }
          }
          class n extends r {
            _requestCallback(e) {
              return setTimeout(() => e(this._createDeadline(16)));
            }
            _cancelCallback(e) {
              clearTimeout(e);
            }
            _createDeadline(e) {
              const t = Date.now() + e;
              return {
                timeRemaining: () => Math.max(0, t - Date.now())
              };
            }
          }
          t.PriorityTaskQueue = n, t.IdleTaskQueue = !s.isNode && "requestIdleCallback" in window ? class extends r {
            _requestCallback(e) {
              return requestIdleCallback(e);
            }
            _cancelCallback(e) {
              cancelIdleCallback(e);
            }
          } : n, t.DebouncedIdleTask = class {
            constructor() {
              this._queue = new t.IdleTaskQueue();
            }
            set(e) {
              this._queue.clear(), this._queue.enqueue(e);
            }
            flush() {
              this._queue.flush();
            }
          };
        },
        9282: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.updateWindowsModeWrappedState = void 0;
          const s = i(643);
          t.updateWindowsModeWrappedState = function (e) {
            const t = e.buffer.lines.get(e.buffer.ybase + e.buffer.y - 1),
              i = null == t ? void 0 : t.get(e.cols - 1),
              r = e.buffer.lines.get(e.buffer.ybase + e.buffer.y);
            r && i && (r.isWrapped = i[s.CHAR_DATA_CODE_INDEX] !== s.NULL_CELL_CODE && i[s.CHAR_DATA_CODE_INDEX] !== s.WHITESPACE_CELL_CODE);
          };
        },
        3734: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ExtendedAttrs = t.AttributeData = void 0;
          class i {
            constructor() {
              this.fg = 0, this.bg = 0, this.extended = new s();
            }
            static toColorRGB(e) {
              return [e >>> 16 & 255, e >>> 8 & 255, 255 & e];
            }
            static fromColorRGB(e) {
              return (255 & e[0]) << 16 | (255 & e[1]) << 8 | 255 & e[2];
            }
            clone() {
              const e = new i();
              return e.fg = this.fg, e.bg = this.bg, e.extended = this.extended.clone(), e;
            }
            isInverse() {
              return 67108864 & this.fg;
            }
            isBold() {
              return 134217728 & this.fg;
            }
            isUnderline() {
              return this.hasExtendedAttrs() && 0 !== this.extended.underlineStyle ? 1 : 268435456 & this.fg;
            }
            isBlink() {
              return 536870912 & this.fg;
            }
            isInvisible() {
              return 1073741824 & this.fg;
            }
            isItalic() {
              return 67108864 & this.bg;
            }
            isDim() {
              return 134217728 & this.bg;
            }
            isStrikethrough() {
              return 2147483648 & this.fg;
            }
            isProtected() {
              return 536870912 & this.bg;
            }
            getFgColorMode() {
              return 50331648 & this.fg;
            }
            getBgColorMode() {
              return 50331648 & this.bg;
            }
            isFgRGB() {
              return 50331648 == (50331648 & this.fg);
            }
            isBgRGB() {
              return 50331648 == (50331648 & this.bg);
            }
            isFgPalette() {
              return 16777216 == (50331648 & this.fg) || 33554432 == (50331648 & this.fg);
            }
            isBgPalette() {
              return 16777216 == (50331648 & this.bg) || 33554432 == (50331648 & this.bg);
            }
            isFgDefault() {
              return 0 == (50331648 & this.fg);
            }
            isBgDefault() {
              return 0 == (50331648 & this.bg);
            }
            isAttributeDefault() {
              return 0 === this.fg && 0 === this.bg;
            }
            getFgColor() {
              switch (50331648 & this.fg) {
                case 16777216:
                case 33554432:
                  return 255 & this.fg;
                case 50331648:
                  return 16777215 & this.fg;
                default:
                  return -1;
              }
            }
            getBgColor() {
              switch (50331648 & this.bg) {
                case 16777216:
                case 33554432:
                  return 255 & this.bg;
                case 50331648:
                  return 16777215 & this.bg;
                default:
                  return -1;
              }
            }
            hasExtendedAttrs() {
              return 268435456 & this.bg;
            }
            updateExtended() {
              this.extended.isEmpty() ? this.bg &= -268435457 : this.bg |= 268435456;
            }
            getUnderlineColor() {
              if (268435456 & this.bg && ~this.extended.underlineColor) switch (50331648 & this.extended.underlineColor) {
                case 16777216:
                case 33554432:
                  return 255 & this.extended.underlineColor;
                case 50331648:
                  return 16777215 & this.extended.underlineColor;
                default:
                  return this.getFgColor();
              }
              return this.getFgColor();
            }
            getUnderlineColorMode() {
              return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 & this.extended.underlineColor : this.getFgColorMode();
            }
            isUnderlineColorRGB() {
              return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 == (50331648 & this.extended.underlineColor) : this.isFgRGB();
            }
            isUnderlineColorPalette() {
              return 268435456 & this.bg && ~this.extended.underlineColor ? 16777216 == (50331648 & this.extended.underlineColor) || 33554432 == (50331648 & this.extended.underlineColor) : this.isFgPalette();
            }
            isUnderlineColorDefault() {
              return 268435456 & this.bg && ~this.extended.underlineColor ? 0 == (50331648 & this.extended.underlineColor) : this.isFgDefault();
            }
            getUnderlineStyle() {
              return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
            }
          }
          t.AttributeData = i;
          class s {
            constructor(e = 0, t = 0) {
              this._ext = 0, this._urlId = 0, this._ext = e, this._urlId = t;
            }
            get ext() {
              return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
            }
            set ext(e) {
              this._ext = e;
            }
            get underlineStyle() {
              return this._urlId ? 5 : (469762048 & this._ext) >> 26;
            }
            set underlineStyle(e) {
              this._ext &= -469762049, this._ext |= e << 26 & 469762048;
            }
            get underlineColor() {
              return 67108863 & this._ext;
            }
            set underlineColor(e) {
              this._ext &= -67108864, this._ext |= 67108863 & e;
            }
            get urlId() {
              return this._urlId;
            }
            set urlId(e) {
              this._urlId = e;
            }
            clone() {
              return new s(this._ext, this._urlId);
            }
            isEmpty() {
              return 0 === this.underlineStyle && 0 === this._urlId;
            }
          }
          t.ExtendedAttrs = s;
        },
        9092: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BufferStringIterator = t.Buffer = t.MAX_BUFFER_SIZE = void 0;
          const s = i(6349),
            r = i(8437),
            n = i(511),
            o = i(643),
            a = i(4634),
            h = i(4863),
            c = i(7116),
            l = i(3734),
            d = i(7226);
          t.MAX_BUFFER_SIZE = 4294967295, t.Buffer = class {
            constructor(e, t, i) {
              this._hasScrollback = e, this._optionsService = t, this._bufferService = i, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData = r.DEFAULT_ATTR_DATA.clone(), this.savedCharset = c.DEFAULT_CHARSET, this.markers = [], this._nullCell = n.CellData.fromCharData([0, o.NULL_CELL_CHAR, o.NULL_CELL_WIDTH, o.NULL_CELL_CODE]), this._whitespaceCell = n.CellData.fromCharData([0, o.WHITESPACE_CELL_CHAR, o.WHITESPACE_CELL_WIDTH, o.WHITESPACE_CELL_CODE]), this._isClearing = !1, this._memoryCleanupQueue = new d.IdleTaskQueue(), this._memoryCleanupPosition = 0, this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new s.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
            }
            getNullCell(e) {
              return e ? (this._nullCell.fg = e.fg, this._nullCell.bg = e.bg, this._nullCell.extended = e.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new l.ExtendedAttrs()), this._nullCell;
            }
            getWhitespaceCell(e) {
              return e ? (this._whitespaceCell.fg = e.fg, this._whitespaceCell.bg = e.bg, this._whitespaceCell.extended = e.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new l.ExtendedAttrs()), this._whitespaceCell;
            }
            getBlankLine(e, t) {
              return new r.BufferLine(this._bufferService.cols, this.getNullCell(e), t);
            }
            get hasScrollback() {
              return this._hasScrollback && this.lines.maxLength > this._rows;
            }
            get isCursorInViewport() {
              const e = this.ybase + this.y - this.ydisp;
              return e >= 0 && e < this._rows;
            }
            _getCorrectBufferLength(e) {
              if (!this._hasScrollback) return e;
              const i = e + this._optionsService.rawOptions.scrollback;
              return i > t.MAX_BUFFER_SIZE ? t.MAX_BUFFER_SIZE : i;
            }
            fillViewportRows(e) {
              if (0 === this.lines.length) {
                void 0 === e && (e = r.DEFAULT_ATTR_DATA);
                let t = this._rows;
                for (; t--;) this.lines.push(this.getBlankLine(e));
              }
            }
            clear() {
              this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new s.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
            }
            resize(e, t) {
              const i = this.getNullCell(r.DEFAULT_ATTR_DATA);
              let s = 0;
              const n = this._getCorrectBufferLength(t);
              if (n > this.lines.maxLength && (this.lines.maxLength = n), this.lines.length > 0) {
                if (this._cols < e) for (let t = 0; t < this.lines.length; t++) s += +this.lines.get(t).resize(e, i);
                let o = 0;
                if (this._rows < t) for (let s = this._rows; s < t; s++) this.lines.length < t + this.ybase && (this._optionsService.rawOptions.windowsMode ? this.lines.push(new r.BufferLine(e, i)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + o + 1 ? (this.ybase--, o++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new r.BufferLine(e, i)));else for (let e = this._rows; e > t; e--) this.lines.length > t + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
                if (n < this.lines.maxLength) {
                  const e = this.lines.length - n;
                  e > 0 && (this.lines.trimStart(e), this.ybase = Math.max(this.ybase - e, 0), this.ydisp = Math.max(this.ydisp - e, 0), this.savedY = Math.max(this.savedY - e, 0)), this.lines.maxLength = n;
                }
                this.x = Math.min(this.x, e - 1), this.y = Math.min(this.y, t - 1), o && (this.y += o), this.savedX = Math.min(this.savedX, e - 1), this.scrollTop = 0;
              }
              if (this.scrollBottom = t - 1, this._isReflowEnabled && (this._reflow(e, t), this._cols > e)) for (let t = 0; t < this.lines.length; t++) s += +this.lines.get(t).resize(e, i);
              this._cols = e, this._rows = t, this._memoryCleanupQueue.clear(), s > .1 * this.lines.length && (this._memoryCleanupPosition = 0, this._memoryCleanupQueue.enqueue(() => this._batchedMemoryCleanup()));
            }
            _batchedMemoryCleanup() {
              let e = !0;
              this._memoryCleanupPosition >= this.lines.length && (this._memoryCleanupPosition = 0, e = !1);
              let t = 0;
              for (; this._memoryCleanupPosition < this.lines.length;) if (t += this.lines.get(this._memoryCleanupPosition++).cleanupMemory(), t > 100) return !0;
              return e;
            }
            get _isReflowEnabled() {
              return this._hasScrollback && !this._optionsService.rawOptions.windowsMode;
            }
            _reflow(e, t) {
              this._cols !== e && (e > this._cols ? this._reflowLarger(e, t) : this._reflowSmaller(e, t));
            }
            _reflowLarger(e, t) {
              const i = (0, a.reflowLargerGetLinesToRemove)(this.lines, this._cols, e, this.ybase + this.y, this.getNullCell(r.DEFAULT_ATTR_DATA));
              if (i.length > 0) {
                const s = (0, a.reflowLargerCreateNewLayout)(this.lines, i);
                (0, a.reflowLargerApplyNewLayout)(this.lines, s.layout), this._reflowLargerAdjustViewport(e, t, s.countRemoved);
              }
            }
            _reflowLargerAdjustViewport(e, t, i) {
              const s = this.getNullCell(r.DEFAULT_ATTR_DATA);
              let n = i;
              for (; n-- > 0;) 0 === this.ybase ? (this.y > 0 && this.y--, this.lines.length < t && this.lines.push(new r.BufferLine(e, s))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
              this.savedY = Math.max(this.savedY - i, 0);
            }
            _reflowSmaller(e, t) {
              const i = this.getNullCell(r.DEFAULT_ATTR_DATA),
                s = [];
              let n = 0;
              for (let o = this.lines.length - 1; o >= 0; o--) {
                let h = this.lines.get(o);
                if (!h || !h.isWrapped && h.getTrimmedLength() <= e) continue;
                const c = [h];
                for (; h.isWrapped && o > 0;) h = this.lines.get(--o), c.unshift(h);
                const l = this.ybase + this.y;
                if (l >= o && l < o + c.length) continue;
                const d = c[c.length - 1].getTrimmedLength(),
                  _ = (0, a.reflowSmallerGetNewLineLengths)(c, this._cols, e),
                  u = _.length - c.length;
                let f;
                f = 0 === this.ybase && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength + u) : Math.max(0, this.lines.length - this.lines.maxLength + u);
                const v = [];
                for (let e = 0; e < u; e++) {
                  const e = this.getBlankLine(r.DEFAULT_ATTR_DATA, !0);
                  v.push(e);
                }
                v.length > 0 && (s.push({
                  start: o + c.length + n,
                  newLines: v
                }), n += v.length), c.push(...v);
                let g = _.length - 1,
                  p = _[g];
                0 === p && (g--, p = _[g]);
                let S = c.length - u - 1,
                  m = d;
                for (; S >= 0;) {
                  const e = Math.min(m, p);
                  if (void 0 === c[g]) break;
                  if (c[g].copyCellsFrom(c[S], m - e, p - e, e, !0), p -= e, 0 === p && (g--, p = _[g]), m -= e, 0 === m) {
                    S--;
                    const e = Math.max(S, 0);
                    m = (0, a.getWrappedLineTrimmedLength)(c, e, this._cols);
                  }
                }
                for (let t = 0; t < c.length; t++) _[t] < e && c[t].setCell(_[t], i);
                let C = u - f;
                for (; C-- > 0;) 0 === this.ybase ? this.y < t - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + n) - t && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
                this.savedY = Math.min(this.savedY + u, this.ybase + t - 1);
              }
              if (s.length > 0) {
                const e = [],
                  t = [];
                for (let e = 0; e < this.lines.length; e++) t.push(this.lines.get(e));
                const i = this.lines.length;
                let r = i - 1,
                  o = 0,
                  a = s[o];
                this.lines.length = Math.min(this.lines.maxLength, this.lines.length + n);
                let h = 0;
                for (let c = Math.min(this.lines.maxLength - 1, i + n - 1); c >= 0; c--) if (a && a.start > r + h) {
                  for (let e = a.newLines.length - 1; e >= 0; e--) this.lines.set(c--, a.newLines[e]);
                  c++, e.push({
                    index: r + 1,
                    amount: a.newLines.length
                  }), h += a.newLines.length, a = s[++o];
                } else this.lines.set(c, t[r--]);
                let c = 0;
                for (let t = e.length - 1; t >= 0; t--) e[t].index += c, this.lines.onInsertEmitter.fire(e[t]), c += e[t].amount;
                const l = Math.max(0, i + n - this.lines.maxLength);
                l > 0 && this.lines.onTrimEmitter.fire(l);
              }
            }
            stringIndexToBufferIndex(e, t, i = !1) {
              for (; t;) {
                const s = this.lines.get(e);
                if (!s) return [-1, -1];
                const r = i ? s.getTrimmedLength() : s.length;
                for (let i = 0; i < r; ++i) if (s.get(i)[o.CHAR_DATA_WIDTH_INDEX] && (t -= s.get(i)[o.CHAR_DATA_CHAR_INDEX].length || 1), t < 0) return [e, i];
                e++;
              }
              return [e, 0];
            }
            translateBufferLineToString(e, t, i = 0, s) {
              const r = this.lines.get(e);
              return r ? r.translateToString(t, i, s) : "";
            }
            getWrappedRangeForLine(e) {
              let t = e,
                i = e;
              for (; t > 0 && this.lines.get(t).isWrapped;) t--;
              for (; i + 1 < this.lines.length && this.lines.get(i + 1).isWrapped;) i++;
              return {
                first: t,
                last: i
              };
            }
            setupTabStops(e) {
              for (null != e ? this.tabs[e] || (e = this.prevStop(e)) : (this.tabs = {}, e = 0); e < this._cols; e += this._optionsService.rawOptions.tabStopWidth) this.tabs[e] = !0;
            }
            prevStop(e) {
              for (null == e && (e = this.x); !this.tabs[--e] && e > 0;);
              return e >= this._cols ? this._cols - 1 : e < 0 ? 0 : e;
            }
            nextStop(e) {
              for (null == e && (e = this.x); !this.tabs[++e] && e < this._cols;);
              return e >= this._cols ? this._cols - 1 : e < 0 ? 0 : e;
            }
            clearMarkers(e) {
              this._isClearing = !0;
              for (let t = 0; t < this.markers.length; t++) this.markers[t].line === e && (this.markers[t].dispose(), this.markers.splice(t--, 1));
              this._isClearing = !1;
            }
            clearAllMarkers() {
              this._isClearing = !0;
              for (let e = 0; e < this.markers.length; e++) this.markers[e].dispose(), this.markers.splice(e--, 1);
              this._isClearing = !1;
            }
            addMarker(e) {
              const t = new h.Marker(e);
              return this.markers.push(t), t.register(this.lines.onTrim(e => {
                t.line -= e, t.line < 0 && t.dispose();
              })), t.register(this.lines.onInsert(e => {
                t.line >= e.index && (t.line += e.amount);
              })), t.register(this.lines.onDelete(e => {
                t.line >= e.index && t.line < e.index + e.amount && t.dispose(), t.line > e.index && (t.line -= e.amount);
              })), t.register(t.onDispose(() => this._removeMarker(t))), t;
            }
            _removeMarker(e) {
              this._isClearing || this.markers.splice(this.markers.indexOf(e), 1);
            }
            iterator(e, t, i, s, r) {
              return new _(this, e, t, i, s, r);
            }
          };
          class _ {
            constructor(e, t, i = 0, s = e.lines.length, r = 0, n = 0) {
              this._buffer = e, this._trimRight = t, this._startIndex = i, this._endIndex = s, this._startOverscan = r, this._endOverscan = n, this._startIndex < 0 && (this._startIndex = 0), this._endIndex > this._buffer.lines.length && (this._endIndex = this._buffer.lines.length), this._current = this._startIndex;
            }
            hasNext() {
              return this._current < this._endIndex;
            }
            next() {
              const e = this._buffer.getWrappedRangeForLine(this._current);
              e.first < this._startIndex - this._startOverscan && (e.first = this._startIndex - this._startOverscan), e.last > this._endIndex + this._endOverscan && (e.last = this._endIndex + this._endOverscan), e.first = Math.max(e.first, 0), e.last = Math.min(e.last, this._buffer.lines.length);
              let t = "";
              for (let i = e.first; i <= e.last; ++i) t += this._buffer.translateBufferLineToString(i, this._trimRight);
              return this._current = e.last + 1, {
                range: e,
                content: t
              };
            }
          }
          t.BufferStringIterator = _;
        },
        8437: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BufferLine = t.DEFAULT_ATTR_DATA = void 0;
          const s = i(482),
            r = i(643),
            n = i(511),
            o = i(3734);
          t.DEFAULT_ATTR_DATA = Object.freeze(new o.AttributeData());
          let a = 0;
          class h {
            constructor(e, t, i = !1) {
              this.isWrapped = i, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(3 * e);
              const s = t || n.CellData.fromCharData([0, r.NULL_CELL_CHAR, r.NULL_CELL_WIDTH, r.NULL_CELL_CODE]);
              for (let t = 0; t < e; ++t) this.setCell(t, s);
              this.length = e;
            }
            get(e) {
              const t = this._data[3 * e + 0],
                i = 2097151 & t;
              return [this._data[3 * e + 1], 2097152 & t ? this._combined[e] : i ? (0, s.stringFromCodePoint)(i) : "", t >> 22, 2097152 & t ? this._combined[e].charCodeAt(this._combined[e].length - 1) : i];
            }
            set(e, t) {
              this._data[3 * e + 1] = t[r.CHAR_DATA_ATTR_INDEX], t[r.CHAR_DATA_CHAR_INDEX].length > 1 ? (this._combined[e] = t[1], this._data[3 * e + 0] = 2097152 | e | t[r.CHAR_DATA_WIDTH_INDEX] << 22) : this._data[3 * e + 0] = t[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | t[r.CHAR_DATA_WIDTH_INDEX] << 22;
            }
            getWidth(e) {
              return this._data[3 * e + 0] >> 22;
            }
            hasWidth(e) {
              return 12582912 & this._data[3 * e + 0];
            }
            getFg(e) {
              return this._data[3 * e + 1];
            }
            getBg(e) {
              return this._data[3 * e + 2];
            }
            hasContent(e) {
              return 4194303 & this._data[3 * e + 0];
            }
            getCodePoint(e) {
              const t = this._data[3 * e + 0];
              return 2097152 & t ? this._combined[e].charCodeAt(this._combined[e].length - 1) : 2097151 & t;
            }
            isCombined(e) {
              return 2097152 & this._data[3 * e + 0];
            }
            getString(e) {
              const t = this._data[3 * e + 0];
              return 2097152 & t ? this._combined[e] : 2097151 & t ? (0, s.stringFromCodePoint)(2097151 & t) : "";
            }
            isProtected(e) {
              return 536870912 & this._data[3 * e + 2];
            }
            loadCell(e, t) {
              return a = 3 * e, t.content = this._data[a + 0], t.fg = this._data[a + 1], t.bg = this._data[a + 2], 2097152 & t.content && (t.combinedData = this._combined[e]), 268435456 & t.bg && (t.extended = this._extendedAttrs[e]), t;
            }
            setCell(e, t) {
              2097152 & t.content && (this._combined[e] = t.combinedData), 268435456 & t.bg && (this._extendedAttrs[e] = t.extended), this._data[3 * e + 0] = t.content, this._data[3 * e + 1] = t.fg, this._data[3 * e + 2] = t.bg;
            }
            setCellFromCodePoint(e, t, i, s, r, n) {
              268435456 & r && (this._extendedAttrs[e] = n), this._data[3 * e + 0] = t | i << 22, this._data[3 * e + 1] = s, this._data[3 * e + 2] = r;
            }
            addCodepointToCell(e, t) {
              let i = this._data[3 * e + 0];
              2097152 & i ? this._combined[e] += (0, s.stringFromCodePoint)(t) : (2097151 & i ? (this._combined[e] = (0, s.stringFromCodePoint)(2097151 & i) + (0, s.stringFromCodePoint)(t), i &= -2097152, i |= 2097152) : i = t | 1 << 22, this._data[3 * e + 0] = i);
            }
            insertCells(e, t, i, s) {
              if ((e %= this.length) && 2 === this.getWidth(e - 1) && this.setCellFromCodePoint(e - 1, 0, 1, (null == s ? void 0 : s.fg) || 0, (null == s ? void 0 : s.bg) || 0, (null == s ? void 0 : s.extended) || new o.ExtendedAttrs()), t < this.length - e) {
                const s = new n.CellData();
                for (let i = this.length - e - t - 1; i >= 0; --i) this.setCell(e + t + i, this.loadCell(e + i, s));
                for (let s = 0; s < t; ++s) this.setCell(e + s, i);
              } else for (let t = e; t < this.length; ++t) this.setCell(t, i);
              2 === this.getWidth(this.length - 1) && this.setCellFromCodePoint(this.length - 1, 0, 1, (null == s ? void 0 : s.fg) || 0, (null == s ? void 0 : s.bg) || 0, (null == s ? void 0 : s.extended) || new o.ExtendedAttrs());
            }
            deleteCells(e, t, i, s) {
              if (e %= this.length, t < this.length - e) {
                const s = new n.CellData();
                for (let i = 0; i < this.length - e - t; ++i) this.setCell(e + i, this.loadCell(e + t + i, s));
                for (let e = this.length - t; e < this.length; ++e) this.setCell(e, i);
              } else for (let t = e; t < this.length; ++t) this.setCell(t, i);
              e && 2 === this.getWidth(e - 1) && this.setCellFromCodePoint(e - 1, 0, 1, (null == s ? void 0 : s.fg) || 0, (null == s ? void 0 : s.bg) || 0, (null == s ? void 0 : s.extended) || new o.ExtendedAttrs()), 0 !== this.getWidth(e) || this.hasContent(e) || this.setCellFromCodePoint(e, 0, 1, (null == s ? void 0 : s.fg) || 0, (null == s ? void 0 : s.bg) || 0, (null == s ? void 0 : s.extended) || new o.ExtendedAttrs());
            }
            replaceCells(e, t, i, s, r = !1) {
              if (r) for (e && 2 === this.getWidth(e - 1) && !this.isProtected(e - 1) && this.setCellFromCodePoint(e - 1, 0, 1, (null == s ? void 0 : s.fg) || 0, (null == s ? void 0 : s.bg) || 0, (null == s ? void 0 : s.extended) || new o.ExtendedAttrs()), t < this.length && 2 === this.getWidth(t - 1) && !this.isProtected(t) && this.setCellFromCodePoint(t, 0, 1, (null == s ? void 0 : s.fg) || 0, (null == s ? void 0 : s.bg) || 0, (null == s ? void 0 : s.extended) || new o.ExtendedAttrs()); e < t && e < this.length;) this.isProtected(e) || this.setCell(e, i), e++;else for (e && 2 === this.getWidth(e - 1) && this.setCellFromCodePoint(e - 1, 0, 1, (null == s ? void 0 : s.fg) || 0, (null == s ? void 0 : s.bg) || 0, (null == s ? void 0 : s.extended) || new o.ExtendedAttrs()), t < this.length && 2 === this.getWidth(t - 1) && this.setCellFromCodePoint(t, 0, 1, (null == s ? void 0 : s.fg) || 0, (null == s ? void 0 : s.bg) || 0, (null == s ? void 0 : s.extended) || new o.ExtendedAttrs()); e < t && e < this.length;) this.setCell(e++, i);
            }
            resize(e, t) {
              if (e === this.length) return 4 * this._data.length * 2 < this._data.buffer.byteLength;
              const i = 3 * e;
              if (e > this.length) {
                if (this._data.buffer.byteLength >= 4 * i) this._data = new Uint32Array(this._data.buffer, 0, i);else {
                  const e = new Uint32Array(i);
                  e.set(this._data), this._data = e;
                }
                for (let i = this.length; i < e; ++i) this.setCell(i, t);
              } else {
                this._data = this._data.subarray(0, i);
                const t = Object.keys(this._combined);
                for (let i = 0; i < t.length; i++) {
                  const s = parseInt(t[i], 10);
                  s >= e && delete this._combined[s];
                }
                const s = Object.keys(this._extendedAttrs);
                for (let t = 0; t < s.length; t++) {
                  const i = parseInt(s[t], 10);
                  i >= e && delete this._extendedAttrs[i];
                }
              }
              return this.length = e, 4 * i * 2 < this._data.buffer.byteLength;
            }
            cleanupMemory() {
              if (4 * this._data.length * 2 < this._data.buffer.byteLength) {
                const e = new Uint32Array(this._data.length);
                return e.set(this._data), this._data = e, 1;
              }
              return 0;
            }
            fill(e, t = !1) {
              if (t) for (let t = 0; t < this.length; ++t) this.isProtected(t) || this.setCell(t, e);else {
                this._combined = {}, this._extendedAttrs = {};
                for (let t = 0; t < this.length; ++t) this.setCell(t, e);
              }
            }
            copyFrom(e) {
              this.length !== e.length ? this._data = new Uint32Array(e._data) : this._data.set(e._data), this.length = e.length, this._combined = {};
              for (const t in e._combined) this._combined[t] = e._combined[t];
              this._extendedAttrs = {};
              for (const t in e._extendedAttrs) this._extendedAttrs[t] = e._extendedAttrs[t];
              this.isWrapped = e.isWrapped;
            }
            clone() {
              const e = new h(0);
              e._data = new Uint32Array(this._data), e.length = this.length;
              for (const t in this._combined) e._combined[t] = this._combined[t];
              for (const t in this._extendedAttrs) e._extendedAttrs[t] = this._extendedAttrs[t];
              return e.isWrapped = this.isWrapped, e;
            }
            getTrimmedLength() {
              for (let e = this.length - 1; e >= 0; --e) if (4194303 & this._data[3 * e + 0]) return e + (this._data[3 * e + 0] >> 22);
              return 0;
            }
            copyCellsFrom(e, t, i, s, r) {
              const n = e._data;
              if (r) for (let r = s - 1; r >= 0; r--) {
                for (let e = 0; e < 3; e++) this._data[3 * (i + r) + e] = n[3 * (t + r) + e];
                268435456 & n[3 * (t + r) + 2] && (this._extendedAttrs[i + r] = e._extendedAttrs[t + r]);
              } else for (let r = 0; r < s; r++) {
                for (let e = 0; e < 3; e++) this._data[3 * (i + r) + e] = n[3 * (t + r) + e];
                268435456 & n[3 * (t + r) + 2] && (this._extendedAttrs[i + r] = e._extendedAttrs[t + r]);
              }
              const o = Object.keys(e._combined);
              for (let s = 0; s < o.length; s++) {
                const r = parseInt(o[s], 10);
                r >= t && (this._combined[r - t + i] = e._combined[r]);
              }
            }
            translateToString(e = !1, t = 0, i = this.length) {
              e && (i = Math.min(i, this.getTrimmedLength()));
              let n = "";
              for (; t < i;) {
                const e = this._data[3 * t + 0],
                  i = 2097151 & e;
                n += 2097152 & e ? this._combined[t] : i ? (0, s.stringFromCodePoint)(i) : r.WHITESPACE_CELL_CHAR, t += e >> 22 || 1;
              }
              return n;
            }
          }
          t.BufferLine = h;
        },
        4841: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.getRangeLength = void 0, t.getRangeLength = function (e, t) {
            if (e.start.y > e.end.y) throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);
            return t * (e.end.y - e.start.y) + (e.end.x - e.start.x + 1);
          };
        },
        4634: (e, t) => {
          function i(e, t, i) {
            if (t === e.length - 1) return e[t].getTrimmedLength();
            const s = !e[t].hasContent(i - 1) && 1 === e[t].getWidth(i - 1),
              r = 2 === e[t + 1].getWidth(0);
            return s && r ? i - 1 : i;
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.getWrappedLineTrimmedLength = t.reflowSmallerGetNewLineLengths = t.reflowLargerApplyNewLayout = t.reflowLargerCreateNewLayout = t.reflowLargerGetLinesToRemove = void 0, t.reflowLargerGetLinesToRemove = function (e, t, s, r, n) {
            const o = [];
            for (let a = 0; a < e.length - 1; a++) {
              let h = a,
                c = e.get(++h);
              if (!c.isWrapped) continue;
              const l = [e.get(a)];
              for (; h < e.length && c.isWrapped;) l.push(c), c = e.get(++h);
              if (r >= a && r < h) {
                a += l.length - 1;
                continue;
              }
              let d = 0,
                _ = i(l, d, t),
                u = 1,
                f = 0;
              for (; u < l.length;) {
                const e = i(l, u, t),
                  r = e - f,
                  o = s - _,
                  a = Math.min(r, o);
                l[d].copyCellsFrom(l[u], f, _, a, !1), _ += a, _ === s && (d++, _ = 0), f += a, f === e && (u++, f = 0), 0 === _ && 0 !== d && 2 === l[d - 1].getWidth(s - 1) && (l[d].copyCellsFrom(l[d - 1], s - 1, _++, 1, !1), l[d - 1].setCell(s - 1, n));
              }
              l[d].replaceCells(_, s, n);
              let v = 0;
              for (let e = l.length - 1; e > 0 && (e > d || 0 === l[e].getTrimmedLength()); e--) v++;
              v > 0 && (o.push(a + l.length - v), o.push(v)), a += l.length - 1;
            }
            return o;
          }, t.reflowLargerCreateNewLayout = function (e, t) {
            const i = [];
            let s = 0,
              r = t[s],
              n = 0;
            for (let o = 0; o < e.length; o++) if (r === o) {
              const i = t[++s];
              e.onDeleteEmitter.fire({
                index: o - n,
                amount: i
              }), o += i - 1, n += i, r = t[++s];
            } else i.push(o);
            return {
              layout: i,
              countRemoved: n
            };
          }, t.reflowLargerApplyNewLayout = function (e, t) {
            const i = [];
            for (let s = 0; s < t.length; s++) i.push(e.get(t[s]));
            for (let t = 0; t < i.length; t++) e.set(t, i[t]);
            e.length = t.length;
          }, t.reflowSmallerGetNewLineLengths = function (e, t, s) {
            const r = [],
              n = e.map((s, r) => i(e, r, t)).reduce((e, t) => e + t);
            let o = 0,
              a = 0,
              h = 0;
            for (; h < n;) {
              if (n - h < s) {
                r.push(n - h);
                break;
              }
              o += s;
              const c = i(e, a, t);
              o > c && (o -= c, a++);
              const l = 2 === e[a].getWidth(o - 1);
              l && o--;
              const d = l ? s - 1 : s;
              r.push(d), h += d;
            }
            return r;
          }, t.getWrappedLineTrimmedLength = i;
        },
        5295: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BufferSet = void 0;
          const s = i(9092),
            r = i(8460),
            n = i(844);
          class o extends n.Disposable {
            constructor(e, t) {
              super(), this._optionsService = e, this._bufferService = t, this._onBufferActivate = this.register(new r.EventEmitter()), this.onBufferActivate = this._onBufferActivate.event, this.reset(), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.resize(this._bufferService.cols, this._bufferService.rows))), this.register(this._optionsService.onSpecificOptionChange("tabStopWidth", () => this.setupTabStops()));
            }
            reset() {
              this._normal = new s.Buffer(!0, this._optionsService, this._bufferService), this._normal.fillViewportRows(), this._alt = new s.Buffer(!1, this._optionsService, this._bufferService), this._activeBuffer = this._normal, this._onBufferActivate.fire({
                activeBuffer: this._normal,
                inactiveBuffer: this._alt
              }), this.setupTabStops();
            }
            get alt() {
              return this._alt;
            }
            get active() {
              return this._activeBuffer;
            }
            get normal() {
              return this._normal;
            }
            activateNormalBuffer() {
              this._activeBuffer !== this._normal && (this._normal.x = this._alt.x, this._normal.y = this._alt.y, this._alt.clearAllMarkers(), this._alt.clear(), this._activeBuffer = this._normal, this._onBufferActivate.fire({
                activeBuffer: this._normal,
                inactiveBuffer: this._alt
              }));
            }
            activateAltBuffer(e) {
              this._activeBuffer !== this._alt && (this._alt.fillViewportRows(e), this._alt.x = this._normal.x, this._alt.y = this._normal.y, this._activeBuffer = this._alt, this._onBufferActivate.fire({
                activeBuffer: this._alt,
                inactiveBuffer: this._normal
              }));
            }
            resize(e, t) {
              this._normal.resize(e, t), this._alt.resize(e, t), this.setupTabStops(e);
            }
            setupTabStops(e) {
              this._normal.setupTabStops(e), this._alt.setupTabStops(e);
            }
          }
          t.BufferSet = o;
        },
        511: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CellData = void 0;
          const s = i(482),
            r = i(643),
            n = i(3734);
          class o extends n.AttributeData {
            constructor() {
              super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new n.ExtendedAttrs(), this.combinedData = "";
            }
            static fromCharData(e) {
              const t = new o();
              return t.setFromCharData(e), t;
            }
            isCombined() {
              return 2097152 & this.content;
            }
            getWidth() {
              return this.content >> 22;
            }
            getChars() {
              return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, s.stringFromCodePoint)(2097151 & this.content) : "";
            }
            getCode() {
              return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
            }
            setFromCharData(e) {
              this.fg = e[r.CHAR_DATA_ATTR_INDEX], this.bg = 0;
              let t = !1;
              if (e[r.CHAR_DATA_CHAR_INDEX].length > 2) t = !0;else if (2 === e[r.CHAR_DATA_CHAR_INDEX].length) {
                const i = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
                if (55296 <= i && i <= 56319) {
                  const s = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
                  56320 <= s && s <= 57343 ? this.content = 1024 * (i - 55296) + s - 56320 + 65536 | e[r.CHAR_DATA_WIDTH_INDEX] << 22 : t = !0;
                } else t = !0;
              } else this.content = e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | e[r.CHAR_DATA_WIDTH_INDEX] << 22;
              t && (this.combinedData = e[r.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | e[r.CHAR_DATA_WIDTH_INDEX] << 22);
            }
            getAsCharData() {
              return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
            }
          }
          t.CellData = o;
        },
        643: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.WHITESPACE_CELL_CODE = t.WHITESPACE_CELL_WIDTH = t.WHITESPACE_CELL_CHAR = t.NULL_CELL_CODE = t.NULL_CELL_WIDTH = t.NULL_CELL_CHAR = t.CHAR_DATA_CODE_INDEX = t.CHAR_DATA_WIDTH_INDEX = t.CHAR_DATA_CHAR_INDEX = t.CHAR_DATA_ATTR_INDEX = t.DEFAULT_EXT = t.DEFAULT_ATTR = t.DEFAULT_COLOR = void 0, t.DEFAULT_COLOR = 0, t.DEFAULT_ATTR = 256 | t.DEFAULT_COLOR << 9, t.DEFAULT_EXT = 0, t.CHAR_DATA_ATTR_INDEX = 0, t.CHAR_DATA_CHAR_INDEX = 1, t.CHAR_DATA_WIDTH_INDEX = 2, t.CHAR_DATA_CODE_INDEX = 3, t.NULL_CELL_CHAR = "", t.NULL_CELL_WIDTH = 1, t.NULL_CELL_CODE = 0, t.WHITESPACE_CELL_CHAR = " ", t.WHITESPACE_CELL_WIDTH = 1, t.WHITESPACE_CELL_CODE = 32;
        },
        4863: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.Marker = void 0;
          const s = i(8460),
            r = i(844);
          class n {
            constructor(e) {
              this.line = e, this.isDisposed = !1, this._disposables = [], this._id = n._nextId++, this._onDispose = this.register(new s.EventEmitter()), this.onDispose = this._onDispose.event;
            }
            get id() {
              return this._id;
            }
            dispose() {
              this.isDisposed || (this.isDisposed = !0, this.line = -1, this._onDispose.fire(), (0, r.disposeArray)(this._disposables), this._disposables.length = 0);
            }
            register(e) {
              return this._disposables.push(e), e;
            }
          }
          t.Marker = n, n._nextId = 1;
        },
        7116: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.DEFAULT_CHARSET = t.CHARSETS = void 0, t.CHARSETS = {}, t.DEFAULT_CHARSET = t.CHARSETS.B, t.CHARSETS[0] = {
            "`": "◆",
            a: "▒",
            b: "␉",
            c: "␌",
            d: "␍",
            e: "␊",
            f: "°",
            g: "±",
            h: "␤",
            i: "␋",
            j: "┘",
            k: "┐",
            l: "┌",
            m: "└",
            n: "┼",
            o: "⎺",
            p: "⎻",
            q: "─",
            r: "⎼",
            s: "⎽",
            t: "├",
            u: "┤",
            v: "┴",
            w: "┬",
            x: "│",
            y: "≤",
            z: "≥",
            "{": "π",
            "|": "≠",
            "}": "£",
            "~": "·"
          }, t.CHARSETS.A = {
            "#": "£"
          }, t.CHARSETS.B = void 0, t.CHARSETS[4] = {
            "#": "£",
            "@": "¾",
            "[": "ij",
            "\\": "½",
            "]": "|",
            "{": "¨",
            "|": "f",
            "}": "¼",
            "~": "´"
          }, t.CHARSETS.C = t.CHARSETS[5] = {
            "[": "Ä",
            "\\": "Ö",
            "]": "Å",
            "^": "Ü",
            "`": "é",
            "{": "ä",
            "|": "ö",
            "}": "å",
            "~": "ü"
          }, t.CHARSETS.R = {
            "#": "£",
            "@": "à",
            "[": "°",
            "\\": "ç",
            "]": "§",
            "{": "é",
            "|": "ù",
            "}": "è",
            "~": "¨"
          }, t.CHARSETS.Q = {
            "@": "à",
            "[": "â",
            "\\": "ç",
            "]": "ê",
            "^": "î",
            "`": "ô",
            "{": "é",
            "|": "ù",
            "}": "è",
            "~": "û"
          }, t.CHARSETS.K = {
            "@": "§",
            "[": "Ä",
            "\\": "Ö",
            "]": "Ü",
            "{": "ä",
            "|": "ö",
            "}": "ü",
            "~": "ß"
          }, t.CHARSETS.Y = {
            "#": "£",
            "@": "§",
            "[": "°",
            "\\": "ç",
            "]": "é",
            "`": "ù",
            "{": "à",
            "|": "ò",
            "}": "è",
            "~": "ì"
          }, t.CHARSETS.E = t.CHARSETS[6] = {
            "@": "Ä",
            "[": "Æ",
            "\\": "Ø",
            "]": "Å",
            "^": "Ü",
            "`": "ä",
            "{": "æ",
            "|": "ø",
            "}": "å",
            "~": "ü"
          }, t.CHARSETS.Z = {
            "#": "£",
            "@": "§",
            "[": "¡",
            "\\": "Ñ",
            "]": "¿",
            "{": "°",
            "|": "ñ",
            "}": "ç"
          }, t.CHARSETS.H = t.CHARSETS[7] = {
            "@": "É",
            "[": "Ä",
            "\\": "Ö",
            "]": "Å",
            "^": "Ü",
            "`": "é",
            "{": "ä",
            "|": "ö",
            "}": "å",
            "~": "ü"
          }, t.CHARSETS["="] = {
            "#": "ù",
            "@": "à",
            "[": "é",
            "\\": "ç",
            "]": "ê",
            "^": "î",
            _: "è",
            "`": "ô",
            "{": "ä",
            "|": "ö",
            "}": "ü",
            "~": "û"
          };
        },
        2584: (e, t) => {
          var i, s;
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.C1_ESCAPED = t.C1 = t.C0 = void 0, function (e) {
            e.NUL = "\0", e.SOH = "", e.STX = "", e.ETX = "", e.EOT = "", e.ENQ = "", e.ACK = "", e.BEL = "", e.BS = "\b", e.HT = "\t", e.LF = "\n", e.VT = "\v", e.FF = "\f", e.CR = "\r", e.SO = "", e.SI = "", e.DLE = "", e.DC1 = "", e.DC2 = "", e.DC3 = "", e.DC4 = "", e.NAK = "", e.SYN = "", e.ETB = "", e.CAN = "", e.EM = "", e.SUB = "", e.ESC = "", e.FS = "", e.GS = "", e.RS = "", e.US = "", e.SP = " ", e.DEL = "";
          }(i = t.C0 || (t.C0 = {})), (s = t.C1 || (t.C1 = {})).PAD = "", s.HOP = "", s.BPH = "", s.NBH = "", s.IND = "", s.NEL = "", s.SSA = "", s.ESA = "", s.HTS = "", s.HTJ = "", s.VTS = "", s.PLD = "", s.PLU = "", s.RI = "", s.SS2 = "", s.SS3 = "", s.DCS = "", s.PU1 = "", s.PU2 = "", s.STS = "", s.CCH = "", s.MW = "", s.SPA = "", s.EPA = "", s.SOS = "", s.SGCI = "", s.SCI = "", s.CSI = "", s.ST = "", s.OSC = "", s.PM = "", s.APC = "", (t.C1_ESCAPED || (t.C1_ESCAPED = {})).ST = `${i.ESC}\\`;
        },
        7399: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.evaluateKeyboardEvent = void 0;
          const s = i(2584),
            r = {
              48: ["0", ")"],
              49: ["1", "!"],
              50: ["2", "@"],
              51: ["3", "#"],
              52: ["4", "$"],
              53: ["5", "%"],
              54: ["6", "^"],
              55: ["7", "&"],
              56: ["8", "*"],
              57: ["9", "("],
              186: [";", ":"],
              187: ["=", "+"],
              188: [",", "<"],
              189: ["-", "_"],
              190: [".", ">"],
              191: ["/", "?"],
              192: ["`", "~"],
              219: ["[", "{"],
              220: ["\\", "|"],
              221: ["]", "}"],
              222: ["'", '"']
            };
          t.evaluateKeyboardEvent = function (e, t, i, n) {
            const o = {
                type: 0,
                cancel: !1,
                key: void 0
              },
              a = (e.shiftKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.ctrlKey ? 4 : 0) | (e.metaKey ? 8 : 0);
            switch (e.keyCode) {
              case 0:
                "UIKeyInputUpArrow" === e.key ? o.key = t ? s.C0.ESC + "OA" : s.C0.ESC + "[A" : "UIKeyInputLeftArrow" === e.key ? o.key = t ? s.C0.ESC + "OD" : s.C0.ESC + "[D" : "UIKeyInputRightArrow" === e.key ? o.key = t ? s.C0.ESC + "OC" : s.C0.ESC + "[C" : "UIKeyInputDownArrow" === e.key && (o.key = t ? s.C0.ESC + "OB" : s.C0.ESC + "[B");
                break;
              case 8:
                if (e.altKey) {
                  o.key = s.C0.ESC + s.C0.DEL;
                  break;
                }
                o.key = s.C0.DEL;
                break;
              case 9:
                if (e.shiftKey) {
                  o.key = s.C0.ESC + "[Z";
                  break;
                }
                o.key = s.C0.HT, o.cancel = !0;
                break;
              case 13:
                o.key = e.altKey ? s.C0.ESC + s.C0.CR : s.C0.CR, o.cancel = !0;
                break;
              case 27:
                o.key = s.C0.ESC, e.altKey && (o.key = s.C0.ESC + s.C0.ESC), o.cancel = !0;
                break;
              case 37:
                if (e.metaKey) break;
                a ? (o.key = s.C0.ESC + "[1;" + (a + 1) + "D", o.key === s.C0.ESC + "[1;3D" && (o.key = s.C0.ESC + (i ? "b" : "[1;5D"))) : o.key = t ? s.C0.ESC + "OD" : s.C0.ESC + "[D";
                break;
              case 39:
                if (e.metaKey) break;
                a ? (o.key = s.C0.ESC + "[1;" + (a + 1) + "C", o.key === s.C0.ESC + "[1;3C" && (o.key = s.C0.ESC + (i ? "f" : "[1;5C"))) : o.key = t ? s.C0.ESC + "OC" : s.C0.ESC + "[C";
                break;
              case 38:
                if (e.metaKey) break;
                a ? (o.key = s.C0.ESC + "[1;" + (a + 1) + "A", i || o.key !== s.C0.ESC + "[1;3A" || (o.key = s.C0.ESC + "[1;5A")) : o.key = t ? s.C0.ESC + "OA" : s.C0.ESC + "[A";
                break;
              case 40:
                if (e.metaKey) break;
                a ? (o.key = s.C0.ESC + "[1;" + (a + 1) + "B", i || o.key !== s.C0.ESC + "[1;3B" || (o.key = s.C0.ESC + "[1;5B")) : o.key = t ? s.C0.ESC + "OB" : s.C0.ESC + "[B";
                break;
              case 45:
                e.shiftKey || e.ctrlKey || (o.key = s.C0.ESC + "[2~");
                break;
              case 46:
                o.key = a ? s.C0.ESC + "[3;" + (a + 1) + "~" : s.C0.ESC + "[3~";
                break;
              case 36:
                o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "H" : t ? s.C0.ESC + "OH" : s.C0.ESC + "[H";
                break;
              case 35:
                o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "F" : t ? s.C0.ESC + "OF" : s.C0.ESC + "[F";
                break;
              case 33:
                e.shiftKey ? o.type = 2 : e.ctrlKey ? o.key = s.C0.ESC + "[5;" + (a + 1) + "~" : o.key = s.C0.ESC + "[5~";
                break;
              case 34:
                e.shiftKey ? o.type = 3 : e.ctrlKey ? o.key = s.C0.ESC + "[6;" + (a + 1) + "~" : o.key = s.C0.ESC + "[6~";
                break;
              case 112:
                o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "P" : s.C0.ESC + "OP";
                break;
              case 113:
                o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "Q" : s.C0.ESC + "OQ";
                break;
              case 114:
                o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "R" : s.C0.ESC + "OR";
                break;
              case 115:
                o.key = a ? s.C0.ESC + "[1;" + (a + 1) + "S" : s.C0.ESC + "OS";
                break;
              case 116:
                o.key = a ? s.C0.ESC + "[15;" + (a + 1) + "~" : s.C0.ESC + "[15~";
                break;
              case 117:
                o.key = a ? s.C0.ESC + "[17;" + (a + 1) + "~" : s.C0.ESC + "[17~";
                break;
              case 118:
                o.key = a ? s.C0.ESC + "[18;" + (a + 1) + "~" : s.C0.ESC + "[18~";
                break;
              case 119:
                o.key = a ? s.C0.ESC + "[19;" + (a + 1) + "~" : s.C0.ESC + "[19~";
                break;
              case 120:
                o.key = a ? s.C0.ESC + "[20;" + (a + 1) + "~" : s.C0.ESC + "[20~";
                break;
              case 121:
                o.key = a ? s.C0.ESC + "[21;" + (a + 1) + "~" : s.C0.ESC + "[21~";
                break;
              case 122:
                o.key = a ? s.C0.ESC + "[23;" + (a + 1) + "~" : s.C0.ESC + "[23~";
                break;
              case 123:
                o.key = a ? s.C0.ESC + "[24;" + (a + 1) + "~" : s.C0.ESC + "[24~";
                break;
              default:
                if (!e.ctrlKey || e.shiftKey || e.altKey || e.metaKey) {
                  if (i && !n || !e.altKey || e.metaKey) !i || e.altKey || e.ctrlKey || e.shiftKey || !e.metaKey ? e.key && !e.ctrlKey && !e.altKey && !e.metaKey && e.keyCode >= 48 && 1 === e.key.length ? o.key = e.key : e.key && e.ctrlKey && ("_" === e.key && (o.key = s.C0.US), "@" === e.key && (o.key = s.C0.NUL)) : 65 === e.keyCode && (o.type = 1);else {
                    const t = r[e.keyCode],
                      i = null == t ? void 0 : t[e.shiftKey ? 1 : 0];
                    if (i) o.key = s.C0.ESC + i;else if (e.keyCode >= 65 && e.keyCode <= 90) {
                      const t = e.ctrlKey ? e.keyCode - 64 : e.keyCode + 32;
                      let i = String.fromCharCode(t);
                      e.shiftKey && (i = i.toUpperCase()), o.key = s.C0.ESC + i;
                    } else if (32 === e.keyCode) o.key = s.C0.ESC + (e.ctrlKey ? s.C0.NUL : " ");else if ("Dead" === e.key && e.code.startsWith("Key")) {
                      let t = e.code.slice(3, 4);
                      e.shiftKey || (t = t.toLowerCase()), o.key = s.C0.ESC + t, o.cancel = !0;
                    }
                  }
                } else e.keyCode >= 65 && e.keyCode <= 90 ? o.key = String.fromCharCode(e.keyCode - 64) : 32 === e.keyCode ? o.key = s.C0.NUL : e.keyCode >= 51 && e.keyCode <= 55 ? o.key = String.fromCharCode(e.keyCode - 51 + 27) : 56 === e.keyCode ? o.key = s.C0.DEL : 219 === e.keyCode ? o.key = s.C0.ESC : 220 === e.keyCode ? o.key = s.C0.FS : 221 === e.keyCode && (o.key = s.C0.GS);
            }
            return o;
          };
        },
        482: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.Utf8ToUtf32 = t.StringToUtf32 = t.utf32ToString = t.stringFromCodePoint = void 0, t.stringFromCodePoint = function (e) {
            return e > 65535 ? (e -= 65536, String.fromCharCode(55296 + (e >> 10)) + String.fromCharCode(e % 1024 + 56320)) : String.fromCharCode(e);
          }, t.utf32ToString = function (e, t = 0, i = e.length) {
            let s = "";
            for (let r = t; r < i; ++r) {
              let t = e[r];
              t > 65535 ? (t -= 65536, s += String.fromCharCode(55296 + (t >> 10)) + String.fromCharCode(t % 1024 + 56320)) : s += String.fromCharCode(t);
            }
            return s;
          }, t.StringToUtf32 = class {
            constructor() {
              this._interim = 0;
            }
            clear() {
              this._interim = 0;
            }
            decode(e, t) {
              const i = e.length;
              if (!i) return 0;
              let s = 0,
                r = 0;
              if (this._interim) {
                const i = e.charCodeAt(r++);
                56320 <= i && i <= 57343 ? t[s++] = 1024 * (this._interim - 55296) + i - 56320 + 65536 : (t[s++] = this._interim, t[s++] = i), this._interim = 0;
              }
              for (let n = r; n < i; ++n) {
                const r = e.charCodeAt(n);
                if (55296 <= r && r <= 56319) {
                  if (++n >= i) return this._interim = r, s;
                  const o = e.charCodeAt(n);
                  56320 <= o && o <= 57343 ? t[s++] = 1024 * (r - 55296) + o - 56320 + 65536 : (t[s++] = r, t[s++] = o);
                } else 65279 !== r && (t[s++] = r);
              }
              return s;
            }
          }, t.Utf8ToUtf32 = class {
            constructor() {
              this.interim = new Uint8Array(3);
            }
            clear() {
              this.interim.fill(0);
            }
            decode(e, t) {
              const i = e.length;
              if (!i) return 0;
              let s,
                r,
                n,
                o,
                a = 0,
                h = 0,
                c = 0;
              if (this.interim[0]) {
                let s = !1,
                  r = this.interim[0];
                r &= 192 == (224 & r) ? 31 : 224 == (240 & r) ? 15 : 7;
                let n,
                  o = 0;
                for (; (n = 63 & this.interim[++o]) && o < 4;) r <<= 6, r |= n;
                const h = 192 == (224 & this.interim[0]) ? 2 : 224 == (240 & this.interim[0]) ? 3 : 4,
                  l = h - o;
                for (; c < l;) {
                  if (c >= i) return 0;
                  if (n = e[c++], 128 != (192 & n)) {
                    c--, s = !0;
                    break;
                  }
                  this.interim[o++] = n, r <<= 6, r |= 63 & n;
                }
                s || (2 === h ? r < 128 ? c-- : t[a++] = r : 3 === h ? r < 2048 || r >= 55296 && r <= 57343 || 65279 === r || (t[a++] = r) : r < 65536 || r > 1114111 || (t[a++] = r)), this.interim.fill(0);
              }
              const l = i - 4;
              let d = c;
              for (; d < i;) {
                for (; !(!(d < l) || 128 & (s = e[d]) || 128 & (r = e[d + 1]) || 128 & (n = e[d + 2]) || 128 & (o = e[d + 3]));) t[a++] = s, t[a++] = r, t[a++] = n, t[a++] = o, d += 4;
                if (s = e[d++], s < 128) t[a++] = s;else if (192 == (224 & s)) {
                  if (d >= i) return this.interim[0] = s, a;
                  if (r = e[d++], 128 != (192 & r)) {
                    d--;
                    continue;
                  }
                  if (h = (31 & s) << 6 | 63 & r, h < 128) {
                    d--;
                    continue;
                  }
                  t[a++] = h;
                } else if (224 == (240 & s)) {
                  if (d >= i) return this.interim[0] = s, a;
                  if (r = e[d++], 128 != (192 & r)) {
                    d--;
                    continue;
                  }
                  if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                  if (n = e[d++], 128 != (192 & n)) {
                    d--;
                    continue;
                  }
                  if (h = (15 & s) << 12 | (63 & r) << 6 | 63 & n, h < 2048 || h >= 55296 && h <= 57343 || 65279 === h) continue;
                  t[a++] = h;
                } else if (240 == (248 & s)) {
                  if (d >= i) return this.interim[0] = s, a;
                  if (r = e[d++], 128 != (192 & r)) {
                    d--;
                    continue;
                  }
                  if (d >= i) return this.interim[0] = s, this.interim[1] = r, a;
                  if (n = e[d++], 128 != (192 & n)) {
                    d--;
                    continue;
                  }
                  if (d >= i) return this.interim[0] = s, this.interim[1] = r, this.interim[2] = n, a;
                  if (o = e[d++], 128 != (192 & o)) {
                    d--;
                    continue;
                  }
                  if (h = (7 & s) << 18 | (63 & r) << 12 | (63 & n) << 6 | 63 & o, h < 65536 || h > 1114111) continue;
                  t[a++] = h;
                }
              }
              return a;
            }
          };
        },
        225: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.UnicodeV6 = void 0;
          const i = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]],
            s = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
          let r;
          t.UnicodeV6 = class {
            constructor() {
              if (this.version = "6", !r) {
                r = new Uint8Array(65536), r.fill(1), r[0] = 0, r.fill(0, 1, 32), r.fill(0, 127, 160), r.fill(2, 4352, 4448), r[9001] = 2, r[9002] = 2, r.fill(2, 11904, 42192), r[12351] = 1, r.fill(2, 44032, 55204), r.fill(2, 63744, 64256), r.fill(2, 65040, 65050), r.fill(2, 65072, 65136), r.fill(2, 65280, 65377), r.fill(2, 65504, 65511);
                for (let e = 0; e < i.length; ++e) r.fill(0, i[e][0], i[e][1] + 1);
              }
            }
            wcwidth(e) {
              return e < 32 ? 0 : e < 127 ? 1 : e < 65536 ? r[e] : function (e, t) {
                let i,
                  s = 0,
                  r = t.length - 1;
                if (e < t[0][0] || e > t[r][1]) return !1;
                for (; r >= s;) if (i = s + r >> 1, e > t[i][1]) s = i + 1;else {
                  if (!(e < t[i][0])) return !0;
                  r = i - 1;
                }
                return !1;
              }(e, s) ? 0 : e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141 ? 2 : 1;
            }
          };
        },
        5981: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.WriteBuffer = void 0;
          const s = i(8460),
            r = i(844);
          class n extends r.Disposable {
            constructor(e) {
              super(), this._action = e, this._writeBuffer = [], this._callbacks = [], this._pendingData = 0, this._bufferOffset = 0, this._isSyncWriting = !1, this._syncCalls = 0, this._didUserInput = !1, this._onWriteParsed = this.register(new s.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event;
            }
            handleUserInput() {
              this._didUserInput = !0;
            }
            writeSync(e, t) {
              if (void 0 !== t && this._syncCalls > t) return void (this._syncCalls = 0);
              if (this._pendingData += e.length, this._writeBuffer.push(e), this._callbacks.push(void 0), this._syncCalls++, this._isSyncWriting) return;
              let i;
              for (this._isSyncWriting = !0; i = this._writeBuffer.shift();) {
                this._action(i);
                const e = this._callbacks.shift();
                e && e();
              }
              this._pendingData = 0, this._bufferOffset = 2147483647, this._isSyncWriting = !1, this._syncCalls = 0;
            }
            write(e, t) {
              if (this._pendingData > 5e7) throw new Error("write data discarded, use flow control to avoid losing data");
              if (!this._writeBuffer.length) {
                if (this._bufferOffset = 0, this._didUserInput) return this._didUserInput = !1, this._pendingData += e.length, this._writeBuffer.push(e), this._callbacks.push(t), void this._innerWrite();
                setTimeout(() => this._innerWrite());
              }
              this._pendingData += e.length, this._writeBuffer.push(e), this._callbacks.push(t);
            }
            _innerWrite(e = 0, t = !0) {
              const i = e || Date.now();
              for (; this._writeBuffer.length > this._bufferOffset;) {
                const e = this._writeBuffer[this._bufferOffset],
                  s = this._action(e, t);
                if (s) {
                  const e = e => Date.now() - i >= 12 ? setTimeout(() => this._innerWrite(0, e)) : this._innerWrite(i, e);
                  return void s.catch(e => (queueMicrotask(() => {
                    throw e;
                  }), Promise.resolve(!1))).then(e);
                }
                const r = this._callbacks[this._bufferOffset];
                if (r && r(), this._bufferOffset++, this._pendingData -= e.length, Date.now() - i >= 12) break;
              }
              this._writeBuffer.length > this._bufferOffset ? (this._bufferOffset > 50 && (this._writeBuffer = this._writeBuffer.slice(this._bufferOffset), this._callbacks = this._callbacks.slice(this._bufferOffset), this._bufferOffset = 0), setTimeout(() => this._innerWrite())) : (this._writeBuffer.length = 0, this._callbacks.length = 0, this._pendingData = 0, this._bufferOffset = 0), this._onWriteParsed.fire();
            }
          }
          t.WriteBuffer = n;
        },
        5941: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.toRgbString = t.parseColor = void 0;
          const i = /^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,
            s = /^[\da-f]+$/;
          function r(e, t) {
            const i = e.toString(16),
              s = i.length < 2 ? "0" + i : i;
            switch (t) {
              case 4:
                return i[0];
              case 8:
                return s;
              case 12:
                return (s + s).slice(0, 3);
              default:
                return s + s;
            }
          }
          t.parseColor = function (e) {
            if (!e) return;
            let t = e.toLowerCase();
            if (0 === t.indexOf("rgb:")) {
              t = t.slice(4);
              const e = i.exec(t);
              if (e) {
                const t = e[1] ? 15 : e[4] ? 255 : e[7] ? 4095 : 65535;
                return [Math.round(parseInt(e[1] || e[4] || e[7] || e[10], 16) / t * 255), Math.round(parseInt(e[2] || e[5] || e[8] || e[11], 16) / t * 255), Math.round(parseInt(e[3] || e[6] || e[9] || e[12], 16) / t * 255)];
              }
            } else if (0 === t.indexOf("#") && (t = t.slice(1), s.exec(t) && [3, 6, 9, 12].includes(t.length))) {
              const e = t.length / 3,
                i = [0, 0, 0];
              for (let s = 0; s < 3; ++s) {
                const r = parseInt(t.slice(e * s, e * s + e), 16);
                i[s] = 1 === e ? r << 4 : 2 === e ? r : 3 === e ? r >> 4 : r >> 8;
              }
              return i;
            }
          }, t.toRgbString = function (e, t = 16) {
            const [i, s, n] = e;
            return `rgb:${r(i, t)}/${r(s, t)}/${r(n, t)}`;
          };
        },
        5770: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.PAYLOAD_LIMIT = void 0, t.PAYLOAD_LIMIT = 1e7;
        },
        6351: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.DcsHandler = t.DcsParser = void 0;
          const s = i(482),
            r = i(8742),
            n = i(5770),
            o = [];
          t.DcsParser = class {
            constructor() {
              this._handlers = Object.create(null), this._active = o, this._ident = 0, this._handlerFb = () => {}, this._stack = {
                paused: !1,
                loopPosition: 0,
                fallThrough: !1
              };
            }
            dispose() {
              this._handlers = Object.create(null), this._handlerFb = () => {}, this._active = o;
            }
            registerHandler(e, t) {
              void 0 === this._handlers[e] && (this._handlers[e] = []);
              const i = this._handlers[e];
              return i.push(t), {
                dispose: () => {
                  const e = i.indexOf(t);
                  -1 !== e && i.splice(e, 1);
                }
              };
            }
            clearHandler(e) {
              this._handlers[e] && delete this._handlers[e];
            }
            setHandlerFallback(e) {
              this._handlerFb = e;
            }
            reset() {
              if (this._active.length) for (let e = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; e >= 0; --e) this._active[e].unhook(!1);
              this._stack.paused = !1, this._active = o, this._ident = 0;
            }
            hook(e, t) {
              if (this.reset(), this._ident = e, this._active = this._handlers[e] || o, this._active.length) for (let e = this._active.length - 1; e >= 0; e--) this._active[e].hook(t);else this._handlerFb(this._ident, "HOOK", t);
            }
            put(e, t, i) {
              if (this._active.length) for (let s = this._active.length - 1; s >= 0; s--) this._active[s].put(e, t, i);else this._handlerFb(this._ident, "PUT", (0, s.utf32ToString)(e, t, i));
            }
            unhook(e, t = !0) {
              if (this._active.length) {
                let i = !1,
                  s = this._active.length - 1,
                  r = !1;
                if (this._stack.paused && (s = this._stack.loopPosition - 1, i = t, r = this._stack.fallThrough, this._stack.paused = !1), !r && !1 === i) {
                  for (; s >= 0 && (i = this._active[s].unhook(e), !0 !== i); s--) if (i instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !1, i;
                  s--;
                }
                for (; s >= 0; s--) if (i = this._active[s].unhook(!1), i instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !0, i;
              } else this._handlerFb(this._ident, "UNHOOK", e);
              this._active = o, this._ident = 0;
            }
          };
          const a = new r.Params();
          a.addParam(0), t.DcsHandler = class {
            constructor(e) {
              this._handler = e, this._data = "", this._params = a, this._hitLimit = !1;
            }
            hook(e) {
              this._params = e.length > 1 || e.params[0] ? e.clone() : a, this._data = "", this._hitLimit = !1;
            }
            put(e, t, i) {
              this._hitLimit || (this._data += (0, s.utf32ToString)(e, t, i), this._data.length > n.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
            }
            unhook(e) {
              let t = !1;
              if (this._hitLimit) t = !1;else if (e && (t = this._handler(this._data, this._params), t instanceof Promise)) return t.then(e => (this._params = a, this._data = "", this._hitLimit = !1, e));
              return this._params = a, this._data = "", this._hitLimit = !1, t;
            }
          };
        },
        2015: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.EscapeSequenceParser = t.VT500_TRANSITION_TABLE = t.TransitionTable = void 0;
          const s = i(844),
            r = i(8742),
            n = i(6242),
            o = i(6351);
          class a {
            constructor(e) {
              this.table = new Uint8Array(e);
            }
            setDefault(e, t) {
              this.table.fill(e << 4 | t);
            }
            add(e, t, i, s) {
              this.table[t << 8 | e] = i << 4 | s;
            }
            addMany(e, t, i, s) {
              for (let r = 0; r < e.length; r++) this.table[t << 8 | e[r]] = i << 4 | s;
            }
          }
          t.TransitionTable = a;
          const h = 160;
          t.VT500_TRANSITION_TABLE = function () {
            const e = new a(4095),
              t = Array.apply(null, Array(256)).map((e, t) => t),
              i = (e, i) => t.slice(e, i),
              s = i(32, 127),
              r = i(0, 24);
            r.push(25), r.push.apply(r, i(28, 32));
            const n = i(0, 14);
            let o;
            for (o in e.setDefault(1, 0), e.addMany(s, 0, 2, 0), n) e.addMany([24, 26, 153, 154], o, 3, 0), e.addMany(i(128, 144), o, 3, 0), e.addMany(i(144, 152), o, 3, 0), e.add(156, o, 0, 0), e.add(27, o, 11, 1), e.add(157, o, 4, 8), e.addMany([152, 158, 159], o, 0, 7), e.add(155, o, 11, 3), e.add(144, o, 11, 9);
            return e.addMany(r, 0, 3, 0), e.addMany(r, 1, 3, 1), e.add(127, 1, 0, 1), e.addMany(r, 8, 0, 8), e.addMany(r, 3, 3, 3), e.add(127, 3, 0, 3), e.addMany(r, 4, 3, 4), e.add(127, 4, 0, 4), e.addMany(r, 6, 3, 6), e.addMany(r, 5, 3, 5), e.add(127, 5, 0, 5), e.addMany(r, 2, 3, 2), e.add(127, 2, 0, 2), e.add(93, 1, 4, 8), e.addMany(s, 8, 5, 8), e.add(127, 8, 5, 8), e.addMany([156, 27, 24, 26, 7], 8, 6, 0), e.addMany(i(28, 32), 8, 0, 8), e.addMany([88, 94, 95], 1, 0, 7), e.addMany(s, 7, 0, 7), e.addMany(r, 7, 0, 7), e.add(156, 7, 0, 0), e.add(127, 7, 0, 7), e.add(91, 1, 11, 3), e.addMany(i(64, 127), 3, 7, 0), e.addMany(i(48, 60), 3, 8, 4), e.addMany([60, 61, 62, 63], 3, 9, 4), e.addMany(i(48, 60), 4, 8, 4), e.addMany(i(64, 127), 4, 7, 0), e.addMany([60, 61, 62, 63], 4, 0, 6), e.addMany(i(32, 64), 6, 0, 6), e.add(127, 6, 0, 6), e.addMany(i(64, 127), 6, 0, 0), e.addMany(i(32, 48), 3, 9, 5), e.addMany(i(32, 48), 5, 9, 5), e.addMany(i(48, 64), 5, 0, 6), e.addMany(i(64, 127), 5, 7, 0), e.addMany(i(32, 48), 4, 9, 5), e.addMany(i(32, 48), 1, 9, 2), e.addMany(i(32, 48), 2, 9, 2), e.addMany(i(48, 127), 2, 10, 0), e.addMany(i(48, 80), 1, 10, 0), e.addMany(i(81, 88), 1, 10, 0), e.addMany([89, 90, 92], 1, 10, 0), e.addMany(i(96, 127), 1, 10, 0), e.add(80, 1, 11, 9), e.addMany(r, 9, 0, 9), e.add(127, 9, 0, 9), e.addMany(i(28, 32), 9, 0, 9), e.addMany(i(32, 48), 9, 9, 12), e.addMany(i(48, 60), 9, 8, 10), e.addMany([60, 61, 62, 63], 9, 9, 10), e.addMany(r, 11, 0, 11), e.addMany(i(32, 128), 11, 0, 11), e.addMany(i(28, 32), 11, 0, 11), e.addMany(r, 10, 0, 10), e.add(127, 10, 0, 10), e.addMany(i(28, 32), 10, 0, 10), e.addMany(i(48, 60), 10, 8, 10), e.addMany([60, 61, 62, 63], 10, 0, 11), e.addMany(i(32, 48), 10, 9, 12), e.addMany(r, 12, 0, 12), e.add(127, 12, 0, 12), e.addMany(i(28, 32), 12, 0, 12), e.addMany(i(32, 48), 12, 9, 12), e.addMany(i(48, 64), 12, 0, 11), e.addMany(i(64, 127), 12, 12, 13), e.addMany(i(64, 127), 10, 12, 13), e.addMany(i(64, 127), 9, 12, 13), e.addMany(r, 13, 13, 13), e.addMany(s, 13, 13, 13), e.add(127, 13, 0, 13), e.addMany([27, 156, 24, 26], 13, 14, 0), e.add(h, 0, 2, 0), e.add(h, 8, 5, 8), e.add(h, 6, 0, 6), e.add(h, 11, 0, 11), e.add(h, 13, 13, 13), e;
          }();
          class c extends s.Disposable {
            constructor(e = t.VT500_TRANSITION_TABLE) {
              super(), this._transitions = e, this._parseStack = {
                state: 0,
                handlers: [],
                handlerPos: 0,
                transition: 0,
                chunkPos: 0
              }, this.initialState = 0, this.currentState = this.initialState, this._params = new r.Params(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0, this._printHandlerFb = (e, t, i) => {}, this._executeHandlerFb = e => {}, this._csiHandlerFb = (e, t) => {}, this._escHandlerFb = e => {}, this._errorHandlerFb = e => e, this._printHandler = this._printHandlerFb, this._executeHandlers = Object.create(null), this._csiHandlers = Object.create(null), this._escHandlers = Object.create(null), this.register((0, s.toDisposable)(() => {
                this._csiHandlers = Object.create(null), this._executeHandlers = Object.create(null), this._escHandlers = Object.create(null);
              })), this._oscParser = this.register(new n.OscParser()), this._dcsParser = this.register(new o.DcsParser()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({
                final: "\\"
              }, () => !0);
            }
            _identifier(e, t = [64, 126]) {
              let i = 0;
              if (e.prefix) {
                if (e.prefix.length > 1) throw new Error("only one byte as prefix supported");
                if (i = e.prefix.charCodeAt(0), i && 60 > i || i > 63) throw new Error("prefix must be in range 0x3c .. 0x3f");
              }
              if (e.intermediates) {
                if (e.intermediates.length > 2) throw new Error("only two bytes as intermediates are supported");
                for (let t = 0; t < e.intermediates.length; ++t) {
                  const s = e.intermediates.charCodeAt(t);
                  if (32 > s || s > 47) throw new Error("intermediate must be in range 0x20 .. 0x2f");
                  i <<= 8, i |= s;
                }
              }
              if (1 !== e.final.length) throw new Error("final must be a single byte");
              const s = e.final.charCodeAt(0);
              if (t[0] > s || s > t[1]) throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);
              return i <<= 8, i |= s, i;
            }
            identToString(e) {
              const t = [];
              for (; e;) t.push(String.fromCharCode(255 & e)), e >>= 8;
              return t.reverse().join("");
            }
            setPrintHandler(e) {
              this._printHandler = e;
            }
            clearPrintHandler() {
              this._printHandler = this._printHandlerFb;
            }
            registerEscHandler(e, t) {
              const i = this._identifier(e, [48, 126]);
              void 0 === this._escHandlers[i] && (this._escHandlers[i] = []);
              const s = this._escHandlers[i];
              return s.push(t), {
                dispose: () => {
                  const e = s.indexOf(t);
                  -1 !== e && s.splice(e, 1);
                }
              };
            }
            clearEscHandler(e) {
              this._escHandlers[this._identifier(e, [48, 126])] && delete this._escHandlers[this._identifier(e, [48, 126])];
            }
            setEscHandlerFallback(e) {
              this._escHandlerFb = e;
            }
            setExecuteHandler(e, t) {
              this._executeHandlers[e.charCodeAt(0)] = t;
            }
            clearExecuteHandler(e) {
              this._executeHandlers[e.charCodeAt(0)] && delete this._executeHandlers[e.charCodeAt(0)];
            }
            setExecuteHandlerFallback(e) {
              this._executeHandlerFb = e;
            }
            registerCsiHandler(e, t) {
              const i = this._identifier(e);
              void 0 === this._csiHandlers[i] && (this._csiHandlers[i] = []);
              const s = this._csiHandlers[i];
              return s.push(t), {
                dispose: () => {
                  const e = s.indexOf(t);
                  -1 !== e && s.splice(e, 1);
                }
              };
            }
            clearCsiHandler(e) {
              this._csiHandlers[this._identifier(e)] && delete this._csiHandlers[this._identifier(e)];
            }
            setCsiHandlerFallback(e) {
              this._csiHandlerFb = e;
            }
            registerDcsHandler(e, t) {
              return this._dcsParser.registerHandler(this._identifier(e), t);
            }
            clearDcsHandler(e) {
              this._dcsParser.clearHandler(this._identifier(e));
            }
            setDcsHandlerFallback(e) {
              this._dcsParser.setHandlerFallback(e);
            }
            registerOscHandler(e, t) {
              return this._oscParser.registerHandler(e, t);
            }
            clearOscHandler(e) {
              this._oscParser.clearHandler(e);
            }
            setOscHandlerFallback(e) {
              this._oscParser.setHandlerFallback(e);
            }
            setErrorHandler(e) {
              this._errorHandler = e;
            }
            clearErrorHandler() {
              this._errorHandler = this._errorHandlerFb;
            }
            reset() {
              this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0, 0 !== this._parseStack.state && (this._parseStack.state = 2, this._parseStack.handlers = []);
            }
            _preserveStack(e, t, i, s, r) {
              this._parseStack.state = e, this._parseStack.handlers = t, this._parseStack.handlerPos = i, this._parseStack.transition = s, this._parseStack.chunkPos = r;
            }
            parse(e, t, i) {
              let s,
                r = 0,
                n = 0,
                o = 0;
              if (this._parseStack.state) if (2 === this._parseStack.state) this._parseStack.state = 0, o = this._parseStack.chunkPos + 1;else {
                if (void 0 === i || 1 === this._parseStack.state) throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
                const t = this._parseStack.handlers;
                let n = this._parseStack.handlerPos - 1;
                switch (this._parseStack.state) {
                  case 3:
                    if (!1 === i && n > -1) for (; n >= 0 && (s = t[n](this._params), !0 !== s); n--) if (s instanceof Promise) return this._parseStack.handlerPos = n, s;
                    this._parseStack.handlers = [];
                    break;
                  case 4:
                    if (!1 === i && n > -1) for (; n >= 0 && (s = t[n](), !0 !== s); n--) if (s instanceof Promise) return this._parseStack.handlerPos = n, s;
                    this._parseStack.handlers = [];
                    break;
                  case 6:
                    if (r = e[this._parseStack.chunkPos], s = this._dcsParser.unhook(24 !== r && 26 !== r, i), s) return s;
                    27 === r && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
                    break;
                  case 5:
                    if (r = e[this._parseStack.chunkPos], s = this._oscParser.end(24 !== r && 26 !== r, i), s) return s;
                    27 === r && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
                }
                this._parseStack.state = 0, o = this._parseStack.chunkPos + 1, this.precedingCodepoint = 0, this.currentState = 15 & this._parseStack.transition;
              }
              for (let i = o; i < t; ++i) {
                switch (r = e[i], n = this._transitions.table[this.currentState << 8 | (r < 160 ? r : h)], n >> 4) {
                  case 2:
                    for (let s = i + 1;; ++s) {
                      if (s >= t || (r = e[s]) < 32 || r > 126 && r < h) {
                        this._printHandler(e, i, s), i = s - 1;
                        break;
                      }
                      if (++s >= t || (r = e[s]) < 32 || r > 126 && r < h) {
                        this._printHandler(e, i, s), i = s - 1;
                        break;
                      }
                      if (++s >= t || (r = e[s]) < 32 || r > 126 && r < h) {
                        this._printHandler(e, i, s), i = s - 1;
                        break;
                      }
                      if (++s >= t || (r = e[s]) < 32 || r > 126 && r < h) {
                        this._printHandler(e, i, s), i = s - 1;
                        break;
                      }
                    }
                    break;
                  case 3:
                    this._executeHandlers[r] ? this._executeHandlers[r]() : this._executeHandlerFb(r), this.precedingCodepoint = 0;
                    break;
                  case 0:
                    break;
                  case 1:
                    if (this._errorHandler({
                      position: i,
                      code: r,
                      currentState: this.currentState,
                      collect: this._collect,
                      params: this._params,
                      abort: !1
                    }).abort) return;
                    break;
                  case 7:
                    const o = this._csiHandlers[this._collect << 8 | r];
                    let a = o ? o.length - 1 : -1;
                    for (; a >= 0 && (s = o[a](this._params), !0 !== s); a--) if (s instanceof Promise) return this._preserveStack(3, o, a, n, i), s;
                    a < 0 && this._csiHandlerFb(this._collect << 8 | r, this._params), this.precedingCodepoint = 0;
                    break;
                  case 8:
                    do {
                      switch (r) {
                        case 59:
                          this._params.addParam(0);
                          break;
                        case 58:
                          this._params.addSubParam(-1);
                          break;
                        default:
                          this._params.addDigit(r - 48);
                      }
                    } while (++i < t && (r = e[i]) > 47 && r < 60);
                    i--;
                    break;
                  case 9:
                    this._collect <<= 8, this._collect |= r;
                    break;
                  case 10:
                    const c = this._escHandlers[this._collect << 8 | r];
                    let l = c ? c.length - 1 : -1;
                    for (; l >= 0 && (s = c[l](), !0 !== s); l--) if (s instanceof Promise) return this._preserveStack(4, c, l, n, i), s;
                    l < 0 && this._escHandlerFb(this._collect << 8 | r), this.precedingCodepoint = 0;
                    break;
                  case 11:
                    this._params.reset(), this._params.addParam(0), this._collect = 0;
                    break;
                  case 12:
                    this._dcsParser.hook(this._collect << 8 | r, this._params);
                    break;
                  case 13:
                    for (let s = i + 1;; ++s) if (s >= t || 24 === (r = e[s]) || 26 === r || 27 === r || r > 127 && r < h) {
                      this._dcsParser.put(e, i, s), i = s - 1;
                      break;
                    }
                    break;
                  case 14:
                    if (s = this._dcsParser.unhook(24 !== r && 26 !== r), s) return this._preserveStack(6, [], 0, n, i), s;
                    27 === r && (n |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0;
                    break;
                  case 4:
                    this._oscParser.start();
                    break;
                  case 5:
                    for (let s = i + 1;; s++) if (s >= t || (r = e[s]) < 32 || r > 127 && r < h) {
                      this._oscParser.put(e, i, s), i = s - 1;
                      break;
                    }
                    break;
                  case 6:
                    if (s = this._oscParser.end(24 !== r && 26 !== r), s) return this._preserveStack(5, [], 0, n, i), s;
                    27 === r && (n |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0;
                }
                this.currentState = 15 & n;
              }
            }
          }
          t.EscapeSequenceParser = c;
        },
        6242: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.OscHandler = t.OscParser = void 0;
          const s = i(5770),
            r = i(482),
            n = [];
          t.OscParser = class {
            constructor() {
              this._state = 0, this._active = n, this._id = -1, this._handlers = Object.create(null), this._handlerFb = () => {}, this._stack = {
                paused: !1,
                loopPosition: 0,
                fallThrough: !1
              };
            }
            registerHandler(e, t) {
              void 0 === this._handlers[e] && (this._handlers[e] = []);
              const i = this._handlers[e];
              return i.push(t), {
                dispose: () => {
                  const e = i.indexOf(t);
                  -1 !== e && i.splice(e, 1);
                }
              };
            }
            clearHandler(e) {
              this._handlers[e] && delete this._handlers[e];
            }
            setHandlerFallback(e) {
              this._handlerFb = e;
            }
            dispose() {
              this._handlers = Object.create(null), this._handlerFb = () => {}, this._active = n;
            }
            reset() {
              if (2 === this._state) for (let e = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; e >= 0; --e) this._active[e].end(!1);
              this._stack.paused = !1, this._active = n, this._id = -1, this._state = 0;
            }
            _start() {
              if (this._active = this._handlers[this._id] || n, this._active.length) for (let e = this._active.length - 1; e >= 0; e--) this._active[e].start();else this._handlerFb(this._id, "START");
            }
            _put(e, t, i) {
              if (this._active.length) for (let s = this._active.length - 1; s >= 0; s--) this._active[s].put(e, t, i);else this._handlerFb(this._id, "PUT", (0, r.utf32ToString)(e, t, i));
            }
            start() {
              this.reset(), this._state = 1;
            }
            put(e, t, i) {
              if (3 !== this._state) {
                if (1 === this._state) for (; t < i;) {
                  const i = e[t++];
                  if (59 === i) {
                    this._state = 2, this._start();
                    break;
                  }
                  if (i < 48 || 57 < i) return void (this._state = 3);
                  -1 === this._id && (this._id = 0), this._id = 10 * this._id + i - 48;
                }
                2 === this._state && i - t > 0 && this._put(e, t, i);
              }
            }
            end(e, t = !0) {
              if (0 !== this._state) {
                if (3 !== this._state) if (1 === this._state && this._start(), this._active.length) {
                  let i = !1,
                    s = this._active.length - 1,
                    r = !1;
                  if (this._stack.paused && (s = this._stack.loopPosition - 1, i = t, r = this._stack.fallThrough, this._stack.paused = !1), !r && !1 === i) {
                    for (; s >= 0 && (i = this._active[s].end(e), !0 !== i); s--) if (i instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !1, i;
                    s--;
                  }
                  for (; s >= 0; s--) if (i = this._active[s].end(!1), i instanceof Promise) return this._stack.paused = !0, this._stack.loopPosition = s, this._stack.fallThrough = !0, i;
                } else this._handlerFb(this._id, "END", e);
                this._active = n, this._id = -1, this._state = 0;
              }
            }
          }, t.OscHandler = class {
            constructor(e) {
              this._handler = e, this._data = "", this._hitLimit = !1;
            }
            start() {
              this._data = "", this._hitLimit = !1;
            }
            put(e, t, i) {
              this._hitLimit || (this._data += (0, r.utf32ToString)(e, t, i), this._data.length > s.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
            }
            end(e) {
              let t = !1;
              if (this._hitLimit) t = !1;else if (e && (t = this._handler(this._data), t instanceof Promise)) return t.then(e => (this._data = "", this._hitLimit = !1, e));
              return this._data = "", this._hitLimit = !1, t;
            }
          };
        },
        8742: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.Params = void 0;
          const i = 2147483647;
          class s {
            constructor(e = 32, t = 32) {
              if (this.maxLength = e, this.maxSubParamsLength = t, t > 256) throw new Error("maxSubParamsLength must not be greater than 256");
              this.params = new Int32Array(e), this.length = 0, this._subParams = new Int32Array(t), this._subParamsLength = 0, this._subParamsIdx = new Uint16Array(e), this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
            }
            static fromArray(e) {
              const t = new s();
              if (!e.length) return t;
              for (let i = Array.isArray(e[0]) ? 1 : 0; i < e.length; ++i) {
                const s = e[i];
                if (Array.isArray(s)) for (let e = 0; e < s.length; ++e) t.addSubParam(s[e]);else t.addParam(s);
              }
              return t;
            }
            clone() {
              const e = new s(this.maxLength, this.maxSubParamsLength);
              return e.params.set(this.params), e.length = this.length, e._subParams.set(this._subParams), e._subParamsLength = this._subParamsLength, e._subParamsIdx.set(this._subParamsIdx), e._rejectDigits = this._rejectDigits, e._rejectSubDigits = this._rejectSubDigits, e._digitIsSub = this._digitIsSub, e;
            }
            toArray() {
              const e = [];
              for (let t = 0; t < this.length; ++t) {
                e.push(this.params[t]);
                const i = this._subParamsIdx[t] >> 8,
                  s = 255 & this._subParamsIdx[t];
                s - i > 0 && e.push(Array.prototype.slice.call(this._subParams, i, s));
              }
              return e;
            }
            reset() {
              this.length = 0, this._subParamsLength = 0, this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
            }
            addParam(e) {
              if (this._digitIsSub = !1, this.length >= this.maxLength) this._rejectDigits = !0;else {
                if (e < -1) throw new Error("values lesser than -1 are not allowed");
                this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength, this.params[this.length++] = e > i ? i : e;
              }
            }
            addSubParam(e) {
              if (this._digitIsSub = !0, this.length) if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength) this._rejectSubDigits = !0;else {
                if (e < -1) throw new Error("values lesser than -1 are not allowed");
                this._subParams[this._subParamsLength++] = e > i ? i : e, this._subParamsIdx[this.length - 1]++;
              }
            }
            hasSubParams(e) {
              return (255 & this._subParamsIdx[e]) - (this._subParamsIdx[e] >> 8) > 0;
            }
            getSubParams(e) {
              const t = this._subParamsIdx[e] >> 8,
                i = 255 & this._subParamsIdx[e];
              return i - t > 0 ? this._subParams.subarray(t, i) : null;
            }
            getSubParamsAll() {
              const e = {};
              for (let t = 0; t < this.length; ++t) {
                const i = this._subParamsIdx[t] >> 8,
                  s = 255 & this._subParamsIdx[t];
                s - i > 0 && (e[t] = this._subParams.slice(i, s));
              }
              return e;
            }
            addDigit(e) {
              let t;
              if (this._rejectDigits || !(t = this._digitIsSub ? this._subParamsLength : this.length) || this._digitIsSub && this._rejectSubDigits) return;
              const s = this._digitIsSub ? this._subParams : this.params,
                r = s[t - 1];
              s[t - 1] = ~r ? Math.min(10 * r + e, i) : e;
            }
          }
          t.Params = s;
        },
        5741: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.AddonManager = void 0, t.AddonManager = class {
            constructor() {
              this._addons = [];
            }
            dispose() {
              for (let e = this._addons.length - 1; e >= 0; e--) this._addons[e].instance.dispose();
            }
            loadAddon(e, t) {
              const i = {
                instance: t,
                dispose: t.dispose,
                isDisposed: !1
              };
              this._addons.push(i), t.dispose = () => this._wrappedAddonDispose(i), t.activate(e);
            }
            _wrappedAddonDispose(e) {
              if (e.isDisposed) return;
              let t = -1;
              for (let i = 0; i < this._addons.length; i++) if (this._addons[i] === e) {
                t = i;
                break;
              }
              if (-1 === t) throw new Error("Could not dispose an addon that has not been loaded");
              e.isDisposed = !0, e.dispose.apply(e.instance), this._addons.splice(t, 1);
            }
          };
        },
        8771: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BufferApiView = void 0;
          const s = i(3785),
            r = i(511);
          t.BufferApiView = class {
            constructor(e, t) {
              this._buffer = e, this.type = t;
            }
            init(e) {
              return this._buffer = e, this;
            }
            get cursorY() {
              return this._buffer.y;
            }
            get cursorX() {
              return this._buffer.x;
            }
            get viewportY() {
              return this._buffer.ydisp;
            }
            get baseY() {
              return this._buffer.ybase;
            }
            get length() {
              return this._buffer.lines.length;
            }
            getLine(e) {
              const t = this._buffer.lines.get(e);
              if (t) return new s.BufferLineApiView(t);
            }
            getNullCell() {
              return new r.CellData();
            }
          };
        },
        3785: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BufferLineApiView = void 0;
          const s = i(511);
          t.BufferLineApiView = class {
            constructor(e) {
              this._line = e;
            }
            get isWrapped() {
              return this._line.isWrapped;
            }
            get length() {
              return this._line.length;
            }
            getCell(e, t) {
              if (!(e < 0 || e >= this._line.length)) return t ? (this._line.loadCell(e, t), t) : this._line.loadCell(e, new s.CellData());
            }
            translateToString(e, t, i) {
              return this._line.translateToString(e, t, i);
            }
          };
        },
        8285: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BufferNamespaceApi = void 0;
          const s = i(8771),
            r = i(8460);
          t.BufferNamespaceApi = class {
            constructor(e) {
              this._core = e, this._onBufferChange = new r.EventEmitter(), this.onBufferChange = this._onBufferChange.event, this._normal = new s.BufferApiView(this._core.buffers.normal, "normal"), this._alternate = new s.BufferApiView(this._core.buffers.alt, "alternate"), this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active));
            }
            get active() {
              if (this._core.buffers.active === this._core.buffers.normal) return this.normal;
              if (this._core.buffers.active === this._core.buffers.alt) return this.alternate;
              throw new Error("Active buffer is neither normal nor alternate");
            }
            get normal() {
              return this._normal.init(this._core.buffers.normal);
            }
            get alternate() {
              return this._alternate.init(this._core.buffers.alt);
            }
          };
        },
        7975: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.ParserApi = void 0, t.ParserApi = class {
            constructor(e) {
              this._core = e;
            }
            registerCsiHandler(e, t) {
              return this._core.registerCsiHandler(e, e => t(e.toArray()));
            }
            addCsiHandler(e, t) {
              return this.registerCsiHandler(e, t);
            }
            registerDcsHandler(e, t) {
              return this._core.registerDcsHandler(e, (e, i) => t(e, i.toArray()));
            }
            addDcsHandler(e, t) {
              return this.registerDcsHandler(e, t);
            }
            registerEscHandler(e, t) {
              return this._core.registerEscHandler(e, t);
            }
            addEscHandler(e, t) {
              return this.registerEscHandler(e, t);
            }
            registerOscHandler(e, t) {
              return this._core.registerOscHandler(e, t);
            }
            addOscHandler(e, t) {
              return this.registerOscHandler(e, t);
            }
          };
        },
        7090: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.UnicodeApi = void 0, t.UnicodeApi = class {
            constructor(e) {
              this._core = e;
            }
            register(e) {
              this._core.unicodeService.register(e);
            }
            get versions() {
              return this._core.unicodeService.versions;
            }
            get activeVersion() {
              return this._core.unicodeService.activeVersion;
            }
            set activeVersion(e) {
              this._core.unicodeService.activeVersion = e;
            }
          };
        },
        744: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.BufferService = t.MINIMUM_ROWS = t.MINIMUM_COLS = void 0;
          const n = i(2585),
            o = i(5295),
            a = i(8460),
            h = i(844);
          t.MINIMUM_COLS = 2, t.MINIMUM_ROWS = 1;
          let c = class extends h.Disposable {
            constructor(e) {
              super(), this.isUserScrolling = !1, this._onResize = this.register(new a.EventEmitter()), this.onResize = this._onResize.event, this._onScroll = this.register(new a.EventEmitter()), this.onScroll = this._onScroll.event, this.cols = Math.max(e.rawOptions.cols || 0, t.MINIMUM_COLS), this.rows = Math.max(e.rawOptions.rows || 0, t.MINIMUM_ROWS), this.buffers = this.register(new o.BufferSet(e, this));
            }
            get buffer() {
              return this.buffers.active;
            }
            resize(e, t) {
              this.cols = e, this.rows = t, this.buffers.resize(e, t), this._onResize.fire({
                cols: e,
                rows: t
              });
            }
            reset() {
              this.buffers.reset(), this.isUserScrolling = !1;
            }
            scroll(e, t = !1) {
              const i = this.buffer;
              let s;
              s = this._cachedBlankLine, s && s.length === this.cols && s.getFg(0) === e.fg && s.getBg(0) === e.bg || (s = i.getBlankLine(e, t), this._cachedBlankLine = s), s.isWrapped = t;
              const r = i.ybase + i.scrollTop,
                n = i.ybase + i.scrollBottom;
              if (0 === i.scrollTop) {
                const e = i.lines.isFull;
                n === i.lines.length - 1 ? e ? i.lines.recycle().copyFrom(s) : i.lines.push(s.clone()) : i.lines.splice(n + 1, 0, s.clone()), e ? this.isUserScrolling && (i.ydisp = Math.max(i.ydisp - 1, 0)) : (i.ybase++, this.isUserScrolling || i.ydisp++);
              } else {
                const e = n - r + 1;
                i.lines.shiftElements(r + 1, e - 1, -1), i.lines.set(n, s.clone());
              }
              this.isUserScrolling || (i.ydisp = i.ybase), this._onScroll.fire(i.ydisp);
            }
            scrollLines(e, t, i) {
              const s = this.buffer;
              if (e < 0) {
                if (0 === s.ydisp) return;
                this.isUserScrolling = !0;
              } else e + s.ydisp >= s.ybase && (this.isUserScrolling = !1);
              const r = s.ydisp;
              s.ydisp = Math.max(Math.min(s.ydisp + e, s.ybase), 0), r !== s.ydisp && (t || this._onScroll.fire(s.ydisp));
            }
            scrollPages(e) {
              this.scrollLines(e * (this.rows - 1));
            }
            scrollToTop() {
              this.scrollLines(-this.buffer.ydisp);
            }
            scrollToBottom() {
              this.scrollLines(this.buffer.ybase - this.buffer.ydisp);
            }
            scrollToLine(e) {
              const t = e - this.buffer.ydisp;
              0 !== t && this.scrollLines(t);
            }
          };
          c = s([r(0, n.IOptionsService)], c), t.BufferService = c;
        },
        7994: (e, t) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CharsetService = void 0, t.CharsetService = class {
            constructor() {
              this.glevel = 0, this._charsets = [];
            }
            reset() {
              this.charset = void 0, this._charsets = [], this.glevel = 0;
            }
            setgLevel(e) {
              this.glevel = e, this.charset = this._charsets[e];
            }
            setgCharset(e, t) {
              this._charsets[e] = t, this.glevel === e && (this.charset = t);
            }
          };
        },
        1753: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CoreMouseService = void 0;
          const n = i(2585),
            o = i(8460),
            a = i(844),
            h = {
              NONE: {
                events: 0,
                restrict: () => !1
              },
              X10: {
                events: 1,
                restrict: e => 4 !== e.button && 1 === e.action && (e.ctrl = !1, e.alt = !1, e.shift = !1, !0)
              },
              VT200: {
                events: 19,
                restrict: e => 32 !== e.action
              },
              DRAG: {
                events: 23,
                restrict: e => 32 !== e.action || 3 !== e.button
              },
              ANY: {
                events: 31,
                restrict: e => !0
              }
            };
          function c(e, t) {
            let i = (e.ctrl ? 16 : 0) | (e.shift ? 4 : 0) | (e.alt ? 8 : 0);
            return 4 === e.button ? (i |= 64, i |= e.action) : (i |= 3 & e.button, 4 & e.button && (i |= 64), 8 & e.button && (i |= 128), 32 === e.action ? i |= 32 : 0 !== e.action || t || (i |= 3)), i;
          }
          const l = String.fromCharCode,
            d = {
              DEFAULT: e => {
                const t = [c(e, !1) + 32, e.col + 32, e.row + 32];
                return t[0] > 255 || t[1] > 255 || t[2] > 255 ? "" : `[M${l(t[0])}${l(t[1])}${l(t[2])}`;
              },
              SGR: e => {
                const t = 0 === e.action && 4 !== e.button ? "m" : "M";
                return `[<${c(e, !0)};${e.col};${e.row}${t}`;
              },
              SGR_PIXELS: e => {
                const t = 0 === e.action && 4 !== e.button ? "m" : "M";
                return `[<${c(e, !0)};${e.x};${e.y}${t}`;
              }
            };
          let _ = class extends a.Disposable {
            constructor(e, t) {
              super(), this._bufferService = e, this._coreService = t, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new o.EventEmitter()), this.onProtocolChange = this._onProtocolChange.event;
              for (const e of Object.keys(h)) this.addProtocol(e, h[e]);
              for (const e of Object.keys(d)) this.addEncoding(e, d[e]);
              this.reset();
            }
            addProtocol(e, t) {
              this._protocols[e] = t;
            }
            addEncoding(e, t) {
              this._encodings[e] = t;
            }
            get activeProtocol() {
              return this._activeProtocol;
            }
            get areMouseEventsActive() {
              return 0 !== this._protocols[this._activeProtocol].events;
            }
            set activeProtocol(e) {
              if (!this._protocols[e]) throw new Error(`unknown protocol "${e}"`);
              this._activeProtocol = e, this._onProtocolChange.fire(this._protocols[e].events);
            }
            get activeEncoding() {
              return this._activeEncoding;
            }
            set activeEncoding(e) {
              if (!this._encodings[e]) throw new Error(`unknown encoding "${e}"`);
              this._activeEncoding = e;
            }
            reset() {
              this.activeProtocol = "NONE", this.activeEncoding = "DEFAULT", this._lastEvent = null;
            }
            triggerMouseEvent(e) {
              if (e.col < 0 || e.col >= this._bufferService.cols || e.row < 0 || e.row >= this._bufferService.rows) return !1;
              if (4 === e.button && 32 === e.action) return !1;
              if (3 === e.button && 32 !== e.action) return !1;
              if (4 !== e.button && (2 === e.action || 3 === e.action)) return !1;
              if (e.col++, e.row++, 32 === e.action && this._lastEvent && this._equalEvents(this._lastEvent, e, "SGR_PIXELS" === this._activeEncoding)) return !1;
              if (!this._protocols[this._activeProtocol].restrict(e)) return !1;
              const t = this._encodings[this._activeEncoding](e);
              return t && ("DEFAULT" === this._activeEncoding ? this._coreService.triggerBinaryEvent(t) : this._coreService.triggerDataEvent(t, !0)), this._lastEvent = e, !0;
            }
            explainEvents(e) {
              return {
                down: !!(1 & e),
                up: !!(2 & e),
                drag: !!(4 & e),
                move: !!(8 & e),
                wheel: !!(16 & e)
              };
            }
            _equalEvents(e, t, i) {
              if (i) {
                if (e.x !== t.x) return !1;
                if (e.y !== t.y) return !1;
              } else {
                if (e.col !== t.col) return !1;
                if (e.row !== t.row) return !1;
              }
              return e.button === t.button && e.action === t.action && e.ctrl === t.ctrl && e.alt === t.alt && e.shift === t.shift;
            }
          };
          _ = s([r(0, n.IBufferService), r(1, n.ICoreService)], _), t.CoreMouseService = _;
        },
        6975: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.CoreService = void 0;
          const n = i(2585),
            o = i(8460),
            a = i(1439),
            h = i(844),
            c = Object.freeze({
              insertMode: !1
            }),
            l = Object.freeze({
              applicationCursorKeys: !1,
              applicationKeypad: !1,
              bracketedPasteMode: !1,
              origin: !1,
              reverseWraparound: !1,
              sendFocus: !1,
              wraparound: !0
            });
          let d = class extends h.Disposable {
            constructor(e, t, i) {
              super(), this._bufferService = e, this._logService = t, this._optionsService = i, this.isCursorInitialized = !1, this.isCursorHidden = !1, this._onData = this.register(new o.EventEmitter()), this.onData = this._onData.event, this._onUserInput = this.register(new o.EventEmitter()), this.onUserInput = this._onUserInput.event, this._onBinary = this.register(new o.EventEmitter()), this.onBinary = this._onBinary.event, this._onRequestScrollToBottom = this.register(new o.EventEmitter()), this.onRequestScrollToBottom = this._onRequestScrollToBottom.event, this.modes = (0, a.clone)(c), this.decPrivateModes = (0, a.clone)(l);
            }
            reset() {
              this.modes = (0, a.clone)(c), this.decPrivateModes = (0, a.clone)(l);
            }
            triggerDataEvent(e, t = !1) {
              if (this._optionsService.rawOptions.disableStdin) return;
              const i = this._bufferService.buffer;
              t && this._optionsService.rawOptions.scrollOnUserInput && i.ybase !== i.ydisp && this._onRequestScrollToBottom.fire(), t && this._onUserInput.fire(), this._logService.debug(`sending data "${e}"`, () => e.split("").map(e => e.charCodeAt(0))), this._onData.fire(e);
            }
            triggerBinaryEvent(e) {
              this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${e}"`, () => e.split("").map(e => e.charCodeAt(0))), this._onBinary.fire(e));
            }
          };
          d = s([r(0, n.IBufferService), r(1, n.ILogService), r(2, n.IOptionsService)], d), t.CoreService = d;
        },
        9074: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.DecorationService = void 0;
          const s = i(8055),
            r = i(8460),
            n = i(844),
            o = i(6106);
          let a = 0,
            h = 0;
          class c extends n.Disposable {
            constructor() {
              super(), this._decorations = new o.SortedList(e => null == e ? void 0 : e.marker.line), this._onDecorationRegistered = this.register(new r.EventEmitter()), this.onDecorationRegistered = this._onDecorationRegistered.event, this._onDecorationRemoved = this.register(new r.EventEmitter()), this.onDecorationRemoved = this._onDecorationRemoved.event, this.register((0, n.toDisposable)(() => {
                for (const e of this._decorations.values()) this._onDecorationRemoved.fire(e);
                this.reset();
              }));
            }
            get decorations() {
              return this._decorations.values();
            }
            registerDecoration(e) {
              if (e.marker.isDisposed) return;
              const t = new l(e);
              if (t) {
                const e = t.marker.onDispose(() => t.dispose());
                t.onDispose(() => {
                  t && (this._decorations.delete(t) && this._onDecorationRemoved.fire(t), e.dispose());
                }), this._decorations.insert(t), this._onDecorationRegistered.fire(t);
              }
              return t;
            }
            reset() {
              for (const e of this._decorations.values()) e.dispose();
              this._decorations.clear();
            }
            *getDecorationsAtCell(e, t, i) {
              var s, r, n;
              let o = 0,
                a = 0;
              for (const h of this._decorations.getKeyIterator(t)) o = null !== (s = h.options.x) && void 0 !== s ? s : 0, a = o + (null !== (r = h.options.width) && void 0 !== r ? r : 1), e >= o && e < a && (!i || (null !== (n = h.options.layer) && void 0 !== n ? n : "bottom") === i) && (yield h);
            }
            forEachDecorationAtCell(e, t, i, s) {
              this._decorations.forEachByKey(t, t => {
                var r, n, o;
                a = null !== (r = t.options.x) && void 0 !== r ? r : 0, h = a + (null !== (n = t.options.width) && void 0 !== n ? n : 1), e >= a && e < h && (!i || (null !== (o = t.options.layer) && void 0 !== o ? o : "bottom") === i) && s(t);
              });
            }
            dispose() {
              for (const e of this._decorations.values()) this._onDecorationRemoved.fire(e);
              this.reset();
            }
          }
          t.DecorationService = c;
          class l extends n.Disposable {
            constructor(e) {
              super(), this.options = e, this.isDisposed = !1, this.onRenderEmitter = this.register(new r.EventEmitter()), this.onRender = this.onRenderEmitter.event, this._onDispose = this.register(new r.EventEmitter()), this.onDispose = this._onDispose.event, this._cachedBg = null, this._cachedFg = null, this.marker = e.marker, this.options.overviewRulerOptions && !this.options.overviewRulerOptions.position && (this.options.overviewRulerOptions.position = "full");
            }
            get backgroundColorRGB() {
              return null === this._cachedBg && (this.options.backgroundColor ? this._cachedBg = s.css.toColor(this.options.backgroundColor) : this._cachedBg = void 0), this._cachedBg;
            }
            get foregroundColorRGB() {
              return null === this._cachedFg && (this.options.foregroundColor ? this._cachedFg = s.css.toColor(this.options.foregroundColor) : this._cachedFg = void 0), this._cachedFg;
            }
            dispose() {
              this._onDispose.fire(), super.dispose();
            }
          }
        },
        4348: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.InstantiationService = t.ServiceCollection = void 0;
          const s = i(2585),
            r = i(8343);
          class n {
            constructor(...e) {
              this._entries = new Map();
              for (const [t, i] of e) this.set(t, i);
            }
            set(e, t) {
              const i = this._entries.get(e);
              return this._entries.set(e, t), i;
            }
            forEach(e) {
              for (const [t, i] of this._entries.entries()) e(t, i);
            }
            has(e) {
              return this._entries.has(e);
            }
            get(e) {
              return this._entries.get(e);
            }
          }
          t.ServiceCollection = n, t.InstantiationService = class {
            constructor() {
              this._services = new n(), this._services.set(s.IInstantiationService, this);
            }
            setService(e, t) {
              this._services.set(e, t);
            }
            getService(e) {
              return this._services.get(e);
            }
            createInstance(e, ...t) {
              const i = (0, r.getServiceDependencies)(e).sort((e, t) => e.index - t.index),
                s = [];
              for (const t of i) {
                const i = this._services.get(t.id);
                if (!i) throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);
                s.push(i);
              }
              const n = i.length > 0 ? i[0].index : t.length;
              if (t.length !== n) throw new Error(`[createInstance] First service dependency of ${e.name} at position ${n + 1} conflicts with ${t.length} static arguments`);
              return new e(...[...t, ...s]);
            }
          };
        },
        7866: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.LogService = void 0;
          const n = i(844),
            o = i(2585),
            a = {
              debug: o.LogLevelEnum.DEBUG,
              info: o.LogLevelEnum.INFO,
              warn: o.LogLevelEnum.WARN,
              error: o.LogLevelEnum.ERROR,
              off: o.LogLevelEnum.OFF
            };
          let h = class extends n.Disposable {
            constructor(e) {
              super(), this._optionsService = e, this.logLevel = o.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel()));
            }
            _updateLogLevel() {
              this.logLevel = a[this._optionsService.rawOptions.logLevel];
            }
            _evalLazyOptionalParams(e) {
              for (let t = 0; t < e.length; t++) "function" == typeof e[t] && (e[t] = e[t]());
            }
            _log(e, t, i) {
              this._evalLazyOptionalParams(i), e.call(console, "xterm.js: " + t, ...i);
            }
            debug(e, ...t) {
              this.logLevel <= o.LogLevelEnum.DEBUG && this._log(console.log, e, t);
            }
            info(e, ...t) {
              this.logLevel <= o.LogLevelEnum.INFO && this._log(console.info, e, t);
            }
            warn(e, ...t) {
              this.logLevel <= o.LogLevelEnum.WARN && this._log(console.warn, e, t);
            }
            error(e, ...t) {
              this.logLevel <= o.LogLevelEnum.ERROR && this._log(console.error, e, t);
            }
          };
          h = s([r(0, o.IOptionsService)], h), t.LogService = h;
        },
        7302: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.OptionsService = t.DEFAULT_OPTIONS = void 0;
          const s = i(8460),
            r = i(6114),
            n = i(844);
          t.DEFAULT_OPTIONS = {
            cols: 80,
            rows: 24,
            cursorBlink: !1,
            cursorStyle: "block",
            cursorWidth: 1,
            customGlyphs: !0,
            drawBoldTextInBrightColors: !0,
            fastScrollModifier: "alt",
            fastScrollSensitivity: 5,
            fontFamily: "courier-new, courier, monospace",
            fontSize: 15,
            fontWeight: "normal",
            fontWeightBold: "bold",
            lineHeight: 1,
            letterSpacing: 0,
            linkHandler: null,
            logLevel: "info",
            scrollback: 1e3,
            scrollOnUserInput: !0,
            scrollSensitivity: 1,
            screenReaderMode: !1,
            smoothScrollDuration: 0,
            macOptionIsMeta: !1,
            macOptionClickForcesSelection: !1,
            minimumContrastRatio: 1,
            disableStdin: !1,
            allowProposedApi: !1,
            allowTransparency: !1,
            tabStopWidth: 8,
            theme: {},
            rightClickSelectsWord: r.isMac,
            windowOptions: {},
            windowsMode: !1,
            wordSeparator: " ()[]{}',\"`",
            altClickMovesCursor: !0,
            convertEol: !1,
            termName: "xterm",
            cancelEvents: !1,
            overviewRulerWidth: 0
          };
          const o = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
          class a extends n.Disposable {
            constructor(e) {
              super(), this._onOptionChange = this.register(new s.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
              const i = Object.assign({}, t.DEFAULT_OPTIONS);
              for (const t in e) if (t in i) try {
                const s = e[t];
                i[t] = this._sanitizeAndValidateOption(t, s);
              } catch (e) {
                console.error(e);
              }
              this.rawOptions = i, this.options = Object.assign({}, i), this._setupOptions();
            }
            onSpecificOptionChange(e, t) {
              return this.onOptionChange(i => {
                i === e && t(this.rawOptions[e]);
              });
            }
            onMultipleOptionChange(e, t) {
              return this.onOptionChange(i => {
                -1 !== e.indexOf(i) && t();
              });
            }
            _setupOptions() {
              const e = e => {
                  if (!(e in t.DEFAULT_OPTIONS)) throw new Error(`No option with key "${e}"`);
                  return this.rawOptions[e];
                },
                i = (e, i) => {
                  if (!(e in t.DEFAULT_OPTIONS)) throw new Error(`No option with key "${e}"`);
                  i = this._sanitizeAndValidateOption(e, i), this.rawOptions[e] !== i && (this.rawOptions[e] = i, this._onOptionChange.fire(e));
                };
              for (const t in this.rawOptions) {
                const s = {
                  get: e.bind(this, t),
                  set: i.bind(this, t)
                };
                Object.defineProperty(this.options, t, s);
              }
            }
            _sanitizeAndValidateOption(e, i) {
              switch (e) {
                case "cursorStyle":
                  if (i || (i = t.DEFAULT_OPTIONS[e]), !function (e) {
                    return "block" === e || "underline" === e || "bar" === e;
                  }(i)) throw new Error(`"${i}" is not a valid value for ${e}`);
                  break;
                case "wordSeparator":
                  i || (i = t.DEFAULT_OPTIONS[e]);
                  break;
                case "fontWeight":
                case "fontWeightBold":
                  if ("number" == typeof i && 1 <= i && i <= 1e3) break;
                  i = o.includes(i) ? i : t.DEFAULT_OPTIONS[e];
                  break;
                case "cursorWidth":
                  i = Math.floor(i);
                case "lineHeight":
                case "tabStopWidth":
                  if (i < 1) throw new Error(`${e} cannot be less than 1, value: ${i}`);
                  break;
                case "minimumContrastRatio":
                  i = Math.max(1, Math.min(21, Math.round(10 * i) / 10));
                  break;
                case "scrollback":
                  if ((i = Math.min(i, 4294967295)) < 0) throw new Error(`${e} cannot be less than 0, value: ${i}`);
                  break;
                case "fastScrollSensitivity":
                case "scrollSensitivity":
                  if (i <= 0) throw new Error(`${e} cannot be less than or equal to 0, value: ${i}`);
                case "rows":
                case "cols":
                  if (!i && 0 !== i) throw new Error(`${e} must be numeric, value: ${i}`);
              }
              return i;
            }
          }
          t.OptionsService = a;
        },
        2660: function (e, t, i) {
          var s = this && this.__decorate || function (e, t, i, s) {
              var r,
                n = arguments.length,
                o = n < 3 ? t : null === s ? s = Object.getOwnPropertyDescriptor(t, i) : s;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, i, s);else for (var a = e.length - 1; a >= 0; a--) (r = e[a]) && (o = (n < 3 ? r(o) : n > 3 ? r(t, i, o) : r(t, i)) || o);
              return n > 3 && o && Object.defineProperty(t, i, o), o;
            },
            r = this && this.__param || function (e, t) {
              return function (i, s) {
                t(i, s, e);
              };
            };
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.OscLinkService = void 0;
          const n = i(2585);
          let o = class {
            constructor(e) {
              this._bufferService = e, this._nextId = 1, this._entriesWithId = new Map(), this._dataByLinkId = new Map();
            }
            registerLink(e) {
              const t = this._bufferService.buffer;
              if (void 0 === e.id) {
                const i = t.addMarker(t.ybase + t.y),
                  s = {
                    data: e,
                    id: this._nextId++,
                    lines: [i]
                  };
                return i.onDispose(() => this._removeMarkerFromLink(s, i)), this._dataByLinkId.set(s.id, s), s.id;
              }
              const i = e,
                s = this._getEntryIdKey(i),
                r = this._entriesWithId.get(s);
              if (r) return this.addLineToLink(r.id, t.ybase + t.y), r.id;
              const n = t.addMarker(t.ybase + t.y),
                o = {
                  id: this._nextId++,
                  key: this._getEntryIdKey(i),
                  data: i,
                  lines: [n]
                };
              return n.onDispose(() => this._removeMarkerFromLink(o, n)), this._entriesWithId.set(o.key, o), this._dataByLinkId.set(o.id, o), o.id;
            }
            addLineToLink(e, t) {
              const i = this._dataByLinkId.get(e);
              if (i && i.lines.every(e => e.line !== t)) {
                const e = this._bufferService.buffer.addMarker(t);
                i.lines.push(e), e.onDispose(() => this._removeMarkerFromLink(i, e));
              }
            }
            getLinkData(e) {
              var t;
              return null === (t = this._dataByLinkId.get(e)) || void 0 === t ? void 0 : t.data;
            }
            _getEntryIdKey(e) {
              return `${e.id};;${e.uri}`;
            }
            _removeMarkerFromLink(e, t) {
              const i = e.lines.indexOf(t);
              -1 !== i && (e.lines.splice(i, 1), 0 === e.lines.length && (void 0 !== e.data.id && this._entriesWithId.delete(e.key), this._dataByLinkId.delete(e.id)));
            }
          };
          o = s([r(0, n.IBufferService)], o), t.OscLinkService = o;
        },
        8343: (e, t) => {
          function i(e, t, i) {
            t.di$target === t ? t.di$dependencies.push({
              id: e,
              index: i
            }) : (t.di$dependencies = [{
              id: e,
              index: i
            }], t.di$target = t);
          }
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.createDecorator = t.getServiceDependencies = t.serviceRegistry = void 0, t.serviceRegistry = new Map(), t.getServiceDependencies = function (e) {
            return e.di$dependencies || [];
          }, t.createDecorator = function (e) {
            if (t.serviceRegistry.has(e)) return t.serviceRegistry.get(e);
            const s = function (e, t, r) {
              if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
              i(s, e, r);
            };
            return s.toString = () => e, t.serviceRegistry.set(e, s), s;
          };
        },
        2585: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.IDecorationService = t.IUnicodeService = t.IOscLinkService = t.IOptionsService = t.ILogService = t.LogLevelEnum = t.IInstantiationService = t.ICharsetService = t.ICoreService = t.ICoreMouseService = t.IBufferService = void 0;
          const s = i(8343);
          var r;
          t.IBufferService = (0, s.createDecorator)("BufferService"), t.ICoreMouseService = (0, s.createDecorator)("CoreMouseService"), t.ICoreService = (0, s.createDecorator)("CoreService"), t.ICharsetService = (0, s.createDecorator)("CharsetService"), t.IInstantiationService = (0, s.createDecorator)("InstantiationService"), (r = t.LogLevelEnum || (t.LogLevelEnum = {}))[r.DEBUG = 0] = "DEBUG", r[r.INFO = 1] = "INFO", r[r.WARN = 2] = "WARN", r[r.ERROR = 3] = "ERROR", r[r.OFF = 4] = "OFF", t.ILogService = (0, s.createDecorator)("LogService"), t.IOptionsService = (0, s.createDecorator)("OptionsService"), t.IOscLinkService = (0, s.createDecorator)("OscLinkService"), t.IUnicodeService = (0, s.createDecorator)("UnicodeService"), t.IDecorationService = (0, s.createDecorator)("DecorationService");
        },
        1480: (e, t, i) => {
          Object.defineProperty(t, "__esModule", {
            value: !0
          }), t.UnicodeService = void 0;
          const s = i(8460),
            r = i(225);
          t.UnicodeService = class {
            constructor() {
              this._providers = Object.create(null), this._active = "", this._onChange = new s.EventEmitter(), this.onChange = this._onChange.event;
              const e = new r.UnicodeV6();
              this.register(e), this._active = e.version, this._activeProvider = e;
            }
            dispose() {
              this._onChange.dispose();
            }
            get versions() {
              return Object.keys(this._providers);
            }
            get activeVersion() {
              return this._active;
            }
            set activeVersion(e) {
              if (!this._providers[e]) throw new Error(`unknown Unicode version "${e}"`);
              this._active = e, this._activeProvider = this._providers[e], this._onChange.fire(e);
            }
            register(e) {
              this._providers[e.version] = e;
            }
            wcwidth(e) {
              return this._activeProvider.wcwidth(e);
            }
            getStringCellWidth(e) {
              let t = 0;
              const i = e.length;
              for (let s = 0; s < i; ++s) {
                let r = e.charCodeAt(s);
                if (55296 <= r && r <= 56319) {
                  if (++s >= i) return t + this.wcwidth(r);
                  const n = e.charCodeAt(s);
                  56320 <= n && n <= 57343 ? r = 1024 * (r - 55296) + n - 56320 + 65536 : t += this.wcwidth(n);
                }
                t += this.wcwidth(r);
              }
              return t;
            }
          };
        }
      },
      t = {};
    function i(s) {
      var r = t[s];
      if (void 0 !== r) return r.exports;
      var n = t[s] = {
        exports: {}
      };
      return e[s].call(n.exports, n, n.exports, i), n.exports;
    }
    var s = {};
    return (() => {
      var e = s;
      Object.defineProperty(e, "__esModule", {
        value: !0
      }), e.Terminal = void 0;
      const t = i(3236),
        r = i(9042),
        n = i(7975),
        o = i(7090),
        a = i(5741),
        h = i(8285),
        c = ["cols", "rows"];
      e.Terminal = class {
        constructor(e) {
          this._core = new t.Terminal(e), this._addonManager = new a.AddonManager(), this._publicOptions = Object.assign({}, this._core.options);
          const i = e => this._core.options[e],
            s = (e, t) => {
              this._checkReadonlyOptions(e), this._core.options[e] = t;
            };
          for (const e in this._core.options) {
            const t = {
              get: i.bind(this, e),
              set: s.bind(this, e)
            };
            Object.defineProperty(this._publicOptions, e, t);
          }
        }
        _checkReadonlyOptions(e) {
          if (c.includes(e)) throw new Error(`Option "${e}" can only be set in the constructor`);
        }
        _checkProposedApi() {
          if (!this._core.optionsService.rawOptions.allowProposedApi) throw new Error("You must set the allowProposedApi option to true to use proposed API");
        }
        get onBell() {
          return this._core.onBell;
        }
        get onBinary() {
          return this._core.onBinary;
        }
        get onCursorMove() {
          return this._core.onCursorMove;
        }
        get onData() {
          return this._core.onData;
        }
        get onKey() {
          return this._core.onKey;
        }
        get onLineFeed() {
          return this._core.onLineFeed;
        }
        get onRender() {
          return this._core.onRender;
        }
        get onResize() {
          return this._core.onResize;
        }
        get onScroll() {
          return this._core.onScroll;
        }
        get onSelectionChange() {
          return this._core.onSelectionChange;
        }
        get onTitleChange() {
          return this._core.onTitleChange;
        }
        get onWriteParsed() {
          return this._core.onWriteParsed;
        }
        get element() {
          return this._core.element;
        }
        get parser() {
          return this._parser || (this._parser = new n.ParserApi(this._core)), this._parser;
        }
        get unicode() {
          return this._checkProposedApi(), new o.UnicodeApi(this._core);
        }
        get textarea() {
          return this._core.textarea;
        }
        get rows() {
          return this._core.rows;
        }
        get cols() {
          return this._core.cols;
        }
        get buffer() {
          return this._buffer || (this._buffer = new h.BufferNamespaceApi(this._core)), this._buffer;
        }
        get markers() {
          return this._checkProposedApi(), this._core.markers;
        }
        get modes() {
          const e = this._core.coreService.decPrivateModes;
          let t = "none";
          switch (this._core.coreMouseService.activeProtocol) {
            case "X10":
              t = "x10";
              break;
            case "VT200":
              t = "vt200";
              break;
            case "DRAG":
              t = "drag";
              break;
            case "ANY":
              t = "any";
          }
          return {
            applicationCursorKeysMode: e.applicationCursorKeys,
            applicationKeypadMode: e.applicationKeypad,
            bracketedPasteMode: e.bracketedPasteMode,
            insertMode: this._core.coreService.modes.insertMode,
            mouseTrackingMode: t,
            originMode: e.origin,
            reverseWraparoundMode: e.reverseWraparound,
            sendFocusMode: e.sendFocus,
            wraparoundMode: e.wraparound
          };
        }
        get options() {
          return this._publicOptions;
        }
        set options(e) {
          for (const t in e) this._publicOptions[t] = e[t];
        }
        blur() {
          this._core.blur();
        }
        focus() {
          this._core.focus();
        }
        resize(e, t) {
          this._verifyIntegers(e, t), this._core.resize(e, t);
        }
        open(e) {
          this._core.open(e);
        }
        attachCustomKeyEventHandler(e) {
          this._core.attachCustomKeyEventHandler(e);
        }
        registerLinkProvider(e) {
          return this._core.registerLinkProvider(e);
        }
        registerCharacterJoiner(e) {
          return this._checkProposedApi(), this._core.registerCharacterJoiner(e);
        }
        deregisterCharacterJoiner(e) {
          this._checkProposedApi(), this._core.deregisterCharacterJoiner(e);
        }
        registerMarker(e = 0) {
          return this._verifyIntegers(e), this._core.addMarker(e);
        }
        registerDecoration(e) {
          var t, i, s;
          return this._checkProposedApi(), this._verifyPositiveIntegers(null !== (t = e.x) && void 0 !== t ? t : 0, null !== (i = e.width) && void 0 !== i ? i : 0, null !== (s = e.height) && void 0 !== s ? s : 0), this._core.registerDecoration(e);
        }
        hasSelection() {
          return this._core.hasSelection();
        }
        select(e, t, i) {
          this._verifyIntegers(e, t, i), this._core.select(e, t, i);
        }
        getSelection() {
          return this._core.getSelection();
        }
        getSelectionPosition() {
          return this._core.getSelectionPosition();
        }
        clearSelection() {
          this._core.clearSelection();
        }
        selectAll() {
          this._core.selectAll();
        }
        selectLines(e, t) {
          this._verifyIntegers(e, t), this._core.selectLines(e, t);
        }
        dispose() {
          this._addonManager.dispose(), this._core.dispose();
        }
        scrollLines(e) {
          this._verifyIntegers(e), this._core.scrollLines(e);
        }
        scrollPages(e) {
          this._verifyIntegers(e), this._core.scrollPages(e);
        }
        scrollToTop() {
          this._core.scrollToTop();
        }
        scrollToBottom() {
          this._core.scrollToBottom();
        }
        scrollToLine(e) {
          this._verifyIntegers(e), this._core.scrollToLine(e);
        }
        clear() {
          this._core.clear();
        }
        write(e, t) {
          this._core.write(e, t);
        }
        writeln(e, t) {
          this._core.write(e), this._core.write("\r\n", t);
        }
        paste(e) {
          this._core.paste(e);
        }
        refresh(e, t) {
          this._verifyIntegers(e, t), this._core.refresh(e, t);
        }
        reset() {
          this._core.reset();
        }
        clearTextureAtlas() {
          this._core.clearTextureAtlas();
        }
        loadAddon(e) {
          return this._addonManager.loadAddon(this, e);
        }
        static get strings() {
          return r;
        }
        _verifyIntegers(...e) {
          for (const t of e) if (t === 1 / 0 || isNaN(t) || t % 1 != 0) throw new Error("This API only accepts integers");
        }
        _verifyPositiveIntegers(...e) {
          for (const t of e) if (t && (t === 1 / 0 || isNaN(t) || t % 1 != 0 || t < 0)) throw new Error("This API only accepts positive integers");
        }
      };
    })(), s;
  })();
});

/***/ }),

/***/ 2486:
/*!*****************************************!*\
  !*** ./node_modules/zmodem.js/index.js ***!
  \*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


Object.assign(module.exports, __webpack_require__(/*! ./src/zsentry */ 5712));

/***/ }),

/***/ 6041:
/*!**********************************************!*\
  !*** ./node_modules/zmodem.js/src/encode.js ***!
  \**********************************************/
/***/ ((module) => {

"use strict";


var Zmodem = module.exports;
const HEX_DIGITS = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102];
const HEX_OCTET_VALUE = {};
for (var hd = 0; hd < HEX_DIGITS.length; hd++) {
  HEX_OCTET_VALUE[HEX_DIGITS[hd]] = hd;
}

/**
 * General, non-ZMODEM-specific encoding logic.
 *
 * @exports ENCODELIB
 */
Zmodem.ENCODELIB = {
  /**
   * Return an array with the given number as 2 big-endian bytes.
   *
   * @param {number} number - The number to encode.
   *
   * @returns {number[]} The octet values.
   */
  pack_u16_be: function pack_u16_be(number) {
    if (number > 0xffff) throw "Number cannot exceed 16 bits: " + number;
    return [number >> 8, number & 0xff];
  },
  /**
   * Return an array with the given number as 4 little-endian bytes.
   *
   * @param {number} number - The number to encode.
   *
   * @returns {number[]} The octet values.
   */
  pack_u32_le: function pack_u32_le(number) {
    //Can’t bit-shift because that runs into JS’s bit-shift problem.
    //(See _updcrc32() for an example.)
    var high_bytes = number / 65536; //fraction is ok

    //a little-endian 4-byte sequence
    return [number & 0xff, (number & 65535) >> 8, high_bytes & 0xff, high_bytes >> 8];
  },
  /**
   * The inverse of pack_u16_be() - i.e., take in 2 octet values
   * and parse them as an unsigned, 2-byte big-endian number.
   *
   * @param {number[]} octets - The octet values (2 of them).
   *
   * @returns {number} The decoded number.
   */
  unpack_u16_be: function unpack_u16_be(bytes_arr) {
    return (bytes_arr[0] << 8) + bytes_arr[1];
  },
  /**
   * The inverse of pack_u32_le() - i.e., take in a 4-byte sequence
   * and parse it as an unsigned, 4-byte little-endian number.
   *
   * @param {number[]} octets - The octet values (4 of them).
   *
   * @returns {number} The decoded number.
   */
  unpack_u32_le: function unpack_u32_le(octets) {
    //<sigh> … (254 << 24 is -33554432, according to JavaScript)
    return octets[0] + (octets[1] << 8) + (octets[2] << 16) + octets[3] * 16777216;
  },
  /**
   * Encode a series of octet values to be the octet values that
   * correspond to the ASCII hex characters for each octet. The
   * returned array is suitable for use as binary data.
   *
   * For example:
   *
   *      Original    Hex     Returned
   *      254         fe      102, 101
   *       12         0c      48, 99
   *      129         81      56, 49
   *
   * @param {number[]} octets - The original octet values.
   *
   * @returns {number[]} The octet values that correspond to an ASCII
   *  representation of the given octets.
   */
  octets_to_hex: function octets_to_hex(octets) {
    var hex = [];
    for (var o = 0; o < octets.length; o++) {
      hex.push(HEX_DIGITS[octets[o] >> 4], HEX_DIGITS[octets[o] & 0x0f]);
    }
    return hex;
  },
  /**
   * The inverse of octets_to_hex(): takes an array
   * of hex octet pairs and returns their octet values.
   *
   * @param {number[]} hex_octets - The hex octet values.
   *
   * @returns {number[]} The parsed octet values.
   */
  parse_hex_octets: function parse_hex_octets(hex_octets) {
    var octets = new Array(hex_octets.length / 2);
    for (var i = 0; i < octets.length; i++) {
      octets[i] = (HEX_OCTET_VALUE[hex_octets[2 * i]] << 4) + HEX_OCTET_VALUE[hex_octets[1 + 2 * i]];
    }
    return octets;
  }
};

/***/ }),

/***/ 9117:
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/text.js ***!
  \********************************************/
/***/ ((module) => {

class _my_TextEncoder {
  encode(text) {
    text = unescape(encodeURIComponent(text));
    var bytes = new Array(text.length);
    for (var b = 0; b < text.length; b++) {
      bytes[b] = text.charCodeAt(b);
    }
    return new Uint8Array(bytes);
  }
}
class _my_TextDecoder {
  decode(bytes) {
    return decodeURIComponent(escape(String.fromCharCode.apply(String, bytes)));
  }
}
var Zmodem = module.exports;

/**
 * A limited-use compatibility shim for TextEncoder and TextDecoder.
 * Useful because both Edge and node.js still lack support for these
 * as of October 2017.
 *
 * @exports Text
 */
Zmodem.Text = {
  Encoder: typeof TextEncoder !== "undefined" ? TextEncoder : _my_TextEncoder,
  Decoder: typeof TextDecoder !== "undefined" ? TextDecoder : _my_TextDecoder
};

/***/ }),

/***/ 7009:
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/zcrc.js ***!
  \********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


const CRC32_MOD = __webpack_require__(/*! crc-32 */ 5143);
var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zerror */ 6273), __webpack_require__(/*! ./encode */ 6041));

//----------------------------------------------------------------------
// BEGIN adapted from crc-js by Johannes Rudolph

var _crctab;
const crc_width = 16,
  crc_polynomial = 0x1021,
  crc_castmask = 0xffff,
  crc_msbmask = 1 << crc_width - 1;
function _compute_crctab() {
  _crctab = new Array(256);
  var divident_shift = crc_width - 8;
  for (var divident = 0; divident < 256; divident++) {
    var currByte = divident << divident_shift & crc_castmask;
    for (var bit = 0; bit < 8; bit++) {
      if ((currByte & crc_msbmask) !== 0) {
        currByte <<= 1;
        currByte ^= crc_polynomial;
      } else {
        currByte <<= 1;
      }
    }
    _crctab[divident] = currByte & crc_castmask;
  }
}

// END adapted from crc-js by Johannes Rudolph
//----------------------------------------------------------------------

function _updcrc(cp, crc) {
  if (!_crctab) _compute_crctab();
  return _crctab[crc >> 8 & 255] ^ (255 & crc) << 8 ^ cp;
}
function __verify(expect, got) {
  var err;
  if (expect.join() !== got.join()) {
    throw new Zmodem.Error("crc", got, expect);
  }
}

//TODO: use external implementation(s)
Zmodem.CRC = {
  //https://www.lammertbies.nl/comm/info/crc-calculation.html
  //CRC-CCITT (XModem)

  /**
   * Deduce a given set of octet values’ CRC16, as per the CRC16
   * variant that ZMODEM uses (CRC-CCITT/XModem).
   *
   * @param {Array} octets - The array of octet values.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @returns {Array} crc - The CRC, expressed as an array of octet values.
   */
  crc16: function crc16(octet_nums) {
    var crc = octet_nums[0];
    for (var b = 1; b < octet_nums.length; b++) {
      crc = _updcrc(octet_nums[b], crc);
    }
    crc = _updcrc(0, _updcrc(0, crc));

    //a big-endian 2-byte sequence
    return Zmodem.ENCODELIB.pack_u16_be(crc);
  },
  /**
   * Deduce a given set of octet values’ CRC32.
   *
   * @param {Array} octets - The array of octet values.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @returns {Array} crc - The CRC, expressed as an array of octet values.
   */
  crc32: function crc32(octet_nums) {
    return Zmodem.ENCODELIB.pack_u32_le(CRC32_MOD.buf(octet_nums) >>> 0 //bit-shift to get unsigned
    );
  },

  /**
   * Verify a given set of octet values’ CRC16.
   * An exception is thrown on failure.
   *
   * @param {Array} bytes_arr - The array of octet values.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @param {Array} crc - The CRC to check against, expressed as
   *      an array of octet values.
   */
  verify16: function verify16(bytes_arr, got) {
    return __verify(this.crc16(bytes_arr), got);
  },
  /**
   * Verify a given set of octet values’ CRC32.
   * An exception is thrown on failure.
   *
   * @param {Array} bytes_arr - The array of octet values.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @param {Array} crc - The CRC to check against, expressed as
   *      an array of octet values.
   */
  verify32: function verify32(bytes_arr, crc) {
    try {
      __verify(this.crc32(bytes_arr), crc);
    } catch (err) {
      err.input = bytes_arr.slice(0);
      throw err;
    }
  }
};

/***/ }),

/***/ 1841:
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/zdle.js ***!
  \********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zmlib */ 250));

//encode() variables - declare them here so we don’t
//create them in the function.
var encode_cur, encode_todo;
const ZDLE = Zmodem.ZMLIB.ZDLE;

/**
 * Class that handles ZDLE encoding and decoding.
 * Encoding is subject to a given configuration--specifically, whether
 * we want to escape all control characters. Decoding is static; however
 * a given string is encoded we can always decode it.
 */
Zmodem.ZDLE = class ZmodemZDLE {
  /**
   * Create a ZDLE encoder.
   *
   * @param {object} [config] - The initial configuration.
   * @param {object} config.escape_ctrl_chars - Whether the ZDLE encoder
   *  should escape control characters.
   */
  constructor(config) {
    this._config = {};
    if (config) {
      this.set_escape_ctrl_chars(!!config.escape_ctrl_chars);
    }
  }

  /**
   * Enable or disable control-character escaping.
   * You should probably enable this for sender sessions.
   *
   * @param {boolean} value - Whether to enable (true) or disable (false).
   */
  set_escape_ctrl_chars(value) {
    if (typeof value !== "boolean") throw "need boolean!";
    if (value !== this._config.escape_ctrl_chars) {
      this._config.escape_ctrl_chars = value;
      this._setup_zdle_table();
    }
  }

  /**
   * Whether or not control-character escaping is enabled.
   *
   * @return {boolean} Whether the escaping is on (true) or off (false).
   */
  escapes_ctrl_chars() {
    return !!this._config.escape_ctrl_chars;
  }

  //I don’t know of any Zmodem implementations that use ZESC8
  //(“escape_8th_bit”)??

  /*
  ZMODEM software escapes ZDLE, 020, 0220, 021, 0221, 023, and 0223.  If
  preceded by 0100 or 0300 (@), 015 and 0215 are also escaped to protect the
  Telenet command escape CR-@-CR.
  */

  /**
   * Encode an array of octet values and return it.
   * This will mutate the given array.
   *
   * @param {number[]} octets - The octet values to transform.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {number[]} The passed-in array, transformed. This is the
   *  same object that is passed in.
   */
  encode(octets) {
    //NB: Performance matters here!

    if (!this._zdle_table) throw "No ZDLE encode table configured!";
    var zdle_table = this._zdle_table;
    var last_code = this._lastcode;
    var arrbuf = new ArrayBuffer(2 * octets.length);
    var arrbuf_uint8 = new Uint8Array(arrbuf);
    var escctl_yn = this._config.escape_ctrl_chars;
    var arrbuf_i = 0;
    for (encode_cur = 0; encode_cur < octets.length; encode_cur++) {
      encode_todo = zdle_table[octets[encode_cur]];
      if (!encode_todo) {
        console.trace();
        console.error("bad encode() call:", JSON.stringify(octets));
        this._lastcode = last_code;
        throw "Invalid octet: " + octets[encode_cur];
      }
      last_code = octets[encode_cur];
      if (encode_todo === 1) {
        //Do nothing; we append last_code below.
      }

      //0x40 = '@'; i.e., only escape if the last
      //octet was '@'.
      else if (escctl_yn || encode_todo === 2 || (last_code & 0x7f) === 0x40) {
        arrbuf_uint8[arrbuf_i] = ZDLE;
        arrbuf_i++;
        last_code ^= 0x40; //0100
      }

      arrbuf_uint8[arrbuf_i] = last_code;
      arrbuf_i++;
    }
    this._lastcode = last_code;
    octets.splice(0);
    octets.push.apply(octets, new Uint8Array(arrbuf, 0, arrbuf_i));
    return octets;
  }

  /**
   * Decode an array of octet values and return it.
   * This will mutate the given array.
   *
   * @param {number[]} octets - The octet values to transform.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {number[]} The passed-in array.
   *  This is the same object that is passed in.
   */
  static decode(octets) {
    for (var o = octets.length - 1; o >= 0; o--) {
      if (octets[o] === ZDLE) {
        octets.splice(o, 2, octets[o + 1] - 64);
      }
    }
    return octets;
  }

  /**
   * Remove, ZDLE-decode, and return bytes from the passed-in array.
   * If the requested number of ZDLE-encoded bytes isn’t available,
   * then the passed-in array is unmodified (and the return is undefined).
   *
   * @param {number[]} octets - The octet values to transform.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @param {number} offset - The number of (undecoded) bytes to skip
   *      at the beginning of the “octets” array.
   *
   * @param {number} count - The number of bytes (octet values) to return.
   *
   * @returns {number[]|undefined} An array with the requested number of
   *      decoded octet values, or undefined if that number of decoded
   *      octets isn’t available (given the passed-in offset).
   */
  static splice(octets, offset, count) {
    var so_far = 0;
    if (!offset) offset = 0;
    for (var i = offset; i < octets.length && so_far < count; i++) {
      so_far++;
      if (octets[i] === ZDLE) i++;
    }
    if (so_far === count) {
      //Don’t accept trailing ZDLE. This check works
      //because of the i++ logic above.
      if (octets.length === i - 1) return;
      octets.splice(0, offset);
      return ZmodemZDLE.decode(octets.splice(0, i - offset));
    }
    return;
  }
  _setup_zdle_table() {
    var zsendline_tab = new Array(256);
    for (var i = 0; i < zsendline_tab.length; i++) {
      //1 = never escape
      //2 = always escape
      //3 = escape only if the previous byte was '@'

      //Never escape characters from 0x20 (32) to 0x7f (127).
      //This is the range of printable characters, plus DEL.
      //I guess ZMODEM doesn’t consider DEL to be a control character?
      if (i & 0x60) {
        zsendline_tab[i] = 1;
      } else {
        switch (i) {
          case ZDLE: //NB: no (ZDLE | 0x80)
          case Zmodem.ZMLIB.XOFF:
          case Zmodem.ZMLIB.XON:
          case Zmodem.ZMLIB.XOFF | 0x80:
          case Zmodem.ZMLIB.XON | 0x80:
            zsendline_tab[i] = 2;
            break;
          case 0x10: // 020
          case 0x90:
            // 0220
            zsendline_tab[i] = this._config.turbo_escape ? 1 : 2;
            break;
          case 0x0d: // 015
          case 0x8d:
            // 0215
            zsendline_tab[i] = this._config.escape_ctrl_chars ? 2 : !this._config.turbo_escape ? 3 : 1;
            break;
          default:
            zsendline_tab[i] = this._config.escape_ctrl_chars ? 2 : 1;
        }
      }
    }
    this._zdle_table = zsendline_tab;
  }
};

/***/ }),

/***/ 6273:
/*!**********************************************!*\
  !*** ./node_modules/zmodem.js/src/zerror.js ***!
  \**********************************************/
/***/ ((module) => {

"use strict";


var Zmodem = module.exports;
function _crc_message(got, expected) {
  this.got = got.slice(0);
  this.expected = expected.slice(0);
  return "CRC check failed! (got: " + got.join() + "; expected: " + expected.join() + ")";
}
function _pass(val) {
  return val;
}
const TYPE_MESSAGE = {
  aborted: "Session aborted",
  peer_aborted: "Peer aborted session",
  already_aborted: "Session already aborted",
  crc: _crc_message,
  validation: _pass
};
function _generate_message(type) {
  const msg = TYPE_MESSAGE[type];
  switch (typeof msg) {
    case "string":
      return msg;
    case "function":
      var args_after_type = [].slice.call(arguments).slice(1);
      return msg.apply(this, args_after_type);
  }
  return null;
}
Zmodem.Error = class ZmodemError extends Error {
  constructor(msg_or_type) {
    super();
    var generated = _generate_message.apply(this, arguments);
    if (generated) {
      this.type = msg_or_type;
      this.message = generated;
    } else {
      this.message = msg_or_type;
    }
  }
};

/***/ }),

/***/ 5851:
/*!***********************************************!*\
  !*** ./node_modules/zmodem.js/src/zheader.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./encode */ 6041), __webpack_require__(/*! ./zdle */ 1841), __webpack_require__(/*! ./zmlib */ 250), __webpack_require__(/*! ./zcrc */ 7009), __webpack_require__(/*! ./zerror */ 6273));
const ZPAD = '*'.charCodeAt(0),
  ZBIN = 'A'.charCodeAt(0),
  ZHEX = 'B'.charCodeAt(0),
  ZBIN32 = 'C'.charCodeAt(0);

//NB: lrzsz uses \x8a rather than \x0a where the specs
//say to use LF. For simplicity, we avoid that and just use
//the 7-bit LF character.
const HEX_HEADER_CRLF = [0x0d, 0x0a];
const HEX_HEADER_CRLF_XON = HEX_HEADER_CRLF.slice(0).concat([Zmodem.ZMLIB.XON]);

//These are more or less duplicated by the logic in trim_leading_garbage().
//
//"**" + ZDLE_CHAR + "B"
const HEX_HEADER_PREFIX = [ZPAD, ZPAD, Zmodem.ZMLIB.ZDLE, ZHEX];
const BINARY16_HEADER_PREFIX = [ZPAD, Zmodem.ZMLIB.ZDLE, ZBIN];
const BINARY32_HEADER_PREFIX = [ZPAD, Zmodem.ZMLIB.ZDLE, ZBIN32];

/** Class that represents a ZMODEM header. */
Zmodem.Header = class ZmodemHeader {
  //lrzsz’s “sz” command sends a random (?) CR/0x0d byte
  //after ZEOF. Let’s accommodate 0x0a, 0x0d, 0x8a, and 0x8d.
  //
  //Also, when you skip a file, sz outputs a message about it.
  //
  //It appears that we’re supposed to ignore anything until
  //[ ZPAD, ZDLE ] when we’re looking for a header.

  /**
   * Weed out the leading bytes that aren’t valid to start a ZMODEM header.
   *
   * @param {number[]} ibuffer - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {number[]} The octet values that were removed from the start
   *      of “ibuffer”. Order is preserved.
   */
  static trim_leading_garbage(ibuffer) {
    //Since there’s no escaping of the output it’s possible
    //that the garbage could trip us up, e.g., by having a filename
    //be a legit ZMODEM header. But that’s pretty unlikely.

    //Everything up to the first ZPAD: garbage
    //If first ZPAD has asterisk + ZDLE

    var garbage = [];
    var discard_all,
      parser,
      next_ZPAD_at_least = 0;
    TRIM_LOOP: while (ibuffer.length && !parser) {
      var first_ZPAD = ibuffer.indexOf(ZPAD);

      //No ZPAD? Then we purge the input buffer cuz it’s all garbage.
      if (first_ZPAD === -1) {
        discard_all = true;
        break TRIM_LOOP;
      } else {
        garbage.push.apply(garbage, ibuffer.splice(0, first_ZPAD));

        //buffer has only an asterisk … gotta see about more
        if (ibuffer.length < 2) {
          break TRIM_LOOP;
        } else if (ibuffer[1] === ZPAD) {
          //Two leading ZPADs should be a hex header.

          //We’re assuming the length of the header is 4 in
          //this logic … but ZMODEM isn’t likely to change, so.
          if (ibuffer.length < HEX_HEADER_PREFIX.length) {
            if (ibuffer.join() === HEX_HEADER_PREFIX.slice(0, ibuffer.length).join()) {
              //We have an incomplete fragment that matches
              //HEX_HEADER_PREFIX. So don’t trim any more.
              break TRIM_LOOP;
            }

            //Otherwise, we’ll discard one.
          } else if (ibuffer[2] === HEX_HEADER_PREFIX[2] && ibuffer[3] === HEX_HEADER_PREFIX[3]) {
            parser = _parse_hex;
          }
        } else if (ibuffer[1] === Zmodem.ZMLIB.ZDLE) {
          //ZPAD + ZDLE should be a binary header.
          if (ibuffer.length < BINARY16_HEADER_PREFIX.length) {
            break TRIM_LOOP;
          }
          if (ibuffer[2] === BINARY16_HEADER_PREFIX[2]) {
            parser = _parse_binary16;
          } else if (ibuffer[2] === BINARY32_HEADER_PREFIX[2]) {
            parser = _parse_binary32;
          }
        }
        if (!parser) {
          garbage.push(ibuffer.shift());
        }
      }
    }
    if (discard_all) {
      garbage.push.apply(garbage, ibuffer.splice(0));
    }

    //For now we’ll throw away the parser.
    //It’s not hard for parse() to discern anyway.

    return garbage;
  }

  /**
   * Parse out a Header object from a given array of octet values.
   *
   * An exception is thrown if the given bytes are definitively invalid
   * as header values.
   *
   * @param {number[]} octets - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {Header|undefined} An instance of the appropriate Header
   *      subclass, or undefined if not enough octet values are given
   *      to determine whether there is a valid header here or not.
   */
  static parse(octets) {
    var hdr;
    if (octets[1] === ZPAD) {
      hdr = _parse_hex(octets);
      return hdr && [hdr, 16];
    } else if (octets[2] === ZBIN) {
      hdr = _parse_binary16(octets, 3);
      return hdr && [hdr, 16];
    } else if (octets[2] === ZBIN32) {
      hdr = _parse_binary32(octets);
      return hdr && [hdr, 32];
    }
    if (octets.length < 3) return;
    throw "Unrecognized/unsupported octets: " + octets.join();
  }

  /**
   * Build a Header subclass given a name and arguments.
   *
   * @param {string} name - The header type name, e.g., “ZRINIT”.
   *
   * @param {...*} args - The arguments to pass to the appropriate
   *      subclass constructor. These aren’t documented currently
   *      but are pretty easy to glean from the code.
   *
   * @returns {Header} An instance of the appropriate Header subclass.
   */
  static build(name /*, args */) {
    var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);

    //TODO: make this better
    var Ctr = FRAME_NAME_CREATOR[name];
    if (!Ctr) throw "No frame class “" + name + "” is defined!";
    args.shift();

    //Plegh!
    //https://stackoverflow.com/questions/33193310/constr-applythis-args-in-es6-classes
    var hdr = new (Ctr.bind.apply(Ctr, [null].concat(args)))();
    return hdr;
  }

  /**
   * Return the octet values array that represents the object
   * in ZMODEM hex encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  to_hex() {
    var to_crc = this._crc_bytes();
    return HEX_HEADER_PREFIX.concat(Zmodem.ENCODELIB.octets_to_hex(to_crc.concat(Zmodem.CRC.crc16(to_crc))), this._hex_header_ending);
  }

  /**
   * Return the octet values array that represents the object
   * in ZMODEM binary encoding with a 16-bit CRC.
   *
   * @param {ZDLE} zencoder - A ZDLE instance to use for
   *      ZDLE encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  to_binary16(zencoder) {
    return this._to_binary(zencoder, BINARY16_HEADER_PREFIX, Zmodem.CRC.crc16);
  }

  /**
   * Return the octet values array that represents the object
   * in ZMODEM binary encoding with a 32-bit CRC.
   *
   * @param {ZDLE} zencoder - A ZDLE instance to use for
   *      ZDLE encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  to_binary32(zencoder) {
    return this._to_binary(zencoder, BINARY32_HEADER_PREFIX, Zmodem.CRC.crc32);
  }

  //This is never called directly, but only as super().
  constructor() {
    if (!this._bytes4) {
      this._bytes4 = [0, 0, 0, 0];
    }
  }
  _to_binary(zencoder, prefix, crc_func) {
    var to_crc = this._crc_bytes();

    //Both the 4-byte payload and the CRC bytes are ZDLE-encoded.
    var octets = prefix.concat(zencoder.encode(to_crc.concat(crc_func(to_crc))));
    return octets;
  }
  _crc_bytes() {
    return [this.TYPENUM].concat(this._bytes4);
  }
};
Zmodem.Header.prototype._hex_header_ending = HEX_HEADER_CRLF_XON;
class ZRQINIT_HEADER extends Zmodem.Header {}
;

//----------------------------------------------------------------------

const ZRINIT_FLAG = {
  //----------------------------------------------------------------------
  // Bit Masks for ZRINIT flags byte ZF0
  //----------------------------------------------------------------------
  CANFDX: 0x01,
  // Rx can send and receive true FDX
  CANOVIO: 0x02,
  // Rx can receive data during disk I/O
  CANBRK: 0x04,
  // Rx can send a break signal
  CANCRY: 0x08,
  // Receiver can decrypt -- nothing does this
  CANLZW: 0x10,
  // Receiver can uncompress -- nothing does this
  CANFC32: 0x20,
  // Receiver can use 32 bit Frame Check
  ESCCTL: 0x40,
  // Receiver expects ctl chars to be escaped
  ESC8: 0x80 // Receiver expects 8th bit to be escaped
};

function _get_ZRINIT_flag_num(fl) {
  if (!ZRINIT_FLAG[fl]) {
    throw new Zmodem.Error("Invalid ZRINIT flag: " + fl);
  }
  return ZRINIT_FLAG[fl];
}
class ZRINIT_HEADER extends Zmodem.Header {
  constructor(flags_arr, bufsize) {
    super();
    var flags_num = 0;
    if (!bufsize) bufsize = 0;
    flags_arr.forEach(function (fl) {
      flags_num |= _get_ZRINIT_flag_num(fl);
    });
    this._bytes4 = [bufsize & 0xff, bufsize >> 8, 0, flags_num];
  }

  //undefined if nonstop I/O is allowed
  get_buffer_size() {
    return Zmodem.ENCODELIB.unpack_u16_be(this._bytes4.slice(0, 2)) || undefined;
  }

  //Unimplemented:
  //  can_decrypt
  //  can_decompress

  //----------------------------------------------------------------------
  //function names taken from Jacques Mattheij’s implementation,
  //as used in syncterm.

  can_full_duplex() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.CANFDX);
  }
  can_overlap_io() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.CANOVIO);
  }
  can_break() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.CANBRK);
  }
  can_fcs_32() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.CANFC32);
  }
  escape_ctrl_chars() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.ESCCTL);
  }

  //Is this used? I don’t see it used in lrzsz or syncterm
  //Looks like it was a “foreseen” feature that Forsberg
  //never implemented. (The need for it went away, maybe?)
  escape_8th_bit() {
    return !!(this._bytes4[3] & ZRINIT_FLAG.ESC8);
  }
}
;

//----------------------------------------------------------------------

//Since context makes clear what’s going on, we use these
//rather than the T-prefixed constants in the specification.
const ZSINIT_FLAG = {
  ESCCTL: 0x40,
  // Transmitter will escape ctl chars
  ESC8: 0x80 // Transmitter will escape 8th bit
};

function _get_ZSINIT_flag_num(fl) {
  if (!ZSINIT_FLAG[fl]) {
    throw "Invalid ZSINIT flag: " + fl;
  }
  return ZSINIT_FLAG[fl];
}
class ZSINIT_HEADER extends Zmodem.Header {
  constructor(flags_arr, attn_seq_arr) {
    super();
    var flags_num = 0;
    flags_arr.forEach(function (fl) {
      flags_num |= _get_ZSINIT_flag_num(fl);
    });
    this._bytes4 = [0, 0, 0, flags_num];
    if (attn_seq_arr) {
      if (attn_seq_arr.length > 31) {
        throw "Attn sequence must be <= 31 bytes";
      }
      if (attn_seq_arr.some(function (num) {
        return num > 255;
      })) {
        throw "Attn sequence (" + attn_seq_arr + ") must be <256";
      }
      this._data = attn_seq_arr.concat([0]);
    }
  }
  escape_ctrl_chars() {
    return !!(this._bytes4[3] & ZSINIT_FLAG.ESCCTL);
  }

  //Is this used? I don’t see it used in lrzsz or syncterm
  escape_8th_bit() {
    return !!(this._bytes4[3] & ZSINIT_FLAG.ESC8);
  }
}

//Thus far it doesn’t seem we really need this header except to respond
//to ZSINIT, which doesn’t require a payload.
class ZACK_HEADER extends Zmodem.Header {
  constructor(payload4) {
    super();
    if (payload4) {
      this._bytes4 = payload4.slice();
    }
  }
}
ZACK_HEADER.prototype._hex_header_ending = HEX_HEADER_CRLF;

//----------------------------------------------------------------------

const ZFILE_VALUES = {
  //ZF3 (i.e., first byte)
  extended: {
    sparse: 0x40 //ZXSPARS
  },

  //ZF2
  transport: [undefined, "compress",
  //ZTLZW
  "encrypt",
  //ZTCRYPT
  "rle" //ZTRLE
  ],

  //ZF1
  management: [undefined, "newer_or_longer",
  //ZF1_ZMNEWL
  "crc",
  //ZF1_ZMCRC
  "append",
  //ZF1_ZMAPND
  "clobber",
  //ZF1_ZMCLOB
  "newer",
  //ZF1_ZMNEW
  "mtime_or_length",
  //ZF1_ZMNEW
  "protect",
  //ZF1_ZMPROT
  "rename" //ZF1_ZMPROT
  ],

  //ZF0 (i.e., last byte)
  conversion: [undefined, "binary",
  //ZCBIN
  "text",
  //ZCNL
  "resume" //ZCRESUM
  ]
};

const ZFILE_ORDER = ["extended", "transport", "management", "conversion"];
const ZMSKNOLOC = 0x80,
  MANAGEMENT_MASK = 0x1f,
  ZXSPARS = 0x40;
class ZFILE_HEADER extends Zmodem.Header {
  //TODO: allow options on instantiation
  get_options() {
    var opts = {
      sparse: !!(this._bytes4[0] & ZXSPARS)
    };
    var bytes_copy = this._bytes4.slice(0);
    ZFILE_ORDER.forEach(function (key, i) {
      if (ZFILE_VALUES[key] instanceof Array) {
        if (key === "management") {
          opts.skip_if_absent = !!(bytes_copy[i] & ZMSKNOLOC);
          bytes_copy[i] &= MANAGEMENT_MASK;
        }
        opts[key] = ZFILE_VALUES[key][bytes_copy[i]];
      } else {
        for (var extkey in ZFILE_VALUES[key]) {
          opts[extkey] = !!(bytes_copy[i] & ZFILE_VALUES[key][extkey]);
          if (opts[extkey]) {
            bytes_copy[i] ^= ZFILE_VALUES[key][extkey];
          }
        }
      }
      if (!opts[key] && bytes_copy[i]) {
        opts[key] = "unknown:" + bytes_copy[i];
      }
    });
    return opts;
  }
}

//----------------------------------------------------------------------

//Empty headers - in addition to ZRQINIT
class ZSKIP_HEADER extends Zmodem.Header {}
//No need for ZNAK
class ZABORT_HEADER extends Zmodem.Header {}
class ZFIN_HEADER extends Zmodem.Header {}
class ZFERR_HEADER extends Zmodem.Header {}
ZFIN_HEADER.prototype._hex_header_ending = HEX_HEADER_CRLF;
class ZOffsetHeader extends Zmodem.Header {
  constructor(offset) {
    super();
    this._bytes4 = Zmodem.ENCODELIB.pack_u32_le(offset);
  }
  get_offset() {
    return Zmodem.ENCODELIB.unpack_u32_le(this._bytes4);
  }
}
class ZRPOS_HEADER extends ZOffsetHeader {}
;
class ZDATA_HEADER extends ZOffsetHeader {}
;
class ZEOF_HEADER extends ZOffsetHeader {}
;

//As request, receiver creates.
/* UNIMPLEMENTED FOR NOW
class ZCRC_HEADER extends ZHeader {
    constructor(crc_le_bytes) {
        super();
        if (crc_le_bytes) {  //response, sender creates
            this._bytes4 = crc_le_bytes;
        }
    }
}
*/

//No ZCHALLENGE implementation

//class ZCOMPL_HEADER extends ZHeader {}
//class ZCAN_HEADER extends Zmodem.Header {}

//As described, this header represents an information disclosure.
//It could be interpreted, I suppose, merely as “this is how much space
//I have FOR YOU.”
//TODO: implement if needed/requested
//class ZFREECNT_HEADER extends ZmodemHeader {}

//----------------------------------------------------------------------

const FRAME_CLASS_TYPES = [[ZRQINIT_HEADER, "ZRQINIT"], [ZRINIT_HEADER, "ZRINIT"], [ZSINIT_HEADER, "ZSINIT"], [ZACK_HEADER, "ZACK"], [ZFILE_HEADER, "ZFILE"], [ZSKIP_HEADER, "ZSKIP"], undefined,
// [ ZNAK_HEADER, "ZNAK" ],
[ZABORT_HEADER, "ZABORT"], [ZFIN_HEADER, "ZFIN"], [ZRPOS_HEADER, "ZRPOS"], [ZDATA_HEADER, "ZDATA"], [ZEOF_HEADER, "ZEOF"], [ZFERR_HEADER, "ZFERR"],
//see note
undefined,
//[ ZCRC_HEADER, "ZCRC" ],
undefined,
//[ ZCHALLENGE_HEADER, "ZCHALLENGE" ],
undefined,
//[ ZCOMPL_HEADER, "ZCOMPL" ],
undefined,
//[ ZCAN_HEADER, "ZCAN" ],
undefined,
//[ ZFREECNT_HEADER, "ZFREECNT" ],
undefined,
//[ ZCOMMAND_HEADER, "ZCOMMAND" ],
undefined //[ ZSTDERR_HEADER, "ZSTDERR" ],
];

/*
ZFERR is described as “error in reading or writing file”. It’s really
not a good idea from a security angle for the endpoint to expose this
information. We should parse this and handle it as ZABORT but never send it.

Likewise with ZFREECNT: the sender shouldn’t ask how much space is left
on the other box; rather, the receiver should decide what to do with the
file size as the sender reports it.
*/

var FRAME_NAME_CREATOR = {};
for (var fc = 0; fc < FRAME_CLASS_TYPES.length; fc++) {
  if (!FRAME_CLASS_TYPES[fc]) continue;
  FRAME_NAME_CREATOR[FRAME_CLASS_TYPES[fc][1]] = FRAME_CLASS_TYPES[fc][0];
  Object.assign(FRAME_CLASS_TYPES[fc][0].prototype, {
    TYPENUM: fc,
    NAME: FRAME_CLASS_TYPES[fc][1]
  });
}

//----------------------------------------------------------------------

const CREATORS = [ZRQINIT_HEADER, ZRINIT_HEADER, ZSINIT_HEADER, ZACK_HEADER, ZFILE_HEADER, ZSKIP_HEADER, 'ZNAK', ZABORT_HEADER, ZFIN_HEADER, ZRPOS_HEADER, ZDATA_HEADER, ZEOF_HEADER, ZFERR_HEADER, 'ZCRC',
//ZCRC_HEADER, -- leaving unimplemented?
'ZCHALLENGE', 'ZCOMPL', 'ZCAN', 'ZFREECNT',
// ZFREECNT_HEADER,
'ZCOMMAND', 'ZSTDERR'];
function _get_blank_header(typenum) {
  var creator = CREATORS[typenum];
  if (typeof creator === "string") {
    throw "Received unsupported header: " + creator;
  }

  /*
  if (creator === ZCRC_HEADER) {
      return new creator([0, 0, 0, 0]);
  }
  */

  return _get_blank_header_from_constructor(creator);
}

//referenced outside TODO
function _get_blank_header_from_constructor(creator) {
  if (creator.prototype instanceof ZOffsetHeader) {
    return new creator(0);
  }
  return new creator([]);
}
function _parse_binary16(bytes_arr) {
  //The max length of a ZDLE-encoded binary header w/ 16-bit CRC is:
  //  3 initial bytes, NOT ZDLE-encoded
  //  2 typenum bytes     (1 decoded)
  //  8 data bytes        (4 decoded)
  //  4 CRC bytes         (2 decoded)

  //A 16-bit payload has 7 ZDLE-encoded octets.
  //The ZDLE-encoded octets follow the initial prefix.
  var zdle_decoded = Zmodem.ZDLE.splice(bytes_arr, BINARY16_HEADER_PREFIX.length, 7);
  return zdle_decoded && _parse_non_zdle_binary16(zdle_decoded);
}
function _parse_non_zdle_binary16(decoded) {
  Zmodem.CRC.verify16(decoded.slice(0, 5), decoded.slice(5));
  var typenum = decoded[0];
  var hdr = _get_blank_header(typenum);
  hdr._bytes4 = decoded.slice(1, 5);
  return hdr;
}
function _parse_binary32(bytes_arr) {
  //Same deal as with 16-bit CRC except there are two more
  //potentially ZDLE-encoded bytes, for a total of 9.
  var zdle_decoded = Zmodem.ZDLE.splice(bytes_arr,
  //omit the leading "*", ZDLE, and "C"
  BINARY32_HEADER_PREFIX.length, 9);
  if (!zdle_decoded) return;
  Zmodem.CRC.verify32(zdle_decoded.slice(0, 5), zdle_decoded.slice(5));
  var typenum = zdle_decoded[0];
  var hdr = _get_blank_header(typenum);
  hdr._bytes4 = zdle_decoded.slice(1, 5);
  return hdr;
}
function _parse_hex(bytes_arr) {
  //A hex header always has:
  //  4 bytes for the ** . ZDLE . 'B'
  //  2 hex bytes for the header type
  //  8 hex bytes for the header content
  //  4 hex bytes for the CRC
  //  1-2 bytes for (CR/)LF
  //  (...and at this point the trailing XON is already stripped)
  //
  //----------------------------------------------------------------------
  //A carriage return and line feed are sent with HEX headers.  The
  //receive routine expects to see at least one of these characters, two
  //if the first is CR.
  //----------------------------------------------------------------------
  //
  //^^ I guess it can be either CR/LF or just LF … though those two
  //sentences appear to be saying contradictory things.

  var lf_pos = bytes_arr.indexOf(0x8a); //lrzsz sends this

  if (-1 === lf_pos) {
    lf_pos = bytes_arr.indexOf(0x0a);
  }
  var hdr_err, hex_bytes;
  if (-1 === lf_pos) {
    if (bytes_arr.length > 11) {
      hdr_err = "Invalid hex header - no LF detected within 12 bytes!";
    }

    //incomplete header
    return;
  } else {
    hex_bytes = bytes_arr.splice(0, lf_pos);

    //Trim off the LF
    bytes_arr.shift();
    if (hex_bytes.length === 19) {
      //NB: The spec says CR but seems to treat high-bit variants
      //of control characters the same as the regulars; should we
      //also allow 0x8d?
      var preceding = hex_bytes.pop();
      if (preceding !== 0x0d && preceding !== 0x8d) {
        hdr_err = "Invalid hex header: (CR/)LF doesn’t have CR!";
      }
    } else if (hex_bytes.length !== 18) {
      hdr_err = "Invalid hex header: invalid number of bytes before LF!";
    }
  }
  if (hdr_err) {
    hdr_err += " (" + hex_bytes.length + " bytes: " + hex_bytes.join() + ")";
    throw hdr_err;
  }
  hex_bytes.splice(0, 4);

  //Should be 7 bytes ultimately:
  //  1 for typenum
  //  4 for header data
  //  2 for CRC
  var octets = Zmodem.ENCODELIB.parse_hex_octets(hex_bytes);
  return _parse_non_zdle_binary16(octets);
}
Zmodem.Header.parse_hex = _parse_hex;

/***/ }),

/***/ 250:
/*!*********************************************!*\
  !*** ./node_modules/zmodem.js/src/zmlib.js ***!
  \*********************************************/
/***/ ((module) => {

"use strict";


var Zmodem = module.exports;
const ZDLE = 0x18,
  XON = 0x11,
  XOFF = 0x13,
  XON_HIGH = 0x80 | XON,
  XOFF_HIGH = 0x80 | XOFF,
  CAN = 0x18 //NB: same character as ZDLE
;

/**
 * Tools and constants that are useful for ZMODEM.
 *
 * @exports ZMLIB
 */
Zmodem.ZMLIB = {
  /**
   * @property {number} The ZDLE constant, which ZMODEM uses for escaping
   */
  ZDLE: ZDLE,
  /**
   * @property {number} XON - ASCII XON
   */
  XON: XON,
  /**
   * @property {number} XOFF - ASCII XOFF
   */
  XOFF: XOFF,
  /**
   * @property {number[]} ABORT_SEQUENCE - ZMODEM’s abort sequence
   */
  ABORT_SEQUENCE: [CAN, CAN, CAN, CAN, CAN],
  /**
   * Remove octet values from the given array that ZMODEM always ignores.
   * This will mutate the given array.
   *
   * @param {number[]} octets - The octet values to transform.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {number[]} The passed-in array. This is the same object that is
   *      passed in.
   */
  strip_ignored_bytes: function strip_ignored_bytes(octets) {
    for (var o = octets.length - 1; o >= 0; o--) {
      switch (octets[o]) {
        case XON:
        case XON_HIGH:
        case XOFF:
        case XOFF_HIGH:
          octets.splice(o, 1);
          continue;
      }
    }
    return octets;
  },
  /**
   * Like Array.prototype.indexOf, but searches for a subarray
   * rather than just a particular value.
   *
   * @param {Array} haystack - The array to search, i.e., the bigger.
   *
   * @param {Array} needle - The array whose values to find,
   *      i.e., the smaller.
   *
   * @returns {number} The position in “haystack” where “needle”
   *      first appears—or, -1 if “needle” doesn’t appear anywhere
   *      in “haystack”.
   */
  find_subarray: function find_subarray(haystack, needle) {
    var h = 0,
      n;
    var start = Date.now();
    HAYSTACK: while (h !== -1) {
      h = haystack.indexOf(needle[0], h);
      if (h === -1) break HAYSTACK;
      for (n = 1; n < needle.length; n++) {
        if (haystack[h + n] !== needle[n]) {
          h++;
          continue HAYSTACK;
        }
      }
      return h;
    }
    return -1;
  }
};

/***/ }),

/***/ 5712:
/*!***********************************************!*\
  !*** ./node_modules/zmodem.js/src/zsentry.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zmlib */ 250), __webpack_require__(/*! ./zsession */ 1078));
const MIN_ZM_HEX_START_LENGTH = 20,
  MAX_ZM_HEX_START_LENGTH = 21,
  // **, ZDLE, 'B0'
  //ZRQINIT’s next byte will be '0'; ZRINIT’s will be '1'.
  COMMON_ZM_HEX_START = [42, 42, 24, 66, 48],
  SENTRY_CONSTRUCTOR_REQUIRED_ARGS = ["to_terminal", "on_detect", "on_retract", "sender"],
  ASTERISK = 42;

/**
 * An instance of this object is passed to the Sentry’s on_detect
 * callback each time the Sentry object sees what looks like the
 * start of a ZMODEM session.
 *
 * Note that it is possible for a detection to be “retracted”
 * if the Sentry consumes bytes afterward that are not ZMODEM.
 * When this happens, the Sentry’s `retract` event will fire,
 * after which the Detection object is no longer usable.
 */
class Detection {
  /**
   * Not called directly.
   */
  constructor(session_type, accepter, denier, checker) {
    //confirm() - user confirms that ZMODEM is desired
    this._confirmer = accepter;

    //deny() - user declines ZMODEM; send abort sequence
    //
    //TODO: It might be ideal to forgo the session “peaceably”,
    //i.e., such that the peer doesn’t end in error. That’s
    //possible if we’re the sender, we accept the session,
    //then we just send a close(), but it doesn’t seem to be
    //possible for a receiver. Thus, let’s just leave it so
    //it’s at least consistent (and simpler, too).
    this._denier = denier;
    this._is_valid = checker;
    this._session_type = session_type;
  }

  /**
   * Confirm that the detected ZMODEM sequence indicates the
   * start of a ZMODEM session.
   *
   * @return {Session} The ZMODEM Session object (i.e., either a
   *  Send or Receive instance).
   */
  confirm() {
    return this._confirmer.apply(this, arguments);
  }

  /**
   * Tell the Sentry that the detected bytes sequence is
   * **NOT** intended to be the start of a ZMODEM session.
   */
  deny() {
    return this._denier.apply(this, arguments);
  }

  /**
   * Tells whether the Detection is still valid; i.e., whether
   * the Sentry has `consume()`d bytes that invalidate the
   * Detection.
   *
   * @returns {boolean} Whether the Detection is valid.
   */
  is_valid() {
    return this._is_valid.apply(this, arguments);
  }

  /**
   * Gives the session’s role.
   *
   * @returns {string} One of:
   * - `receive`
   * - `send`
   */
  get_session_role() {
    return this._session_type;
  }
}

/**
 * Class that parses an input stream for the beginning of a
 * ZMODEM session. We look for the tell-tale signs
 * of a ZMODEM transfer and allow the client to determine whether
 * it’s really ZMODEM or not.
 *
 * This is the “mother” class for zmodem.js;
 * all other class instances are created, directly or indirectly,
 * by an instance of this class.
 *
 * This logic is not unlikely to need tweaking, and it can never
 * be fully bulletproof; if it could be bulletproof it would be
 * simpler since there wouldn’t need to be the .confirm()/.deny()
 * step.
 *
 * One thing you could do to make things a bit simpler *is* just
 * to make that assumption for your users--i.e., to .confirm()
 * Detection objects automatically. That’ll be one less step
 * for the user, but an unaccustomed user might find that a bit
 * confusing. It’s also then possible to have a “false positive”:
 * a text stream that contains a ZMODEM initialization string but
 * isn’t, in fact, meant to start a ZMODEM session.
 *
 * Workflow:
 *  - parse all input with .consume(). As long as nothing looks
 *      like ZMODEM, all the traffic will go to to_terminal().
 *
 *  - when a “tell-tale” sequence of bytes arrives, we create a
 *      Detection object and pass it to the “on_detect” handler.
 *
 *  - Either .confirm() or .deny() with the Detection object.
 *      This is the user’s chance to say, “yeah, I know those
 *      bytes look like ZMODEM, but they’re not. So back off!”
 *
 *      If you .confirm(), the Session object is returned, and
 *      further input that goes to the Sentry’s .consume() will
 *      go to the (now-active) Session object.
 *
 *  - Sometimes additional traffic arrives that makes it apparent
 *      that no ZMODEM session is intended to start; in this case,
 *      the Sentry marks the Detection as “stale” and calls the
 *      `on_retract` handler. Any attempt from here to .confirm()
 *      on the Detection object will prompt an exception.
 *
 *      (This “retraction” behavior will only happen prior to
 *      .confirm() or .deny() being called on the Detection object.
 *      Beyond that point, either the Session has to deal with the
 *      “garbage”, or it’s back to the terminal anyway.
 *
 *  - Once the Session object is done, the Sentry will again send
 *      all traffic to to_terminal().
 */
Zmodem.Sentry = class ZmodemSentry {
  /**
   * Invoked directly. Creates a new Sentry that inspects all
   * traffic before it goes to the terminal.
   *
   * @param {Object} options - The Sentry parameters
   *
   * @param {Function} options.to_terminal - Handler that sends
   * traffic to the terminal object. Receives an iterable object
   * (e.g., an Array) that contains octet numbers.
   *
   * @param {Function} options.on_detect - Handler for new
   * detection events. Receives a new Detection object.
   *
   * @param {Function} options.on_retract - Handler for retraction
   * events. Receives no input.
   *
   * @param {Function} options.sender - Handler that sends traffic to
   * the peer. If, for example, your application uses WebSocket to talk
   * to the peer, use this to send data to the WebSocket instance.
   */
  constructor(options) {
    if (!options) throw "Need options!";
    var sentry = this;
    SENTRY_CONSTRUCTOR_REQUIRED_ARGS.forEach(function (arg) {
      if (!options[arg]) {
        throw "Need “" + arg + "”!";
      }
      sentry["_" + arg] = options[arg];
    });
    this._cache = [];
  }
  _after_session_end() {
    this._zsession = null;
  }

  /**
   * “Consumes” a piece of input:
   *
   *  - If there is no active or pending ZMODEM session, the text is
   *      all output. (This is regardless of whether we’ve got a new
   *      Detection.)
   *
   *  - If there is no active ZMODEM session and the input **ends** with
   *      a ZRINIT or ZRQINIT, then a new Detection object is created,
   *      and it is passed to the “on_detect” function.
   *      If there was another pending Detection object, it is retracted.
   *
   *  - If there is no active ZMODEM session and the input does NOT end
   *      with a ZRINIT or ZRQINIT, then any pending Detection object is
   *      retracted.
   *
   *  - If there is an active ZMODEM session, the input is passed to it.
   *      Any non-ZMODEM data (i.e., “garbage”) parsed from the input
   *      is sent to output.
   *      If the ZMODEM session ends, any post-ZMODEM part of the input
   *      is sent to output.
   *
   *  @param {number[] | ArrayBuffer} input - Octets to parse as input.
   */
  consume(input) {
    if (!(input instanceof Array)) {
      input = Array.prototype.slice.call(new Uint8Array(input));
    }
    if (this._zsession) {
      var session_before_consume = this._zsession;
      session_before_consume.consume(input);
      if (session_before_consume.has_ended()) {
        if (session_before_consume.type === "receive") {
          input = session_before_consume.get_trailing_bytes();
        } else {
          input = [];
        }
      } else return;
    }
    var new_session = this._parse(input);
    var to_terminal = input;
    if (new_session) {
      let replacement_detect = !!this._parsed_session;
      if (replacement_detect) {
        //no terminal output if the new session is of the
        //same type as the old
        if (this._parsed_session.type === new_session.type) {
          to_terminal = [];
        }
        this._on_retract();
      }
      this._parsed_session = new_session;
      var sentry = this;
      function checker() {
        return sentry._parsed_session === new_session;
      }

      //This runs with the Sentry object as the context.
      function accepter() {
        if (!this.is_valid()) {
          throw "Stale ZMODEM session!";
        }
        new_session.on("garbage", sentry._to_terminal);
        new_session.on("session_end", sentry._after_session_end.bind(sentry));
        new_session.set_sender(sentry._sender);
        delete sentry._parsed_session;
        return sentry._zsession = new_session;
      }
      ;
      function denier() {
        if (!this.is_valid()) return;
      }
      ;
      this._on_detect(new Detection(new_session.type, accepter, this._send_abort.bind(this), checker));
    } else {
      /*
      if (this._parsed_session) {
          this._session_stale_because = 'Non-ZMODEM output received after ZMODEM initialization.';
      }
      */

      var expired_session = this._parsed_session;
      this._parsed_session = null;
      if (expired_session) {
        //If we got a single “C” after parsing a session,
        //that means our peer is trying to downgrade to YMODEM.
        //That won’t work, so we just send the ABORT_SEQUENCE
        //right away.
        if (to_terminal.length === 1 && to_terminal[0] === 67) {
          this._send_abort();
        }
        this._on_retract();
      }
    }
    this._to_terminal(to_terminal);
  }

  /**
   * @return {Session|null} The sentry’s current Session object, or
   *      null if there is none.
   */
  get_confirmed_session() {
    return this._zsession || null;
  }
  _send_abort() {
    this._sender(Zmodem.ZMLIB.ABORT_SEQUENCE);
  }

  /**
   * Parse an input stream and decide how much of it goes to the
   * terminal or to a new Session object.
   *
   * This will accommodate input strings that are fragmented
   * across calls to this function; e.g., if you send the first
   * two bytes at the end of one parse() call then send the rest
   * at the beginning of the next, parse() will recognize it as
   * the beginning of a ZMODEM session.
   *
   * In order to keep from blocking any actual useful data to the
   * terminal in real-time, this will send on the initial
   * ZRINIT/ZRQINIT bytes to the terminal. They’re meant to go to the
   * terminal anyway, so that should be fine.
   *
   * @private
   *
   * @param {Array|Uint8Array} array_like - The input bytes.
   *      Each member should be a number between 0 and 255 (inclusive).
   *
   * @return {Array} A two-member list:
   *      0) the bytes that should be printed on the terminal
   *      1) the created Session object (if any)
   */
  _parse(array_like) {
    var cache = this._cache;
    cache.push.apply(cache, array_like);
    while (true) {
      let common_hex_at = Zmodem.ZMLIB.find_subarray(cache, COMMON_ZM_HEX_START);
      if (-1 === common_hex_at) break;
      let before_common_hex = cache.splice(0, common_hex_at);
      let zsession;
      try {
        zsession = Zmodem.Session.parse(cache);
      } catch (err) {//ignore errors
        //console.log(err);
      }
      if (!zsession) break;

      //Don’t need to parse the trailing XON.
      if (cache.length === 1 && cache[0] === Zmodem.ZMLIB.XON) {
        cache.shift();
      }

      //If there are still bytes in the cache,
      //then we don’t have a ZMODEM session. This logic depends
      //on the sender only sending one initial header.
      return cache.length ? null : zsession;
    }
    cache.splice(MAX_ZM_HEX_START_LENGTH);
    return null;
  }
};

/***/ }),

/***/ 1078:
/*!************************************************!*\
  !*** ./node_modules/zmodem.js/src/zsession.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;

/**
 * This is where the protocol-level logic lives: the interaction of ZMODEM
 * headers and subpackets. The logic here is not unlikely to need tweaking
 * as little edge cases crop up.
 */

Zmodem.DEBUG = false;
Object.assign(Zmodem, __webpack_require__(/*! ./encode */ 6041), __webpack_require__(/*! ./text */ 9117), __webpack_require__(/*! ./zdle */ 1841), __webpack_require__(/*! ./zmlib */ 250), __webpack_require__(/*! ./zheader */ 5851), __webpack_require__(/*! ./zsubpacket */ 9918), __webpack_require__(/*! ./zvalidation */ 7798), __webpack_require__(/*! ./zerror */ 6273));
const
  //pertinent to this module
  KEEPALIVE_INTERVAL = 5000,
  //We ourselves don’t need ESCCTL, so we don’t send it;
  //however, we always expect to receive it in ZRINIT.
  //See _ensure_receiver_escapes_ctrl_chars() for more details.
  ZRINIT_FLAGS = ["CANFDX",
  //full duplex
  "CANOVIO",
  //overlap I/O

  //lsz has a buffer overflow bug that shows itself when:
  //
  //  - 16-bit CRC is used, and
  //  - lsz receives the abort sequence while sending a file
  //
  //To avoid this, we just tell lsz to use 32-bit CRC
  //even though there is otherwise no reason. This ensures that
  //unfixed lsz versions will avoid the buffer overflow.
  "CANFC32"],
  //We do this because some WebSocket shell servers
  //(e.g., xterm.js’s demo server) enable the IEXTEN termios flag,
  //which bars 0x0f and 0x16 from reaching the shell process,
  //which results in transmission errors.
  FORCE_ESCAPE_CTRL_CHARS = true,
  DEFAULT_RECEIVE_INPUT_MODE = "spool_uint8array",
  //pertinent to ZMODEM
  MAX_CHUNK_LENGTH = 8192,
  //1 KiB officially, but lrzsz allows 8192
  BS = 0x8,
  OVER_AND_OUT = [79, 79],
  ABORT_SEQUENCE = Zmodem.ZMLIB.ABORT_SEQUENCE;

/**
 * A base class for objects that have events.
 *
 * @private
 */
class _Eventer {
  /**
   * Not called directly.
   */
  constructor() {
    this._on_evt = {};
    this._evt_once_index = {};
  }
  _Add_event(evt_name) {
    this._on_evt[evt_name] = [];
    this._evt_once_index[evt_name] = [];
  }
  _get_evt_queue(evt_name) {
    if (!this._on_evt[evt_name]) {
      throw "Bad event: " + evt_name;
    }
    return this._on_evt[evt_name];
  }

  /**
   * Register a callback for a given event.
   *
   * @param {string} evt_name - The name of the event.
   *
   * @param {Function} todo - The function to execute when the event happens.
   */
  on(evt_name, todo) {
    var queue = this._get_evt_queue(evt_name);
    queue.push(todo);
    return this;
  }

  /**
   * Unregister a callback for a given event.
   *
   * @param {string} evt_name - The name of the event.
   *
   * @param {Function} [todo] - The function to execute when the event
   *  happens. If not given, the last event registered for the event
   *  is unregistered.
   */
  off(evt_name, todo) {
    var queue = this._get_evt_queue(evt_name);
    if (todo) {
      var at = queue.indexOf(todo);
      if (at === -1) {
        throw "“" + todo + "” is not in the “" + evt_name + "” queue.";
      }
      queue.splice(at, 1);
    } else {
      queue.pop();
    }
    return this;
  }
  _Happen(evt_name /*, arg0, arg1, .. */) {
    var queue = this._get_evt_queue(evt_name); //might as well validate

    //console.info("EVENT", this, arguments);

    var args = Array.apply(null, arguments);
    args.shift();
    var sess = this;
    queue.forEach(function (cb) {
      cb.apply(sess, args);
    });
    return queue.length;
  }
}

/**
 * The Session classes handle the protocol-level logic.
 * These shield the user from dealing with headers and subpackets.
 * This is a base class with functionality common to both Receive
 * and Send subclasses.
 *
 * @extends _Eventer
*/
Zmodem.Session = class ZmodemSession extends _Eventer {
  /**
   * Parse out a hex header from the given array.
   * If there’s a ZRQINIT or ZRINIT at the beginning,
   * we’ll return it. If the input isn’t a header,
   * for whatever reason, we return undefined.
   *
   * @param {number[]} octets - The bytes to parse.
   *
   * @return {Session|undefined} A Session object if the beginning
   *      of a session was parsable in “octets”; otherwise undefined.
   */
  static parse(octets) {
    //Will need to trap errors.
    var hdr;
    try {
      hdr = Zmodem.Header.parse_hex(octets);
    } catch (e) {
      //Don’t report since we aren’t in session

      //debug
      //console.warn("No hex header: ", e);

      return;
    }
    if (!hdr) return;
    switch (hdr.NAME) {
      case "ZRQINIT":
        //throw if ZCOMMAND
        return new Zmodem.Session.Receive();
      case "ZRINIT":
        return new Zmodem.Session.Send(hdr);
    }

    //console.warn("Invalid first Zmodem header", hdr);
  }

  /**
   * Sets the sender function that a Session object will use.
   *
   * @param {Function} sender_func - The function to call.
   *      It will receive an Array with the relevant octets.
   *
   * @return {Session} The session object (for chaining).
   */
  set_sender(sender_func) {
    this._sender = sender_func;
    return this;
  }

  /**
   * Whether the current Session has ended.
   *
   * @returns {boolean} The ended state.
   */
  has_ended() {
    return this._has_ended();
  }

  /**
   * Consumes an array of octets as ZMODEM session input.
   *
   * @param {number[]} octets - The input octets.
   */
  consume(octets) {
    this._before_consume(octets);
    if (this._aborted) throw new Zmodem.Error('already_aborted');
    if (!octets.length) return;
    this._strip_and_enqueue_input(octets);
    if (!this._check_for_abort_sequence(octets)) {
      this._consume_first();
    }
    return;
  }

  /**
   * Whether the current Session has been `abort()`ed.
   *
   * @returns {boolean} The aborted state.
   */
  aborted() {
    return !!this._aborted;
  }

  /**
   * Not called directly.
   */
  constructor() {
    super();
    //if (!sender_func) throw "Need sender!";

    //this._first_header = first_header;
    //this._sender = sender_func;
    this._config = {};

    //this._input = new ZInput();

    this._input_buffer = [];

    //This is mostly for debugging.
    this._Add_event("receive");
    this._Add_event("garbage");
    this._Add_event("session_end");
  }

  /**
   * Returns the Session object’s role.
   *
   * @returns {string} One of:
   * - `receive`
   * - `send`
   */
  get_role() {
    return this.type;
  }
  _trim_leading_garbage_until_header() {
    var garbage = Zmodem.Header.trim_leading_garbage(this._input_buffer);
    if (garbage.length) {
      if (this._Happen("garbage", garbage) === 0) {
        console.debug("Garbage: ", String.fromCharCode.apply(String, garbage), garbage);
      }
    }
  }
  _parse_and_consume_header() {
    this._trim_leading_garbage_until_header();
    var new_header_and_crc = Zmodem.Header.parse(this._input_buffer);
    if (!new_header_and_crc) return;
    if (Zmodem.DEBUG) {
      this._log_header("RECEIVED HEADER", new_header_and_crc[0]);
    }
    this._consume_header(new_header_and_crc[0]);
    this._last_header_name = new_header_and_crc[0].NAME;
    this._last_header_crc = new_header_and_crc[1];
    return new_header_and_crc[0];
  }
  _log_header(label, header) {
    console.debug(this.type, label, header.NAME, header._bytes4.join());
  }
  _consume_header(new_header) {
    this._on_receive(new_header);
    var handler = this._next_header_handler && this._next_header_handler[new_header.NAME];
    if (!handler) {
      console.error("Unhandled header!", new_header, this._next_header_handler);
      throw new Zmodem.Error("Unhandled header: " + new_header.NAME);
    }
    this._next_header_handler = null;
    handler.call(this, new_header);
  }

  //TODO: strip out the abort sequence
  _check_for_abort_sequence() {
    var abort_at = Zmodem.ZMLIB.find_subarray(this._input_buffer, ABORT_SEQUENCE);
    if (abort_at !== -1) {
      //TODO: expose this to caller
      this._input_buffer.splice(0, abort_at + ABORT_SEQUENCE.length);
      this._aborted = true;

      //TODO compare response here to lrzsz.
      this._on_session_end();

      //We shouldn’t ever expect to receive an abort. Even if we
      //have sent an abort ourselves, the Sentry should have stopped
      //directing input to this Session object.
      //if (this._expect_abort) {
      //    return true;
      //}

      throw new Zmodem.Error("peer_aborted");
    }
  }
  _send_header(name /*, args */) {
    if (!this._sender) throw "Need sender!";
    var args = Array.apply(null, arguments);
    var bytes_hdr = this._create_header_bytes(args);
    if (Zmodem.DEBUG) {
      this._log_header("SENDING HEADER", bytes_hdr[1]);
    }
    this._sender(bytes_hdr[0]);
    this._last_sent_header = bytes_hdr[1];
  }
  _create_header_bytes(name_and_args) {
    var hdr = Zmodem.Header.build.apply(Zmodem.Header, name_and_args);
    var formatter = this._get_header_formatter(name_and_args[0]);
    return [hdr[formatter](this._zencoder), hdr];
  }
  _strip_and_enqueue_input(input) {
    Zmodem.ZMLIB.strip_ignored_bytes(input);

    //It’s possible that “input” is empty at this point.
    //It doesn’t seem to hurt anything to keep processing, though.

    this._input_buffer.push.apply(this._input_buffer, input);
  }

  /**
   * **STOP!** You probably want to `skip()` an Offer rather than
   * `abort()`. See below.
   *
   * Abort the current session by sending the ZMODEM abort sequence.
   * This function will cause the Session object to refuse to send
   * any further data.
   *
   * Zmodem.Sentry is configured to send all output to the terminal
   * after a session’s `abort()`. That could result in lots of
   * ZMODEM garble being sent to the JavaScript terminal, which you
   * probably don’t want.
   *
   * `skip()` on an Offer is better because Session will continue to
   * discard data until we reach either another file or the
   * sender-initiated end of the ZMODEM session. So no ZMODEM garble,
   * and the session will end successfully.
   *
   * The behavior of `abort()` is subject to change since it’s not
   * very useful as currently implemented.
   */
  abort() {
    //this._expect_abort = true;

    //From Forsberg:
    //
    //The Cancel sequence consists of eight CAN characters
    //and ten backspace characters. ZMODEM only requires five
    //Cancel characters; the other three are "insurance".
    //The trailing backspace characters attempt to erase
    //the effects of the CAN characters if they are
    //received by a command interpreter.
    //
    //FG: Since we assume our connection is reliable, there’s
    //no reason to send more than 5 CANs.
    this._sender(ABORT_SEQUENCE.concat([BS, BS, BS, BS, BS]));
    this._aborted = true;
    this._sender = function () {
      throw new Zmodem.Error('already_aborted');
    };
    this._on_session_end();
    return;
  }

  //----------------------------------------------------------------------
  _on_session_end() {
    this._Happen("session_end");
  }
  _on_receive(hdr_or_pkt) {
    this._Happen("receive", hdr_or_pkt);
  }
  _before_consume() {}
};
function _trim_OO(array) {
  if (0 === Zmodem.ZMLIB.find_subarray(array, OVER_AND_OUT)) {
    array.splice(0, OVER_AND_OUT.length);
  }

  //TODO: This assumes OVER_AND_OUT is 2 bytes long. No biggie, but.
  else if (array[0] === OVER_AND_OUT[OVER_AND_OUT.length - 1]) {
    array.splice(0, 1);
  }
  return array;
}

/** A class for ZMODEM receive sessions.
 *
 * @extends Session
 */
Zmodem.Session.Receive = class ZmodemReceiveSession extends Zmodem.Session {
  //We only get 1 file at a time, so on each consume() either
  //continue state for the current file or start a new one.

  /**
   * Not called directly.
   */
  constructor() {
    super();
    this._Add_event("offer");
    this._Add_event("data_in");
    this._Add_event("file_end");
  }

  /**
   * Consume input bytes from the sender.
   *
   * @private
   * @param {number[]} octets - The bytes to consume.
   */
  _before_consume(octets) {
    if (this._bytes_after_OO) {
      throw "PROTOCOL: Session is completed!";
    }

    //Put this here so that our logic later on has access to the
    //input string and can populate _bytes_after_OO when the
    //session ends.
    this._bytes_being_consumed = octets;
  }

  /**
   * Return any bytes that have been `consume()`d but
   * came after the end of the ZMODEM session.
   *
   * @returns {number[]} The trailing bytes.
   */
  get_trailing_bytes() {
    if (this._aborted) return [];
    if (!this._bytes_after_OO) {
      throw "PROTOCOL: Session is not completed!";
    }
    return this._bytes_after_OO.slice(0);
  }
  _has_ended() {
    return this.aborted() || !!this._bytes_after_OO;
  }

  //Receiver always sends hex headers.
  _get_header_formatter() {
    return "to_hex";
  }
  _parse_and_consume_subpacket() {
    var parse_func;
    if (this._last_header_crc === 16) {
      parse_func = "parse16";
    } else {
      parse_func = "parse32";
    }
    var subpacket = Zmodem.Subpacket[parse_func](this._input_buffer);
    if (subpacket) {
      if (Zmodem.DEBUG) {
        console.debug(this.type, "RECEIVED SUBPACKET", subpacket);
      }
      this._consume_data(subpacket);

      //What state are we in if the subpacket indicates frame end
      //but we haven’t gotten ZEOF yet? Can anything other than ZEOF
      //follow after a ZDATA?
      if (subpacket.frame_end()) {
        this._next_subpacket_handler = null;
      }
    }
    return subpacket;
  }
  _consume_first() {
    if (this._got_ZFIN) {
      if (this._input_buffer.length < 2) return;

      //if it’s OO, then set this._bytes_after_OO
      if (Zmodem.ZMLIB.find_subarray(this._input_buffer, OVER_AND_OUT) === 0) {
        //This doubles as an indication that the session has ended.
        //We need to set this right away so that handlers like
        //"session_end" will have access to it.
        this._bytes_after_OO = _trim_OO(this._bytes_being_consumed.slice(0));
        this._on_session_end();
        return;
      } else {
        throw "PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: " + this._input_buffer.join();
      }
    }
    var parsed;
    do {
      if (this._next_subpacket_handler) {
        parsed = this._parse_and_consume_subpacket();
      } else {
        parsed = this._parse_and_consume_header();
      }
    } while (parsed && this._input_buffer.length);
  }
  _consume_data(subpacket) {
    this._on_receive(subpacket);
    if (!this._next_subpacket_handler) {
      throw "PROTOCOL: Received unexpected data packet after " + this._last_header_name + " header: " + subpacket.get_payload().join();
    }
    this._next_subpacket_handler.call(this, subpacket);
  }
  _octets_to_string(octets) {
    if (!this._textdecoder) {
      this._textdecoder = new Zmodem.Text.Decoder();
    }
    return this._textdecoder.decode(new Uint8Array(octets));
  }
  _consume_ZFILE_data(hdr, subpacket) {
    if (this._file_info) {
      throw "PROTOCOL: second ZFILE data subpacket received";
    }
    var packet_payload = subpacket.get_payload();
    var nul_at = packet_payload.indexOf(0);

    //
    var fname = this._octets_to_string(packet_payload.slice(0, nul_at));
    var the_rest = this._octets_to_string(packet_payload.slice(1 + nul_at)).split(" ");
    var mtime = the_rest[1] && parseInt(the_rest[1], 8) || undefined;
    if (mtime) {
      mtime = new Date(mtime * 1000);
    }
    this._file_info = {
      name: fname,
      size: the_rest[0] ? parseInt(the_rest[0], 10) : null,
      mtime: mtime || null,
      mode: the_rest[2] && parseInt(the_rest[2], 8) || null,
      serial: the_rest[3] && parseInt(the_rest[3], 10) || null,
      files_remaining: the_rest[4] ? parseInt(the_rest[4], 10) : null,
      bytes_remaining: the_rest[5] ? parseInt(the_rest[5], 10) : null
    };

    //console.log("ZFILE", hdr);

    var xfer = new Offer(hdr.get_options(), this._file_info, this._accept.bind(this), this._skip.bind(this));
    this._current_transfer = xfer;

    //this._Happen("offer", xfer);
  }

  _consume_ZDATA_data(subpacket) {
    if (!this._accepted_offer) {
      throw "PROTOCOL: Received data without accepting!";
    }

    //TODO: Probably should include some sort of preventive against
    //infinite loop here: if the peer hasn’t sent us what we want after,
    //say, 10 ZRPOS headers then we should send ZABORT and just end.
    if (!this._offset_ok) {
      console.warn("offset not ok!");
      _send_ZRPOS();
      return;
    }
    this._file_offset += subpacket.get_payload().length;
    this._on_data_in(subpacket);

    /*
    console.warn("received error from data_in callback; retrying", e);
    throw "unimplemented";
    */

    if (subpacket.ack_expected() && !subpacket.frame_end()) {
      this._send_header("ZACK", Zmodem.ENCODELIB.pack_u32_le(this._file_offset));
    }
  }
  _make_promise_for_between_files() {
    var sess = this;
    return new Promise(function (res) {
      var between_files_handler = {
        ZFILE: function (hdr) {
          this._next_subpacket_handler = function (subpacket) {
            this._next_subpacket_handler = null;
            this._consume_ZFILE_data(hdr, subpacket);
            this._Happen("offer", this._current_transfer);
            res(this._current_transfer);
          };
        },
        //We use this as a keep-alive. Maybe other
        //implementations do, too?
        ZSINIT: function (hdr) {
          //The content of this header doesn’t affect us
          //since all it does is tell us details of how
          //the sender will ZDLE-encode binary data. Our
          //ZDLE parser doesn’t need to know in advance.

          sess._next_subpacket_handler = function (spkt) {
            sess._next_subpacket_handler = null;
            sess._consume_ZSINIT_data(spkt);
            sess._send_header('ZACK');
            sess._next_header_handler = between_files_handler;
          };
        },
        ZFIN: function () {
          this._consume_ZFIN();
          res();
        }
      };
      sess._next_header_handler = between_files_handler;
    });
  }
  _consume_ZSINIT_data(spkt) {
    //TODO: Should this be used when we signal a cancellation?
    this._attn = spkt.get_payload();
  }

  /**
   * Start the ZMODEM session by signaling to the sender that
   * we are ready for the first file offer.
   *
   * @returns {Promise} A promise that resolves with an Offer object
   * or, if the sender closes the session immediately without offering
   * anything, nothing.
   */
  start() {
    if (this._started) throw "Already started!";
    this._started = true;
    var ret = this._make_promise_for_between_files();
    this._send_ZRINIT();
    return ret;
  }

  //Returns a promise that’s fulfilled when the file
  //transfer is done.
  //
  //  That ZEOF promise return is another promise that’s
  //  fulfilled when we get either ZFIN or another ZFILE.
  _accept(offset) {
    this._accepted_offer = true;
    this._file_offset = offset || 0;
    var sess = this;
    var ret = new Promise(function (resolve_accept) {
      var last_ZDATA;
      sess._next_header_handler = {
        ZDATA: function on_ZDATA(hdr) {
          this._consume_ZDATA(hdr);
          this._next_subpacket_handler = this._consume_ZDATA_data;
          this._next_header_handler = {
            ZEOF: function on_ZEOF(hdr) {
              // Do this first to verify the ZEOF.
              // This also fires the “file_end” event.
              this._consume_ZEOF(hdr);
              this._next_subpacket_handler = null;

              // We don’t care about this promise.
              // Prior to v0.1.8 we did because we called
              // resolve_accept() at the resolution of this
              // promise, but that was a bad idea and was
              // never documented, so 0.1.8 changed it.
              this._make_promise_for_between_files();
              resolve_accept();
              this._send_ZRINIT();
            }
          };
        }
      };
    });
    this._send_ZRPOS();
    return ret;
  }
  _skip() {
    var ret = this._make_promise_for_between_files();
    if (this._accepted_offer) {
      // There’s a race condition where we might attempt to
      // skip() an in-progress transfer near its end but actually
      // the skip() will fire after the transfer is complete.
      // While there might be ways to prevent this, they likely
      // would require extra work on the part of implementations.
      //
      // It seems far simpler just to make this function a no-op
      // in these cases.
      if (!this._current_transfer) return;

      //For cancel of an in-progress transfer from lsz,
      //it’s necessary to avoid this buffer overflow bug:
      //
      //  https://github.com/gooselinux/lrzsz/blob/master/lrzsz-0.12.20.patch
      //
      //… which we do by asking for CRC32 from lsz.

      //We might or might not have consumed ZDATA.
      //The sender also might or might not send a ZEOF before it
      //parses the ZSKIP. Thus, we want to ignore the following:
      //
      //  - ZDATA
      //  - ZDATA then ZEOF
      //  - ZEOF
      //
      //… and just look for the next between-file header.

      var bound_make_promise_for_between_files = function () {
        //Once this happens we fail on any received data packet.
        //So it needs not to happen until we’ve received a header.
        this._accepted_offer = false;
        this._next_subpacket_handler = null;
        this._make_promise_for_between_files();
      }.bind(this);
      Object.assign(this._next_header_handler, {
        ZEOF: bound_make_promise_for_between_files,
        ZDATA: function () {
          bound_make_promise_for_between_files();
          this._next_header_handler.ZEOF = bound_make_promise_for_between_files;
        }.bind(this)
      });
    }

    //this._accepted_offer = false;

    this._file_info = null;
    this._send_header("ZSKIP");
    return ret;
  }
  _send_ZRINIT() {
    this._send_header("ZRINIT", ZRINIT_FLAGS);
  }
  _consume_ZFIN() {
    this._got_ZFIN = true;
    this._send_header("ZFIN");
  }
  _consume_ZEOF(header) {
    if (this._file_offset !== header.get_offset()) {
      throw "ZEOF offset mismatch; unimplemented (local: " + this._file_offset + "; ZEOF: " + header.get_offset() + ")";
    }
    this._on_file_end();

    //Preserve these two so that file_end callbacks
    //will have the right information.
    this._file_info = null;
    this._current_transfer = null;
  }
  _consume_ZDATA(header) {
    if (this._file_offset === header.get_offset()) {
      this._offset_ok = true;
    } else {
      throw "Error correction is unimplemented.";
    }
  }
  _send_ZRPOS() {
    this._send_header("ZRPOS", this._file_offset);
  }

  //----------------------------------------------------------------------
  //events

  _on_file_end() {
    this._Happen("file_end");
    if (this._current_transfer) {
      this._current_transfer._Happen("complete");
      this._current_transfer = null;
    }
  }
  _on_data_in(subpacket) {
    this._Happen("data_in", subpacket);
    if (this._current_transfer) {
      this._current_transfer._Happen("input", subpacket.get_payload());
    }
  }
};
Object.assign(Zmodem.Session.Receive.prototype, {
  type: "receive"
});

//----------------------------------------------------------------------

/**
 * @typedef {Object} FileDetails
 *
 * @property {string} name - The name of the file.
 *
 * @property {number} [size] - The file size, in bytes.
 *
 * @property {number} [mode] - The file mode (e.g., 0100644).
 *
 * @property {Date|number} [mtime] - The file’s modification time.
 *  When expressed as a number, the unit is epoch seconds.
 *
 * @property {number} [files_remaining] - Inclusive of the current file,
 *  so this value is never less than 1.
 *
 * @property {number} [bytes_remaining] - Inclusive of the current file.
 */

/**
 * Common methods for Transfer and Offer objects.
 *
 * @mixin
 */
var Transfer_Offer_Mixin = {
  /**
   * Returns the file details object.
   * @returns {FileDetails} `mtime` is a Date.
   */
  get_details: function get_details() {
    return Object.assign({}, this._file_info);
  },
  /**
   * Returns a parse of the ZFILE header’s payload.
   *
   * @returns {Object} Members are:
   *
   * - `conversion` (string | undefined)
   * - `management` (string | undefined)
   * - `transfer` (string | undefined)
   * - `sparse` (boolean)
   */
  get_options: function get_options() {
    return Object.assign({}, this._zfile_opts);
  },
  /**
   * Returns the offset based on the last transferred chunk.
   * @returns {number} The file offset (i.e., number of bytes after
   *  the start of the file).
   */
  get_offset: function get_offset() {
    return this._file_offset;
  }
};

/**
 * A class to represent a sender’s interaction with a single file
 * transfer within a batch. When a receiver accepts an offer, the
 * Session instantiates this class and passes the instance as the
 * promise resolution from send_offer().
 *
 * @mixes Transfer_Offer_Mixin
 */
class Transfer {
  /**
   * Not called directly.
   */
  constructor(file_info, offset, send_func, end_func) {
    this._file_info = file_info;
    this._file_offset = offset || 0;
    this._send = send_func;
    this._end = end_func;
  }

  /**
   * Send a (non-terminal) piece of the file.
   *
   * @param { number[] | Uint8Array } array_like - The bytes to send.
   */
  send(array_like) {
    this._send(array_like);
    this._file_offset += array_like.length;
  }

  /**
   * Complete the file transfer.
   *
   * @param { number[] | Uint8Array } [array_like] - The last bytes to send.
   *
   * @return { Promise } Resolves when the receiver has indicated
   *      acceptance of the end of the file transfer.
   */
  end(array_like) {
    var ret = this._end(array_like || []);
    if (array_like) this._file_offset += array_like.length;
    return ret;
  }
}
Object.assign(Transfer.prototype, Transfer_Offer_Mixin);

/**
 * A class to represent a receiver’s interaction with a single file
 * transfer offer within a batch. There is functionality here to
 * skip or accept offered files and either to spool the packet
 * payloads or to handle them yourself.
 *
 * @mixes Transfer_Offer_Mixin
 */
class Offer extends _Eventer {
  /**
   * Not called directly.
   */
  constructor(zfile_opts, file_info, accept_func, skip_func) {
    super();
    this._zfile_opts = zfile_opts;
    this._file_info = file_info;
    this._accept_func = accept_func;
    this._skip_func = skip_func;
    this._Add_event("input");
    this._Add_event("complete");

    //Register this first so that application handlers receive
    //the updated offset.
    this.on("input", this._input_handler);
  }
  _verify_not_skipped() {
    if (this._skipped) {
      throw new Zmodem.Error("Already skipped!");
    }
  }

  /**
   * Tell the sender that you don’t want the offered file.
   *
   * You can send this in lieu of `accept()` or after it, e.g.,
   * if you find that the transfer is taking too long. Note that,
   * if you `skip()` after you `accept()`, you’ll likely have to
   * wait for buffers to clear out.
   *
   */
  skip() {
    this._verify_not_skipped();
    this._skipped = true;
    return this._skip_func.apply(this, arguments);
  }

  /**
   * Tell the sender to send the offered file.
   *
   * @param {Object} [opts] - Can be:
   * @param {string} [opts.oninput=spool_uint8array] - Can be:
   *
   * - `spool_uint8array`: Stores the ZMODEM
   *     packet payloads as Uint8Array instances.
   *     This makes for an easy transition to a Blob,
   *     which JavaScript can use to save the file to disk.
   *
   * - `spool_array`: Stores the ZMODEM packet payloads
   *     as Array instances. Each value is an octet value.
   *
   * - (function): A handler that receives each payload
   *     as it arrives. The Offer object does not store
   *     the payloads internally when thus configured.
   *
   * @return { Promise } Resolves when the file is fully received.
   *      If the Offer has been spooling
   *      the packet payloads, the promise resolves with an Array
   *      that contains those payloads.
   */
  accept(opts) {
    this._verify_not_skipped();
    if (this._accepted) {
      throw new Zmodem.Error("Already accepted!");
    }
    this._accepted = true;
    if (!opts) opts = {};
    this._file_offset = opts.offset || 0;
    switch (opts.on_input) {
      case null:
      case undefined:
      case "spool_array":
      case DEFAULT_RECEIVE_INPUT_MODE:
        //default
        this._spool = [];
        break;
      default:
        if (typeof opts.on_input !== "function") {
          throw "Invalid “on_input”: " + opts.on_input;
        }
    }
    this._input_handler_mode = opts.on_input || DEFAULT_RECEIVE_INPUT_MODE;
    return this._accept_func(this._file_offset).then(this._get_spool.bind(this));
  }
  _input_handler(payload) {
    this._file_offset += payload.length;
    if (typeof this._input_handler_mode === "function") {
      this._input_handler_mode(payload);
    } else {
      if (this._input_handler_mode === DEFAULT_RECEIVE_INPUT_MODE) {
        payload = new Uint8Array(payload);
      }

      //sanity
      else if (this._input_handler_mode !== "spool_array") {
        throw new Zmodem.Error("WTF?? _input_handler_mode = " + this._input_handler_mode);
      }
      this._spool.push(payload);
    }
  }
  _get_spool() {
    return this._spool;
  }
}
Object.assign(Offer.prototype, Transfer_Offer_Mixin);

//Curious that ZSINIT isn’t here … but, lsz sends it as hex.
const SENDER_BINARY_HEADER = {
  ZFILE: true,
  ZDATA: true
};

/**
 * A class that encapsulates behavior for a ZMODEM sender.
 *
 * @extends Session
 */
Zmodem.Session.Send = class ZmodemSendSession extends Zmodem.Session {
  /**
   * Not called directly.
   */
  constructor(zrinit_hdr) {
    super();
    if (!zrinit_hdr) {
      throw "Need first header!";
    } else if (zrinit_hdr.NAME !== "ZRINIT") {
      throw "First header should be ZRINIT, not " + zrinit_hdr.NAME;
    }
    this._last_header_name = 'ZRINIT';

    //We don’t need to send crc32. Even if the other side can grok it,
    //there’s no point to sending it since, for now, we assume we’re
    //on a reliable connection, e.g., TCP. Ideally we’d just forgo
    //CRC checks completely, but ZMODEM doesn’t allow that.
    //
    //If we *were* to start using crc32, we’d update this every time
    //we send a header.
    this._subpacket_encode_func = 'encode16';
    this._zencoder = new Zmodem.ZDLE();
    this._consume_ZRINIT(zrinit_hdr);
    this._file_offset = 0;
    var zrqinit_count = 0;
    this._start_keepalive_on_set_sender = true;

    //lrzsz will send ZRINIT until it gets an offer. (keep-alive?)
    //It sends 4 additional ones after the initial ZRINIT and, if
    //no response is received, starts sending “C” (0x43, 67) as if to
    //try to downgrade to XMODEM or YMODEM.
    //var sess = this;
    //this._prepare_to_receive_ZRINIT( function keep_alive() {
    //    sess._prepare_to_receive_ZRINIT(keep_alive);
    //} );

    //queue up the ZSINIT flag to send -- but seems useless??

    /*
    Object.assign(
        this._on_evt,
        {
            file_received: [],
        },
    };
    */
  }

  /**
   * Sets the sender function. The first time this is called,
   * it will also initiate a keepalive using ZSINIT until the
   * first file is sent.
   *
   * @param {Function} func - The function to call.
   *  It will receive an Array with the relevant octets.
   *
   * @return {Session} The session object (for chaining).
   */
  set_sender(func) {
    super.set_sender(func);
    if (this._start_keepalive_on_set_sender) {
      this._start_keepalive_on_set_sender = false;
      this._start_keepalive();
    }
    return this;
  }

  //7.3.3 .. The sender also uses hex headers when they are
  //not followed by binary data subpackets.
  //
  //FG: … or when the header is ZSINIT? That’s what lrzsz does, anyway.
  //Then it sends a single NUL byte as the payload to an end_ack subpacket.
  _get_header_formatter(name) {
    return SENDER_BINARY_HEADER[name] ? "to_binary16" : "to_hex";
  }

  //In order to keep lrzsz from timing out, we send ZSINIT every 5 seconds.
  //Maybe make this configurable?
  _start_keepalive() {
    //if (this._keepalive_promise) throw "Keep-alive already started!";
    if (!this._keepalive_promise) {
      var sess = this;
      this._keepalive_promise = new Promise(function (resolve) {
        //console.log("SETTING KEEPALIVE TIMEOUT");
        sess._keepalive_timeout = setTimeout(resolve, KEEPALIVE_INTERVAL);
      }).then(function () {
        sess._next_header_handler = {
          ZACK: function () {
            //We’re going to need to ensure that the
            //receiver is ready for all control characters
            //to be escaped. If we’ve already sent a ZSINIT
            //and gotten a response, then we know that that
            //work is already done later on when we actually
            //send an offer.
            sess._got_ZSINIT_ZACK = true;
          }
        };
        sess._send_ZSINIT();
        sess._keepalive_promise = null;
        sess._start_keepalive();
      });
    }
  }
  _stop_keepalive() {
    if (this._keepalive_promise) {
      //console.log("STOPPING KEEPALIVE");
      clearTimeout(this._keepalive_timeout);
      this._keep_alive_promise = null;
    }
  }
  _send_ZSINIT() {
    //See note at _ensure_receiver_escapes_ctrl_chars()
    //for why we have to pass ESCCTL.

    var zsinit_flags = [];
    if (this._zencoder.escapes_ctrl_chars()) {
      zsinit_flags.push("ESCCTL");
    }
    this._send_header_and_data(["ZSINIT", zsinit_flags], [0], "end_ack");
  }
  _consume_ZRINIT(hdr) {
    this._last_ZRINIT = hdr;
    if (hdr.get_buffer_size()) {
      throw "Buffer size (" + hdr.get_buffer_size() + ") is unsupported!";
    }
    if (!hdr.can_full_duplex()) {
      throw "Half-duplex I/O is unsupported!";
    }
    if (!hdr.can_overlap_io()) {
      throw "Non-overlap I/O is unsupported!";
    }
    if (hdr.escape_8th_bit()) {
      throw "8-bit escaping is unsupported!";
    }
    if (FORCE_ESCAPE_CTRL_CHARS) {
      this._zencoder.set_escape_ctrl_chars(true);
      if (!hdr.escape_ctrl_chars()) {
        console.debug("Peer didn’t request escape of all control characters. Will send ZSINIT to force recognition of escaped control characters.");
      }
    } else {
      this._zencoder.set_escape_ctrl_chars(hdr.escape_ctrl_chars());
    }
  }

  //https://stackoverflow.com/questions/23155939/missing-0xf-and-0x16-when-binary-data-through-virtual-serial-port-pair-created-b
  //^^ Because of that, we always escape control characters.
  //The alternative would be that lrz would never receive those
  //two bytes from zmodem.js.
  _ensure_receiver_escapes_ctrl_chars() {
    var promise;
    var needs_ZSINIT = !this._last_ZRINIT.escape_ctrl_chars() && !this._got_ZSINIT_ZACK;
    if (needs_ZSINIT) {
      var sess = this;
      promise = new Promise(function (res) {
        sess._next_header_handler = {
          ZACK: hdr => {
            res();
          }
        };
        sess._send_ZSINIT();
      });
    } else {
      promise = Promise.resolve();
    }
    return promise;
  }
  _convert_params_to_offer_payload_array(params) {
    params = Zmodem.Validation.offer_parameters(params);
    var subpacket_payload = params.name + "\x00";
    var subpacket_space_pieces = [(params.size || 0).toString(10), params.mtime ? params.mtime.toString(8) : "0", params.mode ? (0x8000 | params.mode).toString(8) : "0", "0" //serial
    ];

    if (params.files_remaining) {
      subpacket_space_pieces.push(params.files_remaining);
      if (params.bytes_remaining) {
        subpacket_space_pieces.push(params.bytes_remaining);
      }
    }
    subpacket_payload += subpacket_space_pieces.join(" ");
    return this._string_to_octets(subpacket_payload);
  }

  /**
   * Send an offer to the receiver.
   *
   * @param {FileDetails} params - All about the file you want to transfer.
   *
   * @returns {Promise} If the receiver accepts the offer, then the
   * resolution is a Transfer object; otherwise the resolution is
   * undefined.
   */
  send_offer(params) {
    if (Zmodem.DEBUG) {
      console.debug("SENDING OFFER", params);
    }
    if (!params) throw "need file params!";
    if (this._sending_file) throw "Already sending file!";
    var payload_array = this._convert_params_to_offer_payload_array(params);
    this._stop_keepalive();
    var sess = this;
    function zrpos_handler_setter_func() {
      sess._next_header_handler = {
        // The receiver may send ZRPOS in at least two cases:
        //
        // 1) A malformed subpacket arrived, so we need to
        // “rewind” a bit and continue from the receiver’s
        // last-successful location in the file.
        //
        // 2) The receiver hasn’t gotten any data for a bit,
        // so it sends ZRPOS as a “ping”.
        //
        // Case #1 shouldn’t happen since zmodem.js requires a
        // reliable transport. Case #2, though, can happen due
        // to either normal network congestion or errors in
        // implementation. In either case, there’s nothing for
        // us to do but to ignore the ZRPOS, with an optional
        // warning.
        //
        ZRPOS: function (hdr) {
          if (Zmodem.DEBUG) {
            console.warn("Mid-transfer ZRPOS … implementation error?");
          }
          zrpos_handler_setter_func();
        }
      };
    }
    ;
    var doer_func = function () {
      //return Promise object that is fulfilled when the ZRPOS or ZSKIP arrives.
      //The promise value is the byte offset, or undefined for ZSKIP.
      //If ZRPOS arrives, then send ZDATA(0) and set this._sending_file.
      var handler_setter_promise = new Promise(function (res) {
        sess._next_header_handler = {
          ZSKIP: function () {
            sess._start_keepalive();
            res();
          },
          ZRPOS: function (hdr) {
            sess._sending_file = true;
            zrpos_handler_setter_func();
            res(new Transfer(params, hdr.get_offset(), sess._send_interim_file_piece.bind(sess), sess._end_file.bind(sess)));
          }
        };
      });
      sess._send_header_and_data(["ZFILE"], payload_array, "end_ack");
      delete sess._sent_ZDATA;
      return handler_setter_promise;
    };
    if (FORCE_ESCAPE_CTRL_CHARS) {
      return this._ensure_receiver_escapes_ctrl_chars().then(doer_func);
    }
    return doer_func();
  }
  _send_header_and_data(hdr_name_and_args, data_arr, frameend) {
    var bytes_hdr = this._create_header_bytes(hdr_name_and_args);
    var data_bytes = this._build_subpacket_bytes(data_arr, frameend);
    bytes_hdr[0].push.apply(bytes_hdr[0], data_bytes);
    if (Zmodem.DEBUG) {
      this._log_header("SENDING HEADER", bytes_hdr[1]);
      console.debug(this.type, "-- HEADER PAYLOAD:", frameend, data_bytes.length);
    }
    this._sender(bytes_hdr[0]);
    this._last_sent_header = bytes_hdr[1];
  }
  _build_subpacket_bytes(bytes_arr, frameend) {
    var subpacket = Zmodem.Subpacket.build(bytes_arr, frameend);
    return subpacket[this._subpacket_encode_func](this._zencoder);
  }
  _build_and_send_subpacket(bytes_arr, frameend) {
    this._sender(this._build_subpacket_bytes(bytes_arr, frameend));
  }
  _string_to_octets(string) {
    if (!this._textencoder) {
      this._textencoder = new Zmodem.Text.Encoder();
    }
    var uint8arr = this._textencoder.encode(string);
    return Array.prototype.slice.call(uint8arr);
  }

  /*
  Potential future support for responding to ZRPOS:
  send_file_offset(offset) {
  }
  */

  /*
      Sending logic works thus:
          - ASSUME the receiver can overlap I/O (CANOVIO)
              (so fail if !CANFDX || !CANOVIO)
          - Sender opens the firehose … all ZCRCG (!end/!ack)
              until the end, when we send a ZCRCE (end/!ack)
              NB: try 8k/32k/64k chunk sizes? Looks like there’s
              no need to change the packet otherwise.
  */
  //TODO: Put this on a Transfer object similar to what Receive uses?
  _send_interim_file_piece(bytes_obj) {
    //We don’t ask the receiver to confirm because there’s no need.
    this._send_file_part(bytes_obj, "no_end_no_ack");

    //This pattern will allow
    //error-correction without buffering the entire stream in JS.
    //For now the promise is always resolved, but in the future we
    //can make it only resolve once we’ve gotten acknowledgement.
    return Promise.resolve();
  }
  _ensure_we_are_sending() {
    if (!this._sending_file) throw "Not sending a file currently!";
  }

  //This resolves once we receive ZEOF.
  _end_file(bytes_obj) {
    this._ensure_we_are_sending();

    //Is the frame-end-ness of this last packet redundant
    //with the ZEOF packet?? - No. It signals the receiver that
    //the next thing to expect is a header, not a packet.

    //no-ack, following lrzsz’s example
    this._send_file_part(bytes_obj, "end_no_ack");
    var sess = this;

    //Register this before we send ZEOF in case of local round-trip.
    //(Basically just for synchronous testing, but.)
    var ret = new Promise(function (res) {
      //console.log("UNSETTING SENDING FLAG");
      sess._sending_file = false;
      sess._prepare_to_receive_ZRINIT(res);
    });
    this._send_header("ZEOF", this._file_offset);
    this._file_offset = 0;
    return ret;
  }

  //Called at the beginning of our session
  //and also when we’re done sending a file.
  _prepare_to_receive_ZRINIT(after_consume) {
    this._next_header_handler = {
      ZRINIT: function (hdr) {
        this._consume_ZRINIT(hdr);
        if (after_consume) after_consume();
      }
    };
  }

  /**
   * Signal to the receiver that the ZMODEM session is wrapping up.
   *
   * @returns {Promise} Resolves when the receiver has responded to
   * our signal that the session is over.
   */
  close() {
    var ok_to_close = this._last_header_name === "ZRINIT";
    if (!ok_to_close) {
      ok_to_close = this._last_header_name === "ZSKIP";
    }
    if (!ok_to_close) {
      ok_to_close = this._last_sent_header.name === "ZSINIT" && this._last_header_name === "ZACK";
    }
    if (!ok_to_close) {
      throw "Can’t close; last received header was “" + this._last_header_name + "”";
    }
    var sess = this;
    var ret = new Promise(function (res, rej) {
      sess._next_header_handler = {
        ZFIN: function () {
          sess._sender(OVER_AND_OUT);
          sess._sent_OO = true;
          sess._on_session_end();
          res();
        }
      };
    });
    this._send_header("ZFIN");
    return ret;
  }
  _has_ended() {
    return this.aborted() || !!this._sent_OO;
  }
  _send_file_part(bytes_obj, final_packetend) {
    if (!this._sent_ZDATA) {
      this._send_header("ZDATA", this._file_offset);
      this._sent_ZDATA = true;
    }
    var obj_offset = 0;
    var bytes_count = bytes_obj.length;

    //We have to go through at least once in event of an
    //empty buffer, e.g., an empty end_file.
    while (true) {
      var chunk_size = Math.min(obj_offset + MAX_CHUNK_LENGTH, bytes_count) - obj_offset;
      var at_end = chunk_size + obj_offset >= bytes_count;
      var chunk = bytes_obj.slice(obj_offset, obj_offset + chunk_size);
      if (!(chunk instanceof Array)) {
        chunk = Array.prototype.slice.call(chunk);
      }
      this._build_and_send_subpacket(chunk, at_end ? final_packetend : "no_end_no_ack");
      this._file_offset += chunk_size;
      obj_offset += chunk_size;
      if (obj_offset >= bytes_count) break;
    }
  }
  _consume_first() {
    if (!this._parse_and_consume_header()) {
      //When the ZMODEM receive program starts, it immediately sends
      //a ZRINIT header to initiate ZMODEM file transfers, or a
      //ZCHALLENGE header to verify the sending program. The receive
      //program resends its header at response time (default 10 second)
      //intervals for a suitable period of time (40 seconds total)
      //before falling back to YMODEM protocol.
      if (this._input_buffer.join() === "67") {
        throw "Receiver has fallen back to YMODEM.";
      }
    }
  }
  _on_session_end() {
    this._stop_keepalive();
    super._on_session_end();
  }
};
Object.assign(Zmodem.Session.Send.prototype, {
  type: "send"
});

/***/ }),

/***/ 9918:
/*!**************************************************!*\
  !*** ./node_modules/zmodem.js/src/zsubpacket.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zcrc */ 7009), __webpack_require__(/*! ./zdle */ 1841), __webpack_require__(/*! ./zmlib */ 250), __webpack_require__(/*! ./zerror */ 6273));
const ZCRCE = 0x68,
  // 'h', 104, frame ends, header packet follows
  ZCRCG = 0x69,
  // 'i', 105, frame continues nonstop
  ZCRCQ = 0x6a,
  // 'j', 106, frame continues, ZACK expected
  ZCRCW = 0x6b // 'k', 107, frame ends, ZACK expected
;

var SUBPACKET_BUILDER;

/** Class that represents a ZMODEM data subpacket. */
Zmodem.Subpacket = class ZmodemSubpacket {
  /**
   * Build a Subpacket subclass given a payload and frame end string.
   *
   * @param {Array} octets - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *
   * @param {string} frameend - One of:
   * - `no_end_no_ack`
   * - `end_no_ack`
   * - `no_end_ack` (unused currently)
   * - `end_ack`
   *
   * @returns {Subpacket} An instance of the appropriate Subpacket subclass.
   */
  static build(octets, frameend) {
    //TODO: make this better
    var Ctr = SUBPACKET_BUILDER[frameend];
    if (!Ctr) {
      throw "No subpacket type “" + frameend + "” is defined! Try one of: " + Object.keys(SUBPACKET_BUILDER).join(", ");
    }
    return new Ctr(octets);
  }

  /**
   * Return the octet values array that represents the object
   * encoded with a 16-bit CRC.
   *
   * @param {ZDLE} zencoder - A ZDLE instance to use for ZDLE encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  encode16(zencoder) {
    return this._encode(zencoder, Zmodem.CRC.crc16);
  }

  /**
   * Return the octet values array that represents the object
   * encoded with a 32-bit CRC.
   *
   * @param {ZDLE} zencoder - A ZDLE instance to use for ZDLE encoding.
   *
   * @returns {number[]} An array of octet values suitable for sending
   *      as binary data.
   */
  encode32(zencoder) {
    return this._encode(zencoder, Zmodem.CRC.crc32);
  }

  /**
   * Return the subpacket payload’s octet values.
   *
   * NOTE: For speed, this returns the actual data in the subpacket;
   * if you mutate this return value, you alter the Subpacket object
   * internals. This is OK if you won’t need the Subpacket anymore, but
   * just be careful.
   *
   * @returns {number[]} The subpacket’s payload, represented as an
   * array of octet values. **DO NOT ALTER THIS ARRAY** unless you
   * no longer need the Subpacket.
   */
  get_payload() {
    return this._payload;
  }

  /**
   * Parse out a Subpacket object from a given array of octet values,
   * assuming a 16-bit CRC.
   *
   * An exception is thrown if the given bytes are definitively invalid
   * as subpacket values with 16-bit CRC.
   *
   * @param {number[]} octets - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {Subpacket|undefined} An instance of the appropriate Subpacket
   *      subclass, or undefined if not enough octet values are given
   *      to determine whether there is a valid subpacket here or not.
   */
  static parse16(octets) {
    return ZmodemSubpacket._parse(octets, 2);
  }

  //parse32 test:
  //[102, 105, 108, 101, 110, 97, 109, 101, 119, 105, 116, 104, 115, 112, 97, 99, 101, 115, 0, 49, 55, 49, 51, 49, 52, 50, 52, 51, 50, 49, 55, 50, 49, 48, 48, 54, 52, 52, 48, 49, 49, 55, 0, 43, 8, 63, 115, 23, 17]

  /**
   * Same as parse16(), but assuming a 32-bit CRC.
   *
   * @param {number[]} octets - The octet values to parse.
   *      Each array member should be an 8-bit unsigned integer (0-255).
   *      This object is mutated in the function.
   *
   * @returns {Subpacket|undefined} An instance of the appropriate Subpacket
   *      subclass, or undefined if not enough octet values are given
   *      to determine whether there is a valid subpacket here or not.
   */
  static parse32(octets) {
    return ZmodemSubpacket._parse(octets, 4);
  }

  /**
   * Not used directly.
   */
  constructor(payload) {
    this._payload = payload;
  }
  _encode(zencoder, crc_func) {
    return zencoder.encode(this._payload.slice(0)).concat([Zmodem.ZMLIB.ZDLE, this._frameend_num], zencoder.encode(crc_func(this._payload.concat(this._frameend_num))));
  }

  //Because of ZDLE encoding, we’ll never see any of the frame-end octets
  //in a stream except as the ends of data payloads.
  static _parse(bytes_arr, crc_len) {
    var end_at;
    var creator;

    //These have to be written in decimal since they’re lookup keys.
    var _frame_ends_lookup = {
      104: ZEndNoAckSubpacket,
      105: ZNoEndNoAckSubpacket,
      106: ZNoEndAckSubpacket,
      107: ZEndAckSubpacket
    };
    var zdle_at = 0;
    while (zdle_at < bytes_arr.length) {
      zdle_at = bytes_arr.indexOf(Zmodem.ZMLIB.ZDLE, zdle_at);
      if (zdle_at === -1) return;
      var after_zdle = bytes_arr[zdle_at + 1];
      creator = _frame_ends_lookup[after_zdle];
      if (creator) {
        end_at = zdle_at + 1;
        break;
      }
      zdle_at++;
    }
    if (!creator) return;
    var frameend_num = bytes_arr[end_at];

    //sanity check
    if (bytes_arr[end_at - 1] !== Zmodem.ZMLIB.ZDLE) {
      throw "Byte before frame end should be ZDLE, not " + bytes_arr[end_at - 1];
    }
    var zdle_encoded_payload = bytes_arr.splice(0, end_at - 1);
    var got_crc = Zmodem.ZDLE.splice(bytes_arr, 2, crc_len);
    if (!got_crc) {
      //got payload but no CRC yet .. should be rare!

      //We have to put the ZDLE-encoded payload back before returning.
      bytes_arr.unshift.apply(bytes_arr, zdle_encoded_payload);
      return;
    }
    var payload = Zmodem.ZDLE.decode(zdle_encoded_payload);

    //We really shouldn’t need to do this, but just for good measure.
    //I suppose it’s conceivable this may run over UDP or something?
    Zmodem.CRC[crc_len === 2 ? "verify16" : "verify32"](payload.concat([frameend_num]), got_crc);
    return new creator(payload, got_crc);
  }
};
class ZEndSubpacketBase extends Zmodem.Subpacket {
  frame_end() {
    return true;
  }
}
class ZNoEndSubpacketBase extends Zmodem.Subpacket {
  frame_end() {
    return false;
  }
}

//Used for end-of-file.
class ZEndNoAckSubpacket extends ZEndSubpacketBase {
  ack_expected() {
    return false;
  }
}
ZEndNoAckSubpacket.prototype._frameend_num = ZCRCE;

//Used for ZFILE and ZSINIT payloads.
class ZEndAckSubpacket extends ZEndSubpacketBase {
  ack_expected() {
    return true;
  }
}
ZEndAckSubpacket.prototype._frameend_num = ZCRCW;

//Used for ZDATA, prior to end-of-file.
class ZNoEndNoAckSubpacket extends ZNoEndSubpacketBase {
  ack_expected() {
    return false;
  }
}
ZNoEndNoAckSubpacket.prototype._frameend_num = ZCRCG;

//only used if receiver can full-duplex
class ZNoEndAckSubpacket extends ZNoEndSubpacketBase {
  ack_expected() {
    return true;
  }
}
ZNoEndAckSubpacket.prototype._frameend_num = ZCRCQ;
SUBPACKET_BUILDER = {
  end_no_ack: ZEndNoAckSubpacket,
  end_ack: ZEndAckSubpacket,
  no_end_no_ack: ZNoEndNoAckSubpacket,
  no_end_ack: ZNoEndAckSubpacket
};

/***/ }),

/***/ 7798:
/*!***************************************************!*\
  !*** ./node_modules/zmodem.js/src/zvalidation.js ***!
  \***************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;
Object.assign(Zmodem, __webpack_require__(/*! ./zerror */ 6273));
const LOOKS_LIKE_ZMODEM_HEADER = /\*\x18[AC]|\*\*\x18B/;
function _validate_number(key, value) {
  if (value < 0) {
    throw new Zmodem.Error("validation", "“" + key + "” (" + value + ") must be nonnegative.");
  }
  if (value !== Math.floor(value)) {
    throw new Zmodem.Error("validation", "“" + key + "” (" + value + ") must be an integer.");
  }
}

/** Validation logic for zmodem.js
 *
 * @exports Validation
 */
Zmodem.Validation = {
  /**
   * Validates and normalizes a set of parameters for an offer to send.
   * NOTE: This returns “mtime” as epoch seconds, not a Date. This is
   * inconsistent with the get_details() method in Session, but it’s
   * more useful for sending over the wire.
   *
   * @param {FileDetails} params - The file details. Some fairly trivial
   * variances from the specification are allowed.
   *
   * @return {FileDetails} The parameters that should be sent. `mtime`
   * will be a Date rather than a number.
   */
  offer_parameters: function offer_parameters(params) {
    if (!params.name) {
      throw new Zmodem.Error("validation", "Need “name”!");
    }
    if (typeof params.name !== "string") {
      throw new Zmodem.Error("validation", "“name” (" + params.name + ") must be a string!");
    }

    //So that we can override values as is useful
    //without affecting the passed-in object.
    params = Object.assign({}, params);
    if (LOOKS_LIKE_ZMODEM_HEADER.test(params.name)) {
      console.warn("The filename " + JSON.stringify(name) + " contains characters that look like a ZMODEM header. This could corrupt the ZMODEM session; consider renaming it so that the filename doesn’t contain control characters.");
    }
    if (params.serial !== null && params.serial !== undefined) {
      throw new Zmodem.Error("validation", "“serial” is meaningless.");
    }
    params.serial = null;
    ["size", "mode", "files_remaining", "bytes_remaining"].forEach(function (k) {
      var ok;
      switch (typeof params[k]) {
        case "object":
          ok = params[k] === null;
          break;
        case "undefined":
          params[k] = null;
          ok = true;
          break;
        case "number":
          _validate_number(k, params[k]);
          ok = true;
          break;
      }
      if (!ok) {
        throw new Zmodem.Error("validation", "“" + k + "” (" + params[k] + ") must be null, undefined, or a number.");
      }
    });
    if (typeof params.mode === "number") {
      params.mode |= 0x8000;
    }
    if (params.files_remaining === 0) {
      throw new Zmodem.Error("validation", "“files_remaining”, if given, must be positive.");
    }
    var mtime_ok;
    switch (typeof params.mtime) {
      case "object":
        mtime_ok = true;
        if (params.mtime instanceof Date) {
          var date_obj = params.mtime;
          params.mtime = Math.floor(date_obj.getTime() / 1000);
          if (params.mtime < 0) {
            throw new Zmodem.Error("validation", "“mtime” (" + date_obj + ") must not be earlier than 1970.");
          }
        } else if (params.mtime !== null) {
          mtime_ok = false;
        }
        break;
      case "undefined":
        params.mtime = null;
        mtime_ok = true;
        break;
      case "number":
        _validate_number("mtime", params.mtime);
        mtime_ok = true;
        break;
    }
    if (!mtime_ok) {
      throw new Zmodem.Error("validation", "“mtime” (" + params.mtime + ") must be null, undefined, a Date, or a number.");
    }
    return params;
  }
};

/***/ }),

/***/ 3326:
/*!*******************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/appearanceSettingsTab.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 */ 3577);
/* 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 */ 4513);
/* 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, "color-scheme-preview{flex-shrink:0;margin-bottom:20px}textarea{font-family:\"Source Code Pro\",monospace;min-height:120px}", "",{"version":3,"sources":["webpack://./src/components/appearanceSettingsTab.component.scss"],"names":[],"mappings":"AAAA,qBACI,aAAA,CACA,kBAAA,CAGJ,SACI,uCAAA,CACA,gBAAA","sourcesContent":["color-scheme-preview {\r\n    flex-shrink: 0;\r\n    margin-bottom: 20px;\r\n}\r\n\r\ntextarea {\r\n    font-family: 'Source Code Pro', monospace;\r\n    min-height: 120px;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3577);
/* 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 */ 4513);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{flex:auto;display:flex;flex-direction:column;position:relative}:host>.content{flex:auto;position:relative;display:block;overflow:hidden;margin:max(0px,30px*var(--spaciness) - 15px);transition:opacity ease-out .25s;opacity:0}:host>.content div[style]:last-child{background:#000 !important;color:#fff !important}:host>terminal-toolbar{position:absolute;top:0;left:0;right:0;z-index:4;opacity:0;transition:.25s opacity;will-change:transform;transform:translate(0, -100px);transition:.25s transform ease-out;height:40px}:host.toolbar-revealed>terminal-toolbar,:host.toolbar-pinned>terminal-toolbar{opacity:1;transform:translate(0, 0)}:host>.toolbar-pin-button{position:absolute;right:34px;top:5px;z-index:4;background:rgba(0,0,0,.2784313725)}:host.toolbar-pinned>.terminal-toolbar-spacer{width:100%;height:40px}:host-context(.with-title-inset){padding-top:20px}:host-context(.with-title-inset) terminal-toolbar{padding-left:90px}", "",{"version":3,"sources":["webpack://./src/components/baseTerminalTab.component.scss"],"names":[],"mappings":"AAAA,MACI,SAAA,CACA,YAAA,CACA,qBAAA,CAEA,iBAAA,CAEA,eACI,SAAA,CACA,iBAAA,CACA,aAAA,CACA,eAAA,CACA,4CAAA,CACA,gCAAA,CACA,SAAA,CAEA,qCACI,0BAAA,CACA,qBAAA,CAMR,uBACI,iBAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,SAAA,CAEA,SAAA,CACA,uBAAA,CACA,qBAAA,CACA,8BAAA,CACA,kCAAA,CACA,WAdY,CAkBZ,8EACI,SAAA,CACA,yBAAA,CAIR,0BACI,iBAAA,CACA,UAAA,CACA,OAAA,CACA,SAAA,CACA,kCAAA,CAGJ,8CACI,UAAA,CACA,WAlCY,CAsCpB,iCACI,gBAAA,CAEA,kDACI,iBAAA","sourcesContent":[":host {\r\n    flex: auto;\r\n    display: flex;\r\n    flex-direction: column;\r\n    // overflow: hidden;\r\n    position: relative;\r\n\r\n    &> .content {\r\n        flex: auto;\r\n        position: relative;\r\n        display: block;\r\n        overflow: hidden;\r\n        margin: calc(max(0px, 30px * var(--spaciness) - 15px));\r\n        transition: opacity ease-out 0.25s;\r\n        opacity: 0;\r\n\r\n        div[style]:last-child {\r\n            background: black !important;\r\n            color: white !important;\r\n        }\r\n    }\r\n\r\n    $toolbarHeight: 40px;\r\n\r\n    > terminal-toolbar {\r\n        position: absolute;\r\n        top: 0;\r\n        left: 0;\r\n        right: 0;\r\n        z-index: 4;\r\n\r\n        opacity: 0;\r\n        transition: 0.25s opacity;\r\n        will-change: transform;\r\n        transform: translate(0, -100px);\r\n        transition: 0.25s transform ease-out;\r\n        height: $toolbarHeight;\r\n    }\r\n\r\n    &.toolbar-revealed, &.toolbar-pinned {\r\n        > terminal-toolbar {\r\n            opacity: 1;\r\n            transform: translate(0, 0);\r\n        }\r\n    }\r\n\r\n    > .toolbar-pin-button {\r\n        position: absolute;\r\n        right: 34px;\r\n        top: 5px;\r\n        z-index: 4;\r\n        background: #00000047;\r\n    }\r\n\r\n    &.toolbar-pinned > .terminal-toolbar-spacer {\r\n        width: 100%;\r\n        height: $toolbarHeight;\r\n    }\r\n}\r\n\r\n:host-context(.with-title-inset) {\r\n    padding-top: 20px;\r\n\r\n    terminal-toolbar {\r\n        padding-left: 90px;\r\n    }\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 3729:
/*!*********************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorPicker.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 */ 3577);
/* 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 */ 4513);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{display:inline-block}div{width:32px;height:32px;box-shadow:0 1px 1px rgba(0,0,0,.5);border:none;margin:5px 10px 5px 0;border-radius:2px;text-align:center;font-weight:bold;font-size:17px;display:inline-block;color:#fff;line-height:31px;text-shadow:0 1px 1px rgba(0,0,0,.5)}", "",{"version":3,"sources":["webpack://./src/components/colorPicker.component.scss"],"names":[],"mappings":"AAAA,MACI,oBAAA,CAGJ,IACI,UAAA,CACA,WAAA,CACA,mCAAA,CACA,WAAA,CACA,qBAAA,CACA,iBAAA,CACA,iBAAA,CACA,gBAAA,CACA,cAAA,CACA,oBAAA,CACA,UAAA,CACA,gBAAA,CACA,oCAAA","sourcesContent":[":host {\r\n    display: inline-block;\r\n}\r\n\r\ndiv {\r\n    width: 32px;\r\n    height: 32px;\r\n    box-shadow: 0 1px 1px rgba(0,0,0,.5);\r\n    border: none;\r\n    margin: 5px 10px 5px 0;\r\n    border-radius: 2px;\r\n    text-align: center;\r\n    font-weight: bold;\r\n    font-size: 17px;\r\n    display: inline-block;\r\n    color: #fff;\r\n    line-height: 31px;\r\n    text-shadow: 0 1px 1px rgba(0,0,0,.5);\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 4382:
/*!****************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorSchemePreview.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 */ 3577);
/* 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 */ 4513);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{display:block}.preview{margin-top:10px;margin-left:10px;padding:5px 10px;border-radius:4px;overflow:hidden}.preview span{white-space:pre}", "",{"version":3,"sources":["webpack://./src/components/colorSchemePreview.component.scss"],"names":[],"mappings":"AAAA,MACI,aAAA,CAGJ,SACI,eAAA,CACA,gBAAA,CACA,gBAAA,CACA,iBAAA,CACA,eAAA,CAEA,cACI,eAAA","sourcesContent":[":host {\r\n    display: block;\r\n}\r\n\r\n.preview {\r\n    margin-top: 10px;\r\n    margin-left: 10px;\r\n    padding: 5px 10px;\r\n    border-radius: 4px;\r\n    overflow: hidden;\r\n\r\n    span {\r\n        white-space: pre;\r\n    }\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 4017:
/*!********************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorSchemeSettingsTab.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 */ 3577);
/* 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 */ 4513);
/* 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, ".head{flex:none}.body{overflow:auto;flex:auto;min-height:0}.swatch{width:10px;height:10px;border-radius:50%;margin-right:3px;margin-bottom:3px;box-shadow:0 1px 1px rgba(0,0,0,.5)}.list-group-item color-scheme-preview{margin-left:14px}", "",{"version":3,"sources":["webpack://./src/components/colorSchemeSettingsTab.component.scss"],"names":[],"mappings":"AAAA,MACI,SAAA,CAGJ,MACI,aAAA,CACA,SAAA,CACA,YAAA,CAGJ,QACI,UAAA,CACA,WAAA,CACA,iBAAA,CACA,gBAAA,CACA,iBAAA,CACA,mCAAA,CAGJ,sCACI,gBAAA","sourcesContent":[".head {\r\n    flex: none;\r\n}\r\n\r\n.body {\r\n    overflow: auto;\r\n    flex: auto;\r\n    min-height: 0;\r\n}\r\n\r\n.swatch {\r\n    width: 10px;\r\n    height: 10px;\r\n    border-radius: 50%;\r\n    margin-right: 3px;\r\n    margin-bottom: 3px;\r\n    box-shadow: 0 1px 1px rgba(0, 0, 0, .5);\r\n}\r\n\r\n.list-group-item color-scheme-preview {\r\n    margin-left: 14px;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 2239:
/*!*********************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/searchPanel.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 */ 3577);
/* 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 */ 4513);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{position:fixed;width:600px;max-width:80vw;right:40px;z-index:5;border-radius:0 0 5px 5px;background:rgba(0,0,0,.95);border:1px solid rgba(0,0,0,.5);border-top:0;display:flex}:host button{padding:0 6px;margin:4px 2px;flex-shrink:0}.result-counter{font-size:.7rem;opacity:.5}::ng-deep svg{height:16px}", "",{"version":3,"sources":["webpack://./src/components/searchPanel.component.scss"],"names":[],"mappings":"AAAA,MACI,cAAA,CACA,WAAA,CACA,cAAA,CACA,UAAA,CACA,SAAA,CACA,yBAAA,CACA,0BAAA,CACA,+BAAA,CACA,YAAA,CACA,YAAA,CAEA,aACI,aAAA,CACA,cAAA,CACA,aAAA,CAIR,gBACI,eAAA,CACA,UAAA,CAGJ,cACI,WAAA","sourcesContent":[":host {\r\n    position: fixed;\r\n    width: 600px;\r\n    max-width: 80vw;\r\n    right: 40px;\r\n    z-index: 5;\r\n    border-radius: 0 0 5px 5px;\r\n    background: rgba(0, 0, 0, .95);\r\n    border: 1px solid rgba(0, 0, 0, .5);\r\n    border-top: 0;\r\n    display: flex;\r\n\r\n    button {\r\n        padding: 0 6px;\r\n        margin: 4px 2px;\r\n        flex-shrink: 0;\r\n    }\r\n}\r\n\r\n.result-counter {\r\n    font-size: 0.7rem;\r\n    opacity: .5;\r\n}\r\n\r\n::ng-deep svg {\r\n    height: 16px;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 5765:
/*!*************************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/terminalToolbar.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 */ 3577);
/* 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 */ 4513);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{padding:5px 15px 5px 15px;display:flex;z-index:3;overflow:hidden}:host ::ng-deep .btn{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.content{flex-grow:1;display:flex;align-items:center}.drag-handle{margin:0 10px 0 0;cursor:move;opacity:.3}", "",{"version":3,"sources":["webpack://./src/components/terminalToolbar.component.scss"],"names":[],"mappings":"AAAA,MACI,yBAAA,CACA,YAAA,CACA,SAAA,CACA,eAAA,CAEA,qBACI,kBAAA,CACA,sBAAA,CACA,eAAA,CAIR,SACI,WAAA,CACA,YAAA,CACA,kBAAA,CAGJ,aACI,iBAAA,CACA,WAAA,CACA,UAAA","sourcesContent":[":host {\r\n    padding: 5px 15px 5px 15px;\r\n    display: flex;\r\n    z-index: 3;\r\n    overflow: hidden;\r\n\r\n    ::ng-deep .btn {\r\n        white-space: nowrap;\r\n        text-overflow: ellipsis;\r\n        overflow: hidden;\r\n    }\r\n}\r\n\r\n.content {\r\n    flex-grow: 1;\r\n    display: flex;\r\n    align-items: center;\r\n}\r\n\r\n.drag-handle {\r\n    margin: 0 10px 0 0;\r\n    cursor: move;\r\n    opacity: .3;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 8551:
/*!*********************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!./node_modules/xterm/css/xterm.css ***!
  \*********************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__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 */ 3577);
/* 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 */ 4513);
/* 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, "/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author's permission):\n *   Fabrice Bellard's javascript vt100 for jslinux:\n *   http://bellard.org/jslinux/\n *   Copyright (c) 2011 Fabrice Bellard\n *   The original design remains. The terminal itself\n *   has been extended to include xterm CSI codes, among\n *   other features.\n */\n\n/**\n *  Default styles for xterm.js\n */\n\n.xterm {\n    cursor: text;\n    position: relative;\n    user-select: none;\n    -ms-user-select: none;\n    -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n    outline: none;\n}\n\n.xterm .xterm-helpers {\n    position: absolute;\n    top: 0;\n    /**\n     * The z-index of the helpers must be higher than the canvases in order for\n     * IMEs to appear on top.\n     */\n    z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n    padding: 0;\n    border: 0;\n    margin: 0;\n    /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n    position: absolute;\n    opacity: 0;\n    left: -9999em;\n    top: 0;\n    width: 0;\n    height: 0;\n    z-index: -5;\n    /** Prevent wrapping so the IME appears against the textarea at the correct position */\n    white-space: nowrap;\n    overflow: hidden;\n    resize: none;\n}\n\n.xterm .composition-view {\n    /* TODO: Composition position got messed up somewhere */\n    background: #000;\n    color: #FFF;\n    display: none;\n    position: absolute;\n    white-space: nowrap;\n    z-index: 1;\n}\n\n.xterm .composition-view.active {\n    display: block;\n}\n\n.xterm .xterm-viewport {\n    /* On OS X this is required in order for the scroll bar to appear fully opaque */\n    background-color: #000;\n    overflow-y: scroll;\n    cursor: default;\n    position: absolute;\n    right: 0;\n    left: 0;\n    top: 0;\n    bottom: 0;\n}\n\n.xterm .xterm-screen {\n    position: relative;\n}\n\n.xterm .xterm-screen canvas {\n    position: absolute;\n    left: 0;\n    top: 0;\n}\n\n.xterm .xterm-scroll-area {\n    visibility: hidden;\n}\n\n.xterm-char-measure-element {\n    display: inline-block;\n    visibility: hidden;\n    position: absolute;\n    top: 0;\n    left: -9999em;\n    line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n    cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n    cursor: pointer;\n}\n\n.xterm.column-select.focus {\n    /* Column selection mode */\n    cursor: crosshair;\n}\n\n.xterm .xterm-accessibility,\n.xterm .xterm-message {\n    position: absolute;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    z-index: 10;\n    color: transparent;\n}\n\n.xterm .live-region {\n    position: absolute;\n    left: -9999px;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n}\n\n.xterm-dim {\n    opacity: 0.5;\n}\n\n.xterm-underline-1 { text-decoration: underline; }\n.xterm-underline-2 { text-decoration: double underline; }\n.xterm-underline-3 { text-decoration: wavy underline; }\n.xterm-underline-4 { text-decoration: dotted underline; }\n.xterm-underline-5 { text-decoration: dashed underline; }\n\n.xterm-strikethrough {\n    text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n\tz-index: 6;\n\tposition: absolute;\n}\n\n.xterm-decoration-overview-ruler {\n    z-index: 7;\n    position: absolute;\n    top: 0;\n    right: 0;\n    pointer-events: none;\n}\n\n.xterm-decoration-top {\n    z-index: 2;\n    position: relative;\n}\n", "",{"version":3,"sources":["webpack://./node_modules/xterm/css/xterm.css"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;;AAEF;;EAEE;;AAEF;IACI,YAAY;IACZ,kBAAkB;IAClB,iBAAiB;IACjB,qBAAqB;IACrB,yBAAyB;AAC7B;;AAEA;;IAEI,aAAa;AACjB;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN;;;MAGE;IACF,UAAU;AACd;;AAEA;IACI,UAAU;IACV,SAAS;IACT,SAAS;IACT,uFAAuF;IACvF,kBAAkB;IAClB,UAAU;IACV,aAAa;IACb,MAAM;IACN,QAAQ;IACR,SAAS;IACT,WAAW;IACX,sFAAsF;IACtF,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;AAChB;;AAEA;IACI,uDAAuD;IACvD,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,UAAU;AACd;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,gFAAgF;IAChF,sBAAsB;IACtB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,QAAQ;IACR,OAAO;IACP,MAAM;IACN,SAAS;AACb;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,OAAO;IACP,MAAM;AACV;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,qBAAqB;IACrB,kBAAkB;IAClB,kBAAkB;IAClB,MAAM;IACN,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI,oFAAoF;IACpF,eAAe;AACnB;;AAEA;;IAEI,eAAe;AACnB;;AAEA;IACI,0BAA0B;IAC1B,iBAAiB;AACrB;;AAEA;;IAEI,kBAAkB;IAClB,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,aAAa;IACb,UAAU;IACV,WAAW;IACX,gBAAgB;AACpB;;AAEA;IACI,YAAY;AAChB;;AAEA,qBAAqB,0BAA0B,EAAE;AACjD,qBAAqB,iCAAiC,EAAE;AACxD,qBAAqB,+BAA+B,EAAE;AACtD,qBAAqB,iCAAiC,EAAE;AACxD,qBAAqB,iCAAiC,EAAE;;AAExD;IACI,6BAA6B;AACjC;;AAEA;CACC,UAAU;CACV,kBAAkB;AACnB;;AAEA;IACI,UAAU;IACV,kBAAkB;IAClB,MAAM;IACN,QAAQ;IACR,oBAAoB;AACxB;;AAEA;IACI,UAAU;IACV,kBAAkB;AACtB","sourcesContent":["/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author's permission):\n *   Fabrice Bellard's javascript vt100 for jslinux:\n *   http://bellard.org/jslinux/\n *   Copyright (c) 2011 Fabrice Bellard\n *   The original design remains. The terminal itself\n *   has been extended to include xterm CSI codes, among\n *   other features.\n */\n\n/**\n *  Default styles for xterm.js\n */\n\n.xterm {\n    cursor: text;\n    position: relative;\n    user-select: none;\n    -ms-user-select: none;\n    -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n    outline: none;\n}\n\n.xterm .xterm-helpers {\n    position: absolute;\n    top: 0;\n    /**\n     * The z-index of the helpers must be higher than the canvases in order for\n     * IMEs to appear on top.\n     */\n    z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n    padding: 0;\n    border: 0;\n    margin: 0;\n    /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n    position: absolute;\n    opacity: 0;\n    left: -9999em;\n    top: 0;\n    width: 0;\n    height: 0;\n    z-index: -5;\n    /** Prevent wrapping so the IME appears against the textarea at the correct position */\n    white-space: nowrap;\n    overflow: hidden;\n    resize: none;\n}\n\n.xterm .composition-view {\n    /* TODO: Composition position got messed up somewhere */\n    background: #000;\n    color: #FFF;\n    display: none;\n    position: absolute;\n    white-space: nowrap;\n    z-index: 1;\n}\n\n.xterm .composition-view.active {\n    display: block;\n}\n\n.xterm .xterm-viewport {\n    /* On OS X this is required in order for the scroll bar to appear fully opaque */\n    background-color: #000;\n    overflow-y: scroll;\n    cursor: default;\n    position: absolute;\n    right: 0;\n    left: 0;\n    top: 0;\n    bottom: 0;\n}\n\n.xterm .xterm-screen {\n    position: relative;\n}\n\n.xterm .xterm-screen canvas {\n    position: absolute;\n    left: 0;\n    top: 0;\n}\n\n.xterm .xterm-scroll-area {\n    visibility: hidden;\n}\n\n.xterm-char-measure-element {\n    display: inline-block;\n    visibility: hidden;\n    position: absolute;\n    top: 0;\n    left: -9999em;\n    line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n    cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n    cursor: pointer;\n}\n\n.xterm.column-select.focus {\n    /* Column selection mode */\n    cursor: crosshair;\n}\n\n.xterm .xterm-accessibility,\n.xterm .xterm-message {\n    position: absolute;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    z-index: 10;\n    color: transparent;\n}\n\n.xterm .live-region {\n    position: absolute;\n    left: -9999px;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n}\n\n.xterm-dim {\n    opacity: 0.5;\n}\n\n.xterm-underline-1 { text-decoration: underline; }\n.xterm-underline-2 { text-decoration: double underline; }\n.xterm-underline-3 { text-decoration: wavy underline; }\n.xterm-underline-4 { text-decoration: dotted underline; }\n.xterm-underline-5 { text-decoration: dashed underline; }\n\n.xterm-strikethrough {\n    text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n\tz-index: 6;\n\tposition: absolute;\n}\n\n.xterm-decoration-overview-ruler {\n    z-index: 7;\n    position: absolute;\n    top: 0;\n    right: 0;\n    pointer-events: none;\n}\n\n.xterm-decoration-top {\n    z-index: 2;\n    position: relative;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 1637:
/*!************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!./src/frontends/xterm.css ***!
  \************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__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 */ 3577);
/* 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 */ 4513);
/* 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__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_xterm_css_xterm_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! -!../../../node_modules/css-loader/dist/cjs.js!../../node_modules/xterm/css/xterm.css */ 8551);
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/getUrl.js */ 5681);
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3__);
// Imports




var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! ../fonts/SourceCodePro.ttf */ 5351), __webpack_require__.b);
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()));
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_node_modules_xterm_css_xterm_css__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3___default()(___CSS_LOADER_URL_IMPORT_0___);
// Module
___CSS_LOADER_EXPORT___.push([module.id, "@font-face {\r\n    font-family: \"monospace-fallback\";\r\n    src: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") format(\"truetype\");\r\n}\r\n\r\n.xterm-viewport::-webkit-scrollbar {\r\n    background: rgba(0, 0, 0, .125);\r\n}\r\n\r\n.xterm-viewport::-webkit-scrollbar-thumb {\r\n    background: rgba(255, 255, 255, .25);\r\n}\r\n\r\n.xterm-decoration-overview-ruler {\r\n    right: 1px;\r\n    pointer-events: none;\r\n}\r\n", "",{"version":3,"sources":["webpack://./src/frontends/xterm.css"],"names":[],"mappings":"AAEA;IACI,iCAAiC;IACjC,+DAAuD;AAC3D;;AAEA;IACI,+BAA+B;AACnC;;AAEA;IACI,oCAAoC;AACxC;;AAEA;IACI,UAAU;IACV,oBAAoB;AACxB","sourcesContent":["@import url(\"../../node_modules/xterm/css/xterm.css\");\r\n\r\n@font-face {\r\n    font-family: \"monospace-fallback\";\r\n    src: url(../fonts/SourceCodePro.ttf) format(\"truetype\");\r\n}\r\n\r\n.xterm-viewport::-webkit-scrollbar {\r\n    background: rgba(0, 0, 0, .125);\r\n}\r\n\r\n.xterm-viewport::-webkit-scrollbar-thumb {\r\n    background: rgba(255, 255, 255, .25);\r\n}\r\n\r\n.xterm-decoration-overview-ruler {\r\n    right: 1px;\r\n    pointer-events: none;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Ch3 class=\"mb-3\" translate\u003EAppearance\u003C\u002Fh3\u003E\n\u003Cdiv class=\"row\"\u003E\n  \u003Cdiv class=\"col-12 col-md-6\"\u003E\n    \u003Cdiv class=\"form-line\"\u003E\n      \u003Cdiv class=\"header\"\u003E\n        \u003Cdiv class=\"title\" translate\u003EFont\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"input-group w-75\"\u003E\n        \u003Cinput class=\"form-control w-75\" type=\"text\" [ngbTypeahead]=\"fontAutocomplete\" [(ngModel)]=\"config.store.terminal.font\" (ngModelChange)=\"config.save()\"\u003E\n        \u003Cinput class=\"form-control w-25\" type=\"number\" max=\"48\" [(ngModel)]=\"config.store.terminal.fontSize\" (ngModelChange)=\"fixFontSize(); config.save()\"\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"form-line\"\u003E\n      \u003Cdiv class=\"header\"\u003E\n        \u003Cdiv class=\"title\" translate\u003EEnable font ligatures\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Ctoggle [(ngModel)]=\"config.store.terminal.ligatures\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"form-line\"\u003E\n      \u003Cdiv class=\"header\"\u003E\n        \u003Cdiv class=\"title\" translate\u003ENormal font weight\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cinput class=\"form-control\" type=\"number\" min=\"100\" max=\"900\" step=\"100\" [(ngModel)]=\"config.store.terminal.fontWeight\" (ngModelChange)=\"config.save()\"\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"form-line\"\u003E\n      \u003Cdiv class=\"header\"\u003E\n        \u003Cdiv class=\"title\" translate\u003EBold font weight\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cinput class=\"form-control\" type=\"number\" min=\"100\" max=\"900\" step=\"100\" [(ngModel)]=\"config.store.terminal.fontWeightBold\" (ngModelChange)=\"config.save()\"\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"col-12 col-md-6\"\u003E\n    \u003Ccolor-scheme-preview [scheme]=\"config.store.terminal.colorScheme\" [fontPreview]=\"true\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"content-box\"\u003E\n  \u003Cdiv class=\"form-line\" *ngIf=\"!themes.findCurrentTheme().followsColorScheme\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ETerminal background\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"btn-group\" role=\"group\"\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"background\" [(ngModel)]=\"config.store.terminal.background\" (ngModelChange)=\"config.save()\" id=\"backgroundTheme\" [value]=\"&quot;theme&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"backgroundTheme\"\u003E\u003Cspan translate\u003EFrom theme\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"background\" [(ngModel)]=\"config.store.terminal.background\" (ngModelChange)=\"config.save()\" id=\"backgroundColorScheme\" [value]=\"&quot;colorScheme&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"backgroundColorScheme\"\u003E\u003Cspan translate\u003EFrom color scheme\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ECursor shape\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"btn-group\" role=\"group\"\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"cursor\" [(ngModel)]=\"config.store.terminal.cursor\" (ngModelChange)=\"config.save()\" id=\"cursorBlock\" [value]=\"&quot;block&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"cursorBlock\"\u003E█\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"cursor\" [(ngModel)]=\"config.store.terminal.cursor\" (ngModelChange)=\"config.save()\" id=\"cursorBeam\" [value]=\"&quot;beam&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"cursorBeam\"\u003E|\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"cursor\" [(ngModel)]=\"config.store.terminal.cursor\" (ngModelChange)=\"config.save()\" id=\"cursorUnderline\" [value]=\"&quot;underline&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"cursorUnderline\"\u003E▁\u003C\u002Flabel\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EBlink cursor\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.cursorBlink\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EMinimum contrast ratio\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"number\" min=\"1\" max=\"21\" step=\"0.5\" [(ngModel)]=\"config.store.terminal.minimumContrastRatio\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EFallback font\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EA second font family used to display characters missing in the main font\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" [ngbTypeahead]=\"fontAutocomplete\" [(ngModel)]=\"config.store.terminal.fallbackFont\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ELine padding\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EAdditional space between lines\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"config.store.terminal.linePadding\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ECustom CSS\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Ctextarea class=\"form-control mb-5\" [(ngModel)]=\"config.store.appearance.css\" (ngModelChange)=\"saveConfiguration()\"\u003E\u003C\u002Ftextarea\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"terminal-toolbar-spacer\"\u003E\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"content\" #content [style.opacity]=\"frontendIsReady ? 1 : 0\"\u003E\u003C\u002Fdiv\u003E\n\u003Csearch-panel *ngIf=\"showSearchPanel &amp;&amp; hasFocus &amp;&amp; frontend\" @toolbarSlide [@.disabled]=\"!config.store.accessibility.animations\" [frontend]=\"frontend\" (close)=\"showSearchPanel = false; frontend.cancelSearch()\"\u003E\u003C\u002Fsearch-panel\u003E\n\u003Cbutton class=\"btn btn-sm btn-link toolbar-pin-button\" *ngIf=\"enableToolbar &amp;&amp; !pinToolbar\" (click)=\"togglePinToolbar()\" (mouseenter)=\"showToolbar()\" (mouseleave)=\"hideToolbar()\"\u003E\u003Ci class=\"fas fa-wrench\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv [style.background]=\"model\" ngx-colors-trigger [(ngModel)]=\"model\" (ngModelChange)=\"modelChange.emit($event)\" [ngbTooltip]=\"hint\"\u003E{{ title }}\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"preview\" [style.font-family]=\"getPreviewFontFamily()\" [style.font-size]=\"(fontPreview ? config.store.terminal.fontSize : 11) + &quot;px&quot;\" [style.font-weight]=\"config.store.terminal.fontWeight\" [style.background-color]=\"scheme.background\" [style.color]=\"scheme.foreground\" [style.font-feature-settings]=\"'&quot;liga&quot; ' + config.store.terminal.ligatures ? 1 : 0\" [style.font-variant-ligatures]=\"config.store.terminal.ligatures ? &quot;initial&quot; : &quot;none&quot;\"\u003E\n  \u003Cdiv\u003E\u003Cspan [style.color]=\"scheme.colors[2]\"\u003Ejohn\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[6]\"\u003E@\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[4]\"\u003Edoe-pc\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[1]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E$\u003C\u002Fstrong\u003E\u003Cspan\u003E ls\u003C\u002Fspan\u003E\u003Cspan [style.background-color]=\"scheme.cursor\"\u003E&nbsp;\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[3]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E Documents\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root&nbsp;\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[0]\" [style.background]=\"scheme.colors[2]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EDownloads\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root&nbsp;\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[0]\" [style.background]=\"scheme.colors[8]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EPictures\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[12]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E Music\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[2]\"\u003E 実行可能ファイル\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[6]\"\u003E sym\u003C\u002Fspan\u003E\u003Cspan\u003E -\u003E\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[1]\"\u003E link\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E\u003Cstrong [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EIcons:\u003C\u002Fstrong\u003E\u003Cspan\u003E   \u003C\u002Fspan\u003E\u003C\u002Fspan\u003E\u003Cspan\u003E\u003Cspan\u003E &nbsp;\u003C\u002Fspan\u003E\u003Cspan [style.background-color]=\"scheme.colors[1]\" [style.color]=\"scheme.colors[0]\"\u003E Powerline&nbsp;\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[1]\"\u003E\u003C\u002Fspan\u003E\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"head\"\u003E\n  \u003Cdiv class=\"bg-dark p-3 mb-4\" *ngIf=\"model != undefined\"\u003E\n    \u003Cdiv class=\"d-flex align-items-center\"\u003E\u003Cspan\u003E{{model.name}}\u003C\u002Fspan\u003E\n      \u003Cdiv class=\"me-auto\"\u003E\u003C\u002Fdiv\u003E\u003Ca class=\"btn-link\" (click)=\"selectScheme(undefined); $event.preventDefault()\" href=\"#\" translate\u003EClear\u003C\u002Fa\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ccolor-scheme-preview [scheme]=\"model\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"input-group mb-3\"\u003E\n    \u003Cdiv class=\"input-group-text\"\u003E\u003Ci class=\"fas fa-fw fa-search\"\u003E\u003C\u002Fi\u003E\u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"search\" [placeholder]=\"&quot;Search color schemes&quot;|translate\" [(ngModel)]=\"filter\"\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"body\"\u003E\n  \u003Cdiv class=\"list-group list-group-light mb-3\"\u003E\n    \u003Cng-container *ngFor=\"let scheme of allColorSchemes\"\u003E\n      \u003Cdiv class=\"list-group-item list-group-item-action\" [hidden]=\"filter &amp;&amp; !scheme.name.toLowerCase().includes(filter.toLowerCase())\" (click)=\"selectScheme(scheme)\"\u003E\n        \u003Cdiv class=\"d-flex w-100 align-items-center\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"model?.name === scheme.name\"\u003E\u003C\u002Fi\u003E\n          \u003Cdiv class=\"ms-2\"\u003E\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"me-auto\"\u003E{{scheme.name}}\u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ccolor-scheme-preview [scheme]=\"scheme\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fng-container\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"head\"\u003E\n  \u003Ch3 class=\"mb-3\" translate\u003ECurrent color scheme\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"d-flex align-items-center\" *ngIf=\"!editing\"\u003E\u003Cspan\u003E{{getCurrentSchemeName()}}\u003C\u002Fspan\u003E\n    \u003Cdiv class=\"me-auto\"\u003E\u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"btn-toolbar\"\u003E\n      \u003Cbutton class=\"btn btn-secondary\" (click)=\"editScheme()\"\u003E\u003Ci class=\"fas fa-pen\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EEdit\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n      \u003Cdiv class=\"me-1\"\u003E\u003C\u002Fdiv\u003E\n      \u003Cbutton class=\"btn btn-danger\" (click)=\"deleteScheme(config.store.terminal.colorScheme)\" *ngIf=\"currentCustomScheme\"\u003E\u003Ci class=\"fas fa-trash\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EDelete\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv *ngIf=\"editing\"\u003E\n    \u003Cdiv class=\"mb-3\"\u003E\n      \u003Clabel translate\u003EName\u003C\u002Flabel\u003E\n      \u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"config.store.terminal.colorScheme.name\"\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"mb-3\"\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.foreground\" (modelChange)=\"config.save()\" title=\"FG\" hint=\"Foreground\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.background\" (modelChange)=\"config.save()\" title=\"BG\" hint=\"Background\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.cursor\" (modelChange)=\"config.save()\" title=\"CU\" hint=\"Cursor color\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.cursorAccent\" (modelChange)=\"config.save()\" title=\"CA\" hint=\"Block cursor foreground\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.selection\" (modelChange)=\"config.save()\" title=\"SB\" hint=\"Selection background\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.selectionForeground\" (modelChange)=\"config.save()\" title=\"SF\" hint=\"Selection foreground\"\u003E\u003C\u002Fcolor-picker\u003E\n      \u003Ccolor-picker *ngFor=\"let _ of config.store.terminal.colorScheme.colors; let idx = index; trackBy: colorsTrackBy\" [(model)]=\"config.store.terminal.colorScheme.colors[idx]\" (modelChange)=\"config.save()\" [title]=\"idx.toString()\" hint=\"ANSI color {{idx}}\"\u003E\u003C\u002Fcolor-picker\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Ccolor-scheme-preview [scheme]=\"config.store.terminal.colorScheme\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n  \u003Cdiv class=\"btn-toolbar d-flex mt-2\" *ngIf=\"editing\"\u003E\n    \u003Cdiv class=\"me-auto\"\u003E\u003C\u002Fdiv\u003E\n    \u003Cbutton class=\"btn btn-primary\" (click)=\"saveScheme()\"\u003E\u003Ci class=\"fas fa-check\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ESave\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n    \u003Cdiv class=\"me-1\"\u003E\u003C\u002Fdiv\u003E\n    \u003Cbutton class=\"btn btn-secondary\" (click)=\"cancelEditing()\"\u003E\u003Ci class=\"fas fa-times\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ECancel\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Chr class=\"mt-3 mb-4\"\u003E\n  \u003Cdiv class=\"input-group mb-3\"\u003E\n    \u003Cdiv class=\"input-group-text\"\u003E\u003Ci class=\"fas fa-fw fa-search\"\u003E\u003C\u002Fi\u003E\u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"search\" [placeholder]=\"&quot;Search color schemes&quot;|translate\" [(ngModel)]=\"filter\"\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"body\"\u003E\n  \u003Cdiv class=\"list-group list-group-light mb-3\"\u003E\n    \u003Cng-container *ngFor=\"let scheme of allColorSchemes\"\u003E\n      \u003Cdiv class=\"list-group-item list-group-item-action\" [hidden]=\"filter &amp;&amp; !scheme.name.toLowerCase().includes(filter.toLowerCase())\" (click)=\"selectScheme(scheme)\" [class.active]=\"(currentCustomScheme || currentStockScheme) === scheme\"\u003E\n        \u003Cdiv class=\"d-flex w-100 align-items-center\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"(currentCustomScheme || currentStockScheme) === scheme\"\u003E\u003C\u002Fi\u003E\n          \u003Cdiv class=\"ms-2\"\u003E\u003C\u002Fdiv\u003E\n          \u003Cdiv class=\"me-auto\"\u003E\u003Cspan\u003E{{scheme.name}}\u003C\u002Fspan\u003E\n            \u003Cdiv class=\"badge text-bg-info ms-2\" *ngIf=\"customColorSchemes.includes(scheme)\" translate\u003ECustom\u003C\u002Fdiv\u003E\n          \u003C\u002Fdiv\u003E\n          \u003Cdiv\u003E\n            \u003Cdiv class=\"d-flex\"\u003E\n              \u003Cdiv class=\"swatch\" *ngFor=\"let index of colorIndexes.slice(0, 8)\" [style.background-color]=\"scheme.colors[index]\"\u003E\u003C\u002Fdiv\u003E\n            \u003C\u002Fdiv\u003E\n            \u003Cdiv class=\"d-flex\"\u003E\n              \u003Cdiv class=\"swatch\" *ngFor=\"let index of colorIndexes.slice(8, 16)\" [style.background-color]=\"scheme.colors[index]\"\u003E\u003C\u002Fdiv\u003E\n            \u003C\u002Fdiv\u003E\n          \u003C\u002Fdiv\u003E\n        \u003C\u002Fdiv\u003E\n        \u003Ccolor-scheme-preview [scheme]=\"scheme\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\n      \u003C\u002Fdiv\u003E\n    \u003C\u002Fng-container\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv\u003E\n  \u003C!--TODO ([sortablejs]='scripts')--\u003E\n  \u003Cdiv class=\"input-group flex-grow-1\" *ngFor=\"let script of scripts\"\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Expect\" [(ngModel)]=\"script.expect\"\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Send\" [(ngModel)]=\"script.send\"\u003E\n    \u003Cdiv class=\"input-group-text p-0 border-0\"\u003E\n      \u003Cdiv class=\"hover-reveal\" ngbDropdown\u003E\n        \u003Cbutton class=\"btn btn-link btn-sm\" ngbDropdownToggle\u003E\u003Ci class=\"fas fa-fw fa-cog\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\n        \u003Cdiv class=\"dropdown-menu-right\" ngbDropdownMenu\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.isRegex = false\" [class.active]=\"!script.isRegex\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"!script.isRegex\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EExact match\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.isRegex = true\" [class.active]=\"script.isRegex\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"script.isRegex\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ERegex\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.optional = !script.optional\" [class.active]=\"script.optional\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"script.optional\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EOptional\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\n      \u003C\u002Fdiv\u003E\n      \u003Cbutton class=\"btn btn-link btn-sm hover-reveal\" (click)=\"deleteScript(script)\"\u003E\u003Ci class=\"fas fa-fw fa-trash-alt\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cbutton class=\"btn btn-secondary mt-2\" (click)=\"addScript()\"\u003E\u003Ci class=\"fas fa-plus\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ENew item\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"input-group\"\u003E\n  \u003Cinput class=\"search-input form-control\" type=\"text\" [(ngModel)]=\"query\" (ngModelChange)=\"onQueryChange()\" [class.text-danger]=\"state.resultCount == 0\" (click)=\"$event.stopPropagation()\" (keyup.enter)=\"findPrevious()\" (keyup.esc)=\"close.emit()\" [placeholder]=\"&quot;Search&quot;|translate\"\u003E\n  \u003Cdiv class=\"input-group-text result-counter\" *ngIf=\"state.resultCount &gt; 0\"\u003E{{(state.resultIndex ?? 0) + 1}} \u002F {{state.resultCount}}\u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cng-container *ngIf=\"state.resultCount &gt; 0\"\u003E\n  \u003Cbutton class=\"btn btn-link\" (click)=\"findPrevious()\" ngbTooltip=\"Search up\" placement=\"bottom\" [fastHtmlBind]=\"icons.arrowUp\"\u003E\u003C\u002Fbutton\u003E\n  \u003Cbutton class=\"btn btn-link\" (click)=\"findNext()\" ngbTooltip=\"Search down\" placement=\"bottom\" [fastHtmlBind]=\"icons.arrowDown\"\u003E\u003C\u002Fbutton\u003E\n\u003C\u002Fng-container\u003E\n\u003Cdiv class=\"me-2\"\u003E\u003C\u002Fdiv\u003E\n\u003Cbutton class=\"btn\" (click)=\"options.caseSensitive = !options.caseSensitive; saveSearchOptions()\" [class.btn-link]=\"!options.caseSensitive\" [class.btn-info]=\"options.caseSensitive\" ngbTooltip=\"Case sensitivity\" placement=\"bottom\" [fastHtmlBind]=\"icons.case\"\u003E\u003C\u002Fbutton\u003E\n\u003Cbutton class=\"btn\" (click)=\"options.regex = !options.regex; saveSearchOptions()\" [class.btn-link]=\"!options.regex\" [class.btn-info]=\"options.regex\" ngbTooltip=\"Regular expression\" placement=\"bottom\" [fastHtmlBind]=\"icons.regexp\"\u003E\u003C\u002Fbutton\u003E\n\u003Cbutton class=\"btn\" (click)=\"options.wholeWord = !options.wholeWord; saveSearchOptions()\" [class.btn-link]=\"!options.wholeWord\" [class.btn-info]=\"options.wholeWord\" ngbTooltip=\"Whole word\" placement=\"bottom\" [fastHtmlBind]=\"icons.wholeWord\"\u003E\u003C\u002Fbutton\u003E\n\u003Cdiv class=\"me-2\"\u003E\u003C\u002Fdiv\u003E\n\u003Cbutton class=\"btn btn-link\" (click)=\"close.emit()\" [fastHtmlBind]=\"icons.close\"\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EInput mode\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"d-flex\" ngbDropdown\u003E\n    \u003Cbutton class=\"btn btn-secondary btn-tab-bar\" ngbDropdownToggle\u003E{{getInputModeName(options.inputMode)}}\u003C\u002Fbutton\u003E\n    \u003Cdiv ngbDropdownMenu\u003E\u003Ca class=\"d-flex flex-column\" *ngFor=\"let mode of inputModes\" (click)=\"setInputMode(mode.key)\" ngbDropdownItem\u003E\n        \u003Cdiv\u003E{{mode.name|translate}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"text-muted\"\u003E{{mode.description|translate}}\u003C\u002Fdiv\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EInput newlines\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cselect class=\"form-control\" [(ngModel)]=\"options.inputNewlines\"\u003E\n    \u003Coption [ngValue]=\"mode.key\" *ngFor=\"let mode of newlineModes\"\u003E{{mode.name|translate}}\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\" translate\u003EOutput mode\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"d-flex\" ngbDropdown\u003E\n    \u003Cbutton class=\"btn btn-secondary btn-tab-bar\" ngbDropdownToggle\u003E{{getOutputModeName(options.outputMode)}}\u003C\u002Fbutton\u003E\n    \u003Cdiv ngbDropdownMenu\u003E\u003Ca class=\"d-flex flex-column\" *ngFor=\"let mode of outputModes\" (click)=\"setOutputMode(mode.key)\" ngbDropdownItem\u003E\n        \u003Cdiv\u003E{{mode.name|translate}}\u003C\u002Fdiv\u003E\n        \u003Cdiv class=\"text-muted\"\u003E{{mode.description|translate}}\u003C\u002Fdiv\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"form-line\"\u003E\n  \u003Cdiv class=\"header\"\u003E\n    \u003Cdiv class=\"title\" translate\u003EOutput newlines\u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cselect class=\"form-control\" [(ngModel)]=\"options.outputNewlines\"\u003E\n    \u003Coption [ngValue]=\"mode.key\" *ngFor=\"let mode of newlineModes\"\u003E{{mode.name|translate}}\u003C\u002Foption\u003E\n  \u003C\u002Fselect\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv\u003E\n  \u003Ch3 class=\"mb-3\" translate\u003ERendering\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\" *ngIf=\"hostApp.platform !== Platform.Web\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EFrontend\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003ESwitches terminal frontend implementation (experimental)\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.terminal.frontend\" (ngModelChange)=\"config.save()\"\u003E\n      \u003Coption value=\"xterm-webgl\"\u003Exterm (WebGL)\u003C\u002Foption\u003E\n      \u003Coption value=\"xterm\"\u003Exterm (canvas)\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\" translate\u003EScrollback\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003ENumber of lines kept in the buffer\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"config.store.terminal.scrollbackLines\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EDraw bold text in bright colors\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.drawBoldTextInBrightColors\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ESixel graphics support (experimental)\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EDisplay images via Sixel escape sequences\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.sixel\" (ngModelChange)=\"config.save(); config.requestRestart()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003EKeyboard\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate=\"Use {altKeyName} as the Meta key\" [translateParams]=\"{altKeyName: altKeyName}\"\u003E\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003ELets the shell handle Meta key instead of OS\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.altIsMeta\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EScroll on input\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EScrolls the terminal to the bottom on user input\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.scrollOnInput\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003EMouse\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ERight click\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" *ngIf=\"config.store.terminal.rightClick == &quot;paste&quot;\" translate\u003ELong-click for context menu\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.terminal.rightClick\" (ngModelChange)=\"config.save()\"\u003E\n      \u003Coption ngValue=\"off\" translate\u003EOff\u003C\u002Foption\u003E\n      \u003Coption ngValue=\"menu\" translate\u003EContext menu\u003C\u002Foption\u003E\n      \u003Coption ngValue=\"paste\" translate\u003EPaste\u003C\u002Foption\u003E\n      \u003Coption ngValue=\"clipboard\" translate\u003EPaste if no selection, else copy\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\" translate\u003EPaste on middle-click\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.pasteOnMiddleClick\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EWord separators\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EDouble-click selection will stop at these characters\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cinput class=\"form-control\" type=\"text\" placeholder=\" ()[]{}'&quot;\" [(ngModel)]=\"config.store.terminal.wordSeparator\" (ngModelChange)=\"config.save()\"\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\" *ngIf=\"config.store.clickableLinks\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ERequire a key to click links\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EWhen enabled, links are only clickable while holding this key\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.clickableLinks.modifier\" (ngModelChange)=\"config.save()\"\u003E\n      \u003Coption [ngValue]=\"null\" translate\u003ENo modifier\u003C\u002Foption\u003E\n      \u003Coption value=\"ctrlKey\" *ngIf=\"hostApp.platform !== Platform.macOS\"\u003ECtrl\u003C\u002Foption\u003E\n      \u003Coption value=\"altKey\"\u003E{{altKeyName}}\u003C\u002Foption\u003E\n      \u003Coption value=\"shiftKey\"\u003EShift\u003C\u002Foption\u003E\n      \u003Coption value=\"metaKey\"\u003E{{metaKeyName}}\u003C\u002Foption\u003E\n    \u003C\u002Fselect\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003EClipboard\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ECopy on select\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.copyOnSelect\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ECopy with formatting\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.copyAsHTML\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EBracketed paste (requires shell support)\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EPrevents accidental execution of pasted commands\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.bracketedPaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EWarn on multi-line paste\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EShow a confirmation box when pasting multiple lines\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.warnOnMultilinePaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ETrim whitespace and newlines\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003ERemove whitespace and newlines around the copied text\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.trimWhitespaceOnPaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003ESound\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ETerminal bell\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Cdiv class=\"btn-group\"\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"bell\" [(ngModel)]=\"config.store.terminal.bell\" (ngModelChange)=\"config.save()\" id=\"bellOff\" [value]=\"&quot;off&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"bellOff\"\u003E\u003Cspan translate\u003EOff\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"bell\" [(ngModel)]=\"config.store.terminal.bell\" (ngModelChange)=\"config.save()\" id=\"bellVisual\" [value]=\"&quot;visual&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"bellVisual\"\u003E\u003Cspan translate\u003EVisual\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n      \u003Cinput class=\"btn-check\" type=\"radio\" name=\"bell\" [(ngModel)]=\"config.store.terminal.bell\" (ngModelChange)=\"config.save()\" id=\"bellAudible\" [value]=\"&quot;audible&quot;\"\u003E\n      \u003Clabel class=\"btn btn-secondary\" for=\"bellAudible\"\u003E\u003Cspan translate\u003EAudible\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\n    \u003C\u002Fdiv\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"alert alert-info d-flex align-items-center\" *ngIf=\"config.store.terminal.bell != &quot;audible&quot; &amp;&amp; (config.store.terminal.profile || &quot;&quot;).startsWith(&quot;wsl&quot;)\"\u003E\n    \u003Cdiv class=\"me-auto\" translate\u003EWSL terminal bell can only be muted via Volume Mixer\u003C\u002Fdiv\u003E\n    \u003Cbutton class=\"btn btn-secondary\" (click)=\"openWSLVolumeMixer()\" translate\u003EShow Mixer\u003C\u002Fbutton\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\"\u003E\n  \u003Ch3 translate\u003EStartup\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\" *ngIf=\"hostApp.platform !== Platform.Web\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003EAuto-open a terminal on app start\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.autoOpen\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ERestore terminal tabs on app start\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.recoverTabs\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E\n\u003Cdiv class=\"mt-4\" *ngIf=\"hostApp.platform === Platform.Windows\"\u003E\n  \u003Ch3 translate\u003EWindows\u003C\u002Fh3\u003E\n  \u003Cdiv class=\"form-line\"\u003E\n    \u003Cdiv class=\"header\"\u003E\n      \u003Cdiv class=\"title\" translate\u003ESet Tabby as %COMSPEC%\u003C\u002Fdiv\u003E\n      \u003Cdiv class=\"description\" translate\u003EAllows opening .bat files in tabs, but breaks some shells\u003C\u002Fdiv\u003E\n    \u003C\u002Fdiv\u003E\n    \u003Ctoggle [(ngModel)]=\"config.store.terminal.setComSpec\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\n  \u003C\u002Fdiv\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

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

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_indent = [];
pug_html = pug_html + "\n\u003Cdiv class=\"content\" cdkDropList cdkAutoDropGroup=\"app-tabs\"\u003E\u003Ci class=\"fas fa-grip-vertical drag-handle\" *ngIf=\"shouldShowDragHandle\" cdkDrag [cdkDragData]=\"tab\" (cdkDragStarted)=\"onTabDragStart()\" (cdkDragEnded)=\"onTabDragEnd()\"\u003E\u003C\u002Fi\u003E\n  \u003Cng-content\u003E\u003C\u002Fng-content\u003E\n  \u003Cbutton class=\"btn btn-sm btn-link\" *ngIf=\"tab.enableToolbar\" (click)=\"tab.togglePinToolbar()\" (mouseenter)=\"tab.showToolbar()\" (mouseleave)=\"tab.hideToolbar()\"\u003E\u003Ci class=\"fas fa-thumbtack\"\u003E\u003C\u002Fi\u003E\u003Cspan *ngIf=\"tab.pinToolbar\" translate\u003EUnpin\u003C\u002Fspan\u003E\u003Cspan *ngIf=\"!tab.pinToolbar\" translate\u003EPin\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\n\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

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

"use strict";


var pug_has_own_property = Object.prototype.hasOwnProperty;

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

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

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

  return a;
}

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

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

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

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

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

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

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

  return attrs;
}

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

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

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

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

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

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

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


/***/ }),

/***/ 9806:
/*!*****************************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
  \*****************************************************************************/
/***/ ((module) => {

"use strict";


var stylesInDOM = [];

function getIndexByIdentifier(identifier) {
  var result = -1;

  for (var i = 0; i < stylesInDOM.length; i++) {
    if (stylesInDOM[i].identifier === identifier) {
      result = i;
      break;
    }
  }

  return result;
}

function modulesToDom(list, options) {
  var idCountMap = {};
  var identifiers = [];

  for (var i = 0; i < list.length; i++) {
    var item = list[i];
    var id = options.base ? item[0] + options.base : item[0];
    var count = idCountMap[id] || 0;
    var identifier = "".concat(id, " ").concat(count);
    idCountMap[id] = count + 1;
    var indexByIdentifier = getIndexByIdentifier(identifier);
    var obj = {
      css: item[1],
      media: item[2],
      sourceMap: item[3],
      supports: item[4],
      layer: item[5]
    };

    if (indexByIdentifier !== -1) {
      stylesInDOM[indexByIdentifier].references++;
      stylesInDOM[indexByIdentifier].updater(obj);
    } else {
      var updater = addElementStyle(obj, options);
      options.byIndex = i;
      stylesInDOM.splice(i, 0, {
        identifier: identifier,
        updater: updater,
        references: 1
      });
    }

    identifiers.push(identifier);
  }

  return identifiers;
}

function addElementStyle(obj, options) {
  var api = options.domAPI(options);
  api.update(obj);

  var updater = function updater(newObj) {
    if (newObj) {
      if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
        return;
      }

      api.update(obj = newObj);
    } else {
      api.remove();
    }
  };

  return updater;
}

module.exports = function (list, options) {
  options = options || {};
  list = list || [];
  var lastIdentifiers = modulesToDom(list, options);
  return function update(newList) {
    newList = newList || [];

    for (var i = 0; i < lastIdentifiers.length; i++) {
      var identifier = lastIdentifiers[i];
      var index = getIndexByIdentifier(identifier);
      stylesInDOM[index].references--;
    }

    var newLastIdentifiers = modulesToDom(newList, options);

    for (var _i = 0; _i < lastIdentifiers.length; _i++) {
      var _identifier = lastIdentifiers[_i];

      var _index = getIndexByIdentifier(_identifier);

      if (stylesInDOM[_index].references === 0) {
        stylesInDOM[_index].updater();

        stylesInDOM.splice(_index, 1);
      }
    }

    lastIdentifiers = newLastIdentifiers;
  };
};

/***/ }),

/***/ 8215:
/*!*********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/insertBySelector.js ***!
  \*********************************************************************/
/***/ ((module) => {

"use strict";


var memo = {};
/* istanbul ignore next  */

function getTarget(target) {
  if (typeof memo[target] === "undefined") {
    var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself

    if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
      try {
        // This will throw an exception if access to iframe is blocked
        // due to cross-origin restrictions
        styleTarget = styleTarget.contentDocument.head;
      } catch (e) {
        // istanbul ignore next
        styleTarget = null;
      }
    }

    memo[target] = styleTarget;
  }

  return memo[target];
}
/* istanbul ignore next  */


function insertBySelector(insert, style) {
  var target = getTarget(insert);

  if (!target) {
    throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
  }

  target.appendChild(style);
}

module.exports = insertBySelector;

/***/ }),

/***/ 5603:
/*!***********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
  \***********************************************************************/
/***/ ((module) => {

"use strict";


/* istanbul ignore next  */
function insertStyleElement(options) {
  var element = document.createElement("style");
  options.setAttributes(element, options.attributes);
  options.insert(element, options.options);
  return element;
}

module.exports = insertStyleElement;

/***/ }),

/***/ 8291:
/*!***********************************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
  \***********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/* istanbul ignore next  */
function setAttributesWithoutAttributes(styleElement) {
  var nonce =  true ? __webpack_require__.nc : 0;

  if (nonce) {
    styleElement.setAttribute("nonce", nonce);
  }
}

module.exports = setAttributesWithoutAttributes;

/***/ }),

/***/ 3005:
/*!****************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
  \****************************************************************/
/***/ ((module) => {

"use strict";


/* istanbul ignore next  */
function apply(styleElement, options, obj) {
  var css = "";

  if (obj.supports) {
    css += "@supports (".concat(obj.supports, ") {");
  }

  if (obj.media) {
    css += "@media ".concat(obj.media, " {");
  }

  var needLayer = typeof obj.layer !== "undefined";

  if (needLayer) {
    css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
  }

  css += obj.css;

  if (needLayer) {
    css += "}";
  }

  if (obj.media) {
    css += "}";
  }

  if (obj.supports) {
    css += "}";
  }

  var sourceMap = obj.sourceMap;

  if (sourceMap && typeof btoa !== "undefined") {
    css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  } // For old IE

  /* istanbul ignore if  */


  options.styleTagTransform(css, styleElement, options.options);
}

function removeStyleElement(styleElement) {
  // istanbul ignore if
  if (styleElement.parentNode === null) {
    return false;
  }

  styleElement.parentNode.removeChild(styleElement);
}
/* istanbul ignore next  */


function domAPI(options) {
  var styleElement = options.insertStyleElement(options);
  return {
    update: function update(obj) {
      apply(styleElement, options, obj);
    },
    remove: function remove() {
      removeStyleElement(styleElement);
    }
  };
}

module.exports = domAPI;

/***/ }),

/***/ 8592:
/*!**********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
  \**********************************************************************/
/***/ ((module) => {

"use strict";


/* istanbul ignore next  */
function styleTagTransform(css, styleElement) {
  if (styleElement.styleSheet) {
    styleElement.styleSheet.cssText = css;
  } else {
    while (styleElement.firstChild) {
      styleElement.removeChild(styleElement.firstChild);
    }

    styleElement.appendChild(document.createTextNode(css));
  }
}

module.exports = styleTagTransform;

/***/ }),

/***/ 9517:
/*!**********************************!*\
  !*** ./src/icons/arrow-down.svg ***!
  \**********************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"arrow-down\" class=\"svg-inline--fa fa-arrow-down\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path fill=\"currentColor\" d=\"M378.8 309.8l-176 165.9C199.7 478.6 195.9 480 192 480s-7.719-1.426-10.77-4.31l-176-165.9C-1.297 303.6-1.781 293.1 4.156 286.3c5.953-6.838 16.09-7.259 22.61-1.134L176 425.9V48.59c0-9.171 7.156-16.59 15.1-16.59S208 39.42 208 48.59v377.3l149.2-140.7c6.516-6.125 16.66-5.704 22.61 1.134C385.8 293.1 385.3 303.6 378.8 309.8z\"></path></svg>"

/***/ }),

/***/ 3476:
/*!********************************!*\
  !*** ./src/icons/arrow-up.svg ***!
  \********************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"arrow-up\" class=\"svg-inline--fa fa-arrow-up\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path fill=\"currentColor\" d=\"M379.8 225.7C376.7 229.3 372.3 231.1 368 231.1c-3.844 0-7.703-1.426-10.77-4.31L208 86.12v377.3c0 9.171-7.156 16.59-15.1 16.59S176 472.6 176 463.4V86.12l-149.2 140.7C20.25 232.1 10.14 232.5 4.156 225.7C-1.781 218.9-1.297 208.4 5.234 202.2l176-165.9c6.094-5.768 15.44-5.768 21.53 0l176 165.9C385.3 208.4 385.8 218.9 379.8 225.7z\"></path></svg>"

/***/ }),

/***/ 8247:
/*!****************************!*\
  !*** ./src/icons/case.svg ***!
  \****************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"text-size\" class=\"svg-inline--fa fa-text-size\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path fill=\"currentColor\" d=\"M0 48l0 96C0 152.8 7.156 160 16 160S32 152.8 32 144V64h144v384h-64C103.2 448 96 455.2 96 464S103.2 480 112 480h160C280.8 480 288 472.8 288 464S280.8 448 272 448h-64V64H352v80C352 152.8 359.2 160 368 160S384 152.8 384 144v-96C384 39.16 376.8 32 368 32h-352C7.156 32 0 39.16 0 48zM320 240v64c0 8.844 7.156 16 16 16S352 312.8 352 304V256h112v192H416c-8.844 0-16 7.156-16 16S407.2 480 416 480h128c8.844 0 16-7.156 16-16S552.8 448 544 448h-48V256H608v48c0 8.844 7.156 16 16 16S640 312.8 640 304v-64C640 231.2 632.8 224 624 224h-288C327.2 224 320 231.2 320 240z\"></path></svg>"

/***/ }),

/***/ 8834:
/*!*****************************!*\
  !*** ./src/icons/close.svg ***!
  \*****************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"xmark\" class=\"svg-inline--fa fa-xmark\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path fill=\"currentColor\" d=\"M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z\"></path></svg>"

/***/ }),

/***/ 1974:
/*!******************************!*\
  !*** ./src/icons/regexp.svg ***!
  \******************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"asterisk\" class=\"svg-inline--fa fa-asterisk\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path fill=\"currentColor\" d=\"M413.8 368.1C410.8 373.2 405.5 376 399.1 376c-2.766 0-5.562-.7187-8.125-2.219L240 284V464c0 8.844-7.156 16-15.1 16S208 472.8 208 464V284l-151.9 89.73C53.58 375.3 50.79 376 48.02 376c-5.469 0-10.8-2.812-13.8-7.859c-4.484-7.609-1.969-17.42 5.641-21.92L192.5 256L39.86 165.8c-7.609-4.5-10.12-14.31-5.641-21.92c4.531-7.578 14.31-10.06 21.92-5.641L208 227.1V48C208 39.16 215.2 32 224 32S240 39.16 240 48v179.1l151.9-89.73c7.641-4.422 17.42-1.938 21.92 5.641c4.484 7.609 1.969 17.42-5.641 21.92L255.5 256l152.7 90.22C415.7 350.7 418.3 360.5 413.8 368.1z\"></path></svg>"

/***/ }),

/***/ 7990:
/*!**********************************!*\
  !*** ./src/icons/whole-word.svg ***!
  \**********************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"input-text\" class=\"svg-inline--fa fa-input-text\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path fill=\"currentColor\" d=\"M576 64H63.1C28.65 64 0 92.65 0 128v256c0 35.35 28.65 64 63.1 64H576C611.3 448 640 419.3 640 384V128C640 92.65 611.3 64 576 64zM608 384c0 17.64-14.35 32-31.1 32H63.1C46.35 416 32 401.6 32 384V128c0-17.64 14.35-32 31.1-32H576C593.6 96 608 110.4 608 128V384zM405.6 248.5C412.2 239.3 416 228.1 416 216C416 185.1 390.9 160 360 160H304C295.2 160 288 167.2 288 176v160C288 344.8 295.2 352 304 352h72c30.88 0 56-25.12 56-56C432 275.1 421.4 258.4 405.6 248.5zM320 192h40C373.2 192 384 202.8 384 216S373.2 240 360 240H320V192zM376 320H320V272h56c13.22 0 24 10.77 24 24C400 309.2 389.2 320 376 320zM190.8 170.1c-4.812-12.16-24.88-12.16-29.69 0l-64 160c-3.281 8.188 .6875 17.5 8.906 20.78c8.219 3.312 17.5-.7187 20.78-8.906l15.33-38.31C142.8 303.7 143.4 304 144 304h64c.6484 0 1.201-.2949 1.83-.3691l15.33 38.31C227.7 348.2 233.7 352 240 352c1.969 0 4-.375 5.938-1.156c8.219-3.281 12.19-12.59 8.906-20.78L190.8 170.1zM154.8 272L176 219.1L197.2 272H154.8z\"></path></svg>"

/***/ }),

/***/ 5351:
/*!*************************************!*\
  !*** ./src/fonts/SourceCodePro.ttf ***!
  \*************************************/
/***/ ((module) => {

"use strict";
module.exports = "data:font/ttf;base64, ";

/***/ }),

/***/ 1425:
/*!**********************!*\
  !*** ./src/bell.ogg ***!
  \**********************/
/***/ ((module) => {

"use strict";
module.exports = "data:audio/ogg;base64, ";

/***/ }),

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

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

/***/ }),

/***/ 8781:
/*!**************************************!*\
  !*** external "@angular/animations" ***!
  \**************************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__8781__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__5848__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__8900__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7161__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7571__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__2089__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7170__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__9044__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3056__;

/***/ }),

/***/ 2908:
/*!***************************!*\
  !*** external "readline" ***!
  \***************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__2908__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3832__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3978__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__315__;

/***/ }),

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

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__6663__;

/***/ }),

/***/ 2155:
/*!*******************************************************!*\
  !*** ../node_modules/available-typed-arrays/index.js ***!
  \*******************************************************/
/***/ ((module) => {

"use strict";


var possibleNames = ['BigInt64Array', 'BigUint64Array', 'Float32Array', 'Float64Array', 'Int16Array', 'Int32Array', 'Int8Array', 'Uint16Array', 'Uint32Array', 'Uint8Array', 'Uint8ClampedArray'];
module.exports = function availableTypedArrays() {
  var out = [];
  for (var i = 0; i < possibleNames.length; i++) {
    if (typeof global[possibleNames[i]] === 'function') {
      out[out.length] = possibleNames[i];
    }
  }
  return out;
};

/***/ }),

/***/ 1793:
/*!***********************************************!*\
  !*** ../node_modules/es-get-iterator/node.js ***!
  \***********************************************/
/***/ ((module) => {

"use strict";


// this should only run in node >= 13.2, so it
// does not need any of the intense fallbacks that old node/browsers do
var $iterator = Symbol.iterator;
module.exports = function getIterator(iterable) {
  // alternatively, `iterable[$iterator]?.()`
  if (iterable != null && typeof iterable[$iterator] !== 'undefined') {
    return iterable[$iterator]();
  }
};

/***/ }),

/***/ 4386:
/*!*************************************************!*\
  !*** ../node_modules/which-collection/index.js ***!
  \*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var isMap = __webpack_require__(/*! is-map */ 3408);
var isSet = __webpack_require__(/*! is-set */ 7411);
var isWeakMap = __webpack_require__(/*! is-weakmap */ 5124);
var isWeakSet = __webpack_require__(/*! is-weakset */ 8124);
module.exports = function whichCollection(value) {
  if (value && typeof value === 'object') {
    if (isMap(value)) {
      return 'Map';
    }
    if (isSet(value)) {
      return 'Set';
    }
    if (isWeakMap(value)) {
      return 'WeakMap';
    }
    if (isWeakSet(value)) {
      return 'WeakSet';
    }
  }
  return false;
};

/***/ }),

/***/ 8138:
/*!************************************************!*\
  !*** ./node_modules/cli-spinner/spinners.json ***!
  \************************************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('["|/-\\\\","⠂-–—–-","◐◓◑◒","◴◷◶◵","◰◳◲◱","▖▘▝▗","■□▪▫","▌▀▐▄","▉▊▋▌▍▎▏▎▍▌▋▊▉","▁▃▄▅▆▇█▇▆▅▄▃","←↖↑↗→↘↓↙","┤┘┴└├┌┬┐","◢◣◤◥",".oO°Oo.",".oO@*",["🌍","🌎","🌏"],"◡◡ ⊙⊙ ◠◠","☱☲☴","⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏","⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓","⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆","⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋","⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁","⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈","⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈","⢄⢂⢁⡁⡈⡐⡠","⢹⢺⢼⣸⣇⡧⡗⡏","⣾⣽⣻⢿⡿⣟⣯⣷","⠁⠂⠄⡀⢀⠠⠐⠈",["🌑","🌒","🌓","🌔","🌕","🌝","🌖","🌗","🌘","🌚"],["🕛","🕐","🕑","🕒","🕓","🕔","🕕","🕖","🕗","🕘","🕙","🕚"]]');

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// 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;
/******/ 	}
/******/ 	
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = __webpack_modules__;
/******/ 	
/************************************************************************/
/******/ 	/* 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 });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/nonce */
/******/ 	(() => {
/******/ 		__webpack_require__.nc = undefined;
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/require chunk loading */
/******/ 	(() => {
/******/ 		__webpack_require__.b = require("url").pathToFileURL(__filename);
/******/ 		
/******/ 		// object to store loaded chunks
/******/ 		// "1" means "loaded", otherwise not loaded yet
/******/ 		var installedChunks = {
/******/ 			179: 1
/******/ 		};
/******/ 		
/******/ 		// no on chunks loaded
/******/ 		
/******/ 		// no chunk install function needed
/******/ 		
/******/ 		// no chunk loading
/******/ 		
/******/ 		// no external install chunk
/******/ 		
/******/ 		// no HMR
/******/ 		
/******/ 		// no HMR manifest
/******/ 	})();
/******/ 	
/************************************************************************/
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 + 38 modules ***!
  \***********************************/
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "BaseSession": () => (/* reexport */ BaseSession),
  "BaseTerminalTabComponent": () => (/* reexport */ BaseTerminalTabComponent),
  "Frontend": () => (/* reexport */ Frontend),
  "LoginScriptProcessor": () => (/* reexport */ LoginScriptProcessor),
  "LoginScriptsSettingsComponent": () => (/* reexport */ LoginScriptsSettingsComponent),
  "MultifocusService": () => (/* reexport */ MultifocusService),
  "OSCProcessor": () => (/* reexport */ OSCProcessor),
  "SessionMiddleware": () => (/* reexport */ SessionMiddleware),
  "SessionMiddlewareStack": () => (/* reexport */ SessionMiddlewareStack),
  "StreamProcessingSettingsComponent": () => (/* reexport */ StreamProcessingSettingsComponent),
  "TerminalColorSchemeProvider": () => (/* reexport */ TerminalColorSchemeProvider),
  "TerminalContextMenuItemProvider": () => (/* reexport */ TerminalContextMenuItemProvider),
  "TerminalDecorator": () => (/* reexport */ TerminalDecorator),
  "TerminalStreamProcessor": () => (/* reexport */ TerminalStreamProcessor),
  "XTermFrontend": () => (/* reexport */ XTermFrontend),
  "XTermWebGLFrontend": () => (/* reexport */ XTermWebGLFrontend),
  "default": () => (/* binding */ src),
  "isReconnectable": () => (/* reexport */ isReconnectable)
});

;// CONCATENATED MODULE: ./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 __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 (_) 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;
  Object.defineProperty(o, k2, {
    enumerable: true,
    get: function () {
      return m[k];
    }
  });
} : 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: n === "return"
      } : 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;
}
// EXTERNAL MODULE: external "@angular/core"
var core_ = __webpack_require__(8900);
// EXTERNAL MODULE: external "@angular/common"
var common_ = __webpack_require__(5848);
// EXTERNAL MODULE: external "@angular/forms"
var forms_ = __webpack_require__(7161);
// EXTERNAL MODULE: external "@ng-bootstrap/ng-bootstrap"
var ng_bootstrap_ = __webpack_require__(7571);
// EXTERNAL MODULE: external "ngx-toastr"
var external_ngx_toastr_ = __webpack_require__(7170);
// EXTERNAL MODULE: external "@angular/animations"
var animations_ = __webpack_require__(8781);
;// CONCATENATED MODULE: ./node_modules/ngx-colors/fesm2015/ngx-colors.mjs






const _c0 = ["hueSlider"];
const _c1 = ["alphaSlider"];
function ColorPickerComponent_div_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r6 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 8);
    core_["ɵɵlistener"]("newValue", function ColorPickerComponent_div_2_Template_div_newValue_0_listener($event) {
      core_["ɵɵrestoreView"](_r6);
      const ctx_r5 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r5.onSliderChange("saturation-lightness", $event));
    });
    core_["ɵɵelementStart"](1, "div", 9);
    core_["ɵɵelement"](2, "div");
    core_["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r1 = core_["ɵɵnextContext"]();
    core_["ɵɵstyleProp"]("background-color", ctx_r1.hueSliderColor);
    core_["ɵɵproperty"]("rgX", 1)("rgY", 1);
    core_["ɵɵadvance"](1);
    core_["ɵɵstyleProp"]("top", ctx_r1.slider == null ? null : ctx_r1.slider.v, "px")("left", ctx_r1.slider == null ? null : ctx_r1.slider.s, "px");
  }
}
function ColorPickerComponent_div_4_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelementStart"](0, "div", 10);
    core_["ɵɵelement"](1, "div", 11)(2, "div", 12);
    core_["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r2 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](2);
    core_["ɵɵstyleProp"]("background-color", ctx_r2.selectedColor);
  }
}
function ColorPickerComponent_div_6_Template(rf, ctx) {
  if (rf & 1) {
    const _r9 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 13, 14);
    core_["ɵɵlistener"]("newValue", function ColorPickerComponent_div_6_Template_div_newValue_0_listener($event) {
      core_["ɵɵrestoreView"](_r9);
      const ctx_r8 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r8.onSliderChange("hue", $event));
    });
    core_["ɵɵelementStart"](2, "div", 15)(3, "div");
    core_["ɵɵelement"](4, "div");
    core_["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r3 = core_["ɵɵnextContext"]();
    core_["ɵɵproperty"]("rgX", 1);
    core_["ɵɵadvance"](2);
    core_["ɵɵstyleProp"]("left", ctx_r3.slider == null ? null : ctx_r3.slider.h, "px");
  }
}
function ColorPickerComponent_div_7_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 16, 17);
    core_["ɵɵlistener"]("newValue", function ColorPickerComponent_div_7_Template_div_newValue_0_listener($event) {
      core_["ɵɵrestoreView"](_r12);
      const ctx_r11 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r11.onSliderChange("alpha", $event));
    });
    core_["ɵɵelement"](2, "div", 18);
    core_["ɵɵelementStart"](3, "div", 15)(4, "div");
    core_["ɵɵelement"](5, "div");
    core_["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r4 = core_["ɵɵnextContext"]();
    core_["ɵɵproperty"]("rgX", 1);
    core_["ɵɵadvance"](2);
    core_["ɵɵproperty"]("ngStyle", ctx_r4.getBackgroundColor(ctx_r4.alphaSliderColor));
    core_["ɵɵadvance"](1);
    core_["ɵɵstyleProp"]("left", ctx_r4.slider == null ? null : ctx_r4.slider.a, "px");
  }
}
const _c2 = ["dialog"];
function PanelComponent_ng_container_2_ng_container_2_div_3_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelement"](0, "div", 11);
  }
}
function PanelComponent_ng_container_2_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    const _r12 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 8)(2, "div", 9);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_2_ng_container_2_Template_div_click_2_listener() {
      const restoredCtx = core_["ɵɵrestoreView"](_r12);
      const color_r8 = restoredCtx.$implicit;
      const ctx_r11 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r11.onColorClick(color_r8));
    });
    core_["ɵɵtemplate"](3, PanelComponent_ng_container_2_ng_container_2_div_3_Template, 1, 0, "div", 10);
    core_["ɵɵelementEnd"]()();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const color_r8 = ctx.$implicit;
    const i_r9 = ctx.index;
    const ctx_r5 = core_["ɵɵnextContext"](2);
    core_["ɵɵadvance"](2);
    core_["ɵɵclassProp"]("colornull", !color_r8);
    core_["ɵɵproperty"]("ngStyle", ctx_r5.getBackgroundColor(color_r8));
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", i_r9 == ctx_r5.indexSeleccionado);
  }
}
function PanelComponent_ng_container_2_div_3_div_1_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelement"](0, "div", 17);
  }
  if (rf & 2) {
    const ctx_r13 = core_["ɵɵnextContext"](3);
    core_["ɵɵproperty"]("ngStyle", ctx_r13.getBackgroundColor(ctx_r13.color));
  }
}
function PanelComponent_ng_container_2_div_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r15 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 12);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_2_div_3_Template_div_click_0_listener() {
      core_["ɵɵrestoreView"](_r15);
      const ctx_r14 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r14.addColor());
    });
    core_["ɵɵtemplate"](1, PanelComponent_ng_container_2_div_3_div_1_Template, 1, 1, "div", 13);
    core_["ɵɵnamespaceSVG"]();
    core_["ɵɵelementStart"](2, "svg", 14);
    core_["ɵɵelement"](3, "path", 15)(4, "path", 16);
    core_["ɵɵelementEnd"]()();
  }
  if (rf & 2) {
    const ctx_r6 = core_["ɵɵnextContext"](2);
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", !ctx_r6.indexSeleccionado);
  }
}
function PanelComponent_ng_container_2_color_picker_4_Template(rf, ctx) {
  if (rf & 1) {
    const _r17 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "color-picker", 18);
    core_["ɵɵlistener"]("colorChange", function PanelComponent_ng_container_2_color_picker_4_Template_color_picker_colorChange_0_listener($event) {
      core_["ɵɵrestoreView"](_r17);
      const ctx_r16 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r16.onChangeColorPicker($event));
    })("onAlphaChange", function PanelComponent_ng_container_2_color_picker_4_Template_color_picker_onAlphaChange_0_listener($event) {
      core_["ɵɵrestoreView"](_r17);
      const ctx_r18 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r18.onAlphaChange($event));
    });
    core_["ɵɵelementEnd"]();
  }
  if (rf & 2) {
    const ctx_r7 = core_["ɵɵnextContext"](2);
    core_["ɵɵproperty"]("controls", ctx_r7.colorPickerControls)("color", ctx_r7.hsva);
  }
}
function PanelComponent_ng_container_2_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 4);
    core_["ɵɵtemplate"](2, PanelComponent_ng_container_2_ng_container_2_Template, 4, 4, "ng-container", 5);
    core_["ɵɵtemplate"](3, PanelComponent_ng_container_2_div_3_Template, 5, 1, "div", 6);
    core_["ɵɵtemplate"](4, PanelComponent_ng_container_2_color_picker_4_Template, 1, 2, "color-picker", 7);
    core_["ɵɵelementEnd"]();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r1 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("@colorsAnimation", ctx_r1.colorsAnimationEffect);
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngForOf", ctx_r1.palette);
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", !ctx_r1.hideColorPicker && ctx_r1.colorPickerControls != "only-alpha");
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", !ctx_r1.hideColorPicker && ctx_r1.colorPickerControls == "only-alpha");
  }
}
function PanelComponent_ng_container_3_ng_container_7_div_3_Template(rf, ctx) {
  if (rf & 1) {
    core_["ɵɵelement"](0, "div", 11);
  }
}
const _c3 = function (a0) {
  return {
    background: a0
  };
};
function PanelComponent_ng_container_3_ng_container_7_Template(rf, ctx) {
  if (rf & 1) {
    const _r23 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵnamespaceSVG"]();
    core_["ɵɵnamespaceHTML"]();
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 8)(2, "div", 24);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_3_ng_container_7_Template_div_click_2_listener() {
      const restoredCtx = core_["ɵɵrestoreView"](_r23);
      const variant_r20 = restoredCtx.$implicit;
      const ctx_r22 = core_["ɵɵnextContext"](2);
      return core_["ɵɵresetView"](ctx_r22.changeColor(variant_r20));
    });
    core_["ɵɵtemplate"](3, PanelComponent_ng_container_3_ng_container_7_div_3_Template, 1, 0, "div", 10);
    core_["ɵɵelementEnd"]()();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const variant_r20 = ctx.$implicit;
    const ctx_r19 = core_["ɵɵnextContext"](2);
    core_["ɵɵadvance"](2);
    core_["ɵɵclassProp"]("colornull", !variant_r20);
    core_["ɵɵproperty"]("ngStyle", core_["ɵɵpureFunction1"](4, _c3, variant_r20));
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("ngIf", ctx_r19.isSelected(variant_r20));
  }
}
function PanelComponent_ng_container_3_Template(rf, ctx) {
  if (rf & 1) {
    const _r25 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 4)(2, "div", 19)(3, "div", 20);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_3_Template_div_click_3_listener() {
      core_["ɵɵrestoreView"](_r25);
      const ctx_r24 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r24.onClickBack());
    });
    core_["ɵɵnamespaceSVG"]();
    core_["ɵɵelementStart"](4, "svg", 21);
    core_["ɵɵelement"](5, "path", 22)(6, "path", 23);
    core_["ɵɵelementEnd"]()()();
    core_["ɵɵtemplate"](7, PanelComponent_ng_container_3_ng_container_7_Template, 4, 6, "ng-container", 5);
    core_["ɵɵelementEnd"]();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r2 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](1);
    core_["ɵɵproperty"]("@colorsAnimation", ctx_r2.colorsAnimationEffect);
    core_["ɵɵadvance"](6);
    core_["ɵɵproperty"]("ngForOf", ctx_r2.variants);
  }
}
function PanelComponent_ng_container_4_Template(rf, ctx) {
  if (rf & 1) {
    const _r27 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementContainerStart"](0);
    core_["ɵɵelementStart"](1, "div", 25)(2, "div", 26);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_4_Template_div_click_2_listener() {
      core_["ɵɵrestoreView"](_r27);
      const ctx_r26 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r26.onClickBack());
    });
    core_["ɵɵnamespaceSVG"]();
    core_["ɵɵelementStart"](3, "svg", 21);
    core_["ɵɵelement"](4, "path", 22)(5, "path", 23);
    core_["ɵɵelementEnd"]()();
    core_["ɵɵnamespaceHTML"]();
    core_["ɵɵelementStart"](6, "button", 27);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_4_Template_button_click_6_listener() {
      core_["ɵɵrestoreView"](_r27);
      const ctx_r28 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r28.emitClose("cancel"));
    });
    core_["ɵɵtext"](7);
    core_["ɵɵelementEnd"]();
    core_["ɵɵelementStart"](8, "button", 27);
    core_["ɵɵlistener"]("click", function PanelComponent_ng_container_4_Template_button_click_8_listener() {
      core_["ɵɵrestoreView"](_r27);
      const ctx_r29 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r29.emitClose("accept"));
    });
    core_["ɵɵtext"](9);
    core_["ɵɵelementEnd"]()();
    core_["ɵɵelementStart"](10, "div", 28)(11, "color-picker", 29);
    core_["ɵɵlistener"]("sliderChange", function PanelComponent_ng_container_4_Template_color_picker_sliderChange_11_listener($event) {
      core_["ɵɵrestoreView"](_r27);
      const ctx_r30 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r30.onChangeColorPicker($event));
    });
    core_["ɵɵelementEnd"]()();
    core_["ɵɵelementContainerEnd"]();
  }
  if (rf & 2) {
    const ctx_r3 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](7);
    core_["ɵɵtextInterpolate1"](" ", ctx_r3.cancelLabel, " ");
    core_["ɵɵadvance"](2);
    core_["ɵɵtextInterpolate1"](" ", ctx_r3.acceptLabel, " ");
    core_["ɵɵadvance"](2);
    core_["ɵɵproperty"]("controls", ctx_r3.colorPickerControls)("color", ctx_r3.hsva);
  }
}
function PanelComponent_div_5_Template(rf, ctx) {
  if (rf & 1) {
    const _r33 = core_["ɵɵgetCurrentView"]();
    core_["ɵɵelementStart"](0, "div", 30)(1, "p", 31);
    core_["ɵɵlistener"]("click", function PanelComponent_div_5_Template_p_click_1_listener() {
      core_["ɵɵrestoreView"](_r33);
      const ctx_r32 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r32.nextFormat());
    });
    core_["ɵɵtext"](2);
    core_["ɵɵelementEnd"]();
    core_["ɵɵelementStart"](3, "div", 32)(4, "input", 33, 34);
    core_["ɵɵlistener"]("keyup", function PanelComponent_div_5_Template_input_keyup_4_listener() {
      core_["ɵɵrestoreView"](_r33);
      const _r31 = core_["ɵɵreference"](5);
      const ctx_r34 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r34.changeColorManual(_r31.value));
    })("keydown.enter", function PanelComponent_div_5_Template_input_keydown_enter_4_listener() {
      core_["ɵɵrestoreView"](_r33);
      const ctx_r35 = core_["ɵɵnextContext"]();
      return core_["ɵɵresetView"](ctx_r35.emitClose("accept"));
    });
    core_["ɵɵelementEnd"]()()();
  }
  if (rf & 2) {
    const ctx_r4 = core_["ɵɵnextContext"]();
    core_["ɵɵadvance"](2);
    core_["ɵɵtextInterpolate"](ctx_r4.colorFormats[ctx_r4.format]);
    core_["ɵɵadvance"](2);
    core_["ɵɵstyleProp"]("font-size", ctx_r4.color && ctx_r4.color.length > 23 ? 9 : 10, "px")("letter-spacing", ctx_r4.color && ctx_r4.color.length > 16 ? 0 : 1.5, "px");
    core_["ɵɵproperty"]("value", ctx_r4.color);
  }
}
var ColorFormats;
(function (ColorFormats) {
  ColorFormats[ColorFormats["HEX"] = 0] = "HEX";
  ColorFormats[ColorFormats["RGBA"] = 1] = "RGBA";
  ColorFormats[ColorFormats["HSLA"] = 2] = "HSLA";
  ColorFormats[ColorFormats["CMYK"] = 3] = "CMYK";
})(ColorFormats || (ColorFormats = {}));
const defaultColors = [{
  color: "rojo",
  preview: "#E57373",
  variants: ["#FFEBEE", "#FFCDD2", "#EF9A9A", "#E57373", "#EF5350", "#F44336", "#E53935", "#D32F2F", "#C62828"]
}, {
  color: "rosa",
  preview: "#F06292",
  variants: ["#FCE4EC", "#F8BBD0", "#F48FB1", "#F06292", "#EC407A", "#E91E63", "#D81B60", "#C2185B", "#AD1457"]
}, {
  color: "purpura",
  preview: "#BA68C8",
  variants: ["#F3E5F5", "#E1BEE7", "#CE93D8", "#BA68C8", "#AB47BC", "#9C27B0", "#8E24AA", "#7B1FA2", "#6A1B9A"]
}, {
  color: "purpura oscuro",
  preview: "#9575CD",
  variants: ["#EDE7F6", "#D1C4E9", "#B39DDB", "#9575CD", "#7E57C2", "#673AB7", "#5E35B1", "#512DA8", "#4527A0"]
}, {
  color: "indigo",
  preview: "#7986CB",
  variants: ["#E8EAF6", "#C5CAE9", "#9FA8DA", "#7986CB", "#5C6BC0", "#3F51B5", "#3949AB", "#303F9F", "#283593"]
}, {
  color: "azul",
  preview: "#64B5F6",
  variants: ["#E3F2FD", "#BBDEFB", "#90CAF9", "#64B5F6", "#42A5F5", "#2196F3", "#1E88E5", "#1976D2", "#1565C0"]
}, {
  color: "celeste",
  preview: "#4FC3F7",
  variants: ["#E1F5FE", "#B3E5FC", "#81D4FA", "#4FC3F7", "#29B6F6", "#03A9F4", "#039BE5", "#0288D1", "#0277BD"]
}, {
  color: "cyan",
  preview: "#4DD0E1",
  variants: ["#E0F7FA", "#B2EBF2", "#80DEEA", "#4DD0E1", "#26C6DA", "#00BCD4", "#00ACC1", "#0097A7", "#00838F"]
}, {
  color: "color",
  preview: "#4DB6AC",
  variants: ["#E0F2F1", "#B2DFDB", "#80CBC4", "#4DB6AC", "#26A69A", "#009688", "#00897B", "#00796B", "#00695C"]
}, {
  color: "verde",
  preview: "#81C784",
  variants: ["#E8F5E9", "#C8E6C9", "#A5D6A7", "#81C784", "#66BB6A", "#4CAF50", "#43A047", "#388E3C", "#2E7D32"]
}, {
  color: "verde claro",
  preview: "#AED581",
  variants: ["#F1F8E9", "#DCEDC8", "#C5E1A5", "#AED581", "#9CCC65", "#8BC34A", "#7CB342", "#689F38", "#558B2F"]
}, {
  color: "lima",
  preview: "#DCE775",
  variants: ["#F9FBE7", "#F0F4C3", "#E6EE9C", "#DCE775", "#D4E157", "#CDDC39", "#C0CA33", "#AFB42B", "#9E9D24"]
}, {
  color: "amarillo",
  preview: "#FFF176",
  variants: ["#FFFDE7", "#FFF9C4", "#FFF59D", "#FFF176", "#FFEE58", "#FFEB3B", "#FDD835", "#FBC02D", "#F9A825"]
}, {
  color: "ambar",
  preview: "#FFD54F",
  variants: ["#FFF8E1", "#FFECB3", "#FFE082", "#FFD54F", "#FFCA28", "#FFC107", "#FFB300", "#FFA000", "#FF8F00"]
}, {
  color: "naranja",
  preview: "#FFB74D",
  variants: ["#FFF3E0", "#FFE0B2", "#FFCC80", "#FFB74D", "#FFA726", "#FF9800", "#FB8C00", "#F57C00", "#EF6C00"]
}, {
  color: "naranja oscuro",
  preview: "#FF8A65",
  variants: ["#FBE9E7", "#FFCCBC", "#FFAB91", "#FF8A65", "#FF7043", "#FF5722", "#F4511E", "#E64A19", "#D84315"]
}, {
  color: "marron",
  preview: "#A1887F",
  variants: ["#EFEBE9", "#D7CCC8", "#BCAAA4", "#A1887F", "#8D6E63", "#795548", "#6D4C41", "#5D4037", "#4E342E"]
}, {
  color: "escala de grises",
  preview: "#E0E0E0",
  variants: ["#FFFFFF", "#FAFAFA", "#F5F5F5", "#EEEEEE", "#E0E0E0", "#BDBDBD", "#9E9E9E", "#757575", "#616161", "#424242", "#000000"]
}, {
  color: "azul gris",
  preview: "#90A4AE",
  variants: ["#ECEFF1", "#CFD8DC", "#B0BEC5", "#90A4AE", "#78909C", "#607D8B", "#546E7A", "#455A64", "#37474F"]
}];
const formats = ['hex', 'rgba', 'hsla'];
class Rgba {
  constructor(r, g, b, a) {
    this.r = r;
    this.g = g;
    this.b = b;
    this.a = a;
  }
  denormalize() {
    this.r = Math.round(this.r * 255);
    this.g = Math.round(this.g * 255);
    this.b = Math.round(this.b * 255);
    return this;
  }
  toString() {
    this.denormalize();
    let output = 'rgb' + (this.a != 1 ? 'a(' : '(') + this.r + ', ' + this.g + ', ' + this.b + (this.a != 1 ? ', ' + this.a.toPrecision(2) + ')' : ')');
    return output;
  }
}
class Hsva {
  constructor(h, s, v, a) {
    this.h = h;
    this.s = s;
    this.v = v;
    this.a = a;
    this.onChange = new core_.EventEmitter(true);
  }
  onColorChange(value) {
    this.s = value.s / value.rgX;
    this.v = value.v / value.rgY;
  }
  onHueChange(value) {
    this.h = value.v / value.rgX;
    // this.sliderH = this.hsva.h;
  }

  onValueChange(value) {
    this.v = value.v / value.rgX;
  }
  onAlphaChange(value) {
    this.a = value.v / value.rgX;
  }
}
class Hsla {
  constructor(h, s, l, a) {
    this.h = h;
    this.s = s;
    this.l = l;
    this.a = a;
  }
  denormalize() {
    this.h = Math.round(this.h * 360);
    this.s = Math.round(this.s * 100);
    this.l = Math.round(this.l * 100);
    return this;
  }
  toString() {
    let output = 'hsl' + (this.a != 1 ? 'a(' : '(') + this.h + ', ' + this.s + '%, ' + this.l + '%' + (this.a != 1 ? ', ' + this.a.toPrecision(2) + ')' : ')');
    return output;
  }
}
class Cmyk {
  constructor(c, m, y, k, a = 1) {
    this.c = c;
    this.m = m;
    this.y = y;
    this.k = k;
    this.a = a;
  }
}
class NgxColor {
  constructor(params) {
    if (params) {
      this.preview = params.preview;
      this.variants = params.variants;
    }
  }
}
class ConverterService {
  // private active: ColorPickerComponent | null = null;
  constructor() {}
  // public setActive(active: ColorPickerComponent | null): void {
  //   this.active = active;
  // }
  toFormat(hsva, format) {
    var output = "";
    if (hsva) {
      switch (format) {
        case ColorFormats.HEX:
          var rgba = this.hsvaToRgba(hsva);
          rgba.denormalize();
          var output = this.rgbaToHex(rgba, true);
          break;
        case ColorFormats.HSLA:
          var hsla = this.hsva2hsla(hsva);
          hsla.denormalize();
          var output = hsla.toString();
          break;
        case ColorFormats.RGBA:
          var rgba = this.hsvaToRgba(hsva);
          var output = rgba.toString();
          break;
        case ColorFormats.CMYK:
          var rgba = this.hsvaToRgba(hsva);
          var cmyk = this.rgbaToCmyk(rgba);
          break;
      }
    }
    return output;
  }
  stringToFormat(color, format) {
    var hsva = this.stringToHsva(color, true);
    return this.toFormat(hsva, format);
  }
  hsva2hsla(hsva) {
    const h = hsva.h,
      s = hsva.s,
      v = hsva.v,
      a = hsva.a;
    if (v === 0) {
      return new Hsla(h, 0, 0, a);
    } else if (s === 0 && v === 1) {
      return new Hsla(h, 1, 1, a);
    } else {
      const l = v * (2 - s) / 2;
      return new Hsla(h, v * s / (1 - Math.abs(2 * l - 1)), l, a);
    }
  }
  hsla2hsva(hsla) {
    const h = Math.min(hsla.h, 1),
      s = Math.min(hsla.s, 1);
    const l = Math.min(hsla.l, 1),
      a = Math.min(hsla.a, 1);
    if (l === 0) {
      return new Hsva(h, 0, 0, a);
    } else {
      const v = l + s * (1 - Math.abs(2 * l - 1)) / 2;
      return new Hsva(h, 2 * (v - l) / v, v, a);
    }
  }
  hsvaToRgba(hsva) {
    let r, g, b;
    const h = hsva.h,
      s = hsva.s,
      v = hsva.v,
      a = hsva.a;
    const i = Math.floor(h * 6);
    const f = h * 6 - i;
    const p = v * (1 - s);
    const q = v * (1 - f * s);
    const t = v * (1 - (1 - f) * s);
    switch (i % 6) {
      case 0:
        r = v, g = t, b = p;
        break;
      case 1:
        r = q, g = v, b = p;
        break;
      case 2:
        r = p, g = v, b = t;
        break;
      case 3:
        r = p, g = q, b = v;
        break;
      case 4:
        r = t, g = p, b = v;
        break;
      case 5:
        r = v, g = p, b = q;
        break;
      default:
        r = 0, g = 0, b = 0;
    }
    return new Rgba(r, g, b, a);
  }
  cmykToRgb(cmyk) {
    const r = (1 - cmyk.c) * (1 - cmyk.k);
    const g = (1 - cmyk.m) * (1 - cmyk.k);
    const b = (1 - cmyk.y) * (1 - cmyk.k);
    return new Rgba(r, g, b, cmyk.a);
  }
  rgbaToCmyk(rgba) {
    const k = 1 - Math.max(rgba.r, rgba.g, rgba.b);
    if (k === 1) {
      return new Cmyk(0, 0, 0, 1, rgba.a);
    } else {
      const c = (1 - rgba.r - k) / (1 - k);
      const m = (1 - rgba.g - k) / (1 - k);
      const y = (1 - rgba.b - k) / (1 - k);
      return new Cmyk(c, m, y, k, rgba.a);
    }
  }
  rgbaToHsva(rgba) {
    let h, s;
    const r = Math.min(rgba.r, 1),
      g = Math.min(rgba.g, 1);
    const b = Math.min(rgba.b, 1),
      a = Math.min(rgba.a, 1);
    const max = Math.max(r, g, b),
      min = Math.min(r, g, b);
    const v = max,
      d = max - min;
    s = max === 0 ? 0 : d / max;
    if (max === min) {
      h = 0;
    } else {
      switch (max) {
        case r:
          h = (g - b) / d + (g < b ? 6 : 0);
          break;
        case g:
          h = (b - r) / d + 2;
          break;
        case b:
          h = (r - g) / d + 4;
          break;
        default:
          h = 0;
      }
      h /= 6;
    }
    return new Hsva(h, s, v, a);
  }
  rgbaToHex(rgba, allowHex8) {
    /* tslint:disable:no-bitwise */
    let hex = "#" + (1 << 24 | rgba.r << 16 | rgba.g << 8 | rgba.b).toString(16).substr(1);
    if (rgba.a != 1) {
      hex += (1 << 8 | Math.round(rgba.a * 255)).toString(16).substr(1);
    }
    /* tslint:enable:no-bitwise */
    return hex;
  }
  normalizeCMYK(cmyk) {
    return new Cmyk(cmyk.c / 100, cmyk.m / 100, cmyk.y / 100, cmyk.k / 100, cmyk.a);
  }
  denormalizeCMYK(cmyk) {
    return new Cmyk(Math.floor(cmyk.c * 100), Math.floor(cmyk.m * 100), Math.floor(cmyk.y * 100), Math.floor(cmyk.k * 100), cmyk.a);
  }
  denormalizeRGBA(rgba) {
    return new Rgba(Math.round(rgba.r * 255), Math.round(rgba.g * 255), Math.round(rgba.b * 255), rgba.a);
  }
  stringToHsva(colorString = "", allowHex8 = true) {
    let hsva = null;
    colorString = (colorString || "").toLowerCase();
    const stringParsers = [{
      re: /(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
      parse: function (execResult) {
        return new Rgba(parseInt(execResult[2], 10) / 255, parseInt(execResult[3], 10) / 255, parseInt(execResult[4], 10) / 255, isNaN(parseFloat(execResult[5])) ? 1 : parseFloat(execResult[5]));
      }
    }, {
      re: /(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
      parse: function (execResult) {
        return new Hsla(parseInt(execResult[2], 10) / 360, parseInt(execResult[3], 10) / 100, parseInt(execResult[4], 10) / 100, isNaN(parseFloat(execResult[5])) ? 1 : parseFloat(execResult[5]));
      }
    }];
    if (allowHex8) {
      stringParsers.push({
        re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,
        parse: function (execResult) {
          return new Rgba(parseInt(execResult[1], 16) / 255, parseInt(execResult[2], 16) / 255, parseInt(execResult[3], 16) / 255, parseInt(execResult[4] || "FF", 16) / 255);
        }
      });
    } else {
      stringParsers.push({
        re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,
        parse: function (execResult) {
          return new Rgba(parseInt(execResult[1], 16) / 255, parseInt(execResult[2], 16) / 255, parseInt(execResult[3], 16) / 255, 1);
        }
      });
    }
    stringParsers.push({
      re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,
      parse: function (execResult) {
        return new Rgba(parseInt(execResult[1] + execResult[1], 16) / 255, parseInt(execResult[2] + execResult[2], 16) / 255, parseInt(execResult[3] + execResult[3], 16) / 255, 1);
      }
    });
    for (const key in stringParsers) {
      if (stringParsers.hasOwnProperty(key)) {
        const parser = stringParsers[key];
        const match = parser.re.exec(colorString),
          color = match && parser.parse(match);
        if (color) {
          if (color instanceof Rgba) {
            hsva = this.rgbaToHsva(color);
          } else if (color instanceof Hsla) {
            hsva = this.hsla2hsva(color);
          }
          return hsva;
        }
      }
    }
    return hsva;
  }
  outputFormat(hsva) {
    return this.hsvaToRgba(hsva).toString();
  }
  getFormatByString(color) {
    if (color) {
      color = color.toLowerCase();
      let regexHex = /(#([\da-f]{3}(?:[\da-f]{3})?(?:[\da-f]{2})?))/;
      let regexRGBA = /(rgba\((\d{1,3},\s?){3}(1|0?\.\d+)\)|rgb\(\d{1,3}(,\s?\d{1,3}){2}\))/;
      let regexHSLA = /(hsla\((\d{1,3}%?,\s?){3}(1|0?\.\d+)\)|hsl\(\d{1,3}%?(,\s?\d{1,3}%?){2}\))/;
      if (regexHex.test(color)) {
        return "hex";
      } else if (regexRGBA.test(color)) {
        return "rgba";
      } else if (regexHSLA.test(color)) {
        return "hsla";
      }
    }
    return "hex";
  }
}
ConverterService.ɵfac = function ConverterService_Factory(t) {
  return new (t || ConverterService)();
};
ConverterService.ɵprov = /* @__PURE__ */core_["ɵɵdefineInjectable"]({
  token: ConverterService,
  factory: ConverterService.ɵfac
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](ConverterService, [{
    type: core_.Injectable
  }], function () {
    return [];
  }, null);
})();
class SliderPosition {
  constructor(h, s, v, a) {
    this.h = h;
    this.s = s;
    this.v = v;
    this.a = a;
  }
}
class SliderDimension {
  constructor(h, s, v, a) {
    this.h = h;
    this.s = s;
    this.v = v;
    this.a = a;
  }
}
class SliderDirective {
  mouseDown(event) {
    this.start(event);
  }
  touchStart(event) {
    this.start(event);
  }
  constructor(elRef) {
    this.elRef = elRef;
    this.dragEnd = new core_.EventEmitter();
    this.dragStart = new core_.EventEmitter();
    this.newValue = new core_.EventEmitter();
    this.listenerMove = event => this.move(event);
    this.listenerStop = () => this.stop();
  }
  move(event) {
    event.preventDefault();
    this.setCursor(event);
  }
  start(event) {
    this.setCursor(event);
    event.stopPropagation();
    document.addEventListener('mouseup', this.listenerStop);
    document.addEventListener('touchend', this.listenerStop);
    document.addEventListener('mousemove', this.listenerMove);
    document.addEventListener('touchmove', this.listenerMove);
    this.dragStart.emit();
  }
  stop() {
    document.removeEventListener('mouseup', this.listenerStop);
    document.removeEventListener('touchend', this.listenerStop);
    document.removeEventListener('mousemove', this.listenerMove);
    document.removeEventListener('touchmove', this.listenerMove);
    this.dragEnd.emit();
  }
  getX(event) {
    const position = this.elRef.nativeElement.getBoundingClientRect();
    const pageX = event.pageX !== undefined ? event.pageX : event.touches[0].pageX;
    return pageX - position.left - window.pageXOffset;
  }
  getY(event) {
    const position = this.elRef.nativeElement.getBoundingClientRect();
    const pageY = event.pageY !== undefined ? event.pageY : event.touches[0].pageY;
    return pageY - position.top - window.pageYOffset;
  }
  setCursor(event) {
    const width = this.elRef.nativeElement.offsetWidth;
    const height = this.elRef.nativeElement.offsetHeight;
    const x = Math.max(0, Math.min(this.getX(event), width));
    const y = Math.max(0, Math.min(this.getY(event), height));
    if (this.rgX !== undefined && this.rgY !== undefined) {
      this.newValue.emit({
        s: x / width,
        v: 1 - y / height,
        rgX: this.rgX,
        rgY: this.rgY
      });
    } else if (this.rgX === undefined && this.rgY !== undefined) {
      this.newValue.emit({
        v: y / height,
        rgY: this.rgY
      });
    } else if (this.rgX !== undefined && this.rgY === undefined) {
      this.newValue.emit({
        v: x / width,
        rgX: this.rgX
      });
    }
  }
}
SliderDirective.ɵfac = function SliderDirective_Factory(t) {
  return new (t || SliderDirective)(core_["ɵɵdirectiveInject"](core_.ElementRef));
};
SliderDirective.ɵdir = /* @__PURE__ */core_["ɵɵdefineDirective"]({
  type: SliderDirective,
  selectors: [["", "slider", ""]],
  hostBindings: function SliderDirective_HostBindings(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵlistener"]("mousedown", function SliderDirective_mousedown_HostBindingHandler($event) {
        return ctx.mouseDown($event);
      })("touchstart", function SliderDirective_touchstart_HostBindingHandler($event) {
        return ctx.touchStart($event);
      });
    }
  },
  inputs: {
    rgX: "rgX",
    rgY: "rgY",
    slider: "slider"
  },
  outputs: {
    dragEnd: "dragEnd",
    dragStart: "dragStart",
    newValue: "newValue"
  }
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](SliderDirective, [{
    type: core_.Directive,
    args: [{
      selector: '[slider]'
    }]
  }], function () {
    return [{
      type: core_.ElementRef
    }];
  }, {
    rgX: [{
      type: core_.Input
    }],
    rgY: [{
      type: core_.Input
    }],
    slider: [{
      type: core_.Input
    }],
    dragEnd: [{
      type: core_.Output
    }],
    dragStart: [{
      type: core_.Output
    }],
    newValue: [{
      type: core_.Output
    }],
    mouseDown: [{
      type: core_.HostListener,
      args: ['mousedown', ['$event']]
    }],
    touchStart: [{
      type: core_.HostListener,
      args: ['touchstart', ['$event']]
    }]
  });
})();
class ColorPickerComponent {
  constructor(service, cdr) {
    this.service = service;
    this.cdr = cdr;
    //IO color
    this.color = new Hsva(0, 1, 1, 1);
    this.controls = "default";
    this.sliderChange = new core_.EventEmitter(false);
    this.onAlphaChange = new core_.EventEmitter(false);
    //Event triggered when any slider change
    // @Output() colorSelectedChange:EventEmitter<Hsva> = new EventEmitter<Hsva>(false);
    this.hsva = new Hsva(0, 1, 1, 1);
    this.selectedColor = "#000000";
    this.fallbackColor = "#000000";
  }
  ngOnInit() {
    if (!this.color) {
      this.color = new Hsva(0, 1, 1, 1);
    }
    this.slider = new SliderPosition(0, 0, 0, 0);
    this.update();
  }
  ngOnDestroy() {}
  ngOnChanges(changes) {
    if (changes.color && this.color) {
      this.update();
    }
  }
  ngAfterViewInit() {
    var _a, _b;
    const hueWidth = ((_a = this.hueSlider) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) || 140;
    const alphaWidth = ((_b = this.alphaSlider) === null || _b === void 0 ? void 0 : _b.nativeElement.offsetWidth) || 140;
    this.sliderDimMax = new SliderDimension(hueWidth, 220, 130, alphaWidth);
    this.update();
  }
  onSliderChange(type, event) {
    switch (type) {
      case "saturation-lightness":
        this.hsva.onColorChange(event);
        break;
      case "hue":
        this.hsva.onHueChange(event);
        break;
      case "alpha":
        this.hsva.onAlphaChange(event);
        this.onAlphaChange.emit(event);
        break;
      case "value":
        this.hsva.onValueChange(event);
        break;
    }
    // this.sHue = this.hsva.h;
    this.update();
    this.setColor(this.outputColor);
  }
  setColor(color) {
    this.color = color;
    this.sliderChange.emit(this.color);
  }
  getBackgroundColor(color) {
    return {
      background: "linear-gradient(90deg, rgba(36,0,0,0) 0%, " + color + " 100%)"
    };
  }
  update() {
    this.hsva = this.color;
    if (this.sliderDimMax) {
      let rgba = this.service.hsvaToRgba(this.hsva).denormalize();
      let hue = this.service.hsvaToRgba(new Hsva(this.hsva.h, 1, 1, 1)).denormalize();
      this.hueSliderColor = "rgb(" + hue.r + "," + hue.g + "," + hue.b + ")";
      this.alphaSliderColor = "rgb(" + rgba.r + "," + rgba.g + "," + rgba.b + ")";
      this.outputColor = this.hsva;
      this.selectedColor = this.service.hsvaToRgba(this.hsva).toString();
      this.slider = new SliderPosition(
      // (this.sHue || this.hsva.h) * this.sliderDimMax.h - 8,
      this.hsva.h * this.sliderDimMax.h - 5, this.hsva.s * this.sliderDimMax.s - 8, (1 - this.hsva.v) * this.sliderDimMax.v - 8, this.hsva.a * this.sliderDimMax.a - 5);
      this.cdr.detectChanges();
    }
  }
}
ColorPickerComponent.ɵfac = function ColorPickerComponent_Factory(t) {
  return new (t || ColorPickerComponent)(core_["ɵɵdirectiveInject"](ConverterService), core_["ɵɵdirectiveInject"](core_.ChangeDetectorRef));
};
ColorPickerComponent.ɵcmp = /* @__PURE__ */core_["ɵɵdefineComponent"]({
  type: ColorPickerComponent,
  selectors: [["color-picker"]],
  viewQuery: function ColorPickerComponent_Query(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵviewQuery"](_c0, 5);
      core_["ɵɵviewQuery"](_c1, 5);
    }
    if (rf & 2) {
      let _t;
      core_["ɵɵqueryRefresh"](_t = core_["ɵɵloadQuery"]()) && (ctx.hueSlider = _t.first);
      core_["ɵɵqueryRefresh"](_t = core_["ɵɵloadQuery"]()) && (ctx.alphaSlider = _t.first);
    }
  },
  inputs: {
    color: "color",
    controls: "controls"
  },
  outputs: {
    sliderChange: "sliderChange",
    onAlphaChange: "onAlphaChange"
  },
  features: [core_["ɵɵNgOnChangesFeature"]],
  decls: 8,
  vars: 4,
  consts: [[1, "color-picker", 3, "click"], ["dialogPopup", ""], ["class", "saturation-lightness", 3, "slider", "rgX", "rgY", "background-color", "newValue", 4, "ngIf"], [1, "hue-alpha", "box"], ["class", "left", 4, "ngIf"], [1, "right"], ["class", "hue", 3, "slider", "rgX", "newValue", 4, "ngIf"], ["class", "alpha", 3, "slider", "rgX", "newValue", 4, "ngIf"], [1, "saturation-lightness", 3, "slider", "rgX", "rgY", "newValue"], [1, "cursor"], [1, "left"], [1, "selected-color-background"], [1, "selected-color"], [1, "hue", 3, "slider", "rgX", "newValue"], ["hueSlider", ""], [1, "sliderCursor"], [1, "alpha", 3, "slider", "rgX", "newValue"], ["alphaSlider", ""], [1, "alpha-gradient", 3, "ngStyle"]],
  template: function ColorPickerComponent_Template(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵelementStart"](0, "div", 0, 1);
      core_["ɵɵlistener"]("click", function ColorPickerComponent_Template_div_click_0_listener($event) {
        return $event.stopPropagation();
      });
      core_["ɵɵtemplate"](2, ColorPickerComponent_div_2_Template, 3, 8, "div", 2);
      core_["ɵɵelementStart"](3, "div", 3);
      core_["ɵɵtemplate"](4, ColorPickerComponent_div_4_Template, 3, 2, "div", 4);
      core_["ɵɵelementStart"](5, "div", 5);
      core_["ɵɵtemplate"](6, ColorPickerComponent_div_6_Template, 5, 3, "div", 6);
      core_["ɵɵtemplate"](7, ColorPickerComponent_div_7_Template, 6, 4, "div", 7);
      core_["ɵɵelementEnd"]()()();
    }
    if (rf & 2) {
      core_["ɵɵadvance"](2);
      core_["ɵɵproperty"]("ngIf", ctx.controls != "only-alpha");
      core_["ɵɵadvance"](2);
      core_["ɵɵproperty"]("ngIf", ctx.controls != "only-alpha");
      core_["ɵɵadvance"](2);
      core_["ɵɵproperty"]("ngIf", ctx.controls != "only-alpha");
      core_["ɵɵadvance"](1);
      core_["ɵɵproperty"]("ngIf", ctx.controls != "no-alpha");
    }
  },
  dependencies: [common_.NgIf, common_.NgStyle, SliderDirective],
  styles: [".color-picker{position:relative;z-index:1000;width:220px;height:auto;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:none}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .sliderCursor{width:10px;border-radius:5px;position:absolute;margin-top:-3px;border:1px solid black}.color-picker .sliderCursor>div{border:2px solid white;border-radius:5px}.color-picker .sliderCursor>div>div{border-radius:5px;border:1px solid black;height:24px}.color-picker .cursor{position:absolute;width:21px;border:3px solid black;border-radius:100%;margin:-2px 0 0 -2px}.color-picker .cursor>div{height:15px;border:3px solid white;border-radius:100%}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;display:flex;flex-direction:column;gap:10px;padding:12px 8px}.color-picker .hue-alpha{display:flex;align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:24px;border:none;border-radius:5px;position:relative;cursor:pointer;background-size:100% 100%;background:linear-gradient(to right,red 0%,#ff0 17%,lime 33%,cyan 50%,blue 66%,#f0f 83%,red 100%)}.color-picker .alpha{direction:ltr;position:relative;width:100%;height:24px;border:none;border-radius:5px;cursor:pointer;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.color-picker .alpha-gradient{width:100%;height:100%;border-radius:5px;position:absolute}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;box-shadow:0 1px 1px 1px #00000026;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.color-picker .saturation-lightness{direction:ltr;cursor:crosshair;width:100%;position:relative;height:130px;border:none;touch-action:manipulation;background-image:linear-gradient(to top,#000 0%,transparent 100%),linear-gradient(to right,#fff 0%,transparent 100%)}\n"],
  encapsulation: 2
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](ColorPickerComponent, [{
    type: core_.Component,
    args: [{
      selector: "color-picker",
      encapsulation: core_.ViewEncapsulation.None,
      template: "<div #dialogPopup class=\"color-picker\" (click)=\"$event.stopPropagation()\">\n  <div\n    class=\"saturation-lightness\"\n    *ngIf=\"this.controls != 'only-alpha'\"\n    [slider]\n    [rgX]=\"1\"\n    [rgY]=\"1\"\n    [style.background-color]=\"hueSliderColor\"\n    (newValue)=\"onSliderChange('saturation-lightness', $event)\"\n  >\n    <div class=\"cursor\" [style.top.px]=\"slider?.v\" [style.left.px]=\"slider?.s\">\n      <div></div>\n    </div>\n  </div>\n\n  <div class=\"hue-alpha box\">\n    <div class=\"left\" *ngIf=\"this.controls != 'only-alpha'\">\n      <div class=\"selected-color-background\"></div>\n      <div\n        class=\"selected-color\"\n        [style.background-color]=\"selectedColor\"\n      ></div>\n    </div>\n\n    <div class=\"right\">\n      <div\n        *ngIf=\"this.controls != 'only-alpha'\"\n        #hueSlider\n        class=\"hue\"\n        [slider]\n        [rgX]=\"1\"\n        (newValue)=\"onSliderChange('hue', $event)\"\n      >\n        <div class=\"sliderCursor\" [style.left.px]=\"slider?.h\">\n          <div><div></div></div>\n        </div>\n      </div>\n\n      <div\n        *ngIf=\"this.controls != 'no-alpha'\"\n        #alphaSlider\n        class=\"alpha\"\n        [slider]\n        [rgX]=\"1\"\n        (newValue)=\"onSliderChange('alpha', $event)\"\n      >\n        <div\n          class=\"alpha-gradient\"\n          [ngStyle]=\"getBackgroundColor(alphaSliderColor)\"\n        ></div>\n        <div class=\"sliderCursor\" [style.left.px]=\"slider?.a\">\n          <div><div></div></div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n",
      styles: [".color-picker{position:relative;z-index:1000;width:220px;height:auto;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:none}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .sliderCursor{width:10px;border-radius:5px;position:absolute;margin-top:-3px;border:1px solid black}.color-picker .sliderCursor>div{border:2px solid white;border-radius:5px}.color-picker .sliderCursor>div>div{border-radius:5px;border:1px solid black;height:24px}.color-picker .cursor{position:absolute;width:21px;border:3px solid black;border-radius:100%;margin:-2px 0 0 -2px}.color-picker .cursor>div{height:15px;border:3px solid white;border-radius:100%}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;display:flex;flex-direction:column;gap:10px;padding:12px 8px}.color-picker .hue-alpha{display:flex;align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:24px;border:none;border-radius:5px;position:relative;cursor:pointer;background-size:100% 100%;background:linear-gradient(to right,red 0%,#ff0 17%,lime 33%,cyan 50%,blue 66%,#f0f 83%,red 100%)}.color-picker .alpha{direction:ltr;position:relative;width:100%;height:24px;border:none;border-radius:5px;cursor:pointer;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.color-picker .alpha-gradient{width:100%;height:100%;border-radius:5px;position:absolute}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;box-shadow:0 1px 1px 1px #00000026;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.color-picker .saturation-lightness{direction:ltr;cursor:crosshair;width:100%;position:relative;height:130px;border:none;touch-action:manipulation;background-image:linear-gradient(to top,#000 0%,transparent 100%),linear-gradient(to right,#fff 0%,transparent 100%)}\n"]
    }]
  }], function () {
    return [{
      type: ConverterService
    }, {
      type: core_.ChangeDetectorRef
    }];
  }, {
    color: [{
      type: core_.Input
    }],
    controls: [{
      type: core_.Input
    }],
    sliderChange: [{
      type: core_.Output
    }],
    onAlphaChange: [{
      type: core_.Output
    }],
    hueSlider: [{
      type: core_.ViewChild,
      args: ["hueSlider", {
        static: false
      }]
    }],
    alphaSlider: [{
      type: core_.ViewChild,
      args: ["alphaSlider", {
        static: false
      }]
    }]
  });
})();
class PanelComponent {
  click(event) {
    if (this.isOutside(event)) {
      this.emitClose("cancel");
    }
  }
  onScroll() {
    this.onScreenMovement();
  }
  onResize() {
    this.onScreenMovement();
  }
  constructor(service, cdr) {
    this.service = service;
    this.cdr = cdr;
    this.color = "#000000";
    this.previewColor = "#000000";
    this.hsva = new Hsva(0, 1, 1, 1);
    this.colorsAnimationEffect = "slide-in";
    this.palette = defaultColors;
    this.variants = [];
    this.colorFormats = formats;
    this.format = ColorFormats.HEX;
    this.canChangeFormat = true;
    this.menu = 1;
    this.hideColorPicker = false;
    this.hideTextInput = false;
    this.colorPickerControls = "default";
  }
  ngOnInit() {
    this.setPosition();
    this.hsva = this.service.stringToHsva(this.color);
    this.indexSeleccionado = this.findIndexSelectedColor(this.palette);
  }
  ngAfterViewInit() {
    this.setPositionY();
  }
  onScreenMovement() {
    this.setPosition();
    this.setPositionY();
    if (!this.panelRef.nativeElement.style.transition) {
      this.panelRef.nativeElement.style.transition = "transform 0.5s ease-out";
    }
  }
  findIndexSelectedColor(colors) {
    let resultIndex = undefined;
    if (this.color) {
      for (let i = 0; i < colors.length; i++) {
        const color = colors[i];
        if (typeof color == "string") {
          if (this.service.stringToFormat(this.color, ColorFormats.HEX) == this.service.stringToFormat(color, ColorFormats.HEX)) {
            resultIndex = i;
          }
        } else if (color === undefined) {
          this.color = undefined;
        } else {
          if (this.findIndexSelectedColor(color.variants) != undefined) {
            resultIndex = i;
          }
        }
      }
    }
    return resultIndex;
  }
  iniciate(triggerInstance, triggerElementRef, color, palette, animation, format, hideTextInput, hideColorPicker, acceptLabel, cancelLabel, colorPickerControls, position) {
    this.colorPickerControls = colorPickerControls;
    this.triggerInstance = triggerInstance;
    this.TriggerBBox = triggerElementRef;
    this.color = color;
    this.hideColorPicker = hideColorPicker;
    this.hideTextInput = hideTextInput;
    this.acceptLabel = acceptLabel;
    this.cancelLabel = cancelLabel;
    if (format) {
      if (formats.includes(format)) {
        this.format = formats.indexOf(format.toLowerCase());
        this.canChangeFormat = false;
        if (this.service.getFormatByString(this.color) != format.toLowerCase()) {
          this.setColor(this.service.stringToHsva(this.color));
        }
      } else {
        console.error("Format provided is invalid, using HEX");
        this.format = ColorFormats.HEX;
      }
    } else {
      this.format = formats.indexOf(this.service.getFormatByString(this.color));
    }
    this.previewColor = this.color;
    this.palette = palette !== null && palette !== void 0 ? palette : defaultColors;
    this.colorsAnimationEffect = animation;
    if (position == "top") {
      let TriggerBBox = this.TriggerBBox.nativeElement.getBoundingClientRect();
      this.positionString = "transform: translateY(calc( -100% - " + TriggerBBox.height + "px ))";
    }
  }
  setPosition() {
    if (this.TriggerBBox) {
      const panelWidth = 250;
      const viewportOffset = this.TriggerBBox.nativeElement.getBoundingClientRect();
      this.top = viewportOffset.top + viewportOffset.height;
      if (viewportOffset.left + panelWidth > window.innerWidth) {
        this.left = viewportOffset.right < panelWidth ? window.innerWidth / 2 - panelWidth / 2 : viewportOffset.right - panelWidth;
      } else {
        this.left = viewportOffset.left;
      }
    }
  }
  setPositionY() {
    const triggerBBox = this.TriggerBBox.nativeElement.getBoundingClientRect();
    const panelBBox = this.panelRef.nativeElement.getBoundingClientRect();
    const panelHeight = panelBBox.height;
    // Check for space below the trigger
    if (triggerBBox.bottom + panelHeight > window.innerHeight) {
      // there is no space, move panel over the trigger
      this.positionString = triggerBBox.top < panelBBox.height ? "transform: translateY(-" + triggerBBox.bottom + "px );" : "transform: translateY(calc( -100% - " + triggerBBox.height + "px ));";
    } else {
      this.positionString = "";
    }
    this.cdr.detectChanges();
  }
  hasVariant(color) {
    if (!this.previewColor) {
      return false;
    }
    return typeof color != "string" && color.variants.some(v => v.toUpperCase() == this.previewColor.toUpperCase());
  }
  isSelected(color) {
    if (!this.previewColor) {
      return false;
    }
    return typeof color == "string" && color.toUpperCase() == this.previewColor.toUpperCase();
  }
  getBackgroundColor(color) {
    if (typeof color == "string") {
      return {
        background: color
      };
    } else {
      return {
        background: color === null || color === void 0 ? void 0 : color.preview
      };
    }
  }
  onAlphaChange(event) {
    this.palette = this.ChangeAlphaOnPalette(event, this.palette);
  }
  ChangeAlphaOnPalette(alpha, colors) {
    var result = [];
    for (let i = 0; i < colors.length; i++) {
      const color = colors[i];
      if (typeof color == "string") {
        let newColor = this.service.stringToHsva(color);
        newColor.onAlphaChange(alpha);
        result.push(this.service.toFormat(newColor, this.format));
      } else {
        let newColor = new NgxColor();
        let newColorPreview = this.service.stringToHsva(color.preview);
        newColorPreview.onAlphaChange(alpha);
        newColor.preview = this.service.toFormat(newColorPreview, this.format);
        newColor.variants = this.ChangeAlphaOnPalette(alpha, color.variants);
        result.push(newColor);
      }
    }
    return result;
  }
  /**
   * Change color from default colors
   * @param string color
   */
  changeColor(color) {
    this.setColor(this.service.stringToHsva(color));
    // this.triggerInstance.onChange();
    this.emitClose("accept");
  }
  onChangeColorPicker(event) {
    this.temporalColor = event;
    this.color = this.service.toFormat(event, this.format);
    // this.setColor(event);
    this.triggerInstance.sliderChange(this.service.toFormat(event, this.format));
  }
  changeColorManual(color) {
    this.previewColor = color;
    this.color = color;
    this.hsva = this.service.stringToHsva(color);
    this.temporalColor = this.hsva;
    this.triggerInstance.setColor(this.color);
    // this.triggerInstance.onChange();
  }

  setColor(value) {
    this.hsva = value;
    this.color = this.service.toFormat(value, this.format);
    this.setPreviewColor(value);
    this.triggerInstance.setColor(this.color);
  }
  setPreviewColor(value) {
    this.previewColor = value ? this.service.hsvaToRgba(value).toString() : undefined;
  }
  onChange() {
    // this.triggerInstance.onChange();
  }
  onColorClick(color) {
    if (typeof color == "string" || color === undefined) {
      this.changeColor(color);
    } else {
      this.variants = color.variants;
      this.menu = 2;
    }
  }
  addColor() {
    this.menu = 3;
    this.backupColor = this.color;
    // this.color = "#FF0000";
    this.temporalColor = this.service.stringToHsva(this.color);
  }
  nextFormat() {
    if (this.canChangeFormat) {
      this.format = (this.format + 1) % this.colorFormats.length;
      this.setColor(this.hsva);
    }
  }
  emitClose(status) {
    if (this.menu == 3) {
      if (status == "cancel") {} else if (status == "accept") {
        this.setColor(this.temporalColor);
      }
    }
    this.triggerInstance.close();
  }
  onClickBack() {
    if (this.menu == 3) {
      this.color = this.backupColor;
      this.hsva = this.service.stringToHsva(this.color);
    }
    this.indexSeleccionado = this.findIndexSelectedColor(this.palette);
    this.menu = 1;
  }
  isOutside(event) {
    return event.target.classList.contains("ngx-colors-overlay");
  }
}
PanelComponent.ɵfac = function PanelComponent_Factory(t) {
  return new (t || PanelComponent)(core_["ɵɵdirectiveInject"](ConverterService), core_["ɵɵdirectiveInject"](core_.ChangeDetectorRef));
};
PanelComponent.ɵcmp = /* @__PURE__ */core_["ɵɵdefineComponent"]({
  type: PanelComponent,
  selectors: [["ngx-colors-panel"]],
  viewQuery: function PanelComponent_Query(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵviewQuery"](_c2, 5);
    }
    if (rf & 2) {
      let _t;
      core_["ɵɵqueryRefresh"](_t = core_["ɵɵloadQuery"]()) && (ctx.panelRef = _t.first);
    }
  },
  hostVars: 4,
  hostBindings: function PanelComponent_HostBindings(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵlistener"]("mousedown", function PanelComponent_mousedown_HostBindingHandler($event) {
        return ctx.click($event);
      }, false, core_["ɵɵresolveDocument"])("scroll", function PanelComponent_scroll_HostBindingHandler() {
        return ctx.onScroll();
      }, false, core_["ɵɵresolveDocument"])("resize", function PanelComponent_resize_HostBindingHandler() {
        return ctx.onResize();
      }, false, core_["ɵɵresolveWindow"]);
    }
    if (rf & 2) {
      core_["ɵɵstyleProp"]("top", ctx.top, "px")("left", ctx.left, "px");
    }
  },
  decls: 6,
  vars: 6,
  consts: [[1, "opened"], ["dialog", ""], [4, "ngIf"], ["class", "manual-input-wrapper", 4, "ngIf"], [1, "colors"], [4, "ngFor", "ngForOf"], ["style", "background: rgb(245 245 245); position: relative", "class", "circle button", 3, "click", 4, "ngIf"], [3, "controls", "color", "colorChange", "onAlphaChange", 4, "ngIf"], [1, "circle", "wrapper", "color"], [1, "circle", "color", "circle-border", 3, "ngStyle", "click"], ["class", "selected", 4, "ngIf"], [1, "selected"], [1, "circle", "button", 2, "background", "rgb(245 245 245)", "position", "relative", 3, "click"], ["style", "\n            position: absolute;\n            height: 7px;\n            width: 7px;\n            border: 1px solid rgba(0, 0, 0, 0.03);\n            border-radius: 100%;\n            top: 0;\n            right: 0;\n          ", 3, "ngStyle", 4, "ngIf"], ["xmlns", "http://www.w3.org/2000/svg", "height", "24px", "viewBox", "0 0 24 24", "width", "24px", "fill", "#222222"], ["d", "M24 24H0V0h24v24z", "fill", "none", "opacity", ".87"], ["d", "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"], [2, "position", "absolute", "height", "7px", "width", "7px", "border", "1px solid rgba(0, 0, 0, 0.03)", "border-radius", "100%", "top", "0", "right", "0", 3, "ngStyle"], [3, "controls", "color", "colorChange", "onAlphaChange"], [1, "circle", "wrapper"], [1, "add", 3, "click"], ["xmlns", "http://www.w3.org/2000/svg", "width", "24", "height", "24", "viewBox", "0 0 24 24"], ["d", "M0 0h24v24H0z", "fill", "none"], ["d", "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"], [1, "circle", "circle-border", 3, "ngStyle", "click"], [1, "nav-wrapper"], [1, "round-button", "button", 2, "float", "left", 3, "click"], [2, "float", "right", 3, "click"], [1, "color-picker-wrapper"], [3, "controls", "color", "sliderChange"], [1, "manual-input-wrapper"], [3, "click"], [1, "g-input"], ["placeholder", "#FFFFFF", "type", "text", 3, "value", "keyup", "keydown.enter"], ["paintInput", ""]],
  template: function PanelComponent_Template(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵelementStart"](0, "div", 0, 1);
      core_["ɵɵtemplate"](2, PanelComponent_ng_container_2_Template, 5, 4, "ng-container", 2);
      core_["ɵɵtemplate"](3, PanelComponent_ng_container_3_Template, 8, 2, "ng-container", 2);
      core_["ɵɵtemplate"](4, PanelComponent_ng_container_4_Template, 12, 4, "ng-container", 2);
      core_["ɵɵtemplate"](5, PanelComponent_div_5_Template, 6, 6, "div", 3);
      core_["ɵɵelementEnd"]();
    }
    if (rf & 2) {
      core_["ɵɵstyleMap"](ctx.positionString);
      core_["ɵɵadvance"](2);
      core_["ɵɵproperty"]("ngIf", ctx.menu == 1);
      core_["ɵɵadvance"](1);
      core_["ɵɵproperty"]("ngIf", ctx.menu == 2);
      core_["ɵɵadvance"](1);
      core_["ɵɵproperty"]("ngIf", ctx.menu == 3);
      core_["ɵɵadvance"](1);
      core_["ɵɵproperty"]("ngIf", !ctx.hideTextInput);
    }
  },
  dependencies: [common_.NgForOf, common_.NgIf, common_.NgStyle, ColorPickerComponent],
  styles: ["[_nghost-%COMP%]{position:fixed;z-index:2001}.hidden[_ngcontent-%COMP%]{display:none}.button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.top[_ngcontent-%COMP%]{transform:translateY(-100%)}.opened[_ngcontent-%COMP%]{box-sizing:border-box;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;background:#fff;width:250px;border-radius:5px;position:absolute}.opened[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border:none;font-family:inherit;font-size:12px;background-color:unset;-webkit-user-select:none;user-select:none;padding:10px;letter-spacing:1px;color:#222;border-radius:3px;line-height:20px}.opened[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, .opened[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]:hover{background-color:#0000000d;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1);transition-property:opacity,background-color;transition-duration:.2s,.2s;transition-timing-function:cubic-bezier(.35,0,.25,1),cubic-bezier(.35,0,.25,1);transition-delay:0s,0s}.opened[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus{outline:none}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;margin:15px}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]{height:34px;width:34px;box-sizing:border-box;border-radius:100%;cursor:pointer}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]   .add[_ngcontent-%COMP%]{font-size:20px;line-height:45px;text-align:center}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]   .selected[_ngcontent-%COMP%]{border:2px solid white;border-radius:100%;height:28px;width:28px;box-sizing:border-box;margin:2px}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle.colornull[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgba(236,236,236,.7) 0%,rgba(236,236,236,.7) 45%,#de0f00 50%,rgba(236,236,236,.7) 55%,rgba(236,236,236,.7) 100%)}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle.wrapper[_ngcontent-%COMP%]{margin:0 5px 5px;flex:34px 0 0}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle.button[_ngcontent-%COMP%]{margin:0 5px 5px}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle.wrapper.color[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.opened[_ngcontent-%COMP%]   .colors[_ngcontent-%COMP%]   .circle-border[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.03)}.opened[_ngcontent-%COMP%]   .color-picker-wrapper[_ngcontent-%COMP%]{margin:5px 15px}.opened[_ngcontent-%COMP%]   .nav-wrapper[_ngcontent-%COMP%]{overflow:hidden;margin:5px}.opened[_ngcontent-%COMP%]   .nav-wrapper[_ngcontent-%COMP%]   .round-button[_ngcontent-%COMP%]{padding:5px 0;width:40px;height:40px;box-sizing:border-box;border-radius:100%;text-align:center;line-height:45px}.opened[_ngcontent-%COMP%]   .manual-input-wrapper[_ngcontent-%COMP%]{display:flex;margin:15px;font-family:sans-serif}.opened[_ngcontent-%COMP%]   .manual-input-wrapper[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;text-align:center;font-size:10px;letter-spacing:1.5px;text-transform:uppercase;line-height:48px;width:145px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.opened[_ngcontent-%COMP%]   .manual-input-wrapper[_ngcontent-%COMP%]   .g-input[_ngcontent-%COMP%]{border:1px solid #e8ebed;height:45px;border-radius:5px;width:100%}.opened[_ngcontent-%COMP%]   .manual-input-wrapper[_ngcontent-%COMP%]   .g-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{font-size:9px;border:none;width:100%;text-transform:uppercase;outline:none;text-align:center;letter-spacing:1px;color:#595b65;height:100%;border-radius:5px;margin:0;padding:0}"],
  data: {
    animation: [(0,animations_.trigger)("colorsAnimation", [(0,animations_.transition)("void => slide-in", [
    // Initially all colors are hidden
    (0,animations_.query)(":enter", (0,animations_.style)({
      opacity: 0
    }), {
      optional: true
    }),
    //slide-in animation
    (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [(0,animations_.animate)(".3s ease-in", (0,animations_.keyframes)([(0,animations_.style)({
      opacity: 0,
      transform: "translatex(-50%)",
      offset: 0
    }), (0,animations_.style)({
      opacity: 0.5,
      transform: "translatex(-10px) scale(1.1)",
      offset: 0.3
    }), (0,animations_.style)({
      opacity: 1,
      transform: "translatex(0)",
      offset: 1
    })]))]), {
      optional: true
    })]),
    //popup animation
    (0,animations_.transition)("void => popup", [(0,animations_.query)(":enter", (0,animations_.style)({
      opacity: 0,
      transform: "scale(0)"
    }), {
      optional: true
    }), (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [(0,animations_.animate)("500ms ease-out", (0,animations_.keyframes)([(0,animations_.style)({
      opacity: 0.5,
      transform: "scale(.5)",
      offset: 0.3
    }), (0,animations_.style)({
      opacity: 1,
      transform: "scale(1.1)",
      offset: 0.8
    }), (0,animations_.style)({
      opacity: 1,
      transform: "scale(1)",
      offset: 1
    })]))]), {
      optional: true
    })])])]
  }
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](PanelComponent, [{
    type: core_.Component,
    args: [{
      selector: "ngx-colors-panel",
      animations: [(0,animations_.trigger)("colorsAnimation", [(0,animations_.transition)("void => slide-in", [
      // Initially all colors are hidden
      (0,animations_.query)(":enter", (0,animations_.style)({
        opacity: 0
      }), {
        optional: true
      }),
      //slide-in animation
      (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [(0,animations_.animate)(".3s ease-in", (0,animations_.keyframes)([(0,animations_.style)({
        opacity: 0,
        transform: "translatex(-50%)",
        offset: 0
      }), (0,animations_.style)({
        opacity: 0.5,
        transform: "translatex(-10px) scale(1.1)",
        offset: 0.3
      }), (0,animations_.style)({
        opacity: 1,
        transform: "translatex(0)",
        offset: 1
      })]))]), {
        optional: true
      })]),
      //popup animation
      (0,animations_.transition)("void => popup", [(0,animations_.query)(":enter", (0,animations_.style)({
        opacity: 0,
        transform: "scale(0)"
      }), {
        optional: true
      }), (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [(0,animations_.animate)("500ms ease-out", (0,animations_.keyframes)([(0,animations_.style)({
        opacity: 0.5,
        transform: "scale(.5)",
        offset: 0.3
      }), (0,animations_.style)({
        opacity: 1,
        transform: "scale(1.1)",
        offset: 0.8
      }), (0,animations_.style)({
        opacity: 1,
        transform: "scale(1)",
        offset: 1
      })]))]), {
        optional: true
      })])])],
      template: "<div class=\"opened\" [style]=\"positionString\" #dialog>\n  <ng-container *ngIf=\"menu == 1\">\n    <div class=\"colors\" [@colorsAnimation]=\"colorsAnimationEffect\">\n      <ng-container *ngFor=\"let color of palette; let i = index\">\n        <div class=\"circle wrapper color\">\n          <div\n            (click)=\"onColorClick(color)\"\n            class=\"circle color circle-border\"\n            [class.colornull]=\"!color\"\n            [ngStyle]=\"getBackgroundColor(color)\"\n          >\n            <div *ngIf=\"i == this.indexSeleccionado\" class=\"selected\"></div>\n          </div>\n        </div>\n      </ng-container>\n      <div\n        style=\"background: rgb(245 245 245); position: relative\"\n        (click)=\"addColor()\"\n        *ngIf=\"!hideColorPicker && this.colorPickerControls != 'only-alpha'\"\n        class=\"circle button\"\n      >\n        <div\n          *ngIf=\"!this.indexSeleccionado\"\n          style=\"\n            position: absolute;\n            height: 7px;\n            width: 7px;\n            border: 1px solid rgba(0, 0, 0, 0.03);\n            border-radius: 100%;\n            top: 0;\n            right: 0;\n          \"\n          [ngStyle]=\"getBackgroundColor(color)\"\n        ></div>\n        <svg\n          xmlns=\"http://www.w3.org/2000/svg\"\n          height=\"24px\"\n          viewBox=\"0 0 24 24\"\n          width=\"24px\"\n          fill=\"#222222\"\n        >\n          <path d=\"M24 24H0V0h24v24z\" fill=\"none\" opacity=\".87\" />\n          <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z\" />\n        </svg>\n        <!-- <div class=\"add\">\n          <icons icon=\"add\"></icons>\n        </div> -->\n      </div>\n      <color-picker\n        *ngIf=\"!hideColorPicker && this.colorPickerControls == 'only-alpha'\"\n        [controls]=\"colorPickerControls\"\n        [color]=\"hsva\"\n        (colorChange)=\"onChangeColorPicker($event)\"\n        (onAlphaChange)=\"onAlphaChange($event)\"\n      ></color-picker>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"menu == 2\">\n    <div class=\"colors\" [@colorsAnimation]=\"colorsAnimationEffect\">\n      <div class=\"circle wrapper\">\n        <div (click)=\"onClickBack()\" class=\"add\">\n          <svg\n            xmlns=\"http://www.w3.org/2000/svg\"\n            width=\"24\"\n            height=\"24\"\n            viewBox=\"0 0 24 24\"\n          >\n            <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n            <path\n              d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n            />\n          </svg>\n        </div>\n      </div>\n\n      <ng-container *ngFor=\"let variant of variants\">\n        <div class=\"circle wrapper color\">\n          <div\n            [class.colornull]=\"!variant\"\n            (click)=\"changeColor(variant)\"\n            class=\"circle circle-border\"\n            [ngStyle]=\"{ background: variant }\"\n          >\n            <div *ngIf=\"isSelected(variant)\" class=\"selected\"></div>\n          </div>\n        </div>\n      </ng-container>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"menu == 3\">\n    <div class=\"nav-wrapper\">\n      <div\n        (click)=\"onClickBack()\"\n        class=\"round-button button\"\n        style=\"float: left\"\n      >\n        <svg\n          xmlns=\"http://www.w3.org/2000/svg\"\n          width=\"24\"\n          height=\"24\"\n          viewBox=\"0 0 24 24\"\n        >\n          <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n          <path\n            d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n          />\n        </svg>\n      </div>\n      <button (click)=\"emitClose('cancel')\" style=\"float: right\">\n        {{ cancelLabel }}\n      </button>\n      <button (click)=\"emitClose('accept')\" style=\"float: right\">\n        {{ acceptLabel }}\n      </button>\n    </div>\n    <div class=\"color-picker-wrapper\">\n      <!-- <span [(colorPicker)]=\"color\"></span> -->\n      <color-picker\n        [controls]=\"colorPickerControls\"\n        [color]=\"hsva\"\n        (sliderChange)=\"onChangeColorPicker($event)\"\n      ></color-picker>\n    </div>\n  </ng-container>\n  <div class=\"manual-input-wrapper\" *ngIf=\"!hideTextInput\">\n    <p (click)=\"nextFormat()\">{{ colorFormats[format] }}</p>\n    <div class=\"g-input\">\n      <input\n        placeholder=\"#FFFFFF\"\n        type=\"text\"\n        [value]=\"color\"\n        [style.font-size.px]=\"color && color.length > 23 ? 9 : 10\"\n        [style.letter-spacing.px]=\"color && color.length > 16 ? 0 : 1.5\"\n        (keyup)=\"changeColorManual(paintInput.value)\"\n        (keydown.enter)=\"emitClose('accept')\"\n        #paintInput\n      />\n    </div>\n  </div>\n</div>\n",
      styles: [":host{position:fixed;z-index:2001}.hidden{display:none}.button{display:flex;align-items:center;justify-content:center}.top{transform:translateY(-100%)}.opened{box-sizing:border-box;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;background:#fff;width:250px;border-radius:5px;position:absolute}.opened button{border:none;font-family:inherit;font-size:12px;background-color:unset;-webkit-user-select:none;user-select:none;padding:10px;letter-spacing:1px;color:#222;border-radius:3px;line-height:20px}.opened button:hover,.opened .button:hover{background-color:#0000000d;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1);transition-property:opacity,background-color;transition-duration:.2s,.2s;transition-timing-function:cubic-bezier(.35,0,.25,1),cubic-bezier(.35,0,.25,1);transition-delay:0s,0s}.opened button:focus{outline:none}.opened .colors{display:flex;flex-wrap:wrap;align-items:center;margin:15px}.opened .colors .circle{height:34px;width:34px;box-sizing:border-box;border-radius:100%;cursor:pointer}.opened .colors .circle .add{font-size:20px;line-height:45px;text-align:center}.opened .colors .circle .selected{border:2px solid white;border-radius:100%;height:28px;width:28px;box-sizing:border-box;margin:2px}.opened .colors .circle.colornull{background:linear-gradient(135deg,rgba(236,236,236,.7) 0%,rgba(236,236,236,.7) 45%,#de0f00 50%,rgba(236,236,236,.7) 55%,rgba(236,236,236,.7) 100%)}.opened .colors .circle.wrapper{margin:0 5px 5px;flex:34px 0 0}.opened .colors .circle.button{margin:0 5px 5px}.opened .colors .circle.wrapper.color{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}.opened .colors .circle-border{border:1px solid rgba(0,0,0,.03)}.opened .color-picker-wrapper{margin:5px 15px}.opened .nav-wrapper{overflow:hidden;margin:5px}.opened .nav-wrapper .round-button{padding:5px 0;width:40px;height:40px;box-sizing:border-box;border-radius:100%;text-align:center;line-height:45px}.opened .manual-input-wrapper{display:flex;margin:15px;font-family:sans-serif}.opened .manual-input-wrapper p{margin:0;text-align:center;font-size:10px;letter-spacing:1.5px;text-transform:uppercase;line-height:48px;width:145px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.opened .manual-input-wrapper .g-input{border:1px solid #e8ebed;height:45px;border-radius:5px;width:100%}.opened .manual-input-wrapper .g-input input{font-size:9px;border:none;width:100%;text-transform:uppercase;outline:none;text-align:center;letter-spacing:1px;color:#595b65;height:100%;border-radius:5px;margin:0;padding:0}\n"]
    }]
  }], function () {
    return [{
      type: ConverterService
    }, {
      type: core_.ChangeDetectorRef
    }];
  }, {
    click: [{
      type: core_.HostListener,
      args: ["document:mousedown", ["$event"]]
    }],
    onScroll: [{
      type: core_.HostListener,
      args: ["document:scroll"]
    }],
    onResize: [{
      type: core_.HostListener,
      args: ["window:resize"]
    }],
    top: [{
      type: core_.HostBinding,
      args: ["style.top.px"]
    }],
    left: [{
      type: core_.HostBinding,
      args: ["style.left.px"]
    }],
    panelRef: [{
      type: core_.ViewChild,
      args: ["dialog"]
    }]
  });
})();
const OVERLAY_STYLES = {
  position: 'fixed',
  height: '100%',
  width: '100%',
  'z-index': 2000,
  top: 0,
  left: 0
};
class PanelFactoryService {
  constructor(resolver, applicationRef, injector) {
    this.resolver = resolver;
    this.applicationRef = applicationRef;
    this.injector = injector;
  }
  createPanel(attachTo, overlayClassName) {
    if (this.componentRef != undefined) {
      this.removePanel();
    }
    const factory = this.resolver.resolveComponentFactory(PanelComponent);
    this.componentRef = factory.create(this.injector);
    this.applicationRef.attachView(this.componentRef.hostView);
    const domElem = this.componentRef.hostView.rootNodes[0];
    this.overlay = document.createElement("div");
    this.overlay.id = "ngx-colors-overlay";
    this.overlay.classList.add("ngx-colors-overlay");
    this.overlay.classList.add(overlayClassName);
    Object.keys(OVERLAY_STYLES).forEach(attr => {
      this.overlay.style[attr] = OVERLAY_STYLES[attr];
    });
    if (attachTo) {
      document.getElementById(attachTo).appendChild(this.overlay);
    } else {
      document.body.appendChild(this.overlay);
    }
    this.overlay.appendChild(domElem);
    return this.componentRef;
  }
  removePanel() {
    this.applicationRef.detachView(this.componentRef.hostView);
    this.componentRef.destroy();
    this.overlay.remove();
  }
}
PanelFactoryService.ɵfac = function PanelFactoryService_Factory(t) {
  return new (t || PanelFactoryService)(core_["ɵɵinject"](core_.ComponentFactoryResolver), core_["ɵɵinject"](core_.ApplicationRef), core_["ɵɵinject"](core_.Injector));
};
PanelFactoryService.ɵprov = /* @__PURE__ */core_["ɵɵdefineInjectable"]({
  token: PanelFactoryService,
  factory: PanelFactoryService.ɵfac
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](PanelFactoryService, [{
    type: core_.Injectable
  }], function () {
    return [{
      type: core_.ComponentFactoryResolver
    }, {
      type: core_.ApplicationRef
    }, {
      type: core_.Injector
    }];
  }, null);
})();
class NgxColorsTriggerDirective {
  onClick() {
    this.open();
  }
  constructor(triggerRef, panelFactory) {
    this.triggerRef = triggerRef;
    this.panelFactory = panelFactory;
    //Main input/output of the color picker
    // @Input() color = '#000000';
    // @Output() colorChange:EventEmitter<string> = new EventEmitter<string>();
    this.color = "";
    //This defines the type of animation for the palatte.(slide-in | popup)
    this.colorsAnimation = "slide-in";
    this.position = "bottom";
    this.attachTo = undefined;
    this.overlayClassName = undefined;
    this.colorPickerControls = "default";
    this.acceptLabel = "ACCEPT";
    this.cancelLabel = "CANCEL";
    // This event is trigger every time the selected color change
    this.change = new core_.EventEmitter();
    // This event is trigger every time the user change the color using the panel
    this.input = new core_.EventEmitter();
    // This event is trigger every time the user change the color using the panel
    this.slider = new core_.EventEmitter();
    this.isDisabled = false;
    this.onTouchedCallback = () => {};
    this.onChangeCallback = () => {};
  }
  open() {
    if (!this.isDisabled) {
      this.panelRef = this.panelFactory.createPanel(this.attachTo, this.overlayClassName);
      this.panelRef.instance.iniciate(this, this.triggerRef, this.color, this.palette, this.colorsAnimation, this.format, this.hideTextInput, this.hideColorPicker, this.acceptLabel, this.cancelLabel, this.colorPickerControls, this.position);
    }
  }
  close() {
    this.panelFactory.removePanel();
    this.onTouchedCallback();
  }
  onChange() {
    this.onChangeCallback(this.color);
  }
  setDisabledState(isDisabled) {
    this.isDisabled = isDisabled;
    this.triggerRef.nativeElement.style.opacity = isDisabled ? 0.5 : 1;
  }
  setColor(color) {
    this.writeValue(color);
    this.input.emit(color);
  }
  sliderChange(color) {
    this.slider.emit(color);
  }
  get value() {
    return this.color;
  }
  set value(value) {
    this.setColor(value);
    this.onChangeCallback(value);
  }
  writeValue(value) {
    if (value !== this.color) {
      this.color = value;
      this.onChange();
      this.change.emit(value);
    }
  }
  registerOnChange(fn) {
    this.onChangeCallback = fn;
  }
  registerOnTouched(fn) {
    this.onTouchedCallback = fn;
  }
}
NgxColorsTriggerDirective.ɵfac = function NgxColorsTriggerDirective_Factory(t) {
  return new (t || NgxColorsTriggerDirective)(core_["ɵɵdirectiveInject"](core_.ElementRef), core_["ɵɵdirectiveInject"](PanelFactoryService));
};
NgxColorsTriggerDirective.ɵdir = /* @__PURE__ */core_["ɵɵdefineDirective"]({
  type: NgxColorsTriggerDirective,
  selectors: [["", "ngx-colors-trigger", ""]],
  hostBindings: function NgxColorsTriggerDirective_HostBindings(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵlistener"]("click", function NgxColorsTriggerDirective_click_HostBindingHandler() {
        return ctx.onClick();
      });
    }
  },
  inputs: {
    colorsAnimation: "colorsAnimation",
    palette: "palette",
    format: "format",
    position: "position",
    hideTextInput: "hideTextInput",
    hideColorPicker: "hideColorPicker",
    attachTo: "attachTo",
    overlayClassName: "overlayClassName",
    colorPickerControls: "colorPickerControls",
    acceptLabel: "acceptLabel",
    cancelLabel: "cancelLabel"
  },
  outputs: {
    change: "change",
    input: "input",
    slider: "slider"
  },
  features: [core_["ɵɵProvidersFeature"]([{
    provide: forms_.NG_VALUE_ACCESSOR,
    useExisting: (0,core_.forwardRef)(() => NgxColorsTriggerDirective),
    multi: true
  }])]
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](NgxColorsTriggerDirective, [{
    type: core_.Directive,
    args: [{
      selector: "[ngx-colors-trigger]",
      providers: [{
        provide: forms_.NG_VALUE_ACCESSOR,
        useExisting: (0,core_.forwardRef)(() => NgxColorsTriggerDirective),
        multi: true
      }]
    }]
  }], function () {
    return [{
      type: core_.ElementRef
    }, {
      type: PanelFactoryService
    }];
  }, {
    colorsAnimation: [{
      type: core_.Input
    }],
    palette: [{
      type: core_.Input
    }],
    format: [{
      type: core_.Input
    }],
    position: [{
      type: core_.Input
    }],
    hideTextInput: [{
      type: core_.Input
    }],
    hideColorPicker: [{
      type: core_.Input
    }],
    attachTo: [{
      type: core_.Input
    }],
    overlayClassName: [{
      type: core_.Input
    }],
    colorPickerControls: [{
      type: core_.Input
    }],
    acceptLabel: [{
      type: core_.Input
    }],
    cancelLabel: [{
      type: core_.Input
    }],
    change: [{
      type: core_.Output
    }],
    input: [{
      type: core_.Output
    }],
    slider: [{
      type: core_.Output
    }],
    onClick: [{
      type: core_.HostListener,
      args: ["click"]
    }]
  });
})();
class NgxColorsComponent {
  constructor(cdRef, triggerDirective) {
    this.cdRef = cdRef;
    this.triggerDirective = triggerDirective;
    this.triggerDirectiveColorChangeSubscription = null;
    //IO color
    this.color = this.triggerDirective.color;
  }
  ngOnInit() {
    this.triggerDirectiveColorChangeSubscription = this.triggerDirective.change.subscribe(color => {
      this.color = color;
      this.cdRef.markForCheck();
    });
  }
  ngOnDestroy() {
    if (this.triggerDirectiveColorChangeSubscription) {
      this.triggerDirectiveColorChangeSubscription.unsubscribe();
    }
  }
}
NgxColorsComponent.ɵfac = function NgxColorsComponent_Factory(t) {
  return new (t || NgxColorsComponent)(core_["ɵɵdirectiveInject"](core_.ChangeDetectorRef), core_["ɵɵdirectiveInject"](NgxColorsTriggerDirective, 1));
};
NgxColorsComponent.ɵcmp = /* @__PURE__ */core_["ɵɵdefineComponent"]({
  type: NgxColorsComponent,
  selectors: [["ngx-colors"]],
  decls: 4,
  vars: 5,
  consts: [[1, "app-color-picker"], [1, "preview"], [1, "preview-background"], [1, "circle", 3, "ngStyle"]],
  template: function NgxColorsComponent_Template(rf, ctx) {
    if (rf & 1) {
      core_["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "div", 2);
      core_["ɵɵelement"](3, "div", 3);
      core_["ɵɵelementEnd"]()()();
    }
    if (rf & 2) {
      core_["ɵɵadvance"](3);
      core_["ɵɵclassProp"]("colornull", !ctx.color);
      core_["ɵɵproperty"]("ngStyle", core_["ɵɵpureFunction1"](3, _c3, ctx.color));
    }
  },
  dependencies: [common_.NgStyle],
  styles: ["[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]{line-height:1px;font-family:sans-serif}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]{margin:2px;display:inline-block;box-sizing:border-box;border-radius:100%;background:white;cursor:pointer;padding:3px;box-shadow:0 1px 1px #0003,0 1px 1px 1px #00000024,0 1px 1px 1px #0000001f}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]   .preview-background[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px;border-radius:100%}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]{height:20px;width:20px;box-sizing:border-box;border-radius:100%;cursor:pointer}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]   .circle.colornull[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgba(236,236,236,.7) 0%,rgba(236,236,236,.7) 45%,#de0f00 50%,rgba(236,236,236,.7) 55%,rgba(236,236,236,.7) 100%)}[_nghost-%COMP%]   .app-color-picker[_ngcontent-%COMP%]   .preview[_ngcontent-%COMP%]   .noselected[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}"]
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](NgxColorsComponent, [{
    type: core_.Component,
    args: [{
      selector: 'ngx-colors',
      template: "<div class=\"app-color-picker\">\n  <div class=\"preview\">\n    <div class=\"preview-background\">\n      <div\n        class=\"circle\"\n        [class.colornull]=\"!color\"\n        [ngStyle]=\"{ background: color }\"\n      ></div>\n    </div>\n  </div>\n</div>\n",
      styles: [":host .app-color-picker{line-height:1px;font-family:sans-serif}:host .app-color-picker .preview{margin:2px;display:inline-block;box-sizing:border-box;border-radius:100%;background:white;cursor:pointer;padding:3px;box-shadow:0 1px 1px #0003,0 1px 1px 1px #00000024,0 1px 1px 1px #0000001f}:host .app-color-picker .preview .preview-background{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px;border-radius:100%}:host .app-color-picker .preview .circle{height:20px;width:20px;box-sizing:border-box;border-radius:100%;cursor:pointer}:host .app-color-picker .preview .circle.colornull{background:linear-gradient(135deg,rgba(236,236,236,.7) 0%,rgba(236,236,236,.7) 45%,#de0f00 50%,rgba(236,236,236,.7) 55%,rgba(236,236,236,.7) 100%)}:host .app-color-picker .preview .noselected{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0px}\n"]
    }]
  }], function () {
    return [{
      type: core_.ChangeDetectorRef
    }, {
      type: NgxColorsTriggerDirective,
      decorators: [{
        type: core_.Host
      }]
    }];
  }, null);
})();
class NgxColorsModule {}
NgxColorsModule.ɵfac = function NgxColorsModule_Factory(t) {
  return new (t || NgxColorsModule)();
};
NgxColorsModule.ɵmod = /* @__PURE__ */core_["ɵɵdefineNgModule"]({
  type: NgxColorsModule,
  declarations: [NgxColorsComponent, ColorPickerComponent, SliderDirective, PanelComponent, NgxColorsTriggerDirective],
  imports: [common_.CommonModule],
  exports: [NgxColorsComponent, NgxColorsTriggerDirective]
});
NgxColorsModule.ɵinj = /* @__PURE__ */core_["ɵɵdefineInjector"]({
  providers: [ConverterService, PanelFactoryService],
  imports: [common_.CommonModule]
});
(function () {
  (typeof ngDevMode === "undefined" || ngDevMode) && core_["ɵsetClassMetadata"](NgxColorsModule, [{
    type: core_.NgModule,
    args: [{
      declarations: [NgxColorsComponent, ColorPickerComponent, SliderDirective, PanelComponent, NgxColorsTriggerDirective],
      imports: [common_.CommonModule],
      providers: [ConverterService, PanelFactoryService],
      exports: [NgxColorsComponent, NgxColorsTriggerDirective]
    }]
  }], null, null);
})();
function validColorValidator() {
  return control => {
    const value = control.value;
    if (!value) {
      return null;
    }
    const rgbTest = /^\s*rgba?\(\s*(1?\d{1,2}|2[0-4]\d|25[0-5])\s*,\s*(1?\d{1,2}|2[0-4]\d|25[0-5])\s*,\s*(1?\d{1,2}|2[0-4]\d|25[0-5])\s*(,\s*(0\.\d{1,2}|1))?\s*\)\s*$/i;
    const hslTest = /^\s*hsla?\(\s*([0-2]?\d{1,2}|3[0-5]\d|360)\s*,\s*(0|[1-9]{1,2}|100)\%\s*,\s*(0|[1-9]{1,2}|100)\%\s*(,\s*(0\.\d{1,2}|1))?\s*\)\s*$/i;
    const hexTest = /^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
    const colorValid = rgbTest.test(value) || hslTest.test(value) || hexTest.test(value);
    return !colorValid ? {
      invalidColor: true
    } : null;
  };
}

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

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


// EXTERNAL MODULE: external "tabby-core"
var external_tabby_core_ = __webpack_require__(315);
var external_tabby_core_default = /*#__PURE__*/__webpack_require__.n(external_tabby_core_);
// EXTERNAL MODULE: external "tabby-settings"
var external_tabby_settings_ = __webpack_require__(6663);
// EXTERNAL MODULE: ./src/components/appearanceSettingsTab.component.pug?ngResource
var appearanceSettingsTab_componentngResource = __webpack_require__(7124);
var appearanceSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(appearanceSettingsTab_componentngResource);
// EXTERNAL MODULE: ./src/components/appearanceSettingsTab.component.scss?ngResource
var components_appearanceSettingsTab_componentngResource = __webpack_require__(2953);
var components_appearanceSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_appearanceSettingsTab_componentngResource);
// EXTERNAL MODULE: external "rxjs"
var external_rxjs_ = __webpack_require__(3832);
;// CONCATENATED MODULE: ../node_modules/utils-decorators/dist/esm/debounce/debouncify.js
function debouncify(originalMethod, delayMs) {
  let handler;
  return function (...args) {
    clearTimeout(handler);
    handler = setTimeout(() => {
      originalMethod.apply(this, args);
    }, delayMs);
  };
}
;// CONCATENATED MODULE: ../node_modules/utils-decorators/dist/esm/debounce/debounce.js

function debounce(delayMs) {
  return (target, propertyName, descriptor) => {
    if (descriptor.value) {
      descriptor.value = debouncify(descriptor.value, delayMs);
      return descriptor;
    }
    throw new Error('@debounce is applicable only on a methods.');
  };
}
;// CONCATENATED MODULE: ./src/components/appearanceSettingsTab.component.ts



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




/** @hidden */
let AppearanceSettingsTabComponent = class AppearanceSettingsTabComponent {
    constructor(config, themes, platform) {
        this.config = config;
        this.themes = themes;
        this.platform = platform;
        this.fonts = [];
        this.fontAutocomplete = (text$) => {
            return text$.pipe((0,external_rxjs_.debounceTime)(200), (0,external_rxjs_.distinctUntilChanged)(), (0,external_rxjs_.map)(query => this.fonts.filter(v => new RegExp(query, 'gi').test(v))), (0,external_rxjs_.map)(list => Array.from(new Set(list))));
        };
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.fonts = yield this.platform.listFonts();
        });
    }
    getPreviewFontFamily() {
        return (0,external_tabby_core_.getCSSFontFamily)(this.config.store);
    }
    saveConfiguration(requireRestart) {
        this.config.save();
        if (requireRestart) {
            this.config.requestRestart();
        }
    }
    fixFontSize() {
        this.config.store.terminal.fontSize = Math.min(50, Math.max(5, this.config.store.terminal.fontSize));
    }
};
AppearanceSettingsTabComponent.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService },
    { type: external_tabby_core_.ThemesService },
    { type: external_tabby_core_.PlatformService }
];
__decorate([
    debounce(500),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Boolean]),
    __metadata("design:returntype", void 0)
], AppearanceSettingsTabComponent.prototype, "saveConfiguration", null);
AppearanceSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: (appearanceSettingsTab_componentngResource_default()),
        styles: [(components_appearanceSettingsTab_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        external_tabby_core_.ThemesService,
        external_tabby_core_.PlatformService])
], AppearanceSettingsTabComponent);


// EXTERNAL MODULE: ./src/components/colorSchemeSettingsTab.component.pug?ngResource
var colorSchemeSettingsTab_componentngResource = __webpack_require__(8587);
var colorSchemeSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorSchemeSettingsTab_componentngResource);
// EXTERNAL MODULE: ./src/components/colorSchemeSettingsTab.component.scss?ngResource
var components_colorSchemeSettingsTab_componentngResource = __webpack_require__(6403);
var components_colorSchemeSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_colorSchemeSettingsTab_componentngResource);
// EXTERNAL MODULE: ../node_modules/deep-equal/index.js
var deep_equal = __webpack_require__(60);
var deep_equal_default = /*#__PURE__*/__webpack_require__.n(deep_equal);
;// CONCATENATED MODULE: ../node_modules/@biesbjerg/ngx-translate-extract-marker/__ivy_ngcc__/esm2015/lib/ngx-translate-extract-marker.js
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T
 * @param {?} key
 * @return {?}
 */
function marker(key) {
  return key;
}
;// CONCATENATED MODULE: ./src/api/colorSchemeProvider.ts
/**
 * Extend to add more terminal color schemes
 */
class TerminalColorSchemeProvider {
}

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



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





marker('Search color schemes');
/** @hidden */
let ColorSchemeSettingsTabComponent = class ColorSchemeSettingsTabComponent {
    constructor(colorSchemeProviders, changeDetector, platform, translate, config) {
        this.colorSchemeProviders = colorSchemeProviders;
        this.changeDetector = changeDetector;
        this.platform = platform;
        this.translate = translate;
        this.config = config;
        this.stockColorSchemes = [];
        this.customColorSchemes = [];
        this.allColorSchemes = [];
        this.filter = '';
        this.editing = false;
        this.colorIndexes = [...new Array(16).keys()];
        this.currentStockScheme = null;
        this.currentCustomScheme = null;
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.stockColorSchemes = (yield Promise.all(this.config.enabledServices(this.colorSchemeProviders).map(x => x.getSchemes()))).reduce((a, b) => a.concat(b));
            this.stockColorSchemes.sort((a, b) => a.name.localeCompare(b.name));
            this.customColorSchemes = this.config.store.terminal.customColorSchemes;
            this.changeDetector.markForCheck();
            this.update();
        });
    }
    ngOnChanges() {
        this.update();
    }
    selectScheme(scheme) {
        this.config.store.terminal.colorScheme = Object.assign({}, scheme);
        this.config.save();
        this.cancelEditing();
        this.update();
    }
    update() {
        this.currentCustomScheme = this.findMatchingScheme(this.config.store.terminal.colorScheme, this.customColorSchemes);
        this.currentStockScheme = this.findMatchingScheme(this.config.store.terminal.colorScheme, this.stockColorSchemes);
        this.allColorSchemes = this.customColorSchemes.concat(this.stockColorSchemes);
        this.changeDetector.markForCheck();
    }
    editScheme() {
        this.editing = true;
    }
    saveScheme() {
        this.customColorSchemes = this.customColorSchemes.filter(x => x.name !== this.config.store.terminal.colorScheme.name);
        this.customColorSchemes.push(this.config.store.terminal.colorScheme);
        this.config.store.terminal.customColorSchemes = this.customColorSchemes;
        this.config.save();
        this.cancelEditing();
        this.update();
    }
    cancelEditing() {
        this.editing = false;
    }
    deleteScheme(scheme) {
        return __awaiter(this, void 0, void 0, function* () {
            if ((yield this.platform.showMessageBox({
                type: 'warning',
                message: this.translate.instant('Delete "{name}"?', scheme),
                buttons: [
                    this.translate.instant('Delete'),
                    this.translate.instant('Keep'),
                ],
                defaultId: 1,
                cancelId: 1,
            })).response === 0) {
                this.customColorSchemes = this.customColorSchemes.filter(x => x.name !== scheme.name);
                this.config.store.terminal.customColorSchemes = this.customColorSchemes;
                this.config.save();
                this.update();
            }
        });
    }
    getCurrentSchemeName() {
        var _a, _b, _c;
        return (_c = (_b = ((_a = this.currentCustomScheme) !== null && _a !== void 0 ? _a : this.currentStockScheme)) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'Custom';
    }
    findMatchingScheme(scheme, schemes) {
        var _a;
        return (_a = schemes.find(x => deep_equal_default()(x, scheme))) !== null && _a !== void 0 ? _a : null;
    }
    colorsTrackBy(index) {
        return index;
    }
};
ColorSchemeSettingsTabComponent.ctorParameters = () => [
    { type: Array, decorators: [{ type: core_.Inject, args: [TerminalColorSchemeProvider,] }] },
    { type: core_.ChangeDetectorRef },
    { type: external_tabby_core_.PlatformService },
    { type: external_tabby_core_.TranslateService },
    { type: external_tabby_core_.ConfigService }
];
ColorSchemeSettingsTabComponent.propDecorators = {
    stockColorSchemes: [{ type: core_.Input }],
    customColorSchemes: [{ type: core_.Input }],
    allColorSchemes: [{ type: core_.Input }],
    filter: [{ type: core_.Input }],
    editing: [{ type: core_.Input }],
    true: [{ type: core_.HostBinding, args: ['class.content-box',] }]
};
ColorSchemeSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: (colorSchemeSettingsTab_componentngResource_default()),
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
        styles: [(components_colorSchemeSettingsTab_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [Array, core_.ChangeDetectorRef,
        external_tabby_core_.PlatformService,
        external_tabby_core_.TranslateService,
        external_tabby_core_.ConfigService])
], ColorSchemeSettingsTabComponent);


// EXTERNAL MODULE: ./src/components/terminalSettingsTab.component.pug?ngResource
var terminalSettingsTab_componentngResource = __webpack_require__(5111);
var terminalSettingsTab_componentngResource_default = /*#__PURE__*/__webpack_require__.n(terminalSettingsTab_componentngResource);
;// CONCATENATED MODULE: ./src/components/terminalSettingsTab.component.ts




/** @hidden */
let TerminalSettingsTabComponent = class TerminalSettingsTabComponent {
    constructor(config, hostApp, platform) {
        this.config = config;
        this.hostApp = hostApp;
        this.platform = platform;
        this.Platform = external_tabby_core_.Platform;
        this.altKeyName = external_tabby_core_.altKeyName;
        this.metaKeyName = external_tabby_core_.metaKeyName;
    }
    openWSLVolumeMixer() {
        this.platform.openPath('sndvol.exe');
        this.platform.exec('wsl.exe', ['tput', 'bel']);
    }
};
TerminalSettingsTabComponent.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService },
    { type: external_tabby_core_.HostAppService },
    { type: external_tabby_core_.PlatformService }
];
TerminalSettingsTabComponent.propDecorators = {
    true: [{ type: core_.HostBinding, args: ['class.content-box',] }]
};
TerminalSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: (terminalSettingsTab_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        external_tabby_core_.HostAppService,
        external_tabby_core_.PlatformService])
], TerminalSettingsTabComponent);


// EXTERNAL MODULE: ./src/components/colorPicker.component.pug?ngResource
var colorPicker_componentngResource = __webpack_require__(8419);
var colorPicker_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorPicker_componentngResource);
// EXTERNAL MODULE: ./src/components/colorPicker.component.scss?ngResource
var components_colorPicker_componentngResource = __webpack_require__(3216);
var components_colorPicker_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_colorPicker_componentngResource);
;// CONCATENATED MODULE: ./src/components/colorPicker.component.ts




/** @hidden */
let colorPicker_component_ColorPickerComponent = class ColorPickerComponent {
    constructor() {
        this.modelChange = new core_.EventEmitter();
    }
};
colorPicker_component_ColorPickerComponent.propDecorators = {
    model: [{ type: core_.Input }],
    title: [{ type: core_.Input }],
    hint: [{ type: core_.Input }],
    modelChange: [{ type: core_.Output }]
};
colorPicker_component_ColorPickerComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-picker',
        template: (colorPicker_componentngResource_default()),
        styles: [(components_colorPicker_componentngResource_default())]
    })
], colorPicker_component_ColorPickerComponent);


// EXTERNAL MODULE: ./src/components/colorSchemePreview.component.pug?ngResource
var colorSchemePreview_componentngResource = __webpack_require__(4543);
var colorSchemePreview_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorSchemePreview_componentngResource);
// EXTERNAL MODULE: ./src/components/colorSchemePreview.component.scss?ngResource
var components_colorSchemePreview_componentngResource = __webpack_require__(6683);
var components_colorSchemePreview_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_colorSchemePreview_componentngResource);
;// CONCATENATED MODULE: ./src/components/colorSchemePreview.component.ts





/** @hidden */
let ColorSchemePreviewComponent = class ColorSchemePreviewComponent extends external_tabby_core_.BaseComponent {
    constructor(config, changeDetector) {
        super();
        this.config = config;
        this.fontPreview = false;
        this.subscribeUntilDestroyed(config.changed$, () => {
            changeDetector.markForCheck();
        });
    }
    getPreviewFontFamily() {
        return (0,external_tabby_core_.getCSSFontFamily)(this.config.store);
    }
};
ColorSchemePreviewComponent.ctorParameters = () => [
    { type: external_tabby_core_.ConfigService },
    { type: core_.ChangeDetectorRef }
];
ColorSchemePreviewComponent.propDecorators = {
    scheme: [{ type: core_.Input }],
    fontPreview: [{ type: core_.Input }]
};
ColorSchemePreviewComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-scheme-preview',
        template: (colorSchemePreview_componentngResource_default()),
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
        styles: [(components_colorSchemePreview_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        core_.ChangeDetectorRef])
], ColorSchemePreviewComponent);


// EXTERNAL MODULE: ./src/components/searchPanel.component.pug?ngResource
var searchPanel_componentngResource = __webpack_require__(9869);
var searchPanel_componentngResource_default = /*#__PURE__*/__webpack_require__.n(searchPanel_componentngResource);
// EXTERNAL MODULE: ./src/components/searchPanel.component.scss?ngResource
var components_searchPanel_componentngResource = __webpack_require__(2161);
var components_searchPanel_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_searchPanel_componentngResource);
;// CONCATENATED MODULE: ./src/frontends/frontend.ts

/**
 * Extend to add support for a different VT frontend implementation
 */
class Frontend {
    get ready$() { return this.ready; }
    get title$() { return this.title; }
    get alternateScreenActive$() { return this.alternateScreenActive; }
    get mouseEvent$() { return this.mouseEvent; }
    get bell$() { return this.bell; }
    get contentUpdated$() { return this.contentUpdated; }
    get input$() { return this.input; }
    get resize$() { return this.resize; }
    get dragOver$() { return this.dragOver; }
    get drop$() { return this.drop; }
    get destroyed$() { return this.destroyed; }
    constructor(injector) {
        this.injector = injector;
        this.enableResizing = true;
        this.ready = new external_rxjs_.AsyncSubject();
        this.title = new external_rxjs_.ReplaySubject(1);
        this.alternateScreenActive = new external_rxjs_.BehaviorSubject(false);
        this.mouseEvent = new external_rxjs_.Subject();
        this.bell = new external_rxjs_.Subject();
        this.contentUpdated = new external_rxjs_.Subject();
        this.input = new external_rxjs_.Subject();
        this.resize = new external_rxjs_.ReplaySubject(1);
        this.dragOver = new external_rxjs_.Subject();
        this.drop = new external_rxjs_.Subject();
        this.destroyed = new external_rxjs_.Subject();
    }
    destroy() {
        this.destroyed.next();
        for (const o of [
            this.ready,
            this.title,
            this.alternateScreenActive,
            this.mouseEvent,
            this.bell,
            this.contentUpdated,
            this.input,
            this.resize,
            this.dragOver,
            this.drop,
            this.destroyed,
        ]) {
            o.complete();
        }
    }
    detach(host) { } // eslint-disable-line
}

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







let SearchPanelComponent = class SearchPanelComponent {
    constructor(notifications, translate, config) {
        this.notifications = notifications;
        this.translate = translate;
        this.config = config;
        this.state = { resultCount: 0 };
        this.options = Object.assign({ incremental: true }, this.config.store.terminal.searchOptions);
        this.close = new core_.EventEmitter();
        this.queryChanged = new external_rxjs_.Subject();
        this.icons = {
            'case': __webpack_require__(/*! ../icons/case.svg */ 8247),
            regexp: __webpack_require__(/*! ../icons/regexp.svg */ 1974),
            wholeWord: __webpack_require__(/*! ../icons/whole-word.svg */ 7990),
            arrowUp: __webpack_require__(/*! ../icons/arrow-up.svg */ 3476),
            arrowDown: __webpack_require__(/*! ../icons/arrow-down.svg */ 9517),
            close: __webpack_require__(/*! ../icons/close.svg */ 8834),
        };
        this.queryChanged.pipe((0,external_rxjs_.debounceTime)(250)).subscribe(() => {
            this.findPrevious(true);
        });
    }
    onQueryChange() {
        this.state = { resultCount: 0 };
        this.queryChanged.next(this.query);
    }
    findNext(incremental = false) {
        if (!this.query) {
            return;
        }
        this.state = this.frontend.findNext(this.query, Object.assign(Object.assign({}, this.options), { incremental: incremental || undefined }));
        if (!this.state.resultCount) {
            this.notifications.notice(this.translate.instant('Not found'));
        }
    }
    findPrevious(incremental = false) {
        if (!this.query) {
            return;
        }
        this.state = this.frontend.findPrevious(this.query, Object.assign(Object.assign({}, this.options), { incremental: incremental || undefined }));
        if (!this.state.resultCount) {
            this.notifications.notice(this.translate.instant('Not found'));
        }
    }
    saveSearchOptions() {
        this.config.store.terminal.searchOptions.regex = this.options.regex;
        this.config.store.terminal.searchOptions.caseSensitive = this.options.caseSensitive;
        this.config.store.terminal.searchOptions.wholeWord = this.options.wholeWord;
        this.config.save();
    }
    ngOnDestroy() {
        this.queryChanged.complete();
    }
};
SearchPanelComponent.ctorParameters = () => [
    { type: external_tabby_core_.NotificationsService },
    { type: external_tabby_core_.TranslateService },
    { type: external_tabby_core_.ConfigService }
];
SearchPanelComponent.propDecorators = {
    query: [{ type: core_.Input }],
    frontend: [{ type: core_.Input }],
    close: [{ type: core_.Output }]
};
SearchPanelComponent = __decorate([
    (0,core_.Component)({
        selector: 'search-panel',
        template: (searchPanel_componentngResource_default()),
        styles: [(components_searchPanel_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [external_tabby_core_.NotificationsService,
        external_tabby_core_.TranslateService,
        external_tabby_core_.ConfigService])
], SearchPanelComponent);


// EXTERNAL MODULE: ./src/components/streamProcessingSettings.component.pug?ngResource
var streamProcessingSettings_componentngResource = __webpack_require__(446);
var streamProcessingSettings_componentngResource_default = /*#__PURE__*/__webpack_require__.n(streamProcessingSettings_componentngResource);
;// CONCATENATED MODULE: ./src/components/streamProcessingSettings.component.ts


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


/** @hidden */
let StreamProcessingSettingsComponent = class StreamProcessingSettingsComponent {
    constructor() {
        this.inputModes = [
            {
                key: null,
                name: marker('Normal'),
                description: marker('Input is sent as you type'),
            },
            {
                key: 'local-echo',
                name: marker('Local echo'),
                description: marker('Immediately echoes your input locally'),
            },
            {
                key: 'readline',
                name: marker('Line by line'),
                description: marker('Line editor, input is sent after you press Enter'),
            },
            {
                key: 'readline-hex',
                name: marker('Hexadecimal'),
                description: marker('Send bytes by typing in hex values'),
            },
        ];
        this.outputModes = [
            {
                key: null,
                name: marker('Normal'),
                description: marker('Output is shown as it is received'),
            },
            {
                key: 'hex',
                name: marker('Hexadecimal'),
                description: marker('Output is shown as a hexdump'),
            },
        ];
        this.newlineModes = [
            { key: null, name: marker('Keep') },
            { key: 'strip', name: marker('Strip') },
            { key: 'cr', name: marker('Force CR') },
            { key: 'lf', name: marker('Force LF') },
            { key: 'crlf', name: marker('Force CRLF') },
        ];
    }
    getInputModeName(key) {
        var _a;
        return (_a = this.inputModes.find(x => x.key === key)) === null || _a === void 0 ? void 0 : _a.name;
    }
    getOutputModeName(key) {
        var _a;
        return (_a = this.outputModes.find(x => x.key === key)) === null || _a === void 0 ? void 0 : _a.name;
    }
    setInputMode(mode) {
        this.options.inputMode = mode;
    }
    setOutputMode(mode) {
        this.options.outputMode = mode;
    }
};
StreamProcessingSettingsComponent.propDecorators = {
    options: [{ type: core_.Input }]
};
StreamProcessingSettingsComponent = __decorate([
    (0,core_.Component)({
        selector: 'stream-processing-settings',
        template: (streamProcessingSettings_componentngResource_default()),
    })
], StreamProcessingSettingsComponent);


// EXTERNAL MODULE: ./src/components/loginScriptsSettings.component.pug?ngResource
var loginScriptsSettings_componentngResource = __webpack_require__(8277);
var loginScriptsSettings_componentngResource_default = /*#__PURE__*/__webpack_require__.n(loginScriptsSettings_componentngResource);
;// CONCATENATED MODULE: ./src/components/loginScriptsSettings.component.ts


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


/** @hidden */
let LoginScriptsSettingsComponent = class LoginScriptsSettingsComponent {
    constructor(platform, translate) {
        this.platform = platform;
        this.translate = translate;
    }
    ngOnInit() {
        var _a;
        this.scripts = (_a = this.options.scripts) !== null && _a !== void 0 ? _a : [];
    }
    deleteScript(script) {
        return __awaiter(this, void 0, void 0, function* () {
            if ((yield this.platform.showMessageBox({
                type: 'warning',
                message: this.translate.instant('Delete this script?'),
                detail: script.expect,
                buttons: [
                    this.translate.instant('Delete'),
                    this.translate.instant('Keep'),
                ],
                defaultId: 0,
                cancelId: 1,
            })).response === 0) {
                this.scripts = this.scripts.filter(x => x !== script);
            }
        });
    }
    addScript() {
        this.scripts.push({ expect: '', send: '' });
    }
    save() {
        this.options.scripts = this.scripts;
    }
};
LoginScriptsSettingsComponent.ctorParameters = () => [
    { type: external_tabby_core_.PlatformService },
    { type: external_tabby_core_.TranslateService }
];
LoginScriptsSettingsComponent.propDecorators = {
    options: [{ type: core_.Input }]
};
LoginScriptsSettingsComponent = __decorate([
    (0,core_.Component)({
        selector: 'login-scripts-settings',
        template: (loginScriptsSettings_componentngResource_default()),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.PlatformService,
        external_tabby_core_.TranslateService])
], LoginScriptsSettingsComponent);


// EXTERNAL MODULE: ./src/components/terminalToolbar.component.pug?ngResource
var terminalToolbar_componentngResource = __webpack_require__(2183);
var terminalToolbar_componentngResource_default = /*#__PURE__*/__webpack_require__.n(terminalToolbar_componentngResource);
// EXTERNAL MODULE: ./src/components/terminalToolbar.component.scss?ngResource
var components_terminalToolbar_componentngResource = __webpack_require__(458);
var components_terminalToolbar_componentngResource_default = /*#__PURE__*/__webpack_require__.n(components_terminalToolbar_componentngResource);
// EXTERNAL MODULE: ./node_modules/cli-spinner/index.js
var cli_spinner = __webpack_require__(9648);
// EXTERNAL MODULE: ./node_modules/ansi-colors/index.js
var ansi_colors = __webpack_require__(6791);
var ansi_colors_default = /*#__PURE__*/__webpack_require__.n(ansi_colors);
// EXTERNAL MODULE: ./node_modules/xterm/lib/xterm.js
var xterm = __webpack_require__(6333);
// EXTERNAL MODULE: ./node_modules/xterm-addon-fit/lib/xterm-addon-fit.js
var xterm_addon_fit = __webpack_require__(8990);
// EXTERNAL MODULE: ./node_modules/xterm-addon-ligatures/lib/xterm-addon-ligatures.js
var xterm_addon_ligatures = __webpack_require__(9696);
// EXTERNAL MODULE: ./node_modules/xterm-addon-search/lib/xterm-addon-search.js
var xterm_addon_search = __webpack_require__(6317);
// EXTERNAL MODULE: ./node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js
var xterm_addon_webgl = __webpack_require__(1218);
// EXTERNAL MODULE: ./node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js
var xterm_addon_unicode11 = __webpack_require__(8731);
// EXTERNAL MODULE: ./node_modules/xterm-addon-serialize/lib/xterm-addon-serialize.js
var xterm_addon_serialize = __webpack_require__(1088);
// EXTERNAL MODULE: ./node_modules/xterm-addon-image/lib/xterm-addon-image.js
var xterm_addon_image = __webpack_require__(3264);
// EXTERNAL MODULE: ./node_modules/xterm-addon-canvas/lib/xterm-addon-canvas.js
var xterm_addon_canvas = __webpack_require__(7487);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
var injectStylesIntoStyleTag = __webpack_require__(9806);
var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/styleDomAPI.js
var styleDomAPI = __webpack_require__(3005);
var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/insertBySelector.js
var insertBySelector = __webpack_require__(8215);
var insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js
var setAttributesWithoutAttributes = __webpack_require__(8291);
var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/insertStyleElement.js
var insertStyleElement = __webpack_require__(5603);
var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/styleTagTransform.js
var styleTagTransform = __webpack_require__(8592);
var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);
// EXTERNAL MODULE: ../node_modules/css-loader/dist/cjs.js!./src/frontends/xterm.css
var frontends_xterm = __webpack_require__(1637);
;// CONCATENATED MODULE: ./src/frontends/xterm.css

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (styleTagTransform_default());
options.setAttributes = (setAttributesWithoutAttributes_default());

      options.insert = insertBySelector_default().bind(null, "head");
    
options.domAPI = (styleDomAPI_default());
options.insertStyleElement = (insertStyleElement_default());

var update = injectStylesIntoStyleTag_default()(frontends_xterm/* default */.Z, options);




       /* harmony default export */ const src_frontends_xterm = (frontends_xterm/* default */.Z && frontends_xterm/* default.locals */.Z.locals ? frontends_xterm/* default.locals */.Z.locals : undefined);

;// CONCATENATED MODULE: ./src/frontends/xtermFrontend.ts















const COLOR_NAMES = [
    'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white',
    'brightBlack', 'brightRed', 'brightGreen', 'brightYellow', 'brightBlue', 'brightMagenta', 'brightCyan', 'brightWhite',
];
class FlowControl {
    constructor(xterm) {
        this.xterm = xterm;
        this.blocked = false;
        this.blocked$ = new external_rxjs_.BehaviorSubject(false);
        this.pendingCallbacks = 0;
        this.lowWatermark = 5;
        this.highWatermark = 10;
        this.bytesWritten = 0;
        this.bytesThreshold = 1024 * 128;
    }
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.blocked) {
                yield (0,external_rxjs_.firstValueFrom)(this.blocked$.pipe((0,external_rxjs_.filter)(x => !x)));
            }
            this.bytesWritten += data.length;
            if (this.bytesWritten > this.bytesThreshold) {
                this.pendingCallbacks++;
                this.bytesWritten = 0;
                if (!this.blocked && this.pendingCallbacks > this.highWatermark) {
                    this.blocked = true;
                    this.blocked$.next(true);
                }
                this.xterm.write(data, () => {
                    this.pendingCallbacks--;
                    if (this.blocked && this.pendingCallbacks < this.lowWatermark) {
                        this.blocked = false;
                        this.blocked$.next(false);
                    }
                });
            }
            else {
                this.xterm.write(data);
            }
        });
    }
}
/** @hidden */
class XTermFrontend extends Frontend {
    constructor(injector) {
        super(injector);
        this.enableResizing = true;
        this.enableWebGL = false;
        this.configuredFontSize = 0;
        this.configuredLinePadding = 0;
        this.zoom = 0;
        this.configuredTheme = {};
        this.copyOnSelect = false;
        this.search = new xterm_addon_search.SearchAddon();
        this.searchState = { resultCount: 0 };
        this.fitAddon = new xterm_addon_fit.FitAddon();
        this.serializeAddon = new xterm_addon_serialize.SerializeAddon();
        this.opened = false;
        this.configService = injector.get(external_tabby_core_.ConfigService);
        this.hotkeysService = injector.get(external_tabby_core_.HotkeysService);
        this.platformService = injector.get(external_tabby_core_.PlatformService);
        this.hostApp = injector.get(external_tabby_core_.HostAppService);
        this.themes = injector.get(external_tabby_core_.ThemesService);
        this.xterm = new xterm.Terminal({
            allowTransparency: true,
            allowProposedApi: true,
            overviewRulerWidth: 8,
            windowsMode: process.platform === 'win32',
        });
        this.flowControl = new FlowControl(this.xterm);
        this.xtermCore = this.xterm['_core'];
        this.xterm.onBinary(data => {
            this.input.next(Buffer.from(data, 'binary'));
        });
        this.xterm.onData(data => {
            this.input.next(Buffer.from(data, 'utf-8'));
        });
        this.xterm.onResize(({ cols, rows }) => {
            this.resize.next({ rows, columns: cols });
        });
        this.xterm.onTitleChange(title => {
            this.title.next(title);
        });
        this.xterm.onSelectionChange(() => {
            if (this.copyOnSelect && this.getSelection()) {
                this.copySelection();
            }
        });
        this.xterm.onBell(() => {
            this.bell.next();
        });
        this.xterm.loadAddon(this.fitAddon);
        this.xterm.loadAddon(this.serializeAddon);
        this.xterm.loadAddon(new xterm_addon_unicode11.Unicode11Addon());
        this.xterm.unicode.activeVersion = '11';
        if (this.configService.store.terminal.sixel) {
            this.xterm.loadAddon(new xterm_addon_image.ImageAddon());
        }
        const keyboardEventHandler = (name, event) => {
            if (this.isAlternateScreenActive()) {
                let modifiers = 0;
                modifiers += event.ctrlKey ? 1 : 0;
                modifiers += event.altKey ? 1 : 0;
                modifiers += event.shiftKey ? 1 : 0;
                modifiers += event.metaKey ? 1 : 0;
                if (event.key.startsWith('Arrow') && modifiers === 1) {
                    return true;
                }
            }
            // Ctrl-/
            if (event.type === 'keydown' && event.key === '/' && event.ctrlKey) {
                this.input.next(Buffer.from('\u001f', 'binary'));
                return false;
            }
            // Ctrl-@
            if (event.type === 'keydown' && event.key === '@' && event.ctrlKey) {
                this.input.next(Buffer.from('\u0000', 'binary'));
                return false;
            }
            this.hotkeysService.pushKeyEvent(name, event);
            let ret = true;
            if (this.hotkeysService.matchActiveHotkey(true) !== null) {
                event.stopPropagation();
                event.preventDefault();
                ret = false;
            }
            return ret;
        };
        this.xterm.attachCustomKeyEventHandler((event) => {
            if (this.hostApp.platform !== external_tabby_core_.Platform.Web) {
                if (event.getModifierState('Meta') && event.key.toLowerCase() === 'v' ||
                    event.key === 'Insert' && event.shiftKey) {
                    event.preventDefault();
                    return false;
                }
            }
            if (event.getModifierState('Meta') && event.key.startsWith('Arrow')) {
                return false;
            }
            return keyboardEventHandler('keydown', event);
        });
        this.xtermCore._scrollToBottom = this.xtermCore.scrollToBottom.bind(this.xtermCore);
        this.xtermCore.scrollToBottom = () => null;
        this.resizeHandler = () => {
            try {
                if (this.xterm.element && getComputedStyle(this.xterm.element).getPropertyValue('height') !== 'auto') {
                    this.fitAddon.fit();
                    this.xtermCore.viewport._refresh();
                }
            }
            catch (e) {
                // tends to throw when element wasn't shown yet
                console.warn('Could not resize xterm', e);
            }
        };
        const oldKeyUp = this.xtermCore._keyUp.bind(this.xtermCore);
        this.xtermCore._keyUp = (e) => {
            this.xtermCore.updateCursorStyle(e);
            if (keyboardEventHandler('keyup', e)) {
                oldKeyUp(e);
            }
        };
        this.xterm.buffer.onBufferChange(() => {
            const altBufferActive = this.xterm.buffer.active.type === 'alternate';
            this.alternateScreenActive.next(altBufferActive);
        });
    }
    attach(host, profile) {
        return __awaiter(this, void 0, void 0, function* () {
            this.element = host;
            this.xterm.open(host);
            this.opened = true;
            // Work around font loading bugs
            yield new Promise(resolve => setTimeout(resolve, this.hostApp.platform === external_tabby_core_.Platform.Web ? 1000 : 0));
            // Just configure the colors to avoid a flash
            this.configureColors(profile.terminalColorScheme);
            if (this.enableWebGL) {
                this.webGLAddon = new xterm_addon_webgl.WebglAddon();
                this.xterm.loadAddon(this.webGLAddon);
                this.platformService.displayMetricsChanged$.pipe((0,external_rxjs_.takeUntil)(this.destroyed$)).subscribe(() => {
                    var _a;
                    (_a = this.webGLAddon) === null || _a === void 0 ? void 0 : _a.clearTextureAtlas();
                });
            }
            else {
                this.canvasAddon = new xterm_addon_canvas.CanvasAddon();
                this.xterm.loadAddon(this.canvasAddon);
                this.platformService.displayMetricsChanged$.pipe((0,external_rxjs_.takeUntil)(this.destroyed$)).subscribe(() => {
                    var _a;
                    (_a = this.canvasAddon) === null || _a === void 0 ? void 0 : _a.clearTextureAtlas();
                });
            }
            // Allow an animation frame
            yield new Promise(r => setTimeout(r, 100));
            this.ready.next();
            this.ready.complete();
            this.xterm.loadAddon(this.search);
            this.search.onDidChangeResults(state => {
                this.searchState = state !== null && state !== void 0 ? state : { resultCount: 0 };
            });
            window.addEventListener('resize', this.resizeHandler);
            this.resizeHandler();
            // Allow an animation frame
            yield new Promise(r => setTimeout(r, 0));
            host.addEventListener('dragOver', (event) => this.dragOver.next(event));
            host.addEventListener('drop', event => this.drop.next(event));
            host.addEventListener('mousedown', event => this.mouseEvent.next(event));
            host.addEventListener('mouseup', event => this.mouseEvent.next(event));
            host.addEventListener('mousewheel', event => this.mouseEvent.next(event));
            host.addEventListener('contextmenu', event => {
                event.preventDefault();
                event.stopPropagation();
            });
            this.resizeObserver = new window['ResizeObserver'](() => setTimeout(() => this.resizeHandler()));
            this.resizeObserver.observe(host);
        });
    }
    detach(_host) {
        var _a;
        window.removeEventListener('resize', this.resizeHandler);
        (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
        delete this.resizeObserver;
    }
    destroy() {
        var _a, _b;
        super.destroy();
        (_a = this.webGLAddon) === null || _a === void 0 ? void 0 : _a.dispose();
        (_b = this.canvasAddon) === null || _b === void 0 ? void 0 : _b.dispose();
        this.xterm.dispose();
    }
    getSelection() {
        return this.xterm.getSelection();
    }
    copySelection() {
        const text = this.getSelection();
        if (!text.trim().length) {
            return;
        }
        if (text.length < 1024 * 32 && this.configService.store.terminal.copyAsHTML) {
            this.platformService.setClipboard({
                text: this.getSelection(),
                html: this.getSelectionAsHTML(),
            });
        }
        else {
            this.platformService.setClipboard({
                text: this.getSelection(),
            });
        }
    }
    selectAll() {
        this.xterm.selectAll();
    }
    clearSelection() {
        this.xterm.clearSelection();
    }
    focus() {
        setTimeout(() => this.xterm.focus());
    }
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            yield this.flowControl.write(data);
        });
    }
    clear() {
        this.xterm.clear();
    }
    visualBell() {
        if (this.element) {
            this.element.style.animation = 'none';
            setTimeout(() => {
                this.element.style.animation = 'terminalShakeFrames 0.3s ease';
            });
        }
    }
    scrollToTop() {
        this.xterm.scrollToTop();
    }
    scrollPages(pages) {
        this.xterm.scrollPages(pages);
    }
    scrollToBottom() {
        this.xtermCore._scrollToBottom();
    }
    configureColors(scheme) {
        var _a, _b;
        const config = this.configService.store;
        scheme = scheme !== null && scheme !== void 0 ? scheme : config.terminal.colorScheme;
        const theme = {
            foreground: scheme.foreground,
            selectionBackground: (_a = scheme.selection) !== null && _a !== void 0 ? _a : '#88888888',
            selectionForeground: (_b = scheme.selectionForeground) !== null && _b !== void 0 ? _b : undefined,
            background: !this.themes.findCurrentTheme().followsColorScheme && config.terminal.background === 'colorScheme' ? scheme.background : '#00000000',
            cursor: scheme.cursor,
            cursorAccent: scheme.cursorAccent,
        };
        for (let i = 0; i < COLOR_NAMES.length; i++) {
            theme[COLOR_NAMES[i]] = scheme.colors[i];
        }
        if (!deep_equal_default()(this.configuredTheme, theme)) {
            this.xterm.options.theme = theme;
            this.configuredTheme = theme;
        }
    }
    configure(profile) {
        const config = this.configService.store;
        setImmediate(() => {
            if (this.xterm.cols && this.xterm.rows && this.xtermCore.charMeasure) {
                if (this.xtermCore.charMeasure) {
                    this.xtermCore.charMeasure.measure(this.xtermCore.options);
                }
                if (this.xtermCore.renderer) {
                    this.xtermCore.renderer._updateDimensions();
                }
                this.resizeHandler();
            }
        });
        this.xterm.options.fontFamily = (0,external_tabby_core_.getCSSFontFamily)(config);
        this.xterm.options.cursorStyle = {
            beam: 'bar',
        }[config.terminal.cursor] || config.terminal.cursor;
        this.xterm.options.cursorBlink = config.terminal.cursorBlink;
        this.xterm.options.macOptionIsMeta = config.terminal.altIsMeta;
        this.xterm.options.scrollback = config.terminal.scrollbackLines;
        this.xterm.options.wordSeparator = config.terminal.wordSeparator;
        this.xterm.options.drawBoldTextInBrightColors = config.terminal.drawBoldTextInBrightColors;
        this.xterm.options.fontWeight = config.terminal.fontWeight;
        this.xterm.options.fontWeightBold = config.terminal.fontWeightBold;
        this.xterm.options.minimumContrastRatio = config.terminal.minimumContrastRatio;
        this.configuredFontSize = config.terminal.fontSize;
        this.configuredLinePadding = config.terminal.linePadding;
        this.setFontSize();
        this.copyOnSelect = config.terminal.copyOnSelect;
        this.configureColors(profile.terminalColorScheme);
        if (this.opened && config.terminal.ligatures && !this.ligaturesAddon && this.hostApp.platform !== external_tabby_core_.Platform.Web) {
            this.ligaturesAddon = new xterm_addon_ligatures.LigaturesAddon();
            this.xterm.loadAddon(this.ligaturesAddon);
        }
    }
    setZoom(zoom) {
        this.zoom = zoom;
        this.setFontSize();
        this.resizeHandler();
    }
    getSearchOptions(searchOptions) {
        return Object.assign(Object.assign({}, searchOptions), { decorations: {
                matchOverviewRuler: '#888888',
                activeMatchColorOverviewRuler: '#ffff00',
                matchBackground: '#888888',
                activeMatchBackground: '#ffff00',
            } });
    }
    wrapSearchResult(result) {
        if (!result) {
            return { resultCount: 0 };
        }
        return this.searchState;
    }
    findNext(term, searchOptions) {
        return this.wrapSearchResult(this.search.findNext(term, this.getSearchOptions(searchOptions)));
    }
    findPrevious(term, searchOptions) {
        return this.wrapSearchResult(this.search.findPrevious(term, this.getSearchOptions(searchOptions)));
    }
    cancelSearch() {
        this.search.clearDecorations();
        this.focus();
    }
    saveState() {
        return this.serializeAddon.serialize({
            excludeAltBuffer: true,
            excludeModes: true,
            scrollback: 1000,
        });
    }
    restoreState(state) {
        this.xterm.write(state);
    }
    supportsBracketedPaste() {
        return this.xterm.modes.bracketedPasteMode;
    }
    isAlternateScreenActive() {
        return this.xterm.buffer.active.type === 'alternate';
    }
    setFontSize() {
        const scale = Math.pow(1.1, this.zoom);
        this.xterm.options.fontSize = this.configuredFontSize * scale;
        // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
        this.xterm.options.lineHeight = Math.max(1, (this.configuredFontSize + this.configuredLinePadding * 2) / this.configuredFontSize);
        this.resizeHandler();
    }
    getSelectionAsHTML() {
        return this.serializeAddon.serializeAsHTML({ includeGlobalBackground: true, onlySelection: true });
    }
}
/** @hidden */
class XTermWebGLFrontend extends XTermFrontend {
    constructor() {
        super(...arguments);
        this.enableWebGL = true;
    }
}

;// CONCATENATED MODULE: ./src/api/interfaces.ts
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
function isReconnectable(object) {
    return 'reconnect' in object;
}

;// CONCATENATED MODULE: ./src/api/decorator.ts
/**
 * Extend to automatically run actions on new terminals
 */
class TerminalDecorator {
    constructor() {
        this.smartSubscriptions = new Map();
    }
    /**
     * Called when a new terminal tab starts
     */
    attach(terminal) { } // eslint-disable-line
    /**
     * Called before a terminal tab is destroyed.
     * Make sure to call super()
     */
    detach(terminal) {
        var _a;
        for (const s of (_a = this.smartSubscriptions.get(terminal)) !== null && _a !== void 0 ? _a : []) {
            s.unsubscribe();
        }
        this.smartSubscriptions.delete(terminal);
    }
    /**
     * Automatically cancel @subscription once detached from @terminal
     */
    subscribeUntilDetached(terminal, subscription) {
        var _a;
        if (!subscription) {
            return;
        }
        if (!this.smartSubscriptions.has(terminal)) {
            this.smartSubscriptions.set(terminal, []);
        }
        (_a = this.smartSubscriptions.get(terminal)) === null || _a === void 0 ? void 0 : _a.push(subscription);
    }
}

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




let MultifocusService = class MultifocusService {
    constructor(app, hotkeys, translate) {
        this.app = app;
        this.inputSubscription = null;
        this.currentTab = null;
        this.warningElement = document.createElement('div');
        this.warningElement.className = 'broadcast-status-warning';
        this.warningElement.innerText = translate.instant('Broadcast mode. Click anywhere to cancel.');
        this.warningElement.style.display = 'none';
        document.body.appendChild(this.warningElement);
        hotkeys.hotkey$.subscribe(hotkey => {
            switch (hotkey) {
                case 'focus-all-tabs':
                    this.focusAllTabs();
                    break;
                case 'pane-focus-all':
                    this.focusAllPanes();
                    break;
            }
        });
    }
    start(currentTab, tabs) {
        var _a, _b;
        if (this.inputSubscription) {
            return;
        }
        if (currentTab.parent instanceof external_tabby_core_.SplitTabComponent) {
            const parent = currentTab.parent;
            parent._allFocusMode = true;
            parent.layout();
        }
        this.currentTab = currentTab;
        this.inputSubscription = (_b = (_a = currentTab.frontend) === null || _a === void 0 ? void 0 : _a.input$.subscribe(data => {
            for (const tab of tabs) {
                if (tab !== currentTab) {
                    tab.sendInput(data);
                }
            }
        })) !== null && _b !== void 0 ? _b : null;
    }
    cancel() {
        var _a;
        this.warningElement.style.display = 'none';
        document.querySelector('app-root')['style'].border = 'none';
        if (!this.inputSubscription) {
            return;
        }
        this.inputSubscription.unsubscribe();
        this.inputSubscription = null;
        if (((_a = this.currentTab) === null || _a === void 0 ? void 0 : _a.parent) instanceof external_tabby_core_.SplitTabComponent) {
            this.currentTab.parent._allFocusMode = false;
            this.currentTab.parent.layout();
        }
        this.currentTab = null;
    }
    focusAllTabs() {
        let currentTab = this.app.activeTab;
        if (currentTab && currentTab instanceof external_tabby_core_.SplitTabComponent) {
            currentTab = currentTab.getFocusedTab();
        }
        if (!currentTab || !(currentTab instanceof BaseTerminalTabComponent)) {
            return;
        }
        const tabs = this.app.tabs
            .map((t => {
            if (t instanceof BaseTerminalTabComponent) {
                return [t];
            }
            else if (t instanceof external_tabby_core_.SplitTabComponent) {
                return t.getAllTabs()
                    .filter(x => x instanceof BaseTerminalTabComponent);
            }
            else {
                return [];
            }
        }))
            .flat();
        this.start(currentTab, tabs);
        this.warningElement.style.display = 'block';
        document.querySelector('app-root')['style'].border = '5px solid red';
    }
    focusAllPanes() {
        const currentTab = this.app.activeTab;
        if (!currentTab || !(currentTab instanceof external_tabby_core_.SplitTabComponent)) {
            return;
        }
        const pane = currentTab.getFocusedTab();
        if (!pane || !(pane instanceof BaseTerminalTabComponent)) {
            return;
        }
        const tabs = currentTab.getAllTabs().filter(t => t instanceof BaseTerminalTabComponent);
        this.start(pane, tabs);
    }
};
MultifocusService.ctorParameters = () => [
    { type: external_tabby_core_.AppService },
    { type: external_tabby_core_.HotkeysService },
    { type: external_tabby_core_.TranslateService }
];
MultifocusService = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' }),
    __metadata("design:paramtypes", [external_tabby_core_.AppService,
        external_tabby_core_.HotkeysService,
        external_tabby_core_.TranslateService])
], MultifocusService);


;// CONCATENATED MODULE: ./src/api/baseTerminalTab.component.ts
var BaseTerminalTabComponent_1;












/**
 * A class to base your custom terminal tabs on
 */
let BaseTerminalTabComponent = BaseTerminalTabComponent_1 = class BaseTerminalTabComponent extends external_tabby_core_.BaseTabComponent {
    get input$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.input$;
    }
    get output$() { return this.output; }
    get binaryOutput$() { return this.binaryOutput; }
    get resize$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.resize$;
    }
    get alternateScreenActive$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.alternateScreenActive$;
    }
    get frontendReady$() { return this.frontendReady; }
    get sessionChanged$() { return this.sessionChanged; }
    constructor(injector) {
        super(injector);
        this.injector = injector;
        this.session = null;
        this.savedStateIsLive = false;
        this.zoom = 0;
        this.showSearchPanel = false;
        this.backgroundColor = null;
        this.enableToolbar = false;
        this.pinToolbar = false;
        this.revealToolbar = false;
        /** @hidden */
        this.frontendIsReady = false;
        this.frontendReady = new external_rxjs_.Subject();
        /**
         * Enables normall passthrough from session output to terminal input
         */
        this.enablePassthrough = true;
        /**
         * Disables display of dynamic window/tab title provided by the shell
         */
        this.disableDynamicTitle = false;
        this.alternateScreenActive = false;
        this.decorators = [];
        this.output = new external_rxjs_.Subject();
        this.binaryOutput = new external_rxjs_.Subject();
        this.sessionChanged = new external_rxjs_.Subject();
        this.recentInputs = '';
        this.termContainerSubscriptions = new external_tabby_core_.SubscriptionContainer();
        this.sessionHandlers = new external_tabby_core_.SubscriptionContainer();
        this.spinner = new cli_spinner/* Spinner */.$({
            stream: {
                write: x => {
                    try {
                        if (!this.frontend) {
                            return;
                        }
                        this.writeRaw(x);
                    }
                    catch (_a) {
                        this.spinner.stop();
                    }
                },
            },
        });
        this.spinnerActive = false;
        this.spinnerPaused = false;
        this.toolbarRevealTimeout = new external_tabby_core_.ResettableTimeout(() => {
            this.revealToolbar = false;
        }, 1000);
        this.frontendWriteLock = Promise.resolve();
        this.rightMouseDownTime = 0;
        this.config = injector.get(external_tabby_core_.ConfigService);
        this.element = injector.get(core_.ElementRef);
        this.zone = injector.get(core_.NgZone);
        this.app = injector.get(external_tabby_core_.AppService);
        this.hostApp = injector.get(external_tabby_core_.HostAppService);
        this.hotkeys = injector.get(external_tabby_core_.HotkeysService);
        this.platform = injector.get(external_tabby_core_.PlatformService);
        this.notifications = injector.get(external_tabby_core_.NotificationsService);
        this.log = injector.get(external_tabby_core_.LogService);
        this.decorators = injector.get(TerminalDecorator, null, core_.InjectFlags.Optional);
        this.contextMenuProviders = injector.get(external_tabby_core_.TabContextMenuItemProvider, null, core_.InjectFlags.Optional);
        this.hostWindow = injector.get(external_tabby_core_.HostWindowService);
        this.translate = injector.get(external_tabby_core_.TranslateService);
        this.multifocus = injector.get(MultifocusService);
        this.themes = injector.get(external_tabby_core_.ThemesService);
        this.logger = this.log.create('baseTerminalTab');
        this.setTitle(this.translate.instant('Terminal'));
        this.subscribeUntilDestroyed(this.hotkeys.unfilteredHotkey$, (hotkey) => __awaiter(this, void 0, void 0, function* () {
            if (!this.hasFocus) {
                return;
            }
            if (hotkey === 'search') {
                this.showSearchPanel = true;
                setImmediate(() => {
                    const input = this.element.nativeElement.querySelector('.search-input');
                    input === null || input === void 0 ? void 0 : input.focus();
                    input === null || input === void 0 ? void 0 : input.select();
                });
            }
        }));
        this.subscribeUntilDestroyed(this.hotkeys.hotkey$, (hotkey) => __awaiter(this, void 0, void 0, function* () {
            var _a, _b, _c, _d, _e, _f, _g, _h;
            if (!this.hasFocus) {
                return;
            }
            switch (hotkey) {
                case 'ctrl-c':
                    if ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.getSelection()) {
                        this.frontend.copySelection();
                        this.frontend.clearSelection();
                        this.notifications.notice(this.translate.instant('Copied'));
                    }
                    else {
                        this.forEachFocusedTerminalPane(tab => tab.sendInput('\x03'));
                    }
                    break;
                case 'copy':
                    (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.copySelection();
                    (_c = this.frontend) === null || _c === void 0 ? void 0 : _c.clearSelection();
                    this.notifications.notice(this.translate.instant('Copied'));
                    break;
                case 'paste':
                    this.forEachFocusedTerminalPane(tab => tab.paste());
                    break;
                case 'select-all':
                    (_d = this.frontend) === null || _d === void 0 ? void 0 : _d.selectAll();
                    break;
                case 'clear':
                    this.forEachFocusedTerminalPane(tab => { var _a; return (_a = tab.frontend) === null || _a === void 0 ? void 0 : _a.clear(); });
                    break;
                case 'zoom-in':
                    this.forEachFocusedTerminalPane(tab => tab.zoomIn());
                    break;
                case 'zoom-out':
                    this.forEachFocusedTerminalPane(tab => tab.zoomOut());
                    break;
                case 'reset-zoom':
                    this.forEachFocusedTerminalPane(tab => tab.resetZoom());
                    break;
                case 'previous-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1b[1;5D',
                            [external_tabby_core_.Platform.macOS]: '\x1bb',
                            [external_tabby_core_.Platform.Linux]: '\x1bb',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'next-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1b[1;5C',
                            [external_tabby_core_.Platform.macOS]: '\x1bf',
                            [external_tabby_core_.Platform.Linux]: '\x1bf',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'delete-line':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput('\x1bw');
                    });
                    break;
                case 'delete-previous-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput('\x1b\x7f');
                    });
                    break;
                case 'delete-next-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1bd\x1b[3;5~',
                            [external_tabby_core_.Platform.macOS]: '\x1bd',
                            [external_tabby_core_.Platform.Linux]: '\x1bd',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'copy-current-path':
                    this.copyCurrentPath();
                    break;
                case 'scroll-to-top':
                    (_e = this.frontend) === null || _e === void 0 ? void 0 : _e.scrollToTop();
                    break;
                case 'scroll-up':
                    (_f = this.frontend) === null || _f === void 0 ? void 0 : _f.scrollPages(-1);
                    break;
                case 'scroll-down':
                    (_g = this.frontend) === null || _g === void 0 ? void 0 : _g.scrollPages(1);
                    break;
                case 'scroll-to-bottom':
                    (_h = this.frontend) === null || _h === void 0 ? void 0 : _h.scrollToBottom();
                    break;
                case 'reconnect-tab':
                    if (isReconnectable(this)) {
                        this.reconnect();
                    }
                    break;
            }
        }));
        this.bellPlayer = document.createElement('audio');
        this.bellPlayer.src = __webpack_require__(/*! ../bell.ogg */ 1425);
        this.bellPlayer.load();
        this.contextMenuProviders.sort((a, b) => a.weight - b.weight);
    }
    /** @hidden */
    ngOnInit() {
        var _a, _b;
        this.pinToolbar = this.enableToolbar && ((_a = window.localStorage.pinTerminalToolbar) !== null && _a !== void 0 ? _a : 'true') === 'true';
        this.focused$.subscribe(() => {
            var _a;
            this.configure();
            (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.focus();
        });
        const cls = (_b = {
            xterm: XTermFrontend,
            'xterm-webgl': XTermWebGLFrontend,
        }[this.config.store.terminal.frontend]) !== null && _b !== void 0 ? _b : XTermFrontend;
        this.frontend = new cls(this.injector);
        this.frontendReady$.pipe((0,external_rxjs_.first)()).subscribe(() => {
            this.onFrontendReady();
        });
        this.frontend.resize$.pipe((0,external_rxjs_.first)()).subscribe(({ columns, rows }) => __awaiter(this, void 0, void 0, function* () {
            var _c;
            this.size = { columns, rows };
            this.frontendReady.next();
            this.frontendReady.complete();
            this.config.enabledServices(this.decorators).forEach(decorator => {
                try {
                    decorator.attach(this);
                }
                catch (e) {
                    this.logger.warn('Decorator attach() throws', e);
                }
            });
            setTimeout(() => {
                var _a;
                (_a = this.session) === null || _a === void 0 ? void 0 : _a.resize(columns, rows);
            }, 1000);
            (_c = this.session) === null || _c === void 0 ? void 0 : _c.releaseInitialDataBuffer();
            this.sessionChanged$.subscribe(() => {
                var _a;
                (_a = this.session) === null || _a === void 0 ? void 0 : _a.releaseInitialDataBuffer();
            });
        }));
        this.alternateScreenActive$.subscribe(x => {
            this.alternateScreenActive = x;
        });
        setImmediate(() => __awaiter(this, void 0, void 0, function* () {
            var _d, _e;
            if (this.hasFocus) {
                yield ((_d = this.frontend) === null || _d === void 0 ? void 0 : _d.attach(this.content.nativeElement, this.profile));
                (_e = this.frontend) === null || _e === void 0 ? void 0 : _e.configure(this.profile);
            }
            else {
                this.focused$.pipe((0,external_rxjs_.first)()).subscribe(() => __awaiter(this, void 0, void 0, function* () {
                    var _f, _g;
                    yield ((_f = this.frontend) === null || _f === void 0 ? void 0 : _f.attach(this.content.nativeElement, this.profile));
                    (_g = this.frontend) === null || _g === void 0 ? void 0 : _g.configure(this.profile);
                }));
            }
        }));
        this.attachTermContainerHandlers();
        this.configure();
        setTimeout(() => {
            this.binaryOutput$.subscribe(() => {
                this.displayActivity();
            });
        }, 1000);
        this.frontend.bell$.subscribe(() => {
            var _a;
            if (this.config.store.terminal.bell === 'visual') {
                (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.visualBell();
            }
            if (this.config.store.terminal.bell === 'audible') {
                this.bellPlayer.play();
            }
        });
        this.frontend.focus();
        this.blurred$.subscribe(() => {
            this.multifocus.cancel();
        });
    }
    onFrontendReady() {
        this.frontendIsReady = true;
        if (this.savedState) {
            this.frontend.restoreState(this.savedState);
            if (!this.savedStateIsLive) {
                this.frontend.write('\r\n\r\n');
                this.frontend.write(ansi_colors_default().bgWhite.black(' * ') + ansi_colors_default().bgBlackBright.white(' History restored '));
                this.frontend.write('\r\n\r\n');
            }
        }
        this.input$.subscribe(data => {
            this.recentInputs += data;
            this.recentInputs = this.recentInputs.substring(this.recentInputs.length - 32);
        });
    }
    buildContextMenu() {
        return __awaiter(this, void 0, void 0, function* () {
            let items = [];
            for (const section of yield Promise.all(this.contextMenuProviders.map(x => x.getItems(this)))) {
                items = items.concat(section);
                items.push({ type: 'separator' });
            }
            items.splice(items.length - 1, 1);
            return items;
        });
    }
    /**
     * Feeds input into the active session
     */
    sendInput(data) {
        var _a, _b;
        if (!(data instanceof Buffer)) {
            data = Buffer.from(data, 'utf-8');
        }
        (_a = this.session) === null || _a === void 0 ? void 0 : _a.feedFromTerminal(data);
        if (this.config.store.terminal.scrollOnInput) {
            (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.scrollToBottom();
        }
    }
    /**
     * Feeds input into the terminal frontend
     */
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            this.frontendWriteLock = this.frontendWriteLock.then(() => this.withSpinnerPaused(() => this.writeRaw(data)));
            yield this.frontendWriteLock;
        });
    }
    writeRaw(data) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.frontend) {
                throw new Error('Frontend not ready');
            }
            if (this.config.store.terminal.detectProgress) {
                const percentageMatch = /(^|[^\d])(\d+(\.\d+)?)%([^\d]|$)/.exec(data);
                if (!this.alternateScreenActive && percentageMatch) {
                    const percentage = percentageMatch[3] ? parseFloat(percentageMatch[2]) : parseInt(percentageMatch[2]);
                    if (percentage > 0 && percentage <= 100) {
                        this.setProgress(percentage);
                    }
                }
                else {
                    this.setProgress(null);
                }
            }
            yield this.frontend.write(data);
        });
    }
    paste() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (this.hostApp.platform === external_tabby_core_.Platform.Windows) {
                data = data.replaceAll('\r\n', '\r');
            }
            else {
                data = data.replaceAll('\n', '\r');
            }
            if (this.config.store.terminal.trimWhitespaceOnPaste && data.indexOf('\n') === data.length - 1) {
                // Ends with a newline and has no other line breaks
                data = data.substring(0, data.length - 1);
            }
            if (!this.alternateScreenActive) {
                if (data.includes('\r') && this.config.store.terminal.warnOnMultilinePaste) {
                    const buttons = [
                        this.translate.instant('Paste'),
                        this.translate.instant('Cancel'),
                    ];
                    const result = (yield this.platform.showMessageBox({
                        type: 'warning',
                        detail: data.slice(0, 1000),
                        message: this.translate.instant('Paste multiple lines?'),
                        buttons,
                        defaultId: 0,
                        cancelId: 1,
                    })).response;
                    if (result === 1) {
                        return;
                    }
                }
                else {
                    if (this.config.store.terminal.trimWhitespaceOnPaste) {
                        data = data.trimEnd();
                        if (!data.includes('\r')) {
                            data = data.trimStart();
                        }
                    }
                }
            }
            if (this.config.store.terminal.bracketedPaste && ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.supportsBracketedPaste())) {
                data = `\x1b[200~${data}\x1b[201~`;
            }
            this.sendInput(data);
        });
    }
    /**
     * Applies the user settings to the terminal
     */
    configure() {
        var _a, _b;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.configure(this.profile);
        if (!this.themes.findCurrentTheme().followsColorScheme && this.config.store.terminal.background === 'colorScheme') {
            const scheme = (_b = this.profile.terminalColorScheme) !== null && _b !== void 0 ? _b : this.config.store.terminal.colorScheme;
            if (scheme.background) {
                this.backgroundColor = scheme.background;
            }
        }
        else {
            this.backgroundColor = null;
        }
    }
    zoomIn() {
        var _a;
        this.zoom++;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    zoomOut() {
        var _a;
        this.zoom--;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    resetZoom() {
        var _a;
        this.zoom = 0;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    copyCurrentPath() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let cwd = null;
            if ((_a = this.session) === null || _a === void 0 ? void 0 : _a.supportsWorkingDirectory()) {
                cwd = yield this.session.getWorkingDirectory();
            }
            if (cwd) {
                this.platform.setClipboard({ text: cwd });
                this.notifications.notice(this.translate.instant('Copied'));
            }
            else {
                this.notifications.error(this.translate.instant('Shell does not support current path detection'));
            }
        });
    }
    /** @hidden */
    ngOnDestroy() {
        super.ngOnDestroy();
        this.stopSpinner();
    }
    destroy() {
        const _super = Object.create(null, {
            destroy: { get: () => super.destroy }
        });
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function* () {
            (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.detach(this.content.nativeElement);
            (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.destroy();
            this.frontend = undefined;
            this.content.nativeElement.remove();
            this.detachTermContainerHandlers();
            this.config.enabledServices(this.decorators).forEach(decorator => {
                try {
                    decorator.detach(this);
                }
                catch (e) {
                    this.logger.warn('Decorator attach() throws', e);
                }
            });
            this.output.complete();
            this.binaryOutput.complete();
            this.frontendReady.complete();
            _super.destroy.call(this);
            if ((_c = this.session) === null || _c === void 0 ? void 0 : _c.open) {
                yield this.session.destroy();
            }
        });
    }
    detachTermContainerHandlers() {
        this.termContainerSubscriptions.cancelAll();
    }
    handleRightMouseDown(event) {
        return __awaiter(this, void 0, void 0, function* () {
            event.preventDefault();
            event.stopPropagation();
            this.rightMouseDownTime = Date.now();
            if (this.config.store.terminal.rightClick === 'menu') {
                this.platform.popupContextMenu(yield this.buildContextMenu(), event);
            }
        });
    }
    handleRightMouseUp(event) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            event.preventDefault();
            event.stopPropagation();
            if (this.config.store.terminal.rightClick === 'paste'
                || this.config.store.terminal.rightClick === 'clipboard') {
                const duration = Date.now() - this.rightMouseDownTime;
                if (duration < 250) {
                    if (this.config.store.terminal.rightClick === 'paste') {
                        this.paste();
                    }
                    else if (this.config.store.terminal.rightClick === 'clipboard') {
                        if ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.getSelection()) {
                            this.frontend.copySelection();
                            this.frontend.clearSelection();
                        }
                        else {
                            this.paste();
                        }
                    }
                }
                else {
                    this.platform.popupContextMenu(yield this.buildContextMenu(), event);
                }
            }
        });
    }
    attachTermContainerHandlers() {
        this.detachTermContainerHandlers();
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        const maybeConfigure = () => {
            if (this.hasFocus) {
                setTimeout(() => this.configure(), 250);
            }
        };
        this.termContainerSubscriptions.subscribe(this.frontend.title$, title => this.zone.run(() => {
            if (!this.disableDynamicTitle) {
                this.setTitle(title);
            }
        }));
        this.termContainerSubscriptions.subscribe(this.focused$, () => this.frontend && (this.frontend.enableResizing = true));
        this.termContainerSubscriptions.subscribe(this.blurred$, () => this.frontend && (this.frontend.enableResizing = false));
        this.termContainerSubscriptions.subscribe(this.frontend.mouseEvent$, event => {
            if (event.type === 'mousedown') {
                if (event.which === 1) {
                    this.multifocus.cancel();
                }
                if (event.which === 2) {
                    if (this.config.store.terminal.pasteOnMiddleClick) {
                        this.paste();
                    }
                    event.preventDefault();
                    event.stopPropagation();
                    return;
                }
                if (event.which === 3 || event.which === 1 && event.ctrlKey) {
                    this.handleRightMouseDown(event);
                    return;
                }
            }
            if (event.type === 'mouseup') {
                if (event.which === 3 || event.which === 1 && event.ctrlKey) {
                    this.handleRightMouseUp(event);
                    return;
                }
            }
            if (event.type === 'mousewheel') {
                let wheelDeltaY = 0;
                if ('wheelDeltaY' in event) {
                    wheelDeltaY = event['wheelDeltaY'];
                }
                else {
                    wheelDeltaY = event.deltaY;
                }
                if (event.altKey) {
                    event.preventDefault();
                    const delta = Math.round(wheelDeltaY / 50);
                    this.sendInput((delta > 0 ? '\u001bOA' : '\u001bOB').repeat(Math.abs(delta)));
                }
            }
        });
        this.termContainerSubscriptions.subscribe(this.frontend.input$, data => {
            this.sendInput(data);
        });
        this.termContainerSubscriptions.subscribe(this.frontend.resize$.pipe((0,external_rxjs_.auditTime)(100)), ({ columns, rows }) => {
            this.logger.debug(`Resizing to ${columns}x${rows}`);
            this.size = { columns, rows };
            this.zone.run(() => {
                var _a;
                if ((_a = this.session) === null || _a === void 0 ? void 0 : _a.open) {
                    this.session.resize(columns, rows);
                }
            });
        });
        this.termContainerSubscriptions.subscribe(this.platform.displayMetricsChanged$, maybeConfigure);
        this.termContainerSubscriptions.subscribe(this.hostWindow.windowMoved$, maybeConfigure);
    }
    setSession(session, destroyOnSessionClose = false) {
        if (session) {
            if (this.session) {
                this.setSession(null);
            }
            this.detachSessionHandlers();
            this.session = session;
            this.attachSessionHandlers(destroyOnSessionClose);
        }
        else {
            this.detachSessionHandlers();
            this.session = null;
        }
        this.sessionChanged.next(session);
    }
    showToolbar() {
        this.revealToolbar = true;
        this.toolbarRevealTimeout.clear();
    }
    hideToolbar() {
        this.toolbarRevealTimeout.set();
    }
    togglePinToolbar() {
        this.pinToolbar = !this.pinToolbar;
        window.localStorage.pinTerminalToolbar = this.pinToolbar;
    }
    get hasTitleInset() {
        return this.hostApp.platform === external_tabby_core_.Platform.macOS && this.config.store.appearance.tabsLocation !== 'top' && this.config.store.appearance.frame === 'thin';
    }
    attachSessionHandler(observable, handler) {
        this.sessionHandlers.subscribe(observable, handler);
    }
    attachSessionHandlers(destroyOnSessionClose = false) {
        if (!this.session) {
            throw new Error('Session not set');
        }
        // this.session.output$.bufferTime(10).subscribe((datas) => {
        this.attachSessionHandler(this.session.output$, data => {
            if (this.enablePassthrough) {
                this.output.next(data);
                this.write(data);
            }
        });
        this.attachSessionHandler(this.session.binaryOutput$, data => {
            if (this.enablePassthrough) {
                this.binaryOutput.next(data);
            }
        });
        this.attachSessionHandler(this.session.closed$, () => {
            const behavior = this.profile.behaviorOnSessionEnd;
            if (destroyOnSessionClose || behavior === 'close' || behavior === 'auto' && this.isSessionExplicitlyTerminated()) {
                this.destroy();
            }
        });
        this.attachSessionHandler(this.session.destroyed$, () => {
            this.setSession(null);
        });
        this.attachSessionHandler(this.session.oscProcessor.copyRequested$, content => {
            this.platform.setClipboard({ text: content });
            this.notifications.notice(this.translate.instant('Copied'));
        });
    }
    detachSessionHandlers() {
        this.sessionHandlers.cancelAll();
    }
    startSpinner(text) {
        if (this.spinnerActive || this.spinnerPaused) {
            return;
        }
        if (text) {
            this.spinner.text = text;
        }
        this.spinner.setSpinnerString(6);
        this.spinnerActive = true;
        this.zone.runOutsideAngular(() => {
            this.spinner.start();
        });
    }
    stopSpinner() {
        if (!this.spinnerActive) {
            return;
        }
        this.spinner.stop(true);
        this.spinnerActive = false;
    }
    withSpinnerPaused(work) {
        return __awaiter(this, void 0, void 0, function* () {
            this.spinnerPaused = true;
            if (this.spinnerActive) {
                this.spinner.stop(true);
            }
            try {
                yield work();
            }
            finally {
                this.spinnerPaused = false;
                if (this.spinnerActive) {
                    this.zone.runOutsideAngular(() => {
                        this.spinner.start();
                    });
                }
            }
        });
    }
    forEachFocusedTerminalPane(cb) {
        if (this.parent && this.parent instanceof external_tabby_core_.SplitTabComponent && this.parent._allFocusMode) {
            for (const tab of this.parent.getAllTabs()) {
                if (tab instanceof BaseTerminalTabComponent_1) {
                    cb(tab);
                }
            }
        }
        else {
            cb(this);
        }
    }
    /**
     * Return true if the user explicitly exit the session
     */
    isSessionExplicitlyTerminated() {
        return false;
    }
};
BaseTerminalTabComponent.template = __webpack_require__(/*! ../components/baseTerminalTab.component.pug */ 7224);
BaseTerminalTabComponent.styles = [__webpack_require__(/*! ../components/baseTerminalTab.component.scss */ 3191)];
BaseTerminalTabComponent.animations = [
    (0,animations_.trigger)('toolbarSlide', [
        (0,animations_.transition)(':enter', [
            (0,animations_.style)({
                transform: 'translateY(-25%)',
                opacity: '0',
            }),
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(0%)',
                opacity: '1',
            })),
        ]),
        (0,animations_.transition)(':leave', [
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(-25%)',
                opacity: '0',
            })),
        ]),
    ]),
    (0,animations_.trigger)('panelSlide', [
        (0,animations_.transition)(':enter', [
            (0,animations_.style)({
                transform: 'translateY(25%)',
                opacity: '0',
            }),
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(0%)',
                opacity: '1',
            })),
        ]),
        (0,animations_.transition)(':leave', [
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(25%)',
                opacity: '0',
            })),
        ]),
    ]),
];
BaseTerminalTabComponent.ctorParameters = () => [
    { type: core_.Injector }
];
BaseTerminalTabComponent.propDecorators = {
    zoom: [{ type: core_.Input }],
    showSearchPanel: [{ type: core_.Input }],
    content: [{ type: core_.ViewChild, args: ['content',] }],
    backgroundColor: [{ type: core_.HostBinding, args: ['style.background-color',] }],
    enableToolbar: [{ type: core_.HostBinding, args: ['class.toolbar-enabled',] }],
    pinToolbar: [{ type: core_.HostBinding, args: ['class.toolbar-pinned',] }],
    revealToolbar: [{ type: core_.HostBinding, args: ['class.toolbar-revealed',] }],
    searchPanel: [{ type: core_.ViewChild, args: [SearchPanelComponent, { 'static': false },] }],
    hasTitleInset: [{ type: core_.HostBinding, args: ['class.with-title-inset',] }]
};
BaseTerminalTabComponent = BaseTerminalTabComponent_1 = __decorate([
    (0,core_.Component)({ template: '' }),
    __metadata("design:paramtypes", [core_.Injector])
], BaseTerminalTabComponent);


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



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



/** @hidden */
let TerminalToolbarComponent = class TerminalToolbarComponent {
    // eslint-disable-next-line @typescript-eslint/no-useless-constructor
    constructor(app) {
        this.app = app;
    }
    onTabDragStart() {
        this.app.emitTabDragStarted(this.tab);
    }
    onTabDragEnd() {
        setTimeout(() => {
            this.app.emitTabDragEnded();
            this.app.emitTabsChanged();
        });
    }
    get shouldShowDragHandle() {
        return this.tab.topmostParent instanceof external_tabby_core_.SplitTabComponent && this.tab.topmostParent.getAllTabs().length > 1;
    }
    onMouseEnter() {
        this.tab.showToolbar();
    }
    onMouseLeave() {
        this.tab.hideToolbar();
    }
};
TerminalToolbarComponent.ctorParameters = () => [
    { type: external_tabby_core_.AppService }
];
TerminalToolbarComponent.propDecorators = {
    tab: [{ type: core_.Input }],
    onMouseEnter: [{ type: core_.HostListener, args: ['mouseenter',] }],
    onMouseLeave: [{ type: core_.HostListener, args: ['mouseleave',] }]
};
TerminalToolbarComponent = __decorate([
    (0,core_.Component)({
        selector: 'terminal-toolbar',
        template: (terminalToolbar_componentngResource_default()),
        styles: [(components_terminalToolbar_componentngResource_default())]
    }),
    __metadata("design:paramtypes", [external_tabby_core_.AppService])
], TerminalToolbarComponent);


// EXTERNAL MODULE: ./src/components/colorSchemeSelector.component.pug?ngResource
var colorSchemeSelector_componentngResource = __webpack_require__(9174);
var colorSchemeSelector_componentngResource_default = /*#__PURE__*/__webpack_require__.n(colorSchemeSelector_componentngResource);
;// CONCATENATED MODULE: ./src/components/colorSchemeSelector.component.ts


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




marker('Search color schemes');
/** @hidden */
let ColorSchemeSelectorComponent = class ColorSchemeSelectorComponent {
    constructor(colorSchemeProviders, changeDetector, config) {
        this.colorSchemeProviders = colorSchemeProviders;
        this.changeDetector = changeDetector;
        this.config = config;
        this.allColorSchemes = [];
        this.filter = '';
        this.modelChange = new core_.EventEmitter();
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            const stockColorSchemes = (yield Promise.all(this.config.enabledServices(this.colorSchemeProviders).map(x => x.getSchemes()))).reduce((a, b) => a.concat(b));
            stockColorSchemes.sort((a, b) => a.name.localeCompare(b.name));
            const customColorSchemes = this.config.store.terminal.customColorSchemes;
            this.allColorSchemes = customColorSchemes.concat(stockColorSchemes);
            this.changeDetector.markForCheck();
        });
    }
    selectScheme(scheme) {
        this.model = scheme;
        this.modelChange.emit(scheme);
        this.changeDetector.markForCheck();
    }
};
ColorSchemeSelectorComponent.ctorParameters = () => [
    { type: Array, decorators: [{ type: core_.Inject, args: [TerminalColorSchemeProvider,] }] },
    { type: core_.ChangeDetectorRef },
    { type: external_tabby_core_.ConfigService }
];
ColorSchemeSelectorComponent.propDecorators = {
    model: [{ type: core_.Input }],
    modelChange: [{ type: core_.Output }],
    true: [{ type: core_.HostBinding, args: ['class.content-box',] }]
};
ColorSchemeSelectorComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-scheme-selector',
        template: (colorSchemeSelector_componentngResource_default()),
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
        styles: ["\n        :host {\n            display: block;\n            max-height: 100vh;\n            overflow-y: auto;\n        }\n    "]
    }),
    __metadata("design:paramtypes", [Array, core_.ChangeDetectorRef,
        external_tabby_core_.ConfigService])
], ColorSchemeSelectorComponent);


;// CONCATENATED MODULE: ./src/api/contextMenuProvider.ts
/**
 * Extend to add more terminal context menu items
 * @deprecated
 */
class TerminalContextMenuItemProvider {
}

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







/** @hidden */
let AppearanceSettingsTabProvider = class AppearanceSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal-appearance';
        this.icon = 'swatchbook';
        this.title = this.translate.instant('Appearance');
        this.prioritized = true;
    }
    getComponentType() {
        return AppearanceSettingsTabComponent;
    }
};
AppearanceSettingsTabProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
AppearanceSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], AppearanceSettingsTabProvider);

/** @hidden */
let ColorSchemeSettingsTabProvider = class ColorSchemeSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal-color-scheme';
        this.icon = 'palette';
        this.title = this.translate.instant('Color scheme');
    }
    getComponentType() {
        return ColorSchemeSettingsTabComponent;
    }
};
ColorSchemeSettingsTabProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
ColorSchemeSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], ColorSchemeSettingsTabProvider);

/** @hidden */
let TerminalSettingsTabProvider = class TerminalSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal';
        this.icon = 'terminal';
        this.title = this.translate.instant('Terminal');
        this.prioritized = true;
    }
    getComponentType() {
        return TerminalSettingsTabComponent;
    }
};
TerminalSettingsTabProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
TerminalSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], TerminalSettingsTabProvider);


;// CONCATENATED MODULE: ./src/features/debug.ts




/** @hidden */
let DebugDecorator = class DebugDecorator extends TerminalDecorator {
    constructor(platform) {
        super();
        this.platform = platform;
    }
    attach(terminal) {
        var _a;
        let sessionOutputBuffer = '';
        const bufferLength = 8192;
        const handler = data => {
            sessionOutputBuffer += data;
            if (sessionOutputBuffer.length > bufferLength) {
                sessionOutputBuffer = sessionOutputBuffer.substring(sessionOutputBuffer.length - bufferLength);
            }
        };
        this.subscribeUntilDetached(terminal, terminal.sessionChanged$.subscribe(session => {
            this.subscribeUntilDetached(terminal, session === null || session === void 0 ? void 0 : session.output$.subscribe(handler));
        }));
        this.subscribeUntilDetached(terminal, (_a = terminal.session) === null || _a === void 0 ? void 0 : _a.output$.subscribe(handler));
        terminal.addEventListenerUntilDestroyed(terminal.content.nativeElement, 'keyup', (e) => {
            // Ctrl-Shift-Alt-1
            if (e.which === 49 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doSaveState(terminal);
            }
            // Ctrl-Shift-Alt-2
            if (e.which === 50 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doLoadState(terminal);
            }
            // Ctrl-Shift-Alt-3
            if (e.which === 51 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doCopyState(terminal);
            }
            // Ctrl-Shift-Alt-4
            if (e.which === 52 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doPasteState(terminal);
            }
            // Ctrl-Shift-Alt-5
            if (e.which === 53 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doSaveOutput(sessionOutputBuffer);
            }
            // Ctrl-Shift-Alt-6
            if (e.which === 54 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doLoadOutput(terminal);
            }
            // Ctrl-Shift-Alt-7
            if (e.which === 55 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doCopyOutput(sessionOutputBuffer);
            }
            // Ctrl-Shift-Alt-8
            if (e.which === 56 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doPasteOutput(terminal);
            }
        });
    }
    loadFile() {
        return __awaiter(this, void 0, void 0, function* () {
            const transfer = yield this.platform.startUpload();
            if (!transfer.length) {
                return null;
            }
            const data = yield transfer[0].readAll();
            transfer[0].close();
            return data.toString();
        });
    }
    saveFile(content, name) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = Buffer.from(content);
            const transfer = yield this.platform.startDownload(name, 0o644, data.length);
            if (transfer) {
                transfer.write(data);
                transfer.close();
            }
        });
    }
    doSaveState(terminal) {
        this.saveFile(terminal.frontend.saveState(), 'state.txt');
    }
    doCopyState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = '```' + JSON.stringify(terminal.frontend.saveState()) + '```';
            this.platform.setClipboard({ text: data });
        });
    }
    doLoadState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = yield this.loadFile();
            if (data) {
                terminal.frontend.restoreState(data);
            }
        });
    }
    doPasteState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (data) {
                if (data.startsWith('`')) {
                    data = data.substring(3, data.length - 3);
                }
                terminal.frontend.restoreState(JSON.parse(data));
            }
        });
    }
    doSaveOutput(buffer) {
        this.saveFile(buffer, 'output.txt');
    }
    doCopyOutput(buffer) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = '```' + JSON.stringify(buffer) + '```';
            this.platform.setClipboard({ text: data });
        });
    }
    doLoadOutput(terminal) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const data = yield this.loadFile();
            if (data) {
                yield ((_a = terminal.frontend) === null || _a === void 0 ? void 0 : _a.write(data));
            }
        });
    }
    doPasteOutput(terminal) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (data) {
                if (data.startsWith('`')) {
                    data = data.substring(3, data.length - 3);
                }
                yield ((_a = terminal.frontend) === null || _a === void 0 ? void 0 : _a.write(JSON.parse(data)));
            }
        });
    }
};
DebugDecorator.ctorParameters = () => [
    { type: external_tabby_core_.PlatformService }
];
DebugDecorator = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.PlatformService])
], DebugDecorator);


;// CONCATENATED MODULE: ./src/features/pathDrop.ts



/** @hidden */
let PathDropDecorator = class PathDropDecorator extends TerminalDecorator {
    attach(terminal) {
        setTimeout(() => {
            var _a, _b;
            this.subscribeUntilDetached(terminal, (_a = terminal.frontend) === null || _a === void 0 ? void 0 : _a.dragOver$.subscribe(event => {
                event.preventDefault();
            }));
            this.subscribeUntilDetached(terminal, (_b = terminal.frontend) === null || _b === void 0 ? void 0 : _b.drop$.subscribe((event) => {
                for (const file of event.dataTransfer.files) {
                    this.injectPath(terminal, file.path);
                }
                event.preventDefault();
            }));
        });
    }
    injectPath(terminal, path) {
        if (path.includes(' ')) {
            path = `"${path}"`;
        }
        path = path.replaceAll('\\', '\\\\');
        terminal.sendInput(path + ' ');
    }
};
PathDropDecorator = __decorate([
    (0,core_.Injectable)()
], PathDropDecorator);


// EXTERNAL MODULE: ./node_modules/zmodem.js/index.js
var zmodem_js = __webpack_require__(2486);
;// CONCATENATED MODULE: ./src/api/middleware.ts


class SessionMiddleware {
    constructor() {
        this.outputToSession = new external_rxjs_.Subject();
        this.outputToTerminal = new external_rxjs_.Subject();
    }
    get outputToSession$() { return this.outputToSession; }
    get outputToTerminal$() { return this.outputToTerminal; }
    feedFromSession(data) {
        this.outputToTerminal.next(data);
    }
    feedFromTerminal(data) {
        this.outputToSession.next(data);
    }
    close() {
        this.outputToSession.complete();
        this.outputToTerminal.complete();
    }
}
class SessionMiddlewareStack extends SessionMiddleware {
    constructor() {
        super();
        this.stack = [];
        this.subs = new external_tabby_core_.SubscriptionContainer();
        this.push(new SessionMiddleware());
    }
    push(middleware) {
        this.stack.push(middleware);
        this.relink();
    }
    unshift(middleware) {
        this.stack.unshift(middleware);
        this.relink();
    }
    remove(middleware) {
        this.stack = this.stack.filter(m => m !== middleware);
        this.relink();
    }
    replace(middleware, newMiddleware) {
        const index = this.stack.indexOf(middleware);
        if (index >= 0) {
            this.stack[index].close();
            this.stack[index] = newMiddleware;
        }
        else {
            this.stack.push(newMiddleware);
        }
        this.relink();
    }
    feedFromSession(data) {
        this.stack[0].feedFromSession(data);
    }
    feedFromTerminal(data) {
        this.stack[this.stack.length - 1].feedFromTerminal(data);
    }
    close() {
        for (const m of this.stack) {
            m.close();
        }
        this.subs.cancelAll();
        super.close();
    }
    relink() {
        this.subs.cancelAll();
        for (let i = 0; i < this.stack.length - 1; i++) {
            this.subs.subscribe(this.stack[i].outputToTerminal$, x => this.stack[i + 1].feedFromSession(x));
        }
        this.subs.subscribe(this.stack[this.stack.length - 1].outputToTerminal$, x => this.outputToTerminal.next(x));
        for (let i = this.stack.length - 2; i >= 0; i--) {
            this.subs.subscribe(this.stack[i + 1].outputToSession$, x => this.stack[i].feedFromTerminal(x));
        }
        this.subs.subscribe(this.stack[0].outputToSession$, x => this.outputToSession.next(x));
    }
}

;// CONCATENATED MODULE: ./src/features/zmodem.ts








const SPACER = '            ';
class ZModemMiddleware extends SessionMiddleware {
    constructor(log, hotkeys, platform) {
        super();
        this.platform = platform;
        this.isActive = false;
        this.activeSession = null;
        this.cancelEvent = this.outputToSession$.pipe((0,external_rxjs_.filter)(x => x.length === 1 && x[0] === 3));
        this.logger = log.create('zmodem');
        this.sentry = new zmodem_js.Sentry({
            to_terminal: data => {
                if (this.isActive) {
                    this.outputToTerminal.next(Buffer.from(data));
                }
            },
            sender: data => this.outputToSession.next(Buffer.from(data)),
            on_detect: (detection) => __awaiter(this, void 0, void 0, function* () {
                try {
                    this.isActive = true;
                    yield this.process(detection);
                }
                finally {
                    this.isActive = false;
                }
            }),
            on_retract: () => {
                this.showMessage('transfer cancelled');
            },
        });
    }
    feedFromSession(data) {
        const chunkSize = 1024;
        for (let i = 0; i <= Math.floor(data.length / chunkSize); i++) {
            try {
                this.sentry.consume(Buffer.from(data.slice(i * chunkSize, (i + 1) * chunkSize)));
            }
            catch (e) {
                this.showMessage(ansi_colors_default().bgRed.black(' Error ') + ' ' + e);
                this.logger.error('protocol error', e);
                this.activeSession.abort();
                this.activeSession = null;
                this.isActive = false;
                return;
            }
        }
        if (!this.isActive) {
            this.outputToTerminal.next(data);
        }
    }
    process(detection) {
        return __awaiter(this, void 0, void 0, function* () {
            this.showMessage(ansi_colors_default().bgBlue.black(' ZMODEM ') + ' Session started');
            this.showMessage('------------------------');
            const zsession = detection.confirm();
            this.activeSession = zsession;
            this.logger.info('new session', zsession);
            if (zsession.type === 'send') {
                const transfers = yield this.platform.startUpload({ multiple: true });
                let filesRemaining = transfers.length;
                let sizeRemaining = transfers.reduce((a, b) => a + b.getSize(), 0);
                for (const transfer of transfers) {
                    yield this.sendFile(zsession, transfer, filesRemaining, sizeRemaining);
                    filesRemaining--;
                    sizeRemaining -= transfer.getSize();
                }
                this.activeSession = null;
                yield zsession.close();
            }
            else {
                zsession.on('offer', xfer => {
                    this.receiveFile(xfer, zsession);
                });
                zsession.start();
                yield new Promise(resolve => zsession.on('session_end', resolve));
                this.activeSession = null;
            }
        });
    }
    receiveFile(xfer, zsession) {
        return __awaiter(this, void 0, void 0, function* () {
            const details = xfer.get_details();
            this.showMessage(ansi_colors_default().bgYellow.black(' Offered ') + ' ' + details.name, true);
            this.logger.info('offered', xfer);
            const transfer = yield this.platform.startDownload(details.name, 0o644, details.size);
            if (!transfer) {
                this.showMessage(ansi_colors_default().bgRed.black(' Rejected ') + ' ' + details.name);
                xfer.skip();
                return;
            }
            let canceled = false;
            const cancelSubscription = this.cancelEvent.subscribe(() => {
                try {
                    zsession._skip();
                }
                catch (_a) { }
                canceled = true;
            });
            try {
                yield Promise.race([
                    xfer.accept({
                        on_input: chunk => {
                            if (canceled) {
                                return;
                            }
                            transfer.write(Buffer.from(chunk));
                            this.showMessage(ansi_colors_default().bgYellow.black(' ' + Math.round(100 * transfer.getCompletedBytes() / details.size).toString().padStart(3, ' ') + '% ') + ' ' + details.name, true);
                        },
                    }),
                    this.cancelEvent.pipe((0,external_rxjs_.first)()).toPromise(),
                ]);
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    transfer.cancel();
                    this.showMessage(ansi_colors_default().bgRed.black(' Canceled ') + ' ' + details.name);
                }
                else {
                    transfer.close();
                    this.showMessage(ansi_colors_default().bgGreen.black(' Received ') + ' ' + details.name);
                }
            }
            catch (_a) {
                this.showMessage(ansi_colors_default().bgRed.black(' Error ') + ' ' + details.name);
            }
            cancelSubscription.unsubscribe();
        });
    }
    sendFile(zsession, transfer, filesRemaining, sizeRemaining) {
        return __awaiter(this, void 0, void 0, function* () {
            const offer = {
                name: transfer.getName(),
                size: transfer.getSize(),
                mode: transfer.getMode(),
                files_remaining: filesRemaining,
                bytes_remaining: sizeRemaining,
            };
            this.logger.info('offering', offer);
            this.showMessage(ansi_colors_default().bgYellow.black(' Offered ') + ' ' + offer.name, true);
            const xfer = yield zsession.send_offer(offer);
            if (xfer) {
                let canceled = false;
                const cancelSubscription = this.cancelEvent.subscribe(() => {
                    canceled = true;
                });
                while (true) {
                    const chunk = yield transfer.read();
                    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                    if (canceled || !chunk.length) {
                        break;
                    }
                    yield xfer.send(chunk);
                    this.showMessage(ansi_colors_default().bgYellow.black(' ' + Math.round(100 * transfer.getCompletedBytes() / offer.size).toString().padStart(3, ' ') + '% ') + offer.name, true);
                }
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    transfer.cancel();
                }
                else {
                    transfer.close();
                }
                yield xfer.end();
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    this.showMessage(ansi_colors_default().bgRed.black(' Canceled ') + ' ' + offer.name);
                }
                else {
                    this.showMessage(ansi_colors_default().bgGreen.black(' Sent ') + ' ' + offer.name);
                }
                cancelSubscription.unsubscribe();
            }
            else {
                transfer.cancel();
                this.showMessage(ansi_colors_default().bgRed.black(' Rejected ') + ' ' + offer.name);
                this.logger.warn('rejected by the other side');
            }
        });
    }
    showMessage(msg, overwrite = false) {
        this.outputToTerminal.next(Buffer.from(`\r${msg}${SPACER}`));
        if (!overwrite) {
            this.outputToTerminal.next(Buffer.from('\r\n'));
        }
    }
}
/** @hidden */
let ZModemDecorator = class ZModemDecorator extends TerminalDecorator {
    constructor(log, hotkeys, platform) {
        super();
        this.log = log;
        this.hotkeys = hotkeys;
        this.platform = platform;
    }
    attach(terminal) {
        setTimeout(() => {
            this.attachToSession(terminal);
            this.subscribeUntilDetached(terminal, terminal.sessionChanged$.subscribe(() => {
                this.attachToSession(terminal);
            }));
        });
    }
    attachToSession(terminal) {
        if (!terminal.session) {
            return;
        }
        terminal.session.middleware.unshift(new ZModemMiddleware(this.log, this.hotkeys, this.platform));
    }
};
ZModemDecorator.ctorParameters = () => [
    { type: external_tabby_core_.LogService },
    { type: external_tabby_core_.HotkeysService },
    { type: external_tabby_core_.PlatformService }
];
ZModemDecorator = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.LogService,
        external_tabby_core_.HotkeysService,
        external_tabby_core_.PlatformService])
], ZModemDecorator);


;// CONCATENATED MODULE: ./src/colorSchemes.ts
var DefaultColorSchemes_1;



let DefaultColorSchemes = DefaultColorSchemes_1 = class DefaultColorSchemes extends TerminalColorSchemeProvider {
    getSchemes() {
        return __awaiter(this, void 0, void 0, function* () {
            return [DefaultColorSchemes_1.defaultColorScheme];
        });
    }
};
DefaultColorSchemes.defaultColorScheme = {
    name: 'Tabby Default',
    foreground: '#cacaca',
    background: '#171717',
    cursor: '#bbbbbb',
    colors: [
        '#000000',
        '#ff615a',
        '#b1e969',
        '#ebd99c',
        '#5da9f6',
        '#e86aff',
        '#82fff7',
        '#dedacf',
        '#313131',
        '#f58c80',
        '#ddf88f',
        '#eee5b2',
        '#a5c7ff',
        '#ddaaff',
        '#b7fff9',
        '#ffffff',
    ],
};
DefaultColorSchemes = DefaultColorSchemes_1 = __decorate([
    (0,core_.Injectable)({ providedIn: 'root' })
], DefaultColorSchemes);


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


/** @hidden */
class TerminalConfigProvider extends external_tabby_core_.ConfigProvider {
    constructor() {
        super(...arguments);
        this.defaults = {
            hotkeys: {
                'copy-current-path': [],
            },
            terminal: {
                frontend: 'xterm-webgl',
                fontSize: 14,
                fontWeight: 400,
                fontWeightBold: 700,
                fallbackFont: null,
                linePadding: 0,
                bell: 'off',
                bracketedPaste: true,
                background: 'theme',
                ligatures: false,
                cursor: 'block',
                cursorBlink: true,
                hideTabIndex: false,
                showTabProfileIcon: false,
                hideCloseButton: false,
                hideTabOptionsButton: false,
                rightClick: 'menu',
                pasteOnMiddleClick: true,
                copyOnSelect: false,
                copyAsHTML: true,
                scrollOnInput: true,
                altIsMeta: false,
                wordSeparator: ' ()[]{}\'"',
                colorScheme: Object.assign({ __nonStructural: true, selection: null, cursorAccent: null }, DefaultColorSchemes.defaultColorScheme),
                customColorSchemes: [],
                warnOnMultilinePaste: true,
                searchRegexAlwaysEnabled: false,
                searchOptions: {
                    regex: false,
                    wholeWord: false,
                    caseSensitive: false,
                },
                detectProgress: true,
                scrollbackLines: 25000,
                drawBoldTextInBrightColors: true,
                sixel: true,
                minimumContrastRatio: 4,
                trimWhitespaceOnPaste: true,
            },
        };
        this.platformDefaults = {
            [external_tabby_core_.Platform.macOS]: {
                terminal: {
                    font: 'Menlo',
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        '⌘-C',
                    ],
                    paste: [
                        '⌘-V',
                    ],
                    clear: [
                        '⌘-K',
                    ],
                    'select-all': ['⌘-A'],
                    'zoom-in': [
                        '⌘-=',
                        '⌘-Shift-=',
                    ],
                    'zoom-out': [
                        '⌘--',
                        '⌘-Shift--',
                    ],
                    'reset-zoom': [
                        '⌘-0',
                    ],
                    home: ['⌘-Left', 'Home'],
                    end: ['⌘-Right', 'End'],
                    'previous-word': ['⌥-Left'],
                    'next-word': ['⌥-Right'],
                    'delete-previous-word': ['⌥-Backspace'],
                    'delete-line': ['⌘-Backspace'],
                    'delete-next-word': ['⌥-Delete'],
                    search: [
                        '⌘-F',
                    ],
                    'pane-focus-all': [
                        '⌘-Shift-I',
                    ],
                    'focus-all-tabs': [
                        '⌘-⌥-Shift-I',
                    ],
                    'scroll-to-top': ['Shift-PageUp'],
                    'scroll-up': ['⌥-PageUp'],
                    'scroll-down': ['⌥-PageDown'],
                    'scroll-to-bottom': ['Shift-PageDown'],
                },
            },
            [external_tabby_core_.Platform.Windows]: {
                terminal: {
                    font: 'Consolas',
                    rightClick: 'clipboard',
                    pasteOnMiddleClick: false,
                    copyOnSelect: true,
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        'Ctrl-Shift-C',
                    ],
                    paste: [
                        'Ctrl-Shift-V',
                        'Shift-Insert',
                    ],
                    'select-all': ['Ctrl-Shift-A'],
                    clear: [],
                    'zoom-in': [
                        'Ctrl-=',
                        'Ctrl-Shift-=',
                    ],
                    'zoom-out': [
                        'Ctrl--',
                        'Ctrl-Shift--',
                    ],
                    'reset-zoom': [
                        'Ctrl-0',
                    ],
                    home: ['Home'],
                    end: ['End'],
                    'previous-word': ['Ctrl-Left'],
                    'next-word': ['Ctrl-Right'],
                    'delete-previous-word': ['Ctrl-Backspace'],
                    'delete-line': ['Ctrl-Shift-Backspace'],
                    'delete-next-word': ['Ctrl-Delete'],
                    search: [
                        'Ctrl-Shift-F',
                    ],
                    'pane-focus-all': [
                        'Ctrl-Shift-I',
                    ],
                    'focus-all-tabs': [
                        'Ctrl-Alt-Shift-I',
                    ],
                    'scroll-to-top': ['Ctrl-PageUp'],
                    'scroll-up': ['Alt-PageUp'],
                    'scroll-down': ['Alt-PageDown'],
                    'scroll-to-bottom': ['Ctrl-PageDown'],
                },
            },
            [external_tabby_core_.Platform.Linux]: {
                terminal: {
                    font: 'Liberation Mono',
                    pasteOnMiddleClick: false, // handled by OS
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        'Ctrl-Shift-C',
                    ],
                    paste: [
                        'Ctrl-Shift-V',
                        'Shift-Insert',
                    ],
                    'select-all': ['Ctrl-Shift-A'],
                    clear: [],
                    'zoom-in': [
                        'Ctrl-=',
                        'Ctrl-Shift-=',
                    ],
                    'zoom-out': [
                        'Ctrl--',
                        'Ctrl-Shift--',
                    ],
                    'reset-zoom': [
                        'Ctrl-0',
                    ],
                    home: ['Home'],
                    end: ['End'],
                    'previous-word': ['Ctrl-Left'],
                    'next-word': ['Ctrl-Right'],
                    'delete-previous-word': ['Ctrl-Backspace'],
                    'delete-line': ['Ctrl-Shift-Backspace'],
                    'delete-next-word': ['Ctrl-Delete'],
                    search: [
                        'Ctrl-Shift-F',
                    ],
                    'pane-focus-all': [
                        'Ctrl-Shift-I',
                    ],
                    'focus-all-tabs': [
                        'Ctrl-Alt-Shift-I',
                    ],
                    'scroll-to-top': ['Ctrl-PageUp'],
                    'scroll-up': ['Alt-PageUp'],
                    'scroll-down': ['Alt-PageDown'],
                    'scroll-to-bottom': ['Ctrl-PageDown'],
                },
            },
        };
    }
}

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



/** @hidden */
let TerminalHotkeyProvider = class TerminalHotkeyProvider extends external_tabby_core_.HotkeyProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.hotkeys = [
            {
                id: 'copy',
                name: this.translate.instant('Copy to clipboard'),
            },
            {
                id: 'paste',
                name: this.translate.instant('Paste from clipboard'),
            },
            {
                id: 'select-all',
                name: this.translate.instant('Select all'),
            },
            {
                id: 'home',
                name: this.translate.instant('Beginning of the line'),
            },
            {
                id: 'end',
                name: this.translate.instant('End of the line'),
            },
            {
                id: 'previous-word',
                name: this.translate.instant('Jump to previous word'),
            },
            {
                id: 'next-word',
                name: this.translate.instant('Jump to next word'),
            },
            {
                id: 'delete-previous-word',
                name: this.translate.instant('Delete previous word'),
            },
            {
                id: 'delete-line',
                name: this.translate.instant('Delete entire line'),
            },
            {
                id: 'delete-next-word',
                name: this.translate.instant('Delete next word'),
            },
            {
                id: 'clear',
                name: this.translate.instant('Clear terminal'),
            },
            {
                id: 'zoom-in',
                name: this.translate.instant('Zoom in'),
            },
            {
                id: 'zoom-out',
                name: this.translate.instant('Zoom out'),
            },
            {
                id: 'reset-zoom',
                name: this.translate.instant('Reset zoom'),
            },
            {
                id: 'ctrl-c',
                name: this.translate.instant('Intelligent Ctrl-C (copy/abort)'),
            },
            {
                id: 'copy-current-path',
                name: this.translate.instant('Copy current path'),
            },
            {
                id: 'search',
                name: this.translate.instant('Search'),
            },
            {
                id: 'pane-focus-all',
                name: this.translate.instant('Focus all panes at once (broadcast)'),
            },
            {
                id: 'focus-all-tabs',
                name: this.translate.instant('Focus all tabs at once (broadcast)'),
            },
            {
                id: 'scroll-to-top',
                name: this.translate.instant('Scroll terminal to top'),
            },
            {
                id: 'scroll-up',
                name: this.translate.instant('Scroll terminal one page up'),
            },
            {
                id: 'scroll-down',
                name: this.translate.instant('Scroll terminal one page down'),
            },
            {
                id: 'scroll-to-bottom',
                name: this.translate.instant('Scroll terminal to bottom'),
            },
            {
                id: 'reconnect-tab',
                name: this.translate.instant('Reconnect current tab (Serial/Telnet/SSH)'),
            },
        ];
    }
    provide() {
        return __awaiter(this, void 0, void 0, function* () {
            return this.hotkeys;
        });
    }
};
TerminalHotkeyProvider.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService }
];
TerminalHotkeyProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], TerminalHotkeyProvider);


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







/** @hidden */
let CopyPasteContextMenu = class CopyPasteContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(notifications, translate) {
        super();
        this.notifications = notifications;
        this.translate = translate;
        this.weight = -10;
    }
    getItems(tab, tabHeader) {
        return __awaiter(this, void 0, void 0, function* () {
            if (tabHeader) {
                return [];
            }
            if (tab instanceof BaseTerminalTabComponent) {
                return [
                    {
                        label: this.translate.instant('Copy'),
                        click: () => {
                            setTimeout(() => {
                                var _a;
                                (_a = tab.frontend) === null || _a === void 0 ? void 0 : _a.copySelection();
                                this.notifications.notice(this.translate.instant('Copied'));
                            });
                        },
                    },
                    {
                        label: this.translate.instant('Paste'),
                        click: () => tab.paste(),
                    },
                ];
            }
            return [];
        });
    }
};
CopyPasteContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.NotificationsService },
    { type: external_tabby_core_.TranslateService }
];
CopyPasteContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.NotificationsService,
        external_tabby_core_.TranslateService])
], CopyPasteContextMenu);

/** @hidden */
let MiscContextMenu = class MiscContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(translate, multifocus) {
        super();
        this.translate = translate;
        this.multifocus = multifocus;
        this.weight = 1;
    }
    getItems(tab) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const items = [];
            if (tab instanceof BaseTerminalTabComponent && tab.enableToolbar && !tab.pinToolbar) {
                items.push({
                    label: this.translate.instant('Show toolbar'),
                    click: () => {
                        tab.pinToolbar = true;
                    },
                });
            }
            if (tab instanceof BaseTerminalTabComponent && ((_a = tab.session) === null || _a === void 0 ? void 0 : _a.supportsWorkingDirectory())) {
                items.push({
                    label: this.translate.instant('Copy current path'),
                    click: () => tab.copyCurrentPath(),
                });
            }
            items.push({
                label: this.translate.instant('Focus all tabs'),
                click: () => {
                    this.multifocus.focusAllTabs();
                },
            });
            if (tab.parent instanceof external_tabby_core_.SplitTabComponent && tab.parent.getAllTabs().length > 1) {
                items.push({
                    label: this.translate.instant('Focus all panes'),
                    click: () => {
                        this.multifocus.focusAllPanes();
                    },
                });
            }
            return items;
        });
    }
};
MiscContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService },
    { type: MultifocusService }
];
MiscContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService,
        MultifocusService])
], MiscContextMenu);

/** @hidden */
let ReconnectContextMenu = class ReconnectContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(translate, notifications) {
        super();
        this.translate = translate;
        this.notifications = notifications;
        this.weight = 1;
    }
    getItems(tab) {
        return __awaiter(this, void 0, void 0, function* () {
            if (isReconnectable(tab)) {
                return [
                    {
                        label: this.translate.instant('Reconnect'),
                        click: () => {
                            setTimeout(() => {
                                tab.reconnect();
                                this.notifications.notice(this.translate.instant('Reconnect'));
                            });
                        },
                    },
                ];
            }
            return [];
        });
    }
};
ReconnectContextMenu.ctorParameters = () => [
    { type: external_tabby_core_.TranslateService },
    { type: external_tabby_core_.NotificationsService }
];
ReconnectContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService,
        external_tabby_core_.NotificationsService])
], ReconnectContextMenu);

/** @hidden */
let LegacyContextMenu = class LegacyContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(contextMenuProviders) {
        super();
        this.contextMenuProviders = contextMenuProviders;
        this.weight = 1;
    }
    getItems(tab) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.contextMenuProviders) {
                return [];
            }
            if (tab instanceof BaseTerminalTabComponent) {
                let items = [];
                for (const p of this.contextMenuProviders) {
                    items = items.concat(yield p.getItems(tab));
                }
                return items;
            }
            return [];
        });
    }
};
LegacyContextMenu.ctorParameters = () => [
    { type: Array, decorators: [{ type: core_.Optional }, { type: core_.Inject, args: [TerminalContextMenuItemProvider,] }] }
];
LegacyContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [Object])
], LegacyContextMenu);


// EXTERNAL MODULE: ../node_modules/shell-quote/index.js
var shell_quote = __webpack_require__(1678);
;// CONCATENATED MODULE: ./src/cli.ts





let TerminalCLIHandler = class TerminalCLIHandler extends external_tabby_core_.CLIHandler {
    constructor(app, hostWindow) {
        super();
        this.app = app;
        this.hostWindow = hostWindow;
        this.firstMatchOnly = true;
        this.priority = 0;
    }
    handle(event) {
        return __awaiter(this, void 0, void 0, function* () {
            const op = event.argv._[0];
            if (op === 'paste') {
                let text = event.argv.text;
                if (event.argv.escape) {
                    text = shell_quote.quote([text]);
                }
                this.handlePaste(text);
                return true;
            }
            return false;
        });
    }
    handlePaste(text) {
        if (this.app.activeTab instanceof BaseTerminalTabComponent && this.app.activeTab.session) {
            this.app.activeTab.sendInput(text);
            this.hostWindow.bringToFront();
        }
    }
};
TerminalCLIHandler.ctorParameters = () => [
    { type: external_tabby_core_.AppService },
    { type: external_tabby_core_.HostWindowService }
];
TerminalCLIHandler = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.AppService,
        external_tabby_core_.HostWindowService])
], TerminalCLIHandler);


// EXTERNAL MODULE: ./node_modules/hexer/index.js
var hexer = __webpack_require__(6440);
var hexer_default = /*#__PURE__*/__webpack_require__.n(hexer);
// EXTERNAL MODULE: ./node_modules/buffer-replace/index.js
var buffer_replace = __webpack_require__(837);
var buffer_replace_default = /*#__PURE__*/__webpack_require__.n(buffer_replace);
// EXTERNAL MODULE: ./node_modules/binstring/lib/binstring.js
var binstring = __webpack_require__(9030);
var binstring_default = /*#__PURE__*/__webpack_require__.n(binstring);
// EXTERNAL MODULE: external "stream"
var external_stream_ = __webpack_require__(3978);
// EXTERNAL MODULE: external "readline"
var external_readline_ = __webpack_require__(2908);
;// CONCATENATED MODULE: ./src/middleware/streamProcessing.ts








class TerminalStreamProcessor extends SessionMiddleware {
    constructor(options) {
        super();
        this.options = options;
        this.forceEcho = false;
        this.inputReadline = null;
        this.inputPromptVisible = false;
        this.started = false;
        this.inputReadlineInStream = new external_stream_.PassThrough();
        this.inputReadlineOutStream = new external_stream_.PassThrough();
        this.inputReadlineOutStream.on('data', data => {
            this.outputToTerminal.next(Buffer.from(data));
        });
        this.outputToTerminal$.pipe((0,external_rxjs_.debounce)(() => (0,external_rxjs_.interval)(500))).subscribe(() => {
            if (this.started) {
                this.onOutputSettled();
            }
        });
    }
    start() {
        this.inputReadline = (0,external_readline_.createInterface)({
            input: this.inputReadlineInStream,
            output: this.inputReadlineOutStream,
            terminal: true,
            prompt: this.options.inputMode === 'readline-hex' ? 'hex> ' : '> ',
        });
        this.inputReadline.on('line', line => {
            this.onTerminalInput(Buffer.from(line + '\n'));
            this.resetInputPrompt();
        });
        this.started = true;
    }
    feedFromSession(data) {
        var _a;
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            if (this.inputPromptVisible) {
                (0,external_readline_.clearLine)(this.inputReadlineOutStream, 0);
                this.outputToTerminal.next(Buffer.from('\r'));
                this.inputPromptVisible = false;
            }
        }
        data = this.replaceNewlines(data, this.options.outputNewlines);
        if (this.options.outputMode === 'hex') {
            this.outputToTerminal.next(Buffer.concat([
                Buffer.from('\r\n'),
                Buffer.from(hexer_default()(data, {
                    group: 1,
                    gutter: 4,
                    divide: ansi_colors_default().gray(' ｜ '),
                    emptyHuman: ansi_colors_default().gray('╳'),
                }).replaceAll('\n', '\r\n')),
                Buffer.from('\r\n\n'),
            ]));
        }
        else {
            this.outputToTerminal.next(data);
        }
    }
    feedFromTerminal(data) {
        var _a;
        if (this.options.inputMode === 'local-echo' || this.forceEcho) {
            this.outputToTerminal.next(this.replaceNewlines(data, 'crlf'));
        }
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            this.inputReadlineInStream.write(data);
        }
        else {
            this.onTerminalInput(data);
        }
    }
    resize() {
        var _a;
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            this.inputReadlineOutStream.emit('resize');
        }
    }
    close() {
        var _a;
        (_a = this.inputReadline) === null || _a === void 0 ? void 0 : _a.close();
        super.close();
    }
    onTerminalInput(data) {
        if (this.options.inputMode === 'readline-hex') {
            const tokens = data.toString().split(/\s/g);
            data = Buffer.concat(tokens.filter(t => !!t).map(t => {
                if (t.startsWith('0x')) {
                    t = t.substring(2);
                }
                return binstring_default()(t, { 'in': 'hex' });
            }));
        }
        data = this.replaceNewlines(data, this.options.inputNewlines);
        this.outputToSession.next(data);
    }
    onOutputSettled() {
        var _a;
        if (((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) && !this.inputPromptVisible) {
            this.resetInputPrompt();
        }
    }
    resetInputPrompt() {
        var _a;
        this.outputToTerminal.next(Buffer.from('\r\n'));
        (_a = this.inputReadline) === null || _a === void 0 ? void 0 : _a.prompt(true);
        this.inputPromptVisible = true;
    }
    replaceNewlines(data, mode) {
        if (!mode) {
            return data;
        }
        data = buffer_replace_default()(data, '\r\n', '\n');
        data = buffer_replace_default()(data, '\r', '\n');
        const replacement = {
            strip: '',
            cr: '\r',
            lf: '\n',
            crlf: '\r\n',
        }[mode];
        return buffer_replace_default()(data, '\n', replacement);
    }
}

// EXTERNAL MODULE: ../node_modules/clone-deep/index.js
var clone_deep = __webpack_require__(7950);
var clone_deep_default = /*#__PURE__*/__webpack_require__.n(clone_deep);
;// CONCATENATED MODULE: ./src/middleware/loginScriptProcessing.ts


class LoginScriptProcessor extends SessionMiddleware {
    constructor(logger, options) {
        var _a;
        super();
        this.logger = logger;
        this.remainingScripts = [];
        this.escapeSeqMap = {
            a: '\x07',
            b: '\x08',
            e: '\x1b',
            f: '\x0c',
            n: '\x0a',
            r: '\x0d',
            t: '\x09',
            v: '\x0b',
        };
        this.remainingScripts = clone_deep_default()((_a = options.scripts) !== null && _a !== void 0 ? _a : []);
        for (const script of this.remainingScripts) {
            if (!script.isRegex) {
                script.expect = this.unescape(script.expect);
            }
            script.send = this.unescape(script.send);
        }
    }
    feedFromSession(data) {
        const dataString = data.toString();
        for (const script of this.remainingScripts) {
            if (!script.expect) {
                continue;
            }
            let match = false;
            if (script.isRegex) {
                const re = new RegExp(script.expect, 'g');
                match = re.test(dataString);
            }
            else {
                match = dataString.includes(script.expect);
            }
            if (match) {
                this.logger.info('Executing script:', script);
                this.outputToSession.next(Buffer.from(script.send + '\n'));
                this.remainingScripts = this.remainingScripts.filter(x => x !== script);
            }
            else {
                if (script.optional) {
                    this.logger.debug('Skip optional script: ' + script.expect);
                    this.remainingScripts = this.remainingScripts.filter(x => x !== script);
                }
                else {
                    break;
                }
            }
        }
        super.feedFromSession(data);
    }
    close() {
        this.outputToSession.complete();
        super.close();
    }
    executeUnconditionalScripts() {
        for (const script of this.remainingScripts) {
            if (!script.expect) {
                this.logger.info('Executing script:', script.send);
                this.outputToSession.next(Buffer.from(script.send + '\n'));
                this.remainingScripts = this.remainingScripts.filter(x => x !== script);
            }
            else {
                break;
            }
        }
    }
    unescape(line) {
        line = line.replace(/\\((x\d{2})|(u\d{4}))/g, (match, g) => {
            return String.fromCharCode(parseInt(g.substr(1), 16));
        });
        return line.replace(/\\(.)/g, (match, g) => {
            return this.escapeSeqMap[g] || g;
        });
    }
}

// EXTERNAL MODULE: external "os"
var external_os_ = __webpack_require__(9044);
;// CONCATENATED MODULE: ./src/middleware/oscProcessing.ts



const OSCPrefix = Buffer.from('\x1b]');
const OSCSuffix = Buffer.from('\x07');
class OSCProcessor extends SessionMiddleware {
    constructor() {
        super(...arguments);
        this.cwdReported = new external_rxjs_.Subject();
        this.copyRequested = new external_rxjs_.Subject();
    }
    get cwdReported$() { return this.cwdReported; }
    get copyRequested$() { return this.copyRequested; }
    feedFromSession(data) {
        let startIndex = 0;
        while (data.includes(OSCPrefix, startIndex) && data.includes(OSCSuffix, startIndex)) {
            const params = data.subarray(data.indexOf(OSCPrefix, startIndex) + OSCPrefix.length);
            const oscString = params.subarray(0, params.indexOf(OSCSuffix)).toString();
            startIndex = data.indexOf(OSCSuffix, startIndex) + OSCSuffix.length;
            const [oscCodeString, ...oscParams] = oscString.split(';');
            const oscCode = parseInt(oscCodeString);
            if (oscCode === 1337) {
                const paramString = oscParams.join(';');
                if (paramString.startsWith('CurrentDir=')) {
                    let reportedCWD = paramString.split('=')[1];
                    if (reportedCWD.startsWith('~')) {
                        reportedCWD = external_os_.homedir() + reportedCWD.substring(1);
                    }
                    this.cwdReported.next(reportedCWD);
                }
                else {
                    console.debug('Unsupported OSC 1337 parameter:', paramString);
                }
            }
            else if (oscCode === 52) {
                if (oscParams[0] === 'c' || oscParams[0] === '') {
                    const content = Buffer.from(oscParams[1], 'base64');
                    this.copyRequested.next(content.toString());
                }
            }
            else {
                continue;
            }
        }
        super.feedFromSession(data);
    }
    close() {
        this.cwdReported.complete();
        this.copyRequested.complete();
        super.close();
    }
}

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





/**
 * A session object for a [[BaseTerminalTabComponent]]
 * Extend this to implement custom I/O and process management for your terminal tab
 */
class BaseSession {
    get output$() { return this.output; }
    get binaryOutput$() { return this.binaryOutput; }
    get closed$() { return this.closed; }
    get destroyed$() { return this.destroyed; }
    constructor(logger) {
        this.logger = logger;
        this.oscProcessor = new OSCProcessor();
        this.middleware = new SessionMiddlewareStack();
        this.output = new external_rxjs_.Subject();
        this.binaryOutput = new external_rxjs_.Subject();
        this.closed = new external_rxjs_.Subject();
        this.destroyed = new external_rxjs_.Subject();
        this.loginScriptProcessor = null;
        this.initialDataBuffer = Buffer.from('');
        this.initialDataBufferReleased = false;
        this.middleware.push(this.oscProcessor);
        this.oscProcessor.cwdReported$.subscribe(cwd => {
            this.reportedCWD = cwd;
        });
        this.middleware.outputToTerminal$.subscribe(data => {
            if (!this.initialDataBufferReleased) {
                this.initialDataBuffer = Buffer.concat([this.initialDataBuffer, data]);
            }
            else {
                this.output.next(data.toString());
                this.binaryOutput.next(data);
            }
        });
        this.middleware.outputToSession$.subscribe(data => this.write(data));
    }
    feedFromTerminal(data) {
        this.middleware.feedFromTerminal(data);
    }
    emitOutput(data) {
        this.middleware.feedFromSession(data);
    }
    releaseInitialDataBuffer() {
        this.initialDataBufferReleased = true;
        this.output.next(this.initialDataBuffer.toString());
        this.binaryOutput.next(this.initialDataBuffer);
        this.initialDataBuffer = Buffer.from('');
    }
    setLoginScriptsOptions(options) {
        const newProcessor = new LoginScriptProcessor(this.logger, options);
        if (this.loginScriptProcessor) {
            this.middleware.replace(this.loginScriptProcessor, newProcessor);
        }
        else {
            this.middleware.push(newProcessor);
        }
        this.loginScriptProcessor = newProcessor;
    }
    destroy() {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.open) {
                this.logger.info('Destroying');
                this.open = false;
                this.closed.next();
                this.destroyed.next();
                yield this.gracefullyKillProcess();
            }
            this.middleware.close();
            this.closed.complete();
            this.destroyed.complete();
            this.output.complete();
            this.binaryOutput.complete();
        });
    }
}

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

































/** @hidden */
let TerminalModule = class TerminalModule {
}; // eslint-disable-line @typescript-eslint/no-extraneous-class
TerminalModule = __decorate([
    (0,core_.NgModule)({
        imports: [
            common_.CommonModule,
            forms_.FormsModule,
            ng_bootstrap_.NgbModule,
            external_ngx_toastr_.ToastrModule,
            (external_tabby_core_default()),
            NgxColorsModule,
        ],
        providers: [
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: AppearanceSettingsTabProvider, multi: true },
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: ColorSchemeSettingsTabProvider, multi: true },
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: TerminalSettingsTabProvider, multi: true },
            { provide: external_tabby_core_.ConfigProvider, useClass: TerminalConfigProvider, multi: true },
            { provide: external_tabby_core_.HotkeyProvider, useClass: TerminalHotkeyProvider, multi: true },
            { provide: TerminalDecorator, useClass: PathDropDecorator, multi: true },
            { provide: TerminalDecorator, useClass: ZModemDecorator, multi: true },
            { provide: TerminalDecorator, useClass: DebugDecorator, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: CopyPasteContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: MiscContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: LegacyContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: ReconnectContextMenu, multi: true },
            { provide: external_tabby_core_.CLIHandler, useClass: TerminalCLIHandler, multi: true },
            { provide: TerminalColorSchemeProvider, useClass: DefaultColorSchemes, multi: true },
        ],
        declarations: [
            colorPicker_component_ColorPickerComponent,
            ColorSchemePreviewComponent,
            ColorSchemeSelectorComponent,
            AppearanceSettingsTabComponent,
            ColorSchemeSettingsTabComponent,
            TerminalSettingsTabComponent,
            SearchPanelComponent,
            StreamProcessingSettingsComponent,
            LoginScriptsSettingsComponent,
            TerminalToolbarComponent,
        ],
        exports: [
            colorPicker_component_ColorPickerComponent,
            ColorSchemeSelectorComponent,
            SearchPanelComponent,
            StreamProcessingSettingsComponent,
            LoginScriptsSettingsComponent,
            TerminalToolbarComponent,
        ],
    })
], TerminalModule);
/* harmony default export */ const src = (TerminalModule);












})();

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