(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["topology"] = factory();
	else
		root["topology"] = factory();
})((typeof self !== 'undefined' ? self : this), function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "fae3");
/******/ })
/************************************************************************/
/******/ ({

/***/ "00ee":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

module.exports = String(test) === '[object z]';


/***/ }),

/***/ "0366":
/***/ (function(module, exports, __webpack_require__) {

var aFunction = __webpack_require__("1c0b");

// optional / simple context binding
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 0: return function () {
      return fn.call(that);
    };
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),

/***/ "0410":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "051e":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(__webpack_require__("1d00"));
__export(__webpack_require__("c937"));
__export(__webpack_require__("d38c"));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ "057f":
/***/ (function(module, exports, __webpack_require__) {

var toIndexedObject = __webpack_require__("fc6a");
var nativeGetOwnPropertyNames = __webpack_require__("241c").f;

var toString = {}.toString;

var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  ? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function (it) {
  try {
    return nativeGetOwnPropertyNames(it);
  } catch (error) {
    return windowNames.slice();
  }
};

// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
module.exports.f = function getOwnPropertyNames(it) {
  return windowNames && toString.call(it) == '[object Window]'
    ? getWindowNames(it)
    : nativeGetOwnPropertyNames(toIndexedObject(it));
};


/***/ }),

/***/ "06b4":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "06cf":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var propertyIsEnumerableModule = __webpack_require__("d1e7");
var createPropertyDescriptor = __webpack_require__("5c6c");
var toIndexedObject = __webpack_require__("fc6a");
var toPrimitive = __webpack_require__("c04e");
var has = __webpack_require__("5135");
var IE8_DOM_DEFINE = __webpack_require__("0cfb");

var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return nativeGetOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};


/***/ }),

/***/ "09c9":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SpaceView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0d3a");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SpaceView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SpaceView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "0a06":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");
var buildURL = __webpack_require__("30b5");
var InterceptorManager = __webpack_require__("f6b4");
var dispatchRequest = __webpack_require__("5270");
var mergeConfig = __webpack_require__("4a7b");

/**
 * Create a new instance of Axios
 *
 * @param {Object} instanceConfig The default config for the instance
 */
function Axios(instanceConfig) {
  this.defaults = instanceConfig;
  this.interceptors = {
    request: new InterceptorManager(),
    response: new InterceptorManager()
  };
}

/**
 * Dispatch a request
 *
 * @param {Object} config The config specific for this request (merged with this.defaults)
 */
Axios.prototype.request = function request(config) {
  /*eslint no-param-reassign:0*/
  // Allow for axios('example/url'[, config]) a la fetch API
  if (typeof config === 'string') {
    config = arguments[1] || {};
    config.url = arguments[0];
  } else {
    config = config || {};
  }

  config = mergeConfig(this.defaults, config);

  // Set config.method
  if (config.method) {
    config.method = config.method.toLowerCase();
  } else if (this.defaults.method) {
    config.method = this.defaults.method.toLowerCase();
  } else {
    config.method = 'get';
  }

  // Hook up interceptors middleware
  var chain = [dispatchRequest, undefined];
  var promise = Promise.resolve(config);

  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
    chain.unshift(interceptor.fulfilled, interceptor.rejected);
  });

  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
    chain.push(interceptor.fulfilled, interceptor.rejected);
  });

  while (chain.length) {
    promise = promise.then(chain.shift(), chain.shift());
  }

  return promise;
};

Axios.prototype.getUri = function getUri(config) {
  config = mergeConfig(this.defaults, config);
  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
};

// Provide aliases for supported request methods
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  /*eslint func-names:0*/
  Axios.prototype[method] = function(url, config) {
    return this.request(mergeConfig(config || {}, {
      method: method,
      url: url,
      data: (config || {}).data
    }));
  };
});

utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  /*eslint func-names:0*/
  Axios.prototype[method] = function(url, data, config) {
    return this.request(mergeConfig(config || {}, {
      method: method,
      url: url,
      data: data
    }));
  };
});

module.exports = Axios;


/***/ }),

/***/ "0cb2":
/***/ (function(module, exports, __webpack_require__) {

var toObject = __webpack_require__("7b0b");

var floor = Math.floor;
var replace = ''.replace;
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;

// https://tc39.es/ecma262/#sec-getsubstitution
module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  var tailPos = position + matched.length;
  var m = captures.length;
  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  if (namedCaptures !== undefined) {
    namedCaptures = toObject(namedCaptures);
    symbols = SUBSTITUTION_SYMBOLS;
  }
  return replace.call(replacement, symbols, function (match, ch) {
    var capture;
    switch (ch.charAt(0)) {
      case '$': return '$';
      case '&': return matched;
      case '`': return str.slice(0, position);
      case "'": return str.slice(tailPos);
      case '<':
        capture = namedCaptures[ch.slice(1, -1)];
        break;
      default: // \d\d?
        var n = +ch;
        if (n === 0) return match;
        if (n > m) {
          var f = floor(n / 10);
          if (f === 0) return match;
          if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
          return match;
        }
        capture = captures[n - 1];
    }
    return capture === undefined ? '' : capture;
  });
};


/***/ }),

/***/ "0cf4":
/***/ (function(module) {

module.exports = JSON.parse("{\"_args\":[[\"@topology/core@0.5.34\",\"E:\\\\代码\\\\topology\\\\hrhx-topology\"]],\"_from\":\"@topology/core@0.5.34\",\"_id\":\"@topology/core@0.5.34\",\"_inBundle\":false,\"_integrity\":\"sha512-CAxxki9DWz9vSRDBEGpWU6XafYh87F2pIIVrt6xCZEfNiPREZV9sC7f1Gv4TVxFocc4jlID+ieP536dvt0usuQ==\",\"_location\":\"/@topology/core\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"version\",\"registry\":true,\"raw\":\"@topology/core@0.5.34\",\"name\":\"@topology/core\",\"escapedName\":\"@topology%2fcore\",\"scope\":\"@topology\",\"rawSpec\":\"0.5.34\",\"saveSpec\":null,\"fetchSpec\":\"0.5.34\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://registry.npmmirror.com/@topology/core/download/@topology/core-0.5.34.tgz\",\"_spec\":\"0.5.34\",\"_where\":\"E:\\\\代码\\\\topology\\\\hrhx-topology\",\"author\":{\"name\":\"alsmile123@qq.com\"},\"bugs\":{\"url\":\"https://github.com/le5le-com/topology/issues\"},\"dependencies\":{\"le5le-store\":\"^1.0.7\",\"mitt\":\"^2.1.0\",\"mqtt\":\"^4.2.6\"},\"description\":\"A diagram/topology tool by js.\",\"gitHead\":\"78f2a53ca1839c89b56e2e498d17ba4eb987ad14\",\"homepage\":\"https://github.com/le5le-com/topology#readme\",\"keywords\":[\"topology\",\"diagram\",\"canvas\"],\"license\":\"ISC\",\"main\":\"index.js\",\"name\":\"@topology/core\",\"publishConfig\":{\"access\":\"public\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/le5le-com/topology.git\"},\"scripts\":{\"build\":\"tsc && npm run copy\",\"copy\":\"copyfiles  package.json ../../dist/core/\"},\"types\":\"index.d.ts\",\"version\":\"0.5.34\"}");

/***/ }),

/***/ "0cfb":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var fails = __webpack_require__("d039");
var createElement = __webpack_require__("cc12");

// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a != 7;
});


/***/ }),

/***/ "0d3a":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "0d3b":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var IS_PURE = __webpack_require__("c430");

var ITERATOR = wellKnownSymbol('iterator');

module.exports = !fails(function () {
  var url = new URL('b?a=1&b=2&c=3', 'http://a');
  var searchParams = url.searchParams;
  var result = '';
  url.pathname = 'c%20d';
  searchParams.forEach(function (value, key) {
    searchParams['delete']('b');
    result += key + value;
  });
  return (IS_PURE && !url.toJSON)
    || !searchParams.sort
    || url.href !== 'http://a/c%20d?a=1&c=3'
    || searchParams.get('c') !== '3'
    || String(new URLSearchParams('?a=1')) !== 'a=1'
    || !searchParams[ITERATOR]
    // throws in Edge
    || new URL('https://a@b').username !== 'a'
    || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
    // not punycoded in Edge
    || new URL('http://тест').host !== 'xn--e1aybc'
    // not escaped in Chrome 62-
    || new URL('http://a#б').hash !== '#%D0%B1'
    // fails in Chrome 66-
    || result !== 'a1c3'
    // throws in Safari
    || new URL('http://x', undefined).host !== 'x';
});


/***/ }),

/***/ "0d8b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
function s4() {
    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
exports.s4 = s4;
function s8() {
    return s4() + s4();
}
exports.s8 = s8;
//# sourceMappingURL=uuid.js.map

/***/ }),

/***/ "0df6":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Syntactic sugar for invoking a function and expanding an array for arguments.
 *
 * Common use case would be to use `Function.prototype.apply`.
 *
 *  ```js
 *  function f(x, y, z) {}
 *  var args = [1, 2, 3];
 *  f.apply(null, args);
 *  ```
 *
 * With `spread` this example can be re-written.
 *
 *  ```js
 *  spread(function(x, y, z) {})([1, 2, 3]);
 *  ```
 *
 * @param {Function} callback
 * @returns {Function}
 */
module.exports = function spread(callback) {
  return function wrap(arr) {
    return callback.apply(null, arr);
  };
};


/***/ }),

/***/ "1276":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var isRegExp = __webpack_require__("44e7");
var anObject = __webpack_require__("825a");
var requireObjectCoercible = __webpack_require__("1d80");
var speciesConstructor = __webpack_require__("4840");
var advanceStringIndex = __webpack_require__("8aa5");
var toLength = __webpack_require__("50c4");
var callRegExpExec = __webpack_require__("14c3");
var regexpExec = __webpack_require__("9263");
var fails = __webpack_require__("d039");

var arrayPush = [].push;
var min = Math.min;
var MAX_UINT32 = 0xFFFFFFFF;

// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });

// @@split logic
fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
  var internalSplit;
  if (
    'abbc'.split(/(b)*/)[1] == 'c' ||
    // eslint-disable-next-line regexp/no-empty-group -- required for testing
    'test'.split(/(?:)/, -1).length != 4 ||
    'ab'.split(/(?:ab)*/).length != 2 ||
    '.'.split(/(.?)(.?)/).length != 4 ||
    // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
    '.'.split(/()()/).length > 1 ||
    ''.split(/.?/).length
  ) {
    // based on es5-shim implementation, need to rework it
    internalSplit = function (separator, limit) {
      var string = String(requireObjectCoercible(this));
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (separator === undefined) return [string];
      // If `separator` is not a regex, use native split
      if (!isRegExp(separator)) {
        return nativeSplit.call(string, separator, lim);
      }
      var output = [];
      var flags = (separator.ignoreCase ? 'i' : '') +
                  (separator.multiline ? 'm' : '') +
                  (separator.unicode ? 'u' : '') +
                  (separator.sticky ? 'y' : '');
      var lastLastIndex = 0;
      // Make `global` and avoid `lastIndex` issues by working with a copy
      var separatorCopy = new RegExp(separator.source, flags + 'g');
      var match, lastIndex, lastLength;
      while (match = regexpExec.call(separatorCopy, string)) {
        lastIndex = separatorCopy.lastIndex;
        if (lastIndex > lastLastIndex) {
          output.push(string.slice(lastLastIndex, match.index));
          if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
          lastLength = match[0].length;
          lastLastIndex = lastIndex;
          if (output.length >= lim) break;
        }
        if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
      }
      if (lastLastIndex === string.length) {
        if (lastLength || !separatorCopy.test('')) output.push('');
      } else output.push(string.slice(lastLastIndex));
      return output.length > lim ? output.slice(0, lim) : output;
    };
  // Chakra, V8
  } else if ('0'.split(undefined, 0).length) {
    internalSplit = function (separator, limit) {
      return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
    };
  } else internalSplit = nativeSplit;

  return [
    // `String.prototype.split` method
    // https://tc39.es/ecma262/#sec-string.prototype.split
    function split(separator, limit) {
      var O = requireObjectCoercible(this);
      var splitter = separator == undefined ? undefined : separator[SPLIT];
      return splitter !== undefined
        ? splitter.call(separator, O, limit)
        : internalSplit.call(String(O), separator, limit);
    },
    // `RegExp.prototype[@@split]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
    //
    // NOTE: This cannot be properly polyfilled in engines that don't support
    // the 'y' flag.
    function (regexp, limit) {
      var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);
      var C = speciesConstructor(rx, RegExp);

      var unicodeMatching = rx.unicode;
      var flags = (rx.ignoreCase ? 'i' : '') +
                  (rx.multiline ? 'm' : '') +
                  (rx.unicode ? 'u' : '') +
                  (SUPPORTS_Y ? 'y' : 'g');

      // ^(? + rx + ) is needed, in combination with some S slicing, to
      // simulate the 'y' flag.
      var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
      if (lim === 0) return [];
      if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
      var p = 0;
      var q = 0;
      var A = [];
      while (q < S.length) {
        splitter.lastIndex = SUPPORTS_Y ? q : 0;
        var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
        var e;
        if (
          z === null ||
          (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
        ) {
          q = advanceStringIndex(S, q, unicodeMatching);
        } else {
          A.push(S.slice(p, q));
          if (A.length === lim) return A;
          for (var i = 1; i <= z.length - 1; i++) {
            A.push(z[i]);
            if (A.length === lim) return A;
          }
          q = p = e;
        }
      }
      A.push(S.slice(p));
      return A;
    }
  ];
}, !SUPPORTS_Y);


/***/ }),

/***/ "136e":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_LineView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0410");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_LineView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_LineView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "14c3":
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__("c6b6");
var regexpExec = __webpack_require__("9263");

// `RegExpExec` abstract operation
// https://tc39.es/ecma262/#sec-regexpexec
module.exports = function (R, S) {
  var exec = R.exec;
  if (typeof exec === 'function') {
    var result = exec.call(R, S);
    if (typeof result !== 'object') {
      throw TypeError('RegExp exec method returned something other than an Object or null');
    }
    return result;
  }

  if (classof(R) !== 'RegExp') {
    throw TypeError('RegExp#exec called on incompatible receiver');
  }

  return regexpExec.call(R, S);
};



/***/ }),

/***/ "159b":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var DOMIterables = __webpack_require__("fdbc");
var forEach = __webpack_require__("17c2");
var createNonEnumerableProperty = __webpack_require__("9112");

for (var COLLECTION_NAME in DOMIterables) {
  var Collection = global[COLLECTION_NAME];
  var CollectionPrototype = Collection && Collection.prototype;
  // some Chrome versions have non-configurable methods on DOMTokenList
  if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
    createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  } catch (error) {
    CollectionPrototype.forEach = forEach;
  }
}


/***/ }),

/***/ "17c2":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $forEach = __webpack_require__("b727").forEach;
var arrayMethodIsStrict = __webpack_require__("a640");

var STRICT_METHOD = arrayMethodIsStrict('forEach');

// `Array.prototype.forEach` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.foreach
module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
} : [].forEach;


/***/ }),

/***/ "19aa":
/***/ (function(module, exports) {

module.exports = function (it, Constructor, name) {
  if (!(it instanceof Constructor)) {
    throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  } return it;
};


/***/ }),

/***/ "1be4":
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__("d066");

module.exports = getBuiltIn('document', 'documentElement');


/***/ }),

/***/ "1c0b":
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') {
    throw TypeError(String(it) + ' is not a function');
  } return it;
};


/***/ }),

/***/ "1c7e":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");

var ITERATOR = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;

try {
  var called = 0;
  var iteratorWithReturn = {
    next: function () {
      return { done: !!called++ };
    },
    'return': function () {
      SAFE_CLOSING = true;
    }
  };
  iteratorWithReturn[ITERATOR] = function () {
    return this;
  };
  // eslint-disable-next-line no-throw-literal -- required for testing
  Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }

module.exports = function (exec, SKIP_CLOSING) {
  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  var ITERATION_SUPPORT = false;
  try {
    var object = {};
    object[ITERATOR] = function () {
      return {
        next: function () {
          return { done: ITERATION_SUPPORT = true };
        }
      };
    };
    exec(object);
  } catch (error) { /* empty */ }
  return ITERATION_SUPPORT;
};


/***/ }),

/***/ "1cdc":
/***/ (function(module, exports, __webpack_require__) {

var userAgent = __webpack_require__("342f");

module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);


/***/ }),

/***/ "1d00":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Cookie = /** @class */ (function () {
    function Cookie() {
    }
    Cookie.get = function (name) {
        var arr;
        var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)');
        if ((arr = document.cookie.match(reg))) {
            return decodeURIComponent(arr[2]);
        }
        else {
            return '';
        }
    };
    // options: {
    //   expires?:number,
    //   path?:string,
    //   domain?:string
    // }
    Cookie.set = function (name, value, options) {
        var myWindow = window;
        var cookieStr = myWindow.escape(name) + '=' + myWindow.escape(value) + ';';
        if (!options) {
            options = {};
        }
        if (options.expires) {
            var dtExpires = new Date(new Date().getTime() + options.expires * 1000 * 60 * 60 * 24);
            cookieStr += 'expires=' + dtExpires.toUTCString() + ';';
        }
        if (options.path) {
            cookieStr += 'path=' + options.path + ';';
        }
        if (options.domain) {
            cookieStr += 'domain=' + options.domain + ';';
        }
        document.cookie = cookieStr;
    };
    // options: {
    //   path?:string,
    //   domain?:string
    // }
    Cookie.delete = function (name, options) {
        if (Cookie.get(name)) {
            if (!options) {
                options = {};
            }
            options.expires = -1;
            Cookie.set(name, '', options);
        }
    };
    return Cookie;
}());
exports.Cookie = Cookie;
//# sourceMappingURL=cookie.js.map

/***/ }),

/***/ "1d2b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function bind(fn, thisArg) {
  return function wrap() {
    var args = new Array(arguments.length);
    for (var i = 0; i < args.length; i++) {
      args[i] = arguments[i];
    }
    return fn.apply(thisArg, args);
  };
};


/***/ }),

/***/ "1d5b":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "1d80":
/***/ (function(module, exports) {

// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on " + it);
  return it;
};


/***/ }),

/***/ "1dde":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var V8_VERSION = __webpack_require__("2d00");

var SPECIES = wellKnownSymbol('species');

module.exports = function (METHOD_NAME) {
  // We can't use this feature detection in V8 since it causes
  // deoptimization and serious performance degradation
  // https://github.com/zloirock/core-js/issues/677
  return V8_VERSION >= 51 || !fails(function () {
    var array = [];
    var constructor = array.constructor = {};
    constructor[SPECIES] = function () {
      return { foo: 1 };
    };
    return array[METHOD_NAME](Boolean).foo !== 1;
  });
};


/***/ }),

/***/ "21a6":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(a,b){if(true)!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (b),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g, true&&(module.exports=g)});

//# sourceMappingURL=FileSaver.min.js.map
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))

/***/ }),

/***/ "2266":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var isArrayIteratorMethod = __webpack_require__("e95a");
var toLength = __webpack_require__("50c4");
var bind = __webpack_require__("0366");
var getIteratorMethod = __webpack_require__("35a1");
var iteratorClose = __webpack_require__("2a62");

var Result = function (stopped, result) {
  this.stopped = stopped;
  this.result = result;
};

module.exports = function (iterable, unboundFunction, options) {
  var that = options && options.that;
  var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  var INTERRUPTED = !!(options && options.INTERRUPTED);
  var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
  var iterator, iterFn, index, length, result, next, step;

  var stop = function (condition) {
    if (iterator) iteratorClose(iterator);
    return new Result(true, condition);
  };

  var callFn = function (value) {
    if (AS_ENTRIES) {
      anObject(value);
      return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
    } return INTERRUPTED ? fn(value, stop) : fn(value);
  };

  if (IS_ITERATOR) {
    iterator = iterable;
  } else {
    iterFn = getIteratorMethod(iterable);
    if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
    // optimisation for array iterators
    if (isArrayIteratorMethod(iterFn)) {
      for (index = 0, length = toLength(iterable.length); length > index; index++) {
        result = callFn(iterable[index]);
        if (result && result instanceof Result) return result;
      } return new Result(false);
    }
    iterator = iterFn.call(iterable);
  }

  next = iterator.next;
  while (!(step = next.call(iterator)).done) {
    try {
      result = callFn(step.value);
    } catch (error) {
      iteratorClose(iterator);
      throw error;
    }
    if (typeof result == 'object' && result && result instanceof Result) return result;
  } return new Result(false);
};


/***/ }),

/***/ "23cb":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("a691");

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toInteger(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};


/***/ }),

/***/ "23e7":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
var createNonEnumerableProperty = __webpack_require__("9112");
var redefine = __webpack_require__("6eeb");
var setGlobal = __webpack_require__("ce4e");
var copyConstructorProperties = __webpack_require__("e893");
var isForced = __webpack_require__("94ca");

/*
  options.target      - name of the target object
  options.global      - target is the global object
  options.stat        - export as static methods of target
  options.proto       - export as prototype methods of target
  options.real        - real prototype method for the `pure` version
  options.forced      - export even if the native feature is available
  options.bind        - bind methods to the target, required for the `pure` version
  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
  options.sham        - add a flag to not completely full polyfills
  options.enumerable  - export as enumerable property
  options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  if (GLOBAL) {
    target = global;
  } else if (STATIC) {
    target = global[TARGET] || setGlobal(TARGET, {});
  } else {
    target = (global[TARGET] || {}).prototype;
  }
  if (target) for (key in source) {
    sourceProperty = source[key];
    if (options.noTargetGet) {
      descriptor = getOwnPropertyDescriptor(target, key);
      targetProperty = descriptor && descriptor.value;
    } else targetProperty = target[key];
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contained in target
    if (!FORCED && targetProperty !== undefined) {
      if (typeof sourceProperty === typeof targetProperty) continue;
      copyConstructorProperties(sourceProperty, targetProperty);
    }
    // add a flag to not completely full polyfills
    if (options.sham || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(sourceProperty, 'sham', true);
    }
    // extend global
    redefine(target, key, sourceProperty, options);
  }
};


/***/ }),

/***/ "241c":
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__("ca84");
var enumBugKeys = __webpack_require__("7839");

var hiddenKeys = enumBugKeys.concat('length', 'prototype');

// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return internalObjectKeys(O, hiddenKeys);
};


/***/ }),

/***/ "2444":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(process) {

var utils = __webpack_require__("c532");
var normalizeHeaderName = __webpack_require__("c8af");

var DEFAULT_CONTENT_TYPE = {
  'Content-Type': 'application/x-www-form-urlencoded'
};

function setContentTypeIfUnset(headers, value) {
  if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
    headers['Content-Type'] = value;
  }
}

function getDefaultAdapter() {
  var adapter;
  if (typeof XMLHttpRequest !== 'undefined') {
    // For browsers use XHR adapter
    adapter = __webpack_require__("b50d");
  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
    // For node use HTTP adapter
    adapter = __webpack_require__("b50d");
  }
  return adapter;
}

var defaults = {
  adapter: getDefaultAdapter(),

  transformRequest: [function transformRequest(data, headers) {
    normalizeHeaderName(headers, 'Accept');
    normalizeHeaderName(headers, 'Content-Type');
    if (utils.isFormData(data) ||
      utils.isArrayBuffer(data) ||
      utils.isBuffer(data) ||
      utils.isStream(data) ||
      utils.isFile(data) ||
      utils.isBlob(data)
    ) {
      return data;
    }
    if (utils.isArrayBufferView(data)) {
      return data.buffer;
    }
    if (utils.isURLSearchParams(data)) {
      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
      return data.toString();
    }
    if (utils.isObject(data)) {
      setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
      return JSON.stringify(data);
    }
    return data;
  }],

  transformResponse: [function transformResponse(data) {
    /*eslint no-param-reassign:0*/
    if (typeof data === 'string') {
      try {
        data = JSON.parse(data);
      } catch (e) { /* Ignore */ }
    }
    return data;
  }],

  /**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */
  timeout: 0,

  xsrfCookieName: 'XSRF-TOKEN',
  xsrfHeaderName: 'X-XSRF-TOKEN',

  maxContentLength: -1,
  maxBodyLength: -1,

  validateStatus: function validateStatus(status) {
    return status >= 200 && status < 300;
  }
};

defaults.headers = {
  common: {
    'Accept': 'application/json, text/plain, */*'
  }
};

utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  defaults.headers[method] = {};
});

utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
});

module.exports = defaults;

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))

/***/ }),

/***/ "2532":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var notARegExp = __webpack_require__("5a34");
var requireObjectCoercible = __webpack_require__("1d80");
var correctIsRegExpLogic = __webpack_require__("ab13");

// `String.prototype.includes` method
// https://tc39.es/ecma262/#sec-string.prototype.includes
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  includes: function includes(searchString /* , position = 0 */) {
    return !!~String(requireObjectCoercible(this))
      .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "2626":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var getBuiltIn = __webpack_require__("d066");
var definePropertyModule = __webpack_require__("9bf2");
var wellKnownSymbol = __webpack_require__("b622");
var DESCRIPTORS = __webpack_require__("83ab");

var SPECIES = wellKnownSymbol('species');

module.exports = function (CONSTRUCTOR_NAME) {
  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  var defineProperty = definePropertyModule.f;

  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
    defineProperty(Constructor, SPECIES, {
      configurable: true,
      get: function () { return this; }
    });
  }
};


/***/ }),

/***/ "2a62":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");

module.exports = function (iterator) {
  var returnMethod = iterator['return'];
  if (returnMethod !== undefined) {
    return anObject(returnMethod.call(iterator)).value;
  }
};


/***/ }),

/***/ "2b3d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
__webpack_require__("3ca3");
var $ = __webpack_require__("23e7");
var DESCRIPTORS = __webpack_require__("83ab");
var USE_NATIVE_URL = __webpack_require__("0d3b");
var global = __webpack_require__("da84");
var defineProperties = __webpack_require__("37e8");
var redefine = __webpack_require__("6eeb");
var anInstance = __webpack_require__("19aa");
var has = __webpack_require__("5135");
var assign = __webpack_require__("60da");
var arrayFrom = __webpack_require__("4df4");
var codeAt = __webpack_require__("6547").codeAt;
var toASCII = __webpack_require__("5fb2");
var setToStringTag = __webpack_require__("d44e");
var URLSearchParamsModule = __webpack_require__("9861");
var InternalStateModule = __webpack_require__("69f3");

var NativeURL = global.URL;
var URLSearchParams = URLSearchParamsModule.URLSearchParams;
var getInternalSearchParamsState = URLSearchParamsModule.getState;
var setInternalState = InternalStateModule.set;
var getInternalURLState = InternalStateModule.getterFor('URL');
var floor = Math.floor;
var pow = Math.pow;

var INVALID_AUTHORITY = 'Invalid authority';
var INVALID_SCHEME = 'Invalid scheme';
var INVALID_HOST = 'Invalid host';
var INVALID_PORT = 'Invalid port';

var ALPHA = /[A-Za-z]/;
var ALPHANUMERIC = /[\d+-.A-Za-z]/;
var DIGIT = /\d/;
var HEX_START = /^(0x|0X)/;
var OCT = /^[0-7]+$/;
var DEC = /^\d+$/;
var HEX = /^[\dA-Fa-f]+$/;
/* eslint-disable no-control-regex -- safe */
var FORBIDDEN_HOST_CODE_POINT = /[\u0000\t\u000A\u000D #%/:?@[\\]]/;
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\t\u000A\u000D #/:?@[\\]]/;
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
var TAB_AND_NEW_LINE = /[\t\u000A\u000D]/g;
/* eslint-enable no-control-regex -- safe */
var EOF;

var parseHost = function (url, input) {
  var result, codePoints, index;
  if (input.charAt(0) == '[') {
    if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
    result = parseIPv6(input.slice(1, -1));
    if (!result) return INVALID_HOST;
    url.host = result;
  // opaque host
  } else if (!isSpecial(url)) {
    if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
    result = '';
    codePoints = arrayFrom(input);
    for (index = 0; index < codePoints.length; index++) {
      result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
    }
    url.host = result;
  } else {
    input = toASCII(input);
    if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
    result = parseIPv4(input);
    if (result === null) return INVALID_HOST;
    url.host = result;
  }
};

var parseIPv4 = function (input) {
  var parts = input.split('.');
  var partsLength, numbers, index, part, radix, number, ipv4;
  if (parts.length && parts[parts.length - 1] == '') {
    parts.pop();
  }
  partsLength = parts.length;
  if (partsLength > 4) return input;
  numbers = [];
  for (index = 0; index < partsLength; index++) {
    part = parts[index];
    if (part == '') return input;
    radix = 10;
    if (part.length > 1 && part.charAt(0) == '0') {
      radix = HEX_START.test(part) ? 16 : 8;
      part = part.slice(radix == 8 ? 1 : 2);
    }
    if (part === '') {
      number = 0;
    } else {
      if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
      number = parseInt(part, radix);
    }
    numbers.push(number);
  }
  for (index = 0; index < partsLength; index++) {
    number = numbers[index];
    if (index == partsLength - 1) {
      if (number >= pow(256, 5 - partsLength)) return null;
    } else if (number > 255) return null;
  }
  ipv4 = numbers.pop();
  for (index = 0; index < numbers.length; index++) {
    ipv4 += numbers[index] * pow(256, 3 - index);
  }
  return ipv4;
};

// eslint-disable-next-line max-statements -- TODO
var parseIPv6 = function (input) {
  var address = [0, 0, 0, 0, 0, 0, 0, 0];
  var pieceIndex = 0;
  var compress = null;
  var pointer = 0;
  var value, length, numbersSeen, ipv4Piece, number, swaps, swap;

  var char = function () {
    return input.charAt(pointer);
  };

  if (char() == ':') {
    if (input.charAt(1) != ':') return;
    pointer += 2;
    pieceIndex++;
    compress = pieceIndex;
  }
  while (char()) {
    if (pieceIndex == 8) return;
    if (char() == ':') {
      if (compress !== null) return;
      pointer++;
      pieceIndex++;
      compress = pieceIndex;
      continue;
    }
    value = length = 0;
    while (length < 4 && HEX.test(char())) {
      value = value * 16 + parseInt(char(), 16);
      pointer++;
      length++;
    }
    if (char() == '.') {
      if (length == 0) return;
      pointer -= length;
      if (pieceIndex > 6) return;
      numbersSeen = 0;
      while (char()) {
        ipv4Piece = null;
        if (numbersSeen > 0) {
          if (char() == '.' && numbersSeen < 4) pointer++;
          else return;
        }
        if (!DIGIT.test(char())) return;
        while (DIGIT.test(char())) {
          number = parseInt(char(), 10);
          if (ipv4Piece === null) ipv4Piece = number;
          else if (ipv4Piece == 0) return;
          else ipv4Piece = ipv4Piece * 10 + number;
          if (ipv4Piece > 255) return;
          pointer++;
        }
        address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
        numbersSeen++;
        if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
      }
      if (numbersSeen != 4) return;
      break;
    } else if (char() == ':') {
      pointer++;
      if (!char()) return;
    } else if (char()) return;
    address[pieceIndex++] = value;
  }
  if (compress !== null) {
    swaps = pieceIndex - compress;
    pieceIndex = 7;
    while (pieceIndex != 0 && swaps > 0) {
      swap = address[pieceIndex];
      address[pieceIndex--] = address[compress + swaps - 1];
      address[compress + --swaps] = swap;
    }
  } else if (pieceIndex != 8) return;
  return address;
};

var findLongestZeroSequence = function (ipv6) {
  var maxIndex = null;
  var maxLength = 1;
  var currStart = null;
  var currLength = 0;
  var index = 0;
  for (; index < 8; index++) {
    if (ipv6[index] !== 0) {
      if (currLength > maxLength) {
        maxIndex = currStart;
        maxLength = currLength;
      }
      currStart = null;
      currLength = 0;
    } else {
      if (currStart === null) currStart = index;
      ++currLength;
    }
  }
  if (currLength > maxLength) {
    maxIndex = currStart;
    maxLength = currLength;
  }
  return maxIndex;
};

var serializeHost = function (host) {
  var result, index, compress, ignore0;
  // ipv4
  if (typeof host == 'number') {
    result = [];
    for (index = 0; index < 4; index++) {
      result.unshift(host % 256);
      host = floor(host / 256);
    } return result.join('.');
  // ipv6
  } else if (typeof host == 'object') {
    result = '';
    compress = findLongestZeroSequence(host);
    for (index = 0; index < 8; index++) {
      if (ignore0 && host[index] === 0) continue;
      if (ignore0) ignore0 = false;
      if (compress === index) {
        result += index ? ':' : '::';
        ignore0 = true;
      } else {
        result += host[index].toString(16);
        if (index < 7) result += ':';
      }
    }
    return '[' + result + ']';
  } return host;
};

var C0ControlPercentEncodeSet = {};
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
  ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
});
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
  '#': 1, '?': 1, '{': 1, '}': 1
});
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
  '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
});

var percentEncode = function (char, set) {
  var code = codeAt(char, 0);
  return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
};

var specialSchemes = {
  ftp: 21,
  file: null,
  http: 80,
  https: 443,
  ws: 80,
  wss: 443
};

var isSpecial = function (url) {
  return has(specialSchemes, url.scheme);
};

var includesCredentials = function (url) {
  return url.username != '' || url.password != '';
};

var cannotHaveUsernamePasswordPort = function (url) {
  return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
};

var isWindowsDriveLetter = function (string, normalized) {
  var second;
  return string.length == 2 && ALPHA.test(string.charAt(0))
    && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
};

var startsWithWindowsDriveLetter = function (string) {
  var third;
  return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
    string.length == 2 ||
    ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
  );
};

var shortenURLsPath = function (url) {
  var path = url.path;
  var pathSize = path.length;
  if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
    path.pop();
  }
};

var isSingleDot = function (segment) {
  return segment === '.' || segment.toLowerCase() === '%2e';
};

var isDoubleDot = function (segment) {
  segment = segment.toLowerCase();
  return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
};

// States:
var SCHEME_START = {};
var SCHEME = {};
var NO_SCHEME = {};
var SPECIAL_RELATIVE_OR_AUTHORITY = {};
var PATH_OR_AUTHORITY = {};
var RELATIVE = {};
var RELATIVE_SLASH = {};
var SPECIAL_AUTHORITY_SLASHES = {};
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
var AUTHORITY = {};
var HOST = {};
var HOSTNAME = {};
var PORT = {};
var FILE = {};
var FILE_SLASH = {};
var FILE_HOST = {};
var PATH_START = {};
var PATH = {};
var CANNOT_BE_A_BASE_URL_PATH = {};
var QUERY = {};
var FRAGMENT = {};

// eslint-disable-next-line max-statements -- TODO
var parseURL = function (url, input, stateOverride, base) {
  var state = stateOverride || SCHEME_START;
  var pointer = 0;
  var buffer = '';
  var seenAt = false;
  var seenBracket = false;
  var seenPasswordToken = false;
  var codePoints, char, bufferCodePoints, failure;

  if (!stateOverride) {
    url.scheme = '';
    url.username = '';
    url.password = '';
    url.host = null;
    url.port = null;
    url.path = [];
    url.query = null;
    url.fragment = null;
    url.cannotBeABaseURL = false;
    input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
  }

  input = input.replace(TAB_AND_NEW_LINE, '');

  codePoints = arrayFrom(input);

  while (pointer <= codePoints.length) {
    char = codePoints[pointer];
    switch (state) {
      case SCHEME_START:
        if (char && ALPHA.test(char)) {
          buffer += char.toLowerCase();
          state = SCHEME;
        } else if (!stateOverride) {
          state = NO_SCHEME;
          continue;
        } else return INVALID_SCHEME;
        break;

      case SCHEME:
        if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
          buffer += char.toLowerCase();
        } else if (char == ':') {
          if (stateOverride && (
            (isSpecial(url) != has(specialSchemes, buffer)) ||
            (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
            (url.scheme == 'file' && !url.host)
          )) return;
          url.scheme = buffer;
          if (stateOverride) {
            if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
            return;
          }
          buffer = '';
          if (url.scheme == 'file') {
            state = FILE;
          } else if (isSpecial(url) && base && base.scheme == url.scheme) {
            state = SPECIAL_RELATIVE_OR_AUTHORITY;
          } else if (isSpecial(url)) {
            state = SPECIAL_AUTHORITY_SLASHES;
          } else if (codePoints[pointer + 1] == '/') {
            state = PATH_OR_AUTHORITY;
            pointer++;
          } else {
            url.cannotBeABaseURL = true;
            url.path.push('');
            state = CANNOT_BE_A_BASE_URL_PATH;
          }
        } else if (!stateOverride) {
          buffer = '';
          state = NO_SCHEME;
          pointer = 0;
          continue;
        } else return INVALID_SCHEME;
        break;

      case NO_SCHEME:
        if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
        if (base.cannotBeABaseURL && char == '#') {
          url.scheme = base.scheme;
          url.path = base.path.slice();
          url.query = base.query;
          url.fragment = '';
          url.cannotBeABaseURL = true;
          state = FRAGMENT;
          break;
        }
        state = base.scheme == 'file' ? FILE : RELATIVE;
        continue;

      case SPECIAL_RELATIVE_OR_AUTHORITY:
        if (char == '/' && codePoints[pointer + 1] == '/') {
          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
          pointer++;
        } else {
          state = RELATIVE;
          continue;
        } break;

      case PATH_OR_AUTHORITY:
        if (char == '/') {
          state = AUTHORITY;
          break;
        } else {
          state = PATH;
          continue;
        }

      case RELATIVE:
        url.scheme = base.scheme;
        if (char == EOF) {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = base.query;
        } else if (char == '/' || (char == '\\' && isSpecial(url))) {
          state = RELATIVE_SLASH;
        } else if (char == '?') {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = '';
          state = QUERY;
        } else if (char == '#') {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.query = base.query;
          url.fragment = '';
          state = FRAGMENT;
        } else {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          url.path = base.path.slice();
          url.path.pop();
          state = PATH;
          continue;
        } break;

      case RELATIVE_SLASH:
        if (isSpecial(url) && (char == '/' || char == '\\')) {
          state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
        } else if (char == '/') {
          state = AUTHORITY;
        } else {
          url.username = base.username;
          url.password = base.password;
          url.host = base.host;
          url.port = base.port;
          state = PATH;
          continue;
        } break;

      case SPECIAL_AUTHORITY_SLASHES:
        state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
        if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
        pointer++;
        break;

      case SPECIAL_AUTHORITY_IGNORE_SLASHES:
        if (char != '/' && char != '\\') {
          state = AUTHORITY;
          continue;
        } break;

      case AUTHORITY:
        if (char == '@') {
          if (seenAt) buffer = '%40' + buffer;
          seenAt = true;
          bufferCodePoints = arrayFrom(buffer);
          for (var i = 0; i < bufferCodePoints.length; i++) {
            var codePoint = bufferCodePoints[i];
            if (codePoint == ':' && !seenPasswordToken) {
              seenPasswordToken = true;
              continue;
            }
            var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
            if (seenPasswordToken) url.password += encodedCodePoints;
            else url.username += encodedCodePoints;
          }
          buffer = '';
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url))
        ) {
          if (seenAt && buffer == '') return INVALID_AUTHORITY;
          pointer -= arrayFrom(buffer).length + 1;
          buffer = '';
          state = HOST;
        } else buffer += char;
        break;

      case HOST:
      case HOSTNAME:
        if (stateOverride && url.scheme == 'file') {
          state = FILE_HOST;
          continue;
        } else if (char == ':' && !seenBracket) {
          if (buffer == '') return INVALID_HOST;
          failure = parseHost(url, buffer);
          if (failure) return failure;
          buffer = '';
          state = PORT;
          if (stateOverride == HOSTNAME) return;
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url))
        ) {
          if (isSpecial(url) && buffer == '') return INVALID_HOST;
          if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
          failure = parseHost(url, buffer);
          if (failure) return failure;
          buffer = '';
          state = PATH_START;
          if (stateOverride) return;
          continue;
        } else {
          if (char == '[') seenBracket = true;
          else if (char == ']') seenBracket = false;
          buffer += char;
        } break;

      case PORT:
        if (DIGIT.test(char)) {
          buffer += char;
        } else if (
          char == EOF || char == '/' || char == '?' || char == '#' ||
          (char == '\\' && isSpecial(url)) ||
          stateOverride
        ) {
          if (buffer != '') {
            var port = parseInt(buffer, 10);
            if (port > 0xFFFF) return INVALID_PORT;
            url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
            buffer = '';
          }
          if (stateOverride) return;
          state = PATH_START;
          continue;
        } else return INVALID_PORT;
        break;

      case FILE:
        url.scheme = 'file';
        if (char == '/' || char == '\\') state = FILE_SLASH;
        else if (base && base.scheme == 'file') {
          if (char == EOF) {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = base.query;
          } else if (char == '?') {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = '';
            state = QUERY;
          } else if (char == '#') {
            url.host = base.host;
            url.path = base.path.slice();
            url.query = base.query;
            url.fragment = '';
            state = FRAGMENT;
          } else {
            if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
              url.host = base.host;
              url.path = base.path.slice();
              shortenURLsPath(url);
            }
            state = PATH;
            continue;
          }
        } else {
          state = PATH;
          continue;
        } break;

      case FILE_SLASH:
        if (char == '/' || char == '\\') {
          state = FILE_HOST;
          break;
        }
        if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
          if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
          else url.host = base.host;
        }
        state = PATH;
        continue;

      case FILE_HOST:
        if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
          if (!stateOverride && isWindowsDriveLetter(buffer)) {
            state = PATH;
          } else if (buffer == '') {
            url.host = '';
            if (stateOverride) return;
            state = PATH_START;
          } else {
            failure = parseHost(url, buffer);
            if (failure) return failure;
            if (url.host == 'localhost') url.host = '';
            if (stateOverride) return;
            buffer = '';
            state = PATH_START;
          } continue;
        } else buffer += char;
        break;

      case PATH_START:
        if (isSpecial(url)) {
          state = PATH;
          if (char != '/' && char != '\\') continue;
        } else if (!stateOverride && char == '?') {
          url.query = '';
          state = QUERY;
        } else if (!stateOverride && char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          state = PATH;
          if (char != '/') continue;
        } break;

      case PATH:
        if (
          char == EOF || char == '/' ||
          (char == '\\' && isSpecial(url)) ||
          (!stateOverride && (char == '?' || char == '#'))
        ) {
          if (isDoubleDot(buffer)) {
            shortenURLsPath(url);
            if (char != '/' && !(char == '\\' && isSpecial(url))) {
              url.path.push('');
            }
          } else if (isSingleDot(buffer)) {
            if (char != '/' && !(char == '\\' && isSpecial(url))) {
              url.path.push('');
            }
          } else {
            if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
              if (url.host) url.host = '';
              buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
            }
            url.path.push(buffer);
          }
          buffer = '';
          if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
            while (url.path.length > 1 && url.path[0] === '') {
              url.path.shift();
            }
          }
          if (char == '?') {
            url.query = '';
            state = QUERY;
          } else if (char == '#') {
            url.fragment = '';
            state = FRAGMENT;
          }
        } else {
          buffer += percentEncode(char, pathPercentEncodeSet);
        } break;

      case CANNOT_BE_A_BASE_URL_PATH:
        if (char == '?') {
          url.query = '';
          state = QUERY;
        } else if (char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
        } break;

      case QUERY:
        if (!stateOverride && char == '#') {
          url.fragment = '';
          state = FRAGMENT;
        } else if (char != EOF) {
          if (char == "'" && isSpecial(url)) url.query += '%27';
          else if (char == '#') url.query += '%23';
          else url.query += percentEncode(char, C0ControlPercentEncodeSet);
        } break;

      case FRAGMENT:
        if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
        break;
    }

    pointer++;
  }
};

// `URL` constructor
// https://url.spec.whatwg.org/#url-class
var URLConstructor = function URL(url /* , base */) {
  var that = anInstance(this, URLConstructor, 'URL');
  var base = arguments.length > 1 ? arguments[1] : undefined;
  var urlString = String(url);
  var state = setInternalState(that, { type: 'URL' });
  var baseState, failure;
  if (base !== undefined) {
    if (base instanceof URLConstructor) baseState = getInternalURLState(base);
    else {
      failure = parseURL(baseState = {}, String(base));
      if (failure) throw TypeError(failure);
    }
  }
  failure = parseURL(state, urlString, null, baseState);
  if (failure) throw TypeError(failure);
  var searchParams = state.searchParams = new URLSearchParams();
  var searchParamsState = getInternalSearchParamsState(searchParams);
  searchParamsState.updateSearchParams(state.query);
  searchParamsState.updateURL = function () {
    state.query = String(searchParams) || null;
  };
  if (!DESCRIPTORS) {
    that.href = serializeURL.call(that);
    that.origin = getOrigin.call(that);
    that.protocol = getProtocol.call(that);
    that.username = getUsername.call(that);
    that.password = getPassword.call(that);
    that.host = getHost.call(that);
    that.hostname = getHostname.call(that);
    that.port = getPort.call(that);
    that.pathname = getPathname.call(that);
    that.search = getSearch.call(that);
    that.searchParams = getSearchParams.call(that);
    that.hash = getHash.call(that);
  }
};

var URLPrototype = URLConstructor.prototype;

var serializeURL = function () {
  var url = getInternalURLState(this);
  var scheme = url.scheme;
  var username = url.username;
  var password = url.password;
  var host = url.host;
  var port = url.port;
  var path = url.path;
  var query = url.query;
  var fragment = url.fragment;
  var output = scheme + ':';
  if (host !== null) {
    output += '//';
    if (includesCredentials(url)) {
      output += username + (password ? ':' + password : '') + '@';
    }
    output += serializeHost(host);
    if (port !== null) output += ':' + port;
  } else if (scheme == 'file') output += '//';
  output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
  if (query !== null) output += '?' + query;
  if (fragment !== null) output += '#' + fragment;
  return output;
};

var getOrigin = function () {
  var url = getInternalURLState(this);
  var scheme = url.scheme;
  var port = url.port;
  if (scheme == 'blob') try {
    return new URL(scheme.path[0]).origin;
  } catch (error) {
    return 'null';
  }
  if (scheme == 'file' || !isSpecial(url)) return 'null';
  return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
};

var getProtocol = function () {
  return getInternalURLState(this).scheme + ':';
};

var getUsername = function () {
  return getInternalURLState(this).username;
};

var getPassword = function () {
  return getInternalURLState(this).password;
};

var getHost = function () {
  var url = getInternalURLState(this);
  var host = url.host;
  var port = url.port;
  return host === null ? ''
    : port === null ? serializeHost(host)
    : serializeHost(host) + ':' + port;
};

var getHostname = function () {
  var host = getInternalURLState(this).host;
  return host === null ? '' : serializeHost(host);
};

var getPort = function () {
  var port = getInternalURLState(this).port;
  return port === null ? '' : String(port);
};

var getPathname = function () {
  var url = getInternalURLState(this);
  var path = url.path;
  return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
};

var getSearch = function () {
  var query = getInternalURLState(this).query;
  return query ? '?' + query : '';
};

var getSearchParams = function () {
  return getInternalURLState(this).searchParams;
};

var getHash = function () {
  var fragment = getInternalURLState(this).fragment;
  return fragment ? '#' + fragment : '';
};

var accessorDescriptor = function (getter, setter) {
  return { get: getter, set: setter, configurable: true, enumerable: true };
};

if (DESCRIPTORS) {
  defineProperties(URLPrototype, {
    // `URL.prototype.href` accessors pair
    // https://url.spec.whatwg.org/#dom-url-href
    href: accessorDescriptor(serializeURL, function (href) {
      var url = getInternalURLState(this);
      var urlString = String(href);
      var failure = parseURL(url, urlString);
      if (failure) throw TypeError(failure);
      getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
    }),
    // `URL.prototype.origin` getter
    // https://url.spec.whatwg.org/#dom-url-origin
    origin: accessorDescriptor(getOrigin),
    // `URL.prototype.protocol` accessors pair
    // https://url.spec.whatwg.org/#dom-url-protocol
    protocol: accessorDescriptor(getProtocol, function (protocol) {
      var url = getInternalURLState(this);
      parseURL(url, String(protocol) + ':', SCHEME_START);
    }),
    // `URL.prototype.username` accessors pair
    // https://url.spec.whatwg.org/#dom-url-username
    username: accessorDescriptor(getUsername, function (username) {
      var url = getInternalURLState(this);
      var codePoints = arrayFrom(String(username));
      if (cannotHaveUsernamePasswordPort(url)) return;
      url.username = '';
      for (var i = 0; i < codePoints.length; i++) {
        url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
      }
    }),
    // `URL.prototype.password` accessors pair
    // https://url.spec.whatwg.org/#dom-url-password
    password: accessorDescriptor(getPassword, function (password) {
      var url = getInternalURLState(this);
      var codePoints = arrayFrom(String(password));
      if (cannotHaveUsernamePasswordPort(url)) return;
      url.password = '';
      for (var i = 0; i < codePoints.length; i++) {
        url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
      }
    }),
    // `URL.prototype.host` accessors pair
    // https://url.spec.whatwg.org/#dom-url-host
    host: accessorDescriptor(getHost, function (host) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      parseURL(url, String(host), HOST);
    }),
    // `URL.prototype.hostname` accessors pair
    // https://url.spec.whatwg.org/#dom-url-hostname
    hostname: accessorDescriptor(getHostname, function (hostname) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      parseURL(url, String(hostname), HOSTNAME);
    }),
    // `URL.prototype.port` accessors pair
    // https://url.spec.whatwg.org/#dom-url-port
    port: accessorDescriptor(getPort, function (port) {
      var url = getInternalURLState(this);
      if (cannotHaveUsernamePasswordPort(url)) return;
      port = String(port);
      if (port == '') url.port = null;
      else parseURL(url, port, PORT);
    }),
    // `URL.prototype.pathname` accessors pair
    // https://url.spec.whatwg.org/#dom-url-pathname
    pathname: accessorDescriptor(getPathname, function (pathname) {
      var url = getInternalURLState(this);
      if (url.cannotBeABaseURL) return;
      url.path = [];
      parseURL(url, pathname + '', PATH_START);
    }),
    // `URL.prototype.search` accessors pair
    // https://url.spec.whatwg.org/#dom-url-search
    search: accessorDescriptor(getSearch, function (search) {
      var url = getInternalURLState(this);
      search = String(search);
      if (search == '') {
        url.query = null;
      } else {
        if ('?' == search.charAt(0)) search = search.slice(1);
        url.query = '';
        parseURL(url, search, QUERY);
      }
      getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
    }),
    // `URL.prototype.searchParams` getter
    // https://url.spec.whatwg.org/#dom-url-searchparams
    searchParams: accessorDescriptor(getSearchParams),
    // `URL.prototype.hash` accessors pair
    // https://url.spec.whatwg.org/#dom-url-hash
    hash: accessorDescriptor(getHash, function (hash) {
      var url = getInternalURLState(this);
      hash = String(hash);
      if (hash == '') {
        url.fragment = null;
        return;
      }
      if ('#' == hash.charAt(0)) hash = hash.slice(1);
      url.fragment = '';
      parseURL(url, hash, FRAGMENT);
    })
  });
}

// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
redefine(URLPrototype, 'toJSON', function toJSON() {
  return serializeURL.call(this);
}, { enumerable: true });

// `URL.prototype.toString` method
// https://url.spec.whatwg.org/#URL-stringification-behavior
redefine(URLPrototype, 'toString', function toString() {
  return serializeURL.call(this);
}, { enumerable: true });

if (NativeURL) {
  var nativeCreateObjectURL = NativeURL.createObjectURL;
  var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
  // `URL.createObjectURL` method
  // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
    return nativeCreateObjectURL.apply(NativeURL, arguments);
  });
  // `URL.revokeObjectURL` method
  // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
    return nativeRevokeObjectURL.apply(NativeURL, arguments);
  });
}

setToStringTag(URLConstructor, 'URL');

$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
  URL: URLConstructor
});


/***/ }),

/***/ "2cf4":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var fails = __webpack_require__("d039");
var bind = __webpack_require__("0366");
var html = __webpack_require__("1be4");
var createElement = __webpack_require__("cc12");
var IS_IOS = __webpack_require__("1cdc");
var IS_NODE = __webpack_require__("605d");

var location = global.location;
var set = global.setImmediate;
var clear = global.clearImmediate;
var process = global.process;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;

var run = function (id) {
  // eslint-disable-next-line no-prototype-builtins -- safe
  if (queue.hasOwnProperty(id)) {
    var fn = queue[id];
    delete queue[id];
    fn();
  }
};

var runner = function (id) {
  return function () {
    run(id);
  };
};

var listener = function (event) {
  run(event.data);
};

var post = function (id) {
  // old engines have not location.origin
  global.postMessage(id + '', location.protocol + '//' + location.host);
};

// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!set || !clear) {
  set = function setImmediate(fn) {
    var args = [];
    var i = 1;
    while (arguments.length > i) args.push(arguments[i++]);
    queue[++counter] = function () {
      // eslint-disable-next-line no-new-func -- spec requirement
      (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
    };
    defer(counter);
    return counter;
  };
  clear = function clearImmediate(id) {
    delete queue[id];
  };
  // Node.js 0.8-
  if (IS_NODE) {
    defer = function (id) {
      process.nextTick(runner(id));
    };
  // Sphere (JS game engine) Dispatch API
  } else if (Dispatch && Dispatch.now) {
    defer = function (id) {
      Dispatch.now(runner(id));
    };
  // Browsers with MessageChannel, includes WebWorkers
  // except iOS - https://github.com/zloirock/core-js/issues/624
  } else if (MessageChannel && !IS_IOS) {
    channel = new MessageChannel();
    port = channel.port2;
    channel.port1.onmessage = listener;
    defer = bind(port.postMessage, port, 1);
  // Browsers with postMessage, skip WebWorkers
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  } else if (
    global.addEventListener &&
    typeof postMessage == 'function' &&
    !global.importScripts &&
    location && location.protocol !== 'file:' &&
    !fails(post)
  ) {
    defer = post;
    global.addEventListener('message', listener, false);
  // IE8-
  } else if (ONREADYSTATECHANGE in createElement('script')) {
    defer = function (id) {
      html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
        html.removeChild(this);
        run(id);
      };
    };
  // Rest old browsers
  } else {
    defer = function (id) {
      setTimeout(runner(id), 0);
    };
  }
}

module.exports = {
  set: set,
  clear: clear
};


/***/ }),

/***/ "2d00":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var userAgent = __webpack_require__("342f");

var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8;
var match, version;

if (v8) {
  match = v8.split('.');
  version = match[0] + match[1];
} else if (userAgent) {
  match = userAgent.match(/Edge\/(\d+)/);
  if (!match || match[1] >= 74) {
    match = userAgent.match(/Chrome\/(\d+)/);
    if (match) version = match[1];
  }
}

module.exports = version && +version;


/***/ }),

/***/ "2d83":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var enhanceError = __webpack_require__("387f");

/**
 * Create an Error with the specified message, config, error code, request and response.
 *
 * @param {string} message The error message.
 * @param {Object} config The config.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 * @returns {Error} The created error.
 */
module.exports = function createError(message, config, code, request, response) {
  var error = new Error(message);
  return enhanceError(error, config, code, request, response);
};


/***/ }),

/***/ "2e67":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = function isCancel(value) {
  return !!(value && value.__CANCEL__);
};


/***/ }),

/***/ "30b5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

function encode(val) {
  return encodeURIComponent(val).
    replace(/%3A/gi, ':').
    replace(/%24/g, '$').
    replace(/%2C/gi, ',').
    replace(/%20/g, '+').
    replace(/%5B/gi, '[').
    replace(/%5D/gi, ']');
}

/**
 * Build a URL by appending params to the end
 *
 * @param {string} url The base of the url (e.g., http://www.google.com)
 * @param {object} [params] The params to be appended
 * @returns {string} The formatted url
 */
module.exports = function buildURL(url, params, paramsSerializer) {
  /*eslint no-param-reassign:0*/
  if (!params) {
    return url;
  }

  var serializedParams;
  if (paramsSerializer) {
    serializedParams = paramsSerializer(params);
  } else if (utils.isURLSearchParams(params)) {
    serializedParams = params.toString();
  } else {
    var parts = [];

    utils.forEach(params, function serialize(val, key) {
      if (val === null || typeof val === 'undefined') {
        return;
      }

      if (utils.isArray(val)) {
        key = key + '[]';
      } else {
        val = [val];
      }

      utils.forEach(val, function parseValue(v) {
        if (utils.isDate(v)) {
          v = v.toISOString();
        } else if (utils.isObject(v)) {
          v = JSON.stringify(v);
        }
        parts.push(encode(key) + '=' + encode(v));
      });
    });

    serializedParams = parts.join('&');
  }

  if (serializedParams) {
    var hashmarkIndex = url.indexOf('#');
    if (hashmarkIndex !== -1) {
      url = url.slice(0, hashmarkIndex);
    }

    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  }

  return url;
};


/***/ }),

/***/ "342f":
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__("d066");

module.exports = getBuiltIn('navigator', 'userAgent') || '';


/***/ }),

/***/ "35a1":
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__("f5df");
var Iterators = __webpack_require__("3f8c");
var wellKnownSymbol = __webpack_require__("b622");

var ITERATOR = wellKnownSymbol('iterator');

module.exports = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};


/***/ }),

/***/ "37e8":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var definePropertyModule = __webpack_require__("9bf2");
var anObject = __webpack_require__("825a");
var objectKeys = __webpack_require__("df75");

// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = objectKeys(Properties);
  var length = keys.length;
  var index = 0;
  var key;
  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  return O;
};


/***/ }),

/***/ "387f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Update an Error with the specified config, error code, and response.
 *
 * @param {Error} error The error to update.
 * @param {Object} config The config.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 * @returns {Error} The error.
 */
module.exports = function enhanceError(error, config, code, request, response) {
  error.config = config;
  if (code) {
    error.code = code;
  }

  error.request = request;
  error.response = response;
  error.isAxiosError = true;

  error.toJSON = function toJSON() {
    return {
      // Standard
      message: this.message,
      name: this.name,
      // Microsoft
      description: this.description,
      number: this.number,
      // Mozilla
      fileName: this.fileName,
      lineNumber: this.lineNumber,
      columnNumber: this.columnNumber,
      stack: this.stack,
      // Axios
      config: this.config,
      code: this.code
    };
  };
  return error;
};


/***/ }),

/***/ "3896":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
// The global data.
exports.data = {};
// The observer of store.
exports.observers = {};
//# sourceMappingURL=data.js.map

/***/ }),

/***/ "3934":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

module.exports = (
  utils.isStandardBrowserEnv() ?

  // Standard browser envs have full support of the APIs needed to test
  // whether the request URL is of the same origin as current location.
    (function standardBrowserEnv() {
      var msie = /(msie|trident)/i.test(navigator.userAgent);
      var urlParsingNode = document.createElement('a');
      var originURL;

      /**
    * Parse a URL to discover it's components
    *
    * @param {String} url The URL to be parsed
    * @returns {Object}
    */
      function resolveURL(url) {
        var href = url;

        if (msie) {
        // IE needs attribute set twice to normalize properties
          urlParsingNode.setAttribute('href', href);
          href = urlParsingNode.href;
        }

        urlParsingNode.setAttribute('href', href);

        // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
        return {
          href: urlParsingNode.href,
          protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
          host: urlParsingNode.host,
          search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
          hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
          hostname: urlParsingNode.hostname,
          port: urlParsingNode.port,
          pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
            urlParsingNode.pathname :
            '/' + urlParsingNode.pathname
        };
      }

      originURL = resolveURL(window.location.href);

      /**
    * Determine if a URL shares the same origin as the current location
    *
    * @param {String} requestURL The URL to test
    * @returns {boolean} True if URL shares the same origin, otherwise false
    */
      return function isURLSameOrigin(requestURL) {
        var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
        return (parsed.protocol === originURL.protocol &&
            parsed.host === originURL.host);
      };
    })() :

  // Non standard browser envs (web workers, react-native) lack needed support.
    (function nonStandardBrowserEnv() {
      return function isURLSameOrigin() {
        return true;
      };
    })()
);


/***/ }),

/***/ "3bbe":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");

module.exports = function (it) {
  if (!isObject(it) && it !== null) {
    throw TypeError("Can't set " + String(it) + ' as a prototype');
  } return it;
};


/***/ }),

/***/ "3ca3":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var charAt = __webpack_require__("6547").charAt;
var InternalStateModule = __webpack_require__("69f3");
var defineIterator = __webpack_require__("7dd0");

var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);

// `String.prototype[@@iterator]` method
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
  setInternalState(this, {
    type: STRING_ITERATOR,
    string: String(iterated),
    index: 0
  });
// `%StringIteratorPrototype%.next` method
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
  var state = getInternalState(this);
  var string = state.string;
  var index = state.index;
  var point;
  if (index >= string.length) return { value: undefined, done: true };
  point = charAt(string, index);
  state.index += point.length;
  return { value: point, done: false };
});


/***/ }),

/***/ "3f8c":
/***/ (function(module, exports) {

module.exports = {};


/***/ }),

/***/ "428f":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");

module.exports = global;


/***/ }),

/***/ "4362":
/***/ (function(module, exports, __webpack_require__) {

exports.nextTick = function nextTick(fn) {
    var args = Array.prototype.slice.call(arguments);
    args.shift();
    setTimeout(function () {
        fn.apply(null, args);
    }, 0);
};

exports.platform = exports.arch = 
exports.execPath = exports.title = 'browser';
exports.pid = 1;
exports.browser = true;
exports.env = {};
exports.argv = [];

exports.binding = function (name) {
	throw new Error('No such module. (Possibly not yet loaded)')
};

(function () {
    var cwd = '/';
    var path;
    exports.cwd = function () { return cwd };
    exports.chdir = function (dir) {
        if (!path) path = __webpack_require__("df7c");
        cwd = path.resolve(dir, cwd);
    };
})();

exports.exit = exports.kill = 
exports.umask = exports.dlopen = 
exports.uptime = exports.memoryUsage = 
exports.uvCounters = function() {};
exports.features = {};


/***/ }),

/***/ "44ad":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");
var classof = __webpack_require__("c6b6");

var split = ''.split;

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins -- safe
  return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;


/***/ }),

/***/ "44d2":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");
var create = __webpack_require__("7c73");
var definePropertyModule = __webpack_require__("9bf2");

var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;

// Array.prototype[@@unscopables]
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
    configurable: true,
    value: create(null)
  });
}

// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
  ArrayPrototype[UNSCOPABLES][key] = true;
};


/***/ }),

/***/ "44de":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");

module.exports = function (a, b) {
  var console = global.console;
  if (console && console.error) {
    arguments.length === 1 ? console.error(a) : console.error(a, b);
  }
};


/***/ }),

/***/ "44e7":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");
var classof = __webpack_require__("c6b6");
var wellKnownSymbol = __webpack_require__("b622");

var MATCH = wellKnownSymbol('match');

// `IsRegExp` abstract operation
// https://tc39.es/ecma262/#sec-isregexp
module.exports = function (it) {
  var isRegExp;
  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
};


/***/ }),

/***/ "466d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var anObject = __webpack_require__("825a");
var toLength = __webpack_require__("50c4");
var requireObjectCoercible = __webpack_require__("1d80");
var advanceStringIndex = __webpack_require__("8aa5");
var regExpExec = __webpack_require__("14c3");

// @@match logic
fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  return [
    // `String.prototype.match` method
    // https://tc39.es/ecma262/#sec-string.prototype.match
    function match(regexp) {
      var O = requireObjectCoercible(this);
      var matcher = regexp == undefined ? undefined : regexp[MATCH];
      return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
    },
    // `RegExp.prototype[@@match]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
    function (regexp) {
      var res = maybeCallNative(nativeMatch, regexp, this);
      if (res.done) return res.value;

      var rx = anObject(regexp);
      var S = String(this);

      if (!rx.global) return regExpExec(rx, S);

      var fullUnicode = rx.unicode;
      rx.lastIndex = 0;
      var A = [];
      var n = 0;
      var result;
      while ((result = regExpExec(rx, S)) !== null) {
        var matchStr = String(result[0]);
        A[n] = matchStr;
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
        n++;
      }
      return n === 0 ? null : A;
    }
  ];
});


/***/ }),

/***/ "467f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var createError = __webpack_require__("2d83");

/**
 * Resolve or reject a Promise based on response status.
 *
 * @param {Function} resolve A function that resolves the promise.
 * @param {Function} reject A function that rejects the promise.
 * @param {object} response The response.
 */
module.exports = function settle(resolve, reject, response) {
  var validateStatus = response.config.validateStatus;
  if (!response.status || !validateStatus || validateStatus(response.status)) {
    resolve(response);
  } else {
    reject(createError(
      'Request failed with status code ' + response.status,
      response.config,
      null,
      response.request,
      response
    ));
  }
};


/***/ }),

/***/ "4840":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var aFunction = __webpack_require__("1c0b");
var wellKnownSymbol = __webpack_require__("b622");

var SPECIES = wellKnownSymbol('species');

// `SpeciesConstructor` abstract operation
// https://tc39.es/ecma262/#sec-speciesconstructor
module.exports = function (O, defaultConstructor) {
  var C = anObject(O).constructor;
  var S;
  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
};


/***/ }),

/***/ "4930":
/***/ (function(module, exports, __webpack_require__) {

var IS_NODE = __webpack_require__("605d");
var V8_VERSION = __webpack_require__("2d00");
var fails = __webpack_require__("d039");

module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  /* global Symbol -- required for testing */
  return !Symbol.sham &&
    // Chrome 38 Symbol has incorrect toString conversion
    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
    (IS_NODE ? V8_VERSION === 38 : V8_VERSION > 37 && V8_VERSION < 41);
});


/***/ }),

/***/ "496f":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NodeView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d7ed");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NodeView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NodeView_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "4a7b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

/**
 * Config-specific merge-function which creates a new config-object
 * by merging two configuration objects together.
 *
 * @param {Object} config1
 * @param {Object} config2
 * @returns {Object} New object resulting from merging config2 to config1
 */
module.exports = function mergeConfig(config1, config2) {
  // eslint-disable-next-line no-param-reassign
  config2 = config2 || {};
  var config = {};

  var valueFromConfig2Keys = ['url', 'method', 'data'];
  var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
  var defaultToConfig2Keys = [
    'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
    'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
    'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
    'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
    'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
  ];
  var directMergeKeys = ['validateStatus'];

  function getMergedValue(target, source) {
    if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
      return utils.merge(target, source);
    } else if (utils.isPlainObject(source)) {
      return utils.merge({}, source);
    } else if (utils.isArray(source)) {
      return source.slice();
    }
    return source;
  }

  function mergeDeepProperties(prop) {
    if (!utils.isUndefined(config2[prop])) {
      config[prop] = getMergedValue(config1[prop], config2[prop]);
    } else if (!utils.isUndefined(config1[prop])) {
      config[prop] = getMergedValue(undefined, config1[prop]);
    }
  }

  utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
    if (!utils.isUndefined(config2[prop])) {
      config[prop] = getMergedValue(undefined, config2[prop]);
    }
  });

  utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);

  utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
    if (!utils.isUndefined(config2[prop])) {
      config[prop] = getMergedValue(undefined, config2[prop]);
    } else if (!utils.isUndefined(config1[prop])) {
      config[prop] = getMergedValue(undefined, config1[prop]);
    }
  });

  utils.forEach(directMergeKeys, function merge(prop) {
    if (prop in config2) {
      config[prop] = getMergedValue(config1[prop], config2[prop]);
    } else if (prop in config1) {
      config[prop] = getMergedValue(undefined, config1[prop]);
    }
  });

  var axiosKeys = valueFromConfig2Keys
    .concat(mergeDeepPropertiesKeys)
    .concat(defaultToConfig2Keys)
    .concat(directMergeKeys);

  var otherKeys = Object
    .keys(config1)
    .concat(Object.keys(config2))
    .filter(function filterAxiosKeys(key) {
      return axiosKeys.indexOf(key) === -1;
    });

  utils.forEach(otherKeys, mergeDeepProperties);

  return config;
};


/***/ }),

/***/ "4d64":
/***/ (function(module, exports, __webpack_require__) {

var toIndexedObject = __webpack_require__("fc6a");
var toLength = __webpack_require__("50c4");
var toAbsoluteIndex = __webpack_require__("23cb");

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare -- NaN check
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare -- NaN check
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.es/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};


/***/ }),

/***/ "4de4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $filter = __webpack_require__("b727").filter;
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');

// `Array.prototype.filter` method
// https://tc39.es/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  filter: function filter(callbackfn /* , thisArg */) {
    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "4df4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var bind = __webpack_require__("0366");
var toObject = __webpack_require__("7b0b");
var callWithSafeIterationClosing = __webpack_require__("9bdd");
var isArrayIteratorMethod = __webpack_require__("e95a");
var toLength = __webpack_require__("50c4");
var createProperty = __webpack_require__("8418");
var getIteratorMethod = __webpack_require__("35a1");

// `Array.from` method implementation
// https://tc39.es/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  var O = toObject(arrayLike);
  var C = typeof this == 'function' ? this : Array;
  var argumentsLength = arguments.length;
  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  var mapping = mapfn !== undefined;
  var iteratorMethod = getIteratorMethod(O);
  var index = 0;
  var length, result, step, iterator, next, value;
  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  // if the target is not iterable or it's an array with the default iterator - use a simple case
  if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
    iterator = iteratorMethod.call(O);
    next = iterator.next;
    result = new C();
    for (;!(step = next.call(iterator)).done; index++) {
      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
      createProperty(result, index, value);
    }
  } else {
    length = toLength(O.length);
    result = new C(length);
    for (;length > index; index++) {
      value = mapping ? mapfn(O[index], index) : O[index];
      createProperty(result, index, value);
    }
  }
  result.length = index;
  return result;
};


/***/ }),

/***/ "50c4":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("a691");

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


/***/ }),

/***/ "5135":
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;

module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),

/***/ "5270":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");
var transformData = __webpack_require__("c401");
var isCancel = __webpack_require__("2e67");
var defaults = __webpack_require__("2444");

/**
 * Throws a `Cancel` if cancellation has been requested.
 */
function throwIfCancellationRequested(config) {
  if (config.cancelToken) {
    config.cancelToken.throwIfRequested();
  }
}

/**
 * Dispatch a request to the server using the configured adapter.
 *
 * @param {object} config The config that is to be used for the request
 * @returns {Promise} The Promise to be fulfilled
 */
module.exports = function dispatchRequest(config) {
  throwIfCancellationRequested(config);

  // Ensure headers exist
  config.headers = config.headers || {};

  // Transform request data
  config.data = transformData(
    config.data,
    config.headers,
    config.transformRequest
  );

  // Flatten headers
  config.headers = utils.merge(
    config.headers.common || {},
    config.headers[config.method] || {},
    config.headers
  );

  utils.forEach(
    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
    function cleanHeaderConfig(method) {
      delete config.headers[method];
    }
  );

  var adapter = config.adapter || defaults.adapter;

  return adapter(config).then(function onAdapterResolution(response) {
    throwIfCancellationRequested(config);

    // Transform response data
    response.data = transformData(
      response.data,
      response.headers,
      config.transformResponse
    );

    return response;
  }, function onAdapterRejection(reason) {
    if (!isCancel(reason)) {
      throwIfCancellationRequested(config);

      // Transform response data
      if (reason && reason.response) {
        reason.response.data = transformData(
          reason.response.data,
          reason.response.headers,
          config.transformResponse
        );
      }
    }

    return Promise.reject(reason);
  });
};


/***/ }),

/***/ "5319":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var anObject = __webpack_require__("825a");
var toLength = __webpack_require__("50c4");
var toInteger = __webpack_require__("a691");
var requireObjectCoercible = __webpack_require__("1d80");
var advanceStringIndex = __webpack_require__("8aa5");
var getSubstitution = __webpack_require__("0cb2");
var regExpExec = __webpack_require__("14c3");

var max = Math.max;
var min = Math.min;

var maybeToString = function (it) {
  return it === undefined ? it : String(it);
};

// @@replace logic
fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';

  return [
    // `String.prototype.replace` method
    // https://tc39.es/ecma262/#sec-string.prototype.replace
    function replace(searchValue, replaceValue) {
      var O = requireObjectCoercible(this);
      var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
      return replacer !== undefined
        ? replacer.call(searchValue, O, replaceValue)
        : nativeReplace.call(String(O), searchValue, replaceValue);
    },
    // `RegExp.prototype[@@replace]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
    function (regexp, replaceValue) {
      if (
        (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
        (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
      ) {
        var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
        if (res.done) return res.value;
      }

      var rx = anObject(regexp);
      var S = String(this);

      var functionalReplace = typeof replaceValue === 'function';
      if (!functionalReplace) replaceValue = String(replaceValue);

      var global = rx.global;
      if (global) {
        var fullUnicode = rx.unicode;
        rx.lastIndex = 0;
      }
      var results = [];
      while (true) {
        var result = regExpExec(rx, S);
        if (result === null) break;

        results.push(result);
        if (!global) break;

        var matchStr = String(result[0]);
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
      }

      var accumulatedResult = '';
      var nextSourcePosition = 0;
      for (var i = 0; i < results.length; i++) {
        result = results[i];

        var matched = String(result[0]);
        var position = max(min(toInteger(result.index), S.length), 0);
        var captures = [];
        // NOTE: This is equivalent to
        //   captures = result.slice(1).map(maybeToString)
        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
        // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
        for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
        var namedCaptures = result.groups;
        if (functionalReplace) {
          var replacerArgs = [matched].concat(captures, position, S);
          if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
          var replacement = String(replaceValue.apply(undefined, replacerArgs));
        } else {
          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
        }
        if (position >= nextSourcePosition) {
          accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
          nextSourcePosition = position + matched.length;
        }
      }
      return accumulatedResult + S.slice(nextSourcePosition);
    }
  ];
});


/***/ }),

/***/ "5692":
/***/ (function(module, exports, __webpack_require__) {

var IS_PURE = __webpack_require__("c430");
var store = __webpack_require__("c6cd");

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.9.1',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});


/***/ }),

/***/ "56ef":
/***/ (function(module, exports, __webpack_require__) {

var getBuiltIn = __webpack_require__("d066");
var getOwnPropertyNamesModule = __webpack_require__("241c");
var getOwnPropertySymbolsModule = __webpack_require__("7418");
var anObject = __webpack_require__("825a");

// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  var keys = getOwnPropertyNamesModule.f(anObject(it));
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};


/***/ }),

/***/ "5948":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var require;var require;!function(e){if(true)module.exports=e();else {}}(function(){return function(){return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return require(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){return i(t[s][1][e]||e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}}()({1:[function(e,t,r){(function(r,n){(function(){"use strict";var i=e("events").EventEmitter,o=e("./store"),s=e("mqtt-packet"),a=e("readable-stream").Writable,c=e("inherits"),u=e("reinterval"),l=e("./validations"),f=e("xtend"),h=e("debug")("mqttjs:client"),p=r?r.nextTick:function(e){setTimeout(e,0)},d=n.setImmediate||function(e){p(e)},g={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},b=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],m={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function y(e,t,r){h("sendPacket :: packet: %O",t),h("sendPacket :: emitting `packetsend`"),e.emit("packetsend",t),h("sendPacket :: writing to stream");var n=s.writeToStream(t,e.stream,e.options);h("sendPacket :: writeToStream result %s",n),!n&&r?(h("sendPacket :: handle events on `drain` once through callback."),e.stream.once("drain",r)):r&&(h("sendPacket :: invoking cb"),r())}function _(e,t,r,n){h("storeAndSend :: store packet with cmd %s to outgoingStore",t.cmd),e.outgoingStore.put(t,function(i){if(i)return r&&r(i);n(),y(e,t,r)})}function w(e){h("nop ::",e)}function v(e,t){var r,n=this;if(!(this instanceof v))return new v(e,t);for(r in this.options=t||{},g)void 0===this.options[r]?this.options[r]=g[r]:this.options[r]=t[r];h("MqttClient :: options.protocol",t.protocol),h("MqttClient :: options.protocolVersion",t.protocolVersion),h("MqttClient :: options.username",t.username),h("MqttClient :: options.keepalive",t.keepalive),h("MqttClient :: options.reconnectPeriod",t.reconnectPeriod),h("MqttClient :: options.rejectUnauthorized",t.rejectUnauthorized),this.options.clientId="string"==typeof t.clientId?t.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),h("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=5===t.protocolVersion&&t.customHandleAcks?t.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=e,this.outgoingStore=t.outgoingStore||new o,this.incomingStore=t.incomingStore||new o,this.queueQoSZero=void 0===t.queueQoSZero||t.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this.nextId=Math.max(1,Math.floor(65535*Math.random())),this.outgoing={},this._firstConnection=!0,this.on("connect",function(){var e=this.queue;h("connect :: sending queued packets"),function t(){var r=e.shift();h("deliver :: entry %o",r);var i;r&&(i=r.packet,h("deliver :: call _sendPacket for %o",i),n._sendPacket(i,function(e){r.cb&&r.cb(e),t()}))}()}),this.on("close",function(){h("close :: connected set to `false`"),this.connected=!1,h("close :: clearing connackTimer"),clearTimeout(this.connackTimer),h("close :: clearing ping timer"),null!==n.pingTimer&&(n.pingTimer.clear(),n.pingTimer=null),h("close :: calling _setupReconnect"),this._setupReconnect()}),i.call(this),h("MqttClient :: setting up stream"),this._setupStream()}c(v,i),v.prototype._setupStream=function(){var e,t=this,r=new a,n=s.parser(this.options),i=null,o=[];function c(){if(o.length)p(u);else{var e=i;i=null,e()}}function u(){h("work :: getting next packet in queue");var e=o.shift();if(e)h("work :: packet pulled from queue"),t._handlePacket(e,c);else{h("work :: no packets in queue");var r=i;i=null,h("work :: done flag is %s",!!r),r&&r()}}if(h("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),h("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),n.on("packet",function(e){h("parser :: on packet push to packets array."),o.push(e)}),r._write=function(e,t,r){i=r,h("writable stream :: parsing buffer"),n.parse(e),u()},h("_setupStream :: pipe stream to writable stream"),this.stream.pipe(r),this.stream.on("error",function(e){h("streamErrorHandler :: error",e.message),b.includes(e.code)?(h("streamErrorHandler :: emitting error"),t.emit("error",e)):w(e)}),this.stream.on("close",function(){var e;h("(%s)stream :: on close",t.options.clientId),(e=t.outgoing)&&(h("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(e).forEach(function(t){e[t].volatile&&"function"==typeof e[t].cb&&(e[t].cb(new Error("Connection closed")),delete e[t])})),h("stream: emit close to MqttClient"),t.emit("close")}),h("_setupStream: sending packet `connect`"),(e=Object.create(this.options)).cmd="connect",y(this,e),n.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return t.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket)y(this,f({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){h("!!connectTimeout hit!! Calling _cleanUp with force `true`"),t._cleanUp(!0)},this.options.connectTimeout)},v.prototype._handlePacket=function(e,t){var r=this.options;if(5===r.protocolVersion&&r.properties&&r.properties.maximumPacketSize&&r.properties.maximumPacketSize<e.length)return this.emit("error",new Error("exceeding packets size "+e.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(h("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",e),e.cmd){case"publish":this._handlePublish(e,t);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(e),t();break;case"pubrel":this._handlePubrel(e,t);break;case"connack":this._handleConnack(e),t();break;case"pingresp":this._handlePingresp(e),t();break;case"disconnect":this._handleDisconnect(e),t()}},v.prototype._checkDisconnecting=function(e){return this.disconnecting&&(e?e(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},v.prototype.publish=function(e,t,r,n){var i;h("publish :: message `%s` to topic `%s`",t,e);var o=this.options;"function"==typeof r&&(n=r,r=null);if(r=f({qos:0,retain:!1,dup:!1},r),this._checkDisconnecting(n))return this;switch(i={cmd:"publish",topic:e,payload:t,qos:r.qos,retain:r.retain,messageId:this._nextId(),dup:r.dup},5===o.protocolVersion&&(i.properties=r.properties,(!o.properties&&i.properties&&i.properties.topicAlias||r.properties&&o.properties&&(r.properties.topicAlias&&o.properties.topicAliasMaximum&&r.properties.topicAlias>o.properties.topicAliasMaximum||!o.properties.topicAliasMaximum&&r.properties.topicAlias))&&delete i.properties.topicAlias),h("publish :: qos",r.qos),r.qos){case 1:case 2:this.outgoing[i.messageId]={volatile:!1,cb:n||w},this._storeProcessing?(h("_storeProcessing enabled"),this._packetIdsDuringStoreProcessing[i.messageId]=!1,this._storePacket(i,void 0,r.cbStorePut)):(h("MqttClient:publish: packet cmd: %s",i.cmd),this._sendPacket(i,void 0,r.cbStorePut));break;default:this._storeProcessing?(h("_storeProcessing enabled"),this._storePacket(i,n,r.cbStorePut)):(h("MqttClient:publish: packet cmd: %s",i.cmd),this._sendPacket(i,n,r.cbStorePut))}return this},v.prototype.subscribe=function(){for(var e,t=new Array(arguments.length),r=0;r<arguments.length;r++)t[r]=arguments[r];var n,i=[],o=t.shift(),s=o.resubscribe,a=t.pop()||w,c=t.pop(),u=this,p=this.options.protocolVersion;if(delete o.resubscribe,"string"==typeof o&&(o=[o]),"function"!=typeof a&&(c=a,a=w),null!==(n=l.validateTopics(o)))return d(a,new Error("Invalid topic "+n)),this;if(this._checkDisconnecting(a))return h("subscribe: discconecting true"),this;var g={qos:0};if(5===p&&(g.nl=!1,g.rap=!1,g.rh=0),c=f(g,c),Array.isArray(o)?o.forEach(function(e){if(h("subscribe: array topic %s",e),!u._resubscribeTopics.hasOwnProperty(e)||u._resubscribeTopics[e].qos<c.qos||s){var t={topic:e,qos:c.qos};5===p&&(t.nl=c.nl,t.rap=c.rap,t.rh=c.rh,t.properties=c.properties),h("subscribe: pushing topic `%s` and qos `%s` to subs list",t.topic,t.qos),i.push(t)}}):Object.keys(o).forEach(function(e){if(h("subscribe: object topic %s",e),!u._resubscribeTopics.hasOwnProperty(e)||u._resubscribeTopics[e].qos<o[e].qos||s){var t={topic:e,qos:o[e].qos};5===p&&(t.nl=o[e].nl,t.rap=o[e].rap,t.rh=o[e].rh,t.properties=c.properties),h("subscribe: pushing `%s` to subs list",t),i.push(t)}}),e={cmd:"subscribe",subscriptions:i,qos:1,retain:!1,dup:!1,messageId:this._nextId()},c.properties&&(e.properties=c.properties),i.length){if(this.options.resubscribe){h("subscribe :: resubscribe true");var b=[];i.forEach(function(e){if(u.options.reconnectPeriod>0){var t={qos:e.qos};5===p&&(t.nl=e.nl||!1,t.rap=e.rap||!1,t.rh=e.rh||0,t.properties=e.properties),u._resubscribeTopics[e.topic]=t,b.push(e.topic)}}),u.messageIdToTopic[e.messageId]=b}return this.outgoing[e.messageId]={volatile:!0,cb:function(e,t){if(!e)for(var r=t.granted,n=0;n<r.length;n+=1)i[n].qos=r[n];a(e,i)}},h("subscribe :: call _sendPacket"),this._sendPacket(e),this}a(null,[])},v.prototype.unsubscribe=function(){for(var e={cmd:"unsubscribe",qos:1,messageId:this._nextId()},t=this,r=new Array(arguments.length),n=0;n<arguments.length;n++)r[n]=arguments[n];var i=r.shift(),o=r.pop()||w,s=r.pop();return"string"==typeof i&&(i=[i]),"function"!=typeof o&&(s=o,o=w),this._checkDisconnecting(o)?this:("string"==typeof i?e.unsubscriptions=[i]:Array.isArray(i)&&(e.unsubscriptions=i),this.options.resubscribe&&e.unsubscriptions.forEach(function(e){delete t._resubscribeTopics[e]}),"object"==typeof s&&s.properties&&(e.properties=s.properties),this.outgoing[e.messageId]={volatile:!0,cb:o},h("unsubscribe: call _sendPacket"),this._sendPacket(e),this)},v.prototype.end=function(e,t,r){var n=this;function i(){h("end :: (%s) :: finish :: calling _cleanUp with force %s",n.options.clientId,e),n._cleanUp(e,()=>{h("end :: finish :: calling process.nextTick on closeStores"),p(function(){h("end :: closeStores: closing incoming and outgoing stores"),n.disconnected=!0,n.incomingStore.close(function(e){n.outgoingStore.close(function(t){if(h("end :: closeStores: emitting end"),n.emit("end"),r){let n=e||t;h("end :: closeStores: invoking callback with args"),r(n)}})}),n._deferredReconnect&&n._deferredReconnect()}.bind(n))},t)}return h("end :: (%s)",this.options.clientId),null!=e&&"boolean"==typeof e||(r=t||w,t=e,e=!1,"object"!=typeof t&&(r=t,t=null,"function"!=typeof r&&(r=w))),"object"!=typeof t&&(r=t,t=null),h("end :: cb? %s",!!r),r=r||w,this.disconnecting?(r(),this):(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?(h("end :: (%s) :: calling finish in 10ms once outgoing is empty",n.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,i,10))):(h("end :: (%s) :: immediately calling finish",n.options.clientId),i()),this)},v.prototype.removeOutgoingMessage=function(e){var t=this.outgoing[e]?this.outgoing[e].cb:null;return delete this.outgoing[e],this.outgoingStore.del({messageId:e},function(){t(new Error("Message removed"))}),this},v.prototype.reconnect=function(e){h("client reconnect");var t=this,r=function(){e?(t.options.incomingStore=e.incomingStore,t.options.outgoingStore=e.outgoingStore):(t.options.incomingStore=null,t.options.outgoingStore=null),t.incomingStore=t.options.incomingStore||new o,t.outgoingStore=t.options.outgoingStore||new o,t.disconnecting=!1,t.disconnected=!1,t._deferredReconnect=null,t._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this},v.prototype._reconnect=function(){h("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),h("client already connected. disconnecting first.")):(h("_reconnect: calling _setupStream"),this._setupStream())},v.prototype._setupReconnect=function(){var e=this;!e.disconnecting&&!e.reconnectTimer&&e.options.reconnectPeriod>0?(this.reconnecting||(h("_setupReconnect :: emit `offline` state"),this.emit("offline"),h("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),h("_setupReconnect :: setting reconnectTimer for %d ms",e.options.reconnectPeriod),e.reconnectTimer=setInterval(function(){h("reconnectTimer :: reconnect triggered!"),e._reconnect()},e.options.reconnectPeriod)):h("_setupReconnect :: doing nothing...")},v.prototype._clearReconnect=function(){h("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},v.prototype._cleanUp=function(e,t){var r,n=arguments[2];if(t&&(h("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",t)),h("_cleanUp :: forced? %s",e),e)0===this.options.reconnectPeriod&&this.options.clean&&(r=this.outgoing)&&(h("flush: queue exists? %b",!!r),Object.keys(r).forEach(function(e){"function"==typeof r[e].cb&&(r[e].cb(new Error("Connection closed")),delete r[e])})),h("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{var i=f({cmd:"disconnect"},n);h("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(i,d.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(h("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(h("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),t&&!this.connected&&(h("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",t),t())},v.prototype._sendPacket=function(e,t,r){if(h("_sendPacket :: (%s) ::  start",this.options.clientId),r=r||w,!this.connected)return h("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(e,t,r);switch(this._shiftPingInterval(),e.cmd){case"publish":break;case"pubrel":return void _(this,e,t,r);default:return void y(this,e,t)}switch(e.qos){case 2:case 1:_(this,e,t,r);break;case 0:default:y(this,e,t)}h("_sendPacket :: (%s) ::  end",this.options.clientId)},v.prototype._storePacket=function(e,t,r){h("_storePacket :: packet: %o",e),h("_storePacket :: cb? %s",!!t),r=r||w,0===(e.qos||0)&&this.queueQoSZero||"publish"!==e.cmd?this.queue.push({packet:e,cb:t}):e.qos>0?(t=this.outgoing[e.messageId]?this.outgoing[e.messageId].cb:null,this.outgoingStore.put(e,function(e){if(e)return t&&t(e);r()})):t&&t(new Error("No connection to broker"))},v.prototype._setupPingTimer=function(){h("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);var e=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=u(function(){e._checkPing()},1e3*this.options.keepalive))},v.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},v.prototype._checkPing=function(){h("_checkPing :: checking ping..."),this.pingResp?(h("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(h("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},v.prototype._handlePingresp=function(){this.pingResp=!0},v.prototype._handleConnack=function(e){h("_handleConnack");var t=this.options,r=5===t.protocolVersion?e.reasonCode:e.returnCode;if(clearTimeout(this.connackTimer),e.properties&&(e.properties.topicAliasMaximum&&(t.properties||(t.properties={}),t.properties.topicAliasMaximum=e.properties.topicAliasMaximum),e.properties.serverKeepAlive&&t.keepalive&&(t.keepalive=e.properties.serverKeepAlive,this._shiftPingInterval()),e.properties.maximumPacketSize&&(t.properties||(t.properties={}),t.properties.maximumPacketSize=e.properties.maximumPacketSize)),0===r)this.reconnecting=!1,this._onConnect(e);else if(r>0){var n=new Error("Connection refused: "+m[r]);n.code=r,this.emit("error",n)}},v.prototype._handlePublish=function(e,t){h("_handlePublish: packet %o",e),t=void 0!==t?t:w;var r=e.topic.toString(),n=e.payload,i=e.qos,o=e.messageId,s=this,a=this.options,c=[0,16,128,131,135,144,145,151,153];switch(h("_handlePublish: qos %d",i),i){case 2:a.customHandleAcks(r,n,e,function(r,n){return r instanceof Error||(n=r,r=null),r?s.emit("error",r):-1===c.indexOf(n)?s.emit("error",new Error("Wrong reason code for pubrec")):void(n?s._sendPacket({cmd:"pubrec",messageId:o,reasonCode:n},t):s.incomingStore.put(e,function(){s._sendPacket({cmd:"pubrec",messageId:o},t)}))});break;case 1:a.customHandleAcks(r,n,e,function(i,a){return i instanceof Error||(a=i,i=null),i?s.emit("error",i):-1===c.indexOf(a)?s.emit("error",new Error("Wrong reason code for puback")):(a||s.emit("message",r,n,e),void s.handleMessage(e,function(e){if(e)return t&&t(e);s._sendPacket({cmd:"puback",messageId:o,reasonCode:a},t)}))});break;case 0:this.emit("message",r,n,e),this.handleMessage(e,t);break;default:h("_handlePublish: unknown QoS. Doing nothing.")}},v.prototype.handleMessage=function(e,t){t()},v.prototype._handleAck=function(e){var t,r=e.messageId,n=e.cmd,i=null,o=this.outgoing[r]?this.outgoing[r].cb:null,s=this;if(o){switch(h("_handleAck :: packet type",n),n){case"pubcomp":case"puback":var a=e.reasonCode;a&&a>0&&16!==a&&((t=new Error("Publish error: "+m[a])).code=a,o(t,e)),delete this.outgoing[r],this.outgoingStore.del(e,o);break;case"pubrec":i={cmd:"pubrel",qos:2,messageId:r};var c=e.reasonCode;c&&c>0&&16!==c?((t=new Error("Publish error: "+m[c])).code=c,o(t,e)):this._sendPacket(i);break;case"suback":delete this.outgoing[r];for(var u=0;u<e.granted.length;u++)if(0!=(128&e.granted[u])){var l=this.messageIdToTopic[r];l&&l.forEach(function(e){delete s._resubscribeTopics[e]})}o(null,e);break;case"unsuback":delete this.outgoing[r],o(null);break;default:s.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&0===Object.keys(this.outgoing).length&&this.emit("outgoingEmpty")}else h("_handleAck :: Server sent an ack in error. Ignoring.")},v.prototype._handlePubrel=function(e,t){h("handling pubrel packet"),t=void 0!==t?t:w;var r=this,n={cmd:"pubcomp",messageId:e.messageId};r.incomingStore.get(e,function(e,i){e?r._sendPacket(n,t):(r.emit("message",i.topic,i.payload,i),r.handleMessage(i,function(e){if(e)return t(e);r.incomingStore.del(i,w),r._sendPacket(n,t)}))})},v.prototype._handleDisconnect=function(e){this.emit("disconnect",e)},v.prototype._nextId=function(){var e=this.nextId++;return 65536===this.nextId&&(this.nextId=1),e},v.prototype.getLastMessageId=function(){return 1===this.nextId?65535:this.nextId-1},v.prototype._resubscribe=function(e){h("_resubscribe");var t=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||5===this.options.protocolVersion&&!e.sessionPresent)&&t.length>0)if(this.options.resubscribe)if(5===this.options.protocolVersion){h("_resubscribe: protocolVersion 5");for(var r=0;r<t.length;r++){var n={};n[t[r]]=this._resubscribeTopics[t[r]],n.resubscribe=!0,this.subscribe(n,{properties:n[t[r]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},v.prototype._onConnect=function(e){if(this.disconnected)this.emit("connect",e);else{var t=this;this._setupPingTimer(),this._resubscribe(e),this.connected=!0,function r(){var n=t.outgoingStore.createStream();function i(){t._storeProcessing=!1,t._packetIdsDuringStoreProcessing={}}function o(){n.destroy(),n=null,i()}t.once("close",o),n.on("error",function(e){i(),t.removeListener("close",o),t.emit("error",e)}),n.on("end",function(){var n=!0;for(var s in t._packetIdsDuringStoreProcessing)if(!t._packetIdsDuringStoreProcessing[s]){n=!1;break}n?(i(),t.removeListener("close",o),t.emit("connect",e)):r()}),function e(){if(n){t._storeProcessing=!0;var r,i=n.read(1);i?t._packetIdsDuringStoreProcessing[i.messageId]?e():t.disconnecting||t.reconnectTimer?n.destroy&&n.destroy():(r=t.outgoing[i.messageId]?t.outgoing[i.messageId].cb:null,t.outgoing[i.messageId]={volatile:!1,cb:function(t,n){r&&r(t,n),e()}},t._packetIdsDuringStoreProcessing[i.messageId]=!0,t._sendPacket(i)):n.once("readable",e)}}()}()}},t.exports=v}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./store":7,"./validations":8,_process:32,debug:15,events:19,inherits:21,"mqtt-packet":24,"readable-stream":51,reinterval:52,xtend:61}],2:[function(e,t,r){(function(r){(function(){"use strict";var n,i,o,s=e("readable-stream").Transform,a=e("duplexify"),c=!1;t.exports=function(e,t){if(t.hostname=t.hostname||t.host,!t.hostname)throw new Error("Could not determine host. Specify host manually.");var u="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(t);var l=function(e,t){var r="alis"===e.protocol?"wss":"ws",n=r+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(n=r+"://"+e.hostname+":"+e.port+e.path),"function"==typeof e.transformWsUrl&&(n=e.transformWsUrl(n,e,t)),n}(t,e);return(n=t.my).connectSocket({url:l,protocols:u}),i=function(){var e=new s;return e._write=function(e,t,r){n.sendSocketMessage({data:e.buffer,success:function(){r()},fail:function(){r(new Error)}})},e._flush=function(e){n.closeSocket({success:function(){e()}})},e}(),o=a.obj(),c||(c=!0,n.onSocketOpen(function(){o.setReadable(i),o.setWritable(i),o.emit("connect")}),n.onSocketMessage(function(e){if("string"==typeof e.data){var t=r.from(e.data,"base64");i.push(t)}else{var n=new FileReader;n.addEventListener("load",function(){var e=n.result;e=e instanceof ArrayBuffer?r.from(e):r.from(e,"utf8"),i.push(e)}),n.readAsArrayBuffer(e.data)}}),n.onSocketClose(function(){o.end(),o.destroy()}),n.onSocketError(function(e){o.destroy(e)})),o}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:14,duplexify:17,"readable-stream":51}],3:[function(e,t,r){"use strict";var n=e("net"),i=e("debug")("mqttjs:tcp");t.exports=function(e,t){var r,o;return t.port=t.port||1883,t.hostname=t.hostname||t.host||"localhost",r=t.port,o=t.hostname,i("port %d and host %s",r,o),n.createConnection(r,o)}},{debug:15,net:13}],4:[function(e,t,r){"use strict";var n=e("tls"),i=e("debug")("mqttjs:tls");t.exports=function(e,t){var r;function o(n){t.rejectUnauthorized&&e.emit("error",n),r.end()}return t.port=t.port||8883,t.host=t.hostname||t.host||"localhost",t.servername=t.host,t.rejectUnauthorized=!1!==t.rejectUnauthorized,delete t.path,i("port %d host %s rejectUnauthorized %b",t.port,t.host,t.rejectUnauthorized),(r=n.connect(t)).on("secureConnect",function(){t.rejectUnauthorized&&!r.authorized?r.emit("error",new Error("TLS not authorized")):r.removeListener("error",o)}),r.on("error",o),r}},{debug:15,tls:13}],5:[function(e,t,r){(function(r,n){(function(){"use strict";const i=e("ws"),o=e("debug")("mqttjs:ws"),s=e("duplexify"),a=e("readable-stream").Transform;let c=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];const u=void 0!==r&&"browser"===r.title||"function"==typeof __webpack_require__;function l(e,t){let r=e.protocol+"://"+e.hostname+":"+e.port+e.path;return"function"==typeof e.transformWsUrl&&(r=e.transformWsUrl(r,e,t)),r}function f(e){let t=e;return e.hostname||(t.hostname="localhost"),e.port||("wss"===e.protocol?t.port=443:t.port=80),e.path||(t.path="/"),e.wsOptions||(t.wsOptions={}),u||"wss"!==e.protocol||c.forEach(function(r){e.hasOwnProperty(r)&&!e.wsOptions.hasOwnProperty(r)&&(t.wsOptions[r]=e[r])}),t}t.exports=u?function(e,t){let r;o("browserStreamBuilder");const i=function(e){let t=f(e);if(t.hostname||(t.hostname=t.host),!t.hostname){if("undefined"==typeof document)throw new Error("Could not determine host. Specify host manually.");const e=new URL(document.URL);t.hostname=e.hostname,t.port||(t.port=e.port)}return void 0===t.objectMode&&(t.objectMode=!(!0===t.binary||void 0===t.binary)),t}(t).browserBufferSize||524288,c=t.browserBufferTimeout||1e3,u=!t.objectMode;let h=function(e,t){const r="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";let n=l(t,e),i=new WebSocket(n,[r]);return i.binaryType="arraybuffer",i}(e,t),p=function(e,t,r){let n=new a({objectModeMode:e.objectMode});return n._write=t,n._flush=r,n}(t,function e(t,r,o){h.bufferedAmount>i&&setTimeout(e,c,t,r,o),u&&"string"==typeof t&&(t=n.from(t,"utf8"));try{h.send(t)}catch(e){return o(e)}o()},function(e){h.close(),e()});t.objectMode||(p._writev=_),p.on("close",()=>{h.close()});const d=void 0!==h.addEventListener;function g(){r.setReadable(p),r.setWritable(p),r.emit("connect")}function b(){r.end(),r.destroy()}function m(e){r.destroy(e)}function y(e){let t=e.data;t=t instanceof ArrayBuffer?n.from(t):n.from(t,"utf8"),p.push(t)}function _(e,t){const r=new Array(e.length);for(let t=0;t<e.length;t++)"string"==typeof e[t].chunk?r[t]=n.from(e[t],"utf8"):r[t]=e[t].chunk;this._write(n.concat(r),"binary",t)}return h.readyState===h.OPEN?r=p:(r=r=s(void 0,void 0,t),t.objectMode||(r._writev=_),d?h.addEventListener("open",g):h.onopen=g),r.socket=h,d?(h.addEventListener("close",b),h.addEventListener("error",m),h.addEventListener("message",y)):(h.onclose=b,h.onerror=m,h.onmessage=y),r}:function(e,t){o("streamBuilder");let r=f(t);const n=l(r,e);let s=function(e,t,r){o("createWebSocket"),o("protocol: "+r.protocolId+" "+r.protocolVersion);const n="MQIsdp"===r.protocolId&&3===r.protocolVersion?"mqttv3.1":"mqtt";return o("creating new Websocket for url: "+t+" and protocol: "+n),new i(t,[n],r.wsOptions)}(0,n,r),a=i.createWebSocketStream(s,r.wsOptions);return a.url=n,s.on("close",()=>{a.destroy()}),a}}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:32,buffer:14,debug:15,duplexify:17,"readable-stream":51,ws:60}],6:[function(e,t,r){(function(r){(function(){"use strict";var n,i,o,s=e("readable-stream").Transform,a=e("duplexify");t.exports=function(e,t){if(t.hostname=t.hostname||t.host,!t.hostname)throw new Error("Could not determine host. Specify host manually.");var c="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(t);var u=function(e,t){var r="wxs"===e.protocol?"wss":"ws",n=r+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(n=r+"://"+e.hostname+":"+e.port+e.path),"function"==typeof e.transformWsUrl&&(n=e.transformWsUrl(n,e,t)),n}(t,e);n=wx.connectSocket({url:u,protocols:[c]}),i=function(){var e=new s;return e._write=function(e,t,r){n.send({data:e.buffer,success:function(){r()},fail:function(e){r(new Error(e))}})},e._flush=function(e){n.close({success:function(){e()}})},e}(),(o=a.obj())._destroy=function(e,t){n.close({success:function(){t&&t(e)}})};var l=o.destroy;return o.destroy=function(){o.destroy=l;var e=this;setTimeout(function(){n.close({fail:function(){e._destroy(new Error)}})},0)}.bind(o),n.onOpen(function(){o.setReadable(i),o.setWritable(i),o.emit("connect")}),n.onMessage(function(e){var t=e.data;t=t instanceof ArrayBuffer?r.from(t):r.from(t,"utf8"),i.push(t)}),n.onClose(function(){o.end(),o.destroy()}),n.onError(function(e){o.destroy(new Error(e.errMsg))}),o}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:14,duplexify:17,"readable-stream":51}],7:[function(e,t,r){"use strict";var n=e("xtend"),i=e("readable-stream").Readable,o={objectMode:!0},s={clean:!0};function a(e){if(!(this instanceof a))return new a(e);this.options=e||{},this.options=n(s,e),this._inflights=new Map}a.prototype.put=function(e,t){return this._inflights.set(e.messageId,e),t&&t(),this},a.prototype.createStream=function(){var e=new i(o),t=!1,r=[],n=0;return this._inflights.forEach(function(e,t){r.push(e)}),e._read=function(){!t&&n<r.length?this.push(r[n++]):this.push(null)},e.destroy=function(){if(!t){var e=this;t=!0,setTimeout(function(){e.emit("close")},0)}},e},a.prototype.del=function(e,t){return(e=this._inflights.get(e.messageId))?(this._inflights.delete(e.messageId),t(null,e)):t&&t(new Error("missing packet")),this},a.prototype.get=function(e,t){return(e=this._inflights.get(e.messageId))?t(null,e):t&&t(new Error("missing packet")),this},a.prototype.close=function(e){this.options.clean&&(this._inflights=null),e&&e()},t.exports=a},{"readable-stream":51,xtend:61}],8:[function(e,t,r){"use strict";function n(e){for(var t=e.split("/"),r=0;r<t.length;r++)if("+"!==t[r]){if("#"===t[r])return r===t.length-1;if(-1!==t[r].indexOf("+")||-1!==t[r].indexOf("#"))return!1}return!0}t.exports={validateTopics:function(e){if(0===e.length)return"empty_topic_list";for(var t=0;t<e.length;t++)if(!n(e[t]))return e[t];return null}}},{}],9:[function(e,t,r){(function(r){(function(){"use strict";var n=e("../client"),i=e("../store"),o=e("url"),s=e("xtend"),a=e("debug")("mqttjs"),c={};function u(e,t){if(a("connecting to an MQTT broker..."),"object"!=typeof e||t||(t=e,e=null),t=t||{},e){var r=o.parse(e,!0);if(null!=r.port&&(r.port=Number(r.port)),null===(t=s(r,t)).protocol)throw new Error("Missing protocol");t.protocol=t.protocol.replace(/:$/,"")}if(function(e){var t;e.auth&&((t=e.auth.match(/^(.+):(.+)$/))?(e.username=t[1],e.password=t[2]):e.username=e.auth)}(t),t.query&&"string"==typeof t.query.clientId&&(t.clientId=t.query.clientId),t.cert&&t.key){if(!t.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs","alis"].indexOf(t.protocol))switch(t.protocol){case"mqtt":t.protocol="mqtts";break;case"ws":t.protocol="wss";break;case"wx":t.protocol="wxs";break;case"ali":t.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+t.protocol+'"!')}}if(!c[t.protocol]){var i=-1!==["mqtts","wss"].indexOf(t.protocol);t.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter(function(e,t){return(!i||t%2!=0)&&"function"==typeof c[e]})[0]}if(!1===t.clean&&!t.clientId)throw new Error("Missing clientId for unclean clients");t.protocol&&(t.defaultProtocol=t.protocol);var u=new n(function(e){return t.servers&&(e._reconnectCount&&e._reconnectCount!==t.servers.length||(e._reconnectCount=0),t.host=t.servers[e._reconnectCount].host,t.port=t.servers[e._reconnectCount].port,t.protocol=t.servers[e._reconnectCount].protocol?t.servers[e._reconnectCount].protocol:t.defaultProtocol,t.hostname=t.host,e._reconnectCount++),a("calling streambuilder for",t.protocol),c[t.protocol](e,t)},t);return u.on("error",function(){}),u}void 0!==r&&"browser"!==r.title||"function"!=typeof __webpack_require__?(c.mqtt=e("./tcp"),c.tcp=e("./tcp"),c.ssl=e("./tls"),c.tls=e("./tls"),c.mqtts=e("./tls")):(c.wx=e("./wx"),c.wxs=e("./wx"),c.ali=e("./ali"),c.alis=e("./ali")),c.ws=e("./ws"),c.wss=e("./ws"),t.exports=u,t.exports.connect=u,t.exports.MqttClient=n,t.exports.Store=i}).call(this)}).call(this,e("_process"))},{"../client":1,"../store":7,"./ali":2,"./tcp":3,"./tls":4,"./ws":5,"./wx":6,_process:32,debug:15,url:56,xtend:61}],10:[function(e,t,r){"use strict";r.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=u(e),s=n[0],a=n[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(l(e,s,s+16383>a?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],11:[function(e,t,r){"use strict";const{Buffer:n}=e("buffer"),i=Symbol.for("BufferList");function o(e){if(!(this instanceof o))return new o(e);o._init.call(this,e)}o._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},o.prototype._new=function(e){return new o(e)},o.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let r=0;r<this._bufs.length;r++){const n=t+this._bufs[r].length;if(e<n||r===this._bufs.length-1)return[r,e-t];t=n}},o.prototype._reverseOffset=function(e){const t=e[0];let r=e[1];for(let e=0;e<t;e++)r+=this._bufs[e].length;return r},o.prototype.get=function(e){if(e>this.length||e<0)return;const t=this._offset(e);return this._bufs[t[0]][t[1]]},o.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},o.prototype.copy=function(e,t,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return e||n.alloc(0);if(i<=0)return e||n.alloc(0);const o=!!e,s=this._offset(r),a=i-r;let c=a,u=o&&t||0,l=s[1];if(0===r&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,u),u+=this._bufs[t].length;return e}if(c<=this._bufs[s[0]].length-l)return o?this._bufs[s[0]].copy(e,t,l,l+c):this._bufs[s[0]].slice(l,l+c);o||(e=n.allocUnsafe(a));for(let t=s[0];t<this._bufs.length;t++){const r=this._bufs[t].length-l;if(!(c>r)){this._bufs[t].copy(e,u,l,l+c),u+=r;break}this._bufs[t].copy(e,u,l),u+=r,c-=r,l&&(l=0)}return e.length>u?e.slice(0,u):e},o.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();const r=this._offset(e),n=this._offset(t),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},o.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},o.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},o.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(n.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(n.from(e));return this},o.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},o.prototype.indexOf=function(e,t,r){if(void 0===r&&"string"==typeof t&&(r=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=n.from([e]):"string"==typeof e?e=n.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=n.from(e.buffer,e.byteOffset,e.byteLength):n.isBuffer(e)||(e=n.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;const i=this._offset(t);let o=i[0],s=i[1];for(;o<this._bufs.length;o++){const t=this._bufs[o];for(;s<t.length;){if(t.length-s>=e.length){const r=t.indexOf(e,s);if(-1!==r)return this._reverseOffset([o,r]);s=t.length-e.length+1}else{const t=this._reverseOffset([o,s]);if(this._match(t,e))return t;s++}}s=0}return-1},o.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0},function(){const e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const t in e)!function(t){o.prototype[t]=null===e[t]?function(e,r){return this.slice(e,e+r)[t](0,r)}:function(r=0){return this.slice(r,r+e[t])[t](0)}}(t)}(),o.prototype._isBufferList=function(e){return e instanceof o||o.isBufferList(e)},o.isBufferList=function(e){return null!=e&&e[i]},t.exports=o},{buffer:14}],12:[function(e,t,r){"use strict";const n=e("readable-stream").Duplex,i=e("inherits"),o=e("./BufferList");function s(e){if(!(this instanceof s))return new s(e);if("function"==typeof e){this._callback=e;const t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",function(e){e.on("error",t)}),this.on("unpipe",function(e){e.removeListener("error",t)}),e=null}o._init.call(this,e),n.call(this)}i(s,n),Object.assign(s.prototype,o.prototype),s.prototype._new=function(e){return new s(e)},s.prototype._write=function(e,t,r){this._appendBuffer(e),"function"==typeof r&&r()},s.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},s.prototype.end=function(e){n.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},s.prototype._isBufferList=function(e){return e instanceof s||e instanceof o||s.isBufferList(e)},s.isBufferList=o.isBufferList,t.exports=s,t.exports.BufferListStream=s,t.exports.BufferList=o},{"./BufferList":11,inherits:21,"readable-stream":51}],13:[function(e,t,r){},{}],14:[function(e,t,r){(function(t){(function(){"use strict";var t=e("base64-js"),n=e("ieee754");r.Buffer=s,r.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return a(e,t,r)}function a(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=o(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=s.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);var i=function(e){if(s.isBuffer(e)){var t=0|f(e.length),r=o(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(void 0!==e.length)return"number"!=typeof e.length||D(e.length)?o(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|f(e))}function l(e){for(var t=e.length<0?0:0|f(e.length),r=o(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(i)return n?-1:N(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function d(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),D(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){for(var f=!0,h=0;h<c;h++)if(u(e,o+h)!==u(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(D(a))return s;e[r+s]=a}return s}function m(e,t,r,n){return j(N(t,e.length-r),e,r,n)}function y(e,t,r,n){return j(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return y(e,t,r,n)}function w(e,t,r,n){return j(U(t),e,r,n)}function v(e,t,r,n){return j(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,c,u=e[i],l=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}r.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,r){return a(e,t,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(q(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s.prototype.compare=function(e,t,r,n,i){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,c=Math.min(o,a),u=this.slice(n,i),l=e.slice(t,r),f=0;f<c;++f)if(u[f]!==l[f]){o=u[f],a=l[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return d(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return d(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return m(this,e,t,r);case"ascii":return y(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function I(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function T(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=B(e[o]);return i}function A(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function x(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,i,o){return t=+t,r>>>=0,o||x(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function M(e,t,r,i,o){return t=+t,r>>>=0,o||x(e,0,r,8),n.write(e,t,r,i,52,8),r+8}s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||O(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||O(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=s.isBuffer(e)?e:s.from(e,n),c=a.length;if(0===c)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=a[o%c]}return this};var L=/[^+/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function D(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":10,buffer:14,ieee754:20}],15:[function(e,t,r){(function(n){(function(){r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&"%c"===e&&(i=++n)}),e.splice(i,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")}catch(e){}!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG);return e},r.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage=function(){try{return localStorage}catch(e){}}(),r.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(r);const{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))},{"./common":16,_process:32}],16:[function(e,t,r){t.exports=function(t){function r(e){let t,i=null;function o(...e){if(!o.enabled)return;const n=o,i=Number(new Date),s=i-(t||i);n.diff=s,n.prev=t,n.curr=i,t=i,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if("%%"===t)return"%";a++;const o=r.formatters[i];if("function"==typeof o){const r=e[a];t=o.call(n,r),e.splice(a,1),a--}return t}),r.formatArgs.call(n,e),(n.log||r.log).apply(n,e)}return o.namespace=e,o.useColors=r.useColors(),o.color=r.selectColor(e),o.extend=n,o.destroy=r.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===i?r.enabled(e):i,set:e=>{i=e}}),"function"==typeof r.init&&r.init(o),o}function n(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){const e=[...r.names.map(i),...r.skips.map(i).map(e=>"-"+e)].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(e=>{r[e]=t[e]}),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}},{ms:29}],17:[function(e,t,r){(function(r,n){(function(){var i=e("readable-stream"),o=e("end-of-stream"),s=e("inherits"),a=e("stream-shift"),c=n.from&&n.from!==Uint8Array.from?n.from([0]):new n([0]),u=function(e,t){e._corked?e.once("uncork",t):t()},l=function(e,t){return function(r){r?function(e,t){e._autoDestroy&&e.destroy(t)}(e,"premature close"===r.message?null:r):t&&!e._ended&&e.end()}},f=function(){},h=function(e,t,r){if(!(this instanceof h))return new h(e,t,r);i.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||!1!==r.autoDestroy,this._forwardDestroy=!r||!1!==r.destroy,this._forwardEnd=!r||!1!==r.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};s(h,i.Duplex),h.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new h(e,t,r)},h.prototype.cork=function(){1==++this._corked&&this.emit("cork")},h.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},h.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)e&&e.destroy&&e.destroy();else if(null!==e&&!1!==e){var t=this,n=o(e,{writable:!0,readable:!1},l(this,this._forwardEnd)),i=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&r.nextTick(i),this._writable=e,this._writable.on("drain",i),this._unwrite=function(){t._writable.removeListener("drain",i),n()},this.uncork()}else this.end()},h.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)e&&e.destroy&&e.destroy();else{if(null===e||!1===e)return this.push(null),void this.resume();var t,r=this,n=o(e,{writable:!1,readable:!0},l(this)),s=function(){r._forward()},a=function(){r.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:(t=e,new i.Readable({objectMode:!0,highWaterMark:16}).wrap(t)),this._readable2.on("readable",s),this._readable2.on("end",a),this._unread=function(){r._readable2.removeListener("readable",s),r._readable2.removeListener("end",a),n()},this._forward()}},h.prototype._read=function(){this._drained=!0,this._forward()},h.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var e;for(this._forwarding=!0;this._drained&&null!==(e=a(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},h.prototype.destroy=function(e,t){if(t||(t=f),this.destroyed)return t(null);this.destroyed=!0;var n=this;r.nextTick(function(){n._destroy(e),t(null)})},h.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},h.prototype._write=function(e,t,r){if(!this.destroyed)return this._corked?u(this,this._write.bind(this,e,t,r)):e===c?this._finish(r):this._writable?void(!1===this._writable.write(e)?this._ondrain=r:this.destroyed||r()):r()},h.prototype._finish=function(e){var t=this;this.emit("preend"),u(this,function(){var r,n;r=t._forwardEnd&&t._writable,n=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),u(t,e)},r?r._writableState&&r._writableState.finished?n():r._writableState?r.end(n):(r.end(),n()):n()})},h.prototype.end=function(e,t,r){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(c),i.Writable.prototype.end.call(this,r))},t.exports=h}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:32,buffer:14,"end-of-stream":18,inherits:21,"readable-stream":51,"stream-shift":54}],18:[function(e,t,r){(function(r){(function(){var n=e("once"),i=function(){},o=function(e,t,s){if("function"==typeof t)return o(e,null,t);t||(t={}),s=n(s||i);var a=e._writableState,c=e._readableState,u=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,f=!1,h=function(){e.writable||p()},p=function(){l=!1,u||s.call(e)},d=function(){u=!1,l||s.call(e)},g=function(t){s.call(e,t?new Error("exited with error code: "+t):null)},b=function(t){s.call(e,t)},m=function(){r.nextTick(y)},y=function(){if(!f)return(!u||c&&c.ended&&!c.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:s.call(e,new Error("premature close"))},_=function(){e.req.on("finish",p)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?l&&!a&&(e.on("end",h),e.on("close",h)):(e.on("complete",p),e.on("abort",m),e.req?_():e.on("request",_)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",g),e.on("end",d),e.on("finish",p),!1!==t.error&&e.on("error",b),e.on("close",m),function(){f=!0,e.removeListener("complete",p),e.removeListener("abort",m),e.removeListener("request",_),e.req&&e.req.removeListener("finish",p),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("exit",g),e.removeListener("end",d),e.removeListener("error",b),e.removeListener("close",m)}};t.exports=o}).call(this)}).call(this,e("_process"))},{_process:32,once:30}],19:[function(e,t,r){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var a,c=10;try{var u={};Object.defineProperty&&Object.defineProperty(u,"x",{value:0}),a=0===u.x}catch(e){a=!1}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,r,i){var o,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]):(s=e._events=n(null),e._eventsCount=0),a){if("function"==typeof a?a=s[t]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),!a.warned&&(o=l(e))&&o>0&&a.length>o){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",c.name,c.message)}}else a=s[t]=r,++e._eventsCount;return e}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=o.call(h,n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(!n)return[];var i=n[t];return i?"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):b(i,i.length):[]}function g(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function b(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}a?Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');c=e}}):s.defaultMaxListeners=c,s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){var t,r,n,i,o,s,a="error"===e;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(a){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var c=new Error('Unhandled "error" event. ('+t+")");throw c.context=t,c}if(!(r=s[e]))return!1;var u="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=b(e,n),o=0;o<n;++o)i[o].call(r)}(r,u,this);break;case 2:!function(e,t,r,n){if(t)e.call(r,n);else for(var i=e.length,o=b(e,i),s=0;s<i;++s)o[s].call(r,n)}(r,u,this,arguments[1]);break;case 3:!function(e,t,r,n,i){if(t)e.call(r,n,i);else for(var o=e.length,s=b(e,o),a=0;a<o;++a)s[a].call(r,n,i)}(r,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,r,n,i,o){if(t)e.call(r,n,i,o);else for(var s=e.length,a=b(e,s),c=0;c<s;++c)a[c].call(r,n,i,o)}(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];!function(e,t,r,n){if(t)e.apply(r,n);else for(var i=e.length,o=b(e,i),s=0;s<i;++s)o[s].apply(r,n)}(r,u,this,i)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,i,o,s,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=n(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n<i;r+=1,n+=1)e[r]=e[n];e.pop()}(r,o),1===r.length&&(i[e]=r[0]),i.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.removeAllListeners=function(e){var t,r,o;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=n(null):delete r[e]),this;if(0===arguments.length){var s,a=i(r);for(o=0;o<a.length;++o)"removeListener"!==(s=a[o])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],20:[function(e,t,r){r.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[r+p]=255&s,p+=d,s/=256,u-=8);e[r+p-d]|=128*g}},{}],21:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],22:[function(e,t,r){(function(e){(function(){const r=t.exports;r.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},r.codes={};for(const e in r.types){const t=r.types[e];r.codes[t]=e}r.CMD_SHIFT=4,r.CMD_MASK=240,r.DUP_MASK=8,r.QOS_MASK=3,r.QOS_SHIFT=1,r.RETAIN_MASK=1,r.VARBYTEINT_MASK=127,r.VARBYTEINT_FIN_MASK=128,r.VARBYTEINT_MAX=268435455,r.SESSIONPRESENT_MASK=1,r.SESSIONPRESENT_HEADER=e.from([r.SESSIONPRESENT_MASK]),r.CONNACK_HEADER=e.from([r.codes.connack<<r.CMD_SHIFT]),r.USERNAME_MASK=128,r.PASSWORD_MASK=64,r.WILL_RETAIN_MASK=32,r.WILL_QOS_MASK=24,r.WILL_QOS_SHIFT=3,r.WILL_FLAG_MASK=4,r.CLEAN_SESSION_MASK=2,r.CONNECT_HEADER=e.from([r.codes.connect<<r.CMD_SHIFT]),r.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},r.propertiesCodes={};for(const e in r.properties){const t=r.properties[e];r.propertiesCodes[t]=e}function n(t){return[0,1,2].map(n=>[0,1].map(i=>[0,1].map(o=>{const s=e.alloc(1);return s.writeUInt8(r.codes[t]<<r.CMD_SHIFT|(i?r.DUP_MASK:0)|n<<r.QOS_SHIFT|o,0,!0),s})))}r.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},r.PUBLISH_HEADER=n("publish"),r.SUBSCRIBE_HEADER=n("subscribe"),r.SUBSCRIBE_OPTIONS_QOS_MASK=3,r.SUBSCRIBE_OPTIONS_NL_MASK=1,r.SUBSCRIBE_OPTIONS_NL_SHIFT=2,r.SUBSCRIBE_OPTIONS_RAP_MASK=1,r.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,r.SUBSCRIBE_OPTIONS_RH_MASK=3,r.SUBSCRIBE_OPTIONS_RH_SHIFT=4,r.SUBSCRIBE_OPTIONS_RH=[0,16,32],r.SUBSCRIBE_OPTIONS_NL=4,r.SUBSCRIBE_OPTIONS_RAP=8,r.SUBSCRIBE_OPTIONS_QOS=[0,1,2],r.UNSUBSCRIBE_HEADER=n("unsubscribe"),r.ACKS={unsuback:n("unsuback"),puback:n("puback"),pubcomp:n("pubcomp"),pubrel:n("pubrel"),pubrec:n("pubrec")},r.SUBACK_HEADER=e.from([r.codes.suback<<r.CMD_SHIFT]),r.VERSION3=e.from([3]),r.VERSION4=e.from([4]),r.VERSION5=e.from([5]),r.VERSION131=e.from([131]),r.VERSION132=e.from([132]),r.QOS=[0,1,2].map(t=>e.from([t])),r.EMPTY={pingreq:e.from([r.codes.pingreq<<4,0]),pingresp:e.from([r.codes.pingresp<<4,0]),disconnect:e.from([r.codes.disconnect<<4,0])}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:14}],23:[function(e,t,r){(function(r){(function(){const n=e("./writeToStream"),i=e("events");class o extends i{constructor(){super(),this._array=new Array(20),this._i=0}write(e){return this._array[this._i++]=e,!0}concat(){let e=0;const t=new Array(this._array.length),n=this._array;let i,o=0;for(i=0;i<n.length&&void 0!==n[i];i++)"string"!=typeof n[i]?t[i]=n[i].length:t[i]=r.byteLength(n[i]),e+=t[i];const s=r.allocUnsafe(e);for(i=0;i<n.length&&void 0!==n[i];i++)"string"!=typeof n[i]?(n[i].copy(s,o),o+=t[i]):(s.write(n[i],o),o+=t[i]);return s}}t.exports=function(e,t){const r=new o;return n(e,r,t),r.concat()}}).call(this)}).call(this,e("buffer").Buffer)},{"./writeToStream":28,buffer:14,events:19}],24:[function(e,t,r){r.parser=e("./parser").parser,r.generate=e("./generate"),r.writeToStream=e("./writeToStream")},{"./generate":23,"./parser":27,"./writeToStream":28}],25:[function(e,t,r){(function(e){(function(){const r=65536,n={},i=e.isBuffer(e.from([1,2]).subarray(0,1));function o(t){const r=e.allocUnsafe(2);return r.writeUInt8(t>>8,0),r.writeUInt8(255&t,1),r}t.exports={cache:n,generateCache:function(){for(let e=0;e<r;e++)n[e]=o(e)},generateNumber:o,genBufVariableByteInt:function(t){let r=0,n=0;const o=e.allocUnsafe(4);do{r=t%128|0,(t=t/128|0)>0&&(r|=128),o.writeUInt8(r,n++)}while(t>0&&n<4);return t>0&&(n=0),i?o.subarray(0,n):o.slice(0,n)},generate4ByteBuffer:function(t){const r=e.allocUnsafe(4);return r.writeUInt32BE(t,0),r}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:14}],26:[function(e,t,r){t.exports=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},{}],27:[function(e,t,r){const n=e("bl"),i=e("events"),o=e("./packet"),s=e("./constants"),a=e("debug")("mqtt-packet:parser");class c extends i{constructor(){super(),this.parser=this.constructor.parser}static parser(e){return this instanceof c?(this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new c).parser(e)}_resetState(){a("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new o,this.error=null,this._list=n(),this._stateCounter=0}parse(e){for(this.error&&this._resetState(),this._list.append(e),a("parse: current state: %s",this._states[this._stateCounter]);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,a("parse: state complete. _stateCounter is now: %d",this._stateCounter),a("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return a("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const e=this._list.readUInt8(0);return this.packet.cmd=s.types[e>>s.CMD_SHIFT],this.packet.retain=0!=(e&s.RETAIN_MASK),this.packet.qos=e>>s.QOS_SHIFT&s.QOS_MASK,this.packet.dup=0!=(e&s.DUP_MASK),a("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),a("_parseLength %d",e.value),!!e}_parsePayload(){a("_parsePayload: payload %O",this._list);let e=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}e=!0}return a("_parsePayload complete result: %s",e),e}_parseConnect(){let e,t,r,n;a("_parseConnect");const i={},o=this.packet,c=this._parseString();if(null===c)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==c&&"MQIsdp"!==c)return this._emitError(new Error("Invalid protocolId"));if(o.protocolId=c,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(o.protocolVersion=this._list.readUInt8(this._pos),o.protocolVersion>=128&&(o.bridgeMode=!0,o.protocolVersion=o.protocolVersion-128),3!==o.protocolVersion&&4!==o.protocolVersion&&5!==o.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(i.username=this._list.readUInt8(this._pos)&s.USERNAME_MASK,i.password=this._list.readUInt8(this._pos)&s.PASSWORD_MASK,i.will=this._list.readUInt8(this._pos)&s.WILL_FLAG_MASK,i.will&&(o.will={},o.will.retain=0!=(this._list.readUInt8(this._pos)&s.WILL_RETAIN_MASK),o.will.qos=(this._list.readUInt8(this._pos)&s.WILL_QOS_MASK)>>s.WILL_QOS_SHIFT),o.clean=0!=(this._list.readUInt8(this._pos)&s.CLEAN_SESSION_MASK),this._pos++,o.keepalive=this._parseNum(),-1===o.keepalive)return this._emitError(new Error("Packet too short"));if(5===o.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(o.properties=e)}const u=this._parseString();if(null===u)return this._emitError(new Error("Packet too short"));if(o.clientId=u,a("_parseConnect: packet.clientId: %s",o.clientId),i.will){if(5===o.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(o.will.properties=e)}if(null===(e=this._parseString()))return this._emitError(new Error("Cannot parse will topic"));if(o.will.topic=e,a("_parseConnect: packet.will.topic: %s",o.will.topic),null===(t=this._parseBuffer()))return this._emitError(new Error("Cannot parse will payload"));o.will.payload=t,a("_parseConnect: packet.will.paylaod: %s",o.will.payload)}if(i.username){if(null===(n=this._parseString()))return this._emitError(new Error("Cannot parse username"));o.username=n,a("_parseConnect: packet.username: %s",o.username)}if(i.password){if(null===(r=this._parseBuffer()))return this._emitError(new Error("Cannot parse password"));o.password=r}return this.settings=o,a("_parseConnect: complete"),o}_parseConnack(){a("_parseConnack");const e=this.packet;if(this._list.length<1)return null;if(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&s.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else{if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++)}if(-1===e.returnCode||-1===e.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}a("_parseConnack: complete")}_parsePublish(){a("_parsePublish");const e=this.packet;if(e.topic=this._parseString(),null===e.topic)return this._emitError(new Error("Cannot parse topic"));if(!(e.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length),a("_parsePublish: payload from buffer list: %o",e.payload)}}_parseSubscribe(){a("_parseSubscribe");const e=this.packet;let t,r,n,i,o,c,u;if(1!==e.qos)return this._emitError(new Error("Wrong subscribe header"));if(e.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos<e.length;){if(null===(t=this._parseString()))return this._emitError(new Error("Cannot parse topic"));if(this._pos>=e.length)return this._emitError(new Error("Malformed Subscribe Payload"));n=(r=this._parseByte())&s.SUBSCRIBE_OPTIONS_QOS_MASK,c=0!=(r>>s.SUBSCRIBE_OPTIONS_NL_SHIFT&s.SUBSCRIBE_OPTIONS_NL_MASK),o=0!=(r>>s.SUBSCRIBE_OPTIONS_RAP_SHIFT&s.SUBSCRIBE_OPTIONS_RAP_MASK),i=r>>s.SUBSCRIBE_OPTIONS_RH_SHIFT&s.SUBSCRIBE_OPTIONS_RH_MASK,u={topic:t,qos:n},5===this.settings.protocolVersion?(u.nl=c,u.rap=o,u.rh=i):this.settings.bridgeMode&&(u.rh=0,u.rap=!0,u.nl=!0),a("_parseSubscribe: push subscription `%s` to subscription",u),e.subscriptions.push(u)}}}_parseSuback(){a("_parseSuback");const e=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){a("_parseUnsubscribe");const e=this.packet;if(e.unsubscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos<e.length;){const t=this._parseString();if(null===t)return this._emitError(new Error("Cannot parse topic"));a("_parseUnsubscribe: push topic `%s` to unsubscriptions",t),e.unsubscriptions.push(t)}}}_parseUnsuback(){a("_parseUnsuback");const e=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(5===this.settings.protocolVersion){const t=this._parseProperties();for(Object.getOwnPropertyNames(t).length&&(e.properties=t),e.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){a("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const e=this.packet;if(this._parseMessageId(),5===this.settings.protocolVersion&&(e.length>2?(e.reasonCode=this._parseByte(),a("_parseConfirmation: packet.reasonCode `%d`",e.reasonCode)):e.reasonCode=0,e.length>3)){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return!0}_parseDisconnect(){const e=this.packet;if(a("_parseDisconnect"),5===this.settings.protocolVersion){this._list.length>0?e.reasonCode=this._parseByte():e.reasonCode=0;const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return a("_parseDisconnect result: true"),!0}_parseAuth(){a("_parseAuth");const e=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));e.reasonCode=this._parseByte();const t=this._parseProperties();return Object.getOwnPropertyNames(t).length&&(e.properties=t),a("_parseAuth: result: true"),!0}_parseMessageId(){const e=this.packet;return e.messageId=this._parseNum(),null===e.messageId?(this._emitError(new Error("Cannot parse messageId")),!1):(a("_parseMessageId: packet.messageId %d",e.messageId),!0)}_parseString(e){const t=this._parseNum(),r=t+this._pos;if(-1===t||r>this._list.length||r>this.packet.length)return null;const n=this._list.toString("utf8",this._pos,r);return this._pos+=t,a("_parseString: result: %s",n),n}_parseStringPair(){return a("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const e=this._parseNum(),t=e+this._pos;if(-1===e||t>this._list.length||t>this.packet.length)return null;const r=this._list.slice(this._pos,t);return this._pos+=e,a("_parseBuffer: result: %o",r),r}_parseNum(){if(this._list.length-this._pos<2)return-1;const e=this._list.readUInt16BE(this._pos);return this._pos+=2,a("_parseNum: result: %s",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const e=this._list.readUInt32BE(this._pos);return this._pos+=4,a("_parse4ByteNum: result: %s",e),e}_parseVarByteNum(e){a("_parseVarByteNum");let t,r=0,n=1,i=0,o=!1;const c=this._pos?this._pos:0;for(;r<4&&c+r<this._list.length;){if(i+=n*((t=this._list.readUInt8(c+r++))&s.VARBYTEINT_MASK),n*=128,0==(t&s.VARBYTEINT_FIN_MASK)){o=!0;break}if(this._list.length<=r)break}return!o&&4===r&&this._list.length>=r&&this._emitError(new Error("Invalid variable byte integer")),c&&(this._pos+=r),a("_parseVarByteNum: result: %o",o=!!o&&(e?{bytes:r,value:i}:i)),o}_parseByte(){let e;return this._pos<this._list.length&&(e=this._list.readUInt8(this._pos),this._pos++),a("_parseByte: result: %o",e),e}_parseByType(e){switch(a("_parseByType: type: %s",e),e){case"byte":return 0!==this._parseByte();case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){a("_parseProperties");const e=this._parseVarByteNum(),t=this._pos+e,r={};for(;this._pos<t;){const e=this._parseByte();if(!e)return this._emitError(new Error("Cannot parse property code type")),!1;const t=s.propertiesCodes[e];if(!t)return this._emitError(new Error("Unknown property")),!1;if("userProperties"!==t)r[t]?Array.isArray(r[t])?r[t].push(this._parseByType(s.propertiesTypes[t])):(r[t]=[r[t]],r[t].push(this._parseByType(s.propertiesTypes[t]))):r[t]=this._parseByType(s.propertiesTypes[t]);else{r[t]||(r[t]=Object.create(null));const e=this._parseByType(s.propertiesTypes[t]);if(r[t][e.name])if(Array.isArray(r[t][e.name]))r[t][e.name].push(e.value);else{const n=r[t][e.name];r[t][e.name]=[n],r[t][e.name].push(e.value)}else r[t][e.name]=e.value}}return r}_newPacket(){return a("_newPacket"),this.packet&&(this._list.consume(this.packet.length),a("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),a("_newPacket: new packet"),this.packet=new o,this._pos=0,!0}_emitError(e){a("_emitError"),this.error=e,this.emit("error",e)}}t.exports=c},{"./constants":22,"./packet":26,bl:12,debug:15,events:19}],28:[function(e,t,r){(function(r){(function(){const n=e("./constants"),i=r.allocUnsafe(0),o=r.from([0]),s=e("./numbers"),a=e("process-nextick-args").nextTick,c=e("debug")("mqtt-packet:writeToStream"),u=s.cache,l=s.generateNumber,f=s.generateCache,h=s.genBufVariableByteInt,p=s.generate4ByteBuffer;let d=S,g=!0;function b(e,t,s){switch(c("generate called"),t.cork&&(t.cork(),a(m,t)),g&&(g=!1,f()),c("generate: packet.cmd: %s",e.cmd),e.cmd){case"connect":return function(e,t,i){const o=e||{},s=o.protocolId||"MQTT";let a=o.protocolVersion||4;const c=o.will;let u=o.clean;const l=o.keepalive||0,f=o.clientId||"",h=o.username,p=o.password,g=o.properties;void 0===u&&(u=!0);let b=0;if(!s||"string"!=typeof s&&!r.isBuffer(s))return t.emit("error",new Error("Invalid protocolId")),!1;b+=s.length+2;if(3!==a&&4!==a&&5!==a)return t.emit("error",new Error("Invalid protocol version")),!1;b+=1;if(("string"==typeof f||r.isBuffer(f))&&(f||a>=4)&&(f||u))b+=r.byteLength(f)+2;else{if(a<4)return t.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*u==0)return t.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!=typeof l||l<0||l>65535||l%1!=0)return t.emit("error",new Error("Invalid keepalive")),!1;b+=2;if(b+=1,5===a){var m=I(t,g);if(!m)return!1;b+=m.length}if(c){if("object"!=typeof c)return t.emit("error",new Error("Invalid will")),!1;if(!c.topic||"string"!=typeof c.topic)return t.emit("error",new Error("Invalid will topic")),!1;if(b+=r.byteLength(c.topic)+2,b+=2,c.payload){if(!(c.payload.length>=0))return t.emit("error",new Error("Invalid will payload")),!1;"string"==typeof c.payload?b+=r.byteLength(c.payload):b+=c.payload.length}var y={};if(5===a){if(!(y=I(t,c.properties)))return!1;b+=y.length}}let v=!1;if(null!=h){if(!O(h))return t.emit("error",new Error("Invalid username")),!1;v=!0,b+=r.byteLength(h)+2}if(null!=p){if(!v)return t.emit("error",new Error("Username is required to use password")),!1;if(!O(p))return t.emit("error",new Error("Invalid password")),!1;b+=R(p)+2}t.write(n.CONNECT_HEADER),_(t,b),k(t,s),o.bridgeMode&&(a+=128);t.write(131===a?n.VERSION131:132===a?n.VERSION132:4===a?n.VERSION4:5===a?n.VERSION5:n.VERSION3);let S=0;S|=null!=h?n.USERNAME_MASK:0,S|=null!=p?n.PASSWORD_MASK:0,S|=c&&c.retain?n.WILL_RETAIN_MASK:0,S|=c&&c.qos?c.qos<<n.WILL_QOS_SHIFT:0,S|=c?n.WILL_FLAG_MASK:0,S|=u?n.CLEAN_SESSION_MASK:0,t.write(r.from([S])),d(t,l),5===a&&m.write();k(t,f),c&&(5===a&&y.write(),w(t,c.topic),k(t,c.payload));null!=h&&k(t,h);null!=p&&k(t,p);return!0}(e,t);case"connack":return function(e,t,i){const s=i?i.protocolVersion:4,a=e||{},c=5===s?a.reasonCode:a.returnCode,u=a.properties;let l=2;if("number"!=typeof c)return t.emit("error",new Error("Invalid return code")),!1;let f=null;if(5===s){if(!(f=I(t,u)))return!1;l+=f.length}t.write(n.CONNACK_HEADER),_(t,l),t.write(a.sessionPresent?n.SESSIONPRESENT_HEADER:o),t.write(r.from([c])),null!=f&&f.write();return!0}(e,t,s);case"publish":return function(e,t,o){c("publish: packet: %o",e);const s=o?o.protocolVersion:4,a=e||{},u=a.qos||0,l=a.retain?n.RETAIN_MASK:0,f=a.topic,h=a.payload||i,p=a.messageId,g=a.properties;let b=0;if("string"==typeof f)b+=r.byteLength(f)+2;else{if(!r.isBuffer(f))return t.emit("error",new Error("Invalid topic")),!1;b+=f.length+2}r.isBuffer(h)?b+=h.length:b+=r.byteLength(h);if(u&&"number"!=typeof p)return t.emit("error",new Error("Invalid messageId")),!1;u&&(b+=2);let m=null;if(5===s){if(!(m=I(t,g)))return!1;b+=m.length}t.write(n.PUBLISH_HEADER[u][a.dup?1:0][l?1:0]),_(t,b),d(t,R(f)),t.write(f),u>0&&d(t,p);null!=m&&m.write();return c("publish: payload: %o",h),t.write(h)}(e,t,s);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(e,t,i){const o=i?i.protocolVersion:4,s=e||{},a=s.cmd||"puback",c=s.messageId,u=s.dup&&"pubrel"===a?n.DUP_MASK:0;let l=0;const f=s.reasonCode,h=s.properties;let p=5===o?3:2;"pubrel"===a&&(l=1);if("number"!=typeof c)return t.emit("error",new Error("Invalid messageId")),!1;let g=null;if(5===o&&"object"==typeof h){if(!(g=C(t,h,i,p)))return!1;p+=g.length}t.write(n.ACKS[a][l][u][0]),_(t,p),d(t,c),5===o&&t.write(r.from([f]));null!==g&&g.write();return!0}(e,t,s);case"subscribe":return function(e,t,i){c("subscribe: packet: ");const o=i?i.protocolVersion:4,s=e||{},a=s.dup?n.DUP_MASK:0,u=s.messageId,l=s.subscriptions,f=s.properties;let h=0;if("number"!=typeof u)return t.emit("error",new Error("Invalid messageId")),!1;h+=2;let p=null;if(5===o){if(!(p=I(t,f)))return!1;h+=p.length}if("object"!=typeof l||!l.length)return t.emit("error",new Error("Invalid subscriptions")),!1;for(let e=0;e<l.length;e+=1){const n=l[e].topic,i=l[e].qos;if("string"!=typeof n)return t.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if("number"!=typeof i)return t.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(5===o){const r=l[e].nl||!1;if("boolean"!=typeof r)return t.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;const n=l[e].rap||!1;if("boolean"!=typeof n)return t.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const i=l[e].rh||0;if("number"!=typeof i||i>2)return t.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}h+=r.byteLength(n)+2+1}c("subscribe: writing to stream: %o",n.SUBSCRIBE_HEADER),t.write(n.SUBSCRIBE_HEADER[1][a?1:0][0]),_(t,h),d(t,u),null!==p&&p.write();let g=!0;for(const e of l){const i=e.topic,s=e.qos,a=+e.nl,c=+e.rap,u=e.rh;let l;w(t,i),l=n.SUBSCRIBE_OPTIONS_QOS[s],5===o&&(l|=a?n.SUBSCRIBE_OPTIONS_NL:0,l|=c?n.SUBSCRIBE_OPTIONS_RAP:0,l|=u?n.SUBSCRIBE_OPTIONS_RH[u]:0),g=t.write(r.from([l]))}return g}(e,t,s);case"suback":return function(e,t,i){const o=i?i.protocolVersion:4,s=e||{},a=s.messageId,c=s.granted,u=s.properties;let l=0;if("number"!=typeof a)return t.emit("error",new Error("Invalid messageId")),!1;l+=2;if("object"!=typeof c||!c.length)return t.emit("error",new Error("Invalid qos vector")),!1;for(let e=0;e<c.length;e+=1){if("number"!=typeof c[e])return t.emit("error",new Error("Invalid qos vector")),!1;l+=1}let f=null;if(5===o){if(!(f=C(t,u,i,l)))return!1;l+=f.length}t.write(n.SUBACK_HEADER),_(t,l),d(t,a),null!==f&&f.write();return t.write(r.from(c))}(e,t,s);case"unsubscribe":return function(e,t,i){const o=i?i.protocolVersion:4,s=e||{},a=s.messageId,c=s.dup?n.DUP_MASK:0,u=s.unsubscriptions,l=s.properties;let f=0;if("number"!=typeof a)return t.emit("error",new Error("Invalid messageId")),!1;f+=2;if("object"!=typeof u||!u.length)return t.emit("error",new Error("Invalid unsubscriptions")),!1;for(let e=0;e<u.length;e+=1){if("string"!=typeof u[e])return t.emit("error",new Error("Invalid unsubscriptions")),!1;f+=r.byteLength(u[e])+2}let h=null;if(5===o){if(!(h=I(t,l)))return!1;f+=h.length}t.write(n.UNSUBSCRIBE_HEADER[1][c?1:0][0]),_(t,f),d(t,a),null!==h&&h.write();let p=!0;for(let e=0;e<u.length;e++)p=w(t,u[e]);return p}(e,t,s);case"unsuback":return function(e,t,i){const o=i?i.protocolVersion:4,s=e||{},a=s.messageId,c=s.dup?n.DUP_MASK:0,u=s.granted,l=s.properties,f=s.cmd;let h=2;if("number"!=typeof a)return t.emit("error",new Error("Invalid messageId")),!1;if(5===o){if("object"!=typeof u||!u.length)return t.emit("error",new Error("Invalid qos vector")),!1;for(let e=0;e<u.length;e+=1){if("number"!=typeof u[e])return t.emit("error",new Error("Invalid qos vector")),!1;h+=1}}let p=null;if(5===o){if(!(p=C(t,l,i,h)))return!1;h+=p.length}t.write(n.ACKS[f][0][c][0]),_(t,h),d(t,a),null!==p&&p.write();5===o&&t.write(r.from(u));return!0}(e,t,s);case"pingreq":case"pingresp":return function(e,t,r){return t.write(n.EMPTY[e.cmd])}(e,t);case"disconnect":return function(e,t,i){const o=i?i.protocolVersion:4,s=e||{},a=s.reasonCode,c=s.properties;let u=5===o?1:0,l=null;if(5===o){if(!(l=C(t,c,i,u)))return!1;u+=l.length}t.write(r.from([n.codes.disconnect<<4])),_(t,u),5===o&&t.write(r.from([a]));null!==l&&l.write();return!0}(e,t,s);case"auth":return function(e,t,i){const o=i?i.protocolVersion:4,s=e||{},a=s.reasonCode,c=s.properties;let u=5===o?1:0;5!==o&&t.emit("error",new Error("Invalid mqtt version for auth packet"));const l=C(t,c,i,u);if(!l)return!1;u+=l.length,t.write(r.from([n.codes.auth<<4])),_(t,u),t.write(r.from([a])),null!==l&&l.write();return!0}(e,t,s);default:return t.emit("error",new Error("Unknown command")),!1}}function m(e){e.uncork()}Object.defineProperty(b,"cacheNumbers",{get:()=>d===S,set(e){e?(u&&0!==Object.keys(u).length||(g=!0),d=S):(g=!1,d=E)}});const y={};function _(e,t){if(t>n.VARBYTEINT_MAX)return e.emit("error",new Error(`Invalid variable byte integer: ${t}`)),!1;let r=y[t];return r||(r=h(t),t<16384&&(y[t]=r)),c("writeVarByteInt: writing to stream: %o",r),e.write(r)}function w(e,t){const n=r.byteLength(t);return d(e,n),c("writeString: %s",t),e.write(t,"utf8")}function v(e,t,r){w(e,t),w(e,r)}function S(e,t){return c("writeNumberCached: number: %d",t),c("writeNumberCached: %o",u[t]),e.write(u[t])}function E(e,t){const r=l(t);return c("writeNumberGenerated: %o",r),e.write(r)}function k(e,t){"string"==typeof t?w(e,t):t?(d(e,t.length),e.write(t)):d(e,0)}function I(e,t){if("object"!=typeof t||null!=t.length)return{length:1,write(){A(e,{},0)}};let i=0;function o(t,i){let o=0;switch(n.propertiesTypes[t]){case"byte":if("boolean"!=typeof i)return e.emit("error",new Error(`Invalid ${t}: ${i}`)),!1;o+=2;break;case"int8":if("number"!=typeof i||i<0||i>255)return e.emit("error",new Error(`Invalid ${t}: ${i}`)),!1;o+=2;break;case"binary":if(i&&null===i)return e.emit("error",new Error(`Invalid ${t}: ${i}`)),!1;o+=1+r.byteLength(i)+2;break;case"int16":if("number"!=typeof i||i<0||i>65535)return e.emit("error",new Error(`Invalid ${t}: ${i}`)),!1;o+=3;break;case"int32":if("number"!=typeof i||i<0||i>4294967295)return e.emit("error",new Error(`Invalid ${t}: ${i}`)),!1;o+=5;break;case"var":if("number"!=typeof i||i<0||i>268435455)return e.emit("error",new Error(`Invalid ${t}: ${i}`)),!1;o+=1+r.byteLength(h(i));break;case"string":if("string"!=typeof i)return e.emit("error",new Error(`Invalid ${t}: ${i}`)),!1;o+=3+r.byteLength(i.toString());break;case"pair":if("object"!=typeof i)return e.emit("error",new Error(`Invalid ${t}: ${i}`)),!1;o+=Object.getOwnPropertyNames(i).reduce((e,t)=>{const n=i[t];return Array.isArray(n)?e+=n.reduce((e,n)=>e+=3+r.byteLength(t.toString())+2+r.byteLength(n.toString()),0):e+=3+r.byteLength(t.toString())+2+r.byteLength(i[t].toString()),e},0);break;default:return e.emit("error",new Error(`Invalid property ${t}: ${i}`)),!1}return o}if(t)for(const e in t){let r=0,n=0;const s=t[e];if(Array.isArray(s))for(let t=0;t<s.length;t++){if(!(n=o(e,s[t])))return!1;r+=n}else{if(!(n=o(e,s)))return!1;r=n}if(!r)return!1;i+=r}return{length:r.byteLength(h(i))+i,write(){A(e,t,i)}}}function C(e,t,r,n){const i=["reasonString","userProperties"],o=r&&r.properties&&r.properties.maximumPacketSize?r.properties.maximumPacketSize:0;let s=I(e,t);if(o)for(;n+s.length>o;){const r=i.shift();if(!r||!t[r])return!1;delete t[r],s=I(e,t)}return s}function T(e,t,i){switch(n.propertiesTypes[t]){case"byte":e.write(r.from([n.properties[t]])),e.write(r.from([+i]));break;case"int8":e.write(r.from([n.properties[t]])),e.write(r.from([i]));break;case"binary":e.write(r.from([n.properties[t]])),k(e,i);break;case"int16":e.write(r.from([n.properties[t]])),d(e,i);break;case"int32":e.write(r.from([n.properties[t]])),function(e,t){const r=p(t);c("write4ByteNumber: %o",r),e.write(r)}(e,i);break;case"var":e.write(r.from([n.properties[t]])),_(e,i);break;case"string":e.write(r.from([n.properties[t]])),w(e,i);break;case"pair":Object.getOwnPropertyNames(i).forEach(o=>{const s=i[o];Array.isArray(s)?s.forEach(i=>{e.write(r.from([n.properties[t]])),v(e,o.toString(),i.toString())}):(e.write(r.from([n.properties[t]])),v(e,o.toString(),s.toString()))});break;default:return e.emit("error",new Error(`Invalid property ${t} value: ${i}`)),!1}}function A(e,t,r){_(e,r);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&null!==t[r]){const n=t[r];if(Array.isArray(n))for(let t=0;t<n.length;t++)T(e,r,n[t]);else T(e,r,n)}}function R(e){return e?e instanceof r?e.length:r.byteLength(e):0}function O(e){return"string"==typeof e||e instanceof r}t.exports=b}).call(this)}).call(this,e("buffer").Buffer)},{"./constants":22,"./numbers":25,buffer:14,debug:15,"process-nextick-args":31}],29:[function(e,t,r){var n=1e3,i=60*n,o=60*i,s=24*o,a=7*s,c=365.25*s;function u(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*c;case"weeks":case"week":case"w":return r*a;case"days":case"day":case"d":return r*s;case"hours":case"hour":case"hrs":case"hr":case"h":return r*o;case"minutes":case"minute":case"mins":case"min":case"m":return r*i;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=s)return u(e,t,s,"day");if(t>=o)return u(e,t,o,"hour");if(t>=i)return u(e,t,i,"minute");if(t>=n)return u(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=s)return Math.round(e/s)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=i)return Math.round(e/i)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],30:[function(e,t,r){var n=e("wrappy");function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(i),t.exports.strict=n(o),i.proto=i(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})})},{wrappy:59}],31:[function(e,t,r){(function(e){(function(){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this)}).call(this,e("_process"))},{_process:32}],32:[function(e,t,r){var n,i,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var u,l=[],f=!1,h=-1;function p(){f&&u&&(f=!1,u.length?l=u.concat(l):h=-1,l.length&&d())}function d(){if(!f){var e=c(p);f=!0;for(var t=l.length;t;){for(u=l,l=[];++h<t;)u&&u[h].run();h=-1,t=l.length}u=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function b(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new g(e,t)),1!==l.length||f||c(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],33:[function(e,t,r){(function(e){(function(){!function(n){var i="object"==typeof r&&r&&!r.nodeType&&r,o="object"==typeof t&&t&&!t.nodeType&&t,s="object"==typeof e&&e;s.global!==s&&s.window!==s&&s.self!==s||(n=s);var a,c,u=2147483647,l=36,f=1,h=26,p=38,d=700,g=72,b=128,m="-",y=/^xn--/,_=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=l-f,E=Math.floor,k=String.fromCharCode;function I(e){throw new RangeError(v[e])}function C(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function T(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+C((e=e.replace(w,".")).split("."),t).join(".")}function A(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function R(e){return C(e,function(e){var t="";return e>65535&&(t+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=k(e)}).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,r){var n=0;for(e=r?E(e/d):e>>1,e+=E(e/t);e>S*h>>1;n+=l)e=E(e/S);return E(n+(S+1)*e/(e+p))}function P(e){var t,r,n,i,o,s,a,c,p,d,y,_=[],w=e.length,v=0,S=b,k=g;for((r=e.lastIndexOf(m))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&I("not-basic"),_.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<w;){for(o=v,s=1,a=l;i>=w&&I("invalid-input"),((c=(y=e.charCodeAt(i++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:l)>=l||c>E((u-v)/s))&&I("overflow"),v+=c*s,!(c<(p=a<=k?f:a>=k+h?h:a-k));a+=l)s>E(u/(d=l-p))&&I("overflow"),s*=d;k=x(v-o,t=_.length+1,0==o),E(v/t)>u-S&&I("overflow"),S+=E(v/t),v%=t,_.splice(v++,0,S)}return R(_)}function M(e){var t,r,n,i,o,s,a,c,p,d,y,_,w,v,S,C=[];for(_=(e=A(e)).length,t=b,r=0,o=g,s=0;s<_;++s)(y=e[s])<128&&C.push(k(y));for(n=i=C.length,i&&C.push(m);n<_;){for(a=u,s=0;s<_;++s)(y=e[s])>=t&&y<a&&(a=y);for(a-t>E((u-r)/(w=n+1))&&I("overflow"),r+=(a-t)*w,t=a,s=0;s<_;++s)if((y=e[s])<t&&++r>u&&I("overflow"),y==t){for(c=r,p=l;!(c<(d=p<=o?f:p>=o+h?h:p-o));p+=l)S=c-d,v=l-d,C.push(k(O(d+S%v,0))),c=E(S/v);C.push(k(O(c,0))),o=x(r,w,n==i),r=0,++n}++r,++t}return C.join("")}if(a={version:"1.4.1",ucs2:{decode:A,encode:R},decode:P,encode:M,toASCII:function(e){return T(e,function(e){return _.test(e)?"xn--"+M(e):e})},toUnicode:function(e){return T(e,function(e){return y.test(e)?P(e.slice(4).toLowerCase()):e})}},i&&o)if(t.exports==i)o.exports=a;else for(c in a)a.hasOwnProperty(c)&&(i[c]=a[c]);else n.punycode=a}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],34:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,o){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var f,h,p,d,g=e[l].replace(a,"%20"),b=g.indexOf(r);b>=0?(f=g.substr(0,b),h=g.substr(b+1)):(f=g,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],35:[function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),function(s){var a=encodeURIComponent(n(s))+r;return i(e[s])?o(e[s],function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[s]))}).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],36:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":34,"./encode":35}],37:[function(e,t,r){"use strict";var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,i,s,a;if("string"==typeof t&&(i="not ",t.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var c=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(n," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],38:[function(e,t,r){(function(r){(function(){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=u;var i=e("./_stream_readable"),o=e("./_stream_writable");e("inherits")(u,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var c=s[a];u.prototype[c]||(u.prototype[c]=o.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":40,"./_stream_writable":42,_process:32,inherits:21}],39:[function(e,t,r){"use strict";t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":41,inherits:21}],40:[function(e,t,r){(function(r,n){(function(){"use strict";var i;t.exports=I,I.ReadableState=k;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},s=e("./internal/streams/stream"),a=e("buffer").Buffer,c=n.Uint8Array||function(){};var u,l=e("util");u=l&&l.debuglog?l.debuglog("stream"):function(){};var f,h,p,d=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),b=e("./internal/streams/state").getHighWaterMark,m=e("../errors").codes,y=m.ERR_INVALID_ARG_TYPE,_=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(I,s);var S=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function k(t,r,n){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=b(this,t,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function I(t){if(i=i||e("./_stream_duplex"),!(this instanceof I))return new I(t);var r=this instanceof i;this._readableState=new k(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(e,t,r,n,i){u("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,x(e)))}(e,s);else if(i||(o=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),o)S(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?S(e,new v):T(e,s,t,!0);else if(s.ended)S(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):P(e,s)):T(e,s,t,!1)}else n||(s.reading=!1,P(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&O(e)),P(e,t)}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),I.prototype.destroy=g.destroy,I.prototype._undestroy=g.undestroy,I.prototype._destroy=function(e,t){t(e)},I.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),C(this,e,t,!1,r)},I.prototype.unshift=function(e){return C(this,e,null,!0,!1)},I.prototype.isPaused=function(){return!1===this._readableState.flowing},I.prototype.setEncoding=function(t){f||(f=e("string_decoder/").StringDecoder);var r=new f(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var A=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(x,e))}function x(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function P(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function B(e){u("readable nexttick read 0"),e.read(0)}function N(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function q(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(D,t,e))}function D(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function F(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}I.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?q(this):O(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&q(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&q(this)),null!==n&&this.emit("data",n),n},I.prototype._read=function(e){S(this,new w("_read()"))},I.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:b;function a(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",a),n.removeListener("end",c),n.removeListener("end",b),n.removeListener("data",h),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){u("onend"),e.end()}i.endEmitted?r.nextTick(s):n.once("end",s),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(n);e.on("drain",l);var f=!1;function h(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==F(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function p(t){u("onerror",t),b(),e.removeListener("error",p),0===o(e,"error")&&S(e,t)}function d(){e.removeListener("finish",g),b()}function g(){u("onfinish"),e.removeListener("close",d),b()}function b(){u("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",d),e.once("finish",g),e.emit("pipe",n),i.flowing||(u("pipe resume"),n.resume()),e},I.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},I.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?O(this):i.reading||r.nextTick(B,this))),n},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(L,this),n},I.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(L,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(N,e,t))}(this,e)),e.paused=!1,this},I.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<E.length;o++)e.on(E[o],this.emit.bind(this,E[o]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(I.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e("./internal/streams/async_iterator")),h(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),I._fromList=j,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(I.from=function(t,r){return void 0===p&&(p=e("./internal/streams/from")),p(I,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":37,"./_stream_duplex":38,"./internal/streams/async_iterator":43,"./internal/streams/buffer_list":44,"./internal/streams/destroy":45,"./internal/streams/from":47,"./internal/streams/state":49,"./internal/streams/stream":50,_process:32,buffer:14,events:19,inherits:21,"string_decoder/":55,util:13}],41:[function(e,t,r){"use strict";t.exports=u;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,c=e("./_stream_duplex");function u(e){if(!(this instanceof u))return new u(e);c.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush(function(t,r){f(e,t,r)})}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}e("inherits")(u,c),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,r){r(new i("_transform()"))},u.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":37,"./_stream_duplex":38,inherits:21}],42:[function(e,t,r){(function(r,n){(function(){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;t.exports=I,I.WritableState=k;var s={deprecate:e("util-deprecate")},a=e("./internal/streams/stream"),c=e("buffer").Buffer,u=n.Uint8Array||function(){};var l,f=e("./internal/streams/destroy"),h=e("./internal/streams/state").getHighWaterMark,p=e("../errors").codes,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,b=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,_=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,v=p.ERR_UNKNOWN_ENCODING,S=f.errorOrDestroy;function E(){}function k(t,n,s){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof s&&(s=n instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if("function"!=typeof o)throw new b;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(x,e,t),e._writableState.errorEmitted=!0,S(e,i)):(o(i),e._writableState.errorEmitted=!0,S(e,i),x(e,t))}(e,n,i,t,o);else{var s=R(n)||e.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||A(e,n),i?r.nextTick(T,e,n,s,o):T(e,n,s,o)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function I(t){var r=this instanceof(o=o||e("./_stream_duplex"));if(!r&&!l.call(I,this))return new I(t);this._writableState=new k(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function C(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),x(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,c=!0;r;)o[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;o.allBuffers=c,C(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback;if(C(e,t,!1,t.objectMode?1:u.length,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final(function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),x(e,t)})}function x(e,t){var n=R(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}e("inherits")(I,a),k.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(k.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===I&&(e&&e._writableState instanceof k)}})):l=function(e){return e instanceof this},I.prototype.pipe=function(){S(this,new m)},I.prototype.write=function(e,t,n){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=e,c.isBuffer(i)||i instanceof u);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=E),o.ending?function(e,t){var n=new w;S(e,n),r.nextTick(t,n)}(this,n):(a||function(e,t,n,i){var o;return null===n?o=new _:"string"==typeof n||t.objectMode||(o=new d("chunk",["string","Buffer"],n)),!o||(S(e,o),r.nextTick(i,o),!1)}(this,o,e,n))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r));return t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,a,n,i,o);return u}(this,o,a,e,t,n)),s},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||A(this,e))},I.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,r){r(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,x(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":37,"./_stream_duplex":38,"./internal/streams/destroy":45,"./internal/streams/state":49,"./internal/streams/stream":50,_process:32,buffer:14,inherits:21,"util-deprecate":58}],43:[function(e,t,r){(function(r){(function(){"use strict";var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=e("./end-of-stream"),s=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function d(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[l]=null,e[s]=null,e[a]=null,t(p(r,!1)))}}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise(function(t,n){r.nextTick(function(){e[c]?n(e[c]):t(p(void 0,!0))})});var n,i=this[l];if(i)n=new Promise(function(e,t){return function(r,n){e.then(function(){t[u]?r(p(void 0,!0)):t[f](r,n)},n)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(p(o,!1));n=new Promise(this[f])}return this[l]=n,n}},Symbol.asyncIterator,function(){return this}),i(n,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){e?r(e):t(p(void 0,!0))})})}),n),g);t.exports=function(e){var t,n=Object.create(b,(i(t={},h,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var r=n[h].read();r?(n[l]=null,n[s]=null,n[a]=null,e(p(r,!1))):(n[s]=e,n[a]=t)},writable:!0}),t));return n[l]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[l]=null,n[s]=null,n[a]=null,t(e)),void(n[c]=e)}var r=n[s];null!==r&&(n[l]=null,n[s]=null,n[a]=null,r(p(void 0,!0))),n[u]=!0}),e.on("readable",function(e){r.nextTick(d,e)}.bind(null,n)),n}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":46,_process:32}],44:[function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=e("buffer").Buffer,a=e("util").inspect,c=a&&a.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,u;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,s.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),u&&o(t,u),e}()},{buffer:14,util:13}],45:[function(e,t,r){(function(e){(function(){"use strict";function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:32}],46:[function(e,t,r){"use strict";var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||l()},u=t._writableState&&t._writableState.finished,l=function(){a=!1,u=!0,s||o.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,f=!0,a||o.call(t)},p=function(e){o.call(t,e)},d=function(){var e;return s&&!f?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!u?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",d),t.req?g():t.on("request",g)):a&&!t._writableState&&(t.on("end",c),t.on("close",c)),t.on("end",h),t.on("finish",l),!1!==r.error&&t.on("error",p),t.on("close",d),function(){t.removeListener("complete",l),t.removeListener("abort",d),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",d)}}},{"../../../errors":37}],47:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],48:[function(e,t,r){"use strict";var n;var i=e("../../../errors").codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var l,f=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new o("streams");var h=r.map(function(t,i){var o=i<r.length-1;return function(t,r,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;t.on("close",function(){a=!0}),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},function(e){if(e)return o(e);a=!0,o()});var c=!1;return function(e){if(!a&&!c)return c=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}(t,o,i>0,function(e){l||(l=e),e&&h.forEach(c),o||(h.forEach(c),f(l))})});return r.reduce(u)}},{"../../../errors":37,"./end-of-stream":46}],49:[function(e,t,r){"use strict";var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},{"../../../errors":37}],50:[function(e,t,r){t.exports=e("events").EventEmitter},{events:19}],51:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":38,"./lib/_stream_passthrough.js":39,"./lib/_stream_readable.js":40,"./lib/_stream_transform.js":41,"./lib/_stream_writable.js":42,"./lib/internal/streams/end-of-stream.js":46,"./lib/internal/streams/pipeline.js":48}],52:[function(e,t,r){"use strict";t.exports=function(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var t=0;t<e.length;t++)e[t]=arguments[t+2]}return new function(e,t,r){var n=this;this._callback=e,this._args=r,this._interval=setInterval(e,t,this._args),this.reschedule=function(e){e||(e=n._interval),n._interval&&clearInterval(n._interval),n._interval=setInterval(n._callback,e,n._args)},this.clear=function(){n._interval&&(clearInterval(n._interval),n._interval=void 0)},this.destroy=function(){n._interval&&clearInterval(n._interval),n._callback=void 0,n._interval=void 0,n._args=void 0}}(arguments[0],arguments[1],e)}},{}],53:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:14}],54:[function(e,t,r){t.exports=function(e){var t=e._readableState;return t?t.objectMode||"number"==typeof e._duplexState?e.read():e.read((r=t,r.buffer.length?r.buffer.head?r.buffer.head.data.length:r.buffer[0].length:r.length)):null;var r}},{}],55:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":53}],56:[function(e,t,r){"use strict";var n=e("punycode"),i=e("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=_,r.resolve=function(e,t){return _(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?_(e,!1,!0).resolveObject(t):t},r.format=function(e){i.isString(e)&&(e=_(e));return e instanceof o?e.format():o.prototype.format.call(e)},r.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(u),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=e("querystring");function _(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(a);u[0]=u[0].replace(/\\/g,"/");var _=e=u.join(a);if(_=_.trim(),!r&&1===e.split("#").length){var w=c.exec(_);if(w)return this.path=_,this.href=_,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var v=s.exec(_);if(v){var S=(v=v[0]).toLowerCase();this.protocol=S,_=_.substr(v.length)}if(r||v||_.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===_.substr(0,2);!E||v&&b[v]||(_=_.substr(2),this.slashes=!0)}if(!b[v]&&(E||v&&!m[v])){for(var k,I,C=-1,T=0;T<h.length;T++){-1!==(A=_.indexOf(h[T]))&&(-1===C||A<C)&&(C=A)}-1!==(I=-1===C?_.lastIndexOf("@"):_.lastIndexOf("@",C))&&(k=_.slice(0,I),_=_.slice(I+1),this.auth=decodeURIComponent(k)),C=-1;for(T=0;T<f.length;T++){var A;-1!==(A=_.indexOf(f[T]))&&(-1===C||A<C)&&(C=A)}-1===C&&(C=_.length),this.host=_.slice(0,C),_=_.slice(C),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var O=this.hostname.split(/\./),x=(T=0,O.length);T<x;T++){var P=O[T];if(P&&!P.match(p)){for(var M="",L=0,B=P.length;L<B;L++)P.charCodeAt(L)>127?M+="x":M+=P[L];if(!M.match(p)){var N=O.slice(0,T),U=O.slice(T+1),j=P.match(d);j&&(N.push(j[1]),U.unshift(j[2])),U.length&&(_="/"+U.join(".")+_),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=n.toASCII(this.hostname));var q=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+q,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!g[S])for(T=0,x=l.length;T<x;T++){var F=l[T];if(-1!==_.indexOf(F)){var V=encodeURIComponent(F);V===F&&(V=escape(F)),_=_.split(F).join(V)}}var W=_.indexOf("#");-1!==W&&(this.hash=_.substr(W),_=_.slice(0,W));var H=_.indexOf("?");if(-1!==H?(this.search=_.substr(H),this.query=_.substr(H+1),t&&(this.query=y.parse(this.query)),_=_.slice(0,H)):t&&(this.search="",this.query={}),_&&(this.pathname=_),m[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){q=this.pathname||"";var K=this.search||"";this.path=q+K}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=y.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(_(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var l=c[u];"protocol"!==l&&(r[l]=e[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var p=f[h];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||b[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var g=r.pathname||"",y=r.search||"";r.path=g+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var _=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),v=w||_||r.host&&e.pathname,S=v,E=r.pathname&&r.pathname.split("/")||[],k=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(k&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),v=v&&(""===d[0]||""===E[0])),w)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,E=d;else if(d.length)E||(E=[]),E.pop(),E=E.concat(d),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(k)r.hostname=r.host=E.shift(),(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=E.slice(-1)[0],C=(r.host||e.host||E.length>1)&&("."===I||".."===I)||""===I,T=0,A=E.length;A>=0;A--)"."===(I=E[A])?E.splice(A,1):".."===I?(E.splice(A,1),T++):T&&(E.splice(A,1),T--);if(!v&&!S)for(;T--;T)E.unshift("..");!v||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),C&&"/"!==E.join("/").substr(-1)&&E.push("");var R,O=""===E[0]||E[0]&&"/"===E[0].charAt(0);k&&(r.hostname=r.host=O?"":E.length?E.shift():"",(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift()));return(v=v||r.host&&E.length)&&!O&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":57,punycode:33,querystring:36}],57:[function(e,t,r){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],58:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],59:[function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");Object.keys(t).forEach(function(e){n[e]=t[e]});return n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach(function(e){n[e]=i[e]}),n}}},{}],60:[function(e,t,r){"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},{}],61:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},{}]},{},[9])(9)});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))

/***/ }),

/***/ "5a34":
/***/ (function(module, exports, __webpack_require__) {

var isRegExp = __webpack_require__("44e7");

module.exports = function (it) {
  if (isRegExp(it)) {
    throw TypeError("The method doesn't accept regular expressions");
  } return it;
};


/***/ }),

/***/ "5c6c":
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),

/***/ "5f02":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Determines whether the payload is an error thrown by Axios
 *
 * @param {*} payload The value to test
 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
 */
module.exports = function isAxiosError(payload) {
  return (typeof payload === 'object') && (payload.isAxiosError === true);
};


/***/ }),

/***/ "5fb2":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
var base = 36;
var tMin = 1;
var tMax = 26;
var skew = 38;
var damp = 700;
var initialBias = 72;
var initialN = 128; // 0x80
var delimiter = '-'; // '\x2D'
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
var baseMinusTMin = base - tMin;
var floor = Math.floor;
var stringFromCharCode = String.fromCharCode;

/**
 * Creates an array containing the numeric code points of each Unicode
 * character in the string. While JavaScript uses UCS-2 internally,
 * this function will convert a pair of surrogate halves (each of which
 * UCS-2 exposes as separate characters) into a single code point,
 * matching UTF-16.
 */
var ucs2decode = function (string) {
  var output = [];
  var counter = 0;
  var length = string.length;
  while (counter < length) {
    var value = string.charCodeAt(counter++);
    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
      // It's a high surrogate, and there is a next character.
      var extra = string.charCodeAt(counter++);
      if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
        output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
      } else {
        // It's an unmatched surrogate; only append this code unit, in case the
        // next code unit is the high surrogate of a surrogate pair.
        output.push(value);
        counter--;
      }
    } else {
      output.push(value);
    }
  }
  return output;
};

/**
 * Converts a digit/integer into a basic code point.
 */
var digitToBasic = function (digit) {
  //  0..25 map to ASCII a..z or A..Z
  // 26..35 map to ASCII 0..9
  return digit + 22 + 75 * (digit < 26);
};

/**
 * Bias adaptation function as per section 3.4 of RFC 3492.
 * https://tools.ietf.org/html/rfc3492#section-3.4
 */
var adapt = function (delta, numPoints, firstTime) {
  var k = 0;
  delta = firstTime ? floor(delta / damp) : delta >> 1;
  delta += floor(delta / numPoints);
  for (; delta > baseMinusTMin * tMax >> 1; k += base) {
    delta = floor(delta / baseMinusTMin);
  }
  return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};

/**
 * Converts a string of Unicode symbols (e.g. a domain name label) to a
 * Punycode string of ASCII-only symbols.
 */
// eslint-disable-next-line max-statements -- TODO
var encode = function (input) {
  var output = [];

  // Convert the input in UCS-2 to an array of Unicode code points.
  input = ucs2decode(input);

  // Cache the length.
  var inputLength = input.length;

  // Initialize the state.
  var n = initialN;
  var delta = 0;
  var bias = initialBias;
  var i, currentValue;

  // Handle the basic code points.
  for (i = 0; i < input.length; i++) {
    currentValue = input[i];
    if (currentValue < 0x80) {
      output.push(stringFromCharCode(currentValue));
    }
  }

  var basicLength = output.length; // number of basic code points.
  var handledCPCount = basicLength; // number of code points that have been handled;

  // Finish the basic string with a delimiter unless it's empty.
  if (basicLength) {
    output.push(delimiter);
  }

  // Main encoding loop:
  while (handledCPCount < inputLength) {
    // All non-basic code points < n have been handled already. Find the next larger one:
    var m = maxInt;
    for (i = 0; i < input.length; i++) {
      currentValue = input[i];
      if (currentValue >= n && currentValue < m) {
        m = currentValue;
      }
    }

    // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
    var handledCPCountPlusOne = handledCPCount + 1;
    if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
      throw RangeError(OVERFLOW_ERROR);
    }

    delta += (m - n) * handledCPCountPlusOne;
    n = m;

    for (i = 0; i < input.length; i++) {
      currentValue = input[i];
      if (currentValue < n && ++delta > maxInt) {
        throw RangeError(OVERFLOW_ERROR);
      }
      if (currentValue == n) {
        // Represent delta as a generalized variable-length integer.
        var q = delta;
        for (var k = base; /* no condition */; k += base) {
          var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
          if (q < t) break;
          var qMinusT = q - t;
          var baseMinusT = base - t;
          output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
          q = floor(qMinusT / baseMinusT);
        }

        output.push(stringFromCharCode(digitToBasic(q)));
        bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
        delta = 0;
        ++handledCPCount;
      }
    }

    ++delta;
    ++n;
  }
  return output.join('');
};

module.exports = function (input) {
  var encoded = [];
  var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
  var i, label;
  for (i = 0; i < labels.length; i++) {
    label = labels[i];
    encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
  }
  return encoded.join('.');
};


/***/ }),

/***/ "605d":
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__("c6b6");
var global = __webpack_require__("da84");

module.exports = classof(global.process) == 'process';


/***/ }),

/***/ "60da":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var DESCRIPTORS = __webpack_require__("83ab");
var fails = __webpack_require__("d039");
var objectKeys = __webpack_require__("df75");
var getOwnPropertySymbolsModule = __webpack_require__("7418");
var propertyIsEnumerableModule = __webpack_require__("d1e7");
var toObject = __webpack_require__("7b0b");
var IndexedObject = __webpack_require__("44ad");

var nativeAssign = Object.assign;
var defineProperty = Object.defineProperty;

// `Object.assign` method
// https://tc39.es/ecma262/#sec-object.assign
module.exports = !nativeAssign || fails(function () {
  // should have correct order of operations (Edge bug)
  if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
    enumerable: true,
    get: function () {
      defineProperty(this, 'b', {
        value: 3,
        enumerable: false
      });
    }
  }), { b: 2 })).b !== 1) return true;
  // should work with symbols and should have deterministic property order (V8 bug)
  var A = {};
  var B = {};
  /* global Symbol -- required for testing */
  var symbol = Symbol();
  var alphabet = 'abcdefghijklmnopqrst';
  A[symbol] = 7;
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  var T = toObject(target);
  var argumentsLength = arguments.length;
  var index = 1;
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  var propertyIsEnumerable = propertyIsEnumerableModule.f;
  while (argumentsLength > index) {
    var S = IndexedObject(arguments[index++]);
    var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) {
      key = keys[j++];
      if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
    }
  } return T;
} : nativeAssign;


/***/ }),

/***/ "6547":
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__("a691");
var requireObjectCoercible = __webpack_require__("1d80");

// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function (CONVERT_TO_STRING) {
  return function ($this, pos) {
    var S = String(requireObjectCoercible($this));
    var position = toInteger(pos);
    var size = S.length;
    var first, second;
    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
    first = S.charCodeAt(position);
    return first < 0xD800 || first > 0xDBFF || position + 1 === size
      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
        ? CONVERT_TO_STRING ? S.charAt(position) : first
        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  };
};

module.exports = {
  // `String.prototype.codePointAt` method
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  codeAt: createMethod(false),
  // `String.prototype.at` method
  // https://github.com/mathiasbynens/String.prototype.at
  charAt: createMethod(true)
};


/***/ }),

/***/ "65f0":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");
var isArray = __webpack_require__("e8b5");
var wellKnownSymbol = __webpack_require__("b622");

var SPECIES = wellKnownSymbol('species');

// `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
  var C;
  if (isArray(originalArray)) {
    C = originalArray.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    else if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};


/***/ }),

/***/ "69f3":
/***/ (function(module, exports, __webpack_require__) {

var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
var global = __webpack_require__("da84");
var isObject = __webpack_require__("861d");
var createNonEnumerableProperty = __webpack_require__("9112");
var objectHas = __webpack_require__("5135");
var shared = __webpack_require__("c6cd");
var sharedKey = __webpack_require__("f772");
var hiddenKeys = __webpack_require__("d012");

var WeakMap = global.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP) {
  var store = shared.state || (shared.state = new WeakMap());
  var wmget = store.get;
  var wmhas = store.has;
  var wmset = store.set;
  set = function (it, metadata) {
    metadata.facade = it;
    wmset.call(store, it, metadata);
    return metadata;
  };
  get = function (it) {
    return wmget.call(store, it) || {};
  };
  has = function (it) {
    return wmhas.call(store, it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    metadata.facade = it;
    createNonEnumerableProperty(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return objectHas(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return objectHas(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};


/***/ }),

/***/ "6eeb":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var createNonEnumerableProperty = __webpack_require__("9112");
var has = __webpack_require__("5135");
var setGlobal = __webpack_require__("ce4e");
var inspectSource = __webpack_require__("8925");
var InternalStateModule = __webpack_require__("69f3");

var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');

(module.exports = function (O, key, value, options) {
  var unsafe = options ? !!options.unsafe : false;
  var simple = options ? !!options.enumerable : false;
  var noTargetGet = options ? !!options.noTargetGet : false;
  var state;
  if (typeof value == 'function') {
    if (typeof key == 'string' && !has(value, 'name')) {
      createNonEnumerableProperty(value, 'name', key);
    }
    state = enforceInternalState(value);
    if (!state.source) {
      state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
    }
  }
  if (O === global) {
    if (simple) O[key] = value;
    else setGlobal(key, value);
    return;
  } else if (!unsafe) {
    delete O[key];
  } else if (!noTargetGet && O[key]) {
    simple = true;
  }
  if (simple) O[key] = value;
  else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
  return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});


/***/ }),

/***/ "7310":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "7323":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_IconSelect_vue_vue_type_style_index_0_id_2a8ce4d1_rel_stylesheet_2Fscss_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7310");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_IconSelect_vue_vue_type_style_index_0_id_2a8ce4d1_rel_stylesheet_2Fscss_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_IconSelect_vue_vue_type_style_index_0_id_2a8ce4d1_rel_stylesheet_2Fscss_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "7418":
/***/ (function(module, exports) {

exports.f = Object.getOwnPropertySymbols;


/***/ }),

/***/ "746f":
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__("428f");
var has = __webpack_require__("5135");
var wrappedWellKnownSymbolModule = __webpack_require__("e538");
var defineProperty = __webpack_require__("9bf2").f;

module.exports = function (NAME) {
  var Symbol = path.Symbol || (path.Symbol = {});
  if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
    value: wrappedWellKnownSymbolModule.f(NAME)
  });
};


/***/ }),

/***/ "7839":
/***/ (function(module, exports) {

// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];


/***/ }),

/***/ "7a77":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * A `Cancel` is an object that is thrown when an operation is canceled.
 *
 * @class
 * @param {string=} message The message.
 */
function Cancel(message) {
  this.message = message;
}

Cancel.prototype.toString = function toString() {
  return 'Cancel' + (this.message ? ': ' + this.message : '');
};

Cancel.prototype.__CANCEL__ = true;

module.exports = Cancel;


/***/ }),

/***/ "7aac":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

module.exports = (
  utils.isStandardBrowserEnv() ?

  // Standard browser envs support document.cookie
    (function standardBrowserEnv() {
      return {
        write: function write(name, value, expires, path, domain, secure) {
          var cookie = [];
          cookie.push(name + '=' + encodeURIComponent(value));

          if (utils.isNumber(expires)) {
            cookie.push('expires=' + new Date(expires).toGMTString());
          }

          if (utils.isString(path)) {
            cookie.push('path=' + path);
          }

          if (utils.isString(domain)) {
            cookie.push('domain=' + domain);
          }

          if (secure === true) {
            cookie.push('secure');
          }

          document.cookie = cookie.join('; ');
        },

        read: function read(name) {
          var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
          return (match ? decodeURIComponent(match[3]) : null);
        },

        remove: function remove(name) {
          this.write(name, '', Date.now() - 86400000);
        }
      };
    })() :

  // Non standard browser env (web workers, react-native) lack needed support.
    (function nonStandardBrowserEnv() {
      return {
        write: function write() {},
        read: function read() { return null; },
        remove: function remove() {}
      };
    })()
);


/***/ }),

/***/ "7b0b":
/***/ (function(module, exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__("1d80");

// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
  return Object(requireObjectCoercible(argument));
};


/***/ }),

/***/ "7c73":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var defineProperties = __webpack_require__("37e8");
var enumBugKeys = __webpack_require__("7839");
var hiddenKeys = __webpack_require__("d012");
var html = __webpack_require__("1be4");
var documentCreateElement = __webpack_require__("cc12");
var sharedKey = __webpack_require__("f772");

var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');

var EmptyConstructor = function () { /* empty */ };

var scriptTag = function (content) {
  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};

// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
  activeXDocument.write(scriptTag(''));
  activeXDocument.close();
  var temp = activeXDocument.parentWindow.Object;
  activeXDocument = null; // avoid memory leak
  return temp;
};

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = documentCreateElement('iframe');
  var JS = 'java' + SCRIPT + ':';
  var iframeDocument;
  iframe.style.display = 'none';
  html.appendChild(iframe);
  // https://github.com/zloirock/core-js/issues/475
  iframe.src = String(JS);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(scriptTag('document.F=Object'));
  iframeDocument.close();
  return iframeDocument.F;
};

// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
  try {
    /* global ActiveXObject -- old IE */
    activeXDocument = document.domain && new ActiveXObject('htmlfile');
  } catch (error) { /* ignore */ }
  NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  var length = enumBugKeys.length;
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  return NullProtoObject();
};

hiddenKeys[IE_PROTO] = true;

// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    EmptyConstructor[PROTOTYPE] = anObject(O);
    result = new EmptyConstructor();
    EmptyConstructor[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = NullProtoObject();
  return Properties === undefined ? result : defineProperties(result, Properties);
};


/***/ }),

/***/ "7dd0":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var createIteratorConstructor = __webpack_require__("9ed3");
var getPrototypeOf = __webpack_require__("e163");
var setPrototypeOf = __webpack_require__("d2bb");
var setToStringTag = __webpack_require__("d44e");
var createNonEnumerableProperty = __webpack_require__("9112");
var redefine = __webpack_require__("6eeb");
var wellKnownSymbol = __webpack_require__("b622");
var IS_PURE = __webpack_require__("c430");
var Iterators = __webpack_require__("3f8c");
var IteratorsCore = __webpack_require__("ae93");

var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';

var returnThis = function () { return this; };

module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  createIteratorConstructor(IteratorConstructor, NAME, next);

  var getIterationMethod = function (KIND) {
    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
    switch (KIND) {
      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
    } return function () { return new IteratorConstructor(this); };
  };

  var TO_STRING_TAG = NAME + ' Iterator';
  var INCORRECT_VALUES_NAME = false;
  var IterablePrototype = Iterable.prototype;
  var nativeIterator = IterablePrototype[ITERATOR]
    || IterablePrototype['@@iterator']
    || DEFAULT && IterablePrototype[DEFAULT];
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  var CurrentIteratorPrototype, methods, KEY;

  // fix native
  if (anyNativeIterator) {
    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
        if (setPrototypeOf) {
          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
          createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
        }
      }
      // Set @@toStringTag to native iterators
      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
    }
  }

  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
    INCORRECT_VALUES_NAME = true;
    defaultIterator = function values() { return nativeIterator.call(this); };
  }

  // define iterator
  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
    createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  }
  Iterators[NAME] = defaultIterator;

  // export additional methods
  if (DEFAULT) {
    methods = {
      values: getIterationMethod(VALUES),
      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
      entries: getIterationMethod(ENTRIES)
    };
    if (FORCED) for (KEY in methods) {
      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
        redefine(IterablePrototype, KEY, methods[KEY]);
      }
    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  }

  return methods;
};


/***/ }),

/***/ "7f9a":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var inspectSource = __webpack_require__("8925");

var WeakMap = global.WeakMap;

module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));


/***/ }),

/***/ "81d5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toObject = __webpack_require__("7b0b");
var toAbsoluteIndex = __webpack_require__("23cb");
var toLength = __webpack_require__("50c4");

// `Array.prototype.fill` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.fill
module.exports = function fill(value /* , start = 0, end = @length */) {
  var O = toObject(this);
  var length = toLength(O.length);
  var argumentsLength = arguments.length;
  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  var end = argumentsLength > 2 ? arguments[2] : undefined;
  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  while (endPos > index) O[index++] = value;
  return O;
};


/***/ }),

/***/ "825a":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");

module.exports = function (it) {
  if (!isObject(it)) {
    throw TypeError(String(it) + ' is not an object');
  } return it;
};


/***/ }),

/***/ "83ab":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});


/***/ }),

/***/ "83b9":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var isAbsoluteURL = __webpack_require__("d925");
var combineURLs = __webpack_require__("e683");

/**
 * Creates a new URL by combining the baseURL with the requestedURL,
 * only when the requestedURL is not already an absolute URL.
 * If the requestURL is absolute, this function returns the requestedURL untouched.
 *
 * @param {string} baseURL The base URL
 * @param {string} requestedURL Absolute or relative URL to combine
 * @returns {string} The combined full path
 */
module.exports = function buildFullPath(baseURL, requestedURL) {
  if (baseURL && !isAbsoluteURL(requestedURL)) {
    return combineURLs(baseURL, requestedURL);
  }
  return requestedURL;
};


/***/ }),

/***/ "8418":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toPrimitive = __webpack_require__("c04e");
var definePropertyModule = __webpack_require__("9bf2");
var createPropertyDescriptor = __webpack_require__("5c6c");

module.exports = function (object, key, value) {
  var propertyKey = toPrimitive(key);
  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  else object[propertyKey] = value;
};


/***/ }),

/***/ "861d":
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),

/***/ "8875":
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
// MIT license
// source: https://github.com/amiller-gh/currentScript-polyfill

// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505

(function (root, factory) {
  if (true) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else {}
}(typeof self !== 'undefined' ? self : this, function () {
  function getCurrentScript () {
    var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
    // for chrome
    if (!descriptor && 'currentScript' in document && document.currentScript) {
      return document.currentScript
    }

    // for other browsers with native support for currentScript
    if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
      return document.currentScript
    }
  
    // IE 8-10 support script readyState
    // IE 11+ & Firefox support stack trace
    try {
      throw new Error();
    }
    catch (err) {
      // Find the second match for the "at" string to get file src url from stack.
      var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
        ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
        stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
        scriptLocation = (stackDetails && stackDetails[1]) || false,
        line = (stackDetails && stackDetails[2]) || false,
        currentLocation = document.location.href.replace(document.location.hash, ''),
        pageSource,
        inlineScriptSourceRegExp,
        inlineScriptSource,
        scripts = document.getElementsByTagName('script'); // Live NodeList collection
  
      if (scriptLocation === currentLocation) {
        pageSource = document.documentElement.outerHTML;
        inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
        inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
      }
  
      for (var i = 0; i < scripts.length; i++) {
        // If ready state is interactive, return the script tag
        if (scripts[i].readyState === 'interactive') {
          return scripts[i];
        }
  
        // If src matches, return the script tag
        if (scripts[i].src === scriptLocation) {
          return scripts[i];
        }
  
        // If inline source matches, return the script tag
        if (
          scriptLocation === currentLocation &&
          scripts[i].innerHTML &&
          scripts[i].innerHTML.trim() === inlineScriptSource
        ) {
          return scripts[i];
        }
      }
  
      // If no match, return null
      return null;
    }
  };

  return getCurrentScript
}));


/***/ }),

/***/ "88bc":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {/**
 * lodash (Custom Build) <https://lodash.com/>
 * Build: `lodash modularize exports="npm" -o ./`
 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
    MAX_SAFE_INTEGER = 9007199254740991;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
    funcTag = '[object Function]',
    genTag = '[object GeneratorFunction]',
    symbolTag = '[object Symbol]';

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/**
 * A faster alternative to `Function#apply`, this function invokes `func`
 * with the `this` binding of `thisArg` and the arguments of `args`.
 *
 * @private
 * @param {Function} func The function to invoke.
 * @param {*} thisArg The `this` binding of `func`.
 * @param {Array} args The arguments to invoke `func` with.
 * @returns {*} Returns the result of `func`.
 */
function apply(func, thisArg, args) {
  switch (args.length) {
    case 0: return func.call(thisArg);
    case 1: return func.call(thisArg, args[0]);
    case 2: return func.call(thisArg, args[0], args[1]);
    case 3: return func.call(thisArg, args[0], args[1], args[2]);
  }
  return func.apply(thisArg, args);
}

/**
 * A specialized version of `_.map` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the new mapped array.
 */
function arrayMap(array, iteratee) {
  var index = -1,
      length = array ? array.length : 0,
      result = Array(length);

  while (++index < length) {
    result[index] = iteratee(array[index], index, array);
  }
  return result;
}

/**
 * Appends the elements of `values` to `array`.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {Array} values The values to append.
 * @returns {Array} Returns `array`.
 */
function arrayPush(array, values) {
  var index = -1,
      length = values.length,
      offset = array.length;

  while (++index < length) {
    array[offset + index] = values[index];
  }
  return array;
}

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var objectToString = objectProto.toString;

/** Built-in value references. */
var Symbol = root.Symbol,
    propertyIsEnumerable = objectProto.propertyIsEnumerable,
    spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;

/**
 * The base implementation of `_.flatten` with support for restricting flattening.
 *
 * @private
 * @param {Array} array The array to flatten.
 * @param {number} depth The maximum recursion depth.
 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
 * @param {Array} [result=[]] The initial result value.
 * @returns {Array} Returns the new flattened array.
 */
function baseFlatten(array, depth, predicate, isStrict, result) {
  var index = -1,
      length = array.length;

  predicate || (predicate = isFlattenable);
  result || (result = []);

  while (++index < length) {
    var value = array[index];
    if (depth > 0 && predicate(value)) {
      if (depth > 1) {
        // Recursively flatten arrays (susceptible to call stack limits).
        baseFlatten(value, depth - 1, predicate, isStrict, result);
      } else {
        arrayPush(result, value);
      }
    } else if (!isStrict) {
      result[result.length] = value;
    }
  }
  return result;
}

/**
 * The base implementation of `_.pick` without support for individual
 * property identifiers.
 *
 * @private
 * @param {Object} object The source object.
 * @param {string[]} props The property identifiers to pick.
 * @returns {Object} Returns the new object.
 */
function basePick(object, props) {
  object = Object(object);
  return basePickBy(object, props, function(value, key) {
    return key in object;
  });
}

/**
 * The base implementation of  `_.pickBy` without support for iteratee shorthands.
 *
 * @private
 * @param {Object} object The source object.
 * @param {string[]} props The property identifiers to pick from.
 * @param {Function} predicate The function invoked per property.
 * @returns {Object} Returns the new object.
 */
function basePickBy(object, props, predicate) {
  var index = -1,
      length = props.length,
      result = {};

  while (++index < length) {
    var key = props[index],
        value = object[key];

    if (predicate(value, key)) {
      result[key] = value;
    }
  }
  return result;
}

/**
 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
 *
 * @private
 * @param {Function} func The function to apply a rest parameter to.
 * @param {number} [start=func.length-1] The start position of the rest parameter.
 * @returns {Function} Returns the new function.
 */
function baseRest(func, start) {
  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  return function() {
    var args = arguments,
        index = -1,
        length = nativeMax(args.length - start, 0),
        array = Array(length);

    while (++index < length) {
      array[index] = args[start + index];
    }
    index = -1;
    var otherArgs = Array(start + 1);
    while (++index < start) {
      otherArgs[index] = args[index];
    }
    otherArgs[start] = array;
    return apply(func, this, otherArgs);
  };
}

/**
 * Checks if `value` is a flattenable `arguments` object or array.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
 */
function isFlattenable(value) {
  return isArray(value) || isArguments(value) ||
    !!(spreadableSymbol && value && value[spreadableSymbol]);
}

/**
 * Converts `value` to a string key if it's not a string or symbol.
 *
 * @private
 * @param {*} value The value to inspect.
 * @returns {string|symbol} Returns the key.
 */
function toKey(value) {
  if (typeof value == 'string' || isSymbol(value)) {
    return value;
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
function isArguments(value) {
  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
    (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

/**
 * This method is like `_.isArrayLike` except that it also checks if `value`
 * is an object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array-like object,
 *  else `false`.
 * @example
 *
 * _.isArrayLikeObject([1, 2, 3]);
 * // => true
 *
 * _.isArrayLikeObject(document.body.children);
 * // => true
 *
 * _.isArrayLikeObject('abc');
 * // => false
 *
 * _.isArrayLikeObject(_.noop);
 * // => false
 */
function isArrayLikeObject(value) {
  return isObjectLike(value) && isArrayLike(value);
}

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 8-9 which returns 'object' for typed array and other constructors.
  var tag = isObject(value) ? objectToString.call(value) : '';
  return tag == funcTag || tag == genTag;
}

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return !!value && (type == 'object' || type == 'function');
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return !!value && typeof value == 'object';
}

/**
 * Checks if `value` is classified as a `Symbol` primitive or object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
 * @example
 *
 * _.isSymbol(Symbol.iterator);
 * // => true
 *
 * _.isSymbol('abc');
 * // => false
 */
function isSymbol(value) {
  return typeof value == 'symbol' ||
    (isObjectLike(value) && objectToString.call(value) == symbolTag);
}

/**
 * Creates an object composed of the picked `object` properties.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The source object.
 * @param {...(string|string[])} [props] The property identifiers to pick.
 * @returns {Object} Returns the new object.
 * @example
 *
 * var object = { 'a': 1, 'b': '2', 'c': 3 };
 *
 * _.pick(object, ['a', 'c']);
 * // => { 'a': 1, 'c': 3 }
 */
var pick = baseRest(function(object, props) {
  return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
});

module.exports = pick;

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))

/***/ }),

/***/ "8925":
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__("c6cd");

var functionToString = Function.toString;

// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
  store.inspectSource = function (it) {
    return functionToString.call(it);
  };
}

module.exports = store.inspectSource;


/***/ }),

/***/ "8aa5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var charAt = __webpack_require__("6547").charAt;

// `AdvanceStringIndex` abstract operation
// https://tc39.es/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
  return index + (unicode ? charAt(S, index).length : 1);
};


/***/ }),

/***/ "8df4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var Cancel = __webpack_require__("7a77");

/**
 * A `CancelToken` is an object that can be used to request cancellation of an operation.
 *
 * @class
 * @param {Function} executor The executor function.
 */
function CancelToken(executor) {
  if (typeof executor !== 'function') {
    throw new TypeError('executor must be a function.');
  }

  var resolvePromise;
  this.promise = new Promise(function promiseExecutor(resolve) {
    resolvePromise = resolve;
  });

  var token = this;
  executor(function cancel(message) {
    if (token.reason) {
      // Cancellation has already been requested
      return;
    }

    token.reason = new Cancel(message);
    resolvePromise(token.reason);
  });
}

/**
 * Throws a `Cancel` if cancellation has been requested.
 */
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  if (this.reason) {
    throw this.reason;
  }
};

/**
 * Returns an object that contains a new `CancelToken` and a function that, when called,
 * cancels the `CancelToken`.
 */
CancelToken.source = function source() {
  var cancel;
  var token = new CancelToken(function executor(c) {
    cancel = c;
  });
  return {
    token: token,
    cancel: cancel
  };
};

module.exports = CancelToken;


/***/ }),

/***/ "90e3":
/***/ (function(module, exports) {

var id = 0;
var postfix = Math.random();

module.exports = function (key) {
  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};


/***/ }),

/***/ "9112":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var definePropertyModule = __webpack_require__("9bf2");
var createPropertyDescriptor = __webpack_require__("5c6c");

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),

/***/ "9263":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var regexpFlags = __webpack_require__("ad6d");
var stickyHelpers = __webpack_require__("9f7f");

var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;

var patchedExec = nativeExec;

var UPDATES_LAST_INDEX_WRONG = (function () {
  var re1 = /a/;
  var re2 = /b*/g;
  nativeExec.call(re1, 'a');
  nativeExec.call(re2, 'a');
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
})();

var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;

// nonparticipating capturing group, copied from es5-shim's String#split patch.
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;

var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;

if (PATCH) {
  patchedExec = function exec(str) {
    var re = this;
    var lastIndex, reCopy, match, i;
    var sticky = UNSUPPORTED_Y && re.sticky;
    var flags = regexpFlags.call(re);
    var source = re.source;
    var charsAdded = 0;
    var strCopy = str;

    if (sticky) {
      flags = flags.replace('y', '');
      if (flags.indexOf('g') === -1) {
        flags += 'g';
      }

      strCopy = String(str).slice(re.lastIndex);
      // Support anchored sticky behavior.
      if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
        source = '(?: ' + source + ')';
        strCopy = ' ' + strCopy;
        charsAdded++;
      }
      // ^(? + rx + ) is needed, in combination with some str slicing, to
      // simulate the 'y' flag.
      reCopy = new RegExp('^(?:' + source + ')', flags);
    }

    if (NPCG_INCLUDED) {
      reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
    }
    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;

    match = nativeExec.call(sticky ? reCopy : re, strCopy);

    if (sticky) {
      if (match) {
        match.input = match.input.slice(charsAdded);
        match[0] = match[0].slice(charsAdded);
        match.index = re.lastIndex;
        re.lastIndex += match[0].length;
      } else re.lastIndex = 0;
    } else if (UPDATES_LAST_INDEX_WRONG && match) {
      re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
    }
    if (NPCG_INCLUDED && match && match.length > 1) {
      // Fix browsers whose `exec` methods don't consistently return `undefined`
      // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
      nativeReplace.call(match[0], reCopy, function () {
        for (i = 1; i < arguments.length - 2; i++) {
          if (arguments[i] === undefined) match[i] = undefined;
        }
      });
    }

    return match;
  };
}

module.exports = patchedExec;


/***/ }),

/***/ "94ca":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value == POLYFILL ? true
    : value == NATIVE ? false
    : typeof detection == 'function' ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ }),

/***/ "962e":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Workspace_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("eee5");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Workspace_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Workspace_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "96cf":
/***/ (function(module, exports) {

/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

!(function(global) {
  "use strict";

  var Op = Object.prototype;
  var hasOwn = Op.hasOwnProperty;
  var undefined; // More compressible than void 0.
  var $Symbol = typeof Symbol === "function" ? Symbol : {};
  var iteratorSymbol = $Symbol.iterator || "@@iterator";
  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";

  var inModule = typeof module === "object";
  var runtime = global.regeneratorRuntime;
  if (runtime) {
    if (inModule) {
      // If regeneratorRuntime is defined globally and we're in a module,
      // make the exports object identical to regeneratorRuntime.
      module.exports = runtime;
    }
    // Don't bother evaluating the rest of this file if the runtime was
    // already defined globally.
    return;
  }

  // Define the runtime globally (as expected by generated code) as either
  // module.exports (if we're in a module) or a new, empty object.
  runtime = global.regeneratorRuntime = inModule ? module.exports : {};

  function wrap(innerFn, outerFn, self, tryLocsList) {
    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
    var generator = Object.create(protoGenerator.prototype);
    var context = new Context(tryLocsList || []);

    // The ._invoke method unifies the implementations of the .next,
    // .throw, and .return methods.
    generator._invoke = makeInvokeMethod(innerFn, self, context);

    return generator;
  }
  runtime.wrap = wrap;

  // Try/catch helper to minimize deoptimizations. Returns a completion
  // record like context.tryEntries[i].completion. This interface could
  // have been (and was previously) designed to take a closure to be
  // invoked without arguments, but in all the cases we care about we
  // already have an existing method we want to call, so there's no need
  // to create a new function object. We can even get away with assuming
  // the method takes exactly one argument, since that happens to be true
  // in every case, so we don't have to touch the arguments object. The
  // only additional allocation required is the completion record, which
  // has a stable shape and so hopefully should be cheap to allocate.
  function tryCatch(fn, obj, arg) {
    try {
      return { type: "normal", arg: fn.call(obj, arg) };
    } catch (err) {
      return { type: "throw", arg: err };
    }
  }

  var GenStateSuspendedStart = "suspendedStart";
  var GenStateSuspendedYield = "suspendedYield";
  var GenStateExecuting = "executing";
  var GenStateCompleted = "completed";

  // Returning this object from the innerFn has the same effect as
  // breaking out of the dispatch switch statement.
  var ContinueSentinel = {};

  // Dummy constructor functions that we use as the .constructor and
  // .constructor.prototype properties for functions that return Generator
  // objects. For full spec compliance, you may wish to configure your
  // minifier not to mangle the names of these two functions.
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}

  // This is a polyfill for %IteratorPrototype% for environments that
  // don't natively support it.
  var IteratorPrototype = {};
  IteratorPrototype[iteratorSymbol] = function () {
    return this;
  };

  var getProto = Object.getPrototypeOf;
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  if (NativeIteratorPrototype &&
      NativeIteratorPrototype !== Op &&
      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
    // This environment has a native %IteratorPrototype%; use it instead
    // of the polyfill.
    IteratorPrototype = NativeIteratorPrototype;
  }

  var Gp = GeneratorFunctionPrototype.prototype =
    Generator.prototype = Object.create(IteratorPrototype);
  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  GeneratorFunctionPrototype.constructor = GeneratorFunction;
  GeneratorFunctionPrototype[toStringTagSymbol] =
    GeneratorFunction.displayName = "GeneratorFunction";

  // Helper for defining the .next, .throw, and .return methods of the
  // Iterator interface in terms of a single ._invoke method.
  function defineIteratorMethods(prototype) {
    ["next", "throw", "return"].forEach(function(method) {
      prototype[method] = function(arg) {
        return this._invoke(method, arg);
      };
    });
  }

  runtime.isGeneratorFunction = function(genFun) {
    var ctor = typeof genFun === "function" && genFun.constructor;
    return ctor
      ? ctor === GeneratorFunction ||
        // For the native GeneratorFunction constructor, the best we can
        // do is to check its .name property.
        (ctor.displayName || ctor.name) === "GeneratorFunction"
      : false;
  };

  runtime.mark = function(genFun) {
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
    } else {
      genFun.__proto__ = GeneratorFunctionPrototype;
      if (!(toStringTagSymbol in genFun)) {
        genFun[toStringTagSymbol] = "GeneratorFunction";
      }
    }
    genFun.prototype = Object.create(Gp);
    return genFun;
  };

  // Within the body of any async function, `await x` is transformed to
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
  // meant to be awaited.
  runtime.awrap = function(arg) {
    return { __await: arg };
  };

  function AsyncIterator(generator) {
    function invoke(method, arg, resolve, reject) {
      var record = tryCatch(generator[method], generator, arg);
      if (record.type === "throw") {
        reject(record.arg);
      } else {
        var result = record.arg;
        var value = result.value;
        if (value &&
            typeof value === "object" &&
            hasOwn.call(value, "__await")) {
          return Promise.resolve(value.__await).then(function(value) {
            invoke("next", value, resolve, reject);
          }, function(err) {
            invoke("throw", err, resolve, reject);
          });
        }

        return Promise.resolve(value).then(function(unwrapped) {
          // When a yielded Promise is resolved, its final value becomes
          // the .value of the Promise<{value,done}> result for the
          // current iteration. If the Promise is rejected, however, the
          // result for this iteration will be rejected with the same
          // reason. Note that rejections of yielded Promises are not
          // thrown back into the generator function, as is the case
          // when an awaited Promise is rejected. This difference in
          // behavior between yield and await is important, because it
          // allows the consumer to decide what to do with the yielded
          // rejection (swallow it and continue, manually .throw it back
          // into the generator, abandon iteration, whatever). With
          // await, by contrast, there is no opportunity to examine the
          // rejection reason outside the generator function, so the
          // only option is to throw it from the await expression, and
          // let the generator function handle the exception.
          result.value = unwrapped;
          resolve(result);
        }, reject);
      }
    }

    var previousPromise;

    function enqueue(method, arg) {
      function callInvokeWithMethodAndArg() {
        return new Promise(function(resolve, reject) {
          invoke(method, arg, resolve, reject);
        });
      }

      return previousPromise =
        // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        previousPromise ? previousPromise.then(
          callInvokeWithMethodAndArg,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          callInvokeWithMethodAndArg
        ) : callInvokeWithMethodAndArg();
    }

    // Define the unified helper method that is used to implement .next,
    // .throw, and .return (see defineIteratorMethods).
    this._invoke = enqueue;
  }

  defineIteratorMethods(AsyncIterator.prototype);
  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
    return this;
  };
  runtime.AsyncIterator = AsyncIterator;

  // Note that simple async functions are implemented on top of
  // AsyncIterator objects; they just return a Promise for the value of
  // the final result produced by the iterator.
  runtime.async = function(innerFn, outerFn, self, tryLocsList) {
    var iter = new AsyncIterator(
      wrap(innerFn, outerFn, self, tryLocsList)
    );

    return runtime.isGeneratorFunction(outerFn)
      ? iter // If outerFn is a generator, return the full iterator.
      : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
  };

  function makeInvokeMethod(innerFn, self, context) {
    var state = GenStateSuspendedStart;

    return function invoke(method, arg) {
      if (state === GenStateExecuting) {
        throw new Error("Generator is already running");
      }

      if (state === GenStateCompleted) {
        if (method === "throw") {
          throw arg;
        }

        // Be forgiving, per 25.3.3.3.3 of the spec:
        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
        return doneResult();
      }

      context.method = method;
      context.arg = arg;

      while (true) {
        var delegate = context.delegate;
        if (delegate) {
          var delegateResult = maybeInvokeDelegate(delegate, context);
          if (delegateResult) {
            if (delegateResult === ContinueSentinel) continue;
            return delegateResult;
          }
        }

        if (context.method === "next") {
          // Setting context._sent for legacy support of Babel's
          // function.sent implementation.
          context.sent = context._sent = context.arg;

        } else if (context.method === "throw") {
          if (state === GenStateSuspendedStart) {
            state = GenStateCompleted;
            throw context.arg;
          }

          context.dispatchException(context.arg);

        } else if (context.method === "return") {
          context.abrupt("return", context.arg);
        }

        state = GenStateExecuting;

        var record = tryCatch(innerFn, self, context);
        if (record.type === "normal") {
          // If an exception is thrown from innerFn, we leave state ===
          // GenStateExecuting and loop back for another invocation.
          state = context.done
            ? GenStateCompleted
            : GenStateSuspendedYield;

          if (record.arg === ContinueSentinel) {
            continue;
          }

          return {
            value: record.arg,
            done: context.done
          };

        } else if (record.type === "throw") {
          state = GenStateCompleted;
          // Dispatch the exception by looping back around to the
          // context.dispatchException(context.arg) call above.
          context.method = "throw";
          context.arg = record.arg;
        }
      }
    };
  }

  // Call delegate.iterator[context.method](context.arg) and handle the
  // result, either by returning a { value, done } result from the
  // delegate iterator, or by modifying context.method and context.arg,
  // setting context.delegate to null, and returning the ContinueSentinel.
  function maybeInvokeDelegate(delegate, context) {
    var method = delegate.iterator[context.method];
    if (method === undefined) {
      // A .throw or .return when the delegate iterator has no .throw
      // method always terminates the yield* loop.
      context.delegate = null;

      if (context.method === "throw") {
        if (delegate.iterator.return) {
          // If the delegate iterator has a return method, give it a
          // chance to clean up.
          context.method = "return";
          context.arg = undefined;
          maybeInvokeDelegate(delegate, context);

          if (context.method === "throw") {
            // If maybeInvokeDelegate(context) changed context.method from
            // "return" to "throw", let that override the TypeError below.
            return ContinueSentinel;
          }
        }

        context.method = "throw";
        context.arg = new TypeError(
          "The iterator does not provide a 'throw' method");
      }

      return ContinueSentinel;
    }

    var record = tryCatch(method, delegate.iterator, context.arg);

    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }

    var info = record.arg;

    if (! info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }

    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value;

      // Resume execution at the desired location (see delegateYield).
      context.next = delegate.nextLoc;

      // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined;
      }

    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    }

    // The delegate iterator is finished, so forget it and continue with
    // the outer generator.
    context.delegate = null;
    return ContinueSentinel;
  }

  // Define Generator.prototype.{next,throw,return} in terms of the
  // unified ._invoke helper method.
  defineIteratorMethods(Gp);

  Gp[toStringTagSymbol] = "Generator";

  // A Generator should always return itself as the iterator object when the
  // @@iterator function is called on it. Some browsers' implementations of the
  // iterator prototype chain incorrectly implement this, causing the Generator
  // object to not be returned from this call. This ensures that doesn't happen.
  // See https://github.com/facebook/regenerator/issues/274 for more details.
  Gp[iteratorSymbol] = function() {
    return this;
  };

  Gp.toString = function() {
    return "[object Generator]";
  };

  function pushTryEntry(locs) {
    var entry = { tryLoc: locs[0] };

    if (1 in locs) {
      entry.catchLoc = locs[1];
    }

    if (2 in locs) {
      entry.finallyLoc = locs[2];
      entry.afterLoc = locs[3];
    }

    this.tryEntries.push(entry);
  }

  function resetTryEntry(entry) {
    var record = entry.completion || {};
    record.type = "normal";
    delete record.arg;
    entry.completion = record;
  }

  function Context(tryLocsList) {
    // The root entry object (effectively a try statement without a catch
    // or a finally block) gives us a place to store values thrown from
    // locations where there is no enclosing try statement.
    this.tryEntries = [{ tryLoc: "root" }];
    tryLocsList.forEach(pushTryEntry, this);
    this.reset(true);
  }

  runtime.keys = function(object) {
    var keys = [];
    for (var key in object) {
      keys.push(key);
    }
    keys.reverse();

    // Rather than returning an object with a next method, we keep
    // things simple and return the next function itself.
    return function next() {
      while (keys.length) {
        var key = keys.pop();
        if (key in object) {
          next.value = key;
          next.done = false;
          return next;
        }
      }

      // To avoid creating an additional object, we just hang the .value
      // and .done properties off the next function object itself. This
      // also ensures that the minifier will not anonymize the function.
      next.done = true;
      return next;
    };
  };

  function values(iterable) {
    if (iterable) {
      var iteratorMethod = iterable[iteratorSymbol];
      if (iteratorMethod) {
        return iteratorMethod.call(iterable);
      }

      if (typeof iterable.next === "function") {
        return iterable;
      }

      if (!isNaN(iterable.length)) {
        var i = -1, next = function next() {
          while (++i < iterable.length) {
            if (hasOwn.call(iterable, i)) {
              next.value = iterable[i];
              next.done = false;
              return next;
            }
          }

          next.value = undefined;
          next.done = true;

          return next;
        };

        return next.next = next;
      }
    }

    // Return an iterator with no values.
    return { next: doneResult };
  }
  runtime.values = values;

  function doneResult() {
    return { value: undefined, done: true };
  }

  Context.prototype = {
    constructor: Context,

    reset: function(skipTempReset) {
      this.prev = 0;
      this.next = 0;
      // Resetting context._sent for legacy support of Babel's
      // function.sent implementation.
      this.sent = this._sent = undefined;
      this.done = false;
      this.delegate = null;

      this.method = "next";
      this.arg = undefined;

      this.tryEntries.forEach(resetTryEntry);

      if (!skipTempReset) {
        for (var name in this) {
          // Not sure about the optimal order of these conditions:
          if (name.charAt(0) === "t" &&
              hasOwn.call(this, name) &&
              !isNaN(+name.slice(1))) {
            this[name] = undefined;
          }
        }
      }
    },

    stop: function() {
      this.done = true;

      var rootEntry = this.tryEntries[0];
      var rootRecord = rootEntry.completion;
      if (rootRecord.type === "throw") {
        throw rootRecord.arg;
      }

      return this.rval;
    },

    dispatchException: function(exception) {
      if (this.done) {
        throw exception;
      }

      var context = this;
      function handle(loc, caught) {
        record.type = "throw";
        record.arg = exception;
        context.next = loc;

        if (caught) {
          // If the dispatched exception was caught by a catch block,
          // then let that catch block handle the exception normally.
          context.method = "next";
          context.arg = undefined;
        }

        return !! caught;
      }

      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        var record = entry.completion;

        if (entry.tryLoc === "root") {
          // Exception thrown outside of any try block that could handle
          // it, so set the completion value of the entire function to
          // throw the exception.
          return handle("end");
        }

        if (entry.tryLoc <= this.prev) {
          var hasCatch = hasOwn.call(entry, "catchLoc");
          var hasFinally = hasOwn.call(entry, "finallyLoc");

          if (hasCatch && hasFinally) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            } else if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else if (hasCatch) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            }

          } else if (hasFinally) {
            if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }

          } else {
            throw new Error("try statement without catch or finally");
          }
        }
      }
    },

    abrupt: function(type, arg) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc <= this.prev &&
            hasOwn.call(entry, "finallyLoc") &&
            this.prev < entry.finallyLoc) {
          var finallyEntry = entry;
          break;
        }
      }

      if (finallyEntry &&
          (type === "break" ||
           type === "continue") &&
          finallyEntry.tryLoc <= arg &&
          arg <= finallyEntry.finallyLoc) {
        // Ignore the finally entry if control is not jumping to a
        // location outside the try/catch block.
        finallyEntry = null;
      }

      var record = finallyEntry ? finallyEntry.completion : {};
      record.type = type;
      record.arg = arg;

      if (finallyEntry) {
        this.method = "next";
        this.next = finallyEntry.finallyLoc;
        return ContinueSentinel;
      }

      return this.complete(record);
    },

    complete: function(record, afterLoc) {
      if (record.type === "throw") {
        throw record.arg;
      }

      if (record.type === "break" ||
          record.type === "continue") {
        this.next = record.arg;
      } else if (record.type === "return") {
        this.rval = this.arg = record.arg;
        this.method = "return";
        this.next = "end";
      } else if (record.type === "normal" && afterLoc) {
        this.next = afterLoc;
      }

      return ContinueSentinel;
    },

    finish: function(finallyLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.finallyLoc === finallyLoc) {
          this.complete(entry.completion, entry.afterLoc);
          resetTryEntry(entry);
          return ContinueSentinel;
        }
      }
    },

    "catch": function(tryLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc === tryLoc) {
          var record = entry.completion;
          if (record.type === "throw") {
            var thrown = record.arg;
            resetTryEntry(entry);
          }
          return thrown;
        }
      }

      // The context.catch method must only be called with a location
      // argument that corresponds to a known catch block.
      throw new Error("illegal catch attempt");
    },

    delegateYield: function(iterable, resultName, nextLoc) {
      this.delegate = {
        iterator: values(iterable),
        resultName: resultName,
        nextLoc: nextLoc
      };

      if (this.method === "next") {
        // Deliberately forget the last sent value so that we don't
        // accidentally pass it on to the delegate.
        this.arg = undefined;
      }

      return ContinueSentinel;
    }
  };
})(
  // In sloppy mode, unbound `this` refers to the global object, fallback to
  // Function constructor if we're in global strict mode. That is sadly a form
  // of indirect eval which violates Content Security Policy.
  (function() { return this })() || Function("return this")()
);


/***/ }),

/***/ "9861":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
__webpack_require__("e260");
var $ = __webpack_require__("23e7");
var getBuiltIn = __webpack_require__("d066");
var USE_NATIVE_URL = __webpack_require__("0d3b");
var redefine = __webpack_require__("6eeb");
var redefineAll = __webpack_require__("e2cc");
var setToStringTag = __webpack_require__("d44e");
var createIteratorConstructor = __webpack_require__("9ed3");
var InternalStateModule = __webpack_require__("69f3");
var anInstance = __webpack_require__("19aa");
var hasOwn = __webpack_require__("5135");
var bind = __webpack_require__("0366");
var classof = __webpack_require__("f5df");
var anObject = __webpack_require__("825a");
var isObject = __webpack_require__("861d");
var create = __webpack_require__("7c73");
var createPropertyDescriptor = __webpack_require__("5c6c");
var getIterator = __webpack_require__("9a1f");
var getIteratorMethod = __webpack_require__("35a1");
var wellKnownSymbol = __webpack_require__("b622");

var $fetch = getBuiltIn('fetch');
var Headers = getBuiltIn('Headers');
var ITERATOR = wellKnownSymbol('iterator');
var URL_SEARCH_PARAMS = 'URLSearchParams';
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
var setInternalState = InternalStateModule.set;
var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);

var plus = /\+/g;
var sequences = Array(4);

var percentSequence = function (bytes) {
  return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
};

var percentDecode = function (sequence) {
  try {
    return decodeURIComponent(sequence);
  } catch (error) {
    return sequence;
  }
};

var deserialize = function (it) {
  var result = it.replace(plus, ' ');
  var bytes = 4;
  try {
    return decodeURIComponent(result);
  } catch (error) {
    while (bytes) {
      result = result.replace(percentSequence(bytes--), percentDecode);
    }
    return result;
  }
};

var find = /[!'()~]|%20/g;

var replace = {
  '!': '%21',
  "'": '%27',
  '(': '%28',
  ')': '%29',
  '~': '%7E',
  '%20': '+'
};

var replacer = function (match) {
  return replace[match];
};

var serialize = function (it) {
  return encodeURIComponent(it).replace(find, replacer);
};

var parseSearchParams = function (result, query) {
  if (query) {
    var attributes = query.split('&');
    var index = 0;
    var attribute, entry;
    while (index < attributes.length) {
      attribute = attributes[index++];
      if (attribute.length) {
        entry = attribute.split('=');
        result.push({
          key: deserialize(entry.shift()),
          value: deserialize(entry.join('='))
        });
      }
    }
  }
};

var updateSearchParams = function (query) {
  this.entries.length = 0;
  parseSearchParams(this.entries, query);
};

var validateArgumentsLength = function (passed, required) {
  if (passed < required) throw TypeError('Not enough arguments');
};

var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
  setInternalState(this, {
    type: URL_SEARCH_PARAMS_ITERATOR,
    iterator: getIterator(getInternalParamsState(params).entries),
    kind: kind
  });
}, 'Iterator', function next() {
  var state = getInternalIteratorState(this);
  var kind = state.kind;
  var step = state.iterator.next();
  var entry = step.value;
  if (!step.done) {
    step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
  } return step;
});

// `URLSearchParams` constructor
// https://url.spec.whatwg.org/#interface-urlsearchparams
var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
  anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  var init = arguments.length > 0 ? arguments[0] : undefined;
  var that = this;
  var entries = [];
  var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;

  setInternalState(that, {
    type: URL_SEARCH_PARAMS,
    entries: entries,
    updateURL: function () { /* empty */ },
    updateSearchParams: updateSearchParams
  });

  if (init !== undefined) {
    if (isObject(init)) {
      iteratorMethod = getIteratorMethod(init);
      if (typeof iteratorMethod === 'function') {
        iterator = iteratorMethod.call(init);
        next = iterator.next;
        while (!(step = next.call(iterator)).done) {
          entryIterator = getIterator(anObject(step.value));
          entryNext = entryIterator.next;
          if (
            (first = entryNext.call(entryIterator)).done ||
            (second = entryNext.call(entryIterator)).done ||
            !entryNext.call(entryIterator).done
          ) throw TypeError('Expected sequence with length 2');
          entries.push({ key: first.value + '', value: second.value + '' });
        }
      } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
    } else {
      parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
    }
  }
};

var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;

redefineAll(URLSearchParamsPrototype, {
  // `URLSearchParams.prototype.append` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-append
  append: function append(name, value) {
    validateArgumentsLength(arguments.length, 2);
    var state = getInternalParamsState(this);
    state.entries.push({ key: name + '', value: value + '' });
    state.updateURL();
  },
  // `URLSearchParams.prototype.delete` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
  'delete': function (name) {
    validateArgumentsLength(arguments.length, 1);
    var state = getInternalParamsState(this);
    var entries = state.entries;
    var key = name + '';
    var index = 0;
    while (index < entries.length) {
      if (entries[index].key === key) entries.splice(index, 1);
      else index++;
    }
    state.updateURL();
  },
  // `URLSearchParams.prototype.get` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-get
  get: function get(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var index = 0;
    for (; index < entries.length; index++) {
      if (entries[index].key === key) return entries[index].value;
    }
    return null;
  },
  // `URLSearchParams.prototype.getAll` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
  getAll: function getAll(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var result = [];
    var index = 0;
    for (; index < entries.length; index++) {
      if (entries[index].key === key) result.push(entries[index].value);
    }
    return result;
  },
  // `URLSearchParams.prototype.has` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-has
  has: function has(name) {
    validateArgumentsLength(arguments.length, 1);
    var entries = getInternalParamsState(this).entries;
    var key = name + '';
    var index = 0;
    while (index < entries.length) {
      if (entries[index++].key === key) return true;
    }
    return false;
  },
  // `URLSearchParams.prototype.set` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-set
  set: function set(name, value) {
    validateArgumentsLength(arguments.length, 1);
    var state = getInternalParamsState(this);
    var entries = state.entries;
    var found = false;
    var key = name + '';
    var val = value + '';
    var index = 0;
    var entry;
    for (; index < entries.length; index++) {
      entry = entries[index];
      if (entry.key === key) {
        if (found) entries.splice(index--, 1);
        else {
          found = true;
          entry.value = val;
        }
      }
    }
    if (!found) entries.push({ key: key, value: val });
    state.updateURL();
  },
  // `URLSearchParams.prototype.sort` method
  // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
  sort: function sort() {
    var state = getInternalParamsState(this);
    var entries = state.entries;
    // Array#sort is not stable in some engines
    var slice = entries.slice();
    var entry, entriesIndex, sliceIndex;
    entries.length = 0;
    for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
      entry = slice[sliceIndex];
      for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
        if (entries[entriesIndex].key > entry.key) {
          entries.splice(entriesIndex, 0, entry);
          break;
        }
      }
      if (entriesIndex === sliceIndex) entries.push(entry);
    }
    state.updateURL();
  },
  // `URLSearchParams.prototype.forEach` method
  forEach: function forEach(callback /* , thisArg */) {
    var entries = getInternalParamsState(this).entries;
    var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
    var index = 0;
    var entry;
    while (index < entries.length) {
      entry = entries[index++];
      boundFunction(entry.value, entry.key, this);
    }
  },
  // `URLSearchParams.prototype.keys` method
  keys: function keys() {
    return new URLSearchParamsIterator(this, 'keys');
  },
  // `URLSearchParams.prototype.values` method
  values: function values() {
    return new URLSearchParamsIterator(this, 'values');
  },
  // `URLSearchParams.prototype.entries` method
  entries: function entries() {
    return new URLSearchParamsIterator(this, 'entries');
  }
}, { enumerable: true });

// `URLSearchParams.prototype[@@iterator]` method
redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);

// `URLSearchParams.prototype.toString` method
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
redefine(URLSearchParamsPrototype, 'toString', function toString() {
  var entries = getInternalParamsState(this).entries;
  var result = [];
  var index = 0;
  var entry;
  while (index < entries.length) {
    entry = entries[index++];
    result.push(serialize(entry.key) + '=' + serialize(entry.value));
  } return result.join('&');
}, { enumerable: true });

setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);

$({ global: true, forced: !USE_NATIVE_URL }, {
  URLSearchParams: URLSearchParamsConstructor
});

// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
// https://github.com/zloirock/core-js/issues/674
if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
  $({ global: true, enumerable: true, forced: true }, {
    fetch: function fetch(input /* , init */) {
      var args = [input];
      var init, body, headers;
      if (arguments.length > 1) {
        init = arguments[1];
        if (isObject(init)) {
          body = init.body;
          if (classof(body) === URL_SEARCH_PARAMS) {
            headers = init.headers ? new Headers(init.headers) : new Headers();
            if (!headers.has('content-type')) {
              headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
            }
            init = create(init, {
              body: createPropertyDescriptor(0, String(body)),
              headers: createPropertyDescriptor(0, headers)
            });
          }
        }
        args.push(init);
      } return $fetch.apply(this, args);
    }
  });
}

module.exports = {
  URLSearchParams: URLSearchParamsConstructor,
  getState: getInternalParamsState
};


/***/ }),

/***/ "99af":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var fails = __webpack_require__("d039");
var isArray = __webpack_require__("e8b5");
var isObject = __webpack_require__("861d");
var toObject = __webpack_require__("7b0b");
var toLength = __webpack_require__("50c4");
var createProperty = __webpack_require__("8418");
var arraySpeciesCreate = __webpack_require__("65f0");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var wellKnownSymbol = __webpack_require__("b622");
var V8_VERSION = __webpack_require__("2d00");

var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';

// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  var array = [];
  array[IS_CONCAT_SPREADABLE] = false;
  return array.concat()[0] !== array;
});

var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');

var isConcatSpreadable = function (O) {
  if (!isObject(O)) return false;
  var spreadable = O[IS_CONCAT_SPREADABLE];
  return spreadable !== undefined ? !!spreadable : isArray(O);
};

var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;

// `Array.prototype.concat` method
// https://tc39.es/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, forced: FORCED }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  concat: function concat(arg) {
    var O = toObject(this);
    var A = arraySpeciesCreate(O, 0);
    var n = 0;
    var i, k, length, len, E;
    for (i = -1, length = arguments.length; i < length; i++) {
      E = i === -1 ? O : arguments[i];
      if (isConcatSpreadable(E)) {
        len = toLength(E.length);
        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
      } else {
        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
        createProperty(A, n++, E);
      }
    }
    A.length = n;
    return A;
  }
});


/***/ }),

/***/ "9a1f":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var getIteratorMethod = __webpack_require__("35a1");

module.exports = function (it) {
  var iteratorMethod = getIteratorMethod(it);
  if (typeof iteratorMethod != 'function') {
    throw TypeError(String(it) + ' is not iterable');
  } return anObject(iteratorMethod.call(it));
};


/***/ }),

/***/ "9b52":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "9bdd":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var iteratorClose = __webpack_require__("2a62");

// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
  try {
    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (error) {
    iteratorClose(iterator);
    throw error;
  }
};


/***/ }),

/***/ "9bf2":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var IE8_DOM_DEFINE = __webpack_require__("0cfb");
var anObject = __webpack_require__("825a");
var toPrimitive = __webpack_require__("c04e");

var nativeDefineProperty = Object.defineProperty;

// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return nativeDefineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),

/***/ "9cda":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PreviewToImg_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9b52");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PreviewToImg_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PreviewToImg_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "9ed3":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var IteratorPrototype = __webpack_require__("ae93").IteratorPrototype;
var create = __webpack_require__("7c73");
var createPropertyDescriptor = __webpack_require__("5c6c");
var setToStringTag = __webpack_require__("d44e");
var Iterators = __webpack_require__("3f8c");

var returnThis = function () { return this; };

module.exports = function (IteratorConstructor, NAME, next) {
  var TO_STRING_TAG = NAME + ' Iterator';
  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  Iterators[TO_STRING_TAG] = returnThis;
  return IteratorConstructor;
};


/***/ }),

/***/ "9f7f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var fails = __webpack_require__("d039");

// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
// so we use an intermediate function.
function RE(s, f) {
  return RegExp(s, f);
}

exports.UNSUPPORTED_Y = fails(function () {
  // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  var re = RE('a', 'y');
  re.lastIndex = 2;
  return re.exec('abcd') != null;
});

exports.BROKEN_CARET = fails(function () {
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  var re = RE('^r', 'gy');
  re.lastIndex = 2;
  return re.exec('str') != null;
});


/***/ }),

/***/ "a15b":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var IndexedObject = __webpack_require__("44ad");
var toIndexedObject = __webpack_require__("fc6a");
var arrayMethodIsStrict = __webpack_require__("a640");

var nativeJoin = [].join;

var ES3_STRINGS = IndexedObject != Object;
var STRICT_METHOD = arrayMethodIsStrict('join', ',');

// `Array.prototype.join` method
// https://tc39.es/ecma262/#sec-array.prototype.join
$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  join: function join(separator) {
    return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
  }
});


/***/ }),

/***/ "a434":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var toAbsoluteIndex = __webpack_require__("23cb");
var toInteger = __webpack_require__("a691");
var toLength = __webpack_require__("50c4");
var toObject = __webpack_require__("7b0b");
var arraySpeciesCreate = __webpack_require__("65f0");
var createProperty = __webpack_require__("8418");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');

var max = Math.max;
var min = Math.min;
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';

// `Array.prototype.splice` method
// https://tc39.es/ecma262/#sec-array.prototype.splice
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  splice: function splice(start, deleteCount /* , ...items */) {
    var O = toObject(this);
    var len = toLength(O.length);
    var actualStart = toAbsoluteIndex(start, len);
    var argumentsLength = arguments.length;
    var insertCount, actualDeleteCount, A, k, from, to;
    if (argumentsLength === 0) {
      insertCount = actualDeleteCount = 0;
    } else if (argumentsLength === 1) {
      insertCount = 0;
      actualDeleteCount = len - actualStart;
    } else {
      insertCount = argumentsLength - 2;
      actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
    }
    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
      throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
    }
    A = arraySpeciesCreate(O, actualDeleteCount);
    for (k = 0; k < actualDeleteCount; k++) {
      from = actualStart + k;
      if (from in O) createProperty(A, k, O[from]);
    }
    A.length = actualDeleteCount;
    if (insertCount < actualDeleteCount) {
      for (k = actualStart; k < len - actualDeleteCount; k++) {
        from = k + actualDeleteCount;
        to = k + insertCount;
        if (from in O) O[to] = O[from];
        else delete O[to];
      }
      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
    } else if (insertCount > actualDeleteCount) {
      for (k = len - actualDeleteCount; k > actualStart; k--) {
        from = k + actualDeleteCount - 1;
        to = k + insertCount - 1;
        if (from in O) O[to] = O[from];
        else delete O[to];
      }
    }
    for (k = 0; k < insertCount; k++) {
      O[k + actualStart] = arguments[k + 2];
    }
    O.length = len - actualDeleteCount + insertCount;
    return A;
  }
});


/***/ }),

/***/ "a4b4":
/***/ (function(module, exports, __webpack_require__) {

var userAgent = __webpack_require__("342f");

module.exports = /web0s(?!.*chrome)/i.test(userAgent);


/***/ }),

/***/ "a4d3":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var global = __webpack_require__("da84");
var getBuiltIn = __webpack_require__("d066");
var IS_PURE = __webpack_require__("c430");
var DESCRIPTORS = __webpack_require__("83ab");
var NATIVE_SYMBOL = __webpack_require__("4930");
var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");
var fails = __webpack_require__("d039");
var has = __webpack_require__("5135");
var isArray = __webpack_require__("e8b5");
var isObject = __webpack_require__("861d");
var anObject = __webpack_require__("825a");
var toObject = __webpack_require__("7b0b");
var toIndexedObject = __webpack_require__("fc6a");
var toPrimitive = __webpack_require__("c04e");
var createPropertyDescriptor = __webpack_require__("5c6c");
var nativeObjectCreate = __webpack_require__("7c73");
var objectKeys = __webpack_require__("df75");
var getOwnPropertyNamesModule = __webpack_require__("241c");
var getOwnPropertyNamesExternal = __webpack_require__("057f");
var getOwnPropertySymbolsModule = __webpack_require__("7418");
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
var definePropertyModule = __webpack_require__("9bf2");
var propertyIsEnumerableModule = __webpack_require__("d1e7");
var createNonEnumerableProperty = __webpack_require__("9112");
var redefine = __webpack_require__("6eeb");
var shared = __webpack_require__("5692");
var sharedKey = __webpack_require__("f772");
var hiddenKeys = __webpack_require__("d012");
var uid = __webpack_require__("90e3");
var wellKnownSymbol = __webpack_require__("b622");
var wrappedWellKnownSymbolModule = __webpack_require__("e538");
var defineWellKnownSymbol = __webpack_require__("746f");
var setToStringTag = __webpack_require__("d44e");
var InternalStateModule = __webpack_require__("69f3");
var $forEach = __webpack_require__("b727").forEach;

var HIDDEN = sharedKey('hidden');
var SYMBOL = 'Symbol';
var PROTOTYPE = 'prototype';
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(SYMBOL);
var ObjectPrototype = Object[PROTOTYPE];
var $Symbol = global.Symbol;
var $stringify = getBuiltIn('JSON', 'stringify');
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var nativeDefineProperty = definePropertyModule.f;
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
var AllSymbols = shared('symbols');
var ObjectPrototypeSymbols = shared('op-symbols');
var StringToSymbolRegistry = shared('string-to-symbol-registry');
var SymbolToStringRegistry = shared('symbol-to-string-registry');
var WellKnownSymbolsStore = shared('wks');
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;

// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  return nativeObjectCreate(nativeDefineProperty({}, 'a', {
    get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  })).a != 7;
}) ? function (O, P, Attributes) {
  var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  nativeDefineProperty(O, P, Attributes);
  if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
    nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  }
} : nativeDefineProperty;

var wrap = function (tag, description) {
  var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
  setInternalState(symbol, {
    type: SYMBOL,
    tag: tag,
    description: description
  });
  if (!DESCRIPTORS) symbol.description = description;
  return symbol;
};

var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  return Object(it) instanceof $Symbol;
};

var $defineProperty = function defineProperty(O, P, Attributes) {
  if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  anObject(O);
  var key = toPrimitive(P, true);
  anObject(Attributes);
  if (has(AllSymbols, key)) {
    if (!Attributes.enumerable) {
      if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
      O[HIDDEN][key] = true;
    } else {
      if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
      Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
    } return setSymbolDescriptor(O, key, Attributes);
  } return nativeDefineProperty(O, key, Attributes);
};

var $defineProperties = function defineProperties(O, Properties) {
  anObject(O);
  var properties = toIndexedObject(Properties);
  var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  $forEach(keys, function (key) {
    if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
  });
  return O;
};

var $create = function create(O, Properties) {
  return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
};

var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  var P = toPrimitive(V, true);
  var enumerable = nativePropertyIsEnumerable.call(this, P);
  if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
  return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
};

var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  var it = toIndexedObject(O);
  var key = toPrimitive(P, true);
  if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
  var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
    descriptor.enumerable = true;
  }
  return descriptor;
};

var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  var result = [];
  $forEach(names, function (key) {
    if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
  });
  return result;
};

var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
  var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  var result = [];
  $forEach(names, function (key) {
    if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
      result.push(AllSymbols[key]);
    }
  });
  return result;
};

// `Symbol` constructor
// https://tc39.es/ecma262/#sec-symbol-constructor
if (!NATIVE_SYMBOL) {
  $Symbol = function Symbol() {
    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
    var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
    var tag = uid(description);
    var setter = function (value) {
      if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
      setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
    };
    if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
    return wrap(tag, description);
  };

  redefine($Symbol[PROTOTYPE], 'toString', function toString() {
    return getInternalState(this).tag;
  });

  redefine($Symbol, 'withoutSetter', function (description) {
    return wrap(uid(description), description);
  });

  propertyIsEnumerableModule.f = $propertyIsEnumerable;
  definePropertyModule.f = $defineProperty;
  getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;

  wrappedWellKnownSymbolModule.f = function (name) {
    return wrap(wellKnownSymbol(name), name);
  };

  if (DESCRIPTORS) {
    // https://github.com/tc39/proposal-Symbol-description
    nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
      configurable: true,
      get: function description() {
        return getInternalState(this).description;
      }
    });
    if (!IS_PURE) {
      redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
    }
  }
}

$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  Symbol: $Symbol
});

$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  defineWellKnownSymbol(name);
});

$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  // `Symbol.for` method
  // https://tc39.es/ecma262/#sec-symbol.for
  'for': function (key) {
    var string = String(key);
    if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
    var symbol = $Symbol(string);
    StringToSymbolRegistry[string] = symbol;
    SymbolToStringRegistry[symbol] = string;
    return symbol;
  },
  // `Symbol.keyFor` method
  // https://tc39.es/ecma262/#sec-symbol.keyfor
  keyFor: function keyFor(sym) {
    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
    if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  },
  useSetter: function () { USE_SETTER = true; },
  useSimple: function () { USE_SETTER = false; }
});

$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  // `Object.create` method
  // https://tc39.es/ecma262/#sec-object.create
  create: $create,
  // `Object.defineProperty` method
  // https://tc39.es/ecma262/#sec-object.defineproperty
  defineProperty: $defineProperty,
  // `Object.defineProperties` method
  // https://tc39.es/ecma262/#sec-object.defineproperties
  defineProperties: $defineProperties,
  // `Object.getOwnPropertyDescriptor` method
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  getOwnPropertyDescriptor: $getOwnPropertyDescriptor
});

$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  // `Object.getOwnPropertyNames` method
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
  getOwnPropertyNames: $getOwnPropertyNames,
  // `Object.getOwnPropertySymbols` method
  // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
  getOwnPropertySymbols: $getOwnPropertySymbols
});

// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
  getOwnPropertySymbols: function getOwnPropertySymbols(it) {
    return getOwnPropertySymbolsModule.f(toObject(it));
  }
});

// `JSON.stringify` method behavior with symbols
// https://tc39.es/ecma262/#sec-json.stringify
if ($stringify) {
  var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
    var symbol = $Symbol();
    // MS Edge converts symbol values to JSON as {}
    return $stringify([symbol]) != '[null]'
      // WebKit converts symbol values to JSON as null
      || $stringify({ a: symbol }) != '{}'
      // V8 throws on boxed symbols
      || $stringify(Object(symbol)) != '{}';
  });

  $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
    // eslint-disable-next-line no-unused-vars -- required for `.length`
    stringify: function stringify(it, replacer, space) {
      var args = [it];
      var index = 1;
      var $replacer;
      while (arguments.length > index) args.push(arguments[index++]);
      $replacer = replacer;
      if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
      if (!isArray(replacer)) replacer = function (key, value) {
        if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
        if (!isSymbol(value)) return value;
      };
      args[1] = replacer;
      return $stringify.apply(null, args);
    }
  });
}

// `Symbol.prototype[@@toPrimitive]` method
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
  createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
}
// `Symbol.prototype[@@toStringTag]` property
// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
setToStringTag($Symbol, SYMBOL);

hiddenKeys[HIDDEN] = true;


/***/ }),

/***/ "a524":
/***/ (function(module) {

module.exports = JSON.parse("{\"version\":\"3.2.1\"}");

/***/ }),

/***/ "a630":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var from = __webpack_require__("4df4");
var checkCorrectnessOfIteration = __webpack_require__("1c7e");

var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  Array.from(iterable);
});

// `Array.from` method
// https://tc39.es/ecma262/#sec-array.from
$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  from: from
});


/***/ }),

/***/ "a640":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__("d039");

module.exports = function (METHOD_NAME, argument) {
  var method = [][METHOD_NAME];
  return !!method && fails(function () {
    // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
    method.call(null, argument || function () { throw 1; }, 1);
  });
};


/***/ }),

/***/ "a691":
/***/ (function(module, exports) {

var ceil = Math.ceil;
var floor = Math.floor;

// `ToInteger` abstract operation
// https://tc39.es/ecma262/#sec-tointeger
module.exports = function (argument) {
  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};


/***/ }),

/***/ "ab13":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");

var MATCH = wellKnownSymbol('match');

module.exports = function (METHOD_NAME) {
  var regexp = /./;
  try {
    '/./'[METHOD_NAME](regexp);
  } catch (error1) {
    try {
      regexp[MATCH] = false;
      return '/./'[METHOD_NAME](regexp);
    } catch (error2) { /* empty */ }
  } return false;
};


/***/ }),

/***/ "ac1f":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var exec = __webpack_require__("9263");

// `RegExp.prototype.exec` method
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  exec: exec
});


/***/ }),

/***/ "ad6d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var anObject = __webpack_require__("825a");

// `RegExp.prototype.flags` getter implementation
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
  var that = anObject(this);
  var result = '';
  if (that.global) result += 'g';
  if (that.ignoreCase) result += 'i';
  if (that.multiline) result += 'm';
  if (that.dotAll) result += 's';
  if (that.unicode) result += 'u';
  if (that.sticky) result += 'y';
  return result;
};


/***/ }),

/***/ "ae21":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AddParams_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1d5b");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AddParams_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AddParams_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "ae93":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var fails = __webpack_require__("d039");
var getPrototypeOf = __webpack_require__("e163");
var createNonEnumerableProperty = __webpack_require__("9112");
var has = __webpack_require__("5135");
var wellKnownSymbol = __webpack_require__("b622");
var IS_PURE = __webpack_require__("c430");

var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;

var returnThis = function () { return this; };

// `%IteratorPrototype%` object
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;

if ([].keys) {
  arrayIterator = [].keys();
  // Safari 8 has buggy iterators w/o `next`
  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  else {
    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  }
}

var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  var test = {};
  // FF44- legacy iterators case
  return IteratorPrototype[ITERATOR].call(test) !== test;
});

if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}

module.exports = {
  IteratorPrototype: IteratorPrototype,
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};


/***/ }),

/***/ "b041":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
var classof = __webpack_require__("f5df");

// `Object.prototype.toString` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.tostring
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  return '[object ' + classof(this) + ']';
};


/***/ }),

/***/ "b0c0":
/***/ (function(module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__("83ab");
var defineProperty = __webpack_require__("9bf2").f;

var FunctionPrototype = Function.prototype;
var FunctionPrototypeToString = FunctionPrototype.toString;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';

// Function instances `.name` property
// https://tc39.es/ecma262/#sec-function-instances-name
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
  defineProperty(FunctionPrototype, NAME, {
    configurable: true,
    get: function () {
      try {
        return FunctionPrototypeToString.call(this).match(nameRE)[1];
      } catch (error) {
        return '';
      }
    }
  });
}


/***/ }),

/***/ "b50d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");
var settle = __webpack_require__("467f");
var cookies = __webpack_require__("7aac");
var buildURL = __webpack_require__("30b5");
var buildFullPath = __webpack_require__("83b9");
var parseHeaders = __webpack_require__("c345");
var isURLSameOrigin = __webpack_require__("3934");
var createError = __webpack_require__("2d83");

module.exports = function xhrAdapter(config) {
  return new Promise(function dispatchXhrRequest(resolve, reject) {
    var requestData = config.data;
    var requestHeaders = config.headers;

    if (utils.isFormData(requestData)) {
      delete requestHeaders['Content-Type']; // Let the browser set it
    }

    var request = new XMLHttpRequest();

    // HTTP basic authentication
    if (config.auth) {
      var username = config.auth.username || '';
      var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
    }

    var fullPath = buildFullPath(config.baseURL, config.url);
    request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);

    // Set the request timeout in MS
    request.timeout = config.timeout;

    // Listen for ready state
    request.onreadystatechange = function handleLoad() {
      if (!request || request.readyState !== 4) {
        return;
      }

      // The request errored out and we didn't get a response, this will be
      // handled by onerror instead
      // With one exception: request that using file: protocol, most browsers
      // will return status as 0 even though it's a successful request
      if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
        return;
      }

      // Prepare the response
      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
      var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
      var response = {
        data: responseData,
        status: request.status,
        statusText: request.statusText,
        headers: responseHeaders,
        config: config,
        request: request
      };

      settle(resolve, reject, response);

      // Clean up request
      request = null;
    };

    // Handle browser request cancellation (as opposed to a manual cancellation)
    request.onabort = function handleAbort() {
      if (!request) {
        return;
      }

      reject(createError('Request aborted', config, 'ECONNABORTED', request));

      // Clean up request
      request = null;
    };

    // Handle low level network errors
    request.onerror = function handleError() {
      // Real errors are hidden from us by the browser
      // onerror should only fire if it's a network error
      reject(createError('Network Error', config, null, request));

      // Clean up request
      request = null;
    };

    // Handle timeout
    request.ontimeout = function handleTimeout() {
      var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
      if (config.timeoutErrorMessage) {
        timeoutErrorMessage = config.timeoutErrorMessage;
      }
      reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
        request));

      // Clean up request
      request = null;
    };

    // Add xsrf header
    // This is only done if running in a standard browser environment.
    // Specifically not if we're in a web worker, or react-native.
    if (utils.isStandardBrowserEnv()) {
      // Add xsrf header
      var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
        cookies.read(config.xsrfCookieName) :
        undefined;

      if (xsrfValue) {
        requestHeaders[config.xsrfHeaderName] = xsrfValue;
      }
    }

    // Add headers to the request
    if ('setRequestHeader' in request) {
      utils.forEach(requestHeaders, function setRequestHeader(val, key) {
        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
          // Remove Content-Type if data is undefined
          delete requestHeaders[key];
        } else {
          // Otherwise add header to the request
          request.setRequestHeader(key, val);
        }
      });
    }

    // Add withCredentials to request if needed
    if (!utils.isUndefined(config.withCredentials)) {
      request.withCredentials = !!config.withCredentials;
    }

    // Add responseType to request if needed
    if (config.responseType) {
      try {
        request.responseType = config.responseType;
      } catch (e) {
        // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
        // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
        if (config.responseType !== 'json') {
          throw e;
        }
      }
    }

    // Handle progress if needed
    if (typeof config.onDownloadProgress === 'function') {
      request.addEventListener('progress', config.onDownloadProgress);
    }

    // Not all browsers support upload events
    if (typeof config.onUploadProgress === 'function' && request.upload) {
      request.upload.addEventListener('progress', config.onUploadProgress);
    }

    if (config.cancelToken) {
      // Handle cancellation
      config.cancelToken.promise.then(function onCanceled(cancel) {
        if (!request) {
          return;
        }

        request.abort();
        reject(cancel);
        // Clean up request
        request = null;
      });
    }

    if (!requestData) {
      requestData = null;
    }

    // Send the request
    request.send(requestData);
  });
};


/***/ }),

/***/ "b575":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
var macrotask = __webpack_require__("2cf4").set;
var IS_IOS = __webpack_require__("1cdc");
var IS_WEBOS_WEBKIT = __webpack_require__("a4b4");
var IS_NODE = __webpack_require__("605d");

var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
var document = global.document;
var process = global.process;
var Promise = global.Promise;
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;

var flush, head, last, notify, toggle, node, promise, then;

// modern engines have queueMicrotask method
if (!queueMicrotask) {
  flush = function () {
    var parent, fn;
    if (IS_NODE && (parent = process.domain)) parent.exit();
    while (head) {
      fn = head.fn;
      head = head.next;
      try {
        fn();
      } catch (error) {
        if (head) notify();
        else last = undefined;
        throw error;
      }
    } last = undefined;
    if (parent) parent.enter();
  };

  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
    toggle = true;
    node = document.createTextNode('');
    new MutationObserver(flush).observe(node, { characterData: true });
    notify = function () {
      node.data = toggle = !toggle;
    };
  // environments with maybe non-completely correct, but existent Promise
  } else if (Promise && Promise.resolve) {
    // Promise.resolve without an argument throws an error in LG WebOS 2
    promise = Promise.resolve(undefined);
    then = promise.then;
    notify = function () {
      then.call(promise, flush);
    };
  // Node.js without promises
  } else if (IS_NODE) {
    notify = function () {
      process.nextTick(flush);
    };
  // for other environments - macrotask based on:
  // - setImmediate
  // - MessageChannel
  // - window.postMessag
  // - onreadystatechange
  // - setTimeout
  } else {
    notify = function () {
      // strange IE + webpack dev server bug - use .call(global)
      macrotask.call(global, flush);
    };
  }
}

module.exports = queueMicrotask || function (fn) {
  var task = { fn: fn, next: undefined };
  if (last) last.next = task;
  if (!head) {
    head = task;
    notify();
  } last = task;
};


/***/ }),

/***/ "b622":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var shared = __webpack_require__("5692");
var has = __webpack_require__("5135");
var uid = __webpack_require__("90e3");
var NATIVE_SYMBOL = __webpack_require__("4930");
var USE_SYMBOL_AS_UID = __webpack_require__("fdbf");

var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
    if (NATIVE_SYMBOL && has(Symbol, name)) {
      WellKnownSymbolsStore[name] = Symbol[name];
    } else {
      WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
    }
  } return WellKnownSymbolsStore[name];
};


/***/ }),

/***/ "b64b":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var toObject = __webpack_require__("7b0b");
var nativeKeys = __webpack_require__("df75");
var fails = __webpack_require__("d039");

var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });

// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  keys: function keys(it) {
    return nativeKeys(toObject(it));
  }
});


/***/ }),

/***/ "b727":
/***/ (function(module, exports, __webpack_require__) {

var bind = __webpack_require__("0366");
var IndexedObject = __webpack_require__("44ad");
var toObject = __webpack_require__("7b0b");
var toLength = __webpack_require__("50c4");
var arraySpeciesCreate = __webpack_require__("65f0");

var push = [].push;

// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
var createMethod = function (TYPE) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
  var IS_FIND_INDEX = TYPE == 6;
  var IS_FILTER_OUT = TYPE == 7;
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  return function ($this, callbackfn, that, specificCreate) {
    var O = toObject($this);
    var self = IndexedObject(O);
    var boundFunction = bind(callbackfn, that, 3);
    var length = toLength(self.length);
    var index = 0;
    var create = specificCreate || arraySpeciesCreate;
    var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
    var value, result;
    for (;length > index; index++) if (NO_HOLES || index in self) {
      value = self[index];
      result = boundFunction(value, index, O);
      if (TYPE) {
        if (IS_MAP) target[index] = result; // map
        else if (result) switch (TYPE) {
          case 3: return true;              // some
          case 5: return value;             // find
          case 6: return index;             // findIndex
          case 2: push.call(target, value); // filter
        } else switch (TYPE) {
          case 4: return false;             // every
          case 7: push.call(target, value); // filterOut
        }
      }
    }
    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  };
};

module.exports = {
  // `Array.prototype.forEach` method
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
  forEach: createMethod(0),
  // `Array.prototype.map` method
  // https://tc39.es/ecma262/#sec-array.prototype.map
  map: createMethod(1),
  // `Array.prototype.filter` method
  // https://tc39.es/ecma262/#sec-array.prototype.filter
  filter: createMethod(2),
  // `Array.prototype.some` method
  // https://tc39.es/ecma262/#sec-array.prototype.some
  some: createMethod(3),
  // `Array.prototype.every` method
  // https://tc39.es/ecma262/#sec-array.prototype.every
  every: createMethod(4),
  // `Array.prototype.find` method
  // https://tc39.es/ecma262/#sec-array.prototype.find
  find: createMethod(5),
  // `Array.prototype.findIndex` method
  // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  findIndex: createMethod(6),
  // `Array.prototype.filterOut` method
  // https://github.com/tc39/proposal-array-filtering
  filterOut: createMethod(7)
};


/***/ }),

/***/ "bc3a":
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__("cee4");

/***/ }),

/***/ "bccd":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Preview_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("06b4");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Preview_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Preview_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "c04e":
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__("861d");

// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
  if (!isObject(input)) return input;
  var fn, val;
  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),

/***/ "c345":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

// Headers whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
var ignoreDuplicateOf = [
  'age', 'authorization', 'content-length', 'content-type', 'etag',
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  'referer', 'retry-after', 'user-agent'
];

/**
 * Parse headers into an object
 *
 * ```
 * Date: Wed, 27 Aug 2014 08:58:49 GMT
 * Content-Type: application/json
 * Connection: keep-alive
 * Transfer-Encoding: chunked
 * ```
 *
 * @param {String} headers Headers needing to be parsed
 * @returns {Object} Headers parsed into an object
 */
module.exports = function parseHeaders(headers) {
  var parsed = {};
  var key;
  var val;
  var i;

  if (!headers) { return parsed; }

  utils.forEach(headers.split('\n'), function parser(line) {
    i = line.indexOf(':');
    key = utils.trim(line.substr(0, i)).toLowerCase();
    val = utils.trim(line.substr(i + 1));

    if (key) {
      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
        return;
      }
      if (key === 'set-cookie') {
        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
      } else {
        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
      }
    }
  });

  return parsed;
};


/***/ }),

/***/ "c401":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

/**
 * Transform the data for a request or a response
 *
 * @param {Object|String} data The data to be transformed
 * @param {Array} headers The headers for the request or response
 * @param {Array|Function} fns A single function or Array of functions
 * @returns {*} The resulting transformed data
 */
module.exports = function transformData(data, headers, fns) {
  /*eslint no-param-reassign:0*/
  utils.forEach(fns, function transform(fn) {
    data = fn(data, headers);
  });

  return data;
};


/***/ }),

/***/ "c430":
/***/ (function(module, exports) {

module.exports = false;


/***/ }),

/***/ "c532":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var bind = __webpack_require__("1d2b");

/*global toString:true*/

// utils is a library of generic helper functions non-specific to axios

var toString = Object.prototype.toString;

/**
 * Determine if a value is an Array
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an Array, otherwise false
 */
function isArray(val) {
  return toString.call(val) === '[object Array]';
}

/**
 * Determine if a value is undefined
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if the value is undefined, otherwise false
 */
function isUndefined(val) {
  return typeof val === 'undefined';
}

/**
 * Determine if a value is a Buffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Buffer, otherwise false
 */
function isBuffer(val) {
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
    && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
}

/**
 * Determine if a value is an ArrayBuffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
 */
function isArrayBuffer(val) {
  return toString.call(val) === '[object ArrayBuffer]';
}

/**
 * Determine if a value is a FormData
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an FormData, otherwise false
 */
function isFormData(val) {
  return (typeof FormData !== 'undefined') && (val instanceof FormData);
}

/**
 * Determine if a value is a view on an ArrayBuffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
 */
function isArrayBufferView(val) {
  var result;
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
    result = ArrayBuffer.isView(val);
  } else {
    result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  }
  return result;
}

/**
 * Determine if a value is a String
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a String, otherwise false
 */
function isString(val) {
  return typeof val === 'string';
}

/**
 * Determine if a value is a Number
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Number, otherwise false
 */
function isNumber(val) {
  return typeof val === 'number';
}

/**
 * Determine if a value is an Object
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an Object, otherwise false
 */
function isObject(val) {
  return val !== null && typeof val === 'object';
}

/**
 * Determine if a value is a plain Object
 *
 * @param {Object} val The value to test
 * @return {boolean} True if value is a plain Object, otherwise false
 */
function isPlainObject(val) {
  if (toString.call(val) !== '[object Object]') {
    return false;
  }

  var prototype = Object.getPrototypeOf(val);
  return prototype === null || prototype === Object.prototype;
}

/**
 * Determine if a value is a Date
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Date, otherwise false
 */
function isDate(val) {
  return toString.call(val) === '[object Date]';
}

/**
 * Determine if a value is a File
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a File, otherwise false
 */
function isFile(val) {
  return toString.call(val) === '[object File]';
}

/**
 * Determine if a value is a Blob
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Blob, otherwise false
 */
function isBlob(val) {
  return toString.call(val) === '[object Blob]';
}

/**
 * Determine if a value is a Function
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Function, otherwise false
 */
function isFunction(val) {
  return toString.call(val) === '[object Function]';
}

/**
 * Determine if a value is a Stream
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Stream, otherwise false
 */
function isStream(val) {
  return isObject(val) && isFunction(val.pipe);
}

/**
 * Determine if a value is a URLSearchParams object
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
 */
function isURLSearchParams(val) {
  return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
}

/**
 * Trim excess whitespace off the beginning and end of a string
 *
 * @param {String} str The String to trim
 * @returns {String} The String freed of excess whitespace
 */
function trim(str) {
  return str.replace(/^\s*/, '').replace(/\s*$/, '');
}

/**
 * Determine if we're running in a standard browser environment
 *
 * This allows axios to run in a web worker, and react-native.
 * Both environments support XMLHttpRequest, but not fully standard globals.
 *
 * web workers:
 *  typeof window -> undefined
 *  typeof document -> undefined
 *
 * react-native:
 *  navigator.product -> 'ReactNative'
 * nativescript
 *  navigator.product -> 'NativeScript' or 'NS'
 */
function isStandardBrowserEnv() {
  if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
                                           navigator.product === 'NativeScript' ||
                                           navigator.product === 'NS')) {
    return false;
  }
  return (
    typeof window !== 'undefined' &&
    typeof document !== 'undefined'
  );
}

/**
 * Iterate over an Array or an Object invoking a function for each item.
 *
 * If `obj` is an Array callback will be called passing
 * the value, index, and complete array for each item.
 *
 * If 'obj' is an Object callback will be called passing
 * the value, key, and complete object for each property.
 *
 * @param {Object|Array} obj The object to iterate
 * @param {Function} fn The callback to invoke for each item
 */
function forEach(obj, fn) {
  // Don't bother if no value provided
  if (obj === null || typeof obj === 'undefined') {
    return;
  }

  // Force an array if not already something iterable
  if (typeof obj !== 'object') {
    /*eslint no-param-reassign:0*/
    obj = [obj];
  }

  if (isArray(obj)) {
    // Iterate over array values
    for (var i = 0, l = obj.length; i < l; i++) {
      fn.call(null, obj[i], i, obj);
    }
  } else {
    // Iterate over object keys
    for (var key in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, key)) {
        fn.call(null, obj[key], key, obj);
      }
    }
  }
}

/**
 * Accepts varargs expecting each argument to be an object, then
 * immutably merges the properties of each object and returns result.
 *
 * When multiple objects contain the same key the later object in
 * the arguments list will take precedence.
 *
 * Example:
 *
 * ```js
 * var result = merge({foo: 123}, {foo: 456});
 * console.log(result.foo); // outputs 456
 * ```
 *
 * @param {Object} obj1 Object to merge
 * @returns {Object} Result of all merge properties
 */
function merge(/* obj1, obj2, obj3, ... */) {
  var result = {};
  function assignValue(val, key) {
    if (isPlainObject(result[key]) && isPlainObject(val)) {
      result[key] = merge(result[key], val);
    } else if (isPlainObject(val)) {
      result[key] = merge({}, val);
    } else if (isArray(val)) {
      result[key] = val.slice();
    } else {
      result[key] = val;
    }
  }

  for (var i = 0, l = arguments.length; i < l; i++) {
    forEach(arguments[i], assignValue);
  }
  return result;
}

/**
 * Extends object a by mutably adding to it the properties of object b.
 *
 * @param {Object} a The object to be extended
 * @param {Object} b The object to copy properties from
 * @param {Object} thisArg The object to bind function to
 * @return {Object} The resulting value of object a
 */
function extend(a, b, thisArg) {
  forEach(b, function assignValue(val, key) {
    if (thisArg && typeof val === 'function') {
      a[key] = bind(val, thisArg);
    } else {
      a[key] = val;
    }
  });
  return a;
}

/**
 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
 *
 * @param {string} content with BOM
 * @return {string} content value without BOM
 */
function stripBOM(content) {
  if (content.charCodeAt(0) === 0xFEFF) {
    content = content.slice(1);
  }
  return content;
}

module.exports = {
  isArray: isArray,
  isArrayBuffer: isArrayBuffer,
  isBuffer: isBuffer,
  isFormData: isFormData,
  isArrayBufferView: isArrayBufferView,
  isString: isString,
  isNumber: isNumber,
  isObject: isObject,
  isPlainObject: isPlainObject,
  isUndefined: isUndefined,
  isDate: isDate,
  isFile: isFile,
  isBlob: isBlob,
  isFunction: isFunction,
  isStream: isStream,
  isURLSearchParams: isURLSearchParams,
  isStandardBrowserEnv: isStandardBrowserEnv,
  forEach: forEach,
  merge: merge,
  extend: extend,
  trim: trim,
  stripBOM: stripBOM
};


/***/ }),

/***/ "c6b6":
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),

/***/ "c6cd":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var setGlobal = __webpack_require__("ce4e");

var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});

module.exports = store;


/***/ }),

/***/ "c8af":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

module.exports = function normalizeHeaderName(headers, normalizedName) {
  utils.forEach(headers, function processHeader(value, name) {
    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
      headers[normalizedName] = value;
      delete headers[name];
    }
  });
};


/***/ }),

/***/ "c8ba":
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || new Function("return this")();
} catch (e) {
	// This works if the window reference is available
	if (typeof window === "object") g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),

/***/ "c937":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var data_1 = __webpack_require__("3896");
var observer_1 = __webpack_require__("d38c");
var uuid_1 = __webpack_require__("0d8b");
var Store = /** @class */ (function () {
    function Store() {
        this.data = {};
        this.observers = {};
    }
    Store.prototype.get = function (key) {
        return Store.get(key, this.data);
    };
    Store.prototype.set = function (key, value) {
        Store.set(key, value, this.data, this.observers);
    };
    Store.prototype.updated = function (key) {
        Store.updated(key, this.data, this.observers);
    };
    Store.prototype.subscribe = function (key, fn) {
        return Store.subscribe(key, fn, this.data, this.observers);
    };
    Store.get = function (key, store) {
        if (!store) {
            store = data_1.data;
        }
        if (key === undefined) {
            return store;
        }
        var props = key.split('.');
        for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {
            var prop = props_1[_i];
            store = store[prop];
            if (store === undefined) {
                break;
            }
        }
        return store;
    };
    Store.set = function (key, value, store, obs) {
        if (!store) {
            store = data_1.data;
        }
        if (!obs) {
            obs = data_1.observers;
        }
        var props = key.split('.');
        var _store = store;
        for (var i = 0; i < props.length - 1; ++i) {
            if (!_store[props[i]]) {
                _store[props[i]] = {};
            }
            _store = _store[props[i]];
        }
        _store[props[props.length - 1]] = value;
        for (var id in obs) {
            if (key.indexOf(obs[id].key) === 0) {
                obs[id].fn(Store.get(obs[id].key, store));
            }
        }
    };
    Store.updated = function (key, store, obs) {
        if (!obs) {
            obs = data_1.observers;
        }
        for (var id in obs) {
            if (key.indexOf(obs[id].key) === 0) {
                obs[id].fn(Store.get(obs[id].key, store));
            }
        }
    };
    Store.subscribe = function (key, fn, store, obs) {
        if (!obs) {
            obs = data_1.observers;
        }
        var id = uuid_1.s8();
        var observer = new observer_1.Observer(id, key, fn);
        obs[id] = observer;
        var value = Store.get(key, store);
        if (value !== undefined) {
            fn(value);
        }
        return observer;
    };
    return Store;
}());
exports.Store = Store;
//# sourceMappingURL=store.js.map

/***/ }),

/***/ "ca84":
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__("5135");
var toIndexedObject = __webpack_require__("fc6a");
var indexOf = __webpack_require__("4d64").indexOf;
var hiddenKeys = __webpack_require__("d012");

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~indexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),

/***/ "caad":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $includes = __webpack_require__("4d64").includes;
var addToUnscopables = __webpack_require__("44d2");

// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
$({ target: 'Array', proto: true }, {
  includes: function includes(el /* , fromIndex = 0 */) {
    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  }
});

// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('includes');


/***/ }),

/***/ "cb29":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var fill = __webpack_require__("81d5");
var addToUnscopables = __webpack_require__("44d2");

// `Array.prototype.fill` method
// https://tc39.es/ecma262/#sec-array.prototype.fill
$({ target: 'Array', proto: true }, {
  fill: fill
});

// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('fill');


/***/ }),

/***/ "cc12":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var isObject = __webpack_require__("861d");

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ }),

/***/ "cca6":
/***/ (function(module, exports, __webpack_require__) {

var $ = __webpack_require__("23e7");
var assign = __webpack_require__("60da");

// `Object.assign` method
// https://tc39.es/ecma262/#sec-object.assign
$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
  assign: assign
});


/***/ }),

/***/ "cdf9":
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__("825a");
var isObject = __webpack_require__("861d");
var newPromiseCapability = __webpack_require__("f069");

module.exports = function (C, x) {
  anObject(C);
  if (isObject(x) && x.constructor === C) return x;
  var promiseCapability = newPromiseCapability.f(C);
  var resolve = promiseCapability.resolve;
  resolve(x);
  return promiseCapability.promise;
};


/***/ }),

/***/ "ce4e":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var createNonEnumerableProperty = __webpack_require__("9112");

module.exports = function (key, value) {
  try {
    createNonEnumerableProperty(global, key, value);
  } catch (error) {
    global[key] = value;
  } return value;
};


/***/ }),

/***/ "cee4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");
var bind = __webpack_require__("1d2b");
var Axios = __webpack_require__("0a06");
var mergeConfig = __webpack_require__("4a7b");
var defaults = __webpack_require__("2444");

/**
 * Create an instance of Axios
 *
 * @param {Object} defaultConfig The default config for the instance
 * @return {Axios} A new instance of Axios
 */
function createInstance(defaultConfig) {
  var context = new Axios(defaultConfig);
  var instance = bind(Axios.prototype.request, context);

  // Copy axios.prototype to instance
  utils.extend(instance, Axios.prototype, context);

  // Copy context to instance
  utils.extend(instance, context);

  return instance;
}

// Create the default instance to be exported
var axios = createInstance(defaults);

// Expose Axios class to allow class inheritance
axios.Axios = Axios;

// Factory for creating new instances
axios.create = function create(instanceConfig) {
  return createInstance(mergeConfig(axios.defaults, instanceConfig));
};

// Expose Cancel & CancelToken
axios.Cancel = __webpack_require__("7a77");
axios.CancelToken = __webpack_require__("8df4");
axios.isCancel = __webpack_require__("2e67");

// Expose all/spread
axios.all = function all(promises) {
  return Promise.all(promises);
};
axios.spread = __webpack_require__("0df6");

// Expose isAxiosError
axios.isAxiosError = __webpack_require__("5f02");

module.exports = axios;

// Allow use of default import syntax in TypeScript
module.exports.default = axios;


/***/ }),

/***/ "d012":
/***/ (function(module, exports) {

module.exports = {};


/***/ }),

/***/ "d0126":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "d039":
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ }),

/***/ "d066":
/***/ (function(module, exports, __webpack_require__) {

var path = __webpack_require__("428f");
var global = __webpack_require__("da84");

var aFunction = function (variable) {
  return typeof variable == 'function' ? variable : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};


/***/ }),

/***/ "d1e7":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;


/***/ }),

/***/ "d28b":
/***/ (function(module, exports, __webpack_require__) {

var defineWellKnownSymbol = __webpack_require__("746f");

// `Symbol.iterator` well-known symbol
// https://tc39.es/ecma262/#sec-symbol.iterator
defineWellKnownSymbol('iterator');


/***/ }),

/***/ "d2bb":
/***/ (function(module, exports, __webpack_require__) {

/* eslint-disable no-proto -- safe */
var anObject = __webpack_require__("825a");
var aPossiblePrototype = __webpack_require__("3bbe");

// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
    setter.call(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter.call(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);


/***/ }),

/***/ "d38c":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var data_1 = __webpack_require__("3896");
var Observer = /** @class */ (function () {
    function Observer(id, key, fn) {
        this.key = '';
        this.id = id;
        this.key = key;
        this.fn = fn;
    }
    Observer.prototype.unsubscribe = function () {
        delete data_1.observers[this.id];
    };
    return Observer;
}());
exports.Observer = Observer;
//# sourceMappingURL=observer.js.map

/***/ }),

/***/ "d3b7":
/***/ (function(module, exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
var redefine = __webpack_require__("6eeb");
var toString = __webpack_require__("b041");

// `Object.prototype.toString` method
// https://tc39.es/ecma262/#sec-object.prototype.tostring
if (!TO_STRING_TAG_SUPPORT) {
  redefine(Object.prototype, 'toString', toString, { unsafe: true });
}


/***/ }),

/***/ "d44e":
/***/ (function(module, exports, __webpack_require__) {

var defineProperty = __webpack_require__("9bf2").f;
var has = __webpack_require__("5135");
var wellKnownSymbol = __webpack_require__("b622");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');

module.exports = function (it, TAG, STATIC) {
  if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  }
};


/***/ }),

/***/ "d784":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: Remove from `core-js@4` since it's moved to entry points
__webpack_require__("ac1f");
var redefine = __webpack_require__("6eeb");
var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var regexpExec = __webpack_require__("9263");
var createNonEnumerableProperty = __webpack_require__("9112");

var SPECIES = wellKnownSymbol('species');

var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  // #replace needs built-in support for named groups.
  // #match works fine because it just return the exec results, even if it has
  // a "grops" property.
  var re = /./;
  re.exec = function () {
    var result = [];
    result.groups = { a: '7' };
    return result;
  };
  return ''.replace(re, '$<a>') !== '7';
});

// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE_KEEPS_$0 = (function () {
  return 'a'.replace(/./, '$0') === '$0';
})();

var REPLACE = wellKnownSymbol('replace');
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  if (/./[REPLACE]) {
    return /./[REPLACE]('a', '$0') === '';
  }
  return false;
})();

// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  // eslint-disable-next-line regexp/no-empty-group -- required for testing
  var re = /(?:)/;
  var originalExec = re.exec;
  re.exec = function () { return originalExec.apply(this, arguments); };
  var result = 'ab'.split(re);
  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
});

module.exports = function (KEY, length, exec, sham) {
  var SYMBOL = wellKnownSymbol(KEY);

  var DELEGATES_TO_SYMBOL = !fails(function () {
    // String methods call symbol-named RegEp methods
    var O = {};
    O[SYMBOL] = function () { return 7; };
    return ''[KEY](O) != 7;
  });

  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
    // Symbol-named RegExp methods call .exec
    var execCalled = false;
    var re = /a/;

    if (KEY === 'split') {
      // We can't use real regex here since it causes deoptimization
      // and serious performance degradation in V8
      // https://github.com/zloirock/core-js/issues/306
      re = {};
      // RegExp[@@split] doesn't call the regex's exec method, but first creates
      // a new one. We need to return the patched regex when creating the new one.
      re.constructor = {};
      re.constructor[SPECIES] = function () { return re; };
      re.flags = '';
      re[SYMBOL] = /./[SYMBOL];
    }

    re.exec = function () { execCalled = true; return null; };

    re[SYMBOL]('');
    return !execCalled;
  });

  if (
    !DELEGATES_TO_SYMBOL ||
    !DELEGATES_TO_EXEC ||
    (KEY === 'replace' && !(
      REPLACE_SUPPORTS_NAMED_GROUPS &&
      REPLACE_KEEPS_$0 &&
      !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
    )) ||
    (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  ) {
    var nativeRegExpMethod = /./[SYMBOL];
    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
      if (regexp.exec === regexpExec) {
        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
          // The native String method already delegates to @@method (this
          // polyfilled function), leasing to infinite recursion.
          // We avoid it by directly calling the native @@method method.
          return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
        }
        return { done: true, value: nativeMethod.call(str, regexp, arg2) };
      }
      return { done: false };
    }, {
      REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
      REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
    });
    var stringMethod = methods[0];
    var regexMethod = methods[1];

    redefine(String.prototype, KEY, stringMethod);
    redefine(RegExp.prototype, SYMBOL, length == 2
      // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
      // 21.2.5.11 RegExp.prototype[@@split](string, limit)
      ? function (string, arg) { return regexMethod.call(string, this, arg); }
      // 21.2.5.6 RegExp.prototype[@@match](string)
      // 21.2.5.9 RegExp.prototype[@@search](string)
      : function (string) { return regexMethod.call(string, this); }
    );
  }

  if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
};


/***/ }),

/***/ "d7ed":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "d81d":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var $map = __webpack_require__("b727").map;
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');

// `Array.prototype.map` method
// https://tc39.es/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  map: function map(callbackfn /* , thisArg */) {
    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});


/***/ }),

/***/ "d925":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Determines whether the specified URL is absolute
 *
 * @param {string} url The URL to test
 * @returns {boolean} True if the specified URL is absolute, otherwise false
 */
module.exports = function isAbsoluteURL(url) {
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  // by any combination of letters, digits, plus, period, or hyphen.
  return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
};


/***/ }),

/***/ "da84":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
  return it && it.Math == Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  /* global globalThis -- safe */
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  check(typeof self == 'object' && self) ||
  check(typeof global == 'object' && global) ||
  // eslint-disable-next-line no-new-func -- fallback
  (function () { return this; })() || Function('return this')();

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))

/***/ }),

/***/ "ddb0":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");
var DOMIterables = __webpack_require__("fdbc");
var ArrayIteratorMethods = __webpack_require__("e260");
var createNonEnumerableProperty = __webpack_require__("9112");
var wellKnownSymbol = __webpack_require__("b622");

var ITERATOR = wellKnownSymbol('iterator');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ArrayValues = ArrayIteratorMethods.values;

for (var COLLECTION_NAME in DOMIterables) {
  var Collection = global[COLLECTION_NAME];
  var CollectionPrototype = Collection && Collection.prototype;
  if (CollectionPrototype) {
    // some Chrome versions have non-configurable methods on DOMTokenList
    if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
      createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
    } catch (error) {
      CollectionPrototype[ITERATOR] = ArrayValues;
    }
    if (!CollectionPrototype[TO_STRING_TAG]) {
      createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
    }
    if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
      // some Chrome versions have non-configurable methods on DOMTokenList
      if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
        createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
      } catch (error) {
        CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
      }
    }
  }
}


/***/ }),

/***/ "df75":
/***/ (function(module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__("ca84");
var enumBugKeys = __webpack_require__("7839");

// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
  return internalObjectKeys(O, enumBugKeys);
};


/***/ }),

/***/ "df7c":
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
// backported and transplited with Babel, with backwards-compat fixes

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

// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
function normalizeArray(parts, allowAboveRoot) {
  // if the path tries to go above the root, `up` ends up > 0
  var up = 0;
  for (var i = parts.length - 1; i >= 0; i--) {
    var last = parts[i];
    if (last === '.') {
      parts.splice(i, 1);
    } else if (last === '..') {
      parts.splice(i, 1);
      up++;
    } else if (up) {
      parts.splice(i, 1);
      up--;
    }
  }

  // if the path is allowed to go above the root, restore leading ..s
  if (allowAboveRoot) {
    for (; up--; up) {
      parts.unshift('..');
    }
  }

  return parts;
}

// path.resolve([from ...], to)
// posix version
exports.resolve = function() {
  var resolvedPath = '',
      resolvedAbsolute = false;

  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
    var path = (i >= 0) ? arguments[i] : process.cwd();

    // Skip empty and invalid entries
    if (typeof path !== 'string') {
      throw new TypeError('Arguments to path.resolve must be strings');
    } else if (!path) {
      continue;
    }

    resolvedPath = path + '/' + resolvedPath;
    resolvedAbsolute = path.charAt(0) === '/';
  }

  // At this point the path should be resolved to a full absolute path, but
  // handle relative paths to be safe (might happen when process.cwd() fails)

  // Normalize the path
  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
    return !!p;
  }), !resolvedAbsolute).join('/');

  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
};

// path.normalize(path)
// posix version
exports.normalize = function(path) {
  var isAbsolute = exports.isAbsolute(path),
      trailingSlash = substr(path, -1) === '/';

  // Normalize the path
  path = normalizeArray(filter(path.split('/'), function(p) {
    return !!p;
  }), !isAbsolute).join('/');

  if (!path && !isAbsolute) {
    path = '.';
  }
  if (path && trailingSlash) {
    path += '/';
  }

  return (isAbsolute ? '/' : '') + path;
};

// posix version
exports.isAbsolute = function(path) {
  return path.charAt(0) === '/';
};

// posix version
exports.join = function() {
  var paths = Array.prototype.slice.call(arguments, 0);
  return exports.normalize(filter(paths, function(p, index) {
    if (typeof p !== 'string') {
      throw new TypeError('Arguments to path.join must be strings');
    }
    return p;
  }).join('/'));
};


// path.relative(from, to)
// posix version
exports.relative = function(from, to) {
  from = exports.resolve(from).substr(1);
  to = exports.resolve(to).substr(1);

  function trim(arr) {
    var start = 0;
    for (; start < arr.length; start++) {
      if (arr[start] !== '') break;
    }

    var end = arr.length - 1;
    for (; end >= 0; end--) {
      if (arr[end] !== '') break;
    }

    if (start > end) return [];
    return arr.slice(start, end - start + 1);
  }

  var fromParts = trim(from.split('/'));
  var toParts = trim(to.split('/'));

  var length = Math.min(fromParts.length, toParts.length);
  var samePartsLength = length;
  for (var i = 0; i < length; i++) {
    if (fromParts[i] !== toParts[i]) {
      samePartsLength = i;
      break;
    }
  }

  var outputParts = [];
  for (var i = samePartsLength; i < fromParts.length; i++) {
    outputParts.push('..');
  }

  outputParts = outputParts.concat(toParts.slice(samePartsLength));

  return outputParts.join('/');
};

exports.sep = '/';
exports.delimiter = ':';

exports.dirname = function (path) {
  if (typeof path !== 'string') path = path + '';
  if (path.length === 0) return '.';
  var code = path.charCodeAt(0);
  var hasRoot = code === 47 /*/*/;
  var end = -1;
  var matchedSlash = true;
  for (var i = path.length - 1; i >= 1; --i) {
    code = path.charCodeAt(i);
    if (code === 47 /*/*/) {
        if (!matchedSlash) {
          end = i;
          break;
        }
      } else {
      // We saw the first non-path separator
      matchedSlash = false;
    }
  }

  if (end === -1) return hasRoot ? '/' : '.';
  if (hasRoot && end === 1) {
    // return '//';
    // Backwards-compat fix:
    return '/';
  }
  return path.slice(0, end);
};

function basename(path) {
  if (typeof path !== 'string') path = path + '';

  var start = 0;
  var end = -1;
  var matchedSlash = true;
  var i;

  for (i = path.length - 1; i >= 0; --i) {
    if (path.charCodeAt(i) === 47 /*/*/) {
        // If we reached a path separator that was not part of a set of path
        // separators at the end of the string, stop now
        if (!matchedSlash) {
          start = i + 1;
          break;
        }
      } else if (end === -1) {
      // We saw the first non-path separator, mark this as the end of our
      // path component
      matchedSlash = false;
      end = i + 1;
    }
  }

  if (end === -1) return '';
  return path.slice(start, end);
}

// Uses a mixed approach for backwards-compatibility, as ext behavior changed
// in new Node.js versions, so only basename() above is backported here
exports.basename = function (path, ext) {
  var f = basename(path);
  if (ext && f.substr(-1 * ext.length) === ext) {
    f = f.substr(0, f.length - ext.length);
  }
  return f;
};

exports.extname = function (path) {
  if (typeof path !== 'string') path = path + '';
  var startDot = -1;
  var startPart = 0;
  var end = -1;
  var matchedSlash = true;
  // Track the state of characters (if any) we see before our first dot and
  // after any path separator we find
  var preDotState = 0;
  for (var i = path.length - 1; i >= 0; --i) {
    var code = path.charCodeAt(i);
    if (code === 47 /*/*/) {
        // If we reached a path separator that was not part of a set of path
        // separators at the end of the string, stop now
        if (!matchedSlash) {
          startPart = i + 1;
          break;
        }
        continue;
      }
    if (end === -1) {
      // We saw the first non-path separator, mark this as the end of our
      // extension
      matchedSlash = false;
      end = i + 1;
    }
    if (code === 46 /*.*/) {
        // If this is our first dot, mark it as the start of our extension
        if (startDot === -1)
          startDot = i;
        else if (preDotState !== 1)
          preDotState = 1;
    } else if (startDot !== -1) {
      // We saw a non-dot and non-path separator before our dot, so we should
      // have a good chance at having a non-empty extension
      preDotState = -1;
    }
  }

  if (startDot === -1 || end === -1 ||
      // We saw a non-dot character immediately before the dot
      preDotState === 0 ||
      // The (right-most) trimmed path component is exactly '..'
      preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
    return '';
  }
  return path.slice(startDot, end);
};

function filter (xs, f) {
    if (xs.filter) return xs.filter(f);
    var res = [];
    for (var i = 0; i < xs.length; i++) {
        if (f(xs[i], i, xs)) res.push(xs[i]);
    }
    return res;
}

// String.prototype.substr - negative index don't work in IE8
var substr = 'ab'.substr(-1) === 'b'
    ? function (str, start, len) { return str.substr(start, len) }
    : function (str, start, len) {
        if (start < 0) start = str.length + start;
        return str.substr(start, len);
    }
;

/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))

/***/ }),

/***/ "e01a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// `Symbol.prototype.description` getter
// https://tc39.es/ecma262/#sec-symbol.prototype.description

var $ = __webpack_require__("23e7");
var DESCRIPTORS = __webpack_require__("83ab");
var global = __webpack_require__("da84");
var has = __webpack_require__("5135");
var isObject = __webpack_require__("861d");
var defineProperty = __webpack_require__("9bf2").f;
var copyConstructorProperties = __webpack_require__("e893");

var NativeSymbol = global.Symbol;

if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
  // Safari 12 bug
  NativeSymbol().description !== undefined
)) {
  var EmptyStringDescriptionStore = {};
  // wrap Symbol constructor for correct work with undefined description
  var SymbolWrapper = function Symbol() {
    var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
    var result = this instanceof SymbolWrapper
      ? new NativeSymbol(description)
      // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
      : description === undefined ? NativeSymbol() : NativeSymbol(description);
    if (description === '') EmptyStringDescriptionStore[result] = true;
    return result;
  };
  copyConstructorProperties(SymbolWrapper, NativeSymbol);
  var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
  symbolPrototype.constructor = SymbolWrapper;

  var symbolToString = symbolPrototype.toString;
  var native = String(NativeSymbol('test')) == 'Symbol(test)';
  var regexp = /^Symbol\((.*)\)[^)]+$/;
  defineProperty(symbolPrototype, 'description', {
    configurable: true,
    get: function description() {
      var symbol = isObject(this) ? this.valueOf() : this;
      var string = symbolToString.call(symbol);
      if (has(EmptyStringDescriptionStore, symbol)) return '';
      var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
      return desc === '' ? undefined : desc;
    }
  });

  $({ global: true, forced: true }, {
    Symbol: SymbolWrapper
  });
}


/***/ }),

/***/ "e163":
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__("5135");
var toObject = __webpack_require__("7b0b");
var sharedKey = __webpack_require__("f772");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__("e177");

var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;

// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectPrototype : null;
};


/***/ }),

/***/ "e177":
/***/ (function(module, exports, __webpack_require__) {

var fails = __webpack_require__("d039");

module.exports = !fails(function () {
  function F() { /* empty */ }
  F.prototype.constructor = null;
  return Object.getPrototypeOf(new F()) !== F.prototype;
});


/***/ }),

/***/ "e260":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var toIndexedObject = __webpack_require__("fc6a");
var addToUnscopables = __webpack_require__("44d2");
var Iterators = __webpack_require__("3f8c");
var InternalStateModule = __webpack_require__("69f3");
var defineIterator = __webpack_require__("7dd0");

var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);

// `Array.prototype.entries` method
// https://tc39.es/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.es/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.es/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.es/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  setInternalState(this, {
    type: ARRAY_ITERATOR,
    target: toIndexedObject(iterated), // target
    index: 0,                          // next index
    kind: kind                         // kind
  });
// `%ArrayIteratorPrototype%.next` method
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
  var state = getInternalState(this);
  var target = state.target;
  var kind = state.kind;
  var index = state.index++;
  if (!target || index >= target.length) {
    state.target = undefined;
    return { value: undefined, done: true };
  }
  if (kind == 'keys') return { value: index, done: false };
  if (kind == 'values') return { value: target[index], done: false };
  return { value: [index, target[index]], done: false };
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;

// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),

/***/ "e2cc":
/***/ (function(module, exports, __webpack_require__) {

var redefine = __webpack_require__("6eeb");

module.exports = function (target, src, options) {
  for (var key in src) redefine(target, key, src[key], options);
  return target;
};


/***/ }),

/***/ "e538":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");

exports.f = wellKnownSymbol;


/***/ }),

/***/ "e667":
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return { error: false, value: exec() };
  } catch (error) {
    return { error: true, value: error };
  }
};


/***/ }),

/***/ "e683":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


/**
 * Creates a new URL by combining the specified URLs
 *
 * @param {string} baseURL The base URL
 * @param {string} relativeURL The relative URL
 * @returns {string} The combined URL
 */
module.exports = function combineURLs(baseURL, relativeURL) {
  return relativeURL
    ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
    : baseURL;
};


/***/ }),

/***/ "e6cf":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var IS_PURE = __webpack_require__("c430");
var global = __webpack_require__("da84");
var getBuiltIn = __webpack_require__("d066");
var NativePromise = __webpack_require__("fea9");
var redefine = __webpack_require__("6eeb");
var redefineAll = __webpack_require__("e2cc");
var setToStringTag = __webpack_require__("d44e");
var setSpecies = __webpack_require__("2626");
var isObject = __webpack_require__("861d");
var aFunction = __webpack_require__("1c0b");
var anInstance = __webpack_require__("19aa");
var inspectSource = __webpack_require__("8925");
var iterate = __webpack_require__("2266");
var checkCorrectnessOfIteration = __webpack_require__("1c7e");
var speciesConstructor = __webpack_require__("4840");
var task = __webpack_require__("2cf4").set;
var microtask = __webpack_require__("b575");
var promiseResolve = __webpack_require__("cdf9");
var hostReportErrors = __webpack_require__("44de");
var newPromiseCapabilityModule = __webpack_require__("f069");
var perform = __webpack_require__("e667");
var InternalStateModule = __webpack_require__("69f3");
var isForced = __webpack_require__("94ca");
var wellKnownSymbol = __webpack_require__("b622");
var IS_NODE = __webpack_require__("605d");
var V8_VERSION = __webpack_require__("2d00");

var SPECIES = wellKnownSymbol('species');
var PROMISE = 'Promise';
var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
var PromiseConstructor = NativePromise;
var TypeError = global.TypeError;
var document = global.document;
var process = global.process;
var $fetch = getBuiltIn('fetch');
var newPromiseCapability = newPromiseCapabilityModule.f;
var newGenericPromiseCapability = newPromiseCapability;
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
var UNHANDLED_REJECTION = 'unhandledrejection';
var REJECTION_HANDLED = 'rejectionhandled';
var PENDING = 0;
var FULFILLED = 1;
var REJECTED = 2;
var HANDLED = 1;
var UNHANDLED = 2;
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;

var FORCED = isForced(PROMISE, function () {
  var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
  if (!GLOBAL_CORE_JS_PROMISE) {
    // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
    // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
    // We can't detect it synchronously, so just check versions
    if (V8_VERSION === 66) return true;
    // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
    if (!IS_NODE && !NATIVE_REJECTION_EVENT) return true;
  }
  // We need Promise#finally in the pure version for preventing prototype pollution
  if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;
  // We can't use @@species feature detection in V8 since it causes
  // deoptimization and performance degradation
  // https://github.com/zloirock/core-js/issues/679
  if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
  // Detect correctness of subclassing with @@species support
  var promise = PromiseConstructor.resolve(1);
  var FakePromise = function (exec) {
    exec(function () { /* empty */ }, function () { /* empty */ });
  };
  var constructor = promise.constructor = {};
  constructor[SPECIES] = FakePromise;
  return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
});

var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
  PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
});

// helpers
var isThenable = function (it) {
  var then;
  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};

var notify = function (state, isReject) {
  if (state.notified) return;
  state.notified = true;
  var chain = state.reactions;
  microtask(function () {
    var value = state.value;
    var ok = state.state == FULFILLED;
    var index = 0;
    // variable length - can't use forEach
    while (chain.length > index) {
      var reaction = chain[index++];
      var handler = ok ? reaction.ok : reaction.fail;
      var resolve = reaction.resolve;
      var reject = reaction.reject;
      var domain = reaction.domain;
      var result, then, exited;
      try {
        if (handler) {
          if (!ok) {
            if (state.rejection === UNHANDLED) onHandleUnhandled(state);
            state.rejection = HANDLED;
          }
          if (handler === true) result = value;
          else {
            if (domain) domain.enter();
            result = handler(value); // can throw
            if (domain) {
              domain.exit();
              exited = true;
            }
          }
          if (result === reaction.promise) {
            reject(TypeError('Promise-chain cycle'));
          } else if (then = isThenable(result)) {
            then.call(result, resolve, reject);
          } else resolve(result);
        } else reject(value);
      } catch (error) {
        if (domain && !exited) domain.exit();
        reject(error);
      }
    }
    state.reactions = [];
    state.notified = false;
    if (isReject && !state.rejection) onUnhandled(state);
  });
};

var dispatchEvent = function (name, promise, reason) {
  var event, handler;
  if (DISPATCH_EVENT) {
    event = document.createEvent('Event');
    event.promise = promise;
    event.reason = reason;
    event.initEvent(name, false, true);
    global.dispatchEvent(event);
  } else event = { promise: promise, reason: reason };
  if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
};

var onUnhandled = function (state) {
  task.call(global, function () {
    var promise = state.facade;
    var value = state.value;
    var IS_UNHANDLED = isUnhandled(state);
    var result;
    if (IS_UNHANDLED) {
      result = perform(function () {
        if (IS_NODE) {
          process.emit('unhandledRejection', value, promise);
        } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
      });
      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
      state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
      if (result.error) throw result.value;
    }
  });
};

var isUnhandled = function (state) {
  return state.rejection !== HANDLED && !state.parent;
};

var onHandleUnhandled = function (state) {
  task.call(global, function () {
    var promise = state.facade;
    if (IS_NODE) {
      process.emit('rejectionHandled', promise);
    } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  });
};

var bind = function (fn, state, unwrap) {
  return function (value) {
    fn(state, value, unwrap);
  };
};

var internalReject = function (state, value, unwrap) {
  if (state.done) return;
  state.done = true;
  if (unwrap) state = unwrap;
  state.value = value;
  state.state = REJECTED;
  notify(state, true);
};

var internalResolve = function (state, value, unwrap) {
  if (state.done) return;
  state.done = true;
  if (unwrap) state = unwrap;
  try {
    if (state.facade === value) throw TypeError("Promise can't be resolved itself");
    var then = isThenable(value);
    if (then) {
      microtask(function () {
        var wrapper = { done: false };
        try {
          then.call(value,
            bind(internalResolve, wrapper, state),
            bind(internalReject, wrapper, state)
          );
        } catch (error) {
          internalReject(wrapper, error, state);
        }
      });
    } else {
      state.value = value;
      state.state = FULFILLED;
      notify(state, false);
    }
  } catch (error) {
    internalReject({ done: false }, error, state);
  }
};

// constructor polyfill
if (FORCED) {
  // 25.4.3.1 Promise(executor)
  PromiseConstructor = function Promise(executor) {
    anInstance(this, PromiseConstructor, PROMISE);
    aFunction(executor);
    Internal.call(this);
    var state = getInternalState(this);
    try {
      executor(bind(internalResolve, state), bind(internalReject, state));
    } catch (error) {
      internalReject(state, error);
    }
  };
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  Internal = function Promise(executor) {
    setInternalState(this, {
      type: PROMISE,
      done: false,
      notified: false,
      parent: false,
      reactions: [],
      rejection: false,
      state: PENDING,
      value: undefined
    });
  };
  Internal.prototype = redefineAll(PromiseConstructor.prototype, {
    // `Promise.prototype.then` method
    // https://tc39.es/ecma262/#sec-promise.prototype.then
    then: function then(onFulfilled, onRejected) {
      var state = getInternalPromiseState(this);
      var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
      reaction.fail = typeof onRejected == 'function' && onRejected;
      reaction.domain = IS_NODE ? process.domain : undefined;
      state.parent = true;
      state.reactions.push(reaction);
      if (state.state != PENDING) notify(state, false);
      return reaction.promise;
    },
    // `Promise.prototype.catch` method
    // https://tc39.es/ecma262/#sec-promise.prototype.catch
    'catch': function (onRejected) {
      return this.then(undefined, onRejected);
    }
  });
  OwnPromiseCapability = function () {
    var promise = new Internal();
    var state = getInternalState(promise);
    this.promise = promise;
    this.resolve = bind(internalResolve, state);
    this.reject = bind(internalReject, state);
  };
  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
    return C === PromiseConstructor || C === PromiseWrapper
      ? new OwnPromiseCapability(C)
      : newGenericPromiseCapability(C);
  };

  if (!IS_PURE && typeof NativePromise == 'function') {
    nativeThen = NativePromise.prototype.then;

    // wrap native Promise#then for native async functions
    redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {
      var that = this;
      return new PromiseConstructor(function (resolve, reject) {
        nativeThen.call(that, resolve, reject);
      }).then(onFulfilled, onRejected);
    // https://github.com/zloirock/core-js/issues/640
    }, { unsafe: true });

    // wrap fetch result
    if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {
      // eslint-disable-next-line no-unused-vars -- required for `.length`
      fetch: function fetch(input /* , init */) {
        return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
      }
    });
  }
}

$({ global: true, wrap: true, forced: FORCED }, {
  Promise: PromiseConstructor
});

setToStringTag(PromiseConstructor, PROMISE, false, true);
setSpecies(PROMISE);

PromiseWrapper = getBuiltIn(PROMISE);

// statics
$({ target: PROMISE, stat: true, forced: FORCED }, {
  // `Promise.reject` method
  // https://tc39.es/ecma262/#sec-promise.reject
  reject: function reject(r) {
    var capability = newPromiseCapability(this);
    capability.reject.call(undefined, r);
    return capability.promise;
  }
});

$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
  // `Promise.resolve` method
  // https://tc39.es/ecma262/#sec-promise.resolve
  resolve: function resolve(x) {
    return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
  }
});

$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
  // `Promise.all` method
  // https://tc39.es/ecma262/#sec-promise.all
  all: function all(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var resolve = capability.resolve;
    var reject = capability.reject;
    var result = perform(function () {
      var $promiseResolve = aFunction(C.resolve);
      var values = [];
      var counter = 0;
      var remaining = 1;
      iterate(iterable, function (promise) {
        var index = counter++;
        var alreadyCalled = false;
        values.push(undefined);
        remaining++;
        $promiseResolve.call(C, promise).then(function (value) {
          if (alreadyCalled) return;
          alreadyCalled = true;
          values[index] = value;
          --remaining || resolve(values);
        }, reject);
      });
      --remaining || resolve(values);
    });
    if (result.error) reject(result.value);
    return capability.promise;
  },
  // `Promise.race` method
  // https://tc39.es/ecma262/#sec-promise.race
  race: function race(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var reject = capability.reject;
    var result = perform(function () {
      var $promiseResolve = aFunction(C.resolve);
      iterate(iterable, function (promise) {
        $promiseResolve.call(C, promise).then(capability.resolve, reject);
      });
    });
    if (result.error) reject(result.value);
    return capability.promise;
  }
});


/***/ }),

/***/ "e893":
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__("5135");
var ownKeys = __webpack_require__("56ef");
var getOwnPropertyDescriptorModule = __webpack_require__("06cf");
var definePropertyModule = __webpack_require__("9bf2");

module.exports = function (target, source) {
  var keys = ownKeys(source);
  var defineProperty = definePropertyModule.f;
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  }
};


/***/ }),

/***/ "e8b5":
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__("c6b6");

// `IsArray` abstract operation
// https://tc39.es/ecma262/#sec-isarray
module.exports = Array.isArray || function isArray(arg) {
  return classof(arg) == 'Array';
};


/***/ }),

/***/ "e95a":
/***/ (function(module, exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__("b622");
var Iterators = __webpack_require__("3f8c");

var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;

// check on default Array iterator
module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};


/***/ }),

/***/ "eba8":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ParamsConfig_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d0126");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ParamsConfig_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ParamsConfig_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "eee5":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "f069":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var aFunction = __webpack_require__("1c0b");

var PromiseCapability = function (C) {
  var resolve, reject;
  this.promise = new C(function ($$resolve, $$reject) {
    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
    resolve = $$resolve;
    reject = $$reject;
  });
  this.resolve = aFunction(resolve);
  this.reject = aFunction(reject);
};

// 25.4.1.5 NewPromiseCapability(C)
module.exports.f = function (C) {
  return new PromiseCapability(C);
};


/***/ }),

/***/ "f5df":
/***/ (function(module, exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee");
var classofRaw = __webpack_require__("c6b6");
var wellKnownSymbol = __webpack_require__("b622");

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};


/***/ }),

/***/ "f6b4":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var utils = __webpack_require__("c532");

function InterceptorManager() {
  this.handlers = [];
}

/**
 * Add a new interceptor to the stack
 *
 * @param {Function} fulfilled The function to handle `then` for a `Promise`
 * @param {Function} rejected The function to handle `reject` for a `Promise`
 *
 * @return {Number} An ID used to remove interceptor later
 */
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  this.handlers.push({
    fulfilled: fulfilled,
    rejected: rejected
  });
  return this.handlers.length - 1;
};

/**
 * Remove an interceptor from the stack
 *
 * @param {Number} id The ID that was returned by `use`
 */
InterceptorManager.prototype.eject = function eject(id) {
  if (this.handlers[id]) {
    this.handlers[id] = null;
  }
};

/**
 * Iterate over all the registered interceptors
 *
 * This method is particularly useful for skipping over any
 * interceptors that may have become `null` calling `eject`.
 *
 * @param {Function} fn The function to call for each interceptor
 */
InterceptorManager.prototype.forEach = function forEach(fn) {
  utils.forEach(this.handlers, function forEachHandler(h) {
    if (h !== null) {
      fn(h);
    }
  });
};

module.exports = InterceptorManager;


/***/ }),

/***/ "f772":
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__("5692");
var uid = __webpack_require__("90e3");

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};


/***/ }),

/***/ "fae3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, "TopologyWorkspace", function() { return /* reexport */ Workspace; });
__webpack_require__.d(__webpack_exports__, "Preview", function() { return /* reexport */ Preview; });
__webpack_require__.d(__webpack_exports__, "PreviewToImg", function() { return /* reexport */ PreviewToImg; });
__webpack_require__.d(__webpack_exports__, "ParamsConfig", function() { return /* reexport */ ParamsConfig; });
__webpack_require__.d(__webpack_exports__, "getRegisterNode", function() { return /* reexport */ getRegisterNode; });
__webpack_require__.d(__webpack_exports__, "registerIcons", function() { return /* reexport */ customgraph_registerIcons; });
__webpack_require__.d(__webpack_exports__, "data", function() { return /* reexport */ eesymbols_data; });
__webpack_require__.d(__webpack_exports__, "data2", function() { return /* reexport */ data2; });
__webpack_require__.d(__webpack_exports__, "lineList", function() { return /* reexport */ lineList; });
__webpack_require__.d(__webpack_exports__, "lineOther", function() { return /* reexport */ lineOther; });
__webpack_require__.d(__webpack_exports__, "arrowTypes", function() { return /* reexport */ arrowTypes; });
__webpack_require__.d(__webpack_exports__, "eventAction", function() { return /* reexport */ eventAction; });
__webpack_require__.d(__webpack_exports__, "headMenu", function() { return /* reexport */ headMenu; });
__webpack_require__.d(__webpack_exports__, "customTools", function() { return /* reexport */ customTools; });
__webpack_require__.d(__webpack_exports__, "encryption", function() { return /* reexport */ encryption; });
__webpack_require__.d(__webpack_exports__, "decrypt", function() { return /* reexport */ rsautils_decrypt; });

// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
// This file is imported into lib/wc client bundles.

if (typeof window !== 'undefined') {
  var currentScript = window.document.currentScript
  if (true) {
    var getCurrentScript = __webpack_require__("8875")
    currentScript = getCurrentScript()

    // for backward compatibility, because previously we directly included the polyfill
    if (!('currentScript' in document)) {
      Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
    }
  }

  var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  if (src) {
    __webpack_require__.p = src[1] // eslint-disable-line
  }
}

// Indicate to webpack that this file can be concatenated
/* harmony default export */ var setPublicPath = (null);

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
var es_function_name = __webpack_require__("b0c0");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/topology/Workspace.vue?vue&type=template&id=09266e92&
var Workspacevue_type_template_id_09266e92_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"home"},[_c('a-layout',{style:({
      overflow: 'auto',
      width: '100%',
      height: '100vh',
      position: 'fixed',
      left: 0,
    }),attrs:{"id":"components-layout-demo-top-side-2"}},[_c('a-layout-header',{staticClass:"header",staticStyle:{"text-align":"left"}},[_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{attrs:{"span":6}},_vm._l((_vm.headMenu),function(item){return _c('a-dropdown',{key:item.type,staticStyle:{"margin-right":"5vh"}},[_c('a-button',{attrs:{"ghost":""}},[_vm._v(_vm._s(item.name)),_c('a-icon',{attrs:{"type":"down"}})],1),_c('a-menu',{attrs:{"slot":"overlay","mode":'vertical'},slot:"overlay"},_vm._l((item.children),function(it){return _c('a-menu-item',{key:it.show,on:{"click":function($event){return _vm.operationFile(item.type, it.type)}}},[_vm._v(" "+_vm._s(it.name)+" ")])}),1)],1)}),1),_c('a-col',{attrs:{"span":14}},[_c('div',{staticStyle:{"color":"#fff","margin-left":"15px"}},[_c('a-button',{attrs:{"type":"dashed","ghost":""},on:{"click":_vm.preview}},[_vm._v(" 预览 ")]),_c('a-divider',{attrs:{"type":"vertical"}}),_c('span',[_vm._v("视图："),_c('a-input-number',{attrs:{"min":30,"max":500,"formatter":function (value) { return (value + "%"); }},model:{value:(_vm.scalecom),callback:function ($$v) {_vm.scalecom=$$v},expression:"scalecom"}})],1),_c('a-divider',{attrs:{"type":"vertical"}}),_c('a-popover',[_c('template',{slot:"content"},[_c('a-input-number',{attrs:{"min":1},model:{value:(_vm.lineWidthcom),callback:function ($$v) {_vm.lineWidthcom=$$v},expression:"lineWidthcom"}})],1),_c('span',[_vm._v("线宽："+_vm._s(_vm.lineWidthcom))])],2),_c('a-divider',{attrs:{"type":"vertical"}}),_c('a-tooltip',[_c('template',{slot:"title"},[(_vm.locked < 1)?_c('p',[_vm._v("未锁定")]):_c('p',[_vm._v("已锁定")])]),_c('a-icon',{attrs:{"type":_vm.locked < 1 ? 'unlock' : 'lock'},on:{"click":function($event){return _vm.lockClick()}}})],2),_c('a-divider',{attrs:{"type":"vertical"}}),_c('a-select',{staticStyle:{"width":"20%"},on:{"change":_vm.handlLineName},model:{value:(_vm.lineName),callback:function ($$v) {_vm.lineName=$$v},expression:"lineName"}},_vm._l((_vm.lineList),function(item){return _c('a-select-option',{key:item.type,attrs:{"value":item.type}},[_c('span',[_vm._v(_vm._s(item.name)+" ")]),_c('span',{staticStyle:{"float":"right"}},[_c('i',{class:("t-icon t-" + (item.type)),staticStyle:{"font-size":"5vh"}})])])}),1),_c('a-divider',{attrs:{"type":"vertical"}}),_c('a-select',{staticStyle:{"width":"15%"},on:{"change":_vm.handleFromArrowType},model:{value:(_vm.fromArrow),callback:function ($$v) {_vm.fromArrow=$$v},expression:"fromArrow"}},_vm._l((_vm.arrowTypes),function(item){return _c('a-select-option',{key:item,attrs:{"value":item}},[_c('i',{class:("t-icon t-to-" + item),staticStyle:{"font-size":"7vh"}})])}),1),_c('a-divider',{attrs:{"type":"vertical"}}),_c('a-select',{staticStyle:{"width":"15%"},on:{"change":_vm.handleToArrowType},model:{value:(_vm.toArrow),callback:function ($$v) {_vm.toArrow=$$v},expression:"toArrow"}},_vm._l((_vm.arrowTypes),function(item){return _c('a-select-option',{key:item,attrs:{"value":item}},[_c('i',{class:("t-icon t-to-" + item),staticStyle:{"font-size":"7vh"}})])}),1)],1)]),_c('a-col',{attrs:{"span":4}},[_c('div',{staticStyle:{"text-align":"right"}},[_c('a-button',{staticStyle:{"margin-right":"2vh"},attrs:{"ghost":""},on:{"click":_vm.saveTopology}},[_vm._v(" 保存 ")]),_c('a-button',{attrs:{"ghost":"","type":"dashed"},on:{"click":_vm.back}},[_vm._v(" 返回 ")])],1)])],1)],1),_c('a-layout',[_c('a-layout-sider',{staticStyle:{"background":"#fff","overflow":"hidden","height":"95vh"},attrs:{"width":"200"}},[_c('div',[_c('a-tabs',{attrs:{"default-active-key":"1","size":"small"}},[_c('a-tab-pane',{key:"1",attrs:{"tab":"系统组件"}},[_c('div',{staticClass:"div-scoll"},[_c('a-collapse',[_vm._l((_vm.tools),function(item,index){return _c('a-collapse-panel',{key:index,attrs:{"header":item.group}},[_c('a-row',{staticStyle:{"padding":"0px"}},_vm._l((item.children),function(btn,i){return _c('a-card-grid',{key:i,staticClass:"ant-card-grid",style:(_vm.customStyle),attrs:{"title":btn.name,"draggable":btn.data},on:{"dragstart":function($event){return _vm.onDrag($event, btn, false)}}},[_c('i',{class:("iconfont " + (btn.icon)),staticStyle:{"font-size":"25px"}})])}),1)],1)}),_vm._l((_vm.toolSvgs),function(item,index){return _c('a-collapse-panel',{key:index,attrs:{"header":item.group}},[_c('a-row',{staticStyle:{"padding":"0px"}},_vm._l((item.children),function(btn,i){return _c('a-card-grid',{key:i,staticClass:"ant-card-grid",style:(_vm.customStyle),attrs:{"title":btn.name,"draggable":btn.data},domProps:{"innerHTML":_vm._s(btn.image)},on:{"dragover":function($event){return _vm.allowDrop($event)},"dragstart":function($event){return _vm.onDrag($event, btn, true)}}})}),1)],1)})],2)],1)])],1)],1)]),_c('a-layout',[_c('div',{staticStyle:{"position":"relative","overflow":"hidden"}},[_c('div',{staticClass:"canvas",attrs:{"id":"topology-hrhx"}})])]),_c('a-layout-sider',{staticStyle:{"background":"#fff","overflow":"hidden","height":"95vh"},attrs:{"width":"240"}},[_c('div',[(_vm.opt == 'space')?_c('space-view',{attrs:{"canvas":_vm.canvas.data},on:{"ok":_vm.uploadCanvasData}}):_vm._e(),(_vm.opt == 'addNode' || _vm.opt == 'node')?_c('node-view',{attrs:{"node":_vm.node},on:{"update:node":function($event){_vm.node=$event},"ok":_vm.updateProps}}):_vm._e(),(_vm.opt == 'addLine' || _vm.opt == 'line')?_c('line-view',{attrs:{"line":_vm.lineData},on:{"update:line":function($event){_vm.lineData=$event},"ok":_vm.updateLines}}):_vm._e(),(_vm.opt == 'multi')?_c('pens-view',{attrs:{"pens":_vm.pens},on:{"update:pens":function($event){_vm.pens=$event},"no":_vm.updateAlignNodes,"ok":_vm.updatePens,"spaceB":_vm.updateSpaceBetween,"updateSub":_vm.updatePensSubclass}}):_vm._e()],1)])],1)],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/views/topology/Workspace.vue?vue&type=template&id=09266e92&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
var es_promise = __webpack_require__("e6cf");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js



function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  try {
    var info = gen[key](arg);
    var value = info.value;
  } catch (error) {
    reject(error);
    return;
  }

  if (info.done) {
    resolve(value);
  } else {
    Promise.resolve(value).then(_next, _throw);
  }
}

function _asyncToGenerator(fn) {
  return function () {
    var self = this,
        args = arguments;
    return new Promise(function (resolve, reject) {
      var gen = fn.apply(self, args);

      function _next(value) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
      }

      function _throw(err) {
        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
      }

      _next(undefined);
    });
  };
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
var es_symbol = __webpack_require__("a4d3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js
var es_symbol_description = __webpack_require__("e01a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.iterator.js
var es_symbol_iterator = __webpack_require__("d28b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
var es_string_iterator = __webpack_require__("3ca3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("e260");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
var es_array_slice = __webpack_require__("fb6a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
var es_array_from = __webpack_require__("a630");

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;

  for (var i = 0, arr2 = new Array(len); i < len; i++) {
    arr2[i] = arr[i];
  }

  return arr2;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js






function _unsupportedIterableToArray(o, minLen) {
  if (!o) return;
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  var n = Object.prototype.toString.call(o).slice(8, -1);
  if (n === "Object" && o.constructor) n = o.constructor.name;
  if (n === "Map" || n === "Set") return Array.from(o);
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js








function _createForOfIteratorHelper(o, allowArrayLike) {
  var it;

  if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
      if (it) o = it;
      var i = 0;

      var F = function F() {};

      return {
        s: F,
        n: function n() {
          if (i >= o.length) return {
            done: true
          };
          return {
            done: false,
            value: o[i++]
          };
        },
        e: function e(_e) {
          throw _e;
        },
        f: F
      };
    }

    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }

  var normalCompletion = true,
      didErr = false,
      err;
  return {
    s: function s() {
      it = o[Symbol.iterator]();
    },
    n: function n() {
      var step = it.next();
      normalCompletion = step.done;
      return step;
    },
    e: function e(_e2) {
      didErr = true;
      err = _e2;
    },
    f: function f() {
      try {
        if (!normalCompletion && it["return"] != null) it["return"]();
      } finally {
        if (didErr) throw err;
      }
    }
  };
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
var es_string_replace = __webpack_require__("5319");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
var es_regexp_exec = __webpack_require__("ac1f");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
var web_url = __webpack_require__("2b3d");

// EXTERNAL MODULE: ./node_modules/regenerator-runtime/runtime.js
var runtime = __webpack_require__("96cf");

// EXTERNAL MODULE: ./node_modules/le5le-store/index.js
var le5le_store = __webpack_require__("051e");

// CONCATENATED MODULE: ./node_modules/mitt/dist/mitt.es.js
/* harmony default export */ var mitt_es = (function(n){return{all:n=n||new Map,on:function(t,e){var i=n.get(t);i&&i.push(e)||n.set(t,[e])},off:function(t,e){var i=n.get(t);i&&i.splice(i.indexOf(e)>>>0,1)},emit:function(t,e){(n.get(t)||[]).slice().map(function(n){n(e)}),(n.get("*")||[]).slice().map(function(n){n(t,e)})}}});
//# sourceMappingURL=mitt.es.js.map

// CONCATENATED MODULE: ./node_modules/@topology/core/src/options.js
var KeyType;
(function (KeyType) {
    KeyType[KeyType["Any"] = -1] = "Any";
    KeyType[KeyType["CtrlOrAlt"] = 0] = "CtrlOrAlt";
    KeyType[KeyType["Ctrl"] = 1] = "Ctrl";
    KeyType[KeyType["Shift"] = 2] = "Shift";
    KeyType[KeyType["Alt"] = 3] = "Alt";
    KeyType[KeyType["Right"] = 4] = "Right";
})(KeyType || (KeyType = {}));
var KeydownType;
(function (KeydownType) {
    KeydownType[KeydownType["None"] = -1] = "None";
    KeydownType[KeydownType["Document"] = 0] = "Document";
    KeydownType[KeydownType["Canvas"] = 1] = "Canvas";
})(KeydownType || (KeydownType = {}));
var fontKeys = ['fontColor', 'fontFamily', 'fontSize', 'lineHeight', 'textAlign', 'textBaseline'];
var DefalutOptions = {
    cacheLen: 30,
    refresh: 30,
    fontColor: '#222222',
    fontFamily: '"Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial',
    fontSize: 12,
    lineHeight: 1.5,
    textAlign: 'center',
    textBaseline: 'middle',
    color: '#222222',
    activeColor: '#1890ff',
    hoverColor: '#fa541c',
    anchorRadius: 4,
    anchorFillStyle: '#fff',
    dockStrokeStyle: '#fa541c',
    dockFillStyle: '#fa541c',
    dragColor: '#1890ff',
    rotateCursor: '/assets/img/rotate.cur',
    hoverCursor: 'pointer',
    minScale: 0.3,
    maxScale: 5,
    anchorSize: 5,
    keydown: KeydownType.Document,
    viewPadding: 0,
    gridSize: 10,
    gridColor: '#f3f3f3',
    ruleColor: '#888888',
    scroll: true
};
//# sourceMappingURL=options.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/uuid.js
function s4() {
    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
function s8() {
    return (((1 + Math.random()) * 0x100000000) | 0).toString(16).substring(1);
}
function s12() {
    return s4() + s8();
}
function s16() {
    return s8() + s8();
}
//# sourceMappingURL=uuid.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/point.js
var Point = /** @class */ (function () {
    function Point(x, y, direction, anchorIndex, id, hidden, autoAnchor) {
        this.x = x;
        this.y = y;
        this.direction = direction;
        this.anchorIndex = anchorIndex;
        this.id = id;
        this.hidden = hidden;
        this.autoAnchor = autoAnchor;
    }
    Point.prototype.floor = function () {
        this.x |= 0;
        this.y |= 0;
    };
    Point.prototype.round = function () {
        this.x = Math.round(this.x);
        this.y = Math.round(this.y);
    };
    Point.prototype.clone = function () {
        var pt = new Point(this.x, this.y, this.direction, this.anchorIndex, this.id, this.hidden, this.autoAnchor);
        if (this.data) {
            pt.data = this.data;
        }
        if (this.mode) {
            pt.mode = this.mode;
        }
        return pt;
    };
    Point.prototype.hit = function (pt, radius) {
        if (radius === void 0) { radius = 5; }
        return pt.x > this.x - radius && pt.x < this.x + radius && pt.y > this.y - radius && pt.y < this.y + radius;
    };
    Point.prototype.rotate = function (angle, center) {
        if (!angle || angle === 360) {
            return this;
        }
        angle *= Math.PI / 180;
        var x = (this.x - center.x) * Math.cos(angle) - (this.y - center.y) * Math.sin(angle) + center.x;
        var y = (this.x - center.x) * Math.sin(angle) + (this.y - center.y) * Math.cos(angle) + center.y;
        this.x = x;
        this.y = y;
        return this;
    };
    Point.prototype.isSameAs = function (pt) {
        return this.anchorIndex === pt.anchorIndex && this.direction === pt.direction && this.id === pt.id;
    };
    return Point;
}());

window.topologyPoint = Point;
window.Le5leTopologyPoint = Point;
//# sourceMappingURL=point.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/canvas.js

function flatNodes(nodes) {
    var result = {
        nodes: [],
        lines: [],
    };
    for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
        var item = nodes_1[_i];
        if (item.type) {
            result.lines.push(item);
            continue;
        }
        result.nodes.push(item);
        if (item.children) {
            result.nodes.push.apply(result.nodes, flatNodes(item.children).nodes);
            result.lines.push.apply(result.lines, flatNodes(item.children).lines);
        }
    }
    return result;
}
function find(idOrTag, pens) {
    var result = [];
    pens.forEach(function (item) {
        if (item.id === idOrTag || item.tags.indexOf(idOrTag) > -1) {
            result.push(item);
        }
        if (item.children) {
            result.push.apply(result, find(idOrTag, item.children));
        }
    });
    return result;
}
function del(idOrTag, pens) {
    var deleted = [];
    for (var i = 0; i < pens.length; i++) {
        if (pens[i].id === idOrTag || pens[i].tags.indexOf(idOrTag) > -1) {
            deleted.push(pens[i]);
            pens.splice(i, 1);
            --i;
        }
        else if (pens[i].children) {
            deleted.push.apply(deleted, del(idOrTag, pens[i].children));
        }
    }
    return deleted;
}
function getParent(pens, child) {
    var parent;
    for (var _i = 0, pens_1 = pens; _i < pens_1.length; _i++) {
        var item = pens_1[_i];
        if (item.type) {
            continue;
        }
        if (!item.children) {
            continue;
        }
        for (var _a = 0, _b = item.children; _a < _b.length; _a++) {
            var subItem = _b[_a];
            if (subItem.id === child.id) {
                return item;
            }
            if (subItem.type) {
                continue;
            }
            if (subItem.children) {
                parent = getParent(subItem.children, child);
                if (parent) {
                    return parent;
                }
            }
        }
    }
    return parent;
}
function pointInRect(point, vertices) {
    if (vertices.length < 3) {
        return false;
    }
    var isIn = false;
    var last = vertices[vertices.length - 1];
    for (var _i = 0, vertices_1 = vertices; _i < vertices_1.length; _i++) {
        var item = vertices_1[_i];
        if (((last.y > point.y) !== (item.y > point.y))) {
            if (item.x + ((point.y - item.y) * (last.x - item.x)) / (last.y - item.y) > point.x) {
                isIn = !isIn;
            }
        }
        last = item;
    }
    return isIn;
}
function pointInLine(point, from, to, padding) {
    if (padding === void 0) { padding = 1; }
    var angle = Math.atan2(from.y - to.y, to.x - from.x);
    padding = padding > 5 ? padding : 5;
    var x = Math.sin(angle) * padding;
    var y = Math.cos(angle) * padding;
    var points = [
        new Point(from.x - x, from.y - y),
        new Point(to.x - x, to.y - y),
        new Point(to.x + x, to.y + y),
        new Point(from.x + x, from.y + y)
    ];
    return pointInRect(point, points);
}
function lineLen(from, to) {
    var len = Math.sqrt(Math.pow(Math.abs(from.x - to.x), 2) + Math.pow(Math.abs(from.y - to.y), 2));
    return len | 0;
}
function curveLen(from, cp1, cp2, to) {
    var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
    path.setAttribute('d', "M" + from.x + " " + from.y + " C" + cp1.x + " " + cp1.y + " " + cp2.x + " " + cp2.y + " " + to.x + " " + to.y);
    return path.getTotalLength() | 0;
}
//# sourceMappingURL=canvas.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/rect.js


var rect_Rect = /** @class */ (function () {
    function Rect(x, y, width, height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
        this.center = new Point(0, 0);
        if (width < 0) {
            width = 0;
        }
        if (height < 0) {
            height = 0;
        }
        this.init();
    }
    Rect.prototype.init = function () {
        this.ex = this.x + this.width;
        this.ey = this.y + this.height;
        this.calcCenter();
    };
    Rect.prototype.floor = function () {
        this.x |= 0;
        this.y |= 0;
        this.width |= 0;
        this.height |= 0;
        this.init();
    };
    Rect.prototype.round = function () {
        this.x = Math.round(this.x);
        this.y = Math.round(this.y);
        this.width = Math.round(this.width);
        this.height = Math.round(this.height);
        this.init();
    };
    Rect.prototype.clone = function () {
        return new Rect(this.x, this.y, this.width, this.height);
    };
    Rect.prototype.hit = function (pt, padding) {
        if (padding === void 0) { padding = 0; }
        return pt && pt.x > this.x - padding && pt.x < this.ex + padding && pt.y > this.y - padding && pt.y < this.ey + padding;
    };
    Rect.prototype.hitByRect = function (rect) {
        return ((rect.x > this.x && rect.x < this.ex && rect.y > this.y && rect.y < this.ey) ||
            (rect.ex > this.x && rect.ex < this.ex && rect.y > this.y && rect.y < this.ey) ||
            (rect.ex > this.x && rect.ex < this.ex && rect.ey > this.y && rect.ey < this.ey) ||
            (rect.x > this.x && rect.x < this.ex && rect.ey > this.y && rect.ey < this.ey));
    };
    Rect.prototype.hitRotate = function (point, rotate, center) {
        var pts = this.toPoints();
        for (var _i = 0, pts_1 = pts; _i < pts_1.length; _i++) {
            var pt = pts_1[_i];
            pt.rotate(rotate, center);
        }
        return pointInRect(point, pts);
    };
    Rect.prototype.calcCenter = function () {
        this.center.x = this.x + this.width / 2;
        this.center.y = this.y + this.height / 2;
    };
    Rect.prototype.toPoints = function () {
        return [
            new Point(this.x, this.y),
            new Point(this.ex, this.y),
            new Point(this.ex, this.ey),
            new Point(this.x, this.ey),
        ];
    };
    Rect.prototype.translate = function (x, y) {
        this.x += x;
        this.y += y;
        this.ex += x;
        this.ey += y;
        this.calcCenter();
    };
    Rect.prototype.scale = function (scale, center, scaleY) {
        if (!center) {
            center = this.center;
        }
        if (scaleY === undefined) {
            scaleY = scale;
        }
        this.x = center.x - (center.x - this.x) * scale;
        this.y = center.y - (center.y - this.y) * scaleY;
        this.width *= scale;
        this.height *= scaleY;
        this.init();
    };
    return Rect;
}());

window.topologyRect = rect_Rect;
//# sourceMappingURL=rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/event.js
var EventType;
(function (EventType) {
    EventType[EventType["Click"] = 0] = "Click";
    EventType[EventType["DblClick"] = 1] = "DblClick";
    EventType[EventType["WebSocket"] = 2] = "WebSocket";
    EventType[EventType["Mqtt"] = 3] = "Mqtt";
    EventType[EventType["MoveIn"] = 4] = "MoveIn";
    EventType[EventType["MoveOut"] = 5] = "MoveOut";
    EventType[EventType["MouseUp"] = 6] = "MouseUp";
})(EventType || (EventType = {}));
var EventAction;
(function (EventAction) {
    EventAction[EventAction["Link"] = 0] = "Link";
    EventAction[EventAction["StartAnimate"] = 1] = "StartAnimate";
    EventAction[EventAction["Function"] = 2] = "Function";
    EventAction[EventAction["WindowFn"] = 3] = "WindowFn";
    EventAction[EventAction["SetProps"] = 4] = "SetProps";
    EventAction[EventAction["PauseAnimate"] = 5] = "PauseAnimate";
    EventAction[EventAction["StopAnimate"] = 6] = "StopAnimate";
    EventAction[EventAction["Emit"] = 7] = "Emit";
})(EventAction || (EventAction = {}));
//# sourceMappingURL=event.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/clone.js
function deepClone(o) {
    if (Array.isArray(o)) {
        var arr_1 = [];
        o.forEach(function (item) {
            arr_1.push(deepClone(item));
        });
        return arr_1;
    }
    else if (typeof o === 'object') {
        if (o === null) {
            return null;
        }
        else if (o.constructor === RegExp) {
            return o;
        }
        var _o = {};
        for (var key in o) {
            _o[key] = deepClone(o[key]);
        }
        return _o;
    }
    return o;
}
//# sourceMappingURL=clone.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/pen.js





var PenType;
(function (PenType) {
    PenType[PenType["Node"] = 0] = "Node";
    PenType[PenType["Line"] = 1] = "Line";
})(PenType || (PenType = {}));
var eventFns = [
    'link',
    'doStartAnimate',
    'doFn',
    'doWindowFn',
    '',
    'doPauseAnimate',
    'doStopAnimate',
    'doEmit',
];
var defaultPen = {
    name: '',
    tags: [],
    visible: true,
    rect: new rect_Rect(0, 0, 0, 0),
    fontColor: '',
    fontFamily: '"Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial',
    fontSize: 12,
    lineHeight: 1.5,
    fontStyle: 'normal',
    fontWeight: 'normal',
    textAlign: 'center',
    textBaseline: 'middle',
    textBackground: '',
    animateCycleIndex: 0,
    events: [],
    dash: 0,
    lineDashOffset: 0,
    lineWidth: 1,
    strokeStyle: '',
    fillStyle: '',
    globalAlpha: 1,
    rotate: 0,
    offsetRotate: 0,
    textMaxLine: 0,
    textOffsetX: 0,
    textOffsetY: 0,
    animatePos: 0,
};
var pen_images = {};
var pen_Pen = /** @class */ (function () {
    function Pen() {
    }
    Pen.prototype.fromData = function (defaultData, json) {
        if (!json) {
            json = {};
        }
        else if (typeof json === 'string') {
            json = JSON.parse(json);
        }
        defaultPen.id = s8();
        defaultData = Object.assign({}, defaultPen, defaultData);
        for (var key in defaultData) {
            this[key] = defaultData[key];
        }
        for (var key in json) {
            this[key] = json[key];
        }
        if (Array.isArray(this.tags)) {
            this.tags = Object.assign([], this.tags);
        }
        if (this.rect) {
            this.rect = new rect_Rect(this.rect.x, this.rect.y, this.rect.width, this.rect.height);
        }
        this.lineWidth = this.lineWidth || 1;
        // 兼容老格式
        if (!this.fontColor && json.font) {
            this.fontColor = json.font.color || this.fontColor;
            this.fontFamily = json.font.fontFamily || this.fontFamily;
            this.fontSize = json.font.fontSize || this.fontSize;
            this.lineHeight = json.font.lineHeight || this.lineHeight;
            this.fontStyle = json.font.fontStyle || this.fontStyle;
            this.fontWeight = json.font.fontWeight || this.fontWeight;
            this.textAlign = json.font.textAlign || this.textAlign;
            this.textBaseline = json.font.textBaseline || this.textBaseline;
            this.textBackground = json.font.background || this.textBackground;
            delete this['font'];
        }
        // end
        if (this.events) {
            this.events = deepClone(this.events);
        }
        if (this.wheres) {
            this.wheres = deepClone(this.wheres);
        }
        if (typeof this.data === 'object') {
            this.data = JSON.parse(JSON.stringify(this.data));
        }
        delete this['img'];
        delete this['animateStart'];
        delete this['animateReady'];
    };
    Pen.prototype.render = function (ctx) {
        if (!this.visible) {
            return;
        }
        if (this.from && !this.to) {
            if (this.children) {
                for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                    var item = _a[_i];
                    item.render(ctx);
                }
            }
            return;
        }
        ctx.save();
        // for canvas2svg
        if (ctx.setAttrs) {
            ctx.setAttrs(this);
        }
        // end
        if (this.rotate || this.offsetRotate) {
            ctx.translate(this.rect.center.x, this.rect.center.y);
            ctx.rotate(((this.rotate + this.offsetRotate) * Math.PI) / 180);
            ctx.translate(-this.rect.center.x, -this.rect.center.y);
        }
        if (this.lineWidth > 1) {
            ctx.lineWidth = this.lineWidth;
        }
        if (this.strokeImage) {
            if (this.strokeImage === this.lastStrokeImage && this.strokeImg) {
                ctx.strokeStyle = ctx.createPattern(this.strokeImg, 'repeat');
            }
            else {
                this.loadStrokeImg();
            }
        }
        else {
            ctx.strokeStyle =
                this.strokeStyle || le5le_store["Store"].get(this.generateStoreKey('LT:color'));
        }
        if (this.fillImage) {
            if (this.fillImage === this.lastFillImage && this.fillImg) {
                ctx.fillStyle = ctx.createPattern(this.fillImg, 'repeat');
            }
            else {
                this.loadFillImg();
            }
        }
        else if (this.fillStyle) {
            ctx.fillStyle = this.fillStyle;
        }
        if (this.lineCap) {
            ctx.lineCap = this.lineCap;
        }
        else if (this.type === PenType.Line) {
            ctx.lineCap = 'round';
        }
        if (this.globalAlpha < 1) {
            ctx.globalAlpha = this.globalAlpha;
        }
        if (this.lineDash) {
            ctx.setLineDash(this.lineDash);
        }
        else {
            switch (this.dash) {
                case 1:
                    ctx.setLineDash([5, 5]);
                    break;
                case 2:
                    ctx.setLineDash([10, 10]);
                    break;
                case 3:
                    ctx.setLineDash([10, 10, 2, 10]);
                    break;
                case 4:
                    ctx.setLineDash([1, 16]);
                    break;
            }
        }
        if (this.lineDashOffset) {
            ctx.lineDashOffset = this.lineDashOffset;
        }
        if (this.shadowColor) {
            ctx.shadowColor = this.shadowColor;
            ctx.shadowOffsetX = this.shadowOffsetX;
            ctx.shadowOffsetY = this.shadowOffsetY;
            ctx.shadowBlur = this.shadowBlur;
        }
        this.draw(ctx);
        ctx.restore();
        if (this.children) {
            for (var _b = 0, _c = this.children; _b < _c.length; _b++) {
                var item = _c[_b];
                item.render(ctx);
            }
        }
    };
    Pen.prototype.loadFillImg = function () {
        var _this = this;
        if (!this.fillImage) {
            return;
        }
        var img = new Image();
        img.crossOrigin = 'anonymous';
        img.src = this.fillImage;
        img.onload = function () {
            _this.lastFillImage = _this.fillImage;
            _this.fillImg = img;
            pen_images[_this.fillImage] = {
                img: img,
            };
            le5le_store["Store"].set(_this.generateStoreKey('LT:imageLoaded'), true);
        };
    };
    Pen.prototype.loadStrokeImg = function () {
        var _this = this;
        if (!this.strokeImage) {
            return;
        }
        var img = new Image();
        img.crossOrigin = 'anonymous';
        img.src = this.strokeImage;
        img.onload = function () {
            _this.lastStrokeImage = _this.strokeImage;
            _this.strokeImg = img;
            pen_images[_this.strokeImage] = {
                img: img,
            };
            le5le_store["Store"].set(_this.generateStoreKey('LT:imageLoaded'), true);
        };
    };
    Pen.prototype.click = function () {
        if (!this.events) {
            return;
        }
        for (var _i = 0, _a = this.events; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.type !== EventType.Click) {
                continue;
            }
            this[eventFns[item.action]] &&
                this[eventFns[item.action]](item.value, item.params);
        }
    };
    Pen.prototype.mouseUp = function () {
        if (!this.events) {
            return;
        }
        for (var _i = 0, _a = this.events; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.type !== EventType.MouseUp) {
                continue;
            }
            this[eventFns[item.action]] &&
                this[eventFns[item.action]](item.value, item.params);
        }
    };
    Pen.prototype.dblclick = function () {
        if (!this.events) {
            return;
        }
        for (var _i = 0, _a = this.events; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.type !== EventType.DblClick) {
                continue;
            }
            this[eventFns[item.action]] &&
                this[eventFns[item.action]](item.value, item.params);
        }
    };
    Pen.prototype.moveIn = function () {
        if (!this.events) {
            return;
        }
        for (var _i = 0, _a = this.events; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.type !== EventType.MoveIn) {
                continue;
            }
            this[eventFns[item.action]] &&
                this[eventFns[item.action]](item.value, item.params);
        }
    };
    Pen.prototype.moveOut = function () {
        if (!this.events) {
            return;
        }
        for (var _i = 0, _a = this.events; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.type !== EventType.MoveOut) {
                continue;
            }
            this[eventFns[item.action]] &&
                this[eventFns[item.action]](item.value, item.params);
        }
    };
    Pen.prototype.doWheres = function () {
        var _this = this;
        if (!this.wheres) {
            return;
        }
        this.wheres.forEach(function (where) {
            if (where.fn instanceof Function) { // 函数类型 fn
                if (where.fn(_this)) {
                    where.actions &&
                        where.actions.forEach(function (action) {
                            _this.doAction(action);
                        });
                }
            }
            else if (where.fn && where.fn.trim()) { // 字符串类型 fn
                var fn = new Function('pen', where.fn);
                if (fn(_this)) {
                    where.actions &&
                        where.actions.forEach(function (action) {
                            _this.doAction(action);
                        });
                }
            }
            else { // fn 为空
                var fn = new Function('attr', "return attr " + where.comparison + " " + where.value);
                if (fn(_this[where.key])) {
                    where.actions &&
                        where.actions.forEach(function (action) {
                            _this.doAction(action);
                        });
                }
            }
        });
    };
    Pen.prototype.doAction = function (action) {
        switch (action.do || action.action) {
            case 0:
            case 'Link':
                this.link(action.url || action.value, action._blank || action.params);
                break;
            case 1:
            case 'StartAnimate':
                this.doStartAnimate(action.tag || action.value);
                break;
            case 5:
            case 'PauseAnimate':
                this.doPauseAnimate(action.tag || action.value);
                break;
            case 6:
            case 'StopAnimate':
                this.doStopAnimate(action.tag || action.value);
                break;
            case 2:
            case 'Function':
                this.doFn(action.fn || action.value, action.params);
                break;
            case 3:
            case 'WindowFn':
                this.doWindowFn(action.fn || action.value, action.params);
                break;
            case 7:
            case 'Emit':
                this.doEmit(action.fn || action.value, action.params);
                break;
        }
    };
    Pen.prototype.show = function () {
        this.visible = true;
        return this;
    };
    Pen.prototype.hide = function () {
        this.visible = false;
        return this;
    };
    Pen.prototype.isVisible = function () {
        return this.visible;
    };
    Pen.prototype.getTID = function () {
        return this.TID;
    };
    Pen.prototype.setTID = function (id) {
        this.TID = id;
        if (this.children) {
            for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                var item = _a[_i];
                item.setTID(id);
            }
        }
        return this;
    };
    Pen.prototype.startAnimate = function () {
        this.animateStart = Date.now();
        if (this.type === PenType.Node && !this['animateReady']) {
            this['initAnimate']();
        }
        le5le_store["Store"].set(this.generateStoreKey('LT:AnimatePlay'), {
            pen: this,
        });
        // 跟随动画播放
        if (this['playType'] === 2) {
            this.play();
        }
    };
    Pen.prototype.play = function (pause) {
        le5le_store["Store"].set(this.generateStoreKey('LT:play'), {
            pen: this,
            pause: pause,
        });
    };
    Pen.prototype.link = function (url, params) {
        window.open(url, params === undefined ? '_blank' : params);
    };
    Pen.prototype.doStartAnimate = function (tag, params) {
        if (tag) {
            le5le_store["Store"].set(this.generateStoreKey('LT:AnimatePlay'), {
                tag: tag,
            });
        }
        else {
            this.startAnimate();
        }
    };
    Pen.prototype.doPauseAnimate = function (tag, params) {
        if (tag) {
            le5le_store["Store"].set(this.generateStoreKey('LT:AnimatePlay'), {
                tag: tag,
                stop: true,
            });
        }
        else {
            this.pauseAnimate();
        }
    };
    Pen.prototype.doStopAnimate = function (tag, params) {
        if (tag) {
            le5le_store["Store"].set(this.generateStoreKey('LT:AnimatePlay'), {
                tag: tag,
                stop: true,
            });
        }
        else {
            this.stopAnimate();
        }
    };
    Pen.prototype.doFn = function (fn, params) {
        if (fn instanceof Function)
            return fn(this, params);
        var func = new Function('pen', 'params', fn);
        func(this, params);
    };
    Pen.prototype.doWindowFn = function (fn, params) {
        window[fn](this, params);
    };
    Pen.prototype.doEmit = function (event, params) {
        le5le_store["Store"].set(this.generateStoreKey('LT:emit'), {
            event: event,
            params: params,
            pen: this,
        });
    };
    Pen.prototype.generateStoreKey = function (key) {
        return this.TID + "-" + key;
    };
    return Pen;
}());

//# sourceMappingURL=pen.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/rectangle.js
function rectangle(ctx, node) {
    var wr = node.borderRadius;
    var hr = node.borderRadius;
    if (node.borderRadius < 1) {
        wr = node.rect.width * node.borderRadius;
        hr = node.rect.height * node.borderRadius;
    }
    var r = wr < hr ? wr : hr;
    if (node.rect.width < 2 * r) {
        r = node.rect.width / 2;
    }
    if (node.rect.height < 2 * r) {
        r = node.rect.height / 2;
    }
    ctx.beginPath();
    ctx.moveTo(node.rect.x + r, node.rect.y);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, r);
    ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=rectangle.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/circle.js
function circle(ctx, node) {
    ctx.beginPath();
    ctx.ellipse(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height / 2, node.rect.width / 2, node.rect.height / 2, 0, 0, Math.PI * 2);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=circle.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/triangle.js
function triangle(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x + node.rect.width / 2, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x, node.rect.y + node.rect.height);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=triangle.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/diamond.js
function diamond(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x + node.rect.width / 2, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2);
    ctx.lineTo(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x, node.rect.y + node.rect.height / 2);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=diamond.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/arrow.js
function leftArrow(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x, node.rect.y + node.rect.height / 2);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y + node.rect.height / 3);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 3);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + (node.rect.height * 2) / 3);
    // ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y + (node.rect.height * 2) / 3);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y + (node.rect.height * 2) / 3);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y + (node.rect.height * 2) / 3);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y + node.rect.height);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
function rightArrow(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x, node.rect.y + node.rect.height / 3);
    ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y + node.rect.height / 3);
    ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2);
    ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y + (node.rect.height * 2) / 3);
    ctx.lineTo(node.rect.x, node.rect.y + (node.rect.height * 2) / 3);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
function twowayArrow(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x, node.rect.y + node.rect.height / 2);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y + node.rect.height / 3);
    ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y + node.rect.height / 3);
    ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2);
    ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x + (node.rect.width - node.rect.height / 2), node.rect.y + (node.rect.height * 2) / 3);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y + (node.rect.height * 2) / 3);
    ctx.lineTo(node.rect.x + node.rect.height / 2, node.rect.y + node.rect.height);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=arrow.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/text.js

// getWords: Get the word array from text. A single Chinese character is a word.
function getWords(txt) {
    var words = [];
    var word = '';
    if (!txt) {
        txt = '';
    }
    for (var i = 0; i < txt.length; ++i) {
        var ch = txt.charCodeAt(i);
        if (ch < 33 || ch > 126) {
            if (word) {
                words.push(word);
                word = '';
            }
            words.push(txt[i]);
            continue;
        }
        else {
            word += txt[i];
        }
    }
    if (word) {
        words.push(word);
    }
    return words;
}
// getWrapLines: Get the lines by wrap.
// words - the word array of text, to avoid spliting a word.
// maxWidth - the max width of the rect.
function getWrapLines(ctx, words, maxWidth, fontSize) {
    var lines = [];
    var currentLine = words[0] || '';
    for (var i = 1; i < words.length; ++i) {
        var word = words[i] || '';
        var text_1 = currentLine + word;
        var chinese = text_1.match(/[\u4e00-\u9fa5]/g) || '';
        var chineseLen = chinese.length;
        if ((text_1.length - chineseLen) * fontSize * 0.5 + chineseLen * fontSize < maxWidth) {
            currentLine += word;
        }
        else {
            lines.push(currentLine);
            currentLine = word;
        }
    }
    lines.push(currentLine);
    return lines;
}
function getLines(ctx, pen) {
    if (pen.text && !pen.text.split) {
        pen.text += '';
    }
    var lines = [];
    switch (pen.whiteSpace) {
        case 'nowrap':
            lines.push(pen.text);
            break;
        case 'pre-line':
            lines = pen.text.split(/[\n]/g);
            break;
        default:
            var textRect = pen.getTextRect();
            var paragraphs = pen.text.split(/[\n]/g);
            for (var i = 0; i < paragraphs.length; ++i) {
                var l = getWrapLines(ctx, getWords(paragraphs[i]), textRect.width, pen.fontSize);
                lines.push.apply(lines, l);
            }
            break;
    }
    return lines;
}
function calcTextRect(ctx, pen) {
    var lines = getLines(ctx, pen);
    var width = 0;
    for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
        var item = lines_1[_i];
        ctx.font = (pen.fontStyle || 'normal') + " normal " + (pen.fontWeight || 'normal') + " " + pen.fontSize + "px/" + pen.lineHeight + " " + pen.fontFamily;
        var r = ctx.measureText(item);
        var w = r.width;
        if (w > width) {
            width = w;
        }
    }
    return {
        width: width,
        height: lines.length * pen.fontSize * pen.lineHeight,
    };
}
function textBk(ctx, str, x, y, height, color) {
    if (!str || !color) {
        return;
    }
    var w = ctx.measureText(str).width;
    ctx.save();
    ctx.fillStyle = color;
    var l = x - w / 2;
    var t = y - height / 2;
    switch (ctx.textAlign) {
        case 'left':
            l = x;
            break;
        case 'right':
            l = x - w;
            break;
    }
    switch (ctx.textBaseline) {
        case 'top':
            t = y;
            break;
        case 'bottom':
            t = y - height;
            break;
    }
    ctx.fillRect(l, t, w, height);
    ctx.restore();
}
function fillText(ctx, lines, x, y, width, height, lineHeight, maxLineLen, bk) {
    if (!maxLineLen || maxLineLen > lines.length) {
        maxLineLen = lines.length;
    }
    else {
        maxLineLen = Math.ceil(maxLineLen);
    }
    for (var i = 0; i < maxLineLen - 1; ++i) {
        if (bk) {
            textBk(ctx, lines[i], x, y + i * lineHeight, lineHeight, bk);
        }
        ctx.fillText(lines[i], x, y + i * lineHeight);
    }
    if (maxLineLen < lines.length) {
        var str = (lines[maxLineLen - 1] || '') + '...';
        if (lines[maxLineLen - 1] && ctx.measureText(str).width > width) {
            str = lines[maxLineLen - 1].substr(0, lines[maxLineLen - 1].length - 2) + '...';
        }
        if (bk) {
            textBk(ctx, str, x, y + (maxLineLen - 1) * lineHeight, lineHeight, bk);
        }
        ctx.fillText(str, x, y + (maxLineLen - 1) * lineHeight);
    }
    else {
        if (bk) {
            textBk(ctx, lines[maxLineLen - 1], x, y + (maxLineLen - 1) * lineHeight, lineHeight, bk);
        }
        ctx.fillText(lines[maxLineLen - 1], x, y + (maxLineLen - 1) * lineHeight);
    }
}
function text_text(ctx, node) {
    if (!node.text) {
        return;
    }
    if (!node.text.split) {
        node.text += '';
    }
    ctx.save();
    ctx.beginPath();
    delete ctx.shadowColor;
    delete ctx.shadowBlur;
    ctx.font = (node.fontStyle || 'normal') + " normal " + (node.fontWeight || 'normal') + " " + node.fontSize + "px/" + node.lineHeight + " " + node.fontFamily;
    if (node.fontColor) {
        ctx.fillStyle = node.fontColor;
    }
    else {
        ctx.fillStyle = le5le_store["Store"].get(node.generateStoreKey('LT:fontColor'));
    }
    if (node.textAlign) {
        ctx.textAlign = node.textAlign;
    }
    if (node.textBaseline) {
        ctx.textBaseline = node.textBaseline;
    }
    var textRect = node.getTextRect();
    if (!textRect) {
        ctx.restore();
        return;
    }
    var lines = getLines(ctx, node);
    var lineHeight = node.fontSize * node.lineHeight;
    var maxLineLen = node.textMaxLine > 0 && node.textMaxLine < lines.length ? node.textMaxLine : lines.length;
    // By default, the text is center aligned.
    var x = textRect.x + textRect.width / 2;
    var y = textRect.y + (textRect.height - lineHeight * maxLineLen) / 2 + (lineHeight * 4) / 7;
    switch (ctx.textAlign) {
        case 'left':
            x = textRect.x;
            break;
        case 'right':
            x = textRect.x + textRect.width;
            break;
    }
    switch (ctx.textBaseline) {
        case 'top':
            y = textRect.y + (lineHeight - node.fontSize) / 2;
            break;
        case 'bottom':
            y = textRect.ey - lineHeight * maxLineLen + lineHeight;
            break;
    }
    fillText(ctx, lines, x + node.textOffsetX, y + node.textOffsetY, textRect.width, textRect.height, lineHeight, maxLineLen, node.textBackground);
    ctx.restore();
}
function iconfont(ctx, node) {
    ctx.save();
    ctx.textAlign = 'center';
    ctx.textBaseline = 'middle';
    var iconRect = node.getIconRect();
    var x = iconRect.x + iconRect.width / 2;
    var y = iconRect.y + iconRect.height / 2;
    switch (node.imageAlign) {
        case 'top':
            y = iconRect.y;
            ctx.textBaseline = 'top';
            break;
        case 'bottom':
            y = iconRect.ey;
            ctx.textBaseline = 'bottom';
            break;
        case 'left':
            x = iconRect.x;
            ctx.textAlign = 'left';
            break;
        case 'right':
            x = iconRect.ex;
            ctx.textAlign = 'right';
            break;
        case 'left-top':
            x = iconRect.x;
            y = iconRect.y;
            ctx.textAlign = 'left';
            ctx.textBaseline = 'top';
            break;
        case 'right-top':
            x = iconRect.ex;
            y = iconRect.y;
            ctx.textAlign = 'right';
            ctx.textBaseline = 'top';
            break;
        case 'left-bottom':
            x = iconRect.x;
            y = iconRect.ey;
            ctx.textAlign = 'left';
            ctx.textBaseline = 'bottom';
            break;
        case 'right-bottom':
            x = iconRect.ex;
            y = iconRect.ey;
            ctx.textAlign = 'right';
            ctx.textBaseline = 'bottom';
            break;
    }
    if (node.iconSize > 0) {
        ctx.font = node.iconSize + "px " + node.iconFamily;
    }
    else if (iconRect.width > iconRect.height) {
        ctx.font = iconRect.height + "px " + node.iconFamily;
    }
    else {
        ctx.font = iconRect.width + "px " + node.iconFamily;
    }
    ctx.fillStyle = node.iconColor || le5le_store["Store"].get(node.generateStoreKey('LT:iconColor')) || node.fontColor;
    if (node.iconRotate) {
        ctx.translate(iconRect.center.x, iconRect.center.y);
        ctx.rotate((node.iconRotate * Math.PI) / 180);
        ctx.translate(-iconRect.center.x, -iconRect.center.y);
    }
    ctx.beginPath();
    ctx.fillText(node.icon, x, y);
    ctx.restore();
}
//# sourceMappingURL=text.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/line.js
function line_line(ctx, node) {
    ctx.beginPath();
    var y = node.rect.y + node.rect.height / 2;
    ctx.moveTo(node.rect.x, y);
    ctx.lineTo(node.rect.x + node.rect.width, y);
    ctx.stroke();
}
//# sourceMappingURL=line.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/direction.js
var Direction;
(function (Direction) {
    Direction[Direction["None"] = 0] = "None";
    Direction[Direction["Up"] = 1] = "Up";
    Direction[Direction["Right"] = 2] = "Right";
    Direction[Direction["Bottom"] = 3] = "Bottom";
    Direction[Direction["Left"] = 4] = "Left";
})(Direction || (Direction = {}));
//# sourceMappingURL=direction.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/triangle.anchor.js


function triangleAnchors(node) {
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + (node.rect.width * 3) / 4, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 4, node.rect.y + node.rect.height / 2, Direction.Left));
}
//# sourceMappingURL=triangle.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/arrow.anchor.js


function arrowAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2, Direction.Right));
}
//# sourceMappingURL=arrow.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/line.anchor.js


function lineAnchors(node) {
    var y = node.rect.y + node.rect.height / 2;
    node.anchors.push(new Point(node.rect.x, y, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width, y, Direction.Right));
    var scale = topology.data.scale || 1; // 取全局的 scale 属性
    for (var i = node.rect.x + 5 * scale; i < node.rect.ex; i += 5 * scale) {
        var pt = new Point(i, y, Direction.Bottom);
        pt.hidden = true;
        node.anchors.push(pt);
    }
}
//# sourceMappingURL=line.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/circle.rect.js

function circleIconRect(node) {
    var w = node.rect.width / 2;
    var h = node.rect.height / 2;
    if (w > h) {
        w = h;
    }
    else {
        h = w;
    }
    var top = node.rect.height / 10;
    if (top < 10) {
        top = 10;
    }
    node.iconRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + top, w, h);
}
function circleTextRect(node) {
    var bottom = node.rect.height / 20;
    if (bottom < 5) {
        bottom = 0;
    }
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 4, node.rect.y + (node.rect.height * 2) / 3 - bottom, node.rect.width / 2, node.rect.height / 3 - 5);
    var w = (node.rect.width * 5) / 7;
    var h = (node.rect.height * 5) / 7;
    node.fullTextRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + (node.rect.height - h) / 2, w, h);
}
//# sourceMappingURL=circle.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/triangle.rect.js

function triangleIconRect(node) {
    var w = (node.rect.width * 2) / 7;
    var h = (node.rect.height * 2) / 7;
    if (w > h) {
        w = h;
    }
    else {
        h = w;
    }
    var top = w;
    if (top < 10) {
        top = 10;
    }
    node.iconRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + top, w, h);
}
function triangleTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 4, node.rect.y + (node.rect.height * 2) / 3, node.rect.width / 2, node.rect.height / 3 - 5);
    var w = node.rect.width / 2;
    var h = (node.rect.height * 3) / 7;
    node.fullTextRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + node.rect.height / 2 - 5, w, h);
}
//# sourceMappingURL=triangle.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/diamond.rect.js

function diamondIconRect(node) {
    var w = node.rect.width / 3;
    var h = node.rect.height / 3;
    if (w > h) {
        w = h;
    }
    else {
        h = w;
    }
    var top = node.rect.width / 5;
    if (top < 10) {
        top = 10;
    }
    node.iconRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + top, w, h);
}
function diamondTextRect(node) {
    var bottom = node.rect.height / 10;
    if (bottom < 5) {
        bottom = 0;
    }
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 3, node.rect.y + (node.rect.height * 2) / 3 - bottom, node.rect.width / 3, node.rect.height / 3 - 5);
    var w = node.rect.width / 2;
    var h = (node.rect.height * 1) / 2;
    node.fullTextRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + node.rect.height / 4, w, h);
}
//# sourceMappingURL=diamond.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/arrow.rect.js

function leftArrowIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function leftArrowTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.height / 2, node.rect.y + node.rect.height / 3, node.rect.width - node.rect.height / 2, node.rect.height / 3);
    node.fullTextRect = node.textRect;
}
function rightArrowIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function rightArrowTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y + node.rect.height / 3, node.rect.width - node.rect.height / 2, node.rect.height / 3);
    node.fullTextRect = node.textRect;
}
function twowayArrowIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function twowayArrowTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.height / 2, node.rect.y + node.rect.height / 3, node.rect.width - node.rect.height, node.rect.height / 3);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=arrow.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/line.rect.js

function lineIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function lineTextRect(node) {
    node.fullTextRect = new rect_Rect(node.rect.x + 10, node.rect.y + node.rect.height / 2 - 20, node.rect.width - 20, 20);
    node.textRect = node.fullTextRect;
}
//# sourceMappingURL=line.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/lines/line.js
function lines_line_line(ctx, l) {
    ctx.beginPath();
    ctx.moveTo(l.from.x, l.from.y);
    ctx.lineTo(l.to.x, l.to.y);
    ctx.stroke();
}
function lineControlPoints(ctx, l) { }
function calcLineControlPoints(l) {
    l.controlPoints = [];
}
//# sourceMappingURL=line.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/lines/polyline.js



var minDistance = 50;
function polyline(ctx, l) {
    ctx.beginPath();
    ctx.moveTo(l.from.x, l.from.y);
    for (var _i = 0, _a = l.controlPoints; _i < _a.length; _i++) {
        var item = _a[_i];
        ctx.lineTo(item.x, item.y);
    }
    ctx.lineTo(l.to.x, l.to.y);
    ctx.stroke();
}
function polylineControlPoints(ctx, l) {
    ctx.save();
    ctx.fillStyle = '#fff';
    ctx.lineWidth = 2;
    for (var _i = 0, _a = l.controlPoints; _i < _a.length; _i++) {
        var item = _a[_i];
        ctx.beginPath();
        ctx.arc(item.x, item.y, 4, 0, Math.PI * 2);
        ctx.stroke();
        ctx.fill();
    }
    ctx.restore();
}
function calcPolylineControlPoints(l) {
    l.controlPoints = [];
    var from = getDirectionPoint(l.from, l.to);
    if (l.from.direction) {
        l.controlPoints.push(from);
    }
    var to = getDirectionPoint(l.to, l.from);
    var pts;
    switch (from.direction) {
        case Direction.Up:
            pts = getNextPointByUp(from, to);
            break;
        case Direction.Right:
            pts = getNextPointByRight(from, to);
            break;
        case Direction.Bottom:
            pts = getNextPointByBottom(from, to);
            break;
        case Direction.Left:
            pts = getNextPointByLeft(from, to);
            break;
    }
    l.controlPoints.push.apply(l.controlPoints, pts);
    if (l.to.direction) {
        l.controlPoints.push(to);
    }
}
function pointInPolyline(point, l) {
    if (!l.controlPoints || !l.controlPoints.length) {
        return pointInLine(point, l.from, l.to, l.lineWidth / 2);
    }
    if (pointInLine(point, l.from, l.controlPoints[0])) {
        return true;
    }
    if (pointInLine(point, l.to, l.controlPoints[l.controlPoints.length - 1])) {
        return true;
    }
    for (var i = 0; i < l.controlPoints.length - 1; ++i) {
        if (pointInLine(point, l.controlPoints[i], l.controlPoints[i + 1])) {
            return true;
        }
    }
    return false;
}
function dockPolylineControlPoint(point, l) {
    var pts = [l.from];
    pts.push.apply(pts, l.controlPoints);
    pts.push(l.to);
    for (var _i = 0, pts_1 = pts; _i < pts_1.length; _i++) {
        var item = pts_1[_i];
        if (Math.abs(point.x - item.x) < 7) {
            point.x = item.x;
        }
        if (Math.abs(point.y - item.y) < 7) {
            point.y = item.y;
        }
    }
}
function getDirectionPoint(pt, to) {
    var point = pt.clone();
    switch (pt.direction) {
        case Direction.Up:
            if (to.y < pt.y) {
                point.y -= Math.round((pt.y - to.y) / 2);
            }
            else {
                point.y -= minDistance;
            }
            break;
        case Direction.Right:
            if (to.x > pt.x) {
                point.x += Math.round((to.x - pt.x) / 2);
            }
            else {
                point.x += minDistance;
            }
            break;
        case Direction.Bottom:
            if (to.y > pt.y) {
                point.y += Math.round((to.y - pt.y) / 2);
            }
            else {
                point.y += minDistance;
            }
            break;
        case Direction.Left:
            if (to.x < pt.x) {
                point.x -= Math.round((pt.x - to.x) / 2);
            }
            else {
                point.x -= minDistance;
            }
            break;
    }
    return point;
}
function getNextPointByUp(from, to) {
    if (from.x === to.x || from.y === to.y) {
        return [];
    }
    // The to point above the from point.
    if (from.y > to.y) {
        if (to.direction === Direction.Up && from.y - to.y > 3 * minDistance) {
            if (from.x < to.x) {
                if (to.x - from.x < minDistance) {
                    return [new Point(from.x - 2 * minDistance, from.y), new Point(from.x - 2 * minDistance, to.y)];
                }
                return [new Point(from.x, to.y)];
            }
            else {
                if (from.x - to.x < minDistance) {
                    return [new Point(from.x + 2 * minDistance, from.y), new Point(from.x + 2 * minDistance, to.y)];
                }
                return [new Point(from.x, to.y)];
            }
        }
        else {
            // Left top
            if ((to.direction === Direction.Left && from.x > to.x) || (to.direction === Direction.Right && from.x < to.x)) {
                return [new Point(to.x, from.y)];
            }
            return [new Point(from.x, to.y)];
        }
        // The to point below the from point.
    }
    else {
        if (to.direction === Direction.Bottom) {
            if (from.x < to.x) {
                return getHorizontalPoints(from, to);
            }
            else {
                var pts = getHorizontalPoints(to, from);
                return [pts[1], pts[0]];
            }
        }
        else {
            return [new Point(to.x, from.y)];
        }
    }
}
function getNextPointByBottom(from, to) {
    if (from.x === to.x || from.y === to.y) {
        return [];
    }
    // The to point below the from point.
    if (from.y < to.y) {
        if (to.direction === Direction.Bottom && to.y - from.y > 3 * minDistance) {
            if (from.x < to.x) {
                if (to.x - from.x < minDistance) {
                    return [new Point(from.x - 2 * minDistance, from.y), new Point(from.x - 2 * minDistance, to.y)];
                }
                return [new Point(from.x, to.y)];
            }
            else {
                if (from.x - to.x < minDistance) {
                    return [new Point(from.x + 2 * minDistance, from.y), new Point(from.x + 2 * minDistance, to.y)];
                }
                return [new Point(from.x, to.y)];
            }
        }
        else {
            if ((to.direction === Direction.Left && from.x > to.x) || (to.direction === Direction.Right && from.x < to.x)) {
                return [new Point(to.x, from.y)];
            }
            return [new Point(from.x, to.y)];
        }
        // The to point below the from point.
    }
    else {
        if (to.direction === Direction.Up) {
            if (from.x < to.x) {
                return getHorizontalPoints(from, to);
            }
            else {
                var pts = getHorizontalPoints(to, from);
                return [pts[1], pts[0]];
            }
        }
        else {
            return [new Point(to.x, from.y)];
        }
    }
}
function getNextPointByLeft(from, to) {
    if (from.x === to.x || from.y === to.y) {
        return [];
    }
    // The to point is on the left.
    if (from.x > to.x) {
        if (to.direction === Direction.Left && from.x - to.x > 3 * minDistance) {
            if (from.y < to.y) {
                if (to.y - from.y < minDistance) {
                    return [new Point(from.x, from.y + 2 * minDistance), new Point(to.x, from.y + 2 * minDistance)];
                }
                return [new Point(to.x, from.y)];
            }
            else {
                if (from.y - to.y < minDistance) {
                    return [new Point(from.x, from.y - 2 * minDistance), new Point(to.x, from.y - 2 * minDistance)];
                }
                return [new Point(to.x, from.y)];
            }
        }
        else {
            if (to.direction === Direction.Left ||
                (to.direction === Direction.Up && from.y < to.y) ||
                (to.direction === Direction.Bottom && from.y > to.y)) {
                return [new Point(to.x, from.y)];
            }
            return [new Point(from.x, to.y)];
        }
        // The to point is on the right.
    }
    else {
        if (to.direction === Direction.Right) {
            if (from.y < to.y) {
                return getVerticalPoints(from, to);
            }
            else {
                var pts = getVerticalPoints(to, from);
                return [pts[1], pts[0]];
            }
        }
        else {
            return [new Point(from.x, to.y)];
        }
    }
}
function getNextPointByRight(from, to) {
    if (from.x === to.x || from.y === to.y) {
        return [];
    }
    // The to point is on the right.
    if (from.x < to.x) {
        if (to.direction === Direction.Right && to.x - from.x > 3 * minDistance) {
            if (from.y < to.y) {
                if (to.y - from.y < minDistance) {
                    return [new Point(from.x, from.y - 2 * minDistance), new Point(to.x, from.y - 2 * minDistance)];
                }
                return [new Point(to.x, from.y)];
            }
            else {
                if (from.y - to.y < minDistance) {
                    return [new Point(from.x, from.y + 2 * minDistance), new Point(to.x, from.y + 2 * minDistance)];
                }
                return [new Point(to.x, from.y)];
            }
        }
        else {
            if (to.direction === Direction.Right ||
                (to.direction === Direction.Up && from.y < to.y) ||
                (to.direction === Direction.Bottom && from.y > to.y)) {
                return [new Point(to.x, from.y)];
            }
            return [new Point(from.x, to.y)];
        }
        // The to point is on the left.
    }
    else {
        if (to.direction === Direction.Left) {
            if (from.y < to.y) {
                return getVerticalPoints(from, to);
            }
            else {
                var pts = getVerticalPoints(to, from);
                return [pts[1], pts[0]];
            }
        }
        else {
            return [new Point(from.x, to.y)];
        }
    }
}
function getHorizontalPoints(left, right) {
    var x = left.x + (right.x - left.x) / 2;
    return [new Point(x, left.y), new Point(x, right.y)];
}
function getVerticalPoints(up, bottom) {
    var y = up.y + (bottom.y - up.y) / 2;
    return [new Point(up.x, y), new Point(bottom.x, y)];
}
//# sourceMappingURL=polyline.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/math.js
// pSBC - Shade Blend Convert - Version 4.0 - 02/18/2019
// https://github.com/PimpTrizkit/PJs/edit/master/pSBC.js
function pSBCr(d) {
    var i = parseInt, m = Math.round;
    var n = d.length, x = {};
    if (n > 9) {
        var _a = (d = d.split(',')), r = _a[0], g = _a[1], b = _a[2], a = _a[3];
        n = d.length;
        if (n < 3 || n > 4)
            return null;
        (x.r = i(r[3] == 'a' ? r.slice(5) : r.slice(4))), (x.g = i(g)), (x.b = i(b)), (x.a = a ? parseFloat(a) : -1);
    }
    else {
        if (n == 8 || n == 6 || n < 4)
            return null;
        if (n < 6)
            d = '#' + d[1] + d[1] + d[2] + d[2] + d[3] + d[3] + (n > 4 ? d[4] + d[4] : '');
        d = i(d.slice(1), 16);
        if (n == 9 || n == 5)
            (x.r = (d >> 24) & 255), (x.g = (d >> 16) & 255), (x.b = (d >> 8) & 255), (x.a = m((d & 255) / 0.255) / 1000);
        else
            (x.r = d >> 16), (x.g = (d >> 8) & 255), (x.b = d & 255), (x.a = -1);
    }
    return x;
}
function pSBC(p, c0, c1, l) {
    var r, g, b, P, f, t, h, m = Math.round, a = typeof c1 == 'string';
    if (typeof p != 'number' || p < -1 || p > 1 || typeof c0 != 'string' || (c0[0] != 'r' && c0[0] != '#') || (c1 && !a))
        return null;
    (h = c0.length > 9),
        (h = a ? (c1.length > 9 ? true : c1 == 'c' ? !h : false) : h),
        (f = pSBCr(c0)),
        (P = p < 0),
        (t = c1 && c1 != 'c' ? pSBCr(c1) : P ? { r: 0, g: 0, b: 0, a: -1 } : { r: 255, g: 255, b: 255, a: -1 }),
        (p = P ? p * -1 : p),
        (P = 1 - p);
    if (!f || !t)
        return null;
    if (l)
        (r = m(P * f.r + p * t.r)), (g = m(P * f.g + p * t.g)), (b = m(P * f.b + p * t.b));
    else
        (r = m(Math.pow((P * Math.pow(f.r, 2) + p * Math.pow(t.r, 2)), 0.5))),
            (g = m(Math.pow((P * Math.pow(f.g, 2) + p * Math.pow(t.g, 2)), 0.5))),
            (b = m(Math.pow((P * Math.pow(f.b, 2) + p * Math.pow(t.b, 2)), 0.5)));
    (a = f.a), (t = t.a), (f = a >= 0 || t >= 0), (a = f ? (a < 0 ? t : t < 0 ? a : a * P + t * p) : 0);
    if (h)
        return 'rgb' + (f ? 'a(' : '(') + r + ',' + g + ',' + b + (f ? ',' + m(a * 1000) / 1000 : '') + ')';
    else
        return ('#' +
            (4294967296 + r * 16777216 + g * 65536 + b * 256 + (f ? m(a * 255) : 0)).toString(16).slice(1, f ? undefined : -2));
}
function rgba(p, c) {
    var f = pSBCr(c) || { r: 0, g: 0, b: 0 };
    if (f.a < 0) {
        return "rgba(" + f.r + "," + f.g + "," + f.b + "," + p + ")";
    }
    return "rgba(" + f.r + "," + f.g + "," + f.b + "," + (p + f.a) + ")";
}
function abs(num, percent) {
    if (+percent) {
        return +percent;
    }
    if (!percent || percent[percent.length - 1] !== '%') {
        return 0;
    }
    percent = percent.substr(0, percent.length - 1);
    return (num * +percent) / 100;
}
function distance(pt1, pt2) {
    var x = pt1.x - pt2.x;
    var y = pt1.y - pt2.y;
    return Math.sqrt(x * x + y * y);
}
//# sourceMappingURL=math.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/lines/curve.js





var curve_distance = 80;
function curve(ctx, l) {
    ctx.beginPath();
    ctx.moveTo(l.from.x, l.from.y);
    ctx.bezierCurveTo(l.controlPoints[0].x, l.controlPoints[0].y, l.controlPoints[1].x, l.controlPoints[1].y, l.to.x, l.to.y);
    ctx.stroke();
}
function curveControlPoints(ctx, l) {
    ctx.save();
    ctx.fillStyle = rgba(0.5, ctx.strokeStyle + '');
    ctx.lineWidth = 1;
    ctx.beginPath();
    ctx.moveTo(l.from.x, l.from.y);
    ctx.lineTo(l.controlPoints[0].x, l.controlPoints[0].y);
    ctx.stroke();
    ctx.beginPath();
    ctx.moveTo(l.to.x, l.to.y);
    ctx.lineTo(l.controlPoints[1].x, l.controlPoints[1].y);
    ctx.stroke();
    ctx.fillStyle = '#fff';
    ctx.lineWidth = 2;
    for (var _i = 0, _a = l.controlPoints; _i < _a.length; _i++) {
        var item = _a[_i];
        ctx.beginPath();
        ctx.arc(item.x, item.y, 4, 0, Math.PI * 2);
        ctx.stroke();
        ctx.fill();
    }
    ctx.restore();
}
function calcCurveControlPoints(l) {
    if (!l.from.direction) {
        l.from.direction = Direction.Bottom;
    }
    if (!l.to.direction) {
        l.to.direction = (l.from.direction + 2) % 4;
        if (!l.to.direction) {
            l.to.direction = Direction.Left;
        }
    }
    l.controlPoints = [getControlPt(l.from, l.to), getControlPt(l.to, l.from)];
    le5le_store["Store"].set(generateStoreKey(l, 'pts-') + l.id, undefined);
}
function pointInCurve(point, l) {
    var points = le5le_store["Store"].get(generateStoreKey(l, 'pts-') + l.id);
    if (!points) {
        points = [l.from];
        if (l.controlPoints) {
            for (var i = 0.01; i < 1; i += 0.01) {
                points.push(getBezierPoint(i, l.from, l.controlPoints[0], l.controlPoints[1], l.to));
            }
        }
        points.push(l.to);
        le5le_store["Store"].set(generateStoreKey(l, 'pts-') + l.id, points);
    }
    var cnt = points.length - 1;
    for (var i = 0; i < cnt; ++i) {
        if (pointInLine(point, points[i], points[i + 1])) {
            return true;
        }
    }
    return false;
}
// Get a point in bezier.
// pos - The position of point in bezier. It is expressed as a percentage(0 - 1).
function getBezierPoint(pos, from, cp1, cp2, to) {
    var x1 = from.x, y1 = from.y;
    var x2 = to.x, y2 = to.y;
    var cx1 = cp1.x, cy1 = cp1.y;
    var cx2 = cp2.x, cy2 = cp2.y;
    var x = x1 * (1 - pos) * (1 - pos) * (1 - pos) +
        3 * cx1 * pos * (1 - pos) * (1 - pos) +
        3 * cx2 * pos * pos * (1 - pos) +
        x2 * pos * pos * pos;
    var y = y1 * (1 - pos) * (1 - pos) * (1 - pos) +
        3 * cy1 * pos * (1 - pos) * (1 - pos) +
        3 * cy2 * pos * pos * (1 - pos) +
        y2 * pos * pos * pos;
    return new Point(x, y);
}
function getControlPt(pt, to) {
    var point = new Point(pt.x, pt.y, pt.direction, pt.anchorIndex, pt.id);
    var dis = window.topologyControlPtDistance || curve_distance;
    if ((pt.direction === Direction.Up || pt.direction === Direction.Bottom) && Math.abs(pt.x - to.x) < 3) {
        if (to.y > pt.y) {
            dis = Math.round((to.y - pt.y) / 3);
            point.y += dis;
        }
        else {
            dis = Math.round((pt.y - to.y) / 3);
            point.y -= dis;
        }
        return point;
    }
    if ((pt.direction === Direction.Left || pt.direction === Direction.Right) && Math.abs(pt.y - to.y) < 3) {
        if (to.x > pt.x) {
            dis = Math.round((to.x - pt.x) / 3);
            point.x += dis;
        }
        else {
            dis = Math.round((pt.x - to.x) / 3);
            point.x -= dis;
        }
        return point;
    }
    switch (pt.direction) {
        case Direction.Up:
            point.y -= dis;
            break;
        case Direction.Right:
            point.x += dis;
            break;
        case Direction.Bottom:
            point.y += dis;
            break;
        case Direction.Left:
            point.x -= dis;
            break;
    }
    return point;
}
function generateStoreKey(pen, key) {
    return pen.getTID() + "-" + key;
}
//# sourceMappingURL=curve.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/lines/mind.js




var mind_distance = 20;
function calcMindControlPoints(l) {
    if (!l.from.direction) {
        l.from.direction = Direction.Bottom;
    }
    if (!l.to.direction) {
        l.to.direction = (l.from.direction + 2) % 4;
        if (!l.to.direction) {
            l.to.direction = Direction.Left;
        }
    }
    switch (l.from.direction) {
        case Direction.Up:
            l.controlPoints = [new Point(l.from.x, l.from.y - mind_distance), new Point(l.from.x, l.to.y)];
            break;
        case Direction.Right:
            l.controlPoints = [new Point(l.from.x + mind_distance, l.from.y), new Point(l.from.x, l.to.y)];
            break;
        case Direction.Bottom:
            l.controlPoints = [new Point(l.from.x, l.from.y + mind_distance), new Point(l.from.x, l.to.y)];
            break;
        case Direction.Left:
            l.controlPoints = [new Point(l.from.x - mind_distance, l.from.y), new Point(l.from.x, l.to.y)];
            break;
    }
    le5le_store["Store"].set(generateStoreKey(l, 'pts-') + l.id, undefined);
}
//# sourceMappingURL=mind.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/arrows/triangle.js

function triangleSolid(ctx, from, to, size, fillStyle) {
    size += ctx.lineWidth * 3;
    var arrowWidth = ctx.lineWidth / 10;
    if (ctx.lineWidth < 2) {
        ctx.lineWidth = 2;
        arrowWidth = 0;
    }
    ctx.translate(to.x, to.y);
    ctx.rotate(Math.atan2(to.y - from.y, to.x - from.x));
    ctx.translate(-to.x - ctx.lineWidth + arrowWidth * 5, -to.y);
    ctx.moveTo(to.x, to.y + arrowWidth);
    ctx.lineTo(to.x, to.y - arrowWidth);
    ctx.lineTo(to.x - size, to.y - size / 3);
    ctx.lineTo(to.x - size, to.y + size / 3);
    ctx.closePath();
    ctx.stroke();
    if (fillStyle) {
        ctx.fillStyle = fillStyle;
    }
    else {
        ctx.fillStyle = ctx.strokeStyle;
    }
    ctx.fill();
}
function triangle_triangle(ctx, from, to, size) {
    triangleSolid(ctx, from, to, size, le5le_store["Store"].get('LT:bkColor') || '#fff');
}
//# sourceMappingURL=triangle.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/arrows/diamond.js

function diamondSolid(ctx, from, to, size, fillStyle) {
    size += ctx.lineWidth * 3;
    var r = size / 2;
    var arrowWidth = ctx.lineWidth / 10;
    if (ctx.lineWidth < 2) {
        ctx.lineWidth = 2;
        arrowWidth = 0;
    }
    ctx.translate(to.x, to.y);
    ctx.rotate(Math.atan2(to.y - from.y, to.x - from.x));
    ctx.translate(-to.x - ctx.lineWidth + arrowWidth * 5, -to.y);
    ctx.moveTo(to.x, to.y + arrowWidth);
    ctx.lineTo(to.x, to.y - arrowWidth);
    ctx.lineTo(to.x - r, to.y - r / 2);
    ctx.lineTo(to.x - size, to.y - arrowWidth);
    ctx.lineTo(to.x - size, to.y + arrowWidth);
    ctx.lineTo(to.x - r, to.y + r / 2);
    ctx.closePath();
    ctx.stroke();
    if (fillStyle) {
        ctx.fillStyle = fillStyle;
    }
    else {
        ctx.fillStyle = ctx.strokeStyle;
    }
    ctx.fill();
}
function diamond_diamond(ctx, from, to, size) {
    diamondSolid(ctx, from, to, size, le5le_store["Store"].get('LT:bkColor') || '#fff');
}
//# sourceMappingURL=diamond.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/arrows/circle.js

function circleSolid(ctx, from, to, size, fillStyle) {
    size += ctx.lineWidth * 3;
    var r = size / 2;
    if (ctx.lineWidth < 2) {
        ctx.lineWidth = 2;
    }
    ctx.translate(to.x, to.y);
    ctx.rotate(Math.atan2(to.y - from.y, to.x - from.x));
    ctx.translate(-to.x, -to.y - ctx.lineWidth / 10);
    ctx.arc(to.x - r - ctx.lineWidth / 2, to.y, r, 0, 2 * Math.PI);
    ctx.stroke();
    if (fillStyle) {
        ctx.fillStyle = fillStyle;
    }
    else {
        ctx.fillStyle = ctx.strokeStyle;
    }
    ctx.fill();
}
function circle_circle(ctx, from, to, size) {
    circleSolid(ctx, from, to, size, le5le_store["Store"].get('LT:bkColor') || '#fff');
}
//# sourceMappingURL=circle.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/circle.anchor.js


function circleAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
    for (var i = 5; i < 360; i += 5) {
        if (i % 90 === 0) {
            continue;
        }
        var direction = Math.round(i / 90);
        var pt = new Point(node.rect.center.x + (Math.sin((i / 180) * Math.PI) * node.rect.width) / 2, node.rect.center.y + (Math.cos((i / 180) * Math.PI) * node.rect.height) / 2, direction);
        pt.hidden = true;
        node.anchors.push(pt);
    }
}
//# sourceMappingURL=circle.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/arrows/line.js
function arrows_line_line(ctx, from, to, size) {
    size += ctx.lineWidth * 3;
    ctx.translate(to.x, to.y);
    ctx.rotate(Math.atan2(to.y - from.y, to.x - from.x));
    ctx.translate(-to.x - ctx.lineWidth / 5, -to.y - ctx.lineWidth / 5);
    ctx.moveTo(to.x, to.y);
    ctx.lineTo(to.x - size, to.y - size / 3);
    ctx.moveTo(to.x, to.y);
    ctx.lineTo(to.x - size, to.y + size / 3);
    ctx.stroke();
}
function lineUp(ctx, from, to, size) {
    size += ctx.lineWidth * 3;
    ctx.translate(to.x, to.y);
    ctx.rotate(Math.atan2(to.y - from.y, to.x - from.x));
    ctx.translate(-to.x - ctx.lineWidth / 5, -to.y - ctx.lineWidth / 5);
    if (to.x > from.x) {
        ctx.moveTo(to.x, to.y);
        ctx.lineTo(to.x - size, to.y - size / 3);
    }
    else {
        ctx.moveTo(to.x, to.y);
        ctx.lineTo(to.x - size, to.y + size / 3);
    }
    ctx.stroke();
}
function lineDown(ctx, from, to, size) {
    size += ctx.lineWidth * 3;
    ctx.translate(to.x, to.y);
    ctx.rotate(Math.atan2(to.y - from.y, to.x - from.x));
    ctx.translate(-to.x - ctx.lineWidth / 5, -to.y - ctx.lineWidth / 5);
    if (to.x < from.x) {
        ctx.moveTo(to.x, to.y);
        ctx.lineTo(to.x - size, to.y - size / 3);
    }
    else {
        ctx.moveTo(to.x, to.y);
        ctx.lineTo(to.x - size, to.y + size / 3);
    }
    ctx.stroke();
}
//# sourceMappingURL=line.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/pentagon.js
function pentagon(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x + node.rect.width / 2, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + (node.rect.height * 2) / 5);
    ctx.lineTo(node.rect.x + (node.rect.width * 4) / 5, node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x + node.rect.width / 5, node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x, node.rect.y + (node.rect.height * 2) / 5);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=pentagon.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/pentagon.rect.js

function pentagonIconRect(node) {
    var w = node.rect.width / 2;
    var h = node.rect.height / 2;
    if (w > h) {
        w = h;
    }
    else {
        h = w;
    }
    var top = node.rect.height / 7;
    if (top < 10) {
        top = 10;
    }
    node.iconRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + top, w, h);
}
function pentagonTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 5, node.rect.y + (node.rect.height * 5) / 7, (node.rect.width * 3) / 5, node.rect.height / 4);
    var w = (node.rect.width * 3) / 5;
    var h = (node.rect.height * 3) / 5;
    node.fullTextRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + node.rect.height / 4, w, h);
}
//# sourceMappingURL=pentagon.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/pentagon.anchor.js


function pentagonAnchors(node) {
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + (node.rect.height * 2) / 5, Direction.Right));
    node.anchors.push(new Point(node.rect.x + (node.rect.width * 4) / 5, node.rect.y + node.rect.height, Direction.Bottom));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 5, node.rect.y + node.rect.height, Direction.Bottom));
    node.anchors.push(new Point(node.rect.x, node.rect.y + (node.rect.height * 2) / 5, Direction.Left));
}
//# sourceMappingURL=pentagon.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/hexagon.js
function hexagon(ctx, node) {
    ctx.beginPath();
    var pos = node.rect.width / 5;
    ctx.moveTo(node.rect.x + pos, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width - pos, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2);
    ctx.lineTo(node.rect.x + node.rect.width - pos, node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x + pos, node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x, node.rect.y + node.rect.height / 2);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=hexagon.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/hexagon.anchor.js


function hexagonAnchors(node) {
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
    var ptLT = new Point(node.rect.x + node.rect.width / 10, node.rect.y + node.rect.height / 4, Direction.Left);
    ptLT.hidden = true;
    node.anchors.push(ptLT);
    var ptRT = new Point(node.rect.x + node.rect.width / 10, node.rect.y + (node.rect.height * 3) / 4, Direction.Left);
    ptRT.hidden = true;
    node.anchors.push(ptRT);
    var ptLB = new Point(node.rect.x + (node.rect.width * 9) / 10, node.rect.y + node.rect.height / 4, Direction.Right);
    ptLB.hidden = true;
    node.anchors.push(ptLB);
    var ptRB = new Point(node.rect.x + (node.rect.width * 9) / 10, node.rect.y + (node.rect.height * 3) / 4, Direction.Right);
    ptRB.hidden = true;
    node.anchors.push(ptRB);
}
//# sourceMappingURL=hexagon.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/hexagon.rect.js

function hexagonIconRect(node) {
    var w = (node.rect.width * 3) / 5;
    var h = (node.rect.height * 3) / 4;
    node.iconRect = new rect_Rect(node.rect.x + node.rect.width / 5 + node.paddingLeftNum, node.rect.y + node.paddingTopNum, w - node.paddingLeftNum - node.paddingRightNum, h - node.paddingTopNum - node.paddingBottomNum);
    node.fullIconRect = new rect_Rect(node.rect.x + node.rect.width / 5 + node.paddingLeftNum, node.rect.y + node.paddingTopNum, w - node.paddingLeftNum - node.paddingRightNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
}
function hexagonTextRect(node) {
    var w = (node.rect.width * 3) / 5;
    var h = node.rect.height / 4;
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 5 + node.paddingLeftNum, node.rect.y + node.rect.height - h + node.paddingTopNum, w - node.paddingLeftNum - node.paddingRightNum, h);
    node.fullTextRect = new rect_Rect(node.rect.x + node.rect.width / 5 + node.paddingLeftNum, node.rect.y + node.paddingTopNum, w - node.paddingLeftNum - node.paddingRightNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
}
//# sourceMappingURL=hexagon.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/pentagram.js
function pentagram(ctx, node) {
    ctx.beginPath();
    for (var i = 0; i < 5; ++i) {
        ctx.lineTo((Math.cos(((18 + 72 * i) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.x + node.rect.width / 2, (-Math.sin(((18 + 72 * i) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.y + node.rect.height / 2);
        ctx.lineTo((Math.cos(((54 + 72 * i) / 180) * Math.PI) * node.rect.width) / 4 + node.rect.x + node.rect.width / 2, (-Math.sin(((54 + 72 * i) / 180) * Math.PI) * node.rect.width) / 4 + node.rect.y + node.rect.height / 2);
    }
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=pentagram.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/pentagram.anchor.js


function pentagramAnchors(node) {
    node.anchors.push(new Point((Math.cos((18 / 180) * Math.PI) * node.rect.width) / 2 + node.rect.x + node.rect.width / 2, (-Math.sin((18 / 180) * Math.PI) * node.rect.width) / 2 + node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point((Math.cos(((18 + 72) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.x + node.rect.width / 2, (-Math.sin(((18 + 72) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.y + node.rect.height / 2, Direction.Up));
    node.anchors.push(new Point((Math.cos(((18 + 72 * 2) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.x + node.rect.width / 2, (-Math.sin(((18 + 72 * 2) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point((Math.cos(((18 + 72 * 3) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.x + node.rect.width / 2, (-Math.sin(((18 + 72 * 3) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.y + node.rect.height / 2, Direction.Bottom));
    node.anchors.push(new Point((Math.cos(((18 + 72 * 4) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.x + node.rect.width / 2, (-Math.sin(((18 + 72 * 4) / 180) * Math.PI) * node.rect.width) / 2 + node.rect.y + node.rect.height / 2, Direction.Bottom));
}
//# sourceMappingURL=pentagram.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/pentagram.rect.js

function pentagramIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function pentagramTextRect(node) {
    var w = (node.rect.width * 2) / 5;
    var h = (node.rect.height * 2) / 5;
    node.fullTextRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + (node.rect.height - h) / 2, w, h);
    node.textRect = node.fullTextRect;
}
//# sourceMappingURL=pentagram.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/cloud.js
function cloud(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x + node.rect.width / 5, node.rect.y + (node.rect.height * 13) / 16);
    ctx.bezierCurveTo(node.rect.x - node.rect.width / 15, node.rect.y + (node.rect.height * 13) / 16, node.rect.x - node.rect.width / 15, node.rect.y + (node.rect.height * 7) / 16, node.rect.x + node.rect.width / 5, node.rect.y + (node.rect.height * 7) / 16);
    ctx.bezierCurveTo(node.rect.x + node.rect.width / 5, node.rect.y, node.rect.x + (node.rect.width * 4) / 5, node.rect.y, node.rect.x + (node.rect.width * 4) / 5, node.rect.y + (node.rect.height * 7) / 16);
    ctx.bezierCurveTo(node.rect.x + (node.rect.width * 16) / 15, node.rect.y + (node.rect.height * 7) / 16, node.rect.x + (node.rect.width * 16) / 15, node.rect.y + (node.rect.height * 13) / 16, node.rect.x + (node.rect.width * 4) / 5, node.rect.y + (node.rect.height * 13) / 16);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=cloud.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/cloud.anchor.js


function cloudAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + (node.rect.height * 3) / 5, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height / 9, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + (node.rect.height * 3) / 5, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + (node.rect.height * 4) / 5, Direction.Bottom));
}
//# sourceMappingURL=cloud.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/cloud.rect.js

function cloudIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function cloudTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 4, node.rect.y + node.rect.height / 4, node.rect.width / 2, (node.rect.height * 6) / 11);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=cloud.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/message.js
function message_message(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + (node.rect.height * 3) / 4);
    ctx.lineTo(node.rect.x + (node.rect.width * 8) / 16, node.rect.y + (node.rect.height * 3) / 4);
    ctx.lineTo(node.rect.x + node.rect.width / 4, node.rect.ey);
    ctx.lineTo(node.rect.x + (node.rect.width * 5) / 16, node.rect.y + (node.rect.height * 3) / 4);
    ctx.lineTo(node.rect.x, node.rect.y + (node.rect.height * 3) / 4);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=message.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/message.rect.js

function messageIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
    node.fullIconRect = node.iconRect;
}
function messageTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum, (node.rect.height * 3) / 4 - node.paddingTopNum - node.paddingBottomNum);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=message.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/message.anchor.js


function messageAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + (node.rect.height * 3) / 8, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + (node.rect.height * 3) / 8, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 4, node.rect.ey, Direction.Bottom));
}
//# sourceMappingURL=message.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/file.js
function file(ctx, node) {
    ctx.beginPath();
    var offsetX = node.rect.width / 6;
    ctx.moveTo(node.rect.x, node.rect.y);
    ctx.lineTo(node.rect.ex - offsetX, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.y + offsetX);
    ctx.lineTo(node.rect.ex, node.rect.ey);
    ctx.lineTo(node.rect.x, node.rect.ey);
    ctx.closePath();
    ctx.moveTo(node.rect.ex - offsetX, node.rect.y);
    ctx.lineTo(node.rect.ex - offsetX, node.rect.y + offsetX);
    ctx.lineTo(node.rect.ex, node.rect.y + offsetX);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=file.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/image.rect.js

function imageIconRect(node) {
    var textWidth = 0;
    var textHeight = 0;
    if (node.text) {
        if (node.paddingRightNum) {
            textWidth = node.paddingRightNum;
        }
        else {
            textHeight = node.paddingBottomNum || node.lineHeight * node.fontSize * (node.textMaxLine || 1);
        }
    }
    node.iconRect = new rect_Rect(node.rect.x, node.rect.y, node.rect.width - textWidth, node.rect.height - textHeight);
    node.fullIconRect = node.rect;
}
function imageTextRect(node) {
    if (node.paddingRightNum) {
        var width = node.paddingRightNum - 5;
        node.textRect = new rect_Rect(node.rect.x + node.rect.width - width, node.rect.y, width, node.rect.height - node.textOffsetY * 2);
    }
    else {
        var height = node.paddingBottomNum || node.lineHeight * node.fontSize * (node.textMaxLine || 1);
        node.textRect = new rect_Rect(node.rect.x, node.rect.y + node.rect.height - height, node.rect.width - node.textOffsetX * 2, height);
    }
    node.fullTextRect = node.rect;
}
//# sourceMappingURL=image.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/image.anchor.js


function imageAnchors(node) {
    var textWidth = 0;
    var textHeight = 0;
    if (node.text) {
        if (node.paddingRightNum) {
            textWidth = node.paddingRightNum;
        }
        else {
            textHeight = node.paddingBottomNum || node.lineHeight * node.fontSize * (node.textMaxLine || 1);
        }
    }
    node.anchors.push(new Point(node.rect.x, node.rect.y + (node.rect.height - textHeight) / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + (node.rect.width - textWidth) / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width - textWidth, node.rect.y + (node.rect.height - textHeight) / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + (node.rect.width - textWidth) / 2, node.rect.y + node.rect.height - textHeight, Direction.Bottom));
}
//# sourceMappingURL=image.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/cube.model.js


var Surface = /** @class */ (function () {
    function Surface(pt1, pt2, pt3, pt4, fillStyle, strokeStyle) {
        if (fillStyle === void 0) { fillStyle = ''; }
        if (strokeStyle === void 0) { strokeStyle = ''; }
        this.points = [];
        this.fillStyle = '';
        this.strokeStyle = '';
        this.points.push(pt1);
        this.points.push(pt2);
        this.points.push(pt3);
        this.points.push(pt4);
        this.fillStyle = fillStyle;
        this.strokeStyle = strokeStyle || fillStyle;
    }
    Surface.prototype.render = function (ctx) {
        ctx.save();
        ctx.fillStyle = this.fillStyle;
        ctx.strokeStyle = this.strokeStyle;
        ctx.beginPath();
        for (var i = 0; i < this.points.length; ++i) {
            if (i) {
                ctx.lineTo(this.points[i].x, this.points[i].y);
            }
            else {
                ctx.moveTo(this.points[i].x, this.points[i].y);
            }
        }
        ctx.closePath();
        this.fillStyle && ctx.fill();
        ctx.stroke();
        ctx.restore();
    };
    return Surface;
}());

var cube_model_Cube = /** @class */ (function () {
    function Cube(rect, z, zRotate, fillStyle, strokeStyle) {
        if (fillStyle === void 0) { fillStyle = '#ddd'; }
        if (strokeStyle === void 0) { strokeStyle = '#ccc'; }
        this.surfaces = [];
        var offset = z * Math.sin((45 * Math.PI) / 180);
        var p1 = new Point(rect.x, rect.y + offset);
        var p2 = new Point(rect.ex - offset, rect.y + offset);
        var p3 = new Point(rect.ex - offset, rect.ey);
        var p4 = new Point(rect.x, rect.ey);
        // front
        this.surfaces.push(new Surface(p1, p2, p3, p4, fillStyle, strokeStyle));
        // up
        this.surfaces.push(new Surface(p1, new Point(rect.x + offset, rect.y), new Point(rect.ex, rect.y), p2, pSBC(0.5, fillStyle), strokeStyle));
        // right
        this.surfaces.push(new Surface(p2, new Point(rect.ex, rect.y), new Point(rect.ex, rect.ey - offset), p3, pSBC(0.6, fillStyle), strokeStyle));
    }
    Cube.prototype.render = function (ctx) {
        for (var _i = 0, _a = this.surfaces; _i < _a.length; _i++) {
            var item = _a[_i];
            item.render(ctx);
        }
    };
    return Cube;
}());

//# sourceMappingURL=cube.model.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/cube.js

function cube(ctx, node) {
    new cube_model_Cube(node.rect, node.z, node.zRotate, node.fillStyle, node.strokeStyle).render(ctx);
}
//# sourceMappingURL=cube.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/cube.anchor.js


function cubeAnchors(node) {
    var offset = node.z * Math.sin((45 * Math.PI) / 180);
    node.anchors.push(new Point(node.rect.x, node.rect.ey - (node.rect.height - offset) / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + offset / 2, Direction.Up));
    node.anchors.push(new Point(node.rect.ex - offset / 2, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + (node.rect.width - offset) / 2, node.rect.y + node.rect.height, Direction.Bottom));
}
//# sourceMappingURL=cube.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/cube.rect.js

function cubeIconRect(node) {
    node.fullIconRect = node.fullTextRect;
    node.iconRect = new rect_Rect(node.fullIconRect.x, node.fullIconRect.y, node.fullIconRect.width, (node.fullIconRect.height * 2) / 3);
}
function cubeTextRect(node) {
    var offset = node.z * Math.sin((45 * Math.PI) / 180);
    node.fullTextRect = new rect_Rect(node.rect.x, node.rect.y + offset, node.rect.width - offset, node.rect.height - offset);
    node.textRect = new rect_Rect(node.fullTextRect.x + 10, node.fullTextRect.y + (node.fullTextRect.height * 2) / 3, node.fullTextRect.width - 20, node.fullTextRect.height / 3 - 5);
}
//# sourceMappingURL=cube.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/people.js
function people(ctx, node) {
    ctx.beginPath();
    var r = node.rect.width / 4;
    var middle = node.rect.x + node.rect.width / 2;
    ctx.arc(middle, node.rect.y + r, r, 0, Math.PI * 2);
    ctx.moveTo(node.rect.x, node.rect.y + r * 3);
    ctx.lineTo(node.rect.ex, node.rect.y + r * 3);
    ctx.moveTo(middle, node.rect.y + r * 2);
    ctx.lineTo(middle, node.rect.y + r * 4);
    ctx.moveTo(middle, node.rect.y + r * 4);
    ctx.lineTo(node.rect.x, node.rect.ey);
    ctx.moveTo(middle, node.rect.y + r * 4);
    ctx.lineTo(node.rect.ex, node.rect.ey);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=people.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/people.rect.js

function peopleIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function peopleTextRect(node) {
    node.textRect = undefined;
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=people.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/rectangle.rect.js

function rectangleIconRect(node) {
    node.iconRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
    node.fullIconRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
}
function rectangleTextRect(node) {
    var height = node.rect.height - node.paddingTopNum - node.paddingBottomNum;
    node.textRect = new rect_Rect(node.rect.x + node.paddingLeftNum + height, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum - height, height);
    node.fullTextRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum, height);
}
//# sourceMappingURL=rectangle.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/graffiti.js
function graffiti(ctx, node) {
    if (!node.points || !node.points[0]) {
        return;
    }
    ctx.beginPath();
    ctx.moveTo(node.points[0].x, node.points[0].y);
    node.points.forEach(function (pt) {
        ctx.lineTo(pt.x, pt.y);
    });
    node['closePath'] && !node['doing'] && ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=graffiti.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/graffiti.anchor.js


function graffitiAnchors(node) {
    if (!node.points || !node.points.length) {
        return;
    }
    var pt1 = node.points[0];
    var pt2 = node.points[node.points.length - 1];
    if (pt1.x < pt2.x) {
        node.anchors.push(new Point(pt1.x, pt1.y, Direction.Left));
        node.anchors.push(new Point(pt2.x, pt2.y, Direction.Right));
    }
    else {
        node.anchors.push(new Point(pt1.x, pt1.y, Direction.Right));
        node.anchors.push(new Point(pt2.x, pt2.y, Direction.Left));
    }
}
//# sourceMappingURL=graffiti.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/mindNode.anchor.js


function mindNodeAnchors(node) {
    var r = borderRadius(node);
    // 上四
    var topN = 5; // 上方节点个数，控制位置，实际节点数依然是 4 个
    for (var i = 0; i < topN; i++) {
        if (i === 2) {
            continue;
        }
        var x = node.rect.x + (node.rect.width * (i + 1)) / (topN + 1);
        var y = node.rect.y;
        if (x < node.rect.x + r) {
            // 在左侧圆角
            y = getYByCircle(node.rect.x + r, y + r, x, r, -1);
        }
        else if (x > node.rect.x + node.rect.width - r) {
            // 在右侧圆角
            y = getYByCircle(node.rect.x + node.rect.width - r, y + r, x, r, -1);
        }
        node.anchors.push(new Point(x, y, Direction.Up));
    }
    // 右三
    var rightN = 3; // 右侧节点数
    for (var i = 0; i < rightN; i++) {
        var y = node.rect.y + (node.rect.height * (i + 1)) / (rightN + 1);
        var x = node.rect.x + node.rect.width;
        if (y < node.rect.y + r) {
            // 在上侧圆角以内
            x = getXByCircle(x - r, node.rect.y + r, y, r);
        }
        else if (y > node.rect.y + node.rect.height - r) {
            // 下侧圆角
            x = getXByCircle(x - r, node.rect.y + node.rect.height - r, y, r);
        }
        node.anchors.push(new Point(x, y, Direction.Right));
    }
    // 下四
    var bottomN = 5; // 下侧节点数
    for (var i = 0; i < bottomN; i++) {
        if (i === 2) {
            continue;
        }
        var x = node.rect.x + (node.rect.width * (i + 1)) / (bottomN + 1);
        var y = node.rect.y + node.rect.height;
        if (x < node.rect.x + r) {
            // 在左侧圆角
            y = getYByCircle(node.rect.x + r, y - r, x, r);
        }
        else if (x > node.rect.x + node.rect.width - r) {
            // 在右侧圆角
            y = getYByCircle(node.rect.x + node.rect.width - r, y - r, x, r);
        }
        node.anchors.push(new Point(x, y, Direction.Bottom));
    }
    // 左三
    var leftN = 3; // 左侧节点数
    for (var i = 0; i < leftN; i++) {
        var y = node.rect.y + (node.rect.height * (i + 1)) / (leftN + 1);
        var x = node.rect.x;
        if (y < node.rect.y + r) {
            // 在上侧圆角以内
            x = getXByCircle(x + r, node.rect.y + r, y, r, -1);
        }
        else if (y > node.rect.y + node.rect.height - r) {
            // 下侧圆角
            x = getXByCircle(x + r, node.rect.y + node.rect.height - r, y, r, -1);
        }
        node.anchors.push(new Point(x, y, Direction.Left));
    }
}
/**
 * 得到元素实际计算半径
 * @param node 元素
 * @returns 元素实际半径
 */
function borderRadius(node) {
    var wr = node.borderRadius;
    var hr = node.borderRadius;
    if (node.borderRadius < 1) {
        wr = node.rect.width * node.borderRadius;
        hr = node.rect.height * node.borderRadius;
    }
    var r = wr < hr ? wr : hr;
    if (node.rect.width < 2 * r) {
        r = node.rect.width / 2;
    }
    if (node.rect.height < 2 * r) {
        r = node.rect.height / 2;
    }
    return r;
}
/**
 * 获取圆的 x 坐标
 * @param ox 圆心x
 * @param oy 圆心y
 * @param y y
 * @param r 半径
 * @param sqrt 点可能在左侧，左侧填-1，右侧1（默认值）
 */
function getXByCircle(ox, oy, y, r, sqrt) {
    if (sqrt === void 0) { sqrt = 1; }
    return sqrt * Math.sqrt(Math.pow(r, 2) - Math.pow((y - oy), 2)) + ox;
}
/**
 * 获取圆的 y 坐标
 * @param ox 圆心x
 * @param oy 圆心y
 * @param y y
 * @param r 半径
 * @param sqrt 点可以在上侧，也可能在下侧，上侧-1，下侧1（默认）
 */
function getYByCircle(ox, oy, x, r, sqrt) {
    if (sqrt === void 0) { sqrt = 1; }
    return sqrt * Math.sqrt(Math.pow(r, 2) - Math.pow((x - ox), 2)) + oy;
}
//# sourceMappingURL=mindNode.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/mindLine.js
function mindLine(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x, node.rect.y + node.rect.height);
    ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height);
    ctx.closePath();
    ctx.stroke();
}
//# sourceMappingURL=mindLine.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/mindLine.anchor.js

function mindLineAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height, 4));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height, 2));
}
//# sourceMappingURL=mindLine.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/nodes/lines.js
function lines_lines(ctx, node) {
    if (!node.points || !node.points[1]) {
        return;
    }
    ctx.beginPath();
    ctx.moveTo(node.points[0].x, node.points[0].y);
    for (var i = 1; i < node.points.length;) {
        // curve 控制点
        if (node.points[i].data) {
            if (node.points[i + 2]) {
                ctx.bezierCurveTo(node.points[i].x, node.points[i].y, node.points[i + 1].x, node.points[i + 1].y, node.points[i + 2].x, node.points[i + 2].y);
                i += 2;
            }
            else {
                break;
            }
        }
        else {
            ctx.lineTo(node.points[i].x, node.points[i].y);
            ++i;
        }
    }
    node['closePath'] && !node['doing'] && ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=lines.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/default.js






















































// Functions of drawing a node.
var drawNodeFns = {};
// Calc the occupy rect of icon.
var iconRectFns = {};
// Calc the occupy rect of text.
var textRectFns = {};
// Calc the anchors of node.
var anchorsFns = {};
// Functions of drawing a line.
var drawLineFns = {};
// Functions of drawing a arrow.
var drawArrowFns = {};
function default_init() {
    // ********Default nodes.*******
    // Combine
    drawNodeFns.combine = rectangle;
    // Div
    drawNodeFns.div = rectangle;
    // graffiti
    drawNodeFns.graffiti = graffiti;
    anchorsFns.graffiti = graffitiAnchors;
    // lines
    drawNodeFns.lines = lines_lines;
    // Square
    drawNodeFns.square = rectangle;
    // Rectangle
    drawNodeFns.rectangle = rectangle;
    iconRectFns.rectangle = rectangleIconRect;
    textRectFns.rectangle = rectangleTextRect;
    // Ciricle
    drawNodeFns.circle = circle;
    iconRectFns.circle = circleIconRect;
    textRectFns.circle = circleTextRect;
    anchorsFns.circle = circleAnchors;
    // Triangle
    drawNodeFns.triangle = triangle;
    anchorsFns.triangle = triangleAnchors;
    iconRectFns.triangle = triangleIconRect;
    textRectFns.triangle = triangleTextRect;
    // Diamond
    drawNodeFns.diamond = diamond;
    iconRectFns.diamond = diamondIconRect;
    textRectFns.diamond = diamondTextRect;
    // Hexagon
    drawNodeFns.hexagon = hexagon;
    iconRectFns.hexagon = hexagonIconRect;
    textRectFns.hexagon = hexagonTextRect;
    anchorsFns.hexagon = hexagonAnchors;
    // Pentagon
    drawNodeFns.pentagon = pentagon;
    iconRectFns.pentagon = pentagonIconRect;
    textRectFns.pentagon = pentagonTextRect;
    anchorsFns.pentagon = pentagonAnchors;
    // Pentagram
    drawNodeFns.pentagram = pentagram;
    iconRectFns.pentagram = pentagramIconRect;
    textRectFns.pentagram = pentagramTextRect;
    anchorsFns.pentagram = pentagramAnchors;
    // Left arrow
    drawNodeFns.leftArrow = leftArrow;
    anchorsFns.leftArrow = arrowAnchors;
    iconRectFns.leftArrow = leftArrowIconRect;
    textRectFns.leftArrow = leftArrowTextRect;
    // Right arrow
    drawNodeFns.rightArrow = rightArrow;
    anchorsFns.rightArrow = arrowAnchors;
    iconRectFns.rightArrow = rightArrowIconRect;
    textRectFns.rightArrow = rightArrowTextRect;
    // Two-way arrow
    drawNodeFns.twowayArrow = twowayArrow;
    anchorsFns.twowayArrow = arrowAnchors;
    iconRectFns.twowayArrow = twowayArrowIconRect;
    textRectFns.twowayArrow = twowayArrowTextRect;
    // Cloud
    drawNodeFns.cloud = cloud;
    anchorsFns.cloud = cloudAnchors;
    iconRectFns.cloud = cloudIconRect;
    textRectFns.cloud = cloudTextRect;
    // Message
    drawNodeFns.message = message_message;
    anchorsFns.message = messageAnchors;
    iconRectFns.message = messageIconRect;
    textRectFns.message = messageTextRect;
    // File
    drawNodeFns.file = file;
    // Text
    drawNodeFns.text = text_text;
    iconRectFns.text = lineIconRect;
    // Line
    drawNodeFns.line = line_line;
    anchorsFns.line = lineAnchors;
    iconRectFns.line = lineIconRect;
    textRectFns.line = lineTextRect;
    // Image
    drawNodeFns.image = function (ctx, node) { };
    iconRectFns.image = imageIconRect;
    textRectFns.image = imageTextRect;
    anchorsFns.image = imageAnchors;
    // Cube
    drawNodeFns.cube = cube;
    anchorsFns.cube = cubeAnchors;
    iconRectFns.cube = cubeIconRect;
    textRectFns.cube = cubeTextRect;
    // People
    drawNodeFns.people = people;
    iconRectFns.people = peopleIconRect;
    textRectFns.people = peopleTextRect;
    // MindNode
    drawNodeFns.mindNode = rectangle;
    anchorsFns.mindNode = mindNodeAnchors;
    iconRectFns.mindNode = rectangleIconRect;
    textRectFns.mindNode = rectangleTextRect;
    // MindLine
    drawNodeFns.mindLine = mindLine;
    anchorsFns.mindLine = mindLineAnchors;
    // ********end********
    // ********Default lines.*******
    drawLineFns.line = {
        drawFn: lines_line_line,
        drawControlPointsFn: lineControlPoints,
        controlPointsFn: calcLineControlPoints,
        pointIn: pointInPolyline,
    };
    drawLineFns.polyline = {
        drawFn: polyline,
        drawControlPointsFn: polylineControlPoints,
        controlPointsFn: calcPolylineControlPoints,
        dockControlPointFn: dockPolylineControlPoint,
        pointIn: pointInPolyline,
    };
    drawLineFns.curve = {
        drawFn: curve,
        drawControlPointsFn: curveControlPoints,
        controlPointsFn: calcCurveControlPoints,
        pointIn: pointInCurve,
    };
    drawLineFns.mind = {
        drawFn: curve,
        drawControlPointsFn: curveControlPoints,
        controlPointsFn: calcMindControlPoints,
        pointIn: pointInCurve,
    };
    // ********end********
    // ********Default nodes.*******
    drawArrowFns.triangleSolid = triangleSolid;
    drawArrowFns.triangle = triangle_triangle;
    drawArrowFns.diamondSolid = diamondSolid;
    drawArrowFns.diamond = diamond_diamond;
    drawArrowFns.circleSolid = circleSolid;
    drawArrowFns.circle = circle_circle;
    drawArrowFns.line = arrows_line_line;
    drawArrowFns.lineUp = lineUp;
    drawArrowFns.lineDown = lineDown;
    // ********end********
}
default_init();
// registerNode: Register a custom node.
// name - The name of node.
// drawFn - How to draw.
// anchorsFn - How to get the anchors.
// iconRectFn - How to get the icon rect.
// textRectFn - How to get the text rect.
// protect - No overwirte the node if exists.
function registerNode(name, drawFn, anchorsFn, iconRectFn, textRectFn, protect) {
    // Exist
    if (drawNodeFns[name] && protect) {
        return false;
    }
    drawNodeFns[name] = drawFn;
    anchorsFns[name] = anchorsFn;
    iconRectFns[name] = iconRectFn;
    textRectFns[name] = textRectFn;
    return true;
}
// registerLine: Register a custom line.
// name - The name of line.
// drawFn - How to draw.
// drawControlPointsFn - Draw the control points.
// controlPointsFn - How to get the controlPoints.
// dockControlPointFn - Dock a point to horizontal/vertial or related position.
// force - Overwirte the node if exists.
function registerLine(name, drawFn, drawControlPointsFn, controlPointsFn, dockControlPointFn, pointInFn, getLength, getCenter, getPointByPos, force) {
    if (force === void 0) { force = true; }
    // Exist
    if (drawLineFns[name] && !force) {
        return false;
    }
    drawLineFns[name] = {
        drawFn: drawFn,
        drawControlPointsFn: drawControlPointsFn,
        controlPointsFn: controlPointsFn,
        dockControlPointFn: dockControlPointFn,
        pointIn: pointInFn,
        getLength: getLength,
        getCenter: getCenter,
        getPointByPos: getPointByPos,
    };
    return true;
}
// registerArrow: Register a custom arrow.
// name - the name of arrow.
// drawFn - how to draw.
// force - Overwirte the node if exists.
function registerArrow(name, drawFn, protect) {
    // Exist
    if (drawArrowFns[name] && protect) {
        return false;
    }
    drawArrowFns[name] = drawFn;
    return true;
}
window.registerTopologyNode = registerNode;
window.registerTopologyLine = registerLine;
//# sourceMappingURL=default.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/line.js
var __extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();









var line_Line = /** @class */ (function (_super) {
    __extends(Line, _super);
    function Line(json) {
        var _this = _super.call(this) || this;
        var defaultData = {
            name: 'curve',
            fromArrow: '',
            toArrow: '',
            controlPoints: [],
            fromArrowSize: 5,
            toArrowSize: 5,
            borderWidth: 0,
            borderColor: '#000000',
            animateColor: '',
            animateSpan: 1,
            animateFromSize: 0,
            animateToSize: 0,
            animateDotSize: 3,
            textBackground: '#ffffff'
        };
        _this.fromData(defaultData, json);
        _this.type = PenType.Line;
        if (json.from) {
            _this.from = new Point(json.from.x, json.from.y, json.from.direction, json.from.anchorIndex, json.from.id, json.autoAnchor);
        }
        if (json.to) {
            _this.to = new Point(json.to.x, json.to.y, json.to.direction, json.to.anchorIndex, json.to.id, json.autoAnchor);
        }
        // 暂时兼容老数据
        if (json.name === 'mind' && (!json.controlPoints || json.controlPoints.length > 2)) {
            json.controlPoints = undefined;
            _this.calcControlPoints(true);
        }
        // end
        else if (json.controlPoints) {
            _this.controlPoints = [];
            for (var _i = 0, _a = json.controlPoints; _i < _a.length; _i++) {
                var item = _a[_i];
                _this.controlPoints.push(new Point(item.x, item.y, item.direction, item.anchorIndex, item.id));
            }
        }
        if (json.children) {
            _this.children = [];
            json.children.forEach(function (item) {
                _this.children.push(new Line(item));
            });
        }
        return _this;
    }
    Line.prototype.setFrom = function (from, fromArrow) {
        if (fromArrow === void 0) { fromArrow = ''; }
        this.from = from;
        this.fromArrow = fromArrow;
        this.textRect = undefined;
    };
    Line.prototype.setTo = function (to, toArrow) {
        if (toArrow === void 0) { toArrow = 'triangleSolid'; }
        this.to = to;
        this.toArrow = toArrow;
        this.textRect = undefined;
    };
    Line.prototype.calcControlPoints = function (force) {
        if (this.name !== 'line' && this.manualCps && !force) {
            return;
        }
        this.textRect = undefined;
        if (this.from && this.to && drawLineFns[this.name]) {
            drawLineFns[this.name].controlPointsFn(this);
        }
    };
    Line.prototype.draw = function (ctx) {
        if (this.animateDot) {
            ctx.fillStyle = ctx.strokeStyle;
            if (this.animateType === 'dot') {
                ctx.beginPath();
                ctx.arc(this.animateDot.x, this.animateDot.y, this.animateDotSize, 0, 2 * Math.PI, false);
                ctx.fill();
                return;
            }
            else if (this.animateType === 'comet') {
                var bulles = this.getBubbles();
                ctx.save();
                for (var _i = 0, bulles_1 = bulles; _i < bulles_1.length; _i++) {
                    var item = bulles_1[_i];
                    ctx.globalAlpha = item.a;
                    ctx.beginPath();
                    ctx.arc(item.pos.x, item.pos.y, item.r, 0, 2 * Math.PI, false);
                    ctx.fill();
                }
                ctx.restore();
            }
        }
        if (!this.isAnimate && this.borderWidth > 0 && this.borderColor) {
            ctx.save();
            if (this.lineJoin) {
                ctx.lineJoin = this.lineJoin;
            }
            ctx.lineWidth = this.lineWidth + this.borderWidth;
            ctx.strokeStyle = this.borderColor;
            if (drawLineFns[this.name]) {
                drawLineFns[this.name].drawFn(ctx, this);
            }
            ctx.restore();
        }
        switch (this.strokeType) {
            case 1:
                this.strokeLinearGradient(ctx);
                break;
        }
        if ((!this.isAnimate || this.animateType !== 'comet') && drawLineFns[this.name]) {
            if (this.lineJoin) {
                ctx.lineJoin = this.lineJoin;
            }
            drawLineFns[this.name].drawFn(ctx, this);
        }
        var scale = le5le_store["Store"].get(this.generateStoreKey('LT:scale')) || 1;
        if (this.fromArrow && drawArrowFns[this.fromArrow]) {
            ctx.save();
            ctx.beginPath();
            ctx.lineDashOffset = 0;
            ctx.setLineDash([]);
            ctx.fillStyle = this.fromArrowColor || ctx.strokeStyle;
            ctx.strokeStyle = ctx.fillStyle;
            var f = this.to;
            if (this.name === 'curve') {
                f = getBezierPoint(0.95 - this.lineWidth / 100, this.to, this.controlPoints[1], this.controlPoints[0], this.from);
            }
            else if (this.name !== 'line' && this.controlPoints.length) {
                f = this.controlPoints[0];
            }
            drawArrowFns[this.fromArrow](ctx, f, this.from, this.fromArrowSize * scale);
            ctx.restore();
        }
        if (this.toArrow && drawArrowFns[this.toArrow]) {
            ctx.save();
            ctx.beginPath();
            ctx.lineDashOffset = 0;
            ctx.setLineDash([]);
            ctx.fillStyle = this.toArrowColor || ctx.strokeStyle;
            ctx.strokeStyle = ctx.fillStyle;
            var f = this.from;
            if (this.name === 'curve') {
                f = getBezierPoint(0.95 - this.lineWidth / 100, this.from, this.controlPoints[0], this.controlPoints[1], this.to);
            }
            else if (this.name === 'mind') {
                f = getBezierPoint(0.96 - this.lineWidth / 100, this.from, this.controlPoints[0], this.controlPoints[1], this.to);
            }
            else if (this.name !== 'line' && this.controlPoints.length) {
                f = this.controlPoints[this.controlPoints.length - 1];
            }
            drawArrowFns[this.toArrow](ctx, f, this.to, this.toArrowSize * scale);
            ctx.restore();
        }
        if (this.text && !this.isAnimate) {
            if (!this.textRect) {
                this.calcTextRect();
            }
            text_text(ctx, this);
        }
    };
    Line.prototype.pointIn = function (pt) {
        return drawLineFns[this.name].pointIn(pt, this);
    };
    Line.prototype.getLen = function () {
        switch (this.name) {
            case 'line':
                return lineLen(this.from, this.to);
            case 'polyline':
                if (!this.controlPoints || !this.controlPoints.length) {
                    return lineLen(this.from, this.to);
                }
                var len = 0;
                var curPt = this.from;
                for (var _i = 0, _a = this.controlPoints; _i < _a.length; _i++) {
                    var pt = _a[_i];
                    len += lineLen(curPt, pt);
                    curPt = pt;
                }
                len += lineLen(curPt, this.to);
                return len | 0;
            case 'curve':
            case 'mind':
                return curveLen(this.from, this.controlPoints[0], this.controlPoints[1], this.to);
            default:
                if (drawLineFns[this.name].getLength) {
                    return drawLineFns[this.name].getLength(this);
                }
        }
        return 0;
    };
    Line.prototype.strokeLinearGradient = function (ctx) {
        if (!this.lineGradientFromColor || !this.lineGradientToColor) {
            return;
        }
        var from = this.from;
        var to = this.to;
        // contributor: https://github.com/sunnyguohua/topology
        var grd = ctx.createLinearGradient(from.x, from.y, to.x, to.y);
        grd.addColorStop(0, this.lineGradientFromColor);
        grd.addColorStop(1, this.lineGradientToColor);
        ctx.strokeStyle = grd;
    };
    Line.prototype.calcTextRect = function () {
        var center = this.getCenter();
        var width = Math.abs(this.from.x - this.to.x);
        if (width < 100) {
            width = 100;
        }
        if (this.text && !this.text.split) {
            this.text += '';
        }
        var height = this.lineHeight *
            this.fontSize *
            (this.textMaxLine || (this.text && this.text.split('\n').length) || 1);
        this.textRect = new rect_Rect(center.x - width / 2, center.y - height / 2, width, height);
    };
    Line.prototype.getTextRect = function () {
        // calc every time just in case text line is changed.
        this.calcTextRect();
        return this.textRect;
    };
    Line.prototype.getCenter = function () {
        var center = new Point(this.from.x, this.from.y);
        switch (this.name) {
            case 'line':
                center = this.getLineCenter(this.from, this.to);
                break;
            case 'polyline':
                var i = Math.round(this.controlPoints.length / 2);
                center = this.getLineCenter(this.controlPoints[i - 1] || this.from, this.controlPoints[i] || this.to);
                break;
            case 'curve':
                center = getBezierPoint(0.5, this.to, this.controlPoints[1], this.controlPoints[0], this.from);
                break;
            default:
                if (drawLineFns[this.name].getCenter) {
                    center = drawLineFns[this.name].getCenter(this);
                }
        }
        return center;
    };
    Line.prototype.getLineCenter = function (from, to) {
        return new Point((from.x + to.x) / 2, (from.y + to.y) / 2);
    };
    Line.prototype.getPointByPos = function (pos) {
        if (pos <= 0) {
            return this.from;
        }
        switch (this.name) {
            case 'line':
                return this.getLinePtByPos(this.from, this.to, pos);
            case 'polyline':
                if (!this.controlPoints || !this.controlPoints.length) {
                    return this.getLinePtByPos(this.from, this.to, pos);
                }
                else {
                    var points = [].concat(this.controlPoints, this.to);
                    var curPt = this.from;
                    for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
                        var pt = points_1[_i];
                        var l = lineLen(curPt, pt);
                        if (pos > l) {
                            pos -= l;
                            curPt = pt;
                        }
                        else {
                            return this.getLinePtByPos(curPt, pt, pos);
                        }
                    }
                    return this.to;
                }
            case 'curve':
                return getBezierPoint(pos / this.getLen(), this.from, this.controlPoints[0], this.controlPoints[1], this.to);
            default:
                if (drawLineFns[this.name].getPointByPos) {
                    return drawLineFns[this.name].getPointByPos(pos, this);
                }
        }
        return null;
    };
    Line.prototype.getPointByReversePos = function (pos) {
        if (pos <= 0) {
            return this.to;
        }
        switch (this.name) {
            case 'line':
                return this.getLinePtByPos(this.to, this.from, pos);
            case 'polyline':
                if (!this.controlPoints || !this.controlPoints.length) {
                    return this.getLinePtByPos(this.to, this.from, pos);
                }
                else {
                    var points_3 = [];
                    this.controlPoints.forEach(function (item) {
                        points_3.unshift(item);
                    });
                    points_3.unshift(this.to);
                    var curPt = this.to;
                    for (var _i = 0, points_2 = points_3; _i < points_2.length; _i++) {
                        var pt = points_2[_i];
                        var l = lineLen(curPt, pt);
                        if (pos > l) {
                            pos -= l;
                            curPt = pt;
                        }
                        else {
                            return this.getLinePtByPos(curPt, pt, pos);
                        }
                    }
                    return this.from;
                }
            case 'curve':
                return getBezierPoint(pos / this.getLen(), this.to, this.controlPoints[1], this.controlPoints[0], this.from);
            default:
                if (drawLineFns[this.name].getPointByReversePos) {
                    return drawLineFns[this.name].getPointByReversePos(pos, this);
                }
        }
        return null;
    };
    Line.prototype.getLinePtByPos = function (from, to, pos) {
        var length = lineLen(from, to);
        if (pos <= 0) {
            return from;
        }
        if (pos >= length) {
            return to;
        }
        var x, y;
        x = from.x + (to.x - from.x) * (pos / length);
        y = from.y + (to.y - from.y) * (pos / length);
        return new Point(x, y);
    };
    Line.prototype.calcRectInParent = function (parent) {
        var parentW = parent.rect.width - parent.paddingLeftNum - parent.paddingRightNum;
        var parentH = parent.rect.height - parent.paddingTopNum - parent.paddingBottomNum;
        this.rectInParent = {
            x: ((this.from.x - parent.rect.x - parent.paddingLeftNum) * 100) / parentW + '%',
            y: ((this.from.y - parent.rect.y - parent.paddingTopNum) * 100) / parentH + '%',
            width: 0,
            height: 0,
            rotate: 0,
        };
    };
    // 根据父节点rect计算自己（子节点）的rect
    Line.prototype.calcRectByParent = function (parent) {
        if (!this.rectInParent) {
            return;
        }
        var parentW = parent.rect.width - parent.paddingLeftNum - parent.paddingRightNum;
        var parentH = parent.rect.height - parent.paddingTopNum - parent.paddingBottomNum;
        var x = parent.rect.x +
            parent.paddingLeftNum +
            abs(parentW, this.rectInParent.x) +
            abs(parentW, this.rectInParent.marginLeft);
        var y = parent.rect.y +
            parent.paddingTopNum +
            abs(parentH, this.rectInParent.y) +
            abs(parentW, this.rectInParent.marginTop);
        if (this.rectInParent.marginLeft === undefined && this.rectInParent.marginRight) {
            x -= abs(parentW, this.rectInParent.marginRight);
        }
        if (this.rectInParent.marginTop === undefined && this.rectInParent.marginBottom) {
            y -= abs(parentW, this.rectInParent.marginBottom);
        }
        this.translate(x - this.from.x, y - this.from.y);
    };
    Line.prototype.initAnimate = function () {
        this.animateStart = 0;
        this.animateDot = undefined;
        this.animatePos = 0;
    };
    Line.prototype.pauseAnimate = function () {
        le5le_store["Store"].set(this.generateStoreKey('LT:AnimatePlay'), {
            pen: this,
            stop: true,
        });
    };
    Line.prototype.stopAnimate = function () {
        var _this = this;
        this.pauseAnimate();
        this.initAnimate();
        setTimeout(function () {
            le5le_store["Store"].set(_this.generateStoreKey('LT:render'), {
                pen: _this,
                stop: true,
            });
        }, 50);
    };
    Line.prototype.animate = function (now) {
        this.animatePos += this.animateSpan;
        switch (this.animateType) {
            case 'beads':
                if (this.animateReverse) {
                    this.lineDashOffset = this.animatePos;
                }
                else {
                    this.lineDashOffset = -this.animatePos;
                }
                var len = this.lineWidth;
                if (len < 5) {
                    len = 5;
                }
                if (this.animateLineDash) {
                    this.lineDash = this.animateLineDash;
                }
                else {
                    this.lineDash = [len, len * 2];
                }
                break;
            case 'dot':
            case 'comet':
                this.lineDash = undefined;
                var pos = void 0;
                if (this.animateReverse) {
                    pos = this.getPointByReversePos(this.animatePos + this.animateToSize);
                }
                else {
                    pos = this.getPointByPos(this.animatePos + this.animateFromSize);
                }
                this.animateDot = pos;
                break;
            default:
                if (this.animateReverse) {
                    this.lineDash = [0, this.length - this.animatePos + 1, this.animatePos];
                }
                else {
                    this.lineDash = [this.animatePos, this.length - this.animatePos + 1];
                }
                break;
        }
        if (this.animatePos > this.length + this.animateSpan - this.animateFromSize - this.animateToSize) {
            if (++this.animateCycleIndex >= this.animateCycle && this.animateCycle > 0) {
                this.animateStart = 0;
                this.initAnimate();
                le5le_store["Store"].set(this.generateStoreKey('animateEnd'), this);
                return;
            }
            this.animatePos = this.animateSpan;
        }
    };
    Line.prototype.getBubbles = function () {
        var bubbles = [];
        for (var i = 0; i < 30 && this.animatePos - i > 0; ++i) {
            if (this.animateReverse) {
                bubbles.push({
                    pos: this.getPointByReversePos(this.animatePos - i * 2 + this.animateToSize),
                    a: 1 - i * 0.03,
                    r: this.lineWidth - i * 0.01,
                });
            }
            else {
                bubbles.push({
                    pos: this.getPointByPos(this.animatePos - i * 2 + this.animateFromSize),
                    a: 1 - i * 0.03,
                    r: this.lineWidth - i * 0.01,
                });
            }
        }
        return bubbles;
    };
    Line.prototype.round = function () {
        this.from.round();
        this.to.round();
    };
    Line.prototype.translate = function (x, y) {
        if (this.from) {
            this.from.x += x;
            this.from.y += y;
            this.to.x += x;
            this.to.y += y;
            if (this.text) {
                this.textRect = undefined;
            }
            for (var _i = 0, _a = this.controlPoints; _i < _a.length; _i++) {
                var pt = _a[_i];
                pt.x += x;
                pt.y += y;
            }
        }
        if (this.children) {
            for (var _b = 0, _c = this.children; _b < _c.length; _b++) {
                var item = _c[_b];
                item.translate(x, y);
            }
        }
        le5le_store["Store"].set(this.generateStoreKey('pts-') + this.id, undefined);
    };
    Line.prototype.scale = function (scale, center) {
        if (this.from) {
            this.from.x = center.x - (center.x - this.from.x) * scale;
            this.from.y = center.y - (center.y - this.from.y) * scale;
            this.to.x = center.x - (center.x - this.to.x) * scale;
            this.to.y = center.y - (center.y - this.to.y) * scale;
            this.lineWidth *= scale;
            this.borderWidth *= scale;
            this.fontSize *= scale;
            if (this.text) {
                this.textRect = undefined;
            }
            this.textOffsetX *= scale;
            this.textOffsetY *= scale;
            for (var _i = 0, _a = this.controlPoints; _i < _a.length; _i++) {
                var pt = _a[_i];
                pt.x = center.x - (center.x - pt.x) * scale;
                pt.y = center.y - (center.y - pt.y) * scale;
            }
        }
        if (this.children) {
            for (var _b = 0, _c = this.children; _b < _c.length; _b++) {
                var item = _c[_b];
                item.scale(scale, center);
            }
        }
        le5le_store["Store"].set(this.generateStoreKey('pts-') + this.id, undefined);
    };
    Line.prototype.hit = function (pt, padding) {
        if (padding === void 0) { padding = 0; }
        if (this.from.hit(pt, padding) || this.to.hit(pt, padding)) {
            return this;
        }
    };
    Line.prototype.clone = function () {
        return new Line(this);
    };
    return Line;
}(pen_Pen));

//# sourceMappingURL=line.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/default.anchor.js


function defaultAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
}
//# sourceMappingURL=default.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/middles/default.rect.js

function defaultIconRect(node) {
    if (node.image && node.imageWidth) {
        node.iconRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.imageWidth, node.imageHeight);
    }
    else if (node.icon && node.iconSize) {
        node.iconRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.iconSize, node.iconSize);
    }
    else {
        node.iconRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum, (node.rect.height * 3) / 4 - node.paddingTopNum - node.paddingBottomNum);
    }
    node.fullIconRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
}
function defaultTextRect(node) {
    var height = node.rect.height - node.paddingTopNum - node.paddingBottomNum;
    node.textRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum + (height * 3) / 4, node.rect.width - node.paddingLeftNum - node.paddingRightNum, height / 4);
    node.fullTextRect = new rect_Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum, height);
}
//# sourceMappingURL=default.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/node.js
var node_extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
    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;
};












// 动画帧不涉及的属性
var animateOutsides = [
    'TID',
    'events',
    'wheres',
    'text',
    'fontFamily',
    'fontSize',
    'lineHeight',
    'fontStyle',
    'fontWeight',
    'textAlign',
    'textBaseline',
    'textBackground',
    'iconFamily',
    'icon',
    'iconSize',
];
var node_Node = /** @class */ (function (_super) {
    node_extends(Node, _super);
    function Node(json, cloneState) {
        var _this = _super.call(this) || this;
        _this.imageRatio = true;
        _this.points = [];
        _this.anchors = [];
        _this.manualAnchors = [];
        _this.rotatedAnchors = [];
        _this.animateDuration = 0;
        _this.animateFrames = [];
        _this.animateFrame = 0;
        var defaultData = {
            zRotate: 0,
            borderRadius: 0,
            imageAlign: 'center',
            gradientAngle: 0,
            gradientRadius: 0.01,
            paddingTop: 0,
            paddingBottom: 0,
            paddingLeft: 0,
            paddingRight: 0,
            animateFrame: 0,
            children: [],
        };
        _this.fromData(defaultData, json);
        _this.type = PenType.Node;
        if (!cloneState) {
            delete _this.elementLoaded;
            delete _this.elementRendered;
        }
        delete _this.animateReady;
        // 兼容老数据
        if (json.children && json.children[0] && json.children[0].parentRect) {
            _this.paddingLeft = json.children[0].parentRect.offsetX;
            _this.paddingRight = 0;
            _this.paddingTop = json.children[0].parentRect.offsetY;
            _this.paddingBottom = 0;
        }
        if (json.parentRect) {
            _this.rectInParent = {
                x: json.parentRect.x * 100 + '%',
                y: json.parentRect.y * 100 + '%',
                width: json.parentRect.width * 100 + '%',
                height: json.parentRect.height * 100 + '%',
                marginTop: 0,
                marginRight: 0,
                marginBottom: 0,
                marginLeft: 0,
                rotate: json.parentRect.rotate,
            };
            _this.paddingTop = json.parentRect.marginY;
            _this.paddingBottom = json.parentRect.marginY;
            _this.paddingLeft = json.parentRect.marginX;
            _this.paddingRight = json.parentRect.marginX;
        }
        // 兼容老数据 end
        if (json.points) {
            _this.points = [];
            json.points.forEach(function (pt) {
                _this.points.push(new Point(pt.x, pt.y));
            });
        }
        if (json.manualAnchors) {
            _this.manualAnchors = [];
            json.manualAnchors.forEach(function (pt) {
                var point = new Point(pt.x, pt.y);
                point.id = json.id;
                _this.manualAnchors.push(point);
            });
        }
        if (cloneState) {
            _this.animateFrames = undefined;
        }
        if (!cloneState && json.animateFrames && json.animateFrames.length) {
            for (var _i = 0, _a = json.animateFrames; _i < _a.length; _i++) {
                var item = _a[_i];
                item.children = undefined;
                if (item.initState) {
                    item.initState = Node.cloneState(item.initState);
                }
                item.state = Node.cloneState(item.state);
            }
            _this.animateFrames = json.animateFrames;
        }
        _this.animateType = json.animateType
            ? json.animateType
            : json.animateDuration
                ? 'custom'
                : '';
        _this.init(cloneState);
        if (json.init && json.img && !json.image) {
            _this.img = json.img;
        }
        if (json.children) {
            _this.children = [];
            json.children.forEach(function (item) {
                var child;
                item.TID = _this.TID;
                switch (item.type) {
                    case PenType.Line:
                        child = new line_Line(item);
                        child.calcRectByParent(_this);
                        break;
                    default:
                        Node.prototype.calcRectByParent.apply(item, [_this]);
                        child = new Node(item);
                        child.parentId = _this.id;
                        child.init(cloneState);
                        break;
                }
                _this.children.push(child);
            });
        }
        return _this;
    }
    Object.defineProperty(Node.prototype, "dockWatchers", {
        // nodes移动时，停靠点的参考位置
        // dockWatchers: Point[];
        get: function () {
            return __spreadArrays([this.rect.center], this.rect.toPoints());
        },
        // 不做任何处理，兼容以前版本中节点属性存在该值的
        set: function (v) {
        },
        enumerable: true,
        configurable: true
    });
    Node.cloneState = function (json) {
        var n = new Node(json, true);
        animateOutsides.forEach(function (item) {
            delete n[item];
        });
        return n;
    };
    Node.prototype.restore = function (state) {
        if (!state && this.animateReady) {
            state = Node.cloneState(this.animateReady);
        }
        if (!state) {
            return;
        }
        for (var key in this) {
            if (state[key] !== undefined &&
                key.indexOf('animate') < 0 &&
                key.indexOf('Animate') < 0) {
                if (animateOutsides.includes(key)) {
                    continue;
                }
                this[key] = state[key];
                if (key === 'rect') {
                    this.rect = new rect_Rect(this.rect.x, this.rect.y, this.rect.width, this.rect.height);
                }
            }
        }
        this.init(true);
    };
    Node.prototype.checkData = function () {
        this.rect.width = this.rect.width < 0 ? 0 : this.rect.width;
        this.rect.height = this.rect.height < 0 ? 0 : this.rect.height;
        if (!this.rect.calcCenter) {
            this.rect = new rect_Rect(this.rect.x, this.rect.y, this.rect.width, this.rect.height);
        }
    };
    Node.prototype.init = function (cloneState) {
        this.checkData();
        this.calcAbsPadding();
        // Calc rect of text.
        if (textRectFns[this.name]) {
            textRectFns[this.name](this);
        }
        else {
            defaultTextRect(this);
        }
        // Calc rect of icon.
        if (iconRectFns[this.name]) {
            iconRectFns[this.name](this);
        }
        else {
            defaultIconRect(this);
        }
        this.calcAnchors();
        this.elementRendered = false;
        if (!cloneState) {
            this.addToDiv();
        }
    };
    Node.prototype.addToDiv = function () {
        if (this.audio || this.video || this.iframe || this.elementId || this.gif) {
            le5le_store["Store"].set(this.generateStoreKey('LT:addDiv'), this);
        }
    };
    Node.prototype.removeFromDiv = function () {
        le5le_store["Store"].set(this.generateStoreKey('LT:removeDiv'), this);
    };
    Node.prototype.hasGif = function () {
        if (this.gif) {
            return true;
        }
        if (this.children) {
            for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                var item = _a[_i];
                if (item.type === PenType.Node &&
                    item.hasGif &&
                    item.hasGif()) {
                    return true;
                }
            }
        }
        return false;
    };
    Node.prototype.calcAbsPadding = function () {
        this.paddingLeftNum = abs(this.rect.width, this.paddingLeft);
        this.paddingRightNum = abs(this.rect.width, this.paddingRight);
        this.paddingTopNum = abs(this.rect.height, this.paddingTop);
        this.paddingBottomNum = abs(this.rect.height, this.paddingBottom);
    };
    // setChildrenIds() {
    //   if (!this.children) {
    //     return;
    //   }
    //   for (const item of this.children) {
    //     item.id = s8();
    //     switch (item.type) {
    //       case PenType.Node:
    //         (item as Node).setChildrenIds();
    //         break;
    //     }
    //   }
    // }
    Node.prototype.draw = function (ctx) {
        if (!drawNodeFns[this.name]) {
            return;
        }
        // DrawBk
        switch (this.bkType) {
            case 1:
                this.drawBkLinearGradient(ctx);
                break;
            case 2:
                this.drawBkRadialGradient(ctx);
                break;
        }
        switch (this.strokeType) {
            case 1:
                this.strokeLinearGradient(ctx);
                break;
        }
        // Draw shape.
        drawNodeFns[this.name](ctx, this);
        // Draw image.
        if (this.image || (this.img && this.elementId === '')) {
            this.drawImg(ctx);
        }
        else if (this.icon) {
            ctx.save();
            ctx.shadowColor = '';
            ctx.shadowBlur = 0;
            iconfont(ctx, this);
            ctx.restore();
        }
        // Draw text.
        if (this.name !== 'text' && this.text) {
            text_text(ctx, this);
        }
    };
    Node.prototype.strokeLinearGradient = function (ctx) {
        if (!this.lineGradientFromColor || !this.lineGradientToColor) {
            return;
        }
        var from = new Point(this.rect.x, this.rect.center.y);
        var to = new Point(this.rect.ex, this.rect.center.y);
        if (this.lineGradientAngle % 90 === 0 && this.lineGradientAngle % 180) {
            if (this.lineGradientAngle % 270) {
                from.x = this.rect.center.x;
                from.y = this.rect.y;
                to.x = this.rect.center.x;
                to.y = this.rect.ey;
            }
            else {
                from.x = this.rect.center.x;
                from.y = this.rect.ey;
                to.x = this.rect.center.x;
                to.y = this.rect.y;
            }
        }
        else if (this.lineGradientAngle) {
            from.rotate(this.lineGradientAngle, this.rect.center);
            to.rotate(this.lineGradientAngle, this.rect.center);
        }
        // contributor: https://github.com/sunnyguohua/topology
        var grd = ctx.createLinearGradient(from.x, from.y, to.x, to.y);
        grd.addColorStop(0, this.lineGradientFromColor);
        grd.addColorStop(1, this.lineGradientToColor);
        ctx.strokeStyle = grd;
    };
    Node.prototype.drawBkLinearGradient = function (ctx) {
        if (!this.gradientFromColor || !this.gradientToColor) {
            return;
        }
        var from = new Point(this.rect.x, this.rect.center.y);
        var to = new Point(this.rect.ex, this.rect.center.y);
        if (this.gradientAngle % 90 === 0 && this.gradientAngle % 180) {
            if (this.gradientAngle % 270) {
                from.x = this.rect.center.x;
                from.y = this.rect.y;
                to.x = this.rect.center.x;
                to.y = this.rect.ey;
            }
            else {
                from.x = this.rect.center.x;
                from.y = this.rect.ey;
                to.x = this.rect.center.x;
                to.y = this.rect.y;
            }
        }
        else if (this.gradientAngle) {
            from.rotate(this.gradientAngle, this.rect.center);
            to.rotate(this.gradientAngle, this.rect.center);
        }
        // contributor: https://github.com/sunnyguohua/topology
        var grd = ctx.createLinearGradient(from.x, from.y, to.x, to.y);
        grd.addColorStop(0, this.gradientFromColor);
        grd.addColorStop(1, this.gradientToColor);
        ctx.fillStyle = grd;
    };
    Node.prototype.drawBkRadialGradient = function (ctx) {
        if (!this.gradientFromColor || !this.gradientToColor) {
            return;
        }
        var r = this.rect.width;
        if (r < this.rect.height) {
            r = this.rect.height;
        }
        r *= 0.5;
        var grd = ctx.createRadialGradient(this.rect.center.x, this.rect.center.y, r * this.gradientRadius, this.rect.center.x, this.rect.center.y, r);
        grd.addColorStop(0, this.gradientFromColor);
        grd.addColorStop(1, this.gradientToColor);
        ctx.fillStyle = grd;
    };
    Node.prototype.drawImg = function (ctx) {
        var _this = this;
        if (this.lastImage !== this.image) {
            this.img = undefined;
            if (this.lastImage && this.lastImage.indexOf('.gif') > 0) {
                le5le_store["Store"].set(this.generateStoreKey('LT:addDiv'), this);
            }
        }
        var gif = this.image && this.image.indexOf('.gif') > 0;
        if (!gif) {
            if (this.img) {
                ctx.save();
                ctx.shadowColor = '';
                ctx.shadowBlur = 0;
                var rect = this.getIconRect();
                var x = rect.x;
                var y = rect.y;
                var w = rect.width;
                var h = rect.height;
                if (this.imageWidth) {
                    w = this.imageWidth;
                }
                if (this.imageHeight) {
                    h = this.imageHeight;
                }
                if (this.imgNaturalWidth && this.imgNaturalHeight && this.imageRatio) {
                    if (this.imageWidth) {
                        h = (this.imgNaturalHeight / this.imgNaturalWidth) * w;
                    }
                    else {
                        w = (this.imgNaturalWidth / this.imgNaturalHeight) * h;
                    }
                }
                x += (rect.width - w) / 2;
                y += (rect.height - h) / 2;
                switch (this.imageAlign) {
                    case 'top':
                        y = rect.y;
                        break;
                    case 'bottom':
                        y = rect.ey - h;
                        break;
                    case 'left':
                        x = rect.x;
                        break;
                    case 'right':
                        x = rect.ex - w;
                        break;
                    case 'left-top':
                        x = rect.x;
                        y = rect.y;
                        break;
                    case 'right-top':
                        x = rect.ex - w;
                        y = rect.y;
                        break;
                    case 'left-bottom':
                        x = rect.x;
                        y = rect.ey - h;
                        break;
                    case 'right-bottom':
                        x = rect.ex - w;
                        y = rect.ey - h;
                        break;
                }
                if (this.iconRotate) {
                    ctx.translate(rect.center.x, rect.center.y);
                    ctx.rotate((this.iconRotate * Math.PI) / 180);
                    ctx.translate(-rect.center.x, -rect.center.y);
                }
                if (this.imageHide) {
                    //  在业务层面去自定义绘制图片
                }
                else {
                    ctx.drawImage(this.img, x, y, w, h);
                }
                ctx.restore();
                return;
            }
            else if (pen_images[this.image]) {
                this.img = pen_images[this.image].img;
                this.lastImage = this.image;
                this.imgNaturalWidth = this.img.naturalWidth;
                this.imgNaturalHeight = this.img.naturalHeight;
                this.drawImg(ctx);
                return;
            }
        }
        else if (this.img) {
            if (this.TID && !this.elementLoaded) {
                this.elementLoaded = true;
                le5le_store["Store"].set(this.generateStoreKey('LT:addDiv'), this);
            }
            return;
        }
        if (!this.image) {
            return;
        }
        var img = new Image();
        img.crossOrigin = 'anonymous';
        img.src = this.image;
        img.onload = function () {
            _this.lastImage = _this.image;
            _this.imgNaturalWidth = img.naturalWidth;
            _this.imgNaturalHeight = img.naturalHeight;
            _this.img = img;
            pen_images[_this.image] = {
                img: img,
            };
            le5le_store["Store"].set(_this.generateStoreKey('LT:imageLoaded'), true);
            if (!_this.gif && gif) {
                _this.gif = true;
                if (_this.TID) {
                    _this.elementLoaded = true;
                    le5le_store["Store"].set(_this.generateStoreKey('LT:addDiv'), _this);
                }
            }
        };
    };
    Node.prototype.calcAnchors = function () {
        var _this = this;
        this.anchors = [];
        if (anchorsFns[this.name]) {
            anchorsFns[this.name](this);
        }
        else {
            defaultAnchors(this);
        }
        if (this.manualAnchors) {
            this.manualAnchors.forEach(function (pt) {
                var x = Math.abs(pt.x - _this.rect.center.x);
                var y = Math.abs(pt.y - _this.rect.center.y);
                if (x > y) {
                    if (pt.x < _this.rect.center.x) {
                        pt.direction = Direction.Left;
                    }
                    else {
                        pt.direction = Direction.Right;
                    }
                }
                else {
                    if (pt.y < _this.rect.center.y) {
                        pt.direction = Direction.Up;
                    }
                    else {
                        pt.direction = Direction.Bottom;
                    }
                }
                _this.anchors.push(pt);
            });
        }
        this.calcRotateAnchors();
    };
    Node.prototype.calcRotateAnchors = function (angle) {
        if (angle === undefined) {
            angle = this.rotate;
        }
        this.rotatedAnchors = [];
        for (var _i = 0, _a = this.anchors; _i < _a.length; _i++) {
            var item = _a[_i];
            this.rotatedAnchors.push(item.clone().rotate(angle, this.rect.center));
        }
    };
    Node.prototype.getTextRect = function () {
        var textRect = this.textRect;
        if (!this.icon && !this.image) {
            textRect = this.fullTextRect;
        }
        return textRect;
    };
    Node.prototype.getIconRect = function () {
        var rect = this.iconRect;
        if (!this.text) {
            rect = this.fullIconRect || this.fullTextRect || this.rect;
        }
        return rect;
    };
    // 根据父节点rect计算自己（子节点）的rect
    Node.prototype.calcRectByParent = function (parent) {
        if (!this.rectInParent) {
            return;
        }
        var parentW = parent.rect.width - parent.paddingLeftNum - parent.paddingRightNum;
        var parentH = parent.rect.height - parent.paddingTopNum - parent.paddingBottomNum;
        var x = parent.rect.x +
            parent.paddingLeftNum +
            abs(parentW, this.rectInParent.x) +
            abs(parentW, this.rectInParent.marginLeft);
        var y = parent.rect.y +
            parent.paddingTopNum +
            abs(parentH, this.rectInParent.y) +
            abs(parentW, this.rectInParent.marginTop);
        var w = abs(parentW, this.rectInParent.width);
        var h = abs(parentH, this.rectInParent.height);
        if (this.rectInParent.marginLeft === undefined &&
            this.rectInParent.marginRight) {
            x -= abs(parentW, this.rectInParent.marginRight);
        }
        if (this.rectInParent.marginTop === undefined &&
            this.rectInParent.marginBottom) {
            y -= abs(parentW, this.rectInParent.marginBottom);
        }
        this.rect = new rect_Rect(x, y, w, h);
        if (!this.rectInParent.rotate) {
            this.rectInParent.rotate = 0;
        }
        var offsetR = parent.rotate + parent.offsetRotate;
        this.rotate = this.rectInParent.rotate + offsetR;
        if (!this.rectInParent.rect) {
            this.rectInParent.rect = this.rect.clone();
        }
    };
    Node.prototype.calcChildrenRect = function () {
        if (!this.children) {
            return;
        }
        for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
            var item = _a[_i];
            item.calcRectByParent(this);
            if (item.type === PenType.Node) {
                item.init();
                item.calcChildrenRect();
            }
        }
    };
    Node.prototype.calcRectInParent = function (parent) {
        var parentW = parent.rect.width - parent.paddingLeftNum - parent.paddingRightNum;
        var parentH = parent.rect.height - parent.paddingTopNum - parent.paddingBottomNum;
        this.rectInParent = {
            x: ((this.rect.x - parent.rect.x - parent.paddingLeftNum) * 100) /
                parentW +
                '%',
            y: ((this.rect.y - parent.rect.y - parent.paddingTopNum) * 100) / parentH +
                '%',
            width: (this.rect.width * 100) / parentW + '%',
            height: (this.rect.height * 100) / parentH + '%',
            rotate: this.rectInParent
                ? this.rectInParent.rotate || 0
                : this.rotate || 0,
            rect: this.rect.clone(),
        };
    };
    // getDockWatchers() {
    //   this.dockWatchers = this.rect.toPoints();
    //   this.dockWatchers.unshift(this.rect.center);
    // }
    Node.prototype.initAnimate = function () {
        if (!this.animateFrames) {
            return;
        }
        var passed = 0;
        for (var i = 0; i < this.animateFrames.length; ++i) {
            this.animateFrames[i].start = passed;
            passed += this.animateFrames[i].duration;
            this.animateFrames[i].end = passed;
            this.animateFrames[i].initState = Node.cloneState(i ? this.animateFrames[i - 1].state : this);
            this.animateFrames[i].offsetRect = new rect_Rect(this.animateFrames[i].state.rect.x -
                this.animateFrames[i].initState.rect.x, this.animateFrames[i].state.rect.y -
                this.animateFrames[i].initState.rect.y, this.animateFrames[i].state.rect.width -
                this.animateFrames[i].initState.rect.width, this.animateFrames[i].state.rect.height -
                this.animateFrames[i].initState.rect.height);
        }
        this.animateDuration = passed;
        this.animateReady = Node.cloneState(this);
        this.animatePos = 0;
        this.animateFrame = 0;
    };
    Node.prototype.pauseAnimate = function () {
        this.animateFrame = this._animateFrame;
        this.animatePos = this._animatePos;
        le5le_store["Store"].set(this.generateStoreKey('LT:AnimatePlay'), {
            pen: this,
            stop: true,
        });
    };
    Node.prototype.stopAnimate = function () {
        this.animateStart = 0;
        le5le_store["Store"].set(this.generateStoreKey('LT:AnimatePlay'), {
            pen: this,
            stop: true,
        });
        this.restore();
        this.initAnimate();
        le5le_store["Store"].set(this.generateStoreKey('LT:render'), {
            pen: this,
            stop: true,
        });
    };
    Node.prototype.animate = function (now) {
        var _this = this;
        if (this.animateStart < 1) {
            return;
        }
        var timeline = now - this.animateStart;
        if (this.animateFrame > 0) {
            this.animateFrames.forEach(function (item, index) {
                if (_this.animateFrame < index + 1) {
                    timeline += item.duration;
                }
            });
            timeline += this.animatePos;
        }
        // Finished on animate.
        if (timeline > this.animateDuration) {
            this.animatePos = 0;
            this.animateFrame = 0;
            this.restore();
            if (this.animateCycle > 0 &&
                ++this.animateCycleIndex >= this.animateCycle) {
                this.animateStart = 0;
                this.animateCycleIndex = 0;
                le5le_store["Store"].set(this.generateStoreKey('animateEnd'), this);
                if (!this.animateAlone) {
                    le5le_store["Store"].set(this.generateStoreKey('LT:rectChanged'), this);
                }
                return;
            }
            this.animateStart = now;
            timeline = 0;
        }
        var rectChanged = false;
        for (var i = 0; i < this.animateFrames.length; ++i) {
            var item = this.animateFrames[i];
            if (timeline >= item.start && timeline < item.end) {
                item.state.dash && (this.dash = item.state.dash);
                item.state.strokeStyle && (this.strokeStyle = item.state.strokeStyle);
                item.state.fillStyle && (this.fillStyle = item.state.fillStyle);
                item.state.text && (this.text = item.state.text);
                item.state.fontColor && (this.fontColor = item.state.fontColor);
                item.state.fontFamily && (this.fontFamily = item.state.fontFamily);
                item.state.fontSize && (this.fontSize = item.state.fontSize);
                item.state.lineHeight && (this.lineHeight = item.state.lineHeight);
                item.state.fontStyle && (this.fontStyle = item.state.fontStyle);
                item.state.fontWeight && (this.fontWeight = item.state.fontWeight);
                item.state.textAlign && (this.textAlign = item.state.textAlign);
                item.state.textBaseline &&
                    (this.textBaseline = item.state.textBaseline);
                item.state.textBackground &&
                    (this.textBackground = item.state.textBackground);
                item.state.iconFamily && (this.iconFamily = item.state.iconFamily);
                item.state.icon && (this.icon = item.state.icon);
                item.state.iconSize && (this.iconSize = item.state.iconSize);
                item.state.iconColor && (this.iconColor = item.state.iconColor);
                this.visible = item.state.visible;
                this._animateFrame = i + 1;
                if (this._animateFrame > this.animateFrame) {
                    this.animateFrame = 0;
                    this.animatePos = 0;
                }
                this._animatePos = timeline - item.start;
                var rate = this._animatePos / item.duration;
                if (item.linear) {
                    if (item.state.rect.x !== item.initState.rect.x) {
                        this.rect.x = item.initState.rect.x + item.offsetRect.x * rate;
                        rectChanged = true;
                    }
                    if (item.state.rect.y !== item.initState.rect.y) {
                        this.rect.y = item.initState.rect.y + item.offsetRect.y * rate;
                        rectChanged = true;
                    }
                    if (item.state.rect.width !== item.initState.rect.width) {
                        this.rect.width =
                            item.initState.rect.width + item.offsetRect.width * rate;
                        rectChanged = true;
                    }
                    if (item.state.rect.height !== item.initState.rect.height) {
                        this.rect.height =
                            item.initState.rect.height + item.offsetRect.height * rate;
                        rectChanged = true;
                    }
                    this.rect.ex = this.rect.x + this.rect.width;
                    this.rect.ey = this.rect.y + this.rect.height;
                    this.rect.calcCenter();
                    if (item.initState.z !== undefined &&
                        item.state.z !== item.initState.z) {
                        this.z =
                            item.initState.z + (item.state.z - item.initState.z) * rate;
                        rectChanged = true;
                    }
                    if (item.state.borderRadius !== item.initState.borderRadius) {
                        this.borderRadius =
                            item.initState.borderRadius +
                                (item.state.borderRadius - item.initState.borderRadius) * rate;
                    }
                    if (item.state.lineWidth !== item.initState.lineWidth) {
                        this.lineWidth =
                            item.initState.lineWidth +
                                (item.state.lineWidth - item.initState.lineWidth) * rate;
                    }
                    if (item.state.rotate !== item.initState.rotate) {
                        this.rotate =
                            item.initState.rotate +
                                (item.state.rotate - item.initState.rotate) * rate;
                        rectChanged = true;
                    }
                    if (item.state.globalAlpha !== item.initState.globalAlpha) {
                        this.globalAlpha =
                            item.initState.globalAlpha +
                                (item.state.globalAlpha - item.initState.globalAlpha) * rate;
                    }
                    if (item.state.lineDashOffset) {
                        if (!this.lineDashOffset) {
                            this.lineDashOffset = item.state.lineDashOffset;
                        }
                        else {
                            this.lineDashOffset += item.state.lineDashOffset;
                        }
                    }
                    if (item.state.value !== item.initState.value) {
                        this.value =
                            (item.initState.value || 0) +
                                ((item.state.value || 0) - (item.initState.value || 0)) * rate;
                    }
                    if (item.state.num !== item.initState.num) {
                        this.num =
                            (item.initState.num || 0) +
                                ((item.state.num || 0) - (item.initState.num || 0)) * rate;
                    }
                    if (item.state.num1 !== item.initState.num1) {
                        this.num1 =
                            (item.initState.num1 || 0) +
                                ((item.state.num1 || 0) - (item.initState.num1 || 0)) * rate;
                    }
                    if (item.state.num2 !== item.initState.num2) {
                        this.num2 =
                            (item.initState.num2 || 0) +
                                ((item.state.num2 || 0) - (item.initState.num2 || 0)) * rate;
                    }
                    if (item.state.num3 !== item.initState.num3) {
                        this.num3 =
                            (item.initState.num3 || 0) +
                                ((item.state.num3 || 0) - (item.initState.num3 || 0)) * rate;
                    }
                    if (item.state.data) {
                        for (var key in item.state.data) {
                            if (typeof item.state.data[key] === 'number') {
                                this.data[key] =
                                    (item.initState.data[key] || 0) +
                                        ((item.state.data[key] || 0) -
                                            (item.initState.data[key] || 0)) *
                                            rate;
                            }
                            else if (item.state.data[key] !== undefined &&
                                item.state.data[key] !== undefined) {
                                this.data[key] = item.state.data[key];
                            }
                        }
                    }
                }
                else {
                    this.rect = item.state.rect;
                    this.lineWidth = item.state.lineWidth;
                    this.rotate = item.state.rotate;
                    this.globalAlpha = item.state.globalAlpha;
                    this.lineDashOffset = item.state.lineDashOffset;
                }
            }
        }
        if (rectChanged) {
            this.init(true);
            if (!this.animateAlone) {
                le5le_store["Store"].set(this.generateStoreKey('LT:rectChanged'), this);
            }
        }
    };
    Node.prototype.scale = function (scale, center) {
        if (!center) {
            center = this.rect.center;
        }
        this['oldRect'] = this.rect.clone();
        this.rect.x = center.x - (center.x - this.rect.x) * scale;
        this.rect.y = center.y - (center.y - this.rect.y) * scale;
        this.textOffsetX *= scale;
        this.textOffsetY *= scale;
        this.z *= scale;
        this.rect.width *= scale;
        this.rect.height *= scale;
        this.rect.ex = this.rect.x + this.rect.width;
        this.rect.ey = this.rect.y + this.rect.height;
        this.lineWidth *= scale;
        if (this.imageWidth) {
            this.imageWidth *= scale;
        }
        if (this.imageHeight) {
            this.imageHeight *= scale;
        }
        this.lastImage = undefined;
        this.fontSize *= scale;
        this.iconSize *= scale;
        if (typeof this.paddingLeft === 'number') {
            this.paddingLeft *= scale;
        }
        if (typeof this.paddingTop === 'number') {
            this.paddingTop *= scale;
        }
        if (typeof this.paddingRight === 'number') {
            this.paddingRight *= scale;
        }
        if (typeof this.paddingBottom === 'number') {
            this.paddingBottom *= scale;
        }
        if (this.rectInParent) {
            if (typeof this.rectInParent.x === 'number') {
                this.rectInParent.x *= scale;
            }
            if (typeof this.rectInParent.y === 'number') {
                this.rectInParent.y *= scale;
            }
            if (typeof this.rectInParent.width === 'number') {
                this.rectInParent.width *= scale;
            }
            if (typeof this.rectInParent.height === 'number') {
                this.rectInParent.height *= scale;
            }
            if (typeof this.rectInParent.marginLeft === 'number') {
                this.rectInParent.marginLeft *= scale;
            }
            if (typeof this.rectInParent.marginTop === 'number') {
                this.rectInParent.marginTop *= scale;
            }
            if (typeof this.rectInParent.marginRight === 'number') {
                this.rectInParent.marginRight *= scale;
            }
            if (typeof this.rectInParent.marginBottom === 'number') {
                this.rectInParent.marginBottom *= scale;
            }
        }
        this.rect.calcCenter();
        if (this.animateFrames && this.animateFrames.length) {
            for (var _i = 0, _a = this.animateFrames; _i < _a.length; _i++) {
                var item = _a[_i];
                if (item.initState) {
                    if (!item.initState.scale) {
                        item.initState = new Node(item.initState);
                    }
                    item.initState.scale(scale, center);
                }
                if (item.state) {
                    if (!item.state.scale) {
                        item.state = new Node(item.state);
                    }
                    item.state.scale(scale, center);
                }
                if (item.initState && item.state) {
                    item.state.fontSize = item.initState.fontSize;
                }
            }
        }
        this.scalePoints(scale, scale);
        this.elementRendered = false;
        this.init();
        if (this.children) {
            for (var _b = 0, _c = this.children; _b < _c.length; _b++) {
                var item = _c[_b];
                item.scale(scale, center);
            }
        }
        if (this.animateReady && this.animateReady.scale) {
            this.animateReady.scale(scale, center);
        }
    };
    Node.prototype.scalePoints = function (scaleX, scaleY) {
        var _this = this;
        if ((this.points || this.manualAnchors) && this['oldRect']) {
            if (!scaleX) {
                scaleX = this.rect.width / this['oldRect'].width;
            }
            if (!scaleY) {
                scaleY = this.rect.height / this['oldRect'].height;
            }
            if (this.points) {
                this.points.forEach(function (pt) {
                    pt.x = _this.rect.x + (pt.x - _this['oldRect'].x) * scaleX;
                    pt.y = _this.rect.y + (pt.y - _this['oldRect'].y) * scaleY;
                });
            }
            if (this.manualAnchors) {
                this.manualAnchors.forEach(function (pt) {
                    pt.x = _this.rect.x + (pt.x - _this['oldRect'].x) * scaleX;
                    pt.y = _this.rect.y + (pt.y - _this['oldRect'].y) * scaleY;
                });
            }
        }
    };
    Node.prototype.translate = function (x, y) {
        this.rect.x += x;
        this.rect.y += y;
        this.rect.ex = this.rect.x + this.rect.width;
        this.rect.ey = this.rect.y + this.rect.height;
        this.rect.calcCenter();
        if (this.animateReady) {
            this.animateReady.translate(x, y);
        }
        if (this.animateFrames && this.animateFrames.length) {
            for (var _i = 0, _a = this.animateFrames; _i < _a.length; _i++) {
                var frame = _a[_i];
                var initState = frame.initState, state = frame.state;
                if (initState && initState.translate) {
                    initState.translate(x, y);
                }
                if (state && state.translate) {
                    state.translate(x, y);
                }
            }
        }
        if (this.points) {
            this.points.forEach(function (pt) {
                pt.x += x;
                pt.y += y;
            });
        }
        if (this.manualAnchors) {
            this.manualAnchors.forEach(function (pt) {
                pt.x += x;
                pt.y += y;
            });
        }
        this.init();
        if (this.children) {
            for (var _b = 0, _c = this.children; _b < _c.length; _b++) {
                var item = _c[_b];
                item.translate(x, y);
            }
        }
    };
    Node.prototype.initRect = function () {
        this.rect.init();
        if (this.children) {
            this.calcChildrenRect();
            for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                var item = _a[_i];
                if (item instanceof Node) {
                    item.initRect();
                }
            }
        }
    };
    Node.prototype.pushPoint = function (pt) {
        var _this = this;
        this.points.push(pt);
        if (!this.rect) {
            this.rect = new rect_Rect(0, 0, 0, 0);
        }
        this.points.forEach(function (p) {
            if (!_this.rect.x || _this.rect.x > p.x) {
                _this.rect.x = p.x;
            }
            if (!_this.rect.y || _this.rect.y > p.y) {
                _this.rect.y = p.y;
            }
            if (_this.rect.ex < p.x) {
                _this.rect.ex = p.x;
            }
            if (_this.rect.ey < p.y) {
                _this.rect.ey = p.y;
            }
        });
        this.rect.width = this.rect.ex - this.rect.x;
        this.rect.height = this.rect.ey - this.rect.y;
    };
    Node.prototype.nearestAnchor = function (pt) {
        var dis = 99999;
        var index = 0;
        for (var i = 0; i < this.rotatedAnchors.length; ++i) {
            var d = distance(pt, this.rotatedAnchors[i]);
            if (dis > d) {
                dis = d;
                index = i;
            }
        }
        return {
            index: index,
            direction: this.rotatedAnchors[index].direction,
        };
    };
    Node.prototype.hitInSelf = function (point, padding) {
        if (padding === void 0) { padding = 0; }
        if (this.rotate % 360 === 0) {
            return this.rect.hit(point, padding);
        }
        var pts = this.rect.toPoints();
        for (var _i = 0, pts_1 = pts; _i < pts_1.length; _i++) {
            var pt = pts_1[_i];
            pt.rotate(this.rotate, this.rect.center);
        }
        return pointInRect(point, pts);
    };
    Node.prototype.hit = function (pt, padding) {
        if (padding === void 0) { padding = 0; }
        var node;
        if (this.hitInSelf(pt, padding)) {
            node = this;
        }
        if (this.children) {
            var len = this.children.length;
            for (var i = len - 1; i > -1; --i) {
                var pen = this.children[i];
                var p = pen.hit(pt, padding);
                if (p) {
                    node = p;
                    break;
                }
            }
        }
        return node;
    };
    Node.prototype.round = function () {
        this.rect.round();
        if (this.children) {
            for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
                var item = _a[_i];
                item.rect.round();
            }
        }
    };
    Node.prototype.clone = function () {
        var n = new Node(this);
        n.setTID(this.TID);
        n.elementRendered = false;
        n.elementLoaded = false;
        if (this.name !== 'div') {
            n.elementId = '';
        }
        return n;
    };
    return Node;
}(pen_Pen));

//# sourceMappingURL=node.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/status.js
var Lock;
(function (Lock) {
    Lock[Lock["None"] = 0] = "None";
    Lock[Lock["Readonly"] = 1] = "Readonly";
    Lock[Lock["NoMove"] = 2] = "NoMove";
    Lock[Lock["NoEvent"] = 10] = "NoEvent";
})(Lock || (Lock = {}));
var AnchorMode;
(function (AnchorMode) {
    AnchorMode[AnchorMode["Default"] = 0] = "Default";
    AnchorMode[AnchorMode["In"] = 1] = "In";
    AnchorMode[AnchorMode["Out"] = 2] = "Out";
})(AnchorMode || (AnchorMode = {}));
//# sourceMappingURL=status.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/dom.js

function createDiv(node) {
    var div = document.createElement('div');
    div.style.position = 'absolute';
    div.style.outline = 'none';
    div.style.left = '-9999px';
    div.style.bottom = '-9999px';
    div.style.width = node.rect.width + 'px';
    div.style.height = node.rect.height + 'px';
    if (node.elementId) {
        div.id = node.elementId;
    }
    return div;
}
function createInput(node) {
    var input = document.createElement('input');
    input.style.position = 'absolute';
    input.style.outline = 'none';
    input.style.left = '-9999px';
    input.style.bottom = '-9999px';
    input.style.width = node.rect.width + 'px';
    input.style.height = node.rect.height + 'px';
    input.style.border = '1px solid #cdcdcd';
    input.classList.add('set-text-input');
    if (node.elementId) {
        input.id = node.elementId;
    }
    return input;
}
function loadJS(url, callback, render) {
    var loaderScript = document.createElement('script');
    loaderScript.type = 'text/javascript';
    loaderScript.src = url;
    loaderScript.addEventListener('load', function () {
        if (callback) {
            callback();
        }
        // how to do
        if (render) {
            le5le_store["Store"].set('LT:render', true);
        }
    });
    document.body.appendChild(loaderScript);
}
//# sourceMappingURL=dom.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/rect.js




/**
 * 不包含画布偏移量
 * */
function getRect(pens) {
    var points = [];
    for (var _i = 0, pens_1 = pens; _i < pens_1.length; _i++) {
        var item = pens_1[_i];
        if (item instanceof node_Node) {
            var pts = item.rect.toPoints();
            if (item.rotate) {
                for (var _a = 0, pts_1 = pts; _a < pts_1.length; _a++) {
                    var pt = pts_1[_a];
                    pt.rotate(item.rotate, item.rect.center);
                }
            }
            points.push.apply(points, pts);
        }
        else if (item instanceof line_Line) {
            if (item.children) {
                item.children.forEach(function (child) {
                    points.push(child.from);
                    points.push(child.to);
                    if (Array.isArray(child.controlPoints)) {
                        points.push.apply(points, child.controlPoints);
                    }
                    if (child.name === 'curve') {
                        for (var i = 0.01; i < 1; i += 0.02) {
                            points.push(getBezierPoint(i, child.from, child.controlPoints[0], child.controlPoints[1], child.to));
                        }
                    }
                });
            }
            else if (item.from) {
                points.push(item.from);
                points.push(item.to);
                if (Array.isArray(item.controlPoints)) {
                    points.push.apply(points, item.controlPoints);
                }
                if (item.name === 'curve') {
                    for (var i = 0.01; i < 1; i += 0.02) {
                        points.push(getBezierPoint(i, item.from, item.controlPoints[0], item.controlPoints[1], item.to));
                    }
                }
            }
        }
    }
    var _b = getBboxOfPoints(points), x1 = _b.x1, y1 = _b.y1, x2 = _b.x2, y2 = _b.y2;
    return new rect_Rect(x1, y1, x2 - x1, y2 - y1);
}
function getBboxOfPoints(points) {
    var x1 = Infinity;
    var y1 = Infinity;
    var x2 = -Infinity;
    var y2 = -Infinity;
    for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
        var item = points_1[_i];
        var x = item.x, y = item.y;
        if (isNaN(x) || isNaN(y))
            continue;
        x1 = Math.min(x1, x);
        y1 = Math.min(y1, y);
        x2 = Math.max(x2, x);
        y2 = Math.max(y2, y);
    }
    return { x1: x1, y1: y1, x2: x2, y2: y2 };
}
function rectInRect(source, target) {
    return !(
    // 括号内表明 在范围外的 四个区域
    source.x > target.ex || source.ex < target.x || source.ey < target.y || source.y > target.ey);
}
/**
 * 合并大小全部传入的 rects
 * */
function getMoreRect() {
    var rects = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        rects[_i] = arguments[_i];
    }
    var rect = new rect_Rect(rects[0].x, rects[0].y, rects[0].width, rects[0].height);
    for (var i = 1; i < rects.length; i++) {
        var currentRect = rects[i];
        if (currentRect) {
            rect.x > currentRect.x && (rect.x = currentRect.x);
            rect.y > currentRect.y && (rect.y = currentRect.y);
            rect.ex < currentRect.ex && (rect.ex = currentRect.ex);
            rect.ey < currentRect.ey && (rect.ey = currentRect.ey);
        }
    }
    return new rect_Rect(rect.x, rect.y, rect.ex - rect.x, rect.ey - rect.y);
}
//# sourceMappingURL=rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/browser.js
function isMobile() {
    return /Android|webOS|iPad|iPhone|iPod|BlackBerry/i.test(navigator.userAgent);
}
//# sourceMappingURL=browser.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/cacheDB.js
function createCacheTable() {
    var request = indexedDB.open('topology-caches'); // 默认版本 1
    request.onupgradeneeded = function (e) {
        // 建表
        var db = e.target.result;
        if (db.objectStoreNames.contains('caches')) {
            db.deleteObjectStore('caches');
        }
        db.createObjectStore('caches', {
            keyPath: 'dbIndex',
        });
    };
    request.onsuccess = function (event) {
        var db = request.result;
        if (!db.objectStoreNames.contains('caches')) {
            return;
        }
        var get = db.transaction(['caches'], 'readwrite').objectStore('caches');
        get.clear(); // 创建表格同时清空
    };
    request.onerror = function (e) {
        console.warn('数据库打开失败' + e);
    };
}
function spliceCache(index) {
    var request = indexedDB.open('topology-caches'); // 默认版本 1
    request.onsuccess = function (event) {
        var db = request.result;
        if (!db.objectStoreNames.contains('caches')) {
            return;
        }
        var get = db.transaction(['caches'], 'readwrite').objectStore('caches');
        get.delete(IDBKeyRange.lowerBound(index));
    };
    request.onupgradeneeded = function (e) {
        // 建表
        var db = e.target.result;
        if (db.objectStoreNames.contains('caches')) {
            db.deleteObjectStore('caches');
        }
        db.createObjectStore('caches', {
            keyPath: 'dbIndex',
        });
    };
}
function pushCache(data, index, length) {
    var request = indexedDB.open('topology-caches'); // 默认版本 1
    request.onsuccess = function (event) {
        var db = request.result;
        if (!db.objectStoreNames.contains('caches')) {
            return;
        }
        var push = db.transaction(['caches'], 'readwrite').objectStore('caches');
        data.dbIndex = index;
        push.add(data);
        var result = push.count();
        result.onsuccess = function () {
            if (result.result > length) {
                // 把最前面的一个扔出去
                push.delete(index - length);
            }
        };
    };
    request.onupgradeneeded = function (e) {
        // 建表
        var db = e.target.result;
        if (db.objectStoreNames.contains('caches')) {
            db.deleteObjectStore('caches');
        }
        db.createObjectStore('caches', {
            keyPath: 'dbIndex',
        });
    };
}
function getCache(index) {
    return new Promise(function (resolve, reject) {
        var request = indexedDB.open('topology-caches'); // 默认版本 1
        request.onsuccess = function (event) {
            var db = request.result;
            if (!db.objectStoreNames.contains('caches')) {
                resolve(null);
                return;
            }
            var objectStore = db.transaction(['caches']).objectStore('caches');
            var get = objectStore.get(index);
            get.onsuccess = function () {
                // undefined 也传出去
                resolve(get.result);
            };
        };
        request.onupgradeneeded = function (e) {
            // 建表
            var db = e.target.result;
            if (db.objectStoreNames.contains('caches')) {
                db.deleteObjectStore('caches');
            }
            db.createObjectStore('caches', {
                keyPath: 'dbIndex',
            });
        };
    });
}
//# sourceMappingURL=cacheDB.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/index.js








//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/data.js






function createData(json, tid) {
    var data = {
        pens: [],
        lineName: 'curve',
        fromArrow: '',
        toArrow: 'triangleSolid',
        scale: 1,
        locked: Lock.None,
        x: 0,
        y: 0,
    };
    if (typeof json === 'string') {
        json = JSON.parse(json);
    }
    data = Object.assign(data, json);
    data.pens = [];
    if (json) {
        // for old data.
        if (json.nodes) {
            for (var _i = 0, _a = json.nodes; _i < _a.length; _i++) {
                var item = _a[_i];
                item.TID = tid;
                data.pens.push(new node_Node(item));
            }
            for (var _b = 0, _c = json.lines; _b < _c.length; _b++) {
                var item = _c[_b];
                item.TID = tid;
                data.pens.push(new line_Line(item));
            }
        }
        // end.
        json.pens && json.pens.forEach(function (item) {
            tid && (item.TID = tid);
            if (!item.type) {
                data.pens.push(new node_Node(item));
            }
            else {
                data.pens.push(new line_Line(item));
            }
        });
        if (json.bkImageRect) {
            data.bkImageRect = new rect_Rect(json.bkImageRect.x, json.bkImageRect.y, json.bkImageRect.width, json.bkImageRect.height);
        }
    }
    if (data.mqttOptions) {
        var opts = '';
        if (typeof data.mqttOptions === 'object') {
            opts = JSON.stringify(data.mqttOptions);
        }
        else {
            opts = data.mqttOptions + '';
        }
        data.mqttOptions = JSON.parse(opts);
    }
    else {
        data.mqttOptions = { clientId: s8() };
    }
    tid && le5le_store["Store"].set(tid + '-topology-data', data);
    return data;
}
//# sourceMappingURL=data.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/layer.js

var layer_Layer = /** @class */ (function () {
    function Layer(TID) {
        var _this = this;
        this.TID = TID;
        this.subcribe = le5le_store["Store"].subscribe(this.generateStoreKey('topology-data'), function (val) {
            _this.data = val;
        });
    }
    Layer.prototype.generateStoreKey = function (key) {
        return this.TID + "-" + key;
    };
    Layer.prototype.destroy = function () {
        this.subcribe.unsubscribe();
    };
    return Layer;
}());

//# sourceMappingURL=layer.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/canvas.js
var canvas_extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();


var canvas_Canvas = /** @class */ (function (_super) {
    canvas_extends(Canvas, _super);
    function Canvas(parentElem, options, TID) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, TID) || this;
        _this.parentElem = parentElem;
        _this.options = options;
        _this.canvas = document.createElement('canvas');
        _this.width = 0;
        _this.height = 0;
        _this.subcribe = le5le_store["Store"].subscribe(_this.generateStoreKey('topology-data'), function (val) {
            _this.data = val;
        });
        _this.canvas.style.position = 'absolute';
        _this.canvas.style.left = '0';
        _this.canvas.style.top = '0';
        _this.canvas.style.outline = 'none';
        if (!Canvas.dpiRatio) {
            if (!options.extDpiRatio && options.extDpiRatio !== 0) {
                if (window && window.devicePixelRatio > 1) {
                    options.extDpiRatio = 0.25;
                }
                else {
                    options.extDpiRatio = 0;
                }
            }
            Canvas.dpiRatio = (window ? window.devicePixelRatio : 0) + options.extDpiRatio;
            if (Canvas.dpiRatio < 1) {
                Canvas.dpiRatio = 1;
            }
        }
        return _this;
    }
    Canvas.prototype.resize = function (size) {
        if (size) {
            this.width = size.width | 0;
            this.height = size.height | 0;
        }
        else {
            if (this.options.width && this.options.width !== 'auto') {
                this.width = +this.options.width;
            }
            else {
                this.width = this.parentElem.clientWidth;
            }
            if (this.options.height && this.options.height !== 'auto') {
                this.height = +this.options.height;
            }
            else {
                this.height = this.parentElem.clientHeight;
            }
        }
        this.canvas.style.width = this.width + 'px';
        this.canvas.style.height = this.height + 'px';
        this.canvas.width = (this.width * Canvas.dpiRatio) | 0;
        this.canvas.height = (this.height * Canvas.dpiRatio) | 0;
        this.canvas.getContext('2d').scale(Canvas.dpiRatio, Canvas.dpiRatio);
        le5le_store["Store"].set(this.generateStoreKey('LT:size'), { width: this.canvas.width, height: this.canvas.height });
    };
    Canvas.prototype.render = function () {
        var ctx = this.canvas.getContext('2d');
        ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
    };
    Canvas.prototype.getDpiRatio = function () {
        return Canvas.dpiRatio;
    };
    Canvas.prototype.destroy = function () {
        this.subcribe.unsubscribe();
    };
    Canvas.dpiRatio = 0;
    return Canvas;
}(layer_Layer));

//# sourceMappingURL=canvas.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/index.js









//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/offscreen.js
var offscreen_extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var offscreen_Offscreen = /** @class */ (function (_super) {
    offscreen_extends(Offscreen, _super);
    function Offscreen(parentElem, options, TID) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, parentElem, options, TID) || this;
        _this.parentElem = parentElem;
        _this.options = options;
        _this.activeLayer = le5le_store["Store"].get(_this.generateStoreKey('LT:ActiveLayer'));
        _this.hoverLayer = le5le_store["Store"].get(_this.generateStoreKey('LT:HoverLayer'));
        _this.animateLayer = le5le_store["Store"].get(_this.generateStoreKey('LT:AnimateLayer'));
        le5le_store["Store"].set(_this.generateStoreKey('LT:offscreen'), _this.canvas);
        return _this;
    }
    Offscreen.prototype.render = function () {
        _super.prototype.render.call(this);
        var ctx = this.canvas.getContext('2d');
        ctx.strokeStyle = this.options.color;
        var canvasRect = new rect_Rect(-this.data.x, -this.data.y, this.width, this.height);
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (!item.getTID()) {
                item.setTID(this.TID);
            }
            // 连线类型没有 rect，必渲染
            if (!rectInRect(item.rect, canvasRect) && item.type === PenType.Node) {
                continue;
            }
            item.render(ctx);
        }
        this.activeLayer.render(ctx);
        this.animateLayer.render(ctx);
        this.hoverLayer.render(ctx);
    };
    return Offscreen;
}(canvas_Canvas));

//# sourceMappingURL=offscreen.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/renderLayer.js
var renderLayer_extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();




var renderLayer_RenderLayer = /** @class */ (function (_super) {
    renderLayer_extends(RenderLayer, _super);
    function RenderLayer(parentElem, options, TID) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, parentElem, options, TID) || this;
        _this.parentElem = parentElem;
        _this.options = options;
        _this.render = function () {
            if (_this.data && _this.data.bkImage && !_this.bkImg) {
                _this.loadBkImg(_this.render);
                return;
            }
            if (!_this.width || !_this.height || !_this.offscreen) {
                return;
            }
            var ctx = _this.canvas.getContext('2d');
            ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height);
            if (_this.data.bkColor || _this.options.bkColor) {
                ctx.fillStyle = _this.data.bkColor || _this.options.bkColor;
                ctx.fillRect(0, 0, _this.width, _this.height);
            }
            if (_this.bkImg && _this.data.bkImageRect) {
                ctx.drawImage(_this.bkImg, _this.data.bkImageRect.x, _this.data.bkImageRect.y, _this.data.bkImageRect.width, _this.data.bkImageRect.height);
            }
            if (_this.data.grid || _this.options.grid) {
                _this.grid();
            }
            if (_this.data.rule || _this.options.rule) {
                _this.rule();
            }
            ctx.drawImage(_this.offscreen, 0, 0, _this.width, _this.height);
        };
        _this.offscreen = le5le_store["Store"].get(_this.generateStoreKey('LT:offscreen'));
        _this.parentElem.appendChild(_this.canvas);
        _this.data = le5le_store["Store"].get(_this.generateStoreKey('topology-data'));
        return _this;
    }
    RenderLayer.prototype.loadBkImg = function (cb) {
        var _this = this;
        if (!this.data.bkImage) {
            return;
        }
        this.bkImg = new Image();
        this.bkImg.crossOrigin = 'anonymous';
        this.bkImg.src = this.data.bkImage;
        this.bkImg.onload = function () {
            if (!_this.data.bkImageRect) {
                _this.data.bkImageRect = new rect_Rect(0, 0, _this.bkImg.naturalWidth, _this.bkImg.naturalHeight);
            }
            if (cb) {
                cb();
            }
        };
    };
    RenderLayer.prototype.clearBkImg = function () {
        this.bkImg = undefined;
    };
    RenderLayer.prototype.rule = function () {
        var ctx = this.canvas.getContext('2d');
        ctx.save();
        ctx.lineWidth = 1;
        ctx.strokeStyle = rgba(0.7, this.data.ruleColor || this.options.ruleColor || '#888');
        ctx.beginPath();
        for (var i = 10; i < this.width; i += 10) {
            ctx.moveTo(i, 0);
            ctx.lineTo(i, 5);
        }
        for (var i = 10; i < this.height; i += 10) {
            ctx.moveTo(0, i);
            ctx.lineTo(5, i);
        }
        ctx.stroke();
        ctx.beginPath();
        ctx.strokeStyle = this.data.ruleColor || this.options.ruleColor || '#888';
        ctx.fillStyle = ctx.strokeStyle;
        for (var i = 100; i < this.width; i += 100) {
            ctx.moveTo(i, 0);
            ctx.lineTo(i, 10);
            ctx.fillText(i.toString(), i + 4, 16);
        }
        for (var i = 100; i < this.height; i += 100) {
            ctx.moveTo(0, i);
            ctx.lineTo(10, i);
        }
        ctx.stroke();
        for (var i = 100; i < this.height; i += 100) {
            ctx.save();
            ctx.beginPath();
            ctx.translate(16, i - 4);
            ctx.rotate((270 * Math.PI) / 180);
            ctx.fillText(i.toString(), 0, 0);
            ctx.restore();
        }
        ctx.restore();
    };
    RenderLayer.prototype.grid = function () {
        var ctx = this.canvas.getContext('2d');
        ctx.save();
        ctx.lineWidth = 1;
        ctx.strokeStyle = this.data.gridColor || this.options.gridColor || '#f3f3f3';
        ctx.beginPath();
        var size = this.data.gridSize || this.options.gridSize;
        for (var i = size; i < this.width; i += size) {
            ctx.moveTo(i, 0);
            ctx.lineTo(i, this.height);
        }
        for (var i = size; i < this.height; i += size) {
            ctx.moveTo(0, i);
            ctx.lineTo(this.width, i);
        }
        ctx.stroke();
        ctx.restore();
    };
    return RenderLayer;
}(canvas_Canvas));

//# sourceMappingURL=renderLayer.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/hoverLayer.js
var hoverLayer_extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





var hoverLayer_HoverLayer = /** @class */ (function (_super) {
    hoverLayer_extends(HoverLayer, _super);
    function HoverLayer(options, TID) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, TID) || this;
        _this.options = options;
        _this.hoverAnchorIndex = -1;
        _this.dockLineX = 0;
        _this.dockLineY = 0;
        le5le_store["Store"].set(_this.generateStoreKey('LT:HoverLayer'), _this);
        return _this;
    }
    HoverLayer.prototype.lineTo = function (to, toArrow) {
        if (toArrow === void 0) { toArrow = 'triangleSolid'; }
        if (!this.line || this.line.locked) {
            return;
        }
        this.line.setTo(to, toArrow);
        if (this.line.from.id || this.line.to.id) {
            this.line.calcControlPoints();
        }
        le5le_store["Store"].set(this.generateStoreKey('pts-') + this.line.id, undefined);
        le5le_store["Store"].set(this.generateStoreKey('LT:updateLines'), [this.line]);
    };
    HoverLayer.prototype.lineFrom = function (from) {
        if (this.line.locked) {
            return;
        }
        this.line.setFrom(from, this.line.fromArrow);
        if (this.line.from.id || this.line.to.id) {
            this.line.calcControlPoints();
        }
        le5le_store["Store"].set(this.generateStoreKey('pts-') + this.line.id, undefined);
        le5le_store["Store"].set(this.generateStoreKey('LT:updateLines'), [this.line]);
    };
    HoverLayer.prototype.render = function (ctx) {
        var _this = this;
        if (this.data.locked === Lock.NoEvent || this.options.hoverColor === 'transparent') {
            return;
        }
        ctx.fillStyle = this.options.hoverColor;
        ctx.save();
        // anchors
        if (this.options.alwaysAnchor) {
            this.data.pens.forEach(function (pen) {
                if (pen.type === PenType.Line) {
                    return;
                }
                if (pen.hideAnchor) {
                    return;
                }
                for (var _i = 0, _a = pen.rotatedAnchors; _i < _a.length; _i++) {
                    var anchor = _a[_i];
                    if (anchor.hidden) {
                        continue;
                    }
                    ctx.beginPath();
                    ctx.arc(anchor.x, anchor.y, anchor.radius || _this.options.anchorRadius, 0, Math.PI * 2);
                    ctx.strokeStyle = anchor.strokeStyle || _this.options.hoverColor;
                    ctx.fillStyle = anchor.fillStyle || _this.options.anchorFillStyle;
                    ctx.fill();
                    ctx.stroke();
                }
                if (_this.options.autoAnchor) {
                    ctx.beginPath();
                    ctx.arc(pen.rect.center.x, pen.rect.center.y, pen.rect.center.radius || _this.options.anchorRadius, 0, Math.PI * 2);
                    ctx.strokeStyle = _this.options.hoverColor;
                    ctx.fillStyle = _this.options.anchorFillStyle;
                    ctx.fill();
                    ctx.stroke();
                }
            });
        }
        ctx.restore();
        if (this.node && !this.data.locked) {
            if (!this.node.getTID()) {
                this.node.setTID(this.TID);
            }
            this.root = this.getRoot(this.node) || this.node;
            if (this.root) {
                ctx.save();
                ctx.strokeStyle = this.options.dragColor;
                ctx.globalAlpha = 0.2;
                if (this.root.rotate) {
                    ctx.translate(this.root.rect.center.x, this.root.rect.center.y);
                    ctx.rotate(((this.root.rotate + this.root.offsetRotate) * Math.PI) / 180);
                    ctx.translate(-this.root.rect.center.x, -this.root.rect.center.y);
                }
                ctx.beginPath();
                ctx.strokeRect(this.root.rect.x, this.root.rect.y, this.root.rect.width, this.root.rect.height);
                ctx.restore();
            }
            if (!this.options.hideAnchor) {
                for (var i = 0; i < this.node.rotatedAnchors.length; ++i) {
                    if (this.node.locked ||
                        this.node.hideAnchor ||
                        (this.node.rotatedAnchors[i].hidden && this.hoverAnchorIndex !== i)) {
                        continue;
                    }
                    ctx.beginPath();
                    ctx.arc(this.node.rotatedAnchors[i].x, this.node.rotatedAnchors[i].y, this.node.rotatedAnchors[i].radius || this.options.anchorRadius, 0, Math.PI * 2);
                    ctx.strokeStyle = this.node.rotatedAnchors[i].strokeStyle || this.options.hoverColor;
                    ctx.fillStyle = this.node.rotatedAnchors[i].fillStyle || this.options.anchorFillStyle;
                    ctx.fill();
                    ctx.stroke();
                }
            }
            if (this.options.autoAnchor) {
                ctx.beginPath();
                ctx.arc(this.node.rect.center.x, this.node.rect.center.y, this.node.rect.center.radius || this.options.anchorRadius, 0, Math.PI * 2);
                ctx.strokeStyle = this.options.hoverColor;
                ctx.fillStyle = this.options.anchorFillStyle;
                ctx.fill();
                ctx.stroke();
            }
        }
        if (this.line && !this.data.locked) {
            this.root = this.getRoot(this.line);
            if (this.root) {
                ctx.save();
                ctx.strokeStyle = this.options.dragColor;
                ctx.globalAlpha = 0.2;
                if (this.root.rotate) {
                    ctx.translate(this.root.rect.center.x, this.root.rect.center.y);
                    ctx.rotate(((this.root.rotate + this.root.offsetRotate) * Math.PI) / 180);
                    ctx.translate(-this.root.rect.center.x, -this.root.rect.center.y);
                }
                ctx.beginPath();
                ctx.strokeRect(this.root.rect.x, this.root.rect.y, this.root.rect.width, this.root.rect.height);
                ctx.restore();
            }
        }
        if (this.dockAnchor) {
            ctx.save();
            ctx.beginPath();
            ctx.arc(this.dockAnchor.x, this.dockAnchor.y, this.dockAnchor.radius || this.options.anchorRadius, 0, Math.PI * 2);
            ctx.strokeStyle = this.options.dockStrokeStyle;
            ctx.fillStyle = this.options.dockFillStyle;
            ctx.fill();
            ctx.stroke();
            ctx.restore();
        }
        if (this.hoverLineCP) {
            ctx.beginPath();
            ctx.arc(this.hoverLineCP.x, this.hoverLineCP.y, 5, 0, Math.PI * 2);
            ctx.fill();
        }
        ctx.strokeStyle = rgba(0.5, this.options.hoverColor);
        ctx.lineWidth = 1;
        if (this.dockLineX > 0) {
            var size = le5le_store["Store"].get(this.generateStoreKey('LT:size'));
            ctx.beginPath();
            ctx.moveTo(this.dockLineX, -this.data.y);
            ctx.lineTo(this.dockLineX, size.height);
            ctx.stroke();
        }
        if (this.dockLineY > 0) {
            var size = le5le_store["Store"].get(this.generateStoreKey('LT:size'));
            ctx.beginPath();
            ctx.moveTo(-this.data.x, this.dockLineY);
            ctx.lineTo(size.width, this.dockLineY);
            ctx.stroke();
        }
        // Select nodes by drag.
        if (this.dragRect) {
            ctx.fillStyle = rgba(0.2, this.options.dragColor);
            ctx.strokeStyle = this.options.dragColor;
            ctx.beginPath();
            ctx.strokeRect(this.dragRect.x, this.dragRect.y, this.dragRect.width, this.dragRect.height);
            ctx.fillRect(this.dragRect.x, this.dragRect.y, this.dragRect.width, this.dragRect.height);
        }
    };
    HoverLayer.prototype.getRoot = function (pen) {
        if (!pen.parentId) {
            return null;
        }
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.id === pen.parentId) {
                var n = this.getRoot(item);
                return n ? n : item;
            }
        }
        return null;
    };
    HoverLayer.prototype.clear = function () {
        this.node = undefined;
        this.line = undefined;
    };
    return HoverLayer;
}(layer_Layer));

//# sourceMappingURL=hoverLayer.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/activeLayer.js
var activeLayer_extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();











var activeLayer_ActiveLayer = /** @class */ (function (_super) {
    activeLayer_extends(ActiveLayer, _super);
    function ActiveLayer(options, TID) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, TID) || this;
        _this.options = options;
        _this.rotateCPs = [];
        _this.sizeCPs = [];
        _this.pens = [];
        _this.rotate = 0;
        _this.lastOffsetX = 0;
        _this.lastOffsetY = 0;
        // 备份初始位置，方便移动事件处理
        _this.initialSizeCPs = [];
        _this.nodeRects = [];
        _this.childrenRects = {};
        _this.childrenRotate = {};
        // nodes移动时，停靠点的参考位置
        _this.dockWatchers = [];
        _this.rotating = false;
        le5le_store["Store"].set(_this.generateStoreKey('LT:ActiveLayer'), _this);
        return _this;
    }
    ActiveLayer.prototype.calcControlPoints = function () {
        if (this.pens.length === 1 && this.pens[0] instanceof node_Node) {
            this.rect = this.pens[0].rect;
            this.sizeCPs = this.pens[0].rect.toPoints();
            this.rotateCPs = [
                new Point(this.pens[0].rect.x + this.pens[0].rect.width / 2, this.pens[0].rect.y - 35),
                new Point(this.pens[0].rect.x + this.pens[0].rect.width / 2, this.pens[0].rect.y),
            ];
            if (this.rotate || this.pens[0].rotate) {
                for (var _i = 0, _a = this.sizeCPs; _i < _a.length; _i++) {
                    var pt = _a[_i];
                    if (this.pens[0].rotate) {
                        pt.rotate(this.pens[0].rotate, this.pens[0].rect.center);
                    }
                    if (this.rotate) {
                        pt.rotate(this.rotate, this.rect.center);
                    }
                }
                for (var _b = 0, _c = this.rotateCPs; _b < _c.length; _b++) {
                    var pt = _c[_b];
                    if (this.pens[0].rotate) {
                        pt.rotate(this.pens[0].rotate, this.pens[0].rect.center);
                    }
                    if (this.rotate) {
                        pt.rotate(this.rotate, this.rect.center);
                    }
                }
            }
            if (this.options.hideRotateCP || this.pens[0].hideRotateCP) {
                this.rotateCPs = [new Point(-1000, -1000), new Point(-1000, -1000)];
            }
            return;
        }
        var _d = getBboxOfPoints(this.getPoints()), x1 = _d.x1, y1 = _d.y1, x2 = _d.x2, y2 = _d.y2;
        this.rect = new rect_Rect(x1, y1, x2 - x1, y2 - y1);
        this.sizeCPs = [
            new Point(x1, y1),
            new Point(x2, y1),
            new Point(x2, y2),
            new Point(x1, y2),
        ];
        this.rotateCPs = [
            new Point(x1 + (x2 - x1) / 2, y1 - 35),
            new Point(x1 + (x2 - x1) / 2, y1),
        ];
        if (this.options.hideRotateCP) {
            this.rotateCPs = [new Point(-1000, -1000), new Point(-1000, -1000)];
        }
    };
    ActiveLayer.prototype.locked = function () {
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (!item.locked) {
                return false;
            }
        }
        return true;
    };
    ActiveLayer.prototype.getPoints = function () {
        var points = [];
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.type === PenType.Node) {
                var pts = item.rect.toPoints();
                if (item.rotate) {
                    for (var _b = 0, pts_1 = pts; _b < pts_1.length; _b++) {
                        var pt = pts_1[_b];
                        pt.rotate(item.rotate, item.rect.center);
                    }
                }
                points.push.apply(points, pts);
            }
            else if (item instanceof line_Line) {
                if (item.children) {
                    item.children.forEach(function (child) {
                        points.push(child.from);
                        points.push(child.to);
                        if (child.name === 'curve') {
                            for (var i = 0.01; i < 1; i += 0.02) {
                                points.push(getBezierPoint(i, child.from, child.controlPoints[0], child.controlPoints[1], child.to));
                            }
                        }
                    });
                }
                else if (item.from) {
                    points.push(item.from);
                    points.push(item.to);
                    if (item.name === 'curve') {
                        for (var i = 0.01; i < 1; i += 0.02) {
                            points.push(getBezierPoint(i, item.from, item.controlPoints[0], item.controlPoints[1], item.to));
                        }
                    }
                }
            }
        }
        return points;
    };
    ActiveLayer.prototype.clear = function () {
        this.pens = [];
        this.sizeCPs = [];
        this.rotateCPs = [];
        le5le_store["Store"].set(this.generateStoreKey('LT:activeNode'), undefined);
    };
    // 即将缩放选中的nodes，备份nodes最初大小，方便缩放比例计算
    ActiveLayer.prototype.saveNodeRects = function () {
        this.nodeRects = [];
        this.childrenRects = {};
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.type && item.from) {
                this.nodeRects.push(new rect_Rect(item.from.x, item.from.y, item.rect.width, item.rect.height));
            }
            else {
                this.nodeRects.push(new rect_Rect(item.rect.x, item.rect.y, item.rect.width, item.rect.height));
            }
            this.saveChildrenRects(item);
        }
        this.initialSizeCPs = [];
        for (var _b = 0, _c = this.sizeCPs; _b < _c.length; _b++) {
            var item = _c[_b];
            this.initialSizeCPs.push(item.clone());
        }
        this.getDockWatchers();
    };
    ActiveLayer.prototype.saveChildrenRects = function (node) {
        if (node.type || !node.children) {
            return;
        }
        for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
            var item = _a[_i];
            this.childrenRects[item.id] = new rect_Rect(item.rect.x, item.rect.y, item.rect.width, item.rect.height);
            this.childrenRotate[item.id] = item.rotate;
            this.saveChildrenRects(item);
        }
    };
    // pt1 - the point of mouse down.
    // pt2 - the point of mouse move.
    ActiveLayer.prototype.resize = function (type, pt1, pt2) {
        var p1 = new Point(pt1.x, pt1.y);
        var p2 = new Point(pt2.x, pt2.y);
        if (this.pens.length === 1 && this.pens[0].rotate % 360) {
            p1.rotate(-this.pens[0].rotate, this.nodeRects[0].center);
            p2.rotate(-this.pens[0].rotate, this.nodeRects[0].center);
        }
        var x = p2.x - p1.x;
        var y = p2.y - p1.y;
        var offsetX = x - this.lastOffsetX;
        var offsetY = y - this.lastOffsetY;
        this.lastOffsetX = x;
        this.lastOffsetY = y;
        var w = this.activeRect.width;
        var h = this.activeRect.height;
        if (pt2.shiftKey) {
            offsetY = (offsetX * h) / w;
        }
        // const lines: Line[] = [];
        switch (type) {
            case 0:
                if (this.activeRect.width - offsetX < 5 || this.activeRect.height - offsetY < 5) {
                    return;
                }
                if (!pt2.shiftKey) {
                    // offsetX = -offsetX;
                    // offsetY = -offsetY;
                    this.activeRect.x += offsetX;
                    this.activeRect.y += offsetY;
                    this.activeRect.width -= offsetX;
                    this.activeRect.height -= offsetY;
                }
                else {
                    offsetX = -offsetX;
                    offsetY = -offsetY;
                    this.activeRect.ex += offsetX;
                    this.activeRect.ey += offsetY;
                    this.activeRect.width += offsetX;
                    this.activeRect.height += offsetY;
                }
                break;
            case 1:
                // offsetY = -offsetY;
                if (this.activeRect.width + offsetX < 5 || this.activeRect.height - offsetY < 5) {
                    return;
                }
                if (!pt2.shiftKey) {
                    this.activeRect.ex += offsetX;
                    this.activeRect.y += offsetY;
                    this.activeRect.width += offsetX;
                    this.activeRect.height -= offsetY;
                }
                else {
                    // offsetX = -offsetX;
                    // offsetY = -offsetY;
                    this.activeRect.ex += offsetX;
                    this.activeRect.ey += offsetY;
                    this.activeRect.width += offsetX;
                    this.activeRect.height += offsetY;
                }
                break;
            case 2:
                if (this.activeRect.width + offsetX < 5 || this.activeRect.height + offsetY < 5) {
                    return;
                }
                this.activeRect.ex += offsetX;
                this.activeRect.ey += offsetY;
                this.activeRect.width += offsetX;
                this.activeRect.height += offsetY;
                break;
            case 3:
                // offsetX = -offsetX;
                if (this.activeRect.width - offsetX < 5 || this.activeRect.height + offsetY < 5) {
                    return;
                }
                if (!pt2.shiftKey) {
                    this.activeRect.x += offsetX;
                    this.activeRect.ey += offsetY;
                    this.activeRect.width -= offsetX;
                    this.activeRect.height += offsetY;
                }
                else {
                    offsetX = -offsetX;
                    offsetY = -offsetY;
                    this.activeRect.ex += offsetX;
                    this.activeRect.ey += offsetY;
                    this.activeRect.width += offsetX;
                    this.activeRect.height += offsetY;
                }
                break;
        }
        var scaleX = this.activeRect.width / w;
        var scaleY = this.activeRect.height / h;
        // let i = 0;
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.locked) {
                continue;
            }
            switch (item.type) {
                case PenType.Line:
                    break;
                default:
                    item['oldRect'] = item.rect.clone();
                    if (!this.options.disableSizeX &&
                        !pt2.ctrlKey &&
                        !item.disableSizeX) {
                        // item.rect.width = this.nodeRects[i].width + offsetX;
                        item.rect.width *= scaleX;
                        if (item.imageWidth) {
                            item.imageWidth *= scaleX;
                        }
                    }
                    if (!this.options.disableSizeY &&
                        !pt2.altKey &&
                        !item.disableSizeY) {
                        // item.rect.height = this.nodeRects[i].height + offsetY;
                        item.rect.height *= scaleY;
                        if (item.imageHeight) {
                            item.imageHeight *= scaleY;
                        }
                    }
                    if ((!this.options.disableSizeX &&
                        pt2.shiftKey &&
                        !item.disableSizeX) ||
                        (!this.options.disableSizeY &&
                            pt2.shiftKey &&
                            !item.disableSizeY)) {
                        // item.rect.width = this.nodeRects[i].width + offsetX;
                        // item.rect.height = this.nodeRects[i].height + offsetY;
                        item.rect.width *= scaleX;
                        item.rect.height *= scaleY;
                        if (item.imageWidth) {
                            item.imageWidth *= scaleX;
                        }
                        if (item.imageHeight) {
                            item.imageHeight *= scaleY;
                        }
                    }
                    switch (type) {
                        case 0:
                            item.rect.x = item.rect.ex - item.rect.width;
                            item.rect.y = item.rect.ey - item.rect.height;
                            break;
                        case 1:
                            item.rect.ex = item.rect.x + item.rect.width;
                            item.rect.y = item.rect.ey - item.rect.height;
                            break;
                        case 2:
                            item.rect.ex = item.rect.x + item.rect.width;
                            item.rect.ey = item.rect.y + item.rect.height;
                            break;
                        case 3:
                            item.rect.x = item.rect.ex - item.rect.width;
                            item.rect.ey = item.rect.y + item.rect.height;
                            break;
                    }
                    item.scalePoints();
                    item.rect.calcCenter();
                    item.init();
                    item.calcChildrenRect();
                    break;
            }
            if (item.parentId) {
                var parent_1 = void 0;
                for (var _b = 0, _c = this.data.pens; _b < _c.length; _b++) {
                    var n = _c[_b];
                    if (n.id === item.parentId) {
                        parent_1 = n;
                        item.calcRectInParent(parent_1);
                        break;
                    }
                }
            }
            // ++i;
        }
        this.updateLines();
    };
    ActiveLayer.prototype.move = function (x, y) {
        if (this.nodeRects.length !== this.pens.length) {
            return;
        }
        var i = 0;
        var _loop_1 = function (item) {
            if (item.locked) {
                return "continue";
            }
            if (item instanceof node_Node) {
                var offsetX = this_1.nodeRects[i].x + x - item.rect.x;
                var offsetY = this_1.nodeRects[i].y + y - item.rect.y;
                item.translate(offsetX, offsetY);
                var lines = this_1.getLinesOfNode(item);
                for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
                    var line = lines_1[_i];
                    line.translate(offsetX, offsetY);
                }
                item.calcChildrenRect();
                if (item.parentId && !item.locked) {
                    var parent_2 = void 0;
                    for (var _a = 0, _b = this_1.data.pens; _a < _b.length; _a++) {
                        var n = _b[_a];
                        if (n.id === item.parentId) {
                            parent_2 = n;
                            item.calcRectInParent(parent_2);
                            break;
                        }
                    }
                }
            }
            if (item instanceof line_Line && item.from) {
                var offsetX_1 = this_1.nodeRects[i].x + x - item.from.x;
                var offsetY_1 = this_1.nodeRects[i].y + y - item.from.y;
                if (item.parentId) {
                    var items = find(item.parentId, this_1.data.pens);
                    items.forEach(function (l) {
                        l.translate(offsetX_1, offsetY_1);
                    });
                }
                else {
                    item.translate(offsetX_1, offsetY_1);
                }
            }
            ++i;
        };
        var this_1 = this;
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            _loop_1(item);
        }
        this.updateLines();
        this.topology.dispatch('move', this.pens);
    };
    ActiveLayer.prototype.getLinesOfNode = function (node) {
        var result = [];
        var nodesLines = flatNodes([node]);
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var pen = _a[_i];
            if (!(pen instanceof line_Line)) {
                continue;
            }
            var line = pen;
            var fromIn = false;
            var toIn = false;
            for (var _b = 0, _c = nodesLines.nodes; _b < _c.length; _b++) {
                var item = _c[_b];
                if (line.from && line.from.id === item.id) {
                    fromIn = true;
                }
                if (line.to && line.to.id === item.id) {
                    toIn = true;
                }
            }
            if (fromIn && toIn) {
                result.push(line);
            }
        }
        return result;
    };
    ActiveLayer.prototype.updateLines = function (pens) {
        if (!pens) {
            pens = this.pens;
        }
        var allPens = flatNodes(this.data.pens);
        var allLines = allPens.lines;
        var nodes = allPens.nodes;
        if (!this.options.autoAnchor) { // 非自动瞄点，只要活动层的 nodes
            nodes = flatNodes(pens).nodes;
        }
        var lines = [];
        for (var _i = 0, allLines_1 = allLines; _i < allLines_1.length; _i++) {
            var line = allLines_1[_i];
            for (var _a = 0, nodes_1 = nodes; _a < nodes_1.length; _a++) {
                var item = nodes_1[_a];
                var cnt = 0;
                if (line.from && line.from.id === item.id) {
                    if (line.from.autoAnchor) {
                        var autoAnchor = item.nearestAnchor(line.to);
                        if (autoAnchor.index > -1) {
                            line.from.anchorIndex = autoAnchor.index;
                            line.from.direction = autoAnchor.direction;
                        }
                    }
                    if (line.from.anchorIndex >= 0) {
                        line.from.x = item.rotatedAnchors[line.from.anchorIndex].x;
                        line.from.y = item.rotatedAnchors[line.from.anchorIndex].y;
                        ++cnt;
                    }
                }
                if (line.to && line.to.id === item.id) {
                    if (line.to.autoAnchor) {
                        var autoAnchor = item.nearestAnchor(line.from);
                        if (autoAnchor.index > -1) {
                            line.to.anchorIndex = autoAnchor.index;
                            line.to.direction = autoAnchor.direction;
                        }
                    }
                    if (line.to.anchorIndex >= 0) {
                        line.to.x = item.rotatedAnchors[line.to.anchorIndex].x;
                        line.to.y = item.rotatedAnchors[line.to.anchorIndex].y;
                        ++cnt;
                    }
                }
                if (cnt && !this.data.manualCps) {
                    line.calcControlPoints();
                }
                line.textRect = undefined;
                le5le_store["Store"].set(this.generateStoreKey('pts-') + line.id, undefined);
                lines.push(line);
            }
        }
        le5le_store["Store"].set(this.generateStoreKey('LT:updateLines'), lines);
    };
    ActiveLayer.prototype.offsetRotate = function (angle) {
        this.rotating = true;
        var i = 0;
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (!(item instanceof node_Node)) {
                continue;
            }
            var center = this.nodeRects[i].center.clone();
            if (this.pens.length > 1) {
                center.rotate(angle, this.rect.center);
            }
            item.rect.x = center.x - item.rect.width / 2;
            item.rect.y = center.y - item.rect.height / 2;
            item.rect.ex = item.rect.x + item.rect.width;
            item.rect.ey = item.rect.y + item.rect.height;
            item.rect.calcCenter();
            item.init();
            item.offsetRotate = angle;
            item.calcRotateAnchors(item.rotate + item.offsetRotate);
            this.rotateChildren(item);
            ++i;
        }
        this.rotate = angle;
        this.topology.dispatch('rotated', this.pens);
    };
    ActiveLayer.prototype.rotateChildren = function (node) {
        if (node.type !== PenType.Node || !node.children) {
            return;
        }
        for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.type !== PenType.Node) {
                continue;
            }
            var oldCenter = this.childrenRects[item.id].center.clone();
            var newCenter = this.childrenRects[item.id].center
                .clone()
                .rotate(this.rotate, this.rect.center);
            var rect = this.childrenRects[item.id].clone();
            rect.translate(newCenter.x - oldCenter.x, newCenter.y - oldCenter.y);
            item.rect = rect;
            item.rotate = this.childrenRotate[item.id] + this.rotate;
            item.init();
            this.rotateChildren(item);
        }
    };
    ActiveLayer.prototype.updateRotate = function () {
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            item.rotate += item.offsetRotate;
            if (item.type === PenType.Node && item.rectInParent) {
                item.rectInParent.rotate += item.offsetRotate;
            }
            item.offsetRotate = 0;
        }
        this.rotate = 0;
        this.rotating = false;
    };
    ActiveLayer.prototype.add = function (pen) {
        if (this.has(pen)) {
            return;
        }
        this.pens.push(pen);
        if (pen instanceof node_Node) {
            le5le_store["Store"].set(this.generateStoreKey('LT:activeNode'), pen);
        }
    };
    ActiveLayer.prototype.setPens = function (pens) {
        this.pens = pens;
        if (this.pens.length === 1 && this.pens[0] instanceof node_Node) {
            le5le_store["Store"].set(this.generateStoreKey('LT:activeNode'), this.pens[0]);
        }
    };
    ActiveLayer.prototype.has = function (pen) {
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.id === pen.id) {
                return true;
            }
        }
        return false;
    };
    ActiveLayer.prototype.hasInAll = function (pen, pens) {
        if (!pens) {
            pens = this.pens;
        }
        for (var _i = 0, pens_1 = pens; _i < pens_1.length; _i++) {
            var item = pens_1[_i];
            if (item.id === pen.id) {
                return true;
            }
            if (item.children) {
                var has = this.hasInAll(pen, item.children);
                if (has) {
                    return true;
                }
            }
        }
        return false;
    };
    ActiveLayer.prototype.render = function (ctx) {
        var _this = this;
        if (this.data.locked > Lock.Readonly ||
            this.options.activeColor === 'transparent') {
            return;
        }
        if (!this.pens.length) {
            return;
        }
        this.pens.forEach(function (pen) {
            if (!pen.getTID()) {
                pen.setTID(_this.TID);
            }
        });
        if (this.pens.length === 1 || !this.rotating) {
            this.calcControlPoints();
        }
        ctx.save();
        ctx.strokeStyle = this.options.activeColor;
        ctx.fillStyle = '#fff';
        ctx.lineWidth = 1;
        var TID = this.TID;
        var scale = le5le_store["Store"].get(this.generateStoreKey('LT:scale')) || 1;
        for (var _i = 0, _a = this.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (this.data.locked && item instanceof node_Node) {
                var tmp = new node_Node(item);
                tmp.setTID(TID);
                tmp.data = undefined;
                tmp.fillStyle = undefined;
                tmp.bkType = 0;
                tmp.icon = '';
                tmp.image = '';
                tmp.text = '';
                if (tmp.strokeStyle !== 'transparent') {
                    tmp.strokeStyle = '#ffffff';
                    tmp.lineWidth += 2;
                    tmp.render(ctx);
                    tmp.strokeStyle = this.options.activeColor;
                    tmp.lineWidth -= 2;
                }
                tmp.render(ctx);
            }
            if (item instanceof line_Line) {
                var tmp = new line_Line(item);
                tmp.lineWidth *= 2;
                tmp.toArrowSize =
                    (tmp.toArrowSize * scale - 1.5 * tmp.lineWidth) / scale;
                tmp.fromArrowSize =
                    (tmp.fromArrowSize * scale - 1.5 * tmp.lineWidth) / scale;
                tmp.setTID(TID);
                tmp.strokeStyle = rgba(0.2, this.options.activeColor);
                tmp.borderWidth = 4;
                tmp.borderColor = rgba(0.1, this.options.activeColor);
                tmp.fromArrowColor = this.options.activeColor;
                tmp.toArrowColor = this.options.activeColor;
                tmp.render(ctx);
                if (!this.data.locked && !item.locked) {
                    drawLineFns[item.name] &&
                        drawLineFns[item.name].drawControlPointsFn(ctx, item);
                }
            }
        }
        if (this.pens.length === 1 && this.pens[0].type === PenType.Line) {
            ctx.restore(); // 对应前面的 save() , 保持状态一致
            return;
        }
        // This is diffence between single node and more.
        if (this.rotate && this.pens.length > 1) {
            ctx.translate(this.rect.center.x, this.rect.center.y);
            ctx.rotate((this.rotate * Math.PI) / 180);
            ctx.translate(-this.rect.center.x, -this.rect.center.y);
        }
        if (this.data.locked || this.locked()) {
            ctx.restore();
            return;
        }
        // Occupied territory.
        ctx.save();
        ctx.globalAlpha = 0.3;
        ctx.translate(0.5, 0.5);
        ctx.beginPath();
        ctx.moveTo(this.sizeCPs[0].x, this.sizeCPs[0].y);
        ctx.lineTo(this.sizeCPs[1].x, this.sizeCPs[1].y);
        ctx.lineTo(this.sizeCPs[2].x, this.sizeCPs[2].y);
        ctx.lineTo(this.sizeCPs[3].x, this.sizeCPs[3].y);
        ctx.closePath();
        ctx.stroke();
        ctx.restore();
        // Draw rotate control point.
        ctx.beginPath();
        ctx.moveTo(this.rotateCPs[0].x, this.rotateCPs[0].y);
        ctx.lineTo(this.rotateCPs[1].x, this.rotateCPs[1].y);
        ctx.stroke();
        ctx.beginPath();
        ctx.arc(this.rotateCPs[0].x, this.rotateCPs[0].y, 5, 0, Math.PI * 2);
        ctx.fill();
        ctx.stroke();
        // Draw size control points.
        if (!this.options.hideSizeCP &&
            (this.pens.length > 1 || !this.pens[0].hideSizeCP)) {
            ctx.lineWidth = 1;
            for (var _b = 0, _c = this.sizeCPs; _b < _c.length; _b++) {
                var item = _c[_b];
                ctx.save();
                ctx.beginPath();
                if (this.pens.length === 1 && (this.pens[0].rotate || this.rotate)) {
                    ctx.translate(item.x, item.y);
                    ctx.rotate(((this.pens[0].rotate + this.rotate) * Math.PI) / 180);
                    ctx.translate(-item.x, -item.y);
                }
                ctx.fillRect(item.x - 4.5, item.y - 4.5, 8, 8);
                ctx.strokeRect(item.x - 5.5, item.y - 5.5, 10, 10);
                ctx.restore();
            }
        }
        ctx.restore();
    };
    ActiveLayer.prototype.calcActiveRect = function () {
        if (this.pens.length === 1) {
            if (this.pens[0].rect.height === 0) {
                // 处理直线这种高度为0的情况
                this.pens[0].rect.height = 1;
            }
            this.activeRect = deepClone(this.pens[0].rect);
        }
        else {
            this.activeRect = getRect(this.pens);
        }
    };
    ActiveLayer.prototype.getDockWatchers = function () {
        if (this.pens.length === 1) {
            this.dockWatchers = this.nodeRects[0].toPoints();
            this.dockWatchers.unshift(this.nodeRects[0].center);
            return;
        }
        if (!this.rect) {
            return;
        }
        this.dockWatchers = this.rect.toPoints();
        this.dockWatchers.unshift(this.rect.center);
    };
    return ActiveLayer;
}(layer_Layer));

//# sourceMappingURL=activeLayer.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/animateLayer.js
var animateLayer_extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();







var animateLayer_AnimateLayer = /** @class */ (function (_super) {
    animateLayer_extends(AnimateLayer, _super);
    function AnimateLayer(options, TID) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, TID) || this;
        _this.options = options;
        _this.pens = new Map();
        _this.lastNow = 0;
        le5le_store["Store"].set(_this.generateStoreKey('LT:AnimateLayer'), _this);
        if (!_this.options.animateColor) {
            _this.options.animateColor = '#ff6600';
        }
        _this.subscribeUpdate = le5le_store["Store"].subscribe(_this.generateStoreKey('LT:updateLines'), function (lines) {
            _this.updateLines(lines);
        });
        _this.subscribePlay = le5le_store["Store"].subscribe(_this.generateStoreKey('LT:AnimatePlay'), function (params) {
            if (params.stop) {
                if (params.tag) {
                    var pens = find(params.tag, _this.data.pens);
                    pens.forEach(function (item) {
                        if (_this.pens.has(item.id)) {
                            _this.pens.get(item.id).animateStart = 0;
                        }
                    });
                }
                if (params.pen && _this.pens.has(params.pen.id)) {
                    _this.pens.get(params.pen.id).animateStart = 0;
                }
            }
            else {
                if (params.pen) {
                    if (_this.pens.has(params.pen.id)) {
                        _this.pens.get(params.pen.id).animateStart = Date.now();
                    }
                    else {
                        if (params.pen.type) {
                            _this.pens.set(params.pen.id, _this.getAnimateLine(params.pen));
                        }
                        else {
                            _this.pens.set(params.pen.id, params.pen);
                        }
                    }
                }
                if (params.tag) {
                    _this.readyPlay(params.tag, false);
                }
            }
            _this.animate();
        });
        return _this;
    }
    AnimateLayer.prototype.getAnimateLine = function (item) {
        var l = new line_Line(item);
        l.data = l.id;
        l.id = s8();
        l.setTID(this.TID);
        l.isAnimate = true;
        l.toArrow = '';
        if (l.fromArrow && l.fromArrow.indexOf('line') < 0) {
            l.animateFromSize = l.fromArrowSize + l.lineWidth * 5;
        }
        if (l.toArrow && l.toArrow.indexOf('line') < 0) {
            l.animateToSize = l.toArrowSize + l.lineWidth * 5;
        }
        l.animateStart = item.animateStart;
        l.lineCap = 'round';
        l.fillStyle = '#fff';
        l.strokeStyle = l.animateColor || this.options.animateColor;
        l.length = l.getLen();
        if (!l.fromArrowColor) {
            l.fromArrowColor = l.strokeStyle || le5le_store["Store"].get(this.generateStoreKey('LT:color'));
        }
        if (!l.toArrowColor) {
            l.toArrowColor = l.strokeStyle || le5le_store["Store"].get(this.generateStoreKey('LT:color'));
        }
        return l;
    };
    AnimateLayer.prototype.findLine = function (pen) {
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.id === pen.data) {
                return item;
            }
        }
    };
    AnimateLayer.prototype.readyPlay = function (tag, auto, pens) {
        var _this = this;
        var readyPens = new Map();
        if (!pens) {
            pens = this.data.pens;
        }
        pens.forEach(function (pen) {
            pen.setTID(_this.TID);
            if (!pen.visible || readyPens.get(pen.id)) {
                return;
            }
            if ((auto && pen.animatePlay) || (tag && pen.tags.indexOf(tag) > -1)) {
                if (!pen.animateStart || pen.animateStart < 1) {
                    pen.animateStart = Date.now();
                }
            }
            if (pen instanceof node_Node) {
                if (pen.animateStart > 0) {
                    if (!pen.animateReady) {
                        pen.initAnimate();
                    }
                    readyPens.set(pen.id, pen);
                }
                if (pen.children && pen.children.length) {
                    _this.readyPlay(tag, auto, pen.children);
                }
            }
            else {
                if (pen.animateStart > 0) {
                    readyPens.set(pen.id, _this.getAnimateLine(pen));
                }
                else if (_this.pens.has(pen.id)) {
                    _this.pens.get(pen.id).animateStart = 0;
                }
            }
        });
        readyPens.forEach(function (pen) {
            if (pen.type) {
                _this.pens.set(pen.data, pen);
            }
            else {
                _this.pens.set(pen.id, pen);
            }
        });
    };
    AnimateLayer.prototype.animate = function () {
        var _this = this;
        if (this.timer) {
            cancelAnimationFrame(this.timer);
        }
        this.timer = requestAnimationFrame(function () {
            var now = Date.now();
            if (now - _this.lastNow < _this.options.refresh) {
                _this.animate();
                return;
            }
            _this.lastNow = now;
            var animated = false;
            _this.pens.forEach(function (pen) {
                if (!pen.animateStart || pen.animateStart < 1) {
                    if (pen.type) {
                        _this.pens.delete(pen.data);
                        var line = _this.findLine(pen);
                        if (line) {
                            line.animateStart = 0;
                            line.animatePos = pen.animatePos;
                        }
                    }
                    else {
                        _this.pens.delete(pen.id);
                    }
                    return;
                }
                if (pen.animateStart > now) {
                    return;
                }
                if (pen.animateFn) {
                    if (typeof pen.animateFn === 'function') {
                        pen.animateFn();
                    }
                    else if (window && window[pen.animateFn]) {
                        window[pen.animateFn]();
                    }
                    else {
                        // pen.render();
                    }
                }
                else {
                    pen.animate(now);
                }
                if (pen.animateStart < 1) {
                    if (pen.type) {
                        _this.pens.delete(pen.data);
                    }
                    else {
                        _this.pens.delete(pen.id);
                    }
                    if (pen.type === PenType.Line) {
                        var line = _this.findLine(pen);
                        if (line) {
                            line.animateStart = 0;
                            line.animatePos = pen.animatePos;
                        }
                    }
                    if (pen.nextAnimate) {
                        _this.readyPlay(pen.nextAnimate, false);
                    }
                }
                animated = true;
            });
            if (animated) {
                le5le_store["Store"].set(_this.generateStoreKey('LT:render'), true);
                _this.animate();
            }
        });
    };
    AnimateLayer.prototype.updateLines = function (lines) {
        this.pens.forEach(function (line, key) {
            if (!(line instanceof line_Line)) {
                return;
            }
            for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
                var item = lines_1[_i];
                if (line.data === item.id) {
                    line.from = item.from;
                    line.to = item.to;
                    line.controlPoints = item.controlPoints;
                    line.length = line.getLen();
                }
            }
        });
    };
    AnimateLayer.prototype.render = function (ctx) {
        var _this = this;
        this.pens.forEach(function (line, key) {
            if (line.visible && line instanceof line_Line) {
                if (!line.getTID()) {
                    line.setTID(_this.TID);
                }
                line.render(ctx);
            }
        });
    };
    AnimateLayer.prototype.stop = function () {
        this.pens.clear();
        if (this.timer) {
            cancelAnimationFrame(this.timer);
            this.timer = null;
        }
    };
    AnimateLayer.prototype.destroy = function () {
        this.stop();
        this.subscribeUpdate.unsubscribe();
        this.subscribePlay.unsubscribe();
    };
    return AnimateLayer;
}(layer_Layer));

//# sourceMappingURL=animateLayer.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/divLayer.js
var divLayer_extends = (undefined && undefined.__extends) || (function () {
    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 (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();





var videos = {};
var divLayer_DivLayer = /** @class */ (function (_super) {
    divLayer_extends(DivLayer, _super);
    function DivLayer(parentElem, options, TID) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, TID) || this;
        _this.parentElem = parentElem;
        _this.options = options;
        _this.canvas = document.createElement('div');
        _this.player = document.createElement('div');
        _this.audios = {};
        _this.iframes = {};
        _this.elements = {};
        _this.gifs = {};
        _this.addDiv = function (node) {
            if (node.audio) {
                if (_this.audios[node.id] && _this.audios[node.id].media.src !== node.audio) {
                    _this.audios[node.id].media.src = node.audio;
                }
                setTimeout(function () {
                    _this.setElemPosition(node, (_this.audios[node.id] && _this.audios[node.id].player) || _this.addMedia(node, 'audio'));
                });
            }
            if (node.video) {
                if (videos[node.id] && videos[node.id].media.src !== node.video) {
                    videos[node.id].media.src = node.video;
                }
                setTimeout(function () {
                    _this.setElemPosition(node, (videos[node.id] && videos[node.id].player) || _this.addMedia(node, 'video'));
                });
            }
            if (node.iframe) {
                if (!_this.iframes[node.id]) {
                    _this.addIframe(node);
                    setTimeout(function () {
                        _this.addDiv(node);
                    });
                }
                else {
                    if (_this.iframes[node.id].src !== node.iframe) {
                        _this.iframes[node.id].src = node.iframe;
                    }
                    _this.setElemPosition(node, _this.iframes[node.id]);
                }
            }
            if (node.elementId) {
                if (!_this.elements[node.id]) {
                    _this.elements[node.id] = document.getElementById(node.elementId);
                    if (_this.elements[node.id]) {
                        _this.canvas.appendChild(_this.elements[node.id]);
                    }
                }
                _this.setElemPosition(node, _this.elements[node.id]);
            }
            if (node.gif) {
                if (node.image.indexOf('.gif') < 0) {
                    node.gif = false;
                    _this.canvas.removeChild(_this.gifs[node.id]);
                    _this.gifs[node.id] = undefined;
                }
                else if (node.img) {
                    if (_this.gifs[node.id] && _this.gifs[node.id].src !== node.image) {
                        _this.gifs[node.id].src = node.image;
                    }
                    _this.setElemPosition(node, _this.gifs[node.id] || _this.addGif(node));
                }
            }
            if (node.children) {
                for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
                    var child = _a[_i];
                    if (child.type === PenType.Line) {
                        continue;
                    }
                    _this.addDiv(child);
                }
            }
        };
        _this.createPlayer = function () {
            _this.player.style.position = 'fixed';
            _this.player.style.outline = 'none';
            _this.player.style.top = '-99999px';
            _this.player.style.height = '40px';
            _this.player.style.padding = '10px 15px';
            _this.player.style.background = 'rgba(200,200,200,.1)';
            _this.player.style.display = 'flex';
            _this.player.style.alignItems = 'center';
            _this.player.style.userSelect = 'initial';
            _this.player.style.pointerEvents = 'initial';
            _this.player.style.zIndex = '1';
            _this.playBtn = document.createElement('i');
            _this.currentTime = document.createElement('span');
            _this.progress = document.createElement('div');
            _this.progressCurrent = document.createElement('div');
            _this.loop = document.createElement('i');
            var fullScreen = document.createElement('i');
            _this.playBtn.className = _this.options.playIcon;
            _this.playBtn.style.fontSize = '18px';
            _this.playBtn.style.lineHeight = '20px';
            _this.playBtn.style.cursor = 'pointer';
            _this.currentTime.style.padding = '0 10px';
            _this.currentTime.innerText = '0 / 0';
            _this.progress.style.position = 'relative';
            _this.progress.style.flexGrow = '1';
            _this.progress.style.top = '0';
            _this.progress.style.height = '4px';
            _this.progress.style.background = '#ccc';
            _this.progress.style.borderRadius = '2px';
            _this.progress.style.overflow = 'hidden';
            _this.progress.style.cursor = 'pointer';
            _this.progressCurrent.style.position = 'absolute';
            _this.progressCurrent.style.left = '0';
            _this.progressCurrent.style.top = '0';
            _this.progressCurrent.style.bottom = '0';
            _this.progressCurrent.style.width = '0';
            _this.progressCurrent.style.background = '#52c41a';
            _this.loop.style.margin = '0 10px';
            _this.loop.style.padding = '2px 5px';
            _this.loop.style.borderRadius = '2px';
            _this.loop.className = _this.options.loopIcon;
            _this.loop.style.fontSize = '18px';
            _this.loop.style.lineHeight = '20px';
            _this.loop.style.cursor = 'pointer';
            fullScreen.className = _this.options.fullScreenIcon;
            fullScreen.style.fontSize = '17px';
            fullScreen.style.lineHeight = '20px';
            fullScreen.style.cursor = 'pointer';
            _this.player.appendChild(_this.playBtn);
            _this.player.appendChild(_this.currentTime);
            _this.player.appendChild(_this.progress);
            _this.progress.appendChild(_this.progressCurrent);
            _this.player.appendChild(_this.loop);
            _this.player.appendChild(fullScreen);
            _this.playBtn.onclick = function () {
                if (_this.media.paused) {
                    _this.media.play();
                    _this.playBtn.className = _this.options.pauseIcon;
                }
                else {
                    _this.media.pause();
                    _this.playBtn.className = _this.options.playIcon;
                }
            };
            _this.progress.onclick = function (e) {
                _this.media.currentTime = (e.offsetX / _this.progress.clientWidth) * _this.media.duration;
            };
            _this.loop.onclick = function () {
                _this.media.loop = !_this.media.loop;
                _this.curNode.playLoop = _this.media.loop;
                if (_this.media.loop) {
                    _this.loop.style.background = '#ddd';
                }
                else {
                    _this.loop.style.background = 'none';
                }
            };
            fullScreen.onclick = function () {
                _this.media.requestFullscreen();
            };
        };
        _this.getMediaCurrent = function () {
            if (!_this.media) {
                return;
            }
            _this.currentTime.innerText =
                _this.formatSeconds(_this.media.currentTime) + ' / ' + _this.formatSeconds(_this.media.duration);
            _this.progressCurrent.style.width =
                (_this.media.currentTime / _this.media.duration) * _this.progress.clientWidth + 'px';
        };
        _this.addMedia = function (node, type) {
            var player = document.createElement('div');
            var current = document.createElement('div');
            var media = document.createElement(type);
            player.id = node.id;
            current.style.position = 'absolute';
            current.style.outline = 'none';
            current.style.left = '0';
            current.style.bottom = '0';
            current.style.height = '2px';
            current.style.background = '#52c41a';
            media.style.position = 'absolute';
            media.style.outline = 'none';
            media.style.left = '0';
            media.style.right = '0';
            media.style.top = '0';
            media.style.bottom = '0';
            if (type === 'video') {
                media.style.width = node.rect.width + 'px';
                media.style.height = node.rect.height + 'px';
            }
            player.style.background = 'transparent';
            if (node.playType === 1) {
                media.autoplay = true;
            }
            media.loop = node.playLoop;
            media.ontimeupdate = function () {
                current.style.width = (media.currentTime / media.duration) * node.rect.width + 'px';
                _this.getMediaCurrent();
                if (_this.media === media) {
                    if (node.playLoop) {
                        media.loop = true;
                        _this.loop.style.background = '#ddd';
                    }
                    else {
                        media.loop = false;
                        _this.loop.style.background = 'none';
                    }
                }
            };
            media.onended = function () {
                le5le_store["Store"].set(_this.generateStoreKey('mediaEnd'), node);
                if (_this.media === media) {
                    _this.playBtn.className = _this.options.playIcon;
                }
                _this.play(node.nextPlay);
            };
            media.onloadedmetadata = function () {
                _this.getMediaCurrent();
            };
            media.src = node[type];
            player.appendChild(media);
            player.appendChild(current);
            if (type === 'video') {
                videos[node.id] = {
                    player: player,
                    current: current,
                    media: media,
                };
            }
            else {
                _this.audios[node.id] = {
                    player: player,
                    current: current,
                    media: media,
                };
            }
            _this.canvas.appendChild(player);
            return player;
        };
        _this.setElemPosition = function (node, elem) {
            if (!elem) {
                return;
            }
            elem.style.position = 'absolute';
            elem.style.outline = 'none';
            elem.style.left = node.rect.x + _this.data.x + 'px';
            elem.style.top = node.rect.y + _this.data.y + 'px';
            elem.style.width = node.rect.width + 'px';
            elem.style.height = node.rect.height + 'px';
            elem.style.display = node.visible ? 'inline' : 'none'; // 是否隐藏元素
            if (node.rotate || node.offsetRotate) {
                elem.style.transform = "rotate(" + (node.rotate + node.offsetRotate) + "deg)";
            }
            if (node.video && videos[node.id] && videos[node.id].media) {
                videos[node.id].media.style.width = '100%';
                videos[node.id].media.style.height = '100%';
            }
            if (_this.data.locked > Lock.None || node.locked > Lock.None) {
                elem.style.userSelect = 'initial';
                elem.style.pointerEvents = 'initial';
            }
            else {
                elem.style.userSelect = 'none';
                elem.style.pointerEvents = 'none';
            }
        };
        _this.removeDiv = function (item) {
            if (_this.curNode && item.id === _this.curNode.id) {
                _this.curNode = undefined;
                _this.media = undefined;
                _this.player.style.top = '-99999px';
            }
            if (item.audio) {
                _this.canvas.removeChild(_this.audios[item.id].player);
                _this.audios[item.id] = undefined;
            }
            if (item.video) {
                _this.canvas.removeChild(videos[item.id].player);
                videos[item.id] = undefined;
            }
            if (item.iframe) {
                _this.canvas.removeChild(_this.iframes[item.id]);
                _this.iframes[item.id] = undefined;
            }
            if (item.elementId) {
                _this.canvas.removeChild(_this.elements[item.id]);
                _this.elements[item.id] = undefined;
                item.elementId = '';
            }
            if (item.gif) {
                _this.canvas.removeChild(_this.gifs[item.id]);
                _this.gifs[item.id] = undefined;
            }
            if (item.children) {
                for (var _i = 0, _a = item.children; _i < _a.length; _i++) {
                    var child = _a[_i];
                    if (child.type === PenType.Line) {
                        continue;
                    }
                    _this.removeDiv(child);
                }
            }
        };
        if (!_this.options.playIcon) {
            _this.options.playIcon = 't-icon t-play';
        }
        if (!_this.options.pauseIcon) {
            _this.options.pauseIcon = 't-icon t-pause';
        }
        if (!_this.options.fullScreenIcon) {
            _this.options.fullScreenIcon = 't-icon t-full-screen';
        }
        if (!_this.options.loopIcon) {
            _this.options.loopIcon = 't-icon t-loop';
        }
        _this.canvas.style.position = 'absolute';
        _this.canvas.style.left = '0';
        _this.canvas.style.top = '0';
        _this.canvas.style.outline = 'none';
        _this.canvas.style.background = 'transparent';
        parentElem.appendChild(_this.canvas);
        parentElem.appendChild(_this.player);
        _this.createPlayer();
        _this.subcribeDiv = le5le_store["Store"].subscribe(_this.generateStoreKey('LT:addDiv'), _this.addDiv);
        _this.subcribeDiv = le5le_store["Store"].subscribe(_this.generateStoreKey('LT:removeDiv'), _this.removeDiv);
        _this.subcribePlay = le5le_store["Store"].subscribe(_this.generateStoreKey('LT:play'), function (e) {
            _this.playOne(e.pen, e.pause);
        });
        _this.subcribeNode = le5le_store["Store"].subscribe(_this.generateStoreKey('LT:activeNode'), function (node) {
            if (!node || (!node.video && !node.audio)) {
                _this.player.style.top = '-99999px';
                return;
            }
            if (node.audio && _this.audios[node.id]) {
                _this.media = _this.audios[node.id].media;
            }
            else if (node.video && videos[node.id]) {
                _this.media = videos[node.id].media;
            }
            else {
                return;
            }
            _this.curNode = node;
            var rect = _this.parentElem.getBoundingClientRect();
            _this.player.style.top = rect.top + _this.parentElem.clientHeight - 40 + 'px';
            _this.player.style.left = rect.left + 'px';
            _this.player.style.width = _this.parentElem.clientWidth + 'px';
            _this.getMediaCurrent();
            if (_this.media.paused) {
                _this.playBtn.className = _this.options.playIcon;
            }
            else {
                _this.playBtn.className = _this.options.pauseIcon;
            }
        });
        document.addEventListener('fullscreenchange', function (e) {
            if (!_this.media) {
                return;
            }
            if (document.fullscreen) {
                _this.media.controls = true;
                _this.media.style.userSelect = 'initial';
                _this.media.style.pointerEvents = 'initial';
            }
            else {
                _this.media.style.userSelect = 'none';
                _this.media.style.pointerEvents = 'none';
                _this.media.controls = false;
            }
        });
        return _this;
    }
    DivLayer.prototype.play = function (idOrTag, pause) {
        var _this = this;
        if (!idOrTag) {
            return;
        }
        var pens = find(idOrTag, this.data.pens);
        pens.forEach(function (item) {
            _this.playOne(item, pause);
        });
    };
    DivLayer.prototype.playOne = function (item, pause) {
        if (item.audio && this.audios[item.id] && this.audios[item.id].media) {
            if (pause) {
                this.audios[item.id].media.pause();
            }
            else if (this.audios[item.id].media.paused) {
                this.audios[item.id].media.play();
            }
        }
        else if (item.video && videos[item.id].media) {
            if (pause) {
                videos[item.id].media.pause();
            }
            else if (videos[item.id].media.paused) {
                videos[item.id].media.play();
            }
        }
    };
    DivLayer.prototype.addIframe = function (node) {
        var iframe = document.createElement('iframe');
        iframe.scrolling = 'no';
        iframe.frameBorder = '0';
        iframe.src = node.iframe;
        this.iframes[node.id] = iframe;
        this.canvas.appendChild(iframe);
        return iframe;
    };
    DivLayer.prototype.addGif = function (node) {
        this.gifs[node.id] = node.img;
        this.canvas.appendChild(node.img);
        return node.img;
    };
    DivLayer.prototype.clear = function (shallow) {
        this.canvas.innerHTML = '';
        this.audios = {};
        videos = {};
        this.iframes = {};
        this.elements = {};
        this.gifs = {};
        if (!shallow) {
            // tslint:disable-next-line:forin
            for (var key in pen_images) {
                delete pen_images[key];
            }
        }
        this.player.style.top = '-99999px';
    };
    DivLayer.prototype.formatSeconds = function (seconds) {
        var h = Math.floor(seconds / 3600);
        var m = Math.floor(seconds / 60) % 60;
        var s = Math.floor(seconds % 60);
        var txt = s + '';
        if (m) {
            txt = m + ':' + s;
        }
        else {
            txt = '0:' + s;
        }
        if (h) {
            txt = h + ':' + m + ':' + s;
        }
        return txt;
    };
    DivLayer.prototype.resize = function (size) {
        if (size) {
            this.canvas.style.width = size.width + 'px';
            this.canvas.style.height = size.height + 'px';
        }
        else {
            if (this.options.width && this.options.width !== 'auto') {
                this.canvas.style.width = this.options.width + 'px';
            }
            else {
                this.canvas.style.width = this.parentElem.clientWidth + 'px';
            }
            if (this.options.height && this.options.height !== 'auto') {
                this.canvas.style.height = this.options.height + 'px';
            }
            else {
                this.canvas.style.height = this.parentElem.clientHeight - 8 + 'px';
            }
        }
    };
    DivLayer.prototype.render = function () {
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (!item.getTID()) {
                item.setTID(this.TID);
            }
            this.addDiv(item);
        }
    };
    DivLayer.prototype.destroy = function () {
        _super.prototype.destroy.call(this);
        this.clear();
        this.subcribeDiv.unsubscribe();
        this.subcribeNode.unsubscribe();
        this.subcribePlay.unsubscribe();
    };
    return DivLayer;
}(layer_Layer));

//# sourceMappingURL=divLayer.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/utils/padding.js
/**
 * turn padding into [top, right, bottom, left]
 * @param  {Number|Array} padding input padding
 * @return {array} output
 */
var formatPadding = function (padding) {
    var top = 0;
    var left = 0;
    var right = 0;
    var bottom = 0;
    if (typeof padding === 'number') {
        top = left = right = bottom = padding;
    }
    else if (typeof padding === 'string') {
        var intPadding = parseInt(padding, 10);
        top = left = right = bottom = intPadding;
    }
    else if (Array.isArray(padding)) {
        top = padding[0];
        right = !isNil(padding[1]) ? padding[1] : padding[0];
        bottom = !isNil(padding[2]) ? padding[2] : padding[0];
        left = !isNil(padding[3]) ? padding[3] : right;
    }
    return [top, right, bottom, left];
};
/**
 * Checks if `value` is `null` or `undefined`.
 *
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
 * @example
 *
 * isNil(null)
 * // => true
 *
 * isNil(void 0)
 * // => true
 *
 * isNil(NaN)
 * // => false
 */
function isNil(value) {
    return value == null;
}
//# sourceMappingURL=padding.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/socket.js
var Socket = /** @class */ (function () {
    function Socket(url, cb) {
        this.url = url;
        this.cb = cb;
        this.fns = {};
        this.init();
    }
    Socket.prototype.init = function () {
        var _this = this;
        this.socket = new WebSocket(this.url);
        this.socket.onmessage = this.cb;
        this.socket.onclose = function () {
            console.info('Canvas websocket closed and reconneting...');
            _this.init();
        };
    };
    Socket.prototype.close = function () {
        this.socket.onclose = undefined;
        this.socket.close();
    };
    return Socket;
}());

//# sourceMappingURL=socket.js.map
// EXTERNAL MODULE: ./node_modules/mqtt/dist/mqtt.min.js
var mqtt_min = __webpack_require__("5948");

// CONCATENATED MODULE: ./node_modules/@topology/core/src/mqtt.js

var mqtt_MQTT = /** @class */ (function () {
    function MQTT(url, options, topics, cb) {
        this.url = url;
        this.options = options;
        this.topics = topics;
        this.cb = cb;
        this.fns = {};
        this.init();
    }
    MQTT.prototype.init = function () {
        this.client = mqtt_min["connect"](this.url, this.options);
        this.client.on('message', this.cb);
        if (this.topics) {
            this.client.subscribe(this.topics.split(','));
        }
    };
    MQTT.prototype.publish = function (topic, message) {
        this.client.publish(topic, message);
    };
    MQTT.prototype.close = function () {
        this.client.end();
    };
    return MQTT;
}());

//# sourceMappingURL=mqtt.js.map
// EXTERNAL MODULE: ./node_modules/@topology/core/package.json
var core_package = __webpack_require__("0cf4");

// CONCATENATED MODULE: ./node_modules/@topology/core/src/models/scroll.js

var scroll_Scroll = /** @class */ (function () {
    function Scroll(parent) {
        var _this = this;
        this.parent = parent;
        this.onMouseDownH = function (e) {
            e.preventDefault();
            e.stopPropagation();
            _this.isDownH = e.x;
            _this.x = _this.parent.data.x || 0;
            _this.lastScrollX = _this.scrollX;
        };
        this.onMouseDownV = function (e) {
            e.preventDefault();
            e.stopPropagation();
            _this.isDownV = e.y;
            _this.y = _this.parent.data.y || 0;
            _this.lastScrollY = _this.scrollY;
        };
        this.onMouseMove = function (e) {
            if (_this.isDownH) {
                var x = e.x - _this.isDownH;
                _this.scrollX = _this.lastScrollX + x;
                _this.h.style.left = _this.scrollX + "px";
                _this.parent.data.x = _this.x - (x * _this.rect.width) / _this.parent.parentElem.clientWidth;
            }
            if (_this.isDownV) {
                var y = e.y - _this.isDownV;
                _this.scrollY = _this.lastScrollY + y;
                _this.v.style.top = _this.scrollY + "px";
                _this.parent.data.y = _this.y - (y * _this.rect.height) / _this.parent.parentElem.clientHeight;
            }
            _this.parent.render();
        };
        this.onMouseUp = function (e) {
            if (!_this.isDownH && !_this.isDownV) {
                return;
            }
            _this.isDownH = undefined;
            _this.isDownV = undefined;
            if (_this.scrollX < 20) {
                _this.scrollX = 20;
                _this.h.style.left = _this.scrollX + "px";
            }
            else if (_this.scrollX > _this.parent.parentElem.clientWidth - _this.hSize - 20) {
                _this.scrollX = _this.parent.parentElem.clientWidth - _this.hSize - 20;
                _this.h.style.left = _this.scrollX + "px";
            }
            if (_this.scrollY < 20) {
                _this.scrollY = 20;
                _this.v.style.top = _this.scrollY + "px";
            }
            else if (_this.scrollY > _this.parent.parentElem.clientHeight - _this.vSize - 20) {
                _this.scrollY = _this.parent.parentElem.clientHeight - _this.vSize - 20;
                _this.v.style.top = _this.scrollY + "px";
            }
            _this.resize();
        };
        this.h = document.createElement('div');
        this.v = document.createElement('div');
        this.parent.parentElem.appendChild(this.h);
        this.parent.parentElem.appendChild(this.v);
        this.h.className = 'topology-scroll h';
        this.h.onmousedown = this.onMouseDownH;
        this.v.className = 'topology-scroll v';
        this.v.onmousedown = this.onMouseDownV;
        document.addEventListener('mousemove', this.onMouseMove);
        document.addEventListener('mouseup', this.onMouseUp);
        var sheet;
        for (var i = 0; i < document.styleSheets.length; i++) {
            if (document.styleSheets[i].title === 'le5le/scroll') {
                sheet = document.styleSheets[i];
            }
        }
        if (!sheet) {
            var style = document.createElement('style');
            style.type = 'text/css';
            style.title = 'le5le.com/scroll';
            document.head.appendChild(style);
            style = document.createElement('style');
            style.type = 'text/css';
            document.head.appendChild(style);
            sheet = style.sheet;
            sheet.insertRule('.topology-scroll{position:absolute;width:8px;height:200px;background:#dddddd;border-radius:10px;z-index:20;cursor:default;}');
            sheet.insertRule('.topology-scroll:hover{background:#cccccc;cursor:pointer}');
            sheet.insertRule('.topology-scroll.v{right:0;top:calc(50% - 100px);}');
            sheet.insertRule('.topology-scroll.h{bottom:2px;left:calc(50% - 100px);width:200px;height:8px;}');
        }
        this.init();
    }
    Scroll.prototype.init = function () {
        this.resize();
        this.initPos();
    };
    Scroll.prototype.initPos = function () {
        this.scrollX = (this.parent.parentElem.clientWidth - this.hSize) / 2;
        this.scrollY = (this.parent.parentElem.clientHeight - this.vSize) / 2;
        this.h.style.left = this.scrollX + "px";
        this.v.style.top = this.scrollY + "px";
    };
    Scroll.prototype.resize = function () {
        this.rect = getRect(this.parent.data.pens);
        if (this.rect.width < 1400) {
            this.rect.width = 1400;
        }
        if (this.rect.height < 900) {
            this.rect.height = 900;
        }
        if (this.parent.data.x > 0) {
            this.rect.width += this.parent.data.x + (this.rect.x > 0 ? 0 : this.rect.x);
        }
        else {
            this.rect.width -= this.parent.data.x + (this.rect.x > 0 ? 0 : this.rect.x);
        }
        if (this.parent.data.y > 0) {
            this.rect.height += this.parent.data.y + (this.rect.y > 0 ? 0 : this.rect.y);
        }
        else {
            this.rect.height -= this.parent.data.y + (this.rect.y > 0 ? 0 : this.rect.y);
        }
        if (this.rect.width < 1400) {
            this.rect.width = 1400;
        }
        if (this.rect.height < 900) {
            this.rect.height = 900;
        }
        this.hSize = (1000 * this.parent.parentElem.clientWidth) / this.rect.width / 3;
        this.vSize = (1000 * this.parent.parentElem.clientHeight) / this.rect.height / 3;
        this.h.style.width = this.hSize + 'px';
        this.v.style.height = this.vSize + 'px';
    };
    Scroll.prototype.show = function () {
        this.isShow = true;
        this.h.style.display = "block";
        this.v.style.display = "block";
        document.addEventListener('mousemove', this.onMouseMove);
        document.addEventListener('mouseup', this.onMouseUp);
    };
    Scroll.prototype.hide = function () {
        this.isShow = false;
        this.h.style.display = "none";
        this.v.style.display = "none";
        this.destroy();
    };
    Scroll.prototype.translate = function (x, y) {
        if (x) {
            this.scrollX -= (x * this.parent.parentElem.clientWidth) / this.rect.width;
            this.h.style.left = this.scrollX + "px";
        }
        if (y) {
            this.scrollY -= (y * this.parent.parentElem.clientHeight) / this.rect.height;
            this.v.style.top = this.scrollY + "px";
        }
    };
    Scroll.prototype.wheel = function (up) {
        var y = 10;
        if (up) {
            y = -10;
        }
        this.scrollY += y;
        this.v.style.top = this.scrollY + "px";
        this.parent.data.y -= (y * this.rect.height) / this.parent.parentElem.clientHeight;
        this.parent.render();
    };
    Scroll.prototype.destroy = function () {
        document.removeEventListener('mousemove', this.onMouseMove);
        document.removeEventListener('mouseup', this.onMouseUp);
    };
    return Scroll;
}());

//# sourceMappingURL=scroll.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/src/core.js

// https://github.com/developit/mitt


























var resizeCursors = ['nw-resize', 'ne-resize', 'se-resize', 'sw-resize'];
var MoveInType;
(function (MoveInType) {
    MoveInType[MoveInType["None"] = 0] = "None";
    MoveInType[MoveInType["Line"] = 1] = "Line";
    MoveInType[MoveInType["LineFrom"] = 2] = "LineFrom";
    MoveInType[MoveInType["LineTo"] = 3] = "LineTo";
    MoveInType[MoveInType["LineControlPoint"] = 4] = "LineControlPoint";
    MoveInType[MoveInType["Nodes"] = 5] = "Nodes";
    MoveInType[MoveInType["ResizeCP"] = 6] = "ResizeCP";
    MoveInType[MoveInType["HoverAnchors"] = 7] = "HoverAnchors";
    MoveInType[MoveInType["AutoAnchor"] = 8] = "AutoAnchor";
    MoveInType[MoveInType["Rotate"] = 9] = "Rotate";
    MoveInType[MoveInType["GraffitiReady"] = 10] = "GraffitiReady";
    MoveInType[MoveInType["Graffiti"] = 11] = "Graffiti";
    MoveInType[MoveInType["LinesReady"] = 12] = "LinesReady";
    MoveInType[MoveInType["Lines"] = 13] = "Lines";
})(MoveInType || (MoveInType = {}));
var dockOffset = 10;
var core_Topology = /** @class */ (function () {
    function Topology(parent, options) {
        var _this = this;
        if (options === void 0) { options = {}; }
        this.VERSION = core_package.version;
        this.id = s8();
        this.data = createData(undefined, this.id);
        this.caches = {
            index: 0,
            dbIndex: 0,
            list: [],
        };
        this.touchStart = 0;
        this.input = document.createElement('textarea');
        this.lastTranlated = { x: 0, y: 0 };
        this.moveIn = {
            type: MoveInType.None,
            activeAnchorIndex: 0,
            hoverAnchorIndex: 0,
            hoverNode: undefined,
            hoverLine: undefined,
            activeNode: undefined,
            lineControlPoint: undefined,
        };
        this.needCache = false;
        this.tip = '';
        this.scheduledAnimationFrame = false;
        this.scrolling = false;
        this.rendering = false;
        // true 已经复制
        this.alreadyCopy = false;
        this.onScroll = function () {
            _this.canvasPos = _this.divLayer.canvas.getBoundingClientRect();
        };
        this.preventDefault = function (event) {
            event.preventDefault();
        };
        this.winResize = function () {
            var timer;
            if (timer) {
                clearTimeout(timer);
            }
            timer = setTimeout(function () {
                _this.resize();
            }, 100);
        };
        this.calibrateMouse = function (pt) {
            pt.x -= _this.data.x;
            pt.y -= _this.data.y;
            return pt;
        };
        this.subscribeSocket = function () {
            if (!_this.data.socketFn) {
                return false;
            }
            if (!_this.data.socketEvent) {
                _this.data.socketEvent = true;
            }
            try {
                var socketFn = new Function('e', _this.data.socketFn);
                if (_this.socketFn) {
                    _this.off('websocket', _this.socketFn);
                    _this.off('mqtt', _this.socketFn);
                }
                _this.on('websocket', socketFn);
                _this.on('mqtt', socketFn);
                _this.socketFn = socketFn;
            }
            catch (e) {
                console.error('Create the function for socket:', e);
                return false;
            }
            return true;
        };
        this.onMouseMove = function (e) {
            var _a;
            if (_this.scheduledAnimationFrame || ((_a = _this.data) === null || _a === void 0 ? void 0 : _a.locked) === Lock.NoEvent) {
                return;
            }
            // https://caniuse.com/#feat=mdn-api_mouseevent_buttons
            if (_this.mouseDown && !_this.mouseDown.restore && e.buttons !== 1 && e.buttons !== 2) {
                // 防止异常情况导致mouseup事件没有触发
                _this.onmouseup(e);
                return;
            }
            if (_this.mouseDown && (_this.data.locked || _this.spaceDown || !_this.moveIn.type)) {
                var b = !!_this.data.locked;
                switch (_this.options.translateKey) {
                    case KeyType.Right:
                        if (e.buttons == 2) {
                            b = true;
                        }
                        break;
                    case KeyType.Any:
                        b = true;
                        break;
                    case KeyType.Ctrl:
                        if (e.ctrlKey) {
                            b = true;
                        }
                        break;
                    case KeyType.Shift:
                        if (e.shiftKey) {
                            b = true;
                        }
                        break;
                    case KeyType.Alt:
                        if (e.altKey) {
                            b = true;
                        }
                        break;
                    default:
                        if (e.ctrlKey || e.altKey || e.buttons == 2) {
                            b = true;
                        }
                }
                if (_this.spaceDown || (!_this.options.disableTranslate && b && _this.data.locked < Lock.NoMove)) {
                    _this.translate(e.x, e.y, true);
                    return false;
                }
            }
            if (_this.data.locked && _this.mouseDown) {
                return;
            }
            _this.scheduledAnimationFrame = true;
            if (_this.raf)
                cancelAnimationFrame(_this.raf);
            _this.raf = requestAnimationFrame(function () {
                _this.raf = undefined;
                var pt = _this.calibrateMouse({ x: e.x, y: e.y });
                if (_this.moveIn.type === MoveInType.Lines) { // 钢笔工具
                    if (_this.hoverLayer.line) {
                        _this.hoverLayer.lineTo(new Point(pt.x, pt.y), '');
                        if (e.shiftKey || e.ctrlKey || e.altKey || e.buttons == 2) {
                            _this.hoverLayer.line.name = 'curve';
                            _this.hoverLayer.line.calcControlPoints();
                        }
                        else {
                            _this.hoverLayer.line.name = 'line';
                        }
                        _this.render();
                    }
                    _this.scheduledAnimationFrame = false;
                    return;
                }
                if (!_this.mouseDown) {
                    _this.getMoveIn(pt);
                    // Render hover anchors.
                    if (_this.moveIn.hoverNode !== _this.lastHoverNode) {
                        if (_this.lastHoverNode) {
                            _this.lastHoverNode.moveOut();
                            // Send a move event.
                            _this.dispatch('moveOutNode', _this.lastHoverNode);
                            _this.hideTip();
                            // Clear hover anchors.
                            _this.hoverLayer.node = undefined;
                        }
                        if (_this.moveIn.hoverNode) {
                            _this.hoverLayer.node = _this.moveIn.hoverNode;
                            _this.moveIn.hoverNode.moveIn();
                            // Send a move event.
                            _this.dispatch('moveInNode', Object.assign(_this.moveIn.hoverNode, {
                                evs: {
                                    x: e.pageX,
                                    y: e.pageY,
                                }
                            }));
                            _this.showTip(_this.moveIn.hoverNode, pt);
                        }
                    }
                    if (_this.moveIn.hoverLine !== _this.lastHoverLine && !_this.moveIn.hoverNode) {
                        if (_this.lastHoverLine) {
                            _this.lastHoverLine.moveOut();
                            _this.dispatch('moveOutLine', _this.lastHoverLine);
                            _this.hideTip();
                        }
                        if (_this.moveIn.hoverLine) {
                            _this.hoverLayer.line = _this.moveIn.hoverLine;
                            _this.moveIn.hoverLine.moveIn();
                            _this.dispatch('moveInLine', Object.assign(_this.moveIn.hoverLine, {
                                evs: {
                                    x: e.pageX,
                                    y: e.pageY,
                                }
                            }));
                            _this.showTip(_this.moveIn.hoverLine, pt);
                        }
                    }
                    if (_this.moveIn.type === MoveInType.LineControlPoint) {
                        _this.hoverLayer.hoverLineCP = _this.moveIn.lineControlPoint;
                    }
                    else if (_this.hoverLayer.hoverLineCP) {
                        _this.hoverLayer.hoverLineCP = undefined;
                    }
                    if (_this.moveIn.hoverNode !== _this.lastHoverNode ||
                        _this.moveIn.type === MoveInType.HoverAnchors ||
                        _this.hoverLayer.lasthoverLineCP !== _this.hoverLayer.hoverLineCP) {
                        _this.hoverLayer.lasthoverLineCP = _this.hoverLayer.hoverLineCP;
                        _this.render();
                    }
                    _this.scheduledAnimationFrame = false;
                    return;
                }
                // Move out parent element.
                var moveOutX = e.x + 50 > _this.parentElem.clientWidth + _this.parentElem.scrollLeft;
                var moveOutY = e.y + 50 > _this.parentElem.clientHeight + _this.parentElem.scrollTop;
                if (!_this.options.disableMoveOutParent && (moveOutX || moveOutY)) {
                    _this.dispatch('moveOutParent', e);
                    var x = 0;
                    var y = 0;
                    if (e.x + 50 > _this.divLayer.canvas.clientWidth) {
                        x = -5;
                    }
                    if (e.y + 50 > _this.divLayer.canvas.clientHeight) {
                        y = -5;
                    }
                    _this.translate(x, y, false);
                }
                _this.hideTip();
                switch (_this.moveIn.type) {
                    case MoveInType.None:
                        _this.hoverLayer.dragRect = new rect_Rect(_this.mouseDown.x - _this.data.x, _this.mouseDown.y - _this.data.y, e.x - _this.mouseDown.x, e.y - _this.mouseDown.y);
                        break;
                    case MoveInType.Nodes:
                        if (_this.activeLayer.locked() || _this.data.locked) {
                            break;
                        }
                        if (e.ctrlKey && !_this.alreadyCopy) {
                            // 按住 ctrl，复制一个新节点
                            _this.alreadyCopy = true;
                            _this.copy();
                            _this.paste();
                            _this.needCache = true;
                        }
                        else {
                            var x = e.x - _this.mouseDown.x;
                            var y = e.y - _this.mouseDown.y;
                            if (x || y) {
                                var offset = _this.getDockPos(x, y, e.ctrlKey || e.shiftKey || e.altKey);
                                _this.activeLayer.move(offset.x ? offset.x : x, offset.y ? offset.y : y);
                                _this.needCache = true;
                            }
                        }
                        break;
                    case MoveInType.ResizeCP: {
                        var x = e.x - _this.mouseDown.x;
                        var y = e.y - _this.mouseDown.y;
                        if (x || y) {
                            var offset = _this.getDockPos(x, y, e.ctrlKey || e.shiftKey || e.altKey);
                            var offsetE = Object.assign({}, e);
                            offset.x && (offsetE.x = offset.x + _this.mouseDown.x);
                            offset.y && (offsetE.y = offset.y + _this.mouseDown.y);
                            _this.activeLayer.resize(_this.moveIn.activeAnchorIndex, _this.mouseDown, offsetE);
                            _this.dispatch('resizePens', _this.activeLayer.pens);
                            _this.needCache = true;
                        }
                        break;
                    }
                    case MoveInType.LineTo:
                    case MoveInType.HoverAnchors:
                    case MoveInType.AutoAnchor:
                        if (_this.hoverLayer.dockAnchor && _this.hoverLayer.dockAnchor.hit(e, 10)) {
                            break;
                        }
                        var arrow = _this.data.toArrow;
                        if (_this.moveIn.hoverLine) {
                            arrow = _this.moveIn.hoverLine.toArrow;
                        }
                        if (_this.hoverLayer.line) {
                            arrow = _this.hoverLayer.line.toArrow;
                        }
                        if (_this.hoverLayer.line) {
                            _this.activeLayer.pens = [_this.hoverLayer.line];
                        }
                        var toId = _this.hoverLayer.line.to.id;
                        if (e.ctrlKey || e.shiftKey || e.altKey) {
                            _this.hoverLayer.lineTo(new Point(pt.x, pt.y), arrow);
                        }
                        else {
                            var to = _this.getLineDock(new Point(pt.x, pt.y), AnchorMode.In);
                            toId = to.id;
                            // 即使是自己连接自己，也为 to 配置 anchorIndex
                            _this.hoverLayer.lineTo(to, arrow);
                        }
                        _this.hoverLayer.line.to.id = toId;
                        if (_this.hoverLayer.line.parentId) {
                            var line = _this.find(toId);
                            if (line && line.from) {
                                line.from.x = _this.hoverLayer.line.to.x;
                                line.from.y = _this.hoverLayer.line.to.y;
                            }
                        }
                        _this.needCache = true;
                        break;
                    case MoveInType.LineFrom:
                        var fromId = _this.hoverLayer.line.from.id;
                        if (e.ctrlKey || e.shiftKey || e.altKey) {
                            _this.hoverLayer.lineFrom(new Point(pt.x, pt.y));
                        }
                        else {
                            var from = _this.getLineDock(new Point(pt.x, pt.y), AnchorMode.Out);
                            fromId = from.id;
                            _this.hoverLayer.lineFrom(from);
                        }
                        _this.hoverLayer.line.from.id = fromId;
                        if (_this.hoverLayer.line.parentId) {
                            var line = _this.find(fromId);
                            if (line && line.to) {
                                line.to.x = _this.hoverLayer.line.from.x;
                                line.to.y = _this.hoverLayer.line.from.y;
                            }
                        }
                        _this.needCache = true;
                        break;
                    case MoveInType.Line:
                        {
                            var x = e.x - _this.mouseDown.x;
                            var y = e.y - _this.mouseDown.y;
                            if (x || y) {
                                _this.activeLayer.move(x, y);
                                if (_this.hoverLayer.line.children) {
                                    _this.animateLayer.updateLines(_this.hoverLayer.line.children);
                                }
                                else {
                                    _this.animateLayer.updateLines([_this.hoverLayer.line]);
                                }
                                _this.needCache = true;
                            }
                        }
                        break;
                    case MoveInType.LineControlPoint:
                        _this.moveIn.hoverLine.controlPoints[_this.moveIn.lineControlPoint.id].x = pt.x;
                        _this.moveIn.hoverLine.controlPoints[_this.moveIn.lineControlPoint.id].y = pt.y;
                        _this.moveIn.hoverLine.textRect = undefined;
                        if (drawLineFns[_this.moveIn.hoverLine.name] && drawLineFns[_this.moveIn.hoverLine.name].dockControlPointFn) {
                            drawLineFns[_this.moveIn.hoverLine.name].dockControlPointFn(_this.moveIn.hoverLine.controlPoints[_this.moveIn.lineControlPoint.id], _this.moveIn.hoverLine);
                        }
                        _this.needCache = true;
                        le5le_store["Store"].set(_this.generateStoreKey('LT:updateLines'), [_this.moveIn.hoverLine]);
                        break;
                    case MoveInType.Rotate:
                        if (_this.activeLayer.pens.length) {
                            _this.activeLayer.offsetRotate(_this.getAngle(pt));
                            _this.activeLayer.updateLines();
                        }
                        _this.needCache = true;
                        break;
                    case MoveInType.Graffiti:
                        _this.moveIn.hoverNode.pushPoint(new Point(pt.x, pt.y));
                        break;
                }
                _this.render();
                _this.scheduledAnimationFrame = false;
            });
        };
        this.onmousedown = function (e) {
            if (e.button !== 0 && e.button !== 2)
                return;
            _this.mouseDown = e;
            if (e.altKey) {
                _this.divLayer.canvas.style.cursor = 'move';
            }
            if (_this.inputObj) {
                _this.setNodeText();
            }
            switch (_this.moveIn.type) {
                // Click the space.
                case MoveInType.None:
                    _this.activeLayer.clear();
                    _this.hoverLayer.clear();
                    _this.dispatch('space', _this.mouseDown);
                    break;
                // Click a line.
                case MoveInType.Line:
                case MoveInType.LineControlPoint:
                    if (e.ctrlKey || e.shiftKey) {
                        _this.activeLayer.add(_this.moveIn.hoverLine);
                        _this.dispatch('multi', _this.activeLayer.pens);
                    }
                    else {
                        _this.activeLayer.pens = [_this.moveIn.hoverLine];
                        _this.dispatch('line' + (e.button === 2 ? 'RightClick' : ''), Object.assign(_this.moveIn.hoverLine, {
                            evs: {
                                x: e.pageX,
                                y: e.pageY,
                            }
                        }));
                    }
                    _this.hoverLayer.line = _this.moveIn.hoverLine;
                    _this.hoverLayer.initLine = new line_Line(_this.moveIn.hoverLine);
                    if (_this.data.locked || _this.moveIn.hoverLine.locked) {
                        _this.moveIn.hoverLine.click();
                    }
                    break;
                // tslint:disable-next-line:no-switch-case-fall-through
                case MoveInType.LineFrom:
                case MoveInType.LineTo:
                    _this.activeLayer.pens = [_this.moveIn.hoverLine];
                    _this.dispatch('line', _this.moveIn.hoverLine);
                    _this.hoverLayer.line = _this.moveIn.hoverLine;
                    break;
                case MoveInType.HoverAnchors:
                    _this.hoverLayer.line = _this.addLine({
                        name: _this.data.lineName,
                        from: new Point(_this.moveIn.hoverNode.rotatedAnchors[_this.moveIn.hoverAnchorIndex].x, _this.moveIn.hoverNode.rotatedAnchors[_this.moveIn.hoverAnchorIndex].y, _this.moveIn.hoverNode.rotatedAnchors[_this.moveIn.hoverAnchorIndex].direction, _this.moveIn.hoverAnchorIndex, _this.moveIn.hoverNode.id),
                        fromArrow: _this.data.fromArrow,
                        to: new Point(_this.moveIn.hoverNode.rotatedAnchors[_this.moveIn.hoverAnchorIndex].x, _this.moveIn.hoverNode.rotatedAnchors[_this.moveIn.hoverAnchorIndex].y),
                        toArrow: _this.data.toArrow,
                        strokeStyle: _this.options.color,
                        lineWidth: _this.data.lineWidth,
                    });
                    _this.dispatch('anchor', {
                        anchor: _this.moveIn.hoverNode.rotatedAnchors[_this.moveIn.hoverAnchorIndex],
                        anchorIndex: _this.moveIn.hoverAnchorIndex,
                        node: _this.moveIn.hoverNode,
                        line: _this.hoverLayer.line,
                    });
                    break;
                case MoveInType.AutoAnchor:
                    _this.hoverLayer.line = _this.addLine({
                        name: _this.data.lineName,
                        from: new Point(_this.moveIn.hoverNode.rect.center.x, _this.moveIn.hoverNode.rect.center.y, Direction.None, 0, _this.moveIn.hoverNode.id),
                        fromArrow: _this.data.fromArrow,
                        to: new Point(_this.moveIn.hoverNode.rect.center.x, _this.moveIn.hoverNode.rect.center.y),
                        toArrow: _this.data.toArrow,
                        strokeStyle: _this.options.color,
                        lineWidth: _this.data.lineWidth,
                    });
                    _this.hoverLayer.line.from.autoAnchor = true;
                    _this.dispatch('nodeCenter', _this.moveIn.hoverNode);
                    break;
                // tslint:disable-next-line:no-switch-case-fall-through
                case MoveInType.Nodes:
                    if (!_this.moveIn.activeNode) {
                        break;
                    }
                    if (e.ctrlKey || e.shiftKey) {
                        if (_this.moveIn.hoverNode && _this.activeLayer.hasInAll(_this.moveIn.hoverNode)) {
                            _this.activeLayer.setPens([_this.moveIn.hoverNode]);
                            _this.dispatch('node' + (e.button === 2 ? 'RightClick' : ''), _this.moveIn.hoverNode);
                        }
                        else if (!_this.activeLayer.has(_this.moveIn.activeNode)) {
                            _this.activeLayer.add(_this.moveIn.activeNode);
                            if (_this.activeLayer.pens.length > 1) {
                                _this.dispatch('multi', _this.activeLayer.pens);
                            }
                            else {
                                _this.dispatch('node' + (e.button === 2 ? 'RightClick' : ''), _this.moveIn.activeNode);
                            }
                        }
                    }
                    else if (e.altKey) {
                        if (_this.moveIn.hoverNode) {
                            _this.activeLayer.setPens([_this.moveIn.hoverNode]);
                            _this.dispatch('node' + (e.button === 2 ? 'RightClick' : ''), _this.moveIn.hoverNode);
                        }
                        else if (_this.moveIn.hoverLine) {
                            _this.activeLayer.setPens([_this.moveIn.hoverLine]);
                            _this.dispatch('line', _this.moveIn.hoverLine);
                        }
                    }
                    else if (_this.activeLayer.pens.length < 2) {
                        _this.activeLayer.setPens([_this.moveIn.activeNode]);
                        _this.dispatch('node' + (e.button === 2 ? 'RightClick' : ''), Object.assign(_this.moveIn.activeNode, {
                            evs: {
                                x: e.pageX,
                                y: e.pageY,
                            }
                        }));
                    }
                    if (_this.data.locked || _this.moveIn.activeNode.locked) {
                        _this.moveIn.activeNode.click();
                    }
                    _this.activeLayer.calcActiveRect();
                    break;
                case MoveInType.Graffiti: // 涂鸦起点
                    var pt = _this.calibrateMouse({ x: e.x, y: e.y });
                    _this.moveIn.hoverNode.pushPoint(new Point(pt.x, pt.y));
                    break;
            }
            // Save node rects to move.
            if (_this.activeLayer.pens.length) {
                _this.activeLayer.saveNodeRects();
            }
            _this.render();
        };
        this.onmouseup = function (e) {
            if (!_this.mouseDown)
                return;
            _this.mouseDown = undefined;
            _this.lastTranlated.x = 0;
            _this.lastTranlated.y = 0;
            _this.hoverLayer.dockAnchor = undefined;
            _this.hoverLayer.dockLineX = 0;
            _this.hoverLayer.dockLineY = 0;
            _this.divLayer.canvas.style.cursor = 'default';
            _this.alreadyCopy = false;
            if (_this.hoverLayer.dragRect) {
                _this.getPensInRect(_this.hoverLayer.dragRect);
                if (_this.activeLayer.pens && _this.activeLayer.pens.length > 1) {
                    _this.dispatch('multi', _this.activeLayer.pens);
                }
                else if (_this.activeLayer.pens && _this.activeLayer.pens[0] && _this.activeLayer.pens[0].type === PenType.Line) {
                    _this.dispatch('line' + (e.button === 2 ? 'RightClick' : ''), _this.activeLayer.pens[0]);
                }
                else if (_this.activeLayer.pens && _this.activeLayer.pens[0] && _this.activeLayer.pens[0].type === PenType.Node) {
                    _this.dispatch('node' + (e.button === 2 ? 'RightClick' : ''), _this.activeLayer.pens[0]);
                }
                _this.activeLayer.calcActiveRect();
            }
            else {
                var pt = _this.calibrateMouse({ x: e.x, y: e.y });
                switch (_this.moveIn.type) {
                    case MoveInType.Nodes:
                        if (e.ctrlKey && e.shiftKey && e.altKey) {
                            if (!_this.moveIn.hoverNode.manualAnchors) {
                                _this.moveIn.hoverNode.manualAnchors = [];
                            }
                            var point = new Point(pt.x, pt.y);
                            point.id = _this.moveIn.hoverNode.id;
                            _this.moveIn.hoverNode.manualAnchors.push(point);
                            _this.moveIn.hoverNode.calcAnchors();
                            _this.needCache = true;
                        }
                        if (_this.data.locked || _this.moveIn.activeNode.locked) {
                            _this.moveIn.activeNode.mouseUp();
                        }
                        break;
                    case MoveInType.Line:
                    case MoveInType.LineControlPoint:
                        if (_this.data.locked || _this.moveIn.hoverLine.locked) {
                            _this.moveIn.hoverLine.mouseUp();
                        }
                        break;
                    // Add the line.
                    case MoveInType.HoverAnchors:
                        // New active.
                        if (_this.hoverLayer.line) {
                            var willAddLine = void 0;
                            var _a = _this.hoverLayer.line, from = _a.from, to = _a.to;
                            if (_this.hoverLayer.line.to.id) {
                                if (!_this.options.disableRepeatLine) {
                                    willAddLine = true;
                                }
                                else {
                                    var lines = _this.data.pens.filter(function (pen) {
                                        return pen.type === PenType.Line &&
                                            pen.from.isSameAs(_this.hoverLayer.line.from) &&
                                            pen.to.isSameAs(_this.hoverLayer.line.to);
                                    });
                                    willAddLine = lines.length <= 1;
                                }
                                // 判断是否是当前锚点连接当前锚点
                                if (from.id === to.id && from.anchorIndex === to.anchorIndex) {
                                    willAddLine = false;
                                }
                            }
                            else {
                                willAddLine = !_this.options.disableEmptyLine && !_this.hoverLayer.line.disableEmptyLine;
                                // from 与 to 的距离若小于等于 5 认为是误操作，不会添加连线
                                willAddLine = willAddLine && Math.pow((from.x - to.x), 2) + Math.pow((from.y - to.y), 2) > 25;
                            }
                            if (willAddLine) {
                                _this.activeLayer.pens = [_this.hoverLayer.line];
                                _this.dispatch('addLine', _this.hoverLayer.line);
                            }
                            else {
                                _this.data.pens.pop();
                                _this.activeLayer.clear();
                            }
                        }
                        _this.offscreen.render();
                        _this.hoverLayer.line = undefined;
                        break;
                    case MoveInType.AutoAnchor:
                        if ((_this.hoverLayer.line.disableEmptyLine || _this.options.disableEmptyLine) &&
                            (!_this.hoverLayer.line.from.id || !_this.hoverLayer.line.to.id)) {
                            _this.needCache = true;
                            _this.activeLayer.clear();
                            _this.data.pens.splice(_this.findIndex(_this.hoverLayer.line), 1);
                        }
                        else {
                            _this.activeLayer.updateLines();
                            _this.dispatch('addLine', _this.hoverLayer.line);
                        }
                        break;
                    case MoveInType.Rotate:
                        _this.activeLayer.updateRotate();
                        break;
                    case MoveInType.LineControlPoint:
                        le5le_store["Store"].set(_this.generateStoreKey('pts-') + _this.moveIn.hoverLine.id, undefined);
                        break;
                    case MoveInType.LineFrom:
                    case MoveInType.LineTo:
                        if ((_this.hoverLayer.line.disableEmptyLine || _this.options.disableEmptyLine) &&
                            (!_this.hoverLayer.line.from.id || !_this.hoverLayer.line.to.id)) {
                            _this.needCache = true;
                            _this.activeLayer.clear();
                            _this.data.pens.splice(_this.findIndex(_this.hoverLayer.line), 1);
                        }
                        if (_this.hoverLayer.line.from.id && _this.hoverLayer.line.to.id) {
                            _this.dispatch('lineOn', Object.assign(_this.hoverLayer.line, {
                                lineOnDirection: _this.moveIn.type
                            }));
                        }
                        break;
                    case MoveInType.Graffiti:
                        if (!_this.moveIn.hoverNode.points || _this.moveIn.hoverNode.points.length < 2) {
                            _this.moveIn.type = MoveInType.None;
                            _this.data.pens.pop();
                        }
                        else {
                            _this.moveIn.type = MoveInType.Nodes;
                            _this.moveIn.hoverNode['doing'] = undefined;
                            _this.moveIn.hoverNode.calcAnchors();
                            _this.activeLayer.setPens([_this.moveIn.hoverNode]);
                            _this.hoverLayer.node = _this.moveIn.hoverNode;
                            _this.needCache = true;
                        }
                        break;
                    case MoveInType.Lines:
                        var previous = void 0;
                        if (_this.moveIn.hoverLine.children && _this.moveIn.hoverLine.children.length) {
                            previous = _this.moveIn.hoverLine.children[_this.moveIn.hoverLine.children.length - 1];
                        }
                        if (!previous) {
                            _this.moveIn.hoverLine.children = [];
                        }
                        var line = new line_Line({
                            parentId: _this.moveIn.hoverLine.id,
                            name: 'line',
                            from: new Point(pt.x, pt.y),
                            fromArrow: previous ? '' : _this.data.fromArrow,
                            to: new Point(pt.x, pt.y),
                            toArrow: '',
                            strokeStyle: _this.options.color,
                            lineWidth: _this.data.lineWidth,
                        });
                        if (previous) {
                            line.from.id = previous.id;
                            line.from.x = previous.to.x;
                            line.from.y = previous.to.y;
                            previous.to.id = line.id;
                        }
                        _this.moveIn.hoverLine.children.push(line);
                        _this.hoverLayer.line = line;
                        _this.dispatch('addLineInLines', { previous: previous, line: line });
                }
            }
            _this.hoverLayer.dragRect = undefined;
            _this.activeLayer.lastOffsetX = 0;
            _this.activeLayer.lastOffsetY = 0;
            _this.render();
            if (_this.needCache) {
                _this.cache();
            }
            _this.needCache = false;
        };
        this.ondblclick = function () {
            if (_this.moveIn.hoverNode) {
                _this.dispatch('dblclick', _this.moveIn.hoverNode);
                if (!(_this.data.locked || _this.moveIn.hoverNode.locked || _this.moveIn.hoverNode.hideInput || _this.options.hideInput)) {
                    _this.showInput(_this.moveIn.hoverNode);
                }
                _this.moveIn.hoverNode.dblclick();
            }
            else if (_this.moveIn.hoverLine) {
                _this.dispatch('dblclick', _this.moveIn.hoverLine);
                if (!(_this.data.locked || _this.moveIn.hoverLine.locked || _this.moveIn.hoverLine.hideInput || _this.options.hideInput)) {
                    _this.showInput(_this.moveIn.hoverLine);
                }
                _this.moveIn.hoverLine.dblclick();
            }
        };
        this.onkeydown = function (key) {
            if (_this.data.locked ||
                key.target.tagName === 'INPUT' ||
                key.target.tagName === 'TEXTAREA') {
                return;
            }
            var done = false;
            var moveX = 0;
            var moveY = 0;
            switch (key.key) {
                case ' ':
                    _this.spaceDown = true;
                    break;
                case 'a':
                case 'A':
                    _this.activeLayer.setPens(_this.data.pens);
                    done = true;
                    break;
                case 'Delete':
                case 'Backspace':
                    if (key.ctrlKey || key.metaKey) {
                        _this.deleteAnchors();
                    }
                    else {
                        _this.delete();
                    }
                    break;
                case 'ArrowLeft':
                    moveX = -5;
                    if (key.ctrlKey || key.metaKey) {
                        moveX = -1;
                    }
                    done = true;
                    break;
                case 'ArrowUp':
                    moveY = -5;
                    if (key.ctrlKey || key.metaKey) {
                        moveY = -1;
                    }
                    done = true;
                    break;
                case 'ArrowRight':
                    moveX = 5;
                    if (key.ctrlKey || key.metaKey) {
                        moveX = 1;
                    }
                    done = true;
                    break;
                case 'ArrowDown':
                    moveY = 5;
                    if (key.ctrlKey || key.metaKey) {
                        moveY = 1;
                    }
                    done = true;
                    break;
                case 'x':
                case 'X':
                    _this.cut();
                    break;
                case 'c':
                case 'C':
                    _this.copy();
                    break;
                case 'v':
                case 'V':
                    _this.paste();
                    break;
                case 'y':
                case 'Y':
                    if (key.ctrlKey || key.metaKey) {
                        _this.redo();
                    }
                    break;
                case 'z':
                case 'Z':
                    if (key.shiftKey) {
                        _this.redo();
                    }
                    else if (key.ctrlKey || key.metaKey) {
                        _this.undo();
                    }
                    break;
                case 'Enter':
                    if (_this.moveIn.type === MoveInType.Lines) {
                        _this.moveIn.type = MoveInType.None;
                        _this.moveIn.hoverLine['doing'] = '';
                        if (_this.hoverLayer.line.getLen() < 10) {
                            _this.moveIn.hoverLine.children.pop();
                            _this.hoverLayer.line = _this.moveIn.hoverLine.children[_this.moveIn.hoverLine.children.length - 1];
                        }
                        if (_this.moveIn.hoverLine['isNode']) {
                            var pts_1 = [];
                            _this.moveIn.hoverLine.children.forEach(function (l) {
                                pts_1.push(l.from);
                                if (l.controlPoints) {
                                    l.controlPoints.forEach(function (pt) {
                                        pt.data = true;
                                        pts_1.push(pt);
                                    });
                                }
                                pts_1.push(l.to);
                            });
                            var _a = getBboxOfPoints(pts_1), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;
                            var n = new node_Node({
                                name: 'lines',
                                rect: new rect_Rect(x1, y1, x2 - x1, y2 - y1),
                                points: pts_1,
                                closePath: _this.moveIn.hoverLine['closePath'],
                            });
                            _this.activeLayer.add(n);
                            _this.data.pens.pop();
                            _this.data.pens.push(n);
                        }
                        else {
                            _this.hoverLayer.line.toArrow = _this.data.toArrow;
                            _this.activeLayer.add(_this.moveIn.hoverLine);
                        }
                        _this.moveIn.hoverLine = undefined;
                    }
                    done = true;
                    break;
                case 'Escape':
                    if (_this.moveIn.type === MoveInType.Lines) {
                        _this.moveIn.type = MoveInType.None;
                        _this.moveIn.hoverLine.children.pop();
                        _this.hoverLayer.line = _this.moveIn.hoverLine.children[_this.moveIn.hoverLine.children.length - 1];
                        _this.hoverLayer.line.toArrow = _this.data.toArrow;
                        _this.moveIn.hoverLine['doing'] = '';
                        _this.moveIn.hoverLine = undefined;
                    }
                    done = true;
                    break;
            }
            if (!done) {
                return;
            }
            key.preventDefault();
            key.stopPropagation();
            if (moveX || moveY) {
                _this.activeLayer.saveNodeRects();
                _this.activeLayer.move(moveX, moveY);
                _this.animateLayer.animate();
            }
            _this.render();
            _this.cache();
        };
        this._emitter = mitt_es();
        this.options = Object.assign({}, DefalutOptions, options);
        le5le_store["Store"].set(this.generateStoreKey('LT:color'), this.options.color || '#222222');
        le5le_store["Store"].set(this.generateStoreKey('LT:fontColor'), this.options.fontColor || '#222222');
        this.setupDom(parent);
        this.setupSubscribe();
        this.setupMouseEvent();
        // Wait for parent dom load
        setTimeout(function () {
            _this.canvasPos = _this.divLayer.canvas.getBoundingClientRect();
        }, 500);
        setTimeout(function () {
            _this.canvasPos = _this.divLayer.canvas.getBoundingClientRect();
        }, 1000);
        this.cache();
        window.topology = this;
        this.dispatch('loaded');
    }
    Object.defineProperty(Topology.prototype, "ramCaches", {
        // 内存中的 caches 数量
        get: function () {
            return 5;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Topology.prototype, "clearElementIdPensName", {
        // 需要清除 elementId 的图形，复制时用
        get: function () {
            return ['echarts', 'textbox'];
        },
        enumerable: true,
        configurable: true
    });
    Topology.prototype.setupDom = function (parent) {
        if (typeof parent === 'string') {
            this.parentElem = document.getElementById(parent);
        }
        else {
            this.parentElem = parent;
        }
        this.parentElem.style.position = 'relative';
        this.parentElem.style.overflow = 'auto';
        this.parentElem.onresize = this.winResize;
        window.addEventListener('resize', this.winResize);
        var id = this.id;
        this.activeLayer = new activeLayer_ActiveLayer(this.options, id);
        this.activeLayer.topology = this;
        this.hoverLayer = new hoverLayer_HoverLayer(this.options, id);
        this.animateLayer = new animateLayer_AnimateLayer(this.options, id);
        this.offscreen = new offscreen_Offscreen(this.parentElem, this.options, id);
        this.canvas = new renderLayer_RenderLayer(this.parentElem, this.options, id);
        this.divLayer = new divLayer_DivLayer(this.parentElem, this.options, id);
        this.options.scroll && (this.scrollDom = new scroll_Scroll(this));
        this.input.style.position = 'absolute';
        this.input.style.zIndex = '-1';
        this.input.style.left = '-1000px';
        this.input.style.width = '0';
        this.input.style.height = '0';
        this.input.style.outline = 'none';
        this.input.style.border = '1px solid #cdcdcd';
        this.input.style.resize = 'none';
        this.parentElem.appendChild(this.input);
        this.createMarkdownTip();
        this.resize();
    };
    Topology.prototype.setupSubscribe = function () {
        var _this = this;
        this.subcribe = le5le_store["Store"].subscribe(this.generateStoreKey('LT:render'), function () {
            _this.render();
        });
        this.subcribeRender = le5le_store["Store"].subscribe('LT:render', function () {
            _this.render();
        });
        this.subcribeImage = le5le_store["Store"].subscribe(this.generateStoreKey('LT:imageLoaded'), function () {
            if (_this.imageTimer) {
                clearTimeout(_this.imageTimer);
            }
            _this.imageTimer = setTimeout(function () {
                _this.render();
            }, 100);
        });
        this.subcribeAnimateMoved = le5le_store["Store"].subscribe(this.generateStoreKey('LT:rectChanged'), function (e) {
            _this.activeLayer.updateLines([e]);
        });
        this.subcribeMediaEnd = le5le_store["Store"].subscribe(this.generateStoreKey('mediaEnd'), function (node) {
            if (node.nextPlay) {
                _this.animateLayer.readyPlay(node.nextPlay);
                _this.animateLayer.animate();
            }
            _this.dispatch('mediaEnd', node);
        });
        this.subcribeAnimateEnd = le5le_store["Store"].subscribe(this.generateStoreKey('animateEnd'), function (pen) {
            if (!pen) {
                return;
            }
            switch (pen.type) {
                case PenType.Node:
                    _this.offscreen.render();
                    break;
            }
            _this.dispatch('animateEnd', pen);
        });
        this.subcribeEmit = le5le_store["Store"].subscribe(this.generateStoreKey('LT:emit'), function (e) {
            // TODO: 此处为何不使用 dispatch
            _this.emit(e.event, e);
        });
    };
    Topology.prototype.setupMouseEvent = function () {
        var _this = this;
        this.canvasPos = this.divLayer.canvas.getBoundingClientRect();
        this.parentElem.addEventListener('scroll', this.onScroll);
        window.addEventListener('scroll', this.onScroll);
        this.divLayer.canvas.ondragover = function (event) { return event.preventDefault(); };
        this.divLayer.canvas.ondrop = function (event) {
            if (_this.data.locked) {
                return;
            }
            try {
                var json = event.dataTransfer.getData('Topology') || event.dataTransfer.getData('Text');
                if (!json)
                    return;
                var obj = JSON.parse(json);
                event.preventDefault();
                var pt = _this.calibrateMouse({ x: event.offsetX, y: event.offsetY });
                _this.dropNodes(Array.isArray(obj) ? obj : [obj], pt.x, pt.y);
                _this.activeLayer.calcActiveRect();
            }
            catch (_a) { }
        };
        if (isMobile()) {
            this.options.refresh = 50;
            // ipad
            document.addEventListener('gesturestart', this.preventDefault);
            // end
            this.divLayer.canvas.ontouchstart = function (event) {
                _this.touchStart = Date.now();
                var pos = new Point(event.changedTouches[0].pageX - window.scrollX - (_this.canvasPos.left || _this.canvasPos.x), event.changedTouches[0].pageY - window.scrollY - (_this.canvasPos.top || _this.canvasPos.y));
                if (event.touches.length > 1) {
                    _this.touches = event.touches;
                    _this.touchScale = _this.data.scale;
                    _this.lastTranlated.x = pos.x;
                    _this.lastTranlated.y = pos.y;
                    return;
                }
                var pt = _this.calibrateMouse({ x: pos.x, y: pos.y });
                _this.getMoveIn(pt);
                _this.hoverLayer.node = _this.moveIn.hoverNode;
                _this.hoverLayer.line = _this.moveIn.hoverLine;
                _this.lastTranlated.x = pos.x;
                _this.lastTranlated.y = pos.y;
                _this.onmousedown({
                    x: pos.x,
                    y: pos.y,
                    ctrlKey: event.ctrlKey || event.metaKey,
                    shiftKey: event.shiftKey,
                    altKey: event.altKey,
                    button: 0,
                });
            };
            this.divLayer.canvas.ontouchmove = function (event) {
                event.stopPropagation();
                var touches = event.changedTouches;
                var len = touches.length;
                if (!_this.touchCenter && len > 1) {
                    _this.touchCenter = {
                        x: touches[0].pageX + (touches[1].pageX - touches[0].pageX) / 2,
                        y: touches[0].pageY + (touches[1].pageY - touches[0].pageY) / 2,
                    };
                    // 计算鼠标位置根据画布偏移
                    _this.calibrateMouse(_this.touchCenter);
                }
                var timeNow = Date.now();
                if (timeNow - _this.touchStart < 50) {
                    return;
                }
                if (len > 1) {
                    if (len === 2) {
                        var scale = event.scale ||
                            Math.hypot(touches[0].pageX - touches[1].pageX, touches[0].pageY - touches[1].pageY) /
                                Math.hypot(_this.touches[0].pageX - _this.touches[1].pageX, _this.touches[0].pageY - _this.touches[1].pageY);
                        event.preventDefault();
                        _this.scaleTo(scale * _this.touchScale, _this.touchCenter);
                    }
                    else if (len === 3) {
                        var pos_1 = new Point(touches[0].pageX - window.scrollX - (_this.canvasPos.left || _this.canvasPos.x), touches[0].pageY - window.scrollY - (_this.canvasPos.top || _this.canvasPos.y));
                        _this.translate(pos_1.x, pos_1.y, true);
                    }
                    return;
                }
                event.preventDefault();
                var pos = new Point(event.changedTouches[0].pageX - window.scrollX - (_this.canvasPos.left || _this.canvasPos.x), event.changedTouches[0].pageY - window.scrollY - (_this.canvasPos.top || _this.canvasPos.y));
                _this.onMouseMove({
                    x: pos.x,
                    y: pos.y,
                    ctrlKey: event.ctrlKey || event.metaKey,
                    shiftKey: event.shiftKey,
                    altKey: event.altKey,
                    buttons: 1,
                });
            };
            this.divLayer.canvas.ontouchend = function (event) {
                _this.touches = undefined;
                _this.ontouchend(event);
            };
        }
        else {
            this.divLayer.canvas.onmousedown = function (event) {
                if (event.target.nodeName === 'INPUT' && event.target.type === 'range' && _this.data.locked) {
                    return;
                }
                if (_this.touchedNode) {
                    if (_this.touchedNode.name === 'graffiti') {
                        _this.touchedNode.rect = new rect_Rect(0, 0, 0, 0);
                        _this.addNode(_this.touchedNode);
                        _this.touchedNode = undefined;
                    }
                    else if (_this.touchedNode.name === 'lines') {
                        _this.addLine(_this.touchedNode);
                        _this.touchedNode = undefined;
                    }
                }
                var e = {
                    x: event.pageX - window.scrollX - (_this.canvasPos.left || _this.canvasPos.x),
                    y: event.pageY - window.scrollY - (_this.canvasPos.top || _this.canvasPos.y),
                    ctrlKey: event.ctrlKey || event.metaKey,
                    shiftKey: event.shiftKey,
                    altKey: event.altKey,
                    button: event.button,
                    pageX: event.pageX,
                    pageY: event.pageY
                };
                _this.lastTranlated.x = e.x;
                _this.lastTranlated.y = e.y;
                _this.onmousedown(e);
            };
            this.divLayer.canvas.onmousemove = function (event) {
                _this.onMouseMove({
                    x: event.pageX - window.scrollX - (_this.canvasPos.left || _this.canvasPos.x),
                    y: event.pageY - window.scrollY - (_this.canvasPos.top || _this.canvasPos.y),
                    ctrlKey: event.ctrlKey || event.metaKey,
                    shiftKey: event.shiftKey,
                    altKey: event.altKey,
                    buttons: event.buttons,
                    pageX: event.pageX,
                    pageY: event.pageY,
                });
            };
            this.divLayer.canvas.onmouseup = function (event) {
                var e = {
                    x: event.pageX - window.scrollX - (_this.canvasPos.left || _this.canvasPos.x),
                    y: event.pageY - window.scrollY - (_this.canvasPos.top || _this.canvasPos.y),
                    ctrlKey: event.ctrlKey || event.metaKey,
                    shiftKey: event.shiftKey,
                    altKey: event.altKey,
                    button: event.button,
                };
                _this.onmouseup(e);
                if (!_this.touchedNode) {
                    return;
                }
                _this.touchedNode.rect.x = event.pageX - window.scrollX - _this.canvasPos.x - _this.touchedNode.rect.width / 2;
                _this.touchedNode.rect.y = event.pageY - window.scrollY - _this.canvasPos.y - _this.touchedNode.rect.height / 2;
                var node = new node_Node(_this.touchedNode);
                _this.addNode(node, true);
                _this.touchedNode = undefined;
            };
        }
        this.divLayer.canvas.ondblclick = this.ondblclick;
        this.divLayer.canvas.tabIndex = 0;
        this.divLayer.canvas.onblur = function () {
            _this.mouseDown = undefined;
        };
        this.divLayer.canvas.onwheel = function (event) {
            if (_this.options.scroll && !event.ctrlKey && _this.scrollDom) {
                _this.scrollDom.wheel(event.deltaY < 0);
                return;
            }
            if (_this.data.locked === Lock.NoEvent)
                return;
            var timeNow = new Date().getTime();
            if (timeNow - _this.touchStart < 20) {
                event.preventDefault();
                event.stopPropagation();
                return;
            }
            _this.touchStart = new Date().getTime();
            if (_this.options.disableScale) {
                return;
            }
            switch (_this.options.scaleKey) {
                case KeyType.Ctrl:
                    if (!event.ctrlKey && !event.metaKey) {
                        return;
                    }
                    break;
                case KeyType.Shift:
                    if (!event.shiftKey) {
                        return;
                    }
                    break;
                case KeyType.Alt:
                    if (!event.altKey) {
                        return;
                    }
                    break;
            }
            event.preventDefault();
            event.stopPropagation();
            var pos = new Point(event.x - window.scrollX - (_this.canvasPos.left || _this.canvasPos.x), event.y - window.scrollY - (_this.canvasPos.top || _this.canvasPos.y));
            // 计算鼠标位置根据画布偏移
            _this.calibrateMouse(pos);
            var scale = _this.data.scale;
            if (event.deltaY < 0) {
                scale += 0.1;
            }
            else {
                scale -= 0.1;
            }
            _this.scaleTo(scale, pos);
            _this.divLayer.canvas.focus();
            return false;
        };
        switch (this.options.keydown) {
            case KeydownType.Document:
                document.addEventListener('keydown', this.onkeydown);
                document.addEventListener('keyup', function () {
                    _this.spaceDown = false;
                });
                break;
            case KeydownType.Canvas:
                this.divLayer.canvas.addEventListener('keydown', this.onkeydown);
                break;
        }
    };
    Topology.prototype.ontouchend = function (event) {
        var pos = new Point(event.changedTouches[0].pageX - window.scrollX - (this.canvasPos.left || this.canvasPos.x), event.changedTouches[0].pageY - window.scrollY - (this.canvasPos.top || this.canvasPos.y));
        this.onmouseup({
            x: pos.x,
            y: pos.y,
            ctrlKey: event.ctrlKey || event.metaKey,
            shiftKey: event.shiftKey,
            altKey: event.altKey,
            button: 0,
        });
        if (!this.touchedNode) {
            return;
        }
        this.touchedNode.rect.x =
            event.changedTouches[0].pageX - window.scrollX - this.canvasPos.x - this.touchedNode.rect.width / 2;
        this.touchedNode.rect.y =
            event.changedTouches[0].pageY - window.scrollY - this.canvasPos.y - this.touchedNode.rect.height / 2;
        var node = new node_Node(this.touchedNode);
        this.addNode(node, true);
        this.touchedNode = undefined;
    };
    Topology.prototype.resize = function (size) {
        this.canvas.resize(size);
        this.offscreen.resize(size);
        this.divLayer.resize(size);
        this.render();
        this.dispatch('resize', size);
        if (this.scrollDom && this.scrollDom.isShow) {
            this.scrollDom.init();
        }
    };
    Topology.prototype.dropNodes = function (jsonList, offsetX, offsetY) {
        var _this = this;
        var x = 0, y = 0;
        if (jsonList.length && jsonList[0].rect) {
            var rect = jsonList[0].rect;
            x = rect.x;
            y = rect.y;
        }
        var firstNode;
        jsonList.forEach(function (json) {
            json.id = s8();
            if (json.name === 'graffiti') {
                json.rect = new rect_Rect(0, 0, 0, 0);
                _this.addNode(json);
                return;
            }
            else if (json.name === 'lines') {
                _this.addLine(json);
                _this.mouseDown = {
                    x: offsetX,
                    y: offsetY,
                };
                _this.onmouseup(_this.mouseDown);
                return;
            }
            if (!firstNode) {
                json.rect.x = (offsetX - json.rect.width / 2) << 0;
                json.rect.y = (offsetY - json.rect.height / 2) << 0;
                firstNode = json;
            }
            else {
                //Layout relative to the first node
                var rect = json.rect;
                var dx = rect.x - x, dy = rect.y - y;
                json.rect.x = firstNode.rect.x + dx;
                json.rect.y = firstNode.rect.y + dy;
            }
            if (json.type === PenType.Line) {
                _this.addLine(Object.assign({
                    name: 'line',
                    from: new Point(json.rect.x, json.rect.y),
                    fromArrow: _this.data.fromArrow,
                    to: new Point(json.rect.x + json.rect.width, json.rect.y + json.rect.height),
                    toArrow: _this.data.toArrow,
                    strokeStyle: _this.options.color,
                }, json), true);
            }
            else {
                _this.addNode(json, true);
            }
        });
        this.divLayer.canvas.focus();
    };
    Topology.prototype.addNode = function (node, focus) {
        var _this = this;
        if (focus === void 0) { focus = false; }
        if (!drawNodeFns[node.name]) {
            return null;
        }
        node.TID = this.id;
        // if it's not a Node
        if (!node.init) {
            node = new node_Node(node);
        }
        if (!node.strokeStyle && this.options.color) {
            node.strokeStyle = this.options.color;
        }
        fontKeys.forEach(function (key) {
            if (!node[key]) {
                node[key] = _this.options[key];
            }
        });
        if (this.data.scale !== 1) {
            node.scale(this.data.scale);
        }
        this.data.pens.push(node);
        if (focus) {
            // fix bug: add echart
            if (node.name === 'echarts') {
                setTimeout(function () {
                    _this.activeLayer.pens = [node];
                    _this.render();
                }, 50);
            }
            else {
                this.activeLayer.pens = [node];
            }
        }
        if (node.name !== 'graffiti' || !node.doing) {
            this.render();
            this.animate(true);
            this.cache();
        }
        else {
            this.moveIn.type = MoveInType.Graffiti;
            this.moveIn.hoverNode = node;
        }
        this.dispatch('addNode', node);
        return node;
    };
    Topology.prototype.addLine = function (line, focus) {
        if (focus === void 0) { focus = false; }
        if (line.type === PenType.Node) {
            line.isNode = true;
        }
        line.TID = this.id;
        if (!line.clone) {
            line = new line_Line(line);
            line.calcControlPoints(true);
        }
        if (this.data.scale !== 1) {
            if (line.name !== 'lines') {
                line.scale(this.data.scale, line.getCenter());
            }
            else {
                line.fontSize *= this.data.scale;
            }
        }
        this.data.pens.push(line);
        if (line.name !== 'lines' || !line.doing) {
            if (focus) {
                this.activeLayer.setPens([line]);
                this.render();
                this.animate(true);
                this.cache();
                this.dispatch('addLine', line);
            }
        }
        else {
            this.activeLayer.clear();
            this.hoverLayer.line = undefined;
            this.moveIn.type = MoveInType.Lines;
            this.moveIn.hoverLine = line;
        }
        return line;
    };
    // Render or redraw
    Topology.prototype.render = function (noFocus) {
        if (noFocus) {
            this.activeLayer.pens = [];
            this.hoverLayer.node = undefined;
            this.hoverLayer.line = undefined;
        }
        if (this.rendering) {
            return this;
        }
        this.rendering = true;
        // 获取 ctx 对象
        var ctx = this.offscreen.canvas.getContext('2d');
        ctx.clearRect(0, 0, this.offscreen.canvas.width, this.offscreen.canvas.height);
        ctx.save();
        ctx.translate(this.data.x, this.data.y);
        this.offscreen.render();
        ctx.restore();
        this.canvas.render();
        this.rendering = false;
    };
    // open - redraw by the data
    Topology.prototype.open = function (data) {
        if (typeof data !== 'string' && data && data.mqttOptions && !data.mqttOptions.customClientId) {
            data.mqttOptions.clientId = s8();
        }
        this.canvas.clearBkImg();
        this.data = createData(data, this.id);
        this.subscribeSocket();
        le5le_store["Store"].set(this.generateStoreKey('LT:scale'), this.data.scale);
        this.dispatch('scale', this.data.scale);
        le5le_store["Store"].set('LT:bkColor', this.data.bkColor);
        this.lock(this.data.locked);
        this.caches.list = [];
        createCacheTable(); // 清空数据
        this.caches.dbIndex = -1;
        this.cache();
        this.divLayer.clear();
        this.animateLayer.stop();
        this.render(true);
        this.parentElem.scrollLeft = 0;
        this.parentElem.scrollTop = 0;
        this.animate(true);
        this.openSocket();
        this.openMqtt();
        this.doInitJS();
        this.dispatch('opened');
        if (this.scrollDom && this.scrollDom.isShow) {
            this.scrollDom.init();
        }
    };
    /**
     * 执行初始化函数 initJS
     * */
    Topology.prototype.doInitJS = function () {
        if (this.data.initJS && this.data.initJS.trim()) {
            // 字符串类型存在
            var fn = new Function(this.data.initJS);
            fn();
        }
    };
    Topology.prototype.openSocket = function (url) {
        var _this = this;
        this.closeSocket();
        if (url || this.data.websocket) {
            this.socket = new Socket(url || this.data.websocket, function (e) {
                if (_this.data.socketEvent !== 1) {
                    _this.doSocket(e.data);
                }
                _this.data.socketEvent && _this.dispatch('websocket', e.data);
            });
        }
    };
    Topology.prototype.closeSocket = function () {
        if (this.socket) {
            this.socket.close();
        }
    };
    Topology.prototype.openMqtt = function (url, options) {
        var _this = this;
        this.closeMqtt();
        if (url || this.data.mqttUrl) {
            this.mqtt = new mqtt_MQTT(url || this.data.mqttUrl, options || this.data.mqttOptions, this.data.mqttTopics, function (topic, message) {
                if (_this.data.socketEvent !== 1) {
                    _this.doSocket(message.toString(), EventType.Mqtt);
                }
                _this.data.socketEvent && _this.dispatch('mqtt', { topic: topic, message: message });
            });
        }
    };
    Topology.prototype.closeMqtt = function () {
        if (this.mqtt) {
            this.mqtt.close();
        }
    };
    Topology.prototype.doSocket = function (message, type) {
        var _this = this;
        if (type === void 0) { type = EventType.WebSocket; }
        try {
            message = JSON.parse(message);
            if (!Array.isArray(message)) {
                message = [message];
            }
            message.forEach(function (item) {
                var actions = [];
                if (item.actions) {
                    actions = item.actions;
                    delete item.actions;
                }
                var pens = find(item.id || item.tag, _this.data.pens);
                pens.forEach(function (pen) {
                    if (pen.id === item.id || (pen.tags && pen.tags.indexOf(item.tag) > -1)) {
                        pen.fromData(pen, item);
                        pen.doWheres();
                        if (pen.events) {
                            pen.events.forEach(function (event) {
                                if (event.type === type) {
                                    event.params = item;
                                    actions.push(event);
                                }
                            });
                        }
                        actions &&
                            actions.forEach(function (action) {
                                pen.doAction(action);
                            });
                    }
                });
                _this.willRender();
            });
        }
        catch (error) {
            console.warn(error);
        }
    };
    Topology.prototype.overflow = function (padding) {
        if (padding === void 0) { padding = 50; }
        var rect = this.getRect();
        var width = rect.width, height = rect.height;
        if (width < rect.ex) {
            width = rect.ex + padding;
        }
        if (width < this.canvas.width) {
            width = this.canvas.width;
        }
        if (height < rect.ey) {
            height = rect.ey + padding;
        }
        if (height < this.canvas.height) {
            height = this.canvas.height;
        }
        var size = { width: width, height: height };
        this.resize(size);
        return size;
    };
    Topology.prototype.setNodeText = function () {
        this.inputObj.text = this.input.value;
        if (this.inputObj.name === 'image') {
            this.inputObj.init();
        }
        this.input.style.zIndex = '-1';
        this.input.style.left = '-1000px';
        this.input.style.width = '0';
        this.cache();
        this.offscreen.render();
        this.dispatch('setText', this.inputObj);
        this.inputObj = undefined;
    };
    Topology.prototype.getMoveIn = function (pt) {
        if (this.moveIn.type >= MoveInType.Graffiti) {
            return;
        }
        this.lastHoverNode = this.moveIn.hoverNode;
        this.lastHoverLine = this.moveIn.hoverLine;
        this.moveIn.type = MoveInType.None;
        this.moveIn.hoverNode = undefined;
        this.moveIn.lineControlPoint = undefined;
        this.moveIn.hoverLine = undefined;
        this.hoverLayer.hoverAnchorIndex = -1;
        if (!this.data.locked &&
            !(this.activeLayer.pens.length === 1 && this.activeLayer.pens[0].type) &&
            !this.activeLayer.locked() &&
            this.activeLayer.rotateCPs[0] &&
            this.activeLayer.rotateCPs[0].hit(pt, 15)) {
            this.moveIn.type = MoveInType.Rotate;
            var cursor = this.options.rotateCursor;
            this.divLayer.canvas.style.cursor = cursor.includes('/') ? "url(\"" + cursor + "\"), auto" : cursor;
            return;
        }
        if (this.activeLayer.pens.length > 1 && pointInRect(pt, this.activeLayer.sizeCPs)) {
            this.moveIn.type = MoveInType.Nodes;
        }
        if (!this.data.locked && !this.activeLayer.locked() && !this.options.hideSizeCP) {
            if (this.activeLayer.pens.length > 1 ||
                (!this.activeLayer.pens[0].type && !this.activeLayer.pens[0].hideSizeCP)) {
                for (var i = 0; i < this.activeLayer.sizeCPs.length; ++i) {
                    if (this.activeLayer.sizeCPs[i].hit(pt, 10)) {
                        this.moveIn.type = MoveInType.ResizeCP;
                        this.moveIn.activeAnchorIndex = i;
                        this.divLayer.canvas.style.cursor = resizeCursors[i];
                        return;
                    }
                }
            }
        }
        // In active pen.
        if (!this.data.locked) {
            for (var _i = 0, _a = this.activeLayer.pens; _i < _a.length; _i++) {
                var item = _a[_i];
                if (item instanceof line_Line && !item.locked) {
                    for (var i = 0; i < item.controlPoints.length; ++i) {
                        if (!item.locked && item.controlPoints[i].hit(pt, 10)) {
                            item.controlPoints[i].id = i;
                            this.moveIn.type = MoveInType.LineControlPoint;
                            this.moveIn.lineControlPoint = item.controlPoints[i];
                            this.moveIn.hoverLine = item;
                            this.divLayer.canvas.style.cursor = 'pointer';
                            return;
                        }
                    }
                    if (this.inLine(pt, item)) {
                        return;
                    }
                }
            }
        }
        this.divLayer.canvas.style.cursor = 'default';
        var len = this.data.pens.length;
        var inLine;
        for (var i = len - 1; i > -1; --i) {
            if (this.data.pens[i].type === PenType.Node && this.inNode(pt, this.data.pens[i])) {
                if (inLine && this.moveIn.type !== MoveInType.HoverAnchors) {
                    this.inLine(pt, inLine);
                }
                return;
            }
            else if (this.data.pens[i].type === PenType.Line && this.inLine(pt, this.data.pens[i])) {
                // 优先判断是否在节点锚点上
                inLine = this.data.pens[i];
            }
        }
    };
    Topology.prototype.inChildNode = function (pt, children) {
        if (!children) {
            return null;
        }
        var len = children.length;
        for (var i = len - 1; i > -1; --i) {
            var item = children[i];
            if (!item.visible || item.locked === Lock.NoEvent) {
                continue;
            }
            if (item.type === PenType.Line) {
                if (this.inLine(pt, item)) {
                    return item;
                }
                continue;
            }
            var node = this.inChildNode(pt, item.children);
            if (node) {
                return node;
            }
            node = this.inNode(pt, item, true);
            if (node) {
                return node;
            }
        }
        return null;
    };
    Topology.prototype.inNode = function (pt, node, inChild) {
        if (inChild === void 0) { inChild = false; }
        if (this.data.locked === Lock.NoEvent || !node.visible || node.locked === Lock.NoEvent) {
            return null;
        }
        var child = this.inChildNode(pt, node.children);
        if (child) {
            if (this.moveIn.type < MoveInType.HoverAnchors) {
                this.moveIn.type = MoveInType.Nodes;
                if (child.stand) {
                    this.moveIn.activeNode = child;
                }
                else {
                    this.moveIn.activeNode = node;
                }
            }
            return child;
        }
        if (node.hitInSelf(pt)) {
            this.moveIn.hoverNode = node;
            this.moveIn.type = MoveInType.Nodes;
            if (!this.data.locked && !node.locked) {
                this.divLayer.canvas.style.cursor = 'move';
            }
            else {
                this.divLayer.canvas.style.cursor = this.options.hoverCursor;
            }
            // Too small
            if (!this.data.locked &&
                !node.locked &&
                !(this.options.hideAnchor || node.hideAnchor || node.rect.width < 20 || node.rect.height < 20)) {
                for (var j = 0; j < node.rotatedAnchors.length; ++j) {
                    if (node.rotatedAnchors[j].hit(pt, this.options.anchorSize)) {
                        if (!this.mouseDown && node.rotatedAnchors[j].mode === AnchorMode.In) {
                            continue;
                        }
                        this.moveIn.type = MoveInType.HoverAnchors;
                        this.moveIn.hoverAnchorIndex = j;
                        this.hoverLayer.hoverAnchorIndex = j;
                        this.divLayer.canvas.style.cursor = 'crosshair';
                        break;
                    }
                }
                if (this.options.autoAnchor && node.rect.center.hit(pt, this.options.anchorSize)) {
                    this.moveIn.hoverNode = node;
                    this.moveIn.type = MoveInType.AutoAnchor;
                    this.divLayer.canvas.style.cursor = 'crosshair';
                }
            }
            if (!inChild) {
                this.moveIn.activeNode = this.moveIn.hoverNode;
            }
            return node;
        }
        if (this.options.hideAnchor || node.hideAnchor || this.data.locked || node.locked) {
            return null;
        }
        if (node.hitInSelf(pt, this.options.anchorSize)) {
            for (var j = 0; j < node.rotatedAnchors.length; ++j) {
                if (node.rotatedAnchors[j].hit(pt, this.options.anchorSize)) {
                    if (!this.mouseDown && node.rotatedAnchors[j].mode === AnchorMode.In) {
                        continue;
                    }
                    this.moveIn.hoverNode = node;
                    this.moveIn.type = MoveInType.HoverAnchors;
                    this.moveIn.hoverAnchorIndex = j;
                    this.hoverLayer.hoverAnchorIndex = j;
                    this.divLayer.canvas.style.cursor = 'crosshair';
                    if (!inChild) {
                        this.moveIn.activeNode = node;
                    }
                    return node;
                }
            }
        }
        return null;
    };
    Topology.prototype.inLine = function (point, line) {
        if (this.data.locked === Lock.NoEvent || !line.visible || line.locked === Lock.NoEvent) {
            return null;
        }
        if (line.children) {
            for (var _i = 0, _a = line.children; _i < _a.length; _i++) {
                var child = _a[_i];
                var l = this.inLine(point, child);
                if (l) {
                    return l;
                }
            }
        }
        if (line.from) {
            if (line.from.hit(point, this.options.anchorSize)) {
                this.moveIn.type = MoveInType.LineFrom;
                this.moveIn.hoverLine = line;
                if (this.data.locked || line.locked) {
                    this.divLayer.canvas.style.cursor = this.options.hoverCursor;
                }
                else {
                    this.divLayer.canvas.style.cursor = 'move';
                }
                return line;
            }
            if (line.to.hit(point, this.options.anchorSize)) {
                this.moveIn.type = MoveInType.LineTo;
                this.moveIn.hoverLine = line;
                if (this.data.locked || line.locked) {
                    this.divLayer.canvas.style.cursor = this.options.hoverCursor;
                }
                else {
                    this.divLayer.canvas.style.cursor = 'move';
                }
                return line;
            }
            if (line.pointIn(point)) {
                this.moveIn.type = MoveInType.Line;
                this.moveIn.hoverLine = line;
                this.divLayer.canvas.style.cursor = this.options.hoverCursor;
                return line;
            }
        }
        return null;
    };
    Topology.prototype.getLineDock = function (point, mode) {
        if (mode === void 0) { mode = AnchorMode.Default; }
        this.hoverLayer.dockAnchor = undefined;
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item instanceof node_Node) {
                var pen = item.hit(point, 10);
                if (!pen) {
                    continue;
                }
                if (pen.type === PenType.Line) {
                    if (pen.from.hit(point, 10)) {
                        point.x = pen.from.x;
                        point.y = pen.from.y;
                        this.hoverLayer.dockAnchor = pen.from;
                        break;
                    }
                    if (pen.to.hit(point, 10)) {
                        point.x = pen.to.x;
                        point.y = pen.to.y;
                        this.hoverLayer.dockAnchor = pen.to;
                        break;
                    }
                    break;
                }
                this.hoverLayer.node = pen;
                if (this.options.autoAnchor && pen.rect.center.hit(point, 10)) {
                    point.id = pen.id;
                    point.autoAnchor = true;
                    point.x = pen.rect.center.x;
                    point.y = pen.rect.center.y;
                    this.hoverLayer.dockAnchor = pen.rect.center;
                }
                for (var i = 0; i < pen.rotatedAnchors.length; ++i) {
                    if (pen.rotatedAnchors[i].mode && pen.rotatedAnchors[i].mode !== mode) {
                        continue;
                    }
                    if (pen.rotatedAnchors[i].hit(point, 10)) {
                        point.id = pen.id;
                        point.anchorIndex = i;
                        point.autoAnchor = false;
                        point.direction = pen.rotatedAnchors[i].direction;
                        point.x = pen.rotatedAnchors[i].x;
                        point.y = pen.rotatedAnchors[i].y;
                        this.hoverLayer.dockAnchor = pen.rotatedAnchors[i];
                        break;
                    }
                }
                if (this.hoverLayer.dockAnchor) {
                    break;
                }
            }
            else if (item instanceof line_Line) {
                if (item.id === this.hoverLayer.line.id) {
                    continue;
                }
                if (item.children) {
                    var found = false;
                    for (var _b = 0, _c = item.children; _b < _c.length; _b++) {
                        var child = _c[_b];
                        if (child.from.hit(point, 10)) {
                            point.x = child.from.x;
                            point.y = child.from.y;
                            this.hoverLayer.dockAnchor = child.from;
                            found = true;
                            break;
                        }
                        if (child.to.hit(point, 10)) {
                            point.x = child.to.x;
                            point.y = child.to.y;
                            this.hoverLayer.dockAnchor = child.to;
                            found = true;
                            break;
                        }
                        if (child.controlPoints) {
                            for (var _d = 0, _e = child.controlPoints; _d < _e.length; _d++) {
                                var cp = _e[_d];
                                if (cp.hit(point, 10)) {
                                    point.x = cp.x;
                                    point.y = cp.y;
                                    this.hoverLayer.dockAnchor = cp;
                                    found = true;
                                    break;
                                }
                            }
                        }
                    }
                    if (found) {
                        continue;
                    }
                }
                else {
                    if (item.from.hit(point, 10)) {
                        point.x = item.from.x;
                        point.y = item.from.y;
                        this.hoverLayer.dockAnchor = item.from;
                        continue;
                    }
                    if (item.to.hit(point, 10)) {
                        point.x = item.to.x;
                        point.y = item.to.y;
                        this.hoverLayer.dockAnchor = item.to;
                        continue;
                    }
                    if (item.controlPoints) {
                        for (var _f = 0, _g = item.controlPoints; _f < _g.length; _f++) {
                            var cp = _g[_f];
                            if (cp.hit(point, 10)) {
                                point.x = cp.x;
                                point.y = cp.y;
                                this.hoverLayer.dockAnchor = cp;
                                break;
                            }
                        }
                    }
                }
            }
        }
        return point;
    };
    Topology.prototype.getPensInRect = function (rect) {
        var _this = this;
        if (rect.width < 0) {
            rect.width = -rect.width;
            rect.x = rect.ex;
            rect.ex = rect.x + rect.width;
        }
        if (rect.height < 0) {
            rect.height = -rect.height;
            rect.y = rect.ey;
            rect.ey = rect.y + rect.height;
        }
        this.activeLayer.pens = [];
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item.locked === Lock.NoEvent) {
                continue;
            }
            if (item instanceof node_Node) {
                if (rect.hitByRect(item.rect)) {
                    this.activeLayer.add(item);
                }
            }
            if (item instanceof line_Line) {
                if (item.children) {
                    item.children.forEach(function (child) {
                        if (rect.hit(child.from) && rect.hit(child.to)) {
                            _this.activeLayer.add(child);
                        }
                    });
                }
                else if (rect.hit(item.from) && rect.hit(item.to)) {
                    this.activeLayer.add(item);
                }
            }
        }
    };
    Topology.prototype.getAngle = function (pt) {
        if (pt.x === this.activeLayer.rect.center.x) {
            return pt.y <= this.activeLayer.rect.center.y ? 0 : 180;
        }
        if (pt.y === this.activeLayer.rect.center.y) {
            return pt.x < this.activeLayer.rect.center.x ? 270 : 90;
        }
        var x = pt.x - this.activeLayer.rect.center.x;
        var y = pt.y - this.activeLayer.rect.center.y;
        var angle = (Math.atan(Math.abs(x / y)) / (2 * Math.PI)) * 360;
        if (x > 0 && y > 0) {
            angle = 180 - angle;
        }
        else if (x < 0 && y > 0) {
            angle += 180;
        }
        else if (x < 0 && y < 0) {
            angle = 360 - angle;
        }
        if (this.activeLayer.pens.length === 1) {
            return angle - this.activeLayer.pens[0].rotate;
        }
        return angle;
    };
    Topology.prototype.showInput = function (item) {
        this.inputObj = item;
        var textRect = item.getTextRect();
        this.input.value = item.text || '';
        this.input.style.left = textRect.x + this.data.x + 'px';
        this.input.style.top = textRect.y + this.data.y + 'px';
        this.input.style.width = textRect.width + 'px';
        this.input.style.height = textRect.height + 'px';
        this.input.style.zIndex = '1000';
        if (item.rotate / 360) {
            this.input.style.transform = "rotate(" + item.rotate + "deg)";
        }
        else {
            this.input.style.transform = undefined;
        }
        // 为 textarea 添加 class
        this.input.classList.add('set-text-input');
        this.input.focus();
    };
    // 包含画布偏移量的 Rect，相对与可视区域的内容
    Topology.prototype.getRect = function (pens) {
        if (!pens) {
            pens = this.data.pens;
        }
        var rect = getRect(pens);
        return new rect_Rect(rect.x + this.data.x, rect.y + this.data.y, rect.width, rect.height);
    };
    // Get a dock rect for moving nodes.
    Topology.prototype.getDockPos = function (offsetX, offsetY, noDock) {
        this.hoverLayer.dockLineX = 0;
        this.hoverLayer.dockLineY = 0;
        var offset = {
            x: 0,
            y: 0,
        };
        if (noDock || this.options.disableDockLine) {
            return offset;
        }
        var x = 0;
        var y = 0;
        var disX = dockOffset;
        var disY = dockOffset;
        for (var _i = 0, _a = this.activeLayer.dockWatchers; _i < _a.length; _i++) {
            var activePt = _a[_i];
            for (var _b = 0, _c = this.data.pens; _b < _c.length; _b++) {
                var item = _c[_b];
                if (!(item instanceof node_Node) || this.activeLayer.has(item) || item.name === 'text') {
                    continue;
                }
                // if (!item.dockWatchers) {
                //   item.getDockWatchers();
                // }
                for (var _d = 0, _e = item.dockWatchers; _d < _e.length; _d++) {
                    var p = _e[_d];
                    x = Math.abs(p.x - activePt.x - offsetX);
                    if (x < disX) {
                        disX = -99999;
                        offset.x = p.x - activePt.x;
                        this.hoverLayer.dockLineX = p.x | 0;
                    }
                    y = Math.abs(p.y - activePt.y - offsetY);
                    if (y < disY) {
                        disY = -99999;
                        offset.y = p.y - activePt.y;
                        this.hoverLayer.dockLineY = p.y | 0;
                    }
                }
            }
        }
        return offset;
    };
    Topology.prototype.cache = function () {
        if (this.options.cacheLen == 0 || this.data.locked)
            return;
        if (this.caches.index < this.caches.list.length - 1) {
            this.caches.list.splice(this.caches.index + 1, this.caches.list.length - this.caches.index - 1);
            // 删除 indexDB 的值
            spliceCache(this.caches.dbIndex + 1);
        }
        var data = this.pureData();
        this.caches.list.push(data);
        pushCache(data, this.caches.dbIndex + 1, this.options.cacheLen);
        if (this.caches.list.length > this.ramCaches) {
            this.caches.list.shift();
        }
        this.caches.index = this.caches.list.length - 1;
        this.caches.dbIndex++; // 向后移动
    };
    Topology.prototype.cacheReplace = function (pens) {
        if (this.options.cacheLen == 0)
            return;
        if (pens && pens.length) {
            var needPenMap = {};
            for (var i = 0, len = pens.length; i < len; i++) {
                var pen = pens[i];
                var id = pen.id;
                if (pen instanceof node_Node) {
                    needPenMap[id] = new node_Node(pen);
                }
                else if (pen instanceof line_Line) {
                    needPenMap[id] = new line_Line(pen);
                }
            }
            var cacheListData = this.caches.list[0];
            if (!cacheListData) {
                return;
            }
            for (var i = 0, len = cacheListData.pens.length; i < len; i++) {
                var id = cacheListData.pens[i].id;
                if (needPenMap[id]) {
                    cacheListData.pens[i] = needPenMap[id];
                }
            }
        }
    };
    Topology.prototype.undo = function (noRedo, force) {
        var _this = this;
        if (noRedo === void 0) { noRedo = false; }
        if (this.options.cacheLen == 0)
            return;
        if ((!force && this.data.locked) || this.caches.index < 1) {
            return;
        }
        this.divLayer.clear(true);
        this.animateLayer.stop();
        this.caches.dbIndex--; // 数据库中的位置前移
        this.data = createData(this.caches.list[--this.caches.index], this.id);
        this.render(true);
        this.divLayer.render();
        if (noRedo) {
            this.caches.list.splice(this.caches.index + 1, this.caches.list.length - this.caches.index - 1);
            // 不允许恢复，同时删除数据库中的值
            spliceCache(this.caches.dbIndex);
        }
        // 当 index 到 list 中间时，开始向左侧添加 indexDB 中的内容
        if (this.caches.index <= this.caches.list.length / 2 - 1) {
            var sub = this.caches.index - 0 + 1; // 距离左侧前一个的差距
            getCache(this.caches.dbIndex - sub).then(function (data) {
                if (data) {
                    _this.caches.list.pop();
                    _this.caches.list.unshift(data);
                    _this.caches.index++;
                }
            });
        }
        this.dispatch('undo', this.data);
    };
    Topology.prototype.redo = function (force) {
        var _this = this;
        if (this.options.cacheLen == 0) {
            return;
        }
        if ((!force && this.data.locked) || this.caches.index > this.caches.list.length - 2) {
            return;
        }
        this.divLayer.clear(true);
        this.caches.dbIndex++; // 向后移动
        this.data = createData(this.caches.list[++this.caches.index], this.id);
        this.render(true);
        this.divLayer.render();
        // 当 index 到 list 中间时，开始向右侧加
        if (this.caches.index >= this.caches.list.length / 2) {
            var add = this.caches.list.length - this.caches.index; // 距离右侧的差距
            getCache(this.caches.dbIndex + add).then(function (data) {
                if (data) {
                    _this.caches.list.shift();
                    _this.caches.list.push(data);
                    _this.caches.index--;
                }
            });
        }
        this.dispatch('redo', this.data);
    };
    Topology.prototype.toImage = function (padding, callback) {
        if (padding === void 0) { padding = 0; }
        if (callback === void 0) { callback = undefined; }
        var backRect;
        if (this.data.bkImageRect) {
            // 背景图片相对于画布的 rect
            backRect = new rect_Rect(this.data.bkImageRect.x - this.data.x, this.data.bkImageRect.y - this.data.y, this.data.bkImageRect.width, this.data.bkImageRect.height);
        }
        var rect = getMoreRect(getRect(this.data.pens), backRect);
        var p = formatPadding(padding || 0);
        rect.x -= p[3];
        rect.y -= p[0];
        rect.width += p[3] + p[1];
        rect.height += p[0] + p[2];
        rect.init();
        var dpi = this.offscreen.getDpiRatio();
        rect.scale(dpi);
        backRect && backRect.scale(dpi, rect.center);
        var canvas = document.createElement('canvas');
        canvas.width = rect.width;
        canvas.height = rect.height;
        var ctx = canvas.getContext('2d');
        if (this.data.bkColor || this.options.bkColor) {
            ctx.fillStyle = this.data.bkColor || this.options.bkColor;
            ctx.fillRect(0, 0, canvas.width, canvas.height);
        }
        if (this.data.bkImage && backRect) {
            ctx.drawImage(this.canvas.bkImg, backRect.x - rect.x, backRect.y - rect.y, backRect.width, backRect.height);
        }
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            var pen = void 0;
            if (item.type) {
                pen = new line_Line(item);
            }
            else {
                pen = new node_Node(item, true);
                pen.animateFrames = [];
                pen.img = item.img;
                pen.elementId = '';
                pen.elementLoaded = true;
                pen.elementRendered = true;
            }
            pen.scale(dpi, rect.center);
            pen.translate(-rect.x, -rect.y, true);
            pen.render(ctx);
        }
        ctx.scale(1 / dpi, 1 / dpi);
        if (callback) {
            canvas.toBlob(callback);
        }
        return canvas.toDataURL('image/png', 1);
    };
    Topology.prototype.saveAsImage = function (name, padding) {
        if (padding === void 0) { padding = 0; }
        var a = document.createElement('a');
        a.setAttribute('download', name || 'le5le.topology.png');
        a.setAttribute('href', this.toImage(padding));
        var evt = document.createEvent('MouseEvents');
        evt.initEvent('click', true, true);
        a.dispatchEvent(evt);
    };
    // param:
    //       - string ->idOrTag
    //       - Pen[]  -> will deletes
    Topology.prototype.delete = function (param, force) {
        if (this.data.locked && !force) {
            return;
        }
        var deleted = [];
        if (typeof param === 'string') {
            deleted = del(param, this.data.pens);
        }
        else {
            var pens = param || this.activeLayer.pens;
            for (var i = 0; i < pens.length; i++) {
                var item = pens[i];
                if (item.type === PenType.Line && item.parentId) {
                    var parent_1 = find(item.parentId, this.data.pens)[0];
                    if (parent_1 && parent_1.name === 'lines') {
                        item = parent_1;
                    }
                }
                if (del(item.id, this.data.pens).length) {
                    deleted.push(item);
                    --i;
                    if (item.type === PenType.Node) {
                        this.divLayer.removeDiv(item);
                    }
                    if (this.options.disableEmptyLine) {
                        this.delEmptyLines(item.id);
                    }
                    this.animateLayer.pens.delete(item.id);
                }
            }
        }
        if (deleted.length) {
            this.render(true);
            this.cache();
            this.dispatch('delete', deleted);
        }
    };
    Topology.prototype.deleteAnchors = function (param, force) {
        if (this.data.locked && !force) {
            return;
        }
        var pens = param || this.activeLayer.pens;
        pens.forEach(function (pen) {
            if (pen.type === PenType.Node) {
                pen.manualAnchors = undefined;
                pen.calcAnchors();
            }
        });
    };
    Topology.prototype.delEmptyLines = function (deleteedId) {
        for (var i = 0; i < this.data.pens.length; i++) {
            if (this.data.pens[i].type !== PenType.Line) {
                continue;
            }
            var line = this.data.pens[i];
            if (!line.from.id || !line.to.id || line.from.id === deleteedId || line.to.id === deleteedId) {
                this.data.pens.splice(i, 1);
                this.animateLayer.pens.delete(line.id);
                --i;
            }
        }
    };
    Topology.prototype.cut = function () {
        if (this.data.locked) {
            return;
        }
        this.clipboard = createData({
            pens: [],
        });
        for (var i = 0; i < this.activeLayer.pens.length; i++) {
            var pen = this.activeLayer.pens[i];
            this.clipboard.pens.push(pen.clone());
            var found = this.findIndex(pen);
            if (found > -1) {
                if (pen.type === PenType.Node) {
                    this.divLayer.removeDiv(this.data.pens[found]);
                }
                this.data.pens.splice(found, 1);
            }
        }
        this.cache();
        this.activeLayer.clear();
        this.hoverLayer.node = undefined;
        this.moveIn.hoverLine = undefined;
        this.moveIn.hoverNode = undefined;
        this.render();
        this.dispatch('delete', this.clipboard.pens);
    };
    Topology.prototype.copy = function () {
        this.clipboard = createData({
            pens: [],
        });
        for (var _i = 0, _a = this.activeLayer.pens; _i < _a.length; _i++) {
            var pen = _a[_i];
            this.clipboard.pens.push(pen.clone());
            pen.parentId = null;
        }
        this.dispatch('copy', this.clipboard);
    };
    Topology.prototype.paste = function () {
        if (!this.clipboard || this.data.locked) {
            return;
        }
        this.hoverLayer.node = undefined;
        this.hoverLayer.line = undefined;
        this.activeLayer.pens = [];
        var idMaps = {};
        for (var _i = 0, _a = this.clipboard.pens; _i < _a.length; _i++) {
            var pen = _a[_i];
            this.pastePen(pen, idMaps, 20);
            this.data.pens.push(pen);
            this.activeLayer.add(pen);
        }
        this.render();
        this.animate(true);
        this.cache();
        this.copy();
        this.dispatch('paste', this.clipboard.pens);
    };
    /**
     * 粘贴当前画笔，位置偏移 offset
     * */
    Topology.prototype.pastePen = function (pen, idMaps, offset, parentId) {
        if (idMaps === void 0) { idMaps = {}; }
        if (offset === void 0) { offset = 0; }
        if (!pen.type) {
            var old = pen.id;
            pen.id = s8();
            idMaps[old] = pen.id;
            parentId && (pen.parentId = parentId);
            pen.rect.x += offset;
            pen.rect.ex += offset;
            pen.rect.y += offset;
            pen.rect.ey += offset;
            // 存在自定义瞄点
            if (pen.manualAnchors) {
                // 将 位置偏移 offset
                pen.manualAnchors.forEach(function (pt) {
                    pt.x += offset;
                    pt.y += offset;
                });
            }
            // 存在 points
            if (pen.points) {
                // 将 位置偏移 offset
                pen.points.forEach(function (pt) {
                    pt.x += offset;
                    pt.y += offset;
                });
            }
            // 若是 echarts 等 dom 元素 则清一下 elementId
            if (this.clearElementIdPensName.includes(pen.name)) {
                pen.elementId = undefined;
            }
            pen.init();
        }
        else if (pen instanceof line_Line) {
            pen.id = s8();
            parentId && (pen.parentId = parentId);
            pen.from = new Point(pen.from.x + offset, pen.from.y + offset, pen.from.direction, pen.from.anchorIndex, idMaps[pen.from.id]);
            pen.to = new Point(pen.to.x + offset, pen.to.y + offset, pen.to.direction, pen.to.anchorIndex, idMaps[pen.to.id]);
            var controlPoints = [];
            for (var _i = 0, _a = pen.controlPoints; _i < _a.length; _i++) {
                var pt = _a[_i];
                controlPoints.push(new Point(pt.x + offset, pt.y + offset));
            }
            pen.controlPoints = controlPoints;
        }
        if (pen.children) {
            for (var _b = 0, _c = pen.children; _b < _c.length; _b++) {
                var item = _c[_b];
                this.pastePen(item, idMaps, offset, pen.id);
            }
        }
    };
    // newId(node: any, idMaps: any) {
    //   const old = node.id;
    //   node.id = s8();
    //   idMaps[old] = node.id;
    //   if (node.children) {
    //     for (const item of node.children) {
    //       this.newId(item, idMaps);
    //     }
    //   }
    // }
    Topology.prototype.animate = function (autoplay) {
        if (autoplay === void 0) { autoplay = false; }
        this.animateLayer.readyPlay(undefined, autoplay);
        this.animateLayer.animate();
    };
    Topology.prototype.updateProps = function (cache, pens) {
        if (cache === void 0) { cache = true; }
        if (!pens) {
            pens = this.activeLayer.pens;
        }
        for (var _i = 0, pens_1 = pens; _i < pens_1.length; _i++) {
            var pen = pens_1[_i];
            if (pen instanceof node_Node) {
                if (pen.autoRect) {
                    var ctx = this.canvas.canvas.getContext('2d');
                    var rect = calcTextRect(ctx, pen);
                    pen.rect.width = rect.width + pen.lineWidth * 2;
                    pen.rect.height = rect.height;
                }
                pen.init();
                pen.initRect();
            }
        }
        this.activeLayer.updateLines(pens);
        this.activeLayer.calcControlPoints();
        this.activeLayer.saveNodeRects();
        this.render();
        // tslint:disable-next-line: no-unused-expression
        cache && this.cache();
    };
    Topology.prototype.lock = function (lock) {
        this.data.locked = lock;
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            item.addToDiv && item.addToDiv();
        }
        this.dispatch('locked', this.data.locked);
    };
    Topology.prototype.lockPens = function (pens, lock) {
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            for (var _b = 0, pens_2 = pens; _b < pens_2.length; _b++) {
                var pen = pens_2[_b];
                if (item.id === pen.id) {
                    item.locked = lock;
                    item.addToDiv && item.addToDiv();
                    break;
                }
            }
        }
        this.dispatch('lockPens', {
            pens: pens,
            lock: lock,
        });
    };
    Topology.prototype.up = function (pen, pens) {
        if (!pens) {
            pens = this.data.pens;
        }
        var i = this.findIndex(pen, pens);
        if (i > -1 && i !== pens.length - 1) {
            pens.splice(i + 2, 0, pens[i]);
            pens.splice(i, 1);
        }
        else {
            var parent_2 = getParent(pens, pen);
            if (!parent_2) {
                return;
            }
            this.up(pen, parent_2.children);
        }
    };
    Topology.prototype.top = function (pen, pens) {
        if (!pens) {
            pens = this.data.pens;
        }
        var i = this.findIndex(pen, pens);
        if (i > -1) {
            pens.push(pens[i]);
            pens.splice(i, 1);
        }
        else {
            var parent_3 = getParent(pens, pen);
            if (!parent_3) {
                return;
            }
            this.top(pen, parent_3.children);
        }
    };
    Topology.prototype.down = function (pen, pens) {
        if (!pens) {
            pens = this.data.pens;
        }
        var i = this.findIndex(pen, pens);
        if (i > -1 && i !== 0) {
            pens.splice(i - 1, 0, pens[i]);
            pens.splice(i + 1, 1);
        }
        else {
            var parent_4 = getParent(pens, pen);
            if (!parent_4) {
                return;
            }
            this.down(pen, parent_4.children);
        }
    };
    Topology.prototype.bottom = function (pen, pens) {
        if (!pens) {
            pens = this.data.pens;
        }
        var i = this.findIndex(pen, pens);
        if (i > -1) {
            pens.unshift(pens[i]);
            pens.splice(i + 1, 1);
        }
        else {
            var parent_5 = getParent(pens, pen);
            if (!parent_5) {
                return;
            }
            this.bottom(pen, parent_5.children);
        }
    };
    Topology.prototype.getParent = function (pen) {
        return getParent(this.data.pens, pen);
    };
    Topology.prototype.combine = function (pens, stand) {
        if (stand === void 0) { stand = false; }
        if (!pens) {
            pens = this.activeLayer.pens;
        }
        var rect = getRect(pens);
        for (var _i = 0, pens_3 = pens; _i < pens_3.length; _i++) {
            var item = pens_3[_i];
            var i = this.findIndex(item);
            if (i > -1) {
                this.data.pens.splice(i, 1);
            }
        }
        var node = new node_Node({
            name: 'combine',
            rect: new rect_Rect(rect.x, rect.y, rect.width, rect.height),
            text: '',
            paddingLeft: 0,
            paddingRight: 0,
            paddingTop: 0,
            paddingBottom: 0,
            strokeStyle: 'transparent',
            children: [],
        });
        for (var i = 0; i < pens.length; ++i) {
            if (pens[i].type === PenType.Node && rect.width === pens[i].rect.width && rect.height === pens[i].rect.height) {
                node = pens[i];
                if (!node.children) {
                    node.children = [];
                }
                pens.splice(i, 1);
                break;
            }
        }
        for (var _a = 0, pens_4 = pens; _a < pens_4.length; _a++) {
            var item = pens_4[_a];
            item.stand = stand;
            item.parentId = node.id;
            item.calcRectInParent(node);
            node.children.push(item);
        }
        this.data.pens.push(node);
        this.activeLayer.setPens([node]);
        this.dispatch('combine', node);
        this.cache();
    };
    Topology.prototype.uncombine = function (node) {
        if (!node) {
            node = this.activeLayer.pens[0];
        }
        if (!(node instanceof node_Node)) {
            return;
        }
        for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
            var item = _a[_i];
            item.parentId = undefined;
            item.rectInParent = undefined;
            item.locked = Lock.None;
            this.data.pens.push(item);
        }
        var i = this.findIndex(node);
        if (i > -1 && node.name === 'combine') {
            this.data.pens.splice(i, 1);
        }
        else {
            node.children = undefined;
        }
        this.cache();
        this.activeLayer.clear();
        this.hoverLayer.clear();
        this.dispatch('uncombine', node);
    };
    Topology.prototype.find = function (idOrTag, pens, array) {
        var list;
        if (Array.isArray(pens)) {
            list = pens;
        }
        else {
            list = this.data.pens;
            array = pens;
        }
        var result = find(idOrTag, list);
        if (array) {
            return result;
        }
        if (result.length === 0) {
            return null;
        }
        else if (result.length === 1) {
            return result[0];
        }
        return result;
    };
    Topology.prototype.findIndex = function (pen, pens) {
        if (!pens) {
            pens = this.data.pens;
        }
        return pens.findIndex(function (item) { return item.id === pen.id; });
    };
    Topology.prototype.play = function (idOrTag, pause) {
        this.divLayer.play(idOrTag, pause);
    };
    Topology.prototype.translate = function (x, y, process, noNotice) {
        var _this = this;
        if (!process) {
            this.lastTranlated.x = 0;
            this.lastTranlated.y = 0;
        }
        var offsetX = x - this.lastTranlated.x;
        var offsetY = y - this.lastTranlated.y;
        this.data.x += offsetX;
        this.data.y += offsetY;
        // for (const item of this.data.pens) {
        //   item.translate(offsetX, offsetY);
        // }
        if (this.data.bkImageRect && !this.data.bkImageStatic) {
            this.data.bkImageRect.translate(offsetX, offsetY);
        }
        le5le_store["Store"].set(this.generateStoreKey('LT:updateLines'), this.data.pens);
        this.lastTranlated.x = x;
        this.lastTranlated.y = y;
        this.render();
        this.divLayer.render();
        this.animateLayer.stop();
        if (this.cacheTimer) {
            clearTimeout(this.cacheTimer);
        }
        this.cacheTimer = setTimeout(function () {
            var _a;
            _this.animateLayer.readyPlay(undefined, true);
            _this.animateLayer.animate();
            (_a = _this.cache) === null || _a === void 0 ? void 0 : _a.call(_this);
        }, 300);
        if (!noNotice) {
            this.dispatch('translate', { x: x, y: y });
        }
        if (this.scrollDom && this.scrollDom.isShow) {
            this.scrollDom.translate(x, y);
        }
    };
    // scale for scaled canvas:
    //   > 1, expand
    //   < 1, reduce
    Topology.prototype.scale = function (scale, center) {
        if (this.data.scale * scale < this.options.minScale) {
            scale = this.options.minScale / this.data.scale;
            this.data.scale = this.options.minScale;
        }
        else if (this.data.scale * scale > this.options.maxScale) {
            scale = this.options.maxScale / this.data.scale;
            this.data.scale = this.options.maxScale;
        }
        else {
            this.data.scale = Math.round(this.data.scale * scale * 100) / 100;
        }
        !center && (center = getRect(this.data.pens).center);
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            item.scale(scale, center);
        }
        if (this.data.bkImageRect && !this.data.bkImageStatic) {
            var backCenter = new Point(center.x + this.data.x, center.y + this.data.y);
            this.data.bkImageRect.scale(scale, backCenter);
        }
        le5le_store["Store"].set(this.generateStoreKey('LT:updateLines'), this.data.pens);
        le5le_store["Store"].set(this.generateStoreKey('LT:scale'), this.data.scale);
        this.render();
        this.cache();
        this.dispatch('scale', this.data.scale);
    };
    // scale for origin canvas:
    Topology.prototype.scaleTo = function (scale, center) {
        this.scale(scale / this.data.scale, center);
    };
    Topology.prototype.round = function () {
        for (var _i = 0, _a = this.data.pens; _i < _a.length; _i++) {
            var item = _a[_i];
            if (item instanceof node_Node) {
                item.round();
            }
        }
    };
    Topology.prototype.centerView = function (padding) {
        if (!this.hasView())
            return;
        var rect = this.getRect();
        var viewCenter = this.getViewCenter(padding);
        var center = rect.center;
        this.translate(viewCenter.x - center.x, viewCenter.y - center.y);
        var parentElem = this.canvas.parentElem;
        var x = (parentElem.scrollWidth - parentElem.offsetWidth) / 2;
        var y = (parentElem.scrollHeight - parentElem.offsetHeight) / 2;
        parentElem.scrollTo(x, y);
        return true;
    };
    Topology.prototype.fitView = function (viewPadding) {
        if (!this.hasView())
            return;
        // 1. 重置画布尺寸为容器尺寸
        var parentElem = this.canvas.parentElem;
        var width = parentElem.offsetWidth, height = parentElem.offsetHeight;
        this.resize({
            width: width,
            height: height,
        });
        // 2. 获取设置的留白值
        var padding = formatPadding(viewPadding || this.options.viewPadding);
        // 3. 获取图形尺寸
        var rect = this.getRect();
        // 4. 计算缩放比
        var w = (width - padding[1] - padding[3]) / rect.width;
        var h = (height - padding[0] - padding[2]) / rect.height;
        var ratio = w;
        if (w > h) {
            ratio = h;
        }
        this.scale(ratio);
        // 5. 图形居中
        this.centerView(viewPadding);
    };
    Topology.prototype.hasView = function () {
        return !!this.data.pens.length;
    };
    Topology.prototype.getViewCenter = function (viewPadding) {
        var padding = formatPadding(viewPadding || this.options.viewPadding);
        var _a = this.canvas, width = _a.width, height = _a.height;
        return {
            x: (width - padding[1] - padding[3]) / 2 + padding[3],
            y: (height - padding[0] - padding[2]) / 2 + padding[0],
        };
    };
    Topology.prototype.generateStoreKey = function (key) {
        return this.id + "-" + key;
    };
    Topology.prototype.createMarkdownTip = function () {
        this.tipMarkdown = document.createElement('div');
        this.tipMarkdown.className = 'topology-markdown';
        this.tipMarkdown.style.position = 'fixed';
        this.tipMarkdown.style.zIndex = '-1';
        this.tipMarkdown.style.left = '-9999px';
        this.tipMarkdown.style.padding = '8px 0';
        this.tipMarkdownContent = document.createElement('div');
        this.tipMarkdownContent.style.maxWidth = '320px';
        this.tipMarkdownContent.style.outline = 'none';
        this.tipMarkdownContent.style.borderRadius = '4px';
        this.tipMarkdownContent.style.backgroundColor = 'rgba(0,0,0,.6)';
        this.tipMarkdownContent.style.color = '#fff';
        this.tipMarkdownContent.style.padding = '8px 16px';
        this.tipMarkdownContent.style.lineHeight = '1.8';
        this.tipMarkdownContent.style.overflowY = 'auto';
        this.tipMarkdownContent.style.minHeight = '30px';
        this.tipMarkdownContent.style.maxHeight = '400px';
        this.tipMarkdown.appendChild(this.tipMarkdownContent);
        this.tipMarkdownArrowUp = document.createElement('div');
        this.tipMarkdownArrowUp.className = 'arrow';
        this.tipMarkdownArrowUp.style.position = 'absolute';
        this.tipMarkdownArrowUp.style.border = '6px solid transparent';
        this.tipMarkdownArrowUp.style.backgroundColor = 'transparent';
        this.tipMarkdownArrowUp.style.left = '50%';
        this.tipMarkdownArrowUp.style.transform = 'translateX(-50%)';
        this.tipMarkdownArrowUp.style.top = '-4px';
        // this.tipMarkdownArrowUp.style.borderBottomColor = 'rgba(0,0,0,.6)';
        this.tipMarkdown.appendChild(this.tipMarkdownArrowUp);
        this.tipMarkdownArrowDown = document.createElement('div');
        this.tipMarkdownArrowDown.className = 'arrow';
        this.tipMarkdownArrowDown.style.position = 'absolute';
        this.tipMarkdownArrowDown.style.border = '6px solid transparent';
        this.tipMarkdownArrowDown.style.left = '50%';
        this.tipMarkdownArrowDown.style.transform = 'translateX(-50%)';
        this.tipMarkdownArrowDown.style.backgroundColor = 'transparent';
        this.tipMarkdownArrowDown.style.bottom = '-4px';
        // this.tipMarkdownArrowDown.style.borderTopColor = 'rgba(0,0,0,.6)';
        this.tipMarkdown.appendChild(this.tipMarkdownArrowDown);
        document.body.appendChild(this.tipMarkdown);
    };
    Topology.prototype.showTip = function (data, pos) {
        if (!data || data.id === this.tip || this.data.tooltip === false || this.data.tooltip === 0) {
            return;
        }
        if (data.title) {
            this.divLayer.canvas.title = data.title;
            this.tip = data.id;
            return;
        }
        if (data.tipId) {
            this.tipElem = document.getElementById(data.tipId);
        }
        var elem = this.tipElem;
        if (data.markdown) {
            elem = this.tipMarkdown;
            var marked = window.marked;
            if (marked) {
                this.tipMarkdownContent.innerHTML = marked(data.markdown);
            }
            else {
                this.tipMarkdownContent.innerHTML = data.markdown;
            }
            var a = this.tipMarkdownContent.getElementsByTagName('A');
            for (var i = 0; i < a.length; ++i) {
                a[i].setAttribute('target', '_blank');
            }
        }
        if (!elem) {
            return;
        }
        var parentRect = this.parentElem.getBoundingClientRect();
        var elemRect = elem.getBoundingClientRect();
        var x = (parentRect.left || parentRect.x) - (elemRect.width - data.rect.width) / 2 + this.data.x;
        var y = (parentRect.top || parentRect.y) - elemRect.height - data.rect.height + this.data.y;
        x += !data.type ? data.rect.x : pos.x;
        y += !data.type ? data.rect.ey : pos.y;
        if (y > 0) {
            this.tipMarkdownArrowUp.style.borderBottomColor = 'transparent';
            this.tipMarkdownArrowDown.style.borderTopColor = 'rgba(0,0,0,.6)';
        }
        else {
            y += elemRect.height + data.rect.height;
            this.tipMarkdownArrowUp.style.borderBottomColor = 'rgba(0,0,0,.6)';
            this.tipMarkdownArrowDown.style.borderTopColor = 'transparent';
        }
        elem.style.display = 'block';
        elem.style.position = 'fixed';
        elem.style.left = x + 'px';
        elem.style.top = y + 'px';
        elem.style.zIndex = '100';
        this.tip = data.id;
        this.dispatch('tip', elem);
    };
    Topology.prototype.hideTip = function () {
        if (!this.tip) {
            return;
        }
        this.tipMarkdown.style.left = '-9999px';
        this.tipMarkdown.style.zIndex = '-1';
        if (this.tipElem) {
            this.tipElem.style.left = '-9999px';
            this.tipElem.style.zIndex = '-1';
            this.tipElem = undefined;
        }
        this.divLayer.canvas.title = '';
        this.tip = '';
    };
    Topology.prototype.scroll = function (x, y) {
        var _this = this;
        if (this.scrolling) {
            return;
        }
        this.scrolling = true;
        this.parentElem.scrollLeft += x;
        this.parentElem.scrollTop += y;
        setTimeout(function () {
            _this.scrolling = false;
        }, 700);
    };
    Topology.prototype.toComponent = function (pens) {
        if (!pens) {
            pens = this.data.pens;
        }
        var rect = getRect(pens);
        var node = new node_Node({
            name: 'combine',
            rect: new rect_Rect(rect.x, rect.y, rect.width, rect.height),
            text: '',
            paddingLeft: 0,
            paddingRight: 0,
            paddingTop: 0,
            paddingBottom: 0,
            strokeStyle: 'transparent',
            children: [],
        });
        for (var _i = 0, pens_5 = pens; _i < pens_5.length; _i++) {
            var item = pens_5[_i];
            if (item.type === PenType.Node && rect.width === item.rect.width && rect.height === item.rect.height) {
                node = item;
                if (!node.children) {
                    node.children = [];
                }
                break;
            }
        }
        for (var _a = 0, pens_6 = pens; _a < pens_6.length; _a++) {
            var item = pens_6[_a];
            if (item !== node) {
                item.parentId = node.id;
                item.calcRectInParent(node);
                node.children.push(item);
            }
        }
        return node;
    };
    Topology.prototype.clearBkImg = function () {
        this.canvas.clearBkImg();
    };
    Topology.prototype.dispatch = function (event, data) {
        if (this.options.on) {
            this.options.on(event, data);
        }
        this.emit(event, data);
        return this;
    };
    Topology.prototype.on = function (eventType, handler) {
        this._emitter.on(eventType, handler);
        return this;
    };
    Topology.prototype.off = function (eventType, handler) {
        this._emitter.off(eventType, handler);
        return this;
    };
    Topology.prototype.emit = function (eventType, params) {
        this._emitter.emit(eventType, params);
        return this;
    };
    Topology.prototype.getValue = function (idOrTag, attr) {
        if (attr === void 0) { attr = 'text'; }
        var pen = this.find(idOrTag);
        if (!pen) {
            return;
        }
        if (Array.isArray(pen)) {
            pen = pen[0];
        }
        if (!pen) {
            return;
        }
        return pen[attr];
    };
    Topology.prototype.setValue = function (idOrTag, val, attr) {
        if (attr === void 0) { attr = 'text'; }
        if (typeof idOrTag === 'object') {
            val = idOrTag;
            idOrTag = idOrTag.id || idOrTag.tag;
        }
        var pens = find(idOrTag, this.data.pens);
        pens.forEach(function (item) {
            if (item.id === idOrTag || (item.tags && item.tags.indexOf(idOrTag) > -1)) {
                if (typeof val === 'object') {
                    item.fromData(item, val);
                }
                else {
                    item[attr] = val;
                }
                item.doWheres();
                if (item.type === PenType.Node) {
                    item.animateReady = node_Node.cloneState(item);
                }
            }
        });
        this.willRender();
    };
    Topology.prototype.willRender = function () {
        var _this = this;
        if (this.actionTimer) {
            // 节流行为，保证每 100ms 执行一次
            return;
        }
        this.actionTimer = setTimeout(function () {
            _this.render();
            _this.actionTimer = undefined;
        }, 100);
    };
    Topology.prototype.setLineName = function (name, render) {
        if (render === void 0) { render = true; }
        this.data.pens.forEach(function (pen) {
            if (pen.type) {
                pen.name = name;
                pen.calcControlPoints();
            }
        });
        render && this.render();
    };
    Topology.prototype.setColor = function (color) {
        this.options.color = color;
        le5le_store["Store"].set(this.generateStoreKey('LT:color'), color);
        this.options.fontColor = color;
        le5le_store["Store"].set(this.generateStoreKey('LT:fontColor'), color);
    };
    Topology.prototype.setFontColor = function (color) {
        this.options.fontColor = color;
        le5le_store["Store"].set(this.generateStoreKey('LT:fontColor'), color);
    };
    Topology.prototype.setIconColor = function (color) {
        le5le_store["Store"].set(this.generateStoreKey('LT:iconColor'), color);
    };
    Topology.prototype.setBkColor = function (color) {
        this.data.bkColor = color;
        le5le_store["Store"].set('LT:bkColor', color);
    };
    Topology.prototype.pureData = function () {
        var _this = this;
        var data = JSON.parse(JSON.stringify(this.data));
        data.pens.forEach(function (pen) {
            for (var key in pen) {
                if (pen[key] === undefined || pen[key] === undefined) {
                    delete pen[key];
                }
            }
            delete pen.TID;
            delete pen.animateCycleIndex;
            delete pen.img;
            delete pen.lastImage;
            delete pen.fillImg;
            delete pen.strokeImg;
            delete pen.lastFillImage;
            delete pen.lastStrokeImage;
            delete pen.imgNaturalWidth;
            delete pen.imgNaturalHeight;
            delete pen.anchors;
            delete pen.rotatedAnchors;
            delete pen.dockWatchers;
            delete pen.elementLoaded;
            delete pen.elementRendered;
            delete pen.animateReady;
            if (pen.animateFrames && pen.animateFrames.length) {
                for (var _i = 0, _a = pen.animateFrames; _i < _a.length; _i++) {
                    var item = _a[_i];
                    if (item.initState) {
                        delete item.initState.TID;
                        delete item.initState.animateCycleIndex;
                        delete item.initState.img;
                        delete item.initState.lastImage;
                        delete item.initState.imgNaturalWidth;
                        delete item.initState.imgNaturalHeight;
                        delete item.initState.anchors;
                        delete item.initState.rotatedAnchors;
                        delete item.initState.dockWatchers;
                        delete item.initState.elementLoaded;
                        delete item.initState.elementRendered;
                        delete item.initState.fillImg;
                        delete item.initState.strokeImg;
                        delete item.initState.lastFillImage;
                        delete item.initState.lastStrokeImage;
                    }
                    if (item.state) {
                        delete item.state.TID;
                        delete item.state.animateCycleIndex;
                        delete item.state.img;
                        delete item.state.lastImage;
                        delete item.state.imgNaturalWidth;
                        delete item.state.imgNaturalHeight;
                        delete item.state.anchors;
                        delete item.state.rotatedAnchors;
                        delete item.state.dockWatchers;
                        delete item.state.elementLoaded;
                        delete item.state.elementRendered;
                        delete item.state.fillImg;
                        delete item.state.strokeImg;
                        delete item.state.lastFillImage;
                        delete item.state.lastStrokeImage;
                    }
                }
            }
            _this.pureDataChildren(pen);
        });
        return data;
    };
    Topology.prototype.pureDataChildren = function (data) {
        var _this = this;
        if (!data.children) {
            return;
        }
        data.children.forEach(function (pen) {
            for (var key in pen) {
                if (pen[key] === undefined || pen[key] === undefined || pen[key] === '') {
                    delete pen[key];
                }
            }
            delete pen.TID;
            delete pen.animateCycleIndex;
            delete pen.img;
            delete pen.lastImage;
            delete pen.imgNaturalWidth;
            delete pen.imgNaturalHeight;
            delete pen.anchors;
            delete pen.rotatedAnchors;
            delete pen.dockWatchers;
            delete pen.elementLoaded;
            delete pen.elementRendered;
            delete pen.animateReady;
            _this.pureDataChildren(pen);
        });
    };
    Topology.prototype.destroy = function () {
        this.scrollDom && this.scrollDom.destroy();
        this.subcribe.unsubscribe();
        this.subcribeRender.unsubscribe();
        this.subcribeImage.unsubscribe();
        this.subcribeAnimateEnd.unsubscribe();
        this.subcribeAnimateMoved.unsubscribe();
        this.subcribeMediaEnd.unsubscribe();
        this.subcribeEmit.unsubscribe();
        this.animateLayer.destroy();
        this.divLayer.destroy();
        this.canvas.destroy();
        this.activeLayer.destroy();
        this.hoverLayer.destroy();
        this.offscreen.destroy();
        document.body.removeChild(this.tipMarkdown);
        window.removeEventListener('resize', this.winResize);
        this.parentElem.removeEventListener('scroll', this.onScroll);
        window.removeEventListener('scroll', this.onScroll);
        document.removeEventListener('gesturestart', this.preventDefault);
        switch (this.options.keydown) {
            case KeydownType.Document:
                document.removeEventListener('keydown', this.onkeydown);
                break;
            case KeydownType.Canvas:
                this.divLayer.canvas.removeEventListener('keydown', this.onkeydown);
                break;
        }
        this.closeSocket();
        this.closeMqtt();
        if (this.socketFn) {
            this.off('websocket', this.socketFn);
            this.off('mqtt', this.socketFn);
        }
        this.cache = undefined;
        this.data = undefined;
        window.topology = undefined;
    };
    return Topology;
}());

//# sourceMappingURL=core.js.map
// CONCATENATED MODULE: ./node_modules/@topology/core/index.js





//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/data/data.js
function flowData(ctx, node) {
    ctx.beginPath();
    var offsetX = node.rect.width / 7;
    ctx.moveTo(node.rect.x + offsetX, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.y);
    ctx.lineTo(node.rect.x + node.rect.width - offsetX, node.rect.ey);
    ctx.lineTo(node.rect.x, node.rect.ey);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=data.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/data/data.anchor.js

function flowDataAnchors(node) {
    node.anchors.push(new Point(node.rect.x + node.rect.width / 14, node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + (node.rect.width * 4) / 7, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + (node.rect.width * 13) / 14, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + (node.rect.width * 3) / 7, node.rect.ey, Direction.Bottom));
}
//# sourceMappingURL=data.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/data/data.rect.js

function flowDataIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowDataTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 7, node.rect.y, (node.rect.width * 5) / 7, node.rect.height);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=data.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/data/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/subprocess/subprocess.js
function flowSubprocess(ctx, node) {
    ctx.beginPath();
    var offsetX = node.rect.width / 7;
    ctx.moveTo(node.rect.x, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.ey);
    ctx.lineTo(node.rect.x, node.rect.ey);
    ctx.closePath();
    ctx.moveTo(node.rect.x + offsetX, node.rect.y);
    ctx.lineTo(node.rect.x + offsetX, node.rect.ey);
    ctx.moveTo(node.rect.ex - offsetX, node.rect.y);
    ctx.lineTo(node.rect.ex - offsetX, node.rect.ey);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=subprocess.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/subprocess/subprocess.rect.js

function flowSubprocessIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowSubprocessTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 7, node.rect.y, (node.rect.width * 5) / 7, node.rect.height);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=subprocess.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/subprocess/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/db/db.js
function flowDb(ctx, node) {
    ctx.beginPath();
    var offsetY = node.rect.height / 7;
    ctx.moveTo(node.rect.x, node.rect.y + offsetY);
    ctx.bezierCurveTo(node.rect.x, (node.rect.y - offsetY / 2) | 0, node.rect.ex, (node.rect.y - offsetY / 2) | 0, node.rect.ex, node.rect.y + offsetY);
    ctx.lineTo(node.rect.ex, node.rect.ey - offsetY);
    ctx.bezierCurveTo(node.rect.ex, (node.rect.ey + offsetY / 2) | 0, node.rect.x, (node.rect.ey + offsetY / 2) | 0, node.rect.x, node.rect.ey - offsetY);
    ctx.closePath();
    ctx.moveTo(node.rect.x, node.rect.ey - offsetY);
    ctx.bezierCurveTo(node.rect.x, (node.rect.ey - offsetY * 2) | 0, node.rect.ex, (node.rect.ey - offsetY * 2) | 0, node.rect.ex, node.rect.ey - offsetY);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=db.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/db/db.rect.js

function flowDbIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowDbTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y + node.rect.height / 8, node.rect.width, (node.rect.height * 5) / 8);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=db.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/db/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/document/document.js
function flowDocument(ctx, node) {
    ctx.beginPath();
    var x = node.rect.x + node.rect.width / 2;
    var y = node.rect.y + (node.rect.height * 6) / 7;
    var offsetY = node.rect.height / 6;
    ctx.moveTo(node.rect.x, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.y);
    ctx.lineTo(node.rect.ex, y);
    ctx.bezierCurveTo(node.rect.ex - 20, y - offsetY, x + node.rect.width / 5, y - offsetY, x, y);
    ctx.bezierCurveTo(x - node.rect.width / 5, y + offsetY, node.rect.x, y + offsetY, node.rect.x, y);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=document.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/document/document.anchor.js

function flowDocumentAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + (node.rect.height * 6) / 7, Direction.Bottom));
}
//# sourceMappingURL=document.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/document/document.rect.js

function flowDocumentIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowDocumentTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y, node.rect.width, (node.rect.height * 5) / 7);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=document.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/document/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/internalStorage/internalStorage.js
function flowInternalStorage(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.ey);
    ctx.lineTo(node.rect.x, node.rect.ey);
    ctx.closePath();
    var offset = node.rect.width / 7;
    ctx.moveTo(node.rect.x, node.rect.y + offset);
    ctx.lineTo(node.rect.ex, node.rect.y + offset);
    ctx.moveTo(node.rect.x + offset, node.rect.y);
    ctx.lineTo(node.rect.x + offset, node.rect.ey);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=internalStorage.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/internalStorage/internalStorage.rect.js

function flowInternalStorageIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowInternalStorageTextRect(node) {
    var offset = node.rect.width / 7;
    node.textRect = new rect_Rect(node.rect.x + offset, node.rect.y + offset, node.rect.width - offset, node.rect.height - offset);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=internalStorage.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/internalStorage/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/externStorage/externStorage.js
function flowExternStorage(ctx, node) {
    ctx.beginPath();
    var offsetX = node.rect.width / 10;
    ctx.moveTo(node.rect.x + offsetX * 2, node.rect.y);
    ctx.bezierCurveTo(node.rect.x - (offsetX * 2) / 3, node.rect.y, node.rect.x - (offsetX * 2) / 3, node.rect.ey, node.rect.x + offsetX * 2, node.rect.ey);
    ctx.lineTo(node.rect.ex, node.rect.ey);
    ctx.bezierCurveTo(node.rect.ex - offsetX, node.rect.ey, node.rect.ex - offsetX, node.rect.y, node.rect.ex, node.rect.y);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=externStorage.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/externStorage/externStorage.anchor.js

function flowExternStorageAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + (node.rect.width * 8) / 15, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + (node.rect.width * 13) / 14, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + (node.rect.width * 8) / 15, node.rect.ey, Direction.Bottom));
}
//# sourceMappingURL=externStorage.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/externStorage/externStorage.rect.js

function flowExternStorageIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowExternStorageTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 6, node.rect.y, (node.rect.width * 3) / 4, node.rect.height);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=externStorage.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/externStorage/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/queue/queue.js
function flowQueue(ctx, node) {
    ctx.beginPath();
    ctx.ellipse(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height / 2, node.rect.width / 2, node.rect.height / 2, 0, 0, Math.PI * 2);
    ctx.moveTo(node.rect.x + node.rect.width / 2, node.rect.ey);
    ctx.lineTo(node.rect.ex, node.rect.ey);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=queue.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/queue/queue.rect.js

function flowQueueIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowQueueTextRect(node) {
    var w = (node.rect.width * 5) / 7;
    var h = (node.rect.height * 5) / 7;
    node.textRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + (node.rect.height - h) / 2, w, h);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=queue.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/queue/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/manually/manually.js
function flowManually(ctx, node) {
    ctx.beginPath();
    var offsetY = node.rect.height / 4;
    ctx.moveTo(node.rect.x, node.rect.y + offsetY);
    ctx.lineTo(node.rect.ex, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.ey);
    ctx.lineTo(node.rect.x, node.rect.ey);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=manually.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/manually/manually.anchor.js

function flowManuallyAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + (node.rect.height * 5) / 8, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height / 8, Direction.Up));
    node.anchors.push(new Point(node.rect.ex, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.ey, Direction.Bottom));
}
//# sourceMappingURL=manually.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/manually/manually.rect.js

function flowManuallyIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowManuallyTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y + node.rect.height / 4, node.rect.width, (node.rect.height * 3) / 4);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=manually.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/manually/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/display/display.js
function flowDisplay(ctx, node) {
    ctx.beginPath();
    var offsetX = node.rect.width / 8;
    ctx.moveTo(node.rect.x + offsetX, node.rect.y);
    ctx.lineTo(node.rect.ex - offsetX, node.rect.y);
    ctx.bezierCurveTo(node.rect.ex + offsetX / 3, node.rect.y, node.rect.ex + offsetX / 3, node.rect.ey, node.rect.ex - offsetX, node.rect.ey);
    ctx.lineTo(node.rect.x + offsetX, node.rect.ey);
    ctx.lineTo(node.rect.x, node.rect.y + node.rect.height / 2);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=display.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/display/display.anchor.js

function flowDisplayAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
}
//# sourceMappingURL=display.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/display/display.rect.js

function flowDisplayIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function flowDisplayTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + node.rect.width / 8, node.rect.y, (node.rect.width * 3) / 4, node.rect.height);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=display.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/display/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/parallel/parallel.js
function flowParallel(ctx, node) {
    ctx.beginPath();
    ctx.moveTo(node.rect.x, node.rect.y);
    ctx.lineTo(node.rect.ex, node.rect.y);
    ctx.moveTo(node.rect.x, node.rect.ey);
    ctx.lineTo(node.rect.ex, node.rect.ey);
    ctx.stroke();
}
//# sourceMappingURL=parallel.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/parallel/parallel.anchor.js

function flowParallelAnchors(node) {
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
}
//# sourceMappingURL=parallel.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/parallel/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/comment/comment.js
function flowComment(ctx, node) {
    ctx.beginPath();
    var offsetX = node.rect.width / 4;
    ctx.moveTo(node.rect.x + offsetX, node.rect.y);
    ctx.lineTo(node.rect.x, node.rect.y);
    ctx.lineTo(node.rect.x, node.rect.ey);
    ctx.lineTo(node.rect.x + offsetX, node.rect.ey);
    ctx.stroke();
}
//# sourceMappingURL=comment.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/comment/comment.anchor.js

function flowCommentAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
}
//# sourceMappingURL=comment.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/comment/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/src/register.js












function register() {
    registerNode('flowData', flowData, flowDataAnchors, flowDataIconRect, flowDataTextRect);
    registerNode('flowSubprocess', flowSubprocess, null, flowSubprocessIconRect, flowSubprocessTextRect);
    registerNode('flowDb', flowDb, null, flowDbIconRect, flowDbTextRect);
    registerNode('flowDocument', flowDocument, flowDocumentAnchors, flowDocumentIconRect, flowDocumentTextRect);
    registerNode('flowInternalStorage', flowInternalStorage, null, flowInternalStorageIconRect, flowInternalStorageTextRect);
    registerNode('flowExternStorage', flowExternStorage, flowExternStorageAnchors, flowExternStorageIconRect, flowExternStorageTextRect);
    registerNode('flowQueue', flowQueue, null, flowQueueIconRect, flowQueueTextRect);
    registerNode('flowManually', flowManually, flowManuallyAnchors, flowManuallyIconRect, flowManuallyTextRect);
    registerNode('flowDisplay', flowDisplay, flowDisplayAnchors, flowDisplayIconRect, flowDisplayTextRect);
    registerNode('flowParallel', flowParallel, flowParallelAnchors, null, null);
    registerNode('flowComment', flowComment, flowCommentAnchors, null, null);
}
//# sourceMappingURL=register.js.map
// CONCATENATED MODULE: ./node_modules/@topology/flow-diagram/index.js












//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/final/final.js
function activityFinal(ctx, node) {
    ctx.beginPath();
    ctx.ellipse(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height / 2, node.rect.width / 2, node.rect.height / 2, 0, 0, Math.PI * 2);
    ctx.stroke();
    ctx.beginPath();
    ctx.fillStyle = ctx.strokeStyle;
    ctx.ellipse(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height / 2, node.rect.width / 4, node.rect.height / 4, 0, 0, Math.PI * 2);
    ctx.fill();
}
//# sourceMappingURL=final.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/final/final.rect.js

function activityFinalIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function activityFinalTextRect(node) {
    var w = (node.rect.width * 5) / 7;
    var h = (node.rect.height * 5) / 7;
    node.textRect = new rect_Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + (node.rect.height - h) / 2, w, h);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=final.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/final/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/fork/fork.js
function fork(ctx, node) {
    var wr = node.borderRadius;
    var hr = node.borderRadius;
    if (node.borderRadius < 1) {
        wr = node.rect.width * node.borderRadius;
        hr = node.rect.height * node.borderRadius;
    }
    var r = wr < hr ? wr : hr;
    if (node.rect.width < 2 * r) {
        r = node.rect.width / 2;
    }
    if (node.rect.height < 2 * r) {
        r = node.rect.height / 2;
    }
    ctx.beginPath();
    ctx.moveTo(node.rect.x + r, node.rect.y);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, r);
    ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=fork.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/fork/fork.rect.js

function forkIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function forkTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y, node.rect.width, node.rect.height);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=fork.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/fork/fork.anchor.js

function forkHAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
    node.anchors.push(new Point(node.rect.ex, node.rect.y + node.rect.height / 2, Direction.Right));
    var dis = 5;
    for (var i = dis; node.rect.x + i < node.rect.ex; i = i + dis) {
        var pt1 = new Point(node.rect.x + i, node.rect.y, Direction.Up);
        var pt2 = new Point(node.rect.x + i, node.rect.ey, Direction.Bottom);
        pt1.hidden = true;
        pt2.hidden = true;
        node.anchors.push(pt1);
        node.anchors.push(pt2);
    }
}
function forkVAnchors(node) {
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.ey, Direction.Bottom));
    var dis = 5;
    for (var i = dis; node.rect.y + i < node.rect.ey; i = i + dis) {
        var pt1 = new Point(node.rect.x, node.rect.y + i, Direction.Left);
        var pt2 = new Point(node.rect.ex, node.rect.y + i, Direction.Right);
        pt1.hidden = true;
        pt2.hidden = true;
        node.anchors.push(pt1);
        node.anchors.push(pt2);
    }
}
//# sourceMappingURL=fork.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/fork/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/swimlaneH/swimlaneH.js
function swimlaneH(ctx, node) {
    var wr = node.borderRadius;
    var hr = node.borderRadius;
    if (node.borderRadius < 1) {
        wr = node.rect.width * node.borderRadius;
        hr = node.rect.height * node.borderRadius;
    }
    var r = wr < hr ? wr : hr;
    if (node.rect.width < 2 * r) {
        r = node.rect.width / 2;
    }
    if (node.rect.height < 2 * r) {
        r = node.rect.height / 2;
    }
    ctx.beginPath();
    ctx.moveTo(node.rect.x + r, node.rect.y);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, r);
    ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
    ctx.closePath();
    ctx.moveTo(node.rect.x + (8 / 100) * node.rect.width, node.rect.y);
    ctx.lineTo(node.rect.x + (8 / 100) * node.rect.width, node.rect.ey);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=swimlaneH.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/swimlaneH/swimlaneH.rect.js

function swimlaneHIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function swimlaneHTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x + (2 / 100) * node.rect.width, node.rect.y, (4 / 100) * node.rect.width, node.rect.height);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=swimlaneH.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/swimlaneH/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/swimlaneV/swimlaneV.js
function swimlaneV(ctx, node) {
    var wr = node.borderRadius;
    var hr = node.borderRadius;
    if (node.borderRadius < 1) {
        wr = node.rect.width * node.borderRadius;
        hr = node.rect.height * node.borderRadius;
    }
    var r = wr < hr ? wr : hr;
    if (node.rect.width < 2 * r) {
        r = node.rect.width / 2;
    }
    if (node.rect.height < 2 * r) {
        r = node.rect.height / 2;
    }
    ctx.beginPath();
    ctx.moveTo(node.rect.x + r, node.rect.y);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, r);
    ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
    ctx.closePath();
    ctx.moveTo(node.rect.x, node.rect.y + (8 / 100) * node.rect.height);
    ctx.lineTo(node.rect.ex, node.rect.y + (8 / 100) * node.rect.height);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=swimlaneV.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/swimlaneV/swimlaneV.rect.js

function swimlaneVIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function swimlaneVTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y, node.rect.width, (8 / 100) * node.rect.height);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=swimlaneV.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/swimlaneV/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/src/register.js





function register_register() {
    registerNode('activityFinal', activityFinal, undefined, activityFinalIconRect, activityFinalTextRect);
    registerNode('swimlaneV', swimlaneV, undefined, swimlaneVIconRect, swimlaneVTextRect);
    registerNode('swimlaneH', swimlaneH, undefined, swimlaneHIconRect, swimlaneHTextRect);
    registerNode('forkH', fork, forkHAnchors, forkIconRect, forkTextRect);
    registerNode('forkV', fork, forkVAnchors, forkIconRect, forkTextRect);
}
//# sourceMappingURL=register.js.map
// CONCATENATED MODULE: ./node_modules/@topology/activity-diagram/index.js





//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/class-diagram/src/class/class.js
function simpleClass(ctx, node) {
    var wr = node.borderRadius;
    var hr = node.borderRadius;
    if (node.borderRadius < 1) {
        wr = node.rect.width * node.borderRadius;
        hr = node.rect.height * node.borderRadius;
    }
    var r = wr < hr ? wr : hr;
    if (node.rect.width < 2 * r) {
        r = node.rect.width / 2;
    }
    if (node.rect.height < 2 * r) {
        r = node.rect.height / 2;
    }
    ctx.beginPath();
    ctx.moveTo(node.rect.x + r, node.rect.y);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, r);
    ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
    ctx.closePath();
    ctx.moveTo(node.rect.x, node.rect.y + 40);
    ctx.lineTo(node.rect.ex, node.rect.y + 40);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
function interfaceClass(ctx, node) {
    var wr = node.borderRadius;
    var hr = node.borderRadius;
    if (node.borderRadius < 1) {
        wr = node.rect.width * node.borderRadius;
        hr = node.rect.height * node.borderRadius;
    }
    var r = wr < hr ? wr : hr;
    if (node.rect.width < 2 * r) {
        r = node.rect.width / 2;
    }
    if (node.rect.height < 2 * r) {
        r = node.rect.height / 2;
    }
    ctx.beginPath();
    ctx.moveTo(node.rect.x + r, node.rect.y);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, r);
    ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, r);
    ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
    ctx.closePath();
    ctx.moveTo(node.rect.x, node.rect.y + 40);
    ctx.lineTo(node.rect.ex, node.rect.y + 40);
    var height = node.rect.y + 20 + node.rect.height / 2;
    ctx.moveTo(node.rect.x, height);
    ctx.lineTo(node.rect.ex, height);
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=class.js.map
// CONCATENATED MODULE: ./node_modules/@topology/class-diagram/src/class/class.rect.js

function simpleClassIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function simpleClassTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y, node.rect.width, 40);
    node.fullTextRect = node.textRect;
}
function interfaceClassIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function interfaceClassTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y, node.rect.width, 40);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=class.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/class-diagram/src/class/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/class-diagram/src/register.js


function src_register_register() {
    registerNode('simpleClass', simpleClass, null, simpleClassIconRect, simpleClassTextRect);
    registerNode('interfaceClass', interfaceClass, null, interfaceClassIconRect, interfaceClassTextRect);
}
//# sourceMappingURL=register.js.map
// CONCATENATED MODULE: ./node_modules/@topology/class-diagram/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/lifeline/lifeline.js
function lifeline(ctx, node) {
    var height = 50;
    var wr = node.borderRadius;
    var hr = node.borderRadius;
    if (node.borderRadius < 1) {
        wr = node.rect.width * node.borderRadius;
        hr = node.rect.height * node.borderRadius;
    }
    var r = wr < hr ? wr : hr;
    if (node.rect.width < 2 * r) {
        r = node.rect.width / 2;
    }
    if (height < 2 * r) {
        r = height / 2;
    }
    ctx.beginPath();
    ctx.moveTo(node.rect.x + r, node.rect.y);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + height, r);
    ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + height, node.rect.x, node.rect.y + height, r);
    ctx.arcTo(node.rect.x, node.rect.y + height, node.rect.x, node.rect.y, r);
    ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
    ctx.closePath();
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
    ctx.save();
    ctx.beginPath();
    ctx.lineWidth = 1;
    ctx.setLineDash([7, 7]);
    var middle = node.rect.x + node.rect.width / 2;
    ctx.moveTo(middle, node.rect.y + height + 1);
    ctx.lineTo(middle, node.rect.ey);
    ctx.stroke();
    ctx.restore();
}
//# sourceMappingURL=lifeline.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/lifeline/lifeline.rect.js

function lifelineIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function lifelineTextRect(node) {
    node.textRect = new rect_Rect(node.rect.x, node.rect.y, node.rect.width, 50);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=lifeline.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/lifeline/lifeline.anchor.js

function lifelineAnchors(node) {
    node.anchors.push(new Point(node.rect.x, node.rect.y + 25, Direction.Left));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + 25, Direction.Right));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + 50, Direction.Bottom));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.ey, Direction.Bottom));
}
//# sourceMappingURL=lifeline.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/lifeline/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/focus/focus.js
function sequenceFocus(ctx, node) {
    ctx.beginPath();
    ctx.rect(node.rect.x, node.rect.y, node.rect.width, node.rect.height);
    if (this.fillStyle) {
        ctx.fillStyle = this.fillStyle;
    }
    else {
        ctx.fillStyle = '#fff';
    }
    (node.fillStyle || node.bkType) && ctx.fill();
    ctx.stroke();
}
//# sourceMappingURL=focus.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/focus/focus.rect.js

function sequenceFocusIconRect(node) {
    node.iconRect = new rect_Rect(0, 0, 0, 0);
}
function sequenceFocusTextRect(node) {
    node.textRect = new rect_Rect(0, 0, 0, 0);
    node.fullTextRect = node.textRect;
}
//# sourceMappingURL=focus.rect.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/focus/focus.anchor.js

function sequenceFocusAnchors(node) {
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
    node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.ey, Direction.Bottom));
    var dis = 5;
    for (var i = dis; node.rect.y + i < node.rect.ey; i = i + dis) {
        var pt1 = new Point(node.rect.x, node.rect.y + i, Direction.Left);
        var pt2 = new Point(node.rect.ex, node.rect.y + i, Direction.Right);
        pt1.hidden = true;
        pt2.hidden = true;
        node.anchors.push(pt1);
        node.anchors.push(pt2);
    }
}
//# sourceMappingURL=focus.anchor.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/focus/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/src/register.js



function sequence_diagram_src_register_register() {
    registerNode('lifeline', lifeline, lifelineAnchors, lifelineIconRect, lifelineTextRect);
    registerNode('sequenceFocus', sequenceFocus, sequenceFocusAnchors, sequenceFocusIconRect, sequenceFocusTextRect);
}
//# sourceMappingURL=register.js.map
// CONCATENATED MODULE: ./node_modules/@topology/sequence-diagram/index.js



//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/chart-diagram/src/echarts/index.js

var echartsObjs = {};
function echarts_echarts(ctx, node) {
    // 绘制一个底图，类似于占位符。
    rectangle(ctx, node);
    // tslint:disable-next-line:no-shadowed-variable
    var echarts = echartsObjs.echarts;
    if (!echarts && window) {
        echarts = window['echarts'];
    }
    if (!node.data || !echarts) {
        return;
    }
    if (typeof node.data === 'string') {
        node.data = JSON.parse(node.data);
    }
    if (!node.data.echarts) {
        return;
    }
    if (node.elementId === undefined || node.elementId === null) {
        node.elementId = s8();
    }
    if (!node.elementLoaded) {
        echartsObjs[node.id] = {
            div: createDiv(node),
        };
        node.elementLoaded = true;
        document.body.appendChild(echartsObjs[node.id].div);
        // 添加当前节点到div层
        node.addToDiv();
        echartsObjs[node.id].chart = echarts.init(echartsObjs[node.id].div, node.data.echarts.theme);
        node.elementRendered = false;
        // 等待父div先渲染完成，避免初始图表控件太大
        setTimeout(function () {
            echartsObjs[node.id].chart.resize();
        });
    }
    if (!node.elementRendered) {
        // 初始化时，等待父div先渲染完成，避免初始图表控件太大。
        setTimeout(function () {
            echartsObjs[node.id].chart.setOption(node.data.echarts.option, true);
            echartsObjs[node.id].chart.resize();
            node.elementRendered = true;
            setTimeout(function () {
                var img = new Image();
                img.src = echartsObjs[node.id].chart.getDataURL({
                    pixelRatio: 2
                });
                node.img = img;
            }, 100);
        });
    }
}
//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/chart-diagram/src/register.js


function chart_diagram_src_register_register(_echarts) {
    echartsObjs.echarts = _echarts;
    if (!echartsObjs.echarts && !echarts_echarts) {
        loadJS('https://cdn.bootcdn.net/ajax/libs/echarts/4.8.0/echarts.min.js', undefined, true);
    }
    registerNode('echarts', echarts_echarts, undefined, function (node) {
        node.iconRect = new rect_Rect(node.rect.x, node.rect.y, node.rect.width, node.rect.height);
        node.fullIconRect = node.rect;
    }, undefined);
}
//# sourceMappingURL=register.js.map
// CONCATENATED MODULE: ./node_modules/@topology/chart-diagram/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./node_modules/@topology/layout/src/align.js

function alignNodes(pens, rect, align) {
    for (var _i = 0, pens_1 = pens; _i < pens_1.length; _i++) {
        var item = pens_1[_i];
        if (!(item instanceof node_Node)) {
            continue;
        }
        switch (align) {
            case 'left':
                item.rect.x = rect.x;
                break;
            case 'right':
                item.rect.x = rect.ex - item.rect.width;
                break;
            case 'top':
                item.rect.y = rect.y;
                break;
            case 'bottom':
                item.rect.y = rect.ey - item.rect.height;
                break;
            case 'center':
                item.rect.x = rect.center.x - item.rect.width / 2;
                break;
            case 'middle':
                item.rect.y = rect.center.y - item.rect.height / 2;
                break;
        }
        item.rect.floor();
        item.rect.calcCenter();
        item.init();
        item.calcChildrenRect();
    }
}
function spaceBetween(pens, width) {
    var space = 0;
    var cnt = 0;
    for (var _i = 0, pens_2 = pens; _i < pens_2.length; _i++) {
        var item = pens_2[_i];
        if (!(item instanceof node_Node)) {
            continue;
        }
        space += item.rect.width;
        ++cnt;
    }
    space = (width - space) / (cnt - 1);
    var left = 0;
    for (var _a = 0, pens_3 = pens; _a < pens_3.length; _a++) {
        var item = pens_3[_a];
        if (!(item instanceof node_Node)) {
            continue;
        }
        if (!left) {
            left = item.rect.x;
        }
        item.rect.x = left;
        left += item.rect.width + space;
        item.rect.floor();
        item.rect.calcCenter();
        item.init();
        item.calcChildrenRect();
    }
}
//# sourceMappingURL=align.js.map
// CONCATENATED MODULE: ./node_modules/@topology/layout/src/layout.js


function layout(pens, params) {
    var spaceWidth = params.spaceWidth || 30;
    var spaceHeight = params.spaceHeight || 30;
    var rect = getRect(pens);
    var left = rect.x;
    var top = rect.y;
    var rows = [];
    var row = [];
    var maxHeight = 0;
    for (var _i = 0, pens_1 = pens; _i < pens_1.length; _i++) {
        var item = pens_1[_i];
        if (item.type === PenType.Line) {
            continue;
        }
        if (params.nodeWidth > 0) {
            item.rect.width = params.nodeWidth;
        }
        if (params.nodeHeight > 0) {
            item.rect.height = params.nodeHeight;
        }
        if (item.rect.height > maxHeight) {
            maxHeight = item.rect.height;
        }
        item.rect.x = left;
        item.rect.y = top;
        item.rect.init();
        row.push(item);
        left += item.rect.width + spaceWidth;
        if (left > params.maxWidth || (params.maxCount > 0 && row.length >= params.maxCount)) {
            rows.push(row);
            row = [];
            left = rect.x;
            top += maxHeight + spaceHeight;
            maxHeight = 0;
        }
    }
    rows.push(row);
    for (var _a = 0, rows_1 = rows; _a < rows_1.length; _a++) {
        var item = rows_1[_a];
        var r = getRect(item);
        r.width = params.maxWidth;
        alignNodes(item, r, 'middle');
        if (params.maxCount > 0) {
            spaceBetween(item, params.maxWidth);
        }
    }
}
//# sourceMappingURL=layout.js.map
// CONCATENATED MODULE: ./node_modules/@topology/layout/index.js


//# sourceMappingURL=index.js.map
// CONCATENATED MODULE: ./src/utils/topology/topologysetting.js
//左侧菜单
//线条
var lineList = [{
  type: "curve",
  name: "贝塞尔曲线"
}, {
  type: "polyline",
  name: "折线"
}, {
  type: "line",
  name: "直线"
}, {
  type: "mind",
  name: "脑图曲线"
}]; //线条样式

var lineOther = [{
  type: 0,
  name: "t-icon t-to-"
}, {
  type: 1,
  name: "iconfont icon--xiaoxuxian"
}, {
  type: 2,
  name: "iconfont icon-dash"
}, {
  type: 3,
  name: "t-icon t-dash-dot"
}]; //箭头

var arrowTypes = ['', 'triangleSolid', 'triangle', 'diamondSolid', 'diamond', 'circleSolid', 'circle', 'line', 'lineUp', 'lineDown']; //事件

var eventAction = [{
  value: 0,
  name: '打开链接'
}, {
  value: 1,
  name: '执行动画'
}, {
  value: 2,
  name: '执行javascript'
}, {
  value: 3,
  name: '执行windows方法'
}, {
  value: 5,
  name: '暂停动画'
}, {
  value: 6,
  name: '停止动画'
}, {
  value: 7,
  name: '自定义消息'
}]; //头部菜单

var headMenu = [{
  name: "文件",
  type: 1,
  children: [{
    name: "新建文件",
    type: "add"
  }, {
    name: "打开文件 Ctrl+O",
    type: "open"
  }, {
    name: "导入文件",
    type: "import"
  }, {
    name: "下载json文件",
    type: "json"
  }, {
    name: "下载png文件",
    type: "png"
  }, {
    name: "下载svg文件",
    type: "svg"
  }]
}, {
  name: "编辑",
  type: 2,
  children: [{
    name: "撤销 Ctrl+Z",
    type: "revoke"
  }, {
    name: "剪切 Ctrl+X",
    type: "shear"
  }, {
    name: "复制 Ctrl+C",
    type: "copy"
  }, {
    name: "粘贴 Ctrl+V",
    type: "paste"
  }]
}];
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// CONCATENATED MODULE: ./src/utils/topology/data/eesymbols.js
var eesymbols_data = {
  "id": "2073009",
  "name": "电气工程常用字母和符号",
  "font_family": "ltdx",
  "css_prefix_text": "tdx-",
  "description": "",
  "glyphs": [{
    "icon_id": "21459748",
    "name": "5-7-7",
    "font_class": "5-7-7",
    "unicode": "\uEA68",
    "unicode_decimal": 60008
  }, {
    "icon_id": "21439582",
    "name": "5-7-5",
    "font_class": "5-7-5",
    "unicode": "\uEA67",
    "unicode_decimal": 60007
  }, {
    "icon_id": "21439074",
    "name": "5-7-4",
    "font_class": "5-7-4",
    "unicode": "\uEA66",
    "unicode_decimal": 60006
  }, {
    "icon_id": "21436178",
    "name": "5-7-3",
    "font_class": "5-7-3",
    "unicode": "\uEA65",
    "unicode_decimal": 60005
  }, {
    "icon_id": "21431916",
    "name": "5-7-1",
    "font_class": "5-7-1",
    "unicode": "\uEA63",
    "unicode_decimal": 60003
  }, {
    "icon_id": "21431917",
    "name": "5-7-2",
    "font_class": "5-7-2",
    "unicode": "\uEA64",
    "unicode_decimal": 60004
  }, {
    "icon_id": "21412993",
    "name": "5-6-5",
    "font_class": "5-6-5",
    "unicode": "\uEA62",
    "unicode_decimal": 60002
  }, {
    "icon_id": "21412506",
    "name": "5-6-4",
    "font_class": "5-6-4",
    "unicode": "\uEA61",
    "unicode_decimal": 60001
  }, {
    "icon_id": "21412221",
    "name": "5-6-2",
    "font_class": "5-6-2",
    "unicode": "\uEA5E",
    "unicode_decimal": 59998
  }, {
    "icon_id": "21412222",
    "name": "5-6-1",
    "font_class": "5-6-1",
    "unicode": "\uEA5F",
    "unicode_decimal": 59999
  }, {
    "icon_id": "21412223",
    "name": "5-6-3",
    "font_class": "5-6-3",
    "unicode": "\uEA60",
    "unicode_decimal": 60000
  }, {
    "icon_id": "21216852",
    "name": "4.25",
    "font_class": "425",
    "unicode": "\uEA5D",
    "unicode_decimal": 59997
  }, {
    "icon_id": "20209963",
    "name": "5JPT",
    "font_class": "5JPT",
    "unicode": "\uE7B1",
    "unicode_decimal": 59313
  }, {
    "icon_id": "20209966",
    "name": "变压器4",
    "font_class": "bianyaqi4",
    "unicode": "\uE7B4",
    "unicode_decimal": 59316
  }, {
    "icon_id": "20209968",
    "name": "LA-1",
    "font_class": "LA-1",
    "unicode": "\uE7B6",
    "unicode_decimal": 59318
  }, {
    "icon_id": "20209971",
    "name": "发电机",
    "font_class": "fadianji",
    "unicode": "\uE7B9",
    "unicode_decimal": 59321
  }, {
    "icon_id": "20209976",
    "name": "hzz",
    "font_class": "hzz",
    "unicode": "\uE7BE",
    "unicode_decimal": 59326
  }, {
    "icon_id": "20209979",
    "name": "LA-2",
    "font_class": "LA-2",
    "unicode": "\uE7C1",
    "unicode_decimal": 59329
  }, {
    "icon_id": "20209984",
    "name": "hyjd",
    "font_class": "hyjd",
    "unicode": "\uE7C6",
    "unicode_decimal": 59334
  }, {
    "icon_id": "19217298",
    "name": "3",
    "font_class": "3",
    "unicode": "\uE79A",
    "unicode_decimal": 59290
  }, {
    "icon_id": "19217299",
    "name": "12",
    "font_class": "12",
    "unicode": "\uE79B",
    "unicode_decimal": 59291
  }, {
    "icon_id": "19217300",
    "name": "13",
    "font_class": "13",
    "unicode": "\uE79C",
    "unicode_decimal": 59292
  }, {
    "icon_id": "19217301",
    "name": "14",
    "font_class": "14",
    "unicode": "\uE79D",
    "unicode_decimal": 59293
  }, {
    "icon_id": "19217302",
    "name": "10",
    "font_class": "10",
    "unicode": "\uE79E",
    "unicode_decimal": 59294
  }, {
    "icon_id": "19393821",
    "name": "17",
    "font_class": "17",
    "unicode": "\uE7A1",
    "unicode_decimal": 59297
  }, {
    "icon_id": "17033261",
    "name": "电容器",
    "font_class": "dianrongqi",
    "unicode": "\uE618",
    "unicode_decimal": 58904
  }, {
    "icon_id": "17033303",
    "name": "滤波器",
    "font_class": "lvboqi",
    "unicode": "\uE61A",
    "unicode_decimal": 58906
  }, {
    "icon_id": "18497052",
    "name": "3-02",
    "font_class": "3-02",
    "unicode": "\uE78B",
    "unicode_decimal": 59275
  }, {
    "icon_id": "21043970",
    "name": "2-256",
    "font_class": "2-256",
    "unicode": "\uEA5C",
    "unicode_decimal": 59996
  }, {
    "icon_id": "21042962",
    "name": "2-228",
    "font_class": "2-228",
    "unicode": "\uEA56",
    "unicode_decimal": 59990
  }, {
    "icon_id": "21042963",
    "name": "2-227",
    "font_class": "2-227",
    "unicode": "\uEA57",
    "unicode_decimal": 59991
  }, {
    "icon_id": "21042964",
    "name": "2-229",
    "font_class": "2-229",
    "unicode": "\uEA58",
    "unicode_decimal": 59992
  }, {
    "icon_id": "21042965",
    "name": "2-224",
    "font_class": "2-224",
    "unicode": "\uEA59",
    "unicode_decimal": 59993
  }, {
    "icon_id": "21042966",
    "name": "2-225",
    "font_class": "2-225",
    "unicode": "\uEA5A",
    "unicode_decimal": 59994
  }, {
    "icon_id": "21042967",
    "name": "2-226",
    "font_class": "2-226",
    "unicode": "\uEA5B",
    "unicode_decimal": 59995
  }, {
    "icon_id": "21040534",
    "name": "2-127",
    "font_class": "2-127",
    "unicode": "\uEA55",
    "unicode_decimal": 59989
  }, {
    "icon_id": "21039711",
    "name": "2-095",
    "font_class": "2-095",
    "unicode": "\uEA54",
    "unicode_decimal": 59988
  }, {
    "icon_id": "21039709",
    "name": "2-093",
    "font_class": "2-093",
    "unicode": "\uEA53",
    "unicode_decimal": 59987
  }, {
    "icon_id": "21039705",
    "name": "2-091",
    "font_class": "2-091",
    "unicode": "\uEA00",
    "unicode_decimal": 59904
  }, {
    "icon_id": "21039619",
    "name": "2-083",
    "font_class": "2-083",
    "unicode": "\uE9FF",
    "unicode_decimal": 59903
  }, {
    "icon_id": "21039620",
    "name": "2-081",
    "font_class": "2-081",
    "unicode": "\uEA01",
    "unicode_decimal": 59905
  }, {
    "icon_id": "21039621",
    "name": "2-089",
    "font_class": "2-089",
    "unicode": "\uEA4F",
    "unicode_decimal": 59983
  }, {
    "icon_id": "21039622",
    "name": "2-087",
    "font_class": "2-087",
    "unicode": "\uEA50",
    "unicode_decimal": 59984
  }, {
    "icon_id": "21039623",
    "name": "2-080",
    "font_class": "2-080",
    "unicode": "\uEA51",
    "unicode_decimal": 59985
  }, {
    "icon_id": "21039624",
    "name": "2-082",
    "font_class": "2-082",
    "unicode": "\uEA52",
    "unicode_decimal": 59986
  }, {
    "icon_id": "21037969",
    "name": "2-070",
    "font_class": "2-0701",
    "unicode": "\uE9FA",
    "unicode_decimal": 59898
  }, {
    "icon_id": "21037970",
    "name": "2-075",
    "font_class": "2-075",
    "unicode": "\uE9FD",
    "unicode_decimal": 59901
  }, {
    "icon_id": "21037971",
    "name": "2-072",
    "font_class": "2-072",
    "unicode": "\uEA47",
    "unicode_decimal": 59975
  }, {
    "icon_id": "21037972",
    "name": "2-078",
    "font_class": "2-078",
    "unicode": "\uEA48",
    "unicode_decimal": 59976
  }, {
    "icon_id": "21037973",
    "name": "2-074",
    "font_class": "2-074",
    "unicode": "\uEA49",
    "unicode_decimal": 59977
  }, {
    "icon_id": "21037974",
    "name": "2-076",
    "font_class": "2-076",
    "unicode": "\uEA4A",
    "unicode_decimal": 59978
  }, {
    "icon_id": "21037975",
    "name": "2-079",
    "font_class": "2-079",
    "unicode": "\uEA4B",
    "unicode_decimal": 59979
  }, {
    "icon_id": "21037976",
    "name": "2-073",
    "font_class": "2-073",
    "unicode": "\uEA4C",
    "unicode_decimal": 59980
  }, {
    "icon_id": "21037977",
    "name": "2-071",
    "font_class": "2-071",
    "unicode": "\uEA4D",
    "unicode_decimal": 59981
  }, {
    "icon_id": "21037978",
    "name": "2-077",
    "font_class": "2-077",
    "unicode": "\uEA4E",
    "unicode_decimal": 59982
  }, {
    "icon_id": "21037879",
    "name": "2-070",
    "font_class": "2-070",
    "unicode": "\uE9A2",
    "unicode_decimal": 59810
  }, {
    "icon_id": "21037246",
    "name": "2-061",
    "font_class": "2-061",
    "unicode": "\uE9EA",
    "unicode_decimal": 59882
  }, {
    "icon_id": "21037247",
    "name": "2-062",
    "font_class": "2-062",
    "unicode": "\uE9EB",
    "unicode_decimal": 59883
  }, {
    "icon_id": "21037248",
    "name": "2-063",
    "font_class": "2-063",
    "unicode": "\uE9EF",
    "unicode_decimal": 59887
  }, {
    "icon_id": "21037249",
    "name": "2-066",
    "font_class": "2-066",
    "unicode": "\uE9F4",
    "unicode_decimal": 59892
  }, {
    "icon_id": "21037250",
    "name": "2-064",
    "font_class": "2-064",
    "unicode": "\uE9F8",
    "unicode_decimal": 59896
  }, {
    "icon_id": "21037251",
    "name": "2-060",
    "font_class": "2-060",
    "unicode": "\uE9FB",
    "unicode_decimal": 59899
  }, {
    "icon_id": "21037252",
    "name": "2-068",
    "font_class": "2-068",
    "unicode": "\uEA43",
    "unicode_decimal": 59971
  }, {
    "icon_id": "21037253",
    "name": "2-065",
    "font_class": "2-065",
    "unicode": "\uEA44",
    "unicode_decimal": 59972
  }, {
    "icon_id": "21037254",
    "name": "2-067",
    "font_class": "2-067",
    "unicode": "\uEA45",
    "unicode_decimal": 59973
  }, {
    "icon_id": "21037255",
    "name": "2-069",
    "font_class": "2-069",
    "unicode": "\uEA46",
    "unicode_decimal": 59974
  }, {
    "icon_id": "21025090",
    "name": "2-009",
    "font_class": "2-009",
    "unicode": "\uEA42",
    "unicode_decimal": 59970
  }, {
    "icon_id": "21017071",
    "name": "1-033",
    "font_class": "1-033",
    "unicode": "\uEA41",
    "unicode_decimal": 59969
  }, {
    "icon_id": "21005980",
    "name": "2-236svg",
    "font_class": "2-236svg",
    "unicode": "\uEBE9",
    "unicode_decimal": 60393
  }, {
    "icon_id": "21005981",
    "name": "2-238svg",
    "font_class": "2-238svg",
    "unicode": "\uEBEA",
    "unicode_decimal": 60394
  }, {
    "icon_id": "21005982",
    "name": "2-244svg",
    "font_class": "2-244svg",
    "unicode": "\uEBEB",
    "unicode_decimal": 60395
  }, {
    "icon_id": "21005983",
    "name": "2-242svg",
    "font_class": "2-242svg",
    "unicode": "\uEBEC",
    "unicode_decimal": 60396
  }, {
    "icon_id": "21005984",
    "name": "2-243svg",
    "font_class": "2-243svg",
    "unicode": "\uEBED",
    "unicode_decimal": 60397
  }, {
    "icon_id": "21005985",
    "name": "2-245svg",
    "font_class": "2-245svg",
    "unicode": "\uEBEE",
    "unicode_decimal": 60398
  }, {
    "icon_id": "21005986",
    "name": "2-237svg",
    "font_class": "2-237svg",
    "unicode": "\uEBEF",
    "unicode_decimal": 60399
  }, {
    "icon_id": "21005987",
    "name": "2-241svg",
    "font_class": "2-241svg",
    "unicode": "\uEBF0",
    "unicode_decimal": 60400
  }, {
    "icon_id": "21005988",
    "name": "2-248",
    "font_class": "2-248",
    "unicode": "\uEBF1",
    "unicode_decimal": 60401
  }, {
    "icon_id": "21005989",
    "name": "2-253",
    "font_class": "2-253",
    "unicode": "\uEBF2",
    "unicode_decimal": 60402
  }, {
    "icon_id": "21005990",
    "name": "2-246svg",
    "font_class": "2-246svg",
    "unicode": "\uEBF3",
    "unicode_decimal": 60403
  }, {
    "icon_id": "21005991",
    "name": "2-257",
    "font_class": "2-257",
    "unicode": "\uEBF4",
    "unicode_decimal": 60404
  }, {
    "icon_id": "21005992",
    "name": "2-252",
    "font_class": "2-252",
    "unicode": "\uEBF5",
    "unicode_decimal": 60405
  }, {
    "icon_id": "21005993",
    "name": "2-259",
    "font_class": "2-259",
    "unicode": "\uEBF6",
    "unicode_decimal": 60406
  }, {
    "icon_id": "21005994",
    "name": "2-254",
    "font_class": "2-254",
    "unicode": "\uEBF7",
    "unicode_decimal": 60407
  }, {
    "icon_id": "21005995",
    "name": "2-040",
    "font_class": "2-040",
    "unicode": "\uEBF8",
    "unicode_decimal": 60408
  }, {
    "icon_id": "21005996",
    "name": "2-263",
    "font_class": "2-263",
    "unicode": "\uEBF9",
    "unicode_decimal": 60409
  }, {
    "icon_id": "21005997",
    "name": "2-044",
    "font_class": "2-044",
    "unicode": "\uEBFA",
    "unicode_decimal": 60410
  }, {
    "icon_id": "21005998",
    "name": "2-265",
    "font_class": "2-265",
    "unicode": "\uEBFB",
    "unicode_decimal": 60411
  }, {
    "icon_id": "21005999",
    "name": "2-267",
    "font_class": "2-267",
    "unicode": "\uEBFC",
    "unicode_decimal": 60412
  }, {
    "icon_id": "21006000",
    "name": "2-247",
    "font_class": "2-247",
    "unicode": "\uEBFD",
    "unicode_decimal": 60413
  }, {
    "icon_id": "21006001",
    "name": "2-264",
    "font_class": "2-264",
    "unicode": "\uEBFE",
    "unicode_decimal": 60414
  }, {
    "icon_id": "21006002",
    "name": "2-269",
    "font_class": "2-269",
    "unicode": "\uEBFF",
    "unicode_decimal": 60415
  }, {
    "icon_id": "21006003",
    "name": "2-266",
    "font_class": "2-266",
    "unicode": "\uEC00",
    "unicode_decimal": 60416
  }, {
    "icon_id": "21006004",
    "name": "2-262",
    "font_class": "2-262",
    "unicode": "\uEC01",
    "unicode_decimal": 60417
  }, {
    "icon_id": "21006005",
    "name": "2-273",
    "font_class": "2-273",
    "unicode": "\uEC02",
    "unicode_decimal": 60418
  }, {
    "icon_id": "21006006",
    "name": "2-271",
    "font_class": "2-271",
    "unicode": "\uEC03",
    "unicode_decimal": 60419
  }, {
    "icon_id": "21006007",
    "name": "2-261",
    "font_class": "2-261",
    "unicode": "\uEC04",
    "unicode_decimal": 60420
  }, {
    "icon_id": "21006008",
    "name": "2-278",
    "font_class": "2-278",
    "unicode": "\uEC05",
    "unicode_decimal": 60421
  }, {
    "icon_id": "21006009",
    "name": "2-272",
    "font_class": "2-272",
    "unicode": "\uEC06",
    "unicode_decimal": 60422
  }, {
    "icon_id": "21006010",
    "name": "2-276",
    "font_class": "2-276",
    "unicode": "\uEC07",
    "unicode_decimal": 60423
  }, {
    "icon_id": "21006011",
    "name": "2-270",
    "font_class": "2-270",
    "unicode": "\uEC08",
    "unicode_decimal": 60424
  }, {
    "icon_id": "21006012",
    "name": "2-274",
    "font_class": "2-274",
    "unicode": "\uEC09",
    "unicode_decimal": 60425
  }, {
    "icon_id": "21006013",
    "name": "2-279",
    "font_class": "2-279",
    "unicode": "\uEC0A",
    "unicode_decimal": 60426
  }, {
    "icon_id": "21006014",
    "name": "2-054",
    "font_class": "2-054",
    "unicode": "\uEC0B",
    "unicode_decimal": 60427
  }, {
    "icon_id": "21006015",
    "name": "2-283",
    "font_class": "2-283",
    "unicode": "\uEC0C",
    "unicode_decimal": 60428
  }, {
    "icon_id": "21006016",
    "name": "2-282",
    "font_class": "2-282",
    "unicode": "\uEC0D",
    "unicode_decimal": 60429
  }, {
    "icon_id": "21006017",
    "name": "2-260",
    "font_class": "2-260",
    "unicode": "\uEC0E",
    "unicode_decimal": 60430
  }, {
    "icon_id": "21006018",
    "name": "2-285",
    "font_class": "2-285",
    "unicode": "\uEC0F",
    "unicode_decimal": 60431
  }, {
    "icon_id": "21006019",
    "name": "2-284",
    "font_class": "2-284",
    "unicode": "\uEC10",
    "unicode_decimal": 60432
  }, {
    "icon_id": "21006020",
    "name": "2-280",
    "font_class": "2-280",
    "unicode": "\uEC11",
    "unicode_decimal": 60433
  }, {
    "icon_id": "21006021",
    "name": "3-186",
    "font_class": "3-186",
    "unicode": "\uEC12",
    "unicode_decimal": 60434
  }, {
    "icon_id": "21006022",
    "name": "2-289",
    "font_class": "2-289",
    "unicode": "\uEC13",
    "unicode_decimal": 60435
  }, {
    "icon_id": "21006023",
    "name": "3-187",
    "font_class": "3-187",
    "unicode": "\uEC14",
    "unicode_decimal": 60436
  }, {
    "icon_id": "21006024",
    "name": "3-185",
    "font_class": "3-185",
    "unicode": "\uEC15",
    "unicode_decimal": 60437
  }, {
    "icon_id": "21006026",
    "name": "3-188",
    "font_class": "3-188",
    "unicode": "\uEC17",
    "unicode_decimal": 60439
  }, {
    "icon_id": "21006028",
    "name": "3-189",
    "font_class": "3-189",
    "unicode": "\uEC19",
    "unicode_decimal": 60441
  }, {
    "icon_id": "21006029",
    "name": "3-195",
    "font_class": "3-195",
    "unicode": "\uEC1A",
    "unicode_decimal": 60442
  }, {
    "icon_id": "21006030",
    "name": "3-198",
    "font_class": "3-198",
    "unicode": "\uEC1B",
    "unicode_decimal": 60443
  }, {
    "icon_id": "21006031",
    "name": "3-196",
    "font_class": "3-196",
    "unicode": "\uEC1C",
    "unicode_decimal": 60444
  }, {
    "icon_id": "21006032",
    "name": "3-190",
    "font_class": "3-190",
    "unicode": "\uEC1D",
    "unicode_decimal": 60445
  }, {
    "icon_id": "21006033",
    "name": "3-199",
    "font_class": "3-199",
    "unicode": "\uEC1E",
    "unicode_decimal": 60446
  }, {
    "icon_id": "21006034",
    "name": "3-204",
    "font_class": "3-204",
    "unicode": "\uEC1F",
    "unicode_decimal": 60447
  }, {
    "icon_id": "21006035",
    "name": "1-325",
    "font_class": "1-325",
    "unicode": "\uEC20",
    "unicode_decimal": 60448
  }, {
    "icon_id": "21006037",
    "name": "3-206",
    "font_class": "3-206",
    "unicode": "\uEC22",
    "unicode_decimal": 60450
  }, {
    "icon_id": "21006038",
    "name": "3-201",
    "font_class": "3-201",
    "unicode": "\uEC23",
    "unicode_decimal": 60451
  }, {
    "icon_id": "21006039",
    "name": "3-207",
    "font_class": "3-207",
    "unicode": "\uEC24",
    "unicode_decimal": 60452
  }, {
    "icon_id": "21006040",
    "name": "2-277",
    "font_class": "2-277",
    "unicode": "\uEC25",
    "unicode_decimal": 60453
  }, {
    "icon_id": "21006041",
    "name": "3-211",
    "font_class": "3-211",
    "unicode": "\uEC26",
    "unicode_decimal": 60454
  }, {
    "icon_id": "21006042",
    "name": "3-209",
    "font_class": "3-209",
    "unicode": "\uEC27",
    "unicode_decimal": 60455
  }, {
    "icon_id": "21006043",
    "name": "2-092",
    "font_class": "2-092",
    "unicode": "\uEC28",
    "unicode_decimal": 60456
  }, {
    "icon_id": "21006044",
    "name": "3-210",
    "font_class": "3-210",
    "unicode": "\uEC29",
    "unicode_decimal": 60457
  }, {
    "icon_id": "21006045",
    "name": "4-001",
    "font_class": "4-001",
    "unicode": "\uEC2A",
    "unicode_decimal": 60458
  }, {
    "icon_id": "21006046",
    "name": "3-208",
    "font_class": "3-208",
    "unicode": "\uEC2B",
    "unicode_decimal": 60459
  }, {
    "icon_id": "21006047",
    "name": "3-213",
    "font_class": "3-213",
    "unicode": "\uEC2C",
    "unicode_decimal": 60460
  }, {
    "icon_id": "21006048",
    "name": "3-197",
    "font_class": "3-197",
    "unicode": "\uEC2D",
    "unicode_decimal": 60461
  }, {
    "icon_id": "21006049",
    "name": "4-003",
    "font_class": "4-003",
    "unicode": "\uEC2E",
    "unicode_decimal": 60462
  }, {
    "icon_id": "21006050",
    "name": "2-094",
    "font_class": "2-094",
    "unicode": "\uEC2F",
    "unicode_decimal": 60463
  }, {
    "icon_id": "21006051",
    "name": "4-005",
    "font_class": "4-005",
    "unicode": "\uEC30",
    "unicode_decimal": 60464
  }, {
    "icon_id": "21006052",
    "name": "4-002",
    "font_class": "4-002",
    "unicode": "\uEC31",
    "unicode_decimal": 60465
  }, {
    "icon_id": "21006053",
    "name": "4-006",
    "font_class": "4-006",
    "unicode": "\uEC32",
    "unicode_decimal": 60466
  }, {
    "icon_id": "21006054",
    "name": "4-004",
    "font_class": "4-004",
    "unicode": "\uEC33",
    "unicode_decimal": 60467
  }, {
    "icon_id": "21006056",
    "name": "2-101",
    "font_class": "2-101",
    "unicode": "\uEC35",
    "unicode_decimal": 60469
  }, {
    "icon_id": "21006057",
    "name": "4-008",
    "font_class": "4-008",
    "unicode": "\uEC36",
    "unicode_decimal": 60470
  }, {
    "icon_id": "21006058",
    "name": "4-010",
    "font_class": "4-010",
    "unicode": "\uEC37",
    "unicode_decimal": 60471
  }, {
    "icon_id": "21006059",
    "name": "2-116",
    "font_class": "2-116",
    "unicode": "\uEC38",
    "unicode_decimal": 60472
  }, {
    "icon_id": "21006060",
    "name": "4-009",
    "font_class": "4-009",
    "unicode": "\uEC39",
    "unicode_decimal": 60473
  }, {
    "icon_id": "21006061",
    "name": "2-110",
    "font_class": "2-110",
    "unicode": "\uEC3A",
    "unicode_decimal": 60474
  }, {
    "icon_id": "21006062",
    "name": "2-134",
    "font_class": "2-134",
    "unicode": "\uEC3B",
    "unicode_decimal": 60475
  }, {
    "icon_id": "21006063",
    "name": "2-132",
    "font_class": "2-132",
    "unicode": "\uEC3C",
    "unicode_decimal": 60476
  }, {
    "icon_id": "21006064",
    "name": "2-177",
    "font_class": "2-177",
    "unicode": "\uEC3D",
    "unicode_decimal": 60477
  }, {
    "icon_id": "21006065",
    "name": "2-131",
    "font_class": "2-131",
    "unicode": "\uEC3E",
    "unicode_decimal": 60478
  }, {
    "icon_id": "21006066",
    "name": "2-144",
    "font_class": "2-144",
    "unicode": "\uEC3F",
    "unicode_decimal": 60479
  }, {
    "icon_id": "21006067",
    "name": "2-119",
    "font_class": "2-119",
    "unicode": "\uEC40",
    "unicode_decimal": 60480
  }, {
    "icon_id": "21006068",
    "name": "2-123",
    "font_class": "2-123",
    "unicode": "\uEC41",
    "unicode_decimal": 60481
  }, {
    "icon_id": "21006069",
    "name": "2-235svg",
    "font_class": "2-235svg",
    "unicode": "\uEC42",
    "unicode_decimal": 60482
  }, {
    "icon_id": "21006070",
    "name": "2-215",
    "font_class": "2-215",
    "unicode": "\uEC43",
    "unicode_decimal": 60483
  }, {
    "icon_id": "21006071",
    "name": "2-249",
    "font_class": "2-249",
    "unicode": "\uEC44",
    "unicode_decimal": 60484
  }, {
    "icon_id": "21006072",
    "name": "2-201",
    "font_class": "2-201",
    "unicode": "\uEC45",
    "unicode_decimal": 60485
  }, {
    "icon_id": "21006073",
    "name": "2-210",
    "font_class": "2-210",
    "unicode": "\uEC46",
    "unicode_decimal": 60486
  }, {
    "icon_id": "21006074",
    "name": "2-251",
    "font_class": "2-251",
    "unicode": "\uEC47",
    "unicode_decimal": 60487
  }, {
    "icon_id": "21006075",
    "name": "2-286",
    "font_class": "2-286",
    "unicode": "\uEC48",
    "unicode_decimal": 60488
  }, {
    "icon_id": "21006076",
    "name": "2-258",
    "font_class": "2-258",
    "unicode": "\uEC49",
    "unicode_decimal": 60489
  }, {
    "icon_id": "21006077",
    "name": "2-268",
    "font_class": "2-268",
    "unicode": "\uEC4A",
    "unicode_decimal": 60490
  }, {
    "icon_id": "21006078",
    "name": "2-288",
    "font_class": "2-288",
    "unicode": "\uEC4B",
    "unicode_decimal": 60491
  }, {
    "icon_id": "21006079",
    "name": "2-230",
    "font_class": "2-230",
    "unicode": "\uEC4C",
    "unicode_decimal": 60492
  }, {
    "icon_id": "21006080",
    "name": "3-202",
    "font_class": "3-202",
    "unicode": "\uEC4D",
    "unicode_decimal": 60493
  }, {
    "icon_id": "21006081",
    "name": "2-195",
    "font_class": "2-195",
    "unicode": "\uEC4E",
    "unicode_decimal": 60494
  }, {
    "icon_id": "21006082",
    "name": "2-287",
    "font_class": "2-287",
    "unicode": "\uEC4F",
    "unicode_decimal": 60495
  }, {
    "icon_id": "21006083",
    "name": "2-135",
    "font_class": "2-135",
    "unicode": "\uEC50",
    "unicode_decimal": 60496
  }, {
    "icon_id": "21006084",
    "name": "3-205",
    "font_class": "3-205",
    "unicode": "\uEC51",
    "unicode_decimal": 60497
  }, {
    "icon_id": "21006085",
    "name": "3-200",
    "font_class": "3-200",
    "unicode": "\uEC52",
    "unicode_decimal": 60498
  }, {
    "icon_id": "21006086",
    "name": "2-275",
    "font_class": "2-275",
    "unicode": "\uEC53",
    "unicode_decimal": 60499
  }, {
    "icon_id": "21006087",
    "name": "2-250",
    "font_class": "2-250",
    "unicode": "\uEC54",
    "unicode_decimal": 60500
  }, {
    "icon_id": "21006088",
    "name": "1-284",
    "font_class": "1-284",
    "unicode": "\uEC55",
    "unicode_decimal": 60501
  }, {
    "icon_id": "21006089",
    "name": "4-007",
    "font_class": "4-007",
    "unicode": "\uEC56",
    "unicode_decimal": 60502
  }, {
    "icon_id": "21006090",
    "name": "1-336",
    "font_class": "1-336",
    "unicode": "\uEC57",
    "unicode_decimal": 60503
  }, {
    "icon_id": "21006091",
    "name": "2-281",
    "font_class": "2-281",
    "unicode": "\uEC58",
    "unicode_decimal": 60504
  }, {
    "icon_id": "21006094",
    "name": "2-290",
    "font_class": "2-290",
    "unicode": "\uEC5B",
    "unicode_decimal": 60507
  }, {
    "icon_id": "21006095",
    "name": "2-186",
    "font_class": "2-186",
    "unicode": "\uEC5C",
    "unicode_decimal": 60508
  }, {
    "icon_id": "21006096",
    "name": "3-214",
    "font_class": "3-214",
    "unicode": "\uEC5D",
    "unicode_decimal": 60509
  }, {
    "icon_id": "21005800",
    "name": "2-026",
    "font_class": "2-026",
    "unicode": "\uEB36",
    "unicode_decimal": 60214
  }, {
    "icon_id": "21005842",
    "name": "2-014",
    "font_class": "2-014",
    "unicode": "\uEB5F",
    "unicode_decimal": 60255
  }, {
    "icon_id": "21005845",
    "name": "1-326",
    "font_class": "1-326",
    "unicode": "\uEB62",
    "unicode_decimal": 60258
  }, {
    "icon_id": "21005849",
    "name": "2-051",
    "font_class": "2-051",
    "unicode": "\uEB66",
    "unicode_decimal": 60262
  }, {
    "icon_id": "21005851",
    "name": "1-319",
    "font_class": "1-319",
    "unicode": "\uEB68",
    "unicode_decimal": 60264
  }, {
    "icon_id": "21005853",
    "name": "1-333",
    "font_class": "1-333",
    "unicode": "\uEB6A",
    "unicode_decimal": 60266
  }, {
    "icon_id": "21005855",
    "name": "1-335",
    "font_class": "1-335",
    "unicode": "\uEB6C",
    "unicode_decimal": 60268
  }, {
    "icon_id": "21005858",
    "name": "2-099",
    "font_class": "2-099",
    "unicode": "\uEB6F",
    "unicode_decimal": 60271
  }, {
    "icon_id": "21005859",
    "name": "2-053",
    "font_class": "2-053",
    "unicode": "\uEB70",
    "unicode_decimal": 60272
  }, {
    "icon_id": "21005863",
    "name": "1-305",
    "font_class": "1-305",
    "unicode": "\uEB74",
    "unicode_decimal": 60276
  }, {
    "icon_id": "21005864",
    "name": "2-102",
    "font_class": "2-102",
    "unicode": "\uEB75",
    "unicode_decimal": 60277
  }, {
    "icon_id": "21005865",
    "name": "2-100",
    "font_class": "2-100",
    "unicode": "\uEB76",
    "unicode_decimal": 60278
  }, {
    "icon_id": "21005866",
    "name": "2-036",
    "font_class": "2-036",
    "unicode": "\uEB77",
    "unicode_decimal": 60279
  }, {
    "icon_id": "21005867",
    "name": "2-103",
    "font_class": "2-103",
    "unicode": "\uEB78",
    "unicode_decimal": 60280
  }, {
    "icon_id": "21005868",
    "name": "2-104",
    "font_class": "2-104",
    "unicode": "\uEB79",
    "unicode_decimal": 60281
  }, {
    "icon_id": "21005869",
    "name": "2-112",
    "font_class": "2-112",
    "unicode": "\uEB7A",
    "unicode_decimal": 60282
  }, {
    "icon_id": "21005870",
    "name": "2-106",
    "font_class": "2-106",
    "unicode": "\uEB7B",
    "unicode_decimal": 60283
  }, {
    "icon_id": "21005871",
    "name": "2-097",
    "font_class": "2-097",
    "unicode": "\uEB7C",
    "unicode_decimal": 60284
  }, {
    "icon_id": "21005872",
    "name": "2-114",
    "font_class": "2-114",
    "unicode": "\uEB7D",
    "unicode_decimal": 60285
  }, {
    "icon_id": "21005873",
    "name": "2-115",
    "font_class": "2-115",
    "unicode": "\uEB7E",
    "unicode_decimal": 60286
  }, {
    "icon_id": "21005874",
    "name": "2-108",
    "font_class": "2-108",
    "unicode": "\uEB7F",
    "unicode_decimal": 60287
  }, {
    "icon_id": "21005875",
    "name": "2-118",
    "font_class": "2-118",
    "unicode": "\uEB80",
    "unicode_decimal": 60288
  }, {
    "icon_id": "21005876",
    "name": "2-096",
    "font_class": "2-096",
    "unicode": "\uEB81",
    "unicode_decimal": 60289
  }, {
    "icon_id": "21005878",
    "name": "1-338",
    "font_class": "1-338",
    "unicode": "\uEB83",
    "unicode_decimal": 60291
  }, {
    "icon_id": "21005880",
    "name": "1-329",
    "font_class": "1-329",
    "unicode": "\uEB85",
    "unicode_decimal": 60293
  }, {
    "icon_id": "21005882",
    "name": "2-109",
    "font_class": "2-109",
    "unicode": "\uEB87",
    "unicode_decimal": 60295
  }, {
    "icon_id": "21005890",
    "name": "2-143",
    "font_class": "2-143",
    "unicode": "\uEB8F",
    "unicode_decimal": 60303
  }, {
    "icon_id": "21005895",
    "name": "2-098",
    "font_class": "2-098",
    "unicode": "\uEB94",
    "unicode_decimal": 60308
  }, {
    "icon_id": "21005897",
    "name": "2-142",
    "font_class": "2-142",
    "unicode": "\uEB96",
    "unicode_decimal": 60310
  }, {
    "icon_id": "21005898",
    "name": "2-141",
    "font_class": "2-141",
    "unicode": "\uEB97",
    "unicode_decimal": 60311
  }, {
    "icon_id": "21005902",
    "name": "2-111",
    "font_class": "2-111",
    "unicode": "\uEB9B",
    "unicode_decimal": 60315
  }, {
    "icon_id": "21005903",
    "name": "2-117",
    "font_class": "2-117",
    "unicode": "\uEB9C",
    "unicode_decimal": 60316
  }, {
    "icon_id": "21005905",
    "name": "2-055",
    "font_class": "2-055",
    "unicode": "\uEB9E",
    "unicode_decimal": 60318
  }, {
    "icon_id": "21005909",
    "name": "2-013",
    "font_class": "2-013",
    "unicode": "\uEBA2",
    "unicode_decimal": 60322
  }, {
    "icon_id": "21005912",
    "name": "2-025",
    "font_class": "2-025",
    "unicode": "\uEBA5",
    "unicode_decimal": 60325
  }, {
    "icon_id": "21005918",
    "name": "1-304",
    "font_class": "1-304",
    "unicode": "\uEBAB",
    "unicode_decimal": 60331
  }, {
    "icon_id": "21005954",
    "name": "2-200",
    "font_class": "2-200",
    "unicode": "\uEBCF",
    "unicode_decimal": 60367
  }, {
    "icon_id": "21005955",
    "name": "2-202",
    "font_class": "2-202",
    "unicode": "\uEBD0",
    "unicode_decimal": 60368
  }, {
    "icon_id": "21005957",
    "name": "2-208",
    "font_class": "2-208",
    "unicode": "\uEBD2",
    "unicode_decimal": 60370
  }, {
    "icon_id": "21005959",
    "name": "2-206",
    "font_class": "2-206",
    "unicode": "\uEBD4",
    "unicode_decimal": 60372
  }, {
    "icon_id": "21005960",
    "name": "2-203",
    "font_class": "2-203",
    "unicode": "\uEBD5",
    "unicode_decimal": 60373
  }, {
    "icon_id": "21005961",
    "name": "2-207",
    "font_class": "2-207",
    "unicode": "\uEBD6",
    "unicode_decimal": 60374
  }, {
    "icon_id": "21005962",
    "name": "2-209",
    "font_class": "2-209",
    "unicode": "\uEBD7",
    "unicode_decimal": 60375
  }, {
    "icon_id": "21005963",
    "name": "2-211",
    "font_class": "2-211",
    "unicode": "\uEBD8",
    "unicode_decimal": 60376
  }, {
    "icon_id": "21005964",
    "name": "2-205",
    "font_class": "2-205",
    "unicode": "\uEBD9",
    "unicode_decimal": 60377
  }, {
    "icon_id": "21005965",
    "name": "2-204",
    "font_class": "2-204",
    "unicode": "\uEBDA",
    "unicode_decimal": 60378
  }, {
    "icon_id": "21005966",
    "name": "2-214",
    "font_class": "2-214",
    "unicode": "\uEBDB",
    "unicode_decimal": 60379
  }, {
    "icon_id": "21005967",
    "name": "2-213",
    "font_class": "2-213",
    "unicode": "\uEBDC",
    "unicode_decimal": 60380
  }, {
    "icon_id": "21005968",
    "name": "2-220",
    "font_class": "2-220",
    "unicode": "\uEBDD",
    "unicode_decimal": 60381
  }, {
    "icon_id": "21005969",
    "name": "2-219",
    "font_class": "2-219",
    "unicode": "\uEBDE",
    "unicode_decimal": 60382
  }, {
    "icon_id": "21005970",
    "name": "2-216",
    "font_class": "2-216",
    "unicode": "\uEBDF",
    "unicode_decimal": 60383
  }, {
    "icon_id": "21005971",
    "name": "2-218",
    "font_class": "2-218",
    "unicode": "\uEBE0",
    "unicode_decimal": 60384
  }, {
    "icon_id": "21005972",
    "name": "2-221",
    "font_class": "2-221",
    "unicode": "\uEBE1",
    "unicode_decimal": 60385
  }, {
    "icon_id": "21005973",
    "name": "2-212",
    "font_class": "2-212",
    "unicode": "\uEBE2",
    "unicode_decimal": 60386
  }, {
    "icon_id": "21005974",
    "name": "2-217",
    "font_class": "2-217",
    "unicode": "\uEBE3",
    "unicode_decimal": 60387
  }, {
    "icon_id": "21005975",
    "name": "2-222",
    "font_class": "2-222",
    "unicode": "\uEBE4",
    "unicode_decimal": 60388
  }, {
    "icon_id": "21005976",
    "name": "2-223",
    "font_class": "2-223",
    "unicode": "\uEBE5",
    "unicode_decimal": 60389
  }, {
    "icon_id": "21005977",
    "name": "2-231svg",
    "font_class": "2-231svg",
    "unicode": "\uEBE6",
    "unicode_decimal": 60390
  }, {
    "icon_id": "21005978",
    "name": "2-232svg",
    "font_class": "2-232svg",
    "unicode": "\uEBE7",
    "unicode_decimal": 60391
  }, {
    "icon_id": "21005979",
    "name": "2-233svg",
    "font_class": "2-233svg",
    "unicode": "\uEBE8",
    "unicode_decimal": 60392
  }, {
    "icon_id": "21005792",
    "name": "2-027",
    "font_class": "2-027",
    "unicode": "\uE9CD",
    "unicode_decimal": 59853
  }, {
    "icon_id": "21005793",
    "name": "1-353",
    "font_class": "1-353",
    "unicode": "\uE9CE",
    "unicode_decimal": 59854
  }, {
    "icon_id": "21005794",
    "name": "2-002",
    "font_class": "2-002",
    "unicode": "\uE9CF",
    "unicode_decimal": 59855
  }, {
    "icon_id": "21005795",
    "name": "1-270",
    "font_class": "1-270",
    "unicode": "\uE9D0",
    "unicode_decimal": 59856
  }, {
    "icon_id": "21005796",
    "name": "2-034",
    "font_class": "2-034",
    "unicode": "\uE9D1",
    "unicode_decimal": 59857
  }, {
    "icon_id": "21005797",
    "name": "1-252",
    "font_class": "1-252",
    "unicode": "\uE9D2",
    "unicode_decimal": 59858
  }, {
    "icon_id": "21005798",
    "name": "2-028",
    "font_class": "2-028",
    "unicode": "\uE9D3",
    "unicode_decimal": 59859
  }, {
    "icon_id": "21005799",
    "name": "1-306",
    "font_class": "1-306",
    "unicode": "\uE9D4",
    "unicode_decimal": 59860
  }, {
    "icon_id": "21005801",
    "name": "1-341",
    "font_class": "1-341",
    "unicode": "\uE9D5",
    "unicode_decimal": 59861
  }, {
    "icon_id": "21005802",
    "name": "2-041",
    "font_class": "2-041",
    "unicode": "\uE9D6",
    "unicode_decimal": 59862
  }, {
    "icon_id": "21005803",
    "name": "1-307",
    "font_class": "1-307",
    "unicode": "\uE9D7",
    "unicode_decimal": 59863
  }, {
    "icon_id": "21005804",
    "name": "2-010",
    "font_class": "2-010",
    "unicode": "\uE9D8",
    "unicode_decimal": 59864
  }, {
    "icon_id": "21005805",
    "name": "2-050",
    "font_class": "2-050",
    "unicode": "\uE9D9",
    "unicode_decimal": 59865
  }, {
    "icon_id": "21005806",
    "name": "2-048",
    "font_class": "2-048",
    "unicode": "\uE9DA",
    "unicode_decimal": 59866
  }, {
    "icon_id": "21005807",
    "name": "1-292",
    "font_class": "1-292",
    "unicode": "\uE9DB",
    "unicode_decimal": 59867
  }, {
    "icon_id": "21005808",
    "name": "2-038",
    "font_class": "2-038",
    "unicode": "\uE9DC",
    "unicode_decimal": 59868
  }, {
    "icon_id": "21005809",
    "name": "2-039",
    "font_class": "2-039",
    "unicode": "\uE9DD",
    "unicode_decimal": 59869
  }, {
    "icon_id": "21005810",
    "name": "1-296",
    "font_class": "1-296",
    "unicode": "\uE9DE",
    "unicode_decimal": 59870
  }, {
    "icon_id": "21005811",
    "name": "2-005",
    "font_class": "2-005",
    "unicode": "\uE9DF",
    "unicode_decimal": 59871
  }, {
    "icon_id": "21005554",
    "name": "1-001",
    "font_class": "1-001",
    "unicode": "\uE8E0",
    "unicode_decimal": 59616
  }, {
    "icon_id": "21005812",
    "name": "2-056",
    "font_class": "2-056",
    "unicode": "\uE9E0",
    "unicode_decimal": 59872
  }, {
    "icon_id": "21005555",
    "name": "1-002",
    "font_class": "1-002",
    "unicode": "\uE8E1",
    "unicode_decimal": 59617
  }, {
    "icon_id": "21005813",
    "name": "2-049",
    "font_class": "2-049",
    "unicode": "\uE9E1",
    "unicode_decimal": 59873
  }, {
    "icon_id": "21005556",
    "name": "1-005",
    "font_class": "1-005",
    "unicode": "\uE8E2",
    "unicode_decimal": 59618
  }, {
    "icon_id": "21005814",
    "name": "1-310",
    "font_class": "1-310",
    "unicode": "\uE9E2",
    "unicode_decimal": 59874
  }, {
    "icon_id": "21005557",
    "name": "1-006",
    "font_class": "1-006",
    "unicode": "\uE8E3",
    "unicode_decimal": 59619
  }, {
    "icon_id": "21005815",
    "name": "2-058",
    "font_class": "2-058",
    "unicode": "\uE9E3",
    "unicode_decimal": 59875
  }, {
    "icon_id": "21005558",
    "name": "1-007",
    "font_class": "1-007",
    "unicode": "\uE8E4",
    "unicode_decimal": 59620
  }, {
    "icon_id": "21005816",
    "name": "2-046",
    "font_class": "2-046",
    "unicode": "\uE9E4",
    "unicode_decimal": 59876
  }, {
    "icon_id": "21005559",
    "name": "1-016",
    "font_class": "1-016",
    "unicode": "\uE8E5",
    "unicode_decimal": 59621
  }, {
    "icon_id": "21005817",
    "name": "2-029",
    "font_class": "2-029",
    "unicode": "\uE9E5",
    "unicode_decimal": 59877
  }, {
    "icon_id": "21005560",
    "name": "1-015",
    "font_class": "1-015",
    "unicode": "\uE8E6",
    "unicode_decimal": 59622
  }, {
    "icon_id": "21005818",
    "name": "2-017",
    "font_class": "2-017",
    "unicode": "\uE9E6",
    "unicode_decimal": 59878
  }, {
    "icon_id": "21005561",
    "name": "1-012",
    "font_class": "1-012",
    "unicode": "\uE8E7",
    "unicode_decimal": 59623
  }, {
    "icon_id": "21005819",
    "name": "1-317",
    "font_class": "1-317",
    "unicode": "\uE9E7",
    "unicode_decimal": 59879
  }, {
    "icon_id": "21005562",
    "name": "1-018",
    "font_class": "1-018",
    "unicode": "\uE8E8",
    "unicode_decimal": 59624
  }, {
    "icon_id": "21005820",
    "name": "2-057",
    "font_class": "2-057",
    "unicode": "\uE9E8",
    "unicode_decimal": 59880
  }, {
    "icon_id": "21005563",
    "name": "1-014",
    "font_class": "1-014",
    "unicode": "\uE8E9",
    "unicode_decimal": 59625
  }, {
    "icon_id": "21005821",
    "name": "2-042",
    "font_class": "2-042",
    "unicode": "\uE9E9",
    "unicode_decimal": 59881
  }, {
    "icon_id": "21005564",
    "name": "1-017",
    "font_class": "1-017",
    "unicode": "\uE8EA",
    "unicode_decimal": 59626
  }, {
    "icon_id": "21005565",
    "name": "1-008",
    "font_class": "1-008",
    "unicode": "\uE8EB",
    "unicode_decimal": 59627
  }, {
    "icon_id": "21005566",
    "name": "1-010",
    "font_class": "1-010",
    "unicode": "\uE8EC",
    "unicode_decimal": 59628
  }, {
    "icon_id": "21005824",
    "name": "2-021",
    "font_class": "2-021",
    "unicode": "\uE9EC",
    "unicode_decimal": 59884
  }, {
    "icon_id": "21005567",
    "name": "1-026",
    "font_class": "1-026",
    "unicode": "\uE8ED",
    "unicode_decimal": 59629
  }, {
    "icon_id": "21005825",
    "name": "1-315",
    "font_class": "1-315",
    "unicode": "\uE9ED",
    "unicode_decimal": 59885
  }, {
    "icon_id": "21005568",
    "name": "1-025",
    "font_class": "1-025",
    "unicode": "\uE8EE",
    "unicode_decimal": 59630
  }, {
    "icon_id": "21005826",
    "name": "2-030",
    "font_class": "2-030",
    "unicode": "\uE9EE",
    "unicode_decimal": 59886
  }, {
    "icon_id": "21005570",
    "name": "1-027",
    "font_class": "1-027",
    "unicode": "\uE8F0",
    "unicode_decimal": 59632
  }, {
    "icon_id": "21005828",
    "name": "2-016",
    "font_class": "2-016",
    "unicode": "\uE9F0",
    "unicode_decimal": 59888
  }, {
    "icon_id": "21005571",
    "name": "1-019",
    "font_class": "1-019",
    "unicode": "\uE8F1",
    "unicode_decimal": 59633
  }, {
    "icon_id": "21005829",
    "name": "2-052",
    "font_class": "2-052",
    "unicode": "\uE9F1",
    "unicode_decimal": 59889
  }, {
    "icon_id": "21005572",
    "name": "1-030",
    "font_class": "1-030",
    "unicode": "\uE8F2",
    "unicode_decimal": 59634
  }, {
    "icon_id": "21005831",
    "name": "2-032",
    "font_class": "2-032",
    "unicode": "\uE9F2",
    "unicode_decimal": 59890
  }, {
    "icon_id": "21005573",
    "name": "1-032",
    "font_class": "1-032",
    "unicode": "\uE8F3",
    "unicode_decimal": 59635
  }, {
    "icon_id": "21005832",
    "name": "3-203",
    "font_class": "3-203",
    "unicode": "\uE9F3",
    "unicode_decimal": 59891
  }, {
    "icon_id": "21005574",
    "name": "1-024",
    "font_class": "1-024",
    "unicode": "\uE8F4",
    "unicode_decimal": 59636
  }, {
    "icon_id": "21005575",
    "name": "1-028",
    "font_class": "1-028",
    "unicode": "\uE8F5",
    "unicode_decimal": 59637
  }, {
    "icon_id": "21005834",
    "name": "1-316",
    "font_class": "1-316",
    "unicode": "\uE9F5",
    "unicode_decimal": 59893
  }, {
    "icon_id": "21005576",
    "name": "1-035",
    "font_class": "1-035",
    "unicode": "\uE8F6",
    "unicode_decimal": 59638
  }, {
    "icon_id": "21005835",
    "name": "2-043",
    "font_class": "2-043",
    "unicode": "\uE9F6",
    "unicode_decimal": 59894
  }, {
    "icon_id": "21005577",
    "name": "1-031",
    "font_class": "1-031",
    "unicode": "\uE8F7",
    "unicode_decimal": 59639
  }, {
    "icon_id": "21005836",
    "name": "1-321",
    "font_class": "1-321",
    "unicode": "\uE9F7",
    "unicode_decimal": 59895
  }, {
    "icon_id": "21005578",
    "name": "1-020",
    "font_class": "1-020",
    "unicode": "\uE8F8",
    "unicode_decimal": 59640
  }, {
    "icon_id": "21005579",
    "name": "1-040",
    "font_class": "1-040",
    "unicode": "\uE8F9",
    "unicode_decimal": 59641
  }, {
    "icon_id": "21005839",
    "name": "1-324",
    "font_class": "1-324",
    "unicode": "\uE9F9",
    "unicode_decimal": 59897
  }, {
    "icon_id": "21005580",
    "name": "1-041",
    "font_class": "1-041",
    "unicode": "\uE8FA",
    "unicode_decimal": 59642
  }, {
    "icon_id": "21005581",
    "name": "1-037",
    "font_class": "1-037",
    "unicode": "\uE8FB",
    "unicode_decimal": 59643
  }, {
    "icon_id": "21005582",
    "name": "1-029",
    "font_class": "1-029",
    "unicode": "\uE8FC",
    "unicode_decimal": 59644
  }, {
    "icon_id": "21005843",
    "name": "2-059",
    "font_class": "2-059",
    "unicode": "\uE9FC",
    "unicode_decimal": 59900
  }, {
    "icon_id": "21005583",
    "name": "1-046",
    "font_class": "1-046",
    "unicode": "\uE8FD",
    "unicode_decimal": 59645
  }, {
    "icon_id": "21005584",
    "name": "1-042",
    "font_class": "1-042",
    "unicode": "\uE8FE",
    "unicode_decimal": 59646
  }, {
    "icon_id": "21005846",
    "name": "2-045",
    "font_class": "2-045",
    "unicode": "\uE9FE",
    "unicode_decimal": 59902
  }, {
    "icon_id": "21005585",
    "name": "1-044",
    "font_class": "1-044",
    "unicode": "\uE8FF",
    "unicode_decimal": 59647
  }, {
    "icon_id": "21005586",
    "name": "1-048",
    "font_class": "1-048",
    "unicode": "\uE900",
    "unicode_decimal": 59648
  }, {
    "icon_id": "21005587",
    "name": "1-045",
    "font_class": "1-045",
    "unicode": "\uE901",
    "unicode_decimal": 59649
  }, {
    "icon_id": "21005588",
    "name": "1-021",
    "font_class": "1-021",
    "unicode": "\uE902",
    "unicode_decimal": 59650
  }, {
    "icon_id": "21005877",
    "name": "2-128",
    "font_class": "2-128",
    "unicode": "\uEA02",
    "unicode_decimal": 59906
  }, {
    "icon_id": "21005589",
    "name": "1-050",
    "font_class": "1-050",
    "unicode": "\uE903",
    "unicode_decimal": 59651
  }, {
    "icon_id": "21005879",
    "name": "2-120",
    "font_class": "2-120",
    "unicode": "\uEA03",
    "unicode_decimal": 59907
  }, {
    "icon_id": "21005590",
    "name": "1-047",
    "font_class": "1-047",
    "unicode": "\uE904",
    "unicode_decimal": 59652
  }, {
    "icon_id": "21005881",
    "name": "2-121",
    "font_class": "2-121",
    "unicode": "\uEA04",
    "unicode_decimal": 59908
  }, {
    "icon_id": "21005591",
    "name": "1-053",
    "font_class": "1-053",
    "unicode": "\uE905",
    "unicode_decimal": 59653
  }, {
    "icon_id": "21005883",
    "name": "2-126",
    "font_class": "2-126",
    "unicode": "\uEA05",
    "unicode_decimal": 59909
  }, {
    "icon_id": "21005592",
    "name": "1-039",
    "font_class": "1-039",
    "unicode": "\uE906",
    "unicode_decimal": 59654
  }, {
    "icon_id": "21005884",
    "name": "2-124",
    "font_class": "2-124",
    "unicode": "\uEA06",
    "unicode_decimal": 59910
  }, {
    "icon_id": "21005593",
    "name": "1-051",
    "font_class": "1-051",
    "unicode": "\uE907",
    "unicode_decimal": 59655
  }, {
    "icon_id": "21005885",
    "name": "2-138",
    "font_class": "2-138",
    "unicode": "\uEA07",
    "unicode_decimal": 59911
  }, {
    "icon_id": "21005594",
    "name": "1-052",
    "font_class": "1-052",
    "unicode": "\uE908",
    "unicode_decimal": 59656
  }, {
    "icon_id": "21005886",
    "name": "2-129",
    "font_class": "2-129",
    "unicode": "\uEA08",
    "unicode_decimal": 59912
  }, {
    "icon_id": "21005595",
    "name": "1-055",
    "font_class": "1-055",
    "unicode": "\uE909",
    "unicode_decimal": 59657
  }, {
    "icon_id": "21005887",
    "name": "2-140",
    "font_class": "2-140",
    "unicode": "\uEA09",
    "unicode_decimal": 59913
  }, {
    "icon_id": "21005596",
    "name": "1-056",
    "font_class": "1-056",
    "unicode": "\uE90A",
    "unicode_decimal": 59658
  }, {
    "icon_id": "21005888",
    "name": "2-139",
    "font_class": "2-139",
    "unicode": "\uEA0A",
    "unicode_decimal": 59914
  }, {
    "icon_id": "21005597",
    "name": "1-054",
    "font_class": "1-054",
    "unicode": "\uE90B",
    "unicode_decimal": 59659
  }, {
    "icon_id": "21005891",
    "name": "2-147",
    "font_class": "2-147",
    "unicode": "\uEA0B",
    "unicode_decimal": 59915
  }, {
    "icon_id": "21005598",
    "name": "1-109",
    "font_class": "1-109",
    "unicode": "\uE90C",
    "unicode_decimal": 59660
  }, {
    "icon_id": "21005892",
    "name": "2-136",
    "font_class": "2-136",
    "unicode": "\uEA0C",
    "unicode_decimal": 59916
  }, {
    "icon_id": "21005599",
    "name": "1-057",
    "font_class": "1-057",
    "unicode": "\uE90D",
    "unicode_decimal": 59661
  }, {
    "icon_id": "21005893",
    "name": "2-137",
    "font_class": "2-137",
    "unicode": "\uEA0D",
    "unicode_decimal": 59917
  }, {
    "icon_id": "21005600",
    "name": "1-108",
    "font_class": "1-108",
    "unicode": "\uE90E",
    "unicode_decimal": 59662
  }, {
    "icon_id": "21005894",
    "name": "2-145",
    "font_class": "2-145",
    "unicode": "\uEA0E",
    "unicode_decimal": 59918
  }, {
    "icon_id": "21005601",
    "name": "1-110",
    "font_class": "1-110",
    "unicode": "\uE90F",
    "unicode_decimal": 59663
  }, {
    "icon_id": "21005896",
    "name": "2-148",
    "font_class": "2-148",
    "unicode": "\uEA0F",
    "unicode_decimal": 59919
  }, {
    "icon_id": "21005899",
    "name": "2-130",
    "font_class": "2-130",
    "unicode": "\uEA10",
    "unicode_decimal": 59920
  }, {
    "icon_id": "21005603",
    "name": "1-113",
    "font_class": "1-113",
    "unicode": "\uE911",
    "unicode_decimal": 59665
  }, {
    "icon_id": "21005900",
    "name": "2-149",
    "font_class": "2-149",
    "unicode": "\uEA11",
    "unicode_decimal": 59921
  }, {
    "icon_id": "21005604",
    "name": "1-058",
    "font_class": "1-058",
    "unicode": "\uE912",
    "unicode_decimal": 59666
  }, {
    "icon_id": "21005901",
    "name": "2-150",
    "font_class": "2-150",
    "unicode": "\uEA12",
    "unicode_decimal": 59922
  }, {
    "icon_id": "21005605",
    "name": "1-114",
    "font_class": "1-114",
    "unicode": "\uE913",
    "unicode_decimal": 59667
  }, {
    "icon_id": "21005904",
    "name": "2-153",
    "font_class": "2-153",
    "unicode": "\uEA13",
    "unicode_decimal": 59923
  }, {
    "icon_id": "21005606",
    "name": "1-049",
    "font_class": "1-049",
    "unicode": "\uE914",
    "unicode_decimal": 59668
  }, {
    "icon_id": "21005906",
    "name": "2-152",
    "font_class": "2-152",
    "unicode": "\uEA14",
    "unicode_decimal": 59924
  }, {
    "icon_id": "21005607",
    "name": "1-112",
    "font_class": "1-112",
    "unicode": "\uE915",
    "unicode_decimal": 59669
  }, {
    "icon_id": "21005907",
    "name": "2-122",
    "font_class": "2-122",
    "unicode": "\uEA15",
    "unicode_decimal": 59925
  }, {
    "icon_id": "21005608",
    "name": "1-117",
    "font_class": "1-117",
    "unicode": "\uE916",
    "unicode_decimal": 59670
  }, {
    "icon_id": "21005908",
    "name": "2-155",
    "font_class": "2-155",
    "unicode": "\uEA16",
    "unicode_decimal": 59926
  }, {
    "icon_id": "21005609",
    "name": "1-116",
    "font_class": "1-116",
    "unicode": "\uE917",
    "unicode_decimal": 59671
  }, {
    "icon_id": "21005910",
    "name": "2-156",
    "font_class": "2-156",
    "unicode": "\uEA17",
    "unicode_decimal": 59927
  }, {
    "icon_id": "21005610",
    "name": "1-111",
    "font_class": "1-111",
    "unicode": "\uE918",
    "unicode_decimal": 59672
  }, {
    "icon_id": "21005911",
    "name": "2-161",
    "font_class": "2-161",
    "unicode": "\uEA18",
    "unicode_decimal": 59928
  }, {
    "icon_id": "21005611",
    "name": "1-133",
    "font_class": "1-133",
    "unicode": "\uE919",
    "unicode_decimal": 59673
  }, {
    "icon_id": "21005913",
    "name": "2-154",
    "font_class": "2-154",
    "unicode": "\uEA19",
    "unicode_decimal": 59929
  }, {
    "icon_id": "21005612",
    "name": "1-145",
    "font_class": "1-145",
    "unicode": "\uE91A",
    "unicode_decimal": 59674
  }, {
    "icon_id": "21005914",
    "name": "2-159",
    "font_class": "2-159",
    "unicode": "\uEA1A",
    "unicode_decimal": 59930
  }, {
    "icon_id": "21005613",
    "name": "1-146",
    "font_class": "1-146",
    "unicode": "\uE91B",
    "unicode_decimal": 59675
  }, {
    "icon_id": "21005915",
    "name": "2-158",
    "font_class": "2-158",
    "unicode": "\uEA1B",
    "unicode_decimal": 59931
  }, {
    "icon_id": "21005614",
    "name": "1-135",
    "font_class": "1-135",
    "unicode": "\uE91C",
    "unicode_decimal": 59676
  }, {
    "icon_id": "21005916",
    "name": "2-160",
    "font_class": "2-160",
    "unicode": "\uEA1C",
    "unicode_decimal": 59932
  }, {
    "icon_id": "21005615",
    "name": "1-151",
    "font_class": "1-151",
    "unicode": "\uE91D",
    "unicode_decimal": 59677
  }, {
    "icon_id": "21005917",
    "name": "2-163",
    "font_class": "2-163",
    "unicode": "\uEA1D",
    "unicode_decimal": 59933
  }, {
    "icon_id": "21005616",
    "name": "1-149",
    "font_class": "1-149",
    "unicode": "\uE91E",
    "unicode_decimal": 59678
  }, {
    "icon_id": "21005919",
    "name": "2-166",
    "font_class": "2-166",
    "unicode": "\uEA1E",
    "unicode_decimal": 59934
  }, {
    "icon_id": "21005617",
    "name": "1-150",
    "font_class": "1-150",
    "unicode": "\uE91F",
    "unicode_decimal": 59679
  }, {
    "icon_id": "21005920",
    "name": "2-162",
    "font_class": "2-162",
    "unicode": "\uEA1F",
    "unicode_decimal": 59935
  }, {
    "icon_id": "21005618",
    "name": "1-059",
    "font_class": "1-059",
    "unicode": "\uE920",
    "unicode_decimal": 59680
  }, {
    "icon_id": "21005921",
    "name": "2-165",
    "font_class": "2-165",
    "unicode": "\uEA20",
    "unicode_decimal": 59936
  }, {
    "icon_id": "21005619",
    "name": "1-125",
    "font_class": "1-125",
    "unicode": "\uE921",
    "unicode_decimal": 59681
  }, {
    "icon_id": "21005922",
    "name": "2-151",
    "font_class": "2-151",
    "unicode": "\uEA21",
    "unicode_decimal": 59937
  }, {
    "icon_id": "21005620",
    "name": "1-158",
    "font_class": "1-158",
    "unicode": "\uE922",
    "unicode_decimal": 59682
  }, {
    "icon_id": "21005923",
    "name": "2-164",
    "font_class": "2-164",
    "unicode": "\uEA22",
    "unicode_decimal": 59938
  }, {
    "icon_id": "21005621",
    "name": "1-144",
    "font_class": "1-144",
    "unicode": "\uE923",
    "unicode_decimal": 59683
  }, {
    "icon_id": "21005924",
    "name": "2-169",
    "font_class": "2-169",
    "unicode": "\uEA23",
    "unicode_decimal": 59939
  }, {
    "icon_id": "21005622",
    "name": "1-159",
    "font_class": "1-159",
    "unicode": "\uE924",
    "unicode_decimal": 59684
  }, {
    "icon_id": "21005925",
    "name": "2-167",
    "font_class": "2-167",
    "unicode": "\uEA24",
    "unicode_decimal": 59940
  }, {
    "icon_id": "21005623",
    "name": "1-152",
    "font_class": "1-152",
    "unicode": "\uE925",
    "unicode_decimal": 59685
  }, {
    "icon_id": "21005927",
    "name": "2-174",
    "font_class": "2-174",
    "unicode": "\uEA25",
    "unicode_decimal": 59941
  }, {
    "icon_id": "21005624",
    "name": "1-165",
    "font_class": "1-165",
    "unicode": "\uE926",
    "unicode_decimal": 59686
  }, {
    "icon_id": "21005928",
    "name": "2-171",
    "font_class": "2-171",
    "unicode": "\uEA26",
    "unicode_decimal": 59942
  }, {
    "icon_id": "21005625",
    "name": "1-162",
    "font_class": "1-162",
    "unicode": "\uE927",
    "unicode_decimal": 59687
  }, {
    "icon_id": "21005929",
    "name": "2-168",
    "font_class": "2-168",
    "unicode": "\uEA27",
    "unicode_decimal": 59943
  }, {
    "icon_id": "21005626",
    "name": "1-115",
    "font_class": "1-115",
    "unicode": "\uE928",
    "unicode_decimal": 59688
  }, {
    "icon_id": "21005930",
    "name": "2-172",
    "font_class": "2-172",
    "unicode": "\uEA28",
    "unicode_decimal": 59944
  }, {
    "icon_id": "21005627",
    "name": "1-148",
    "font_class": "1-148",
    "unicode": "\uE929",
    "unicode_decimal": 59689
  }, {
    "icon_id": "21005931",
    "name": "2-176",
    "font_class": "2-176",
    "unicode": "\uEA29",
    "unicode_decimal": 59945
  }, {
    "icon_id": "21005628",
    "name": "1-161",
    "font_class": "1-161",
    "unicode": "\uE92A",
    "unicode_decimal": 59690
  }, {
    "icon_id": "21005932",
    "name": "2-173",
    "font_class": "2-173",
    "unicode": "\uEA2A",
    "unicode_decimal": 59946
  }, {
    "icon_id": "21005629",
    "name": "1-163",
    "font_class": "1-163",
    "unicode": "\uE92B",
    "unicode_decimal": 59691
  }, {
    "icon_id": "21005933",
    "name": "2-170",
    "font_class": "2-170",
    "unicode": "\uEA2B",
    "unicode_decimal": 59947
  }, {
    "icon_id": "21005630",
    "name": "1-147",
    "font_class": "1-147",
    "unicode": "\uE92C",
    "unicode_decimal": 59692
  }, {
    "icon_id": "21005934",
    "name": "2-179",
    "font_class": "2-179",
    "unicode": "\uEA2C",
    "unicode_decimal": 59948
  }, {
    "icon_id": "21005631",
    "name": "1-166",
    "font_class": "1-166",
    "unicode": "\uE92D",
    "unicode_decimal": 59693
  }, {
    "icon_id": "21005935",
    "name": "2-178",
    "font_class": "2-178",
    "unicode": "\uEA2D",
    "unicode_decimal": 59949
  }, {
    "icon_id": "21005632",
    "name": "1-167",
    "font_class": "1-167",
    "unicode": "\uE92E",
    "unicode_decimal": 59694
  }, {
    "icon_id": "21005936",
    "name": "2-181",
    "font_class": "2-181",
    "unicode": "\uEA2E",
    "unicode_decimal": 59950
  }, {
    "icon_id": "21005633",
    "name": "1-168",
    "font_class": "1-168",
    "unicode": "\uE92F",
    "unicode_decimal": 59695
  }, {
    "icon_id": "21005938",
    "name": "2-180",
    "font_class": "2-180",
    "unicode": "\uEA2F",
    "unicode_decimal": 59951
  }, {
    "icon_id": "21005634",
    "name": "1-171",
    "font_class": "1-171",
    "unicode": "\uE930",
    "unicode_decimal": 59696
  }, {
    "icon_id": "21005939",
    "name": "2-182",
    "font_class": "2-182",
    "unicode": "\uEA30",
    "unicode_decimal": 59952
  }, {
    "icon_id": "21005635",
    "name": "1-172",
    "font_class": "1-172",
    "unicode": "\uE931",
    "unicode_decimal": 59697
  }, {
    "icon_id": "21005940",
    "name": "2-175",
    "font_class": "2-175",
    "unicode": "\uEA31",
    "unicode_decimal": 59953
  }, {
    "icon_id": "21005636",
    "name": "1-170",
    "font_class": "1-170",
    "unicode": "\uE932",
    "unicode_decimal": 59698
  }, {
    "icon_id": "21005941",
    "name": "2-185",
    "font_class": "2-185",
    "unicode": "\uEA32",
    "unicode_decimal": 59954
  }, {
    "icon_id": "21005637",
    "name": "1-173",
    "font_class": "1-173",
    "unicode": "\uE933",
    "unicode_decimal": 59699
  }, {
    "icon_id": "21005942",
    "name": "2-189",
    "font_class": "2-189",
    "unicode": "\uEA33",
    "unicode_decimal": 59955
  }, {
    "icon_id": "21005638",
    "name": "1-164",
    "font_class": "1-164",
    "unicode": "\uE934",
    "unicode_decimal": 59700
  }, {
    "icon_id": "21005943",
    "name": "2-184",
    "font_class": "2-184",
    "unicode": "\uEA34",
    "unicode_decimal": 59956
  }, {
    "icon_id": "21005639",
    "name": "1-177",
    "font_class": "1-177",
    "unicode": "\uE935",
    "unicode_decimal": 59701
  }, {
    "icon_id": "21005944",
    "name": "2-191",
    "font_class": "2-191",
    "unicode": "\uEA35",
    "unicode_decimal": 59957
  }, {
    "icon_id": "21005640",
    "name": "1-169",
    "font_class": "1-169",
    "unicode": "\uE936",
    "unicode_decimal": 59702
  }, {
    "icon_id": "21005945",
    "name": "2-188",
    "font_class": "2-188",
    "unicode": "\uEA36",
    "unicode_decimal": 59958
  }, {
    "icon_id": "21005641",
    "name": "1-176",
    "font_class": "1-176",
    "unicode": "\uE937",
    "unicode_decimal": 59703
  }, {
    "icon_id": "21005946",
    "name": "2-190",
    "font_class": "2-190",
    "unicode": "\uEA37",
    "unicode_decimal": 59959
  }, {
    "icon_id": "21005642",
    "name": "1-180",
    "font_class": "1-180",
    "unicode": "\uE938",
    "unicode_decimal": 59704
  }, {
    "icon_id": "21005947",
    "name": "2-194",
    "font_class": "2-194",
    "unicode": "\uEA38",
    "unicode_decimal": 59960
  }, {
    "icon_id": "21005643",
    "name": "1-175",
    "font_class": "1-175",
    "unicode": "\uE939",
    "unicode_decimal": 59705
  }, {
    "icon_id": "21005948",
    "name": "2-192",
    "font_class": "2-192",
    "unicode": "\uEA39",
    "unicode_decimal": 59961
  }, {
    "icon_id": "21005644",
    "name": "1-181",
    "font_class": "1-181",
    "unicode": "\uE93A",
    "unicode_decimal": 59706
  }, {
    "icon_id": "21005949",
    "name": "2-183",
    "font_class": "2-183",
    "unicode": "\uEA3A",
    "unicode_decimal": 59962
  }, {
    "icon_id": "21005645",
    "name": "1-184",
    "font_class": "1-184",
    "unicode": "\uE93B",
    "unicode_decimal": 59707
  }, {
    "icon_id": "21005950",
    "name": "2-198",
    "font_class": "2-198",
    "unicode": "\uEA3B",
    "unicode_decimal": 59963
  }, {
    "icon_id": "21005646",
    "name": "1-182",
    "font_class": "1-182",
    "unicode": "\uE93C",
    "unicode_decimal": 59708
  }, {
    "icon_id": "21005951",
    "name": "2-187",
    "font_class": "2-187",
    "unicode": "\uEA3C",
    "unicode_decimal": 59964
  }, {
    "icon_id": "21005647",
    "name": "1-183",
    "font_class": "1-183",
    "unicode": "\uE93D",
    "unicode_decimal": 59709
  }, {
    "icon_id": "21005952",
    "name": "2-193",
    "font_class": "2-193",
    "unicode": "\uEA3D",
    "unicode_decimal": 59965
  }, {
    "icon_id": "21005648",
    "name": "1-186",
    "font_class": "1-186",
    "unicode": "\uE93E",
    "unicode_decimal": 59710
  }, {
    "icon_id": "21005953",
    "name": "2-125",
    "font_class": "2-125",
    "unicode": "\uEA3E",
    "unicode_decimal": 59966
  }, {
    "icon_id": "21005649",
    "name": "1-118",
    "font_class": "1-118",
    "unicode": "\uE93F",
    "unicode_decimal": 59711
  }, {
    "icon_id": "21005956",
    "name": "2-196",
    "font_class": "2-196",
    "unicode": "\uEA3F",
    "unicode_decimal": 59967
  }, {
    "icon_id": "21005650",
    "name": "1-178",
    "font_class": "1-178",
    "unicode": "\uE940",
    "unicode_decimal": 59712
  }, {
    "icon_id": "21005958",
    "name": "2-157",
    "font_class": "2-157",
    "unicode": "\uEA40",
    "unicode_decimal": 59968
  }, {
    "icon_id": "21005651",
    "name": "1-188",
    "font_class": "1-188",
    "unicode": "\uE941",
    "unicode_decimal": 59713
  }, {
    "icon_id": "21005652",
    "name": "1-189",
    "font_class": "1-189",
    "unicode": "\uE942",
    "unicode_decimal": 59714
  }, {
    "icon_id": "21005653",
    "name": "1-192",
    "font_class": "1-192",
    "unicode": "\uE943",
    "unicode_decimal": 59715
  }, {
    "icon_id": "21005654",
    "name": "1-190",
    "font_class": "1-190",
    "unicode": "\uE944",
    "unicode_decimal": 59716
  }, {
    "icon_id": "21005655",
    "name": "1-191",
    "font_class": "1-191",
    "unicode": "\uE945",
    "unicode_decimal": 59717
  }, {
    "icon_id": "21005656",
    "name": "1-193",
    "font_class": "1-193",
    "unicode": "\uE946",
    "unicode_decimal": 59718
  }, {
    "icon_id": "21005657",
    "name": "1-195",
    "font_class": "1-195",
    "unicode": "\uE947",
    "unicode_decimal": 59719
  }, {
    "icon_id": "21005658",
    "name": "1-196",
    "font_class": "1-196",
    "unicode": "\uE948",
    "unicode_decimal": 59720
  }, {
    "icon_id": "21005659",
    "name": "1-187",
    "font_class": "1-187",
    "unicode": "\uE949",
    "unicode_decimal": 59721
  }, {
    "icon_id": "21005660",
    "name": "1-198",
    "font_class": "1-198",
    "unicode": "\uE94A",
    "unicode_decimal": 59722
  }, {
    "icon_id": "21005661",
    "name": "1-160",
    "font_class": "1-160",
    "unicode": "\uE94B",
    "unicode_decimal": 59723
  }, {
    "icon_id": "21005662",
    "name": "1-197",
    "font_class": "1-197",
    "unicode": "\uE94C",
    "unicode_decimal": 59724
  }, {
    "icon_id": "21005663",
    "name": "1-202",
    "font_class": "1-202",
    "unicode": "\uE94D",
    "unicode_decimal": 59725
  }, {
    "icon_id": "21005664",
    "name": "1-201",
    "font_class": "1-201",
    "unicode": "\uE94E",
    "unicode_decimal": 59726
  }, {
    "icon_id": "21005665",
    "name": "1-203",
    "font_class": "1-203",
    "unicode": "\uE94F",
    "unicode_decimal": 59727
  }, {
    "icon_id": "21005666",
    "name": "1-194",
    "font_class": "1-194",
    "unicode": "\uE950",
    "unicode_decimal": 59728
  }, {
    "icon_id": "21005667",
    "name": "1-205",
    "font_class": "1-205",
    "unicode": "\uE951",
    "unicode_decimal": 59729
  }, {
    "icon_id": "21005668",
    "name": "1-200",
    "font_class": "1-200",
    "unicode": "\uE952",
    "unicode_decimal": 59730
  }, {
    "icon_id": "21005669",
    "name": "1-207",
    "font_class": "1-207",
    "unicode": "\uE953",
    "unicode_decimal": 59731
  }, {
    "icon_id": "21005670",
    "name": "1-209",
    "font_class": "1-209",
    "unicode": "\uE954",
    "unicode_decimal": 59732
  }, {
    "icon_id": "21005671",
    "name": "1-206",
    "font_class": "1-206",
    "unicode": "\uE955",
    "unicode_decimal": 59733
  }, {
    "icon_id": "21005672",
    "name": "1-217",
    "font_class": "1-217",
    "unicode": "\uE956",
    "unicode_decimal": 59734
  }, {
    "icon_id": "21005673",
    "name": "1-215",
    "font_class": "1-215",
    "unicode": "\uE957",
    "unicode_decimal": 59735
  }, {
    "icon_id": "21005674",
    "name": "1-216",
    "font_class": "1-216",
    "unicode": "\uE958",
    "unicode_decimal": 59736
  }, {
    "icon_id": "21005675",
    "name": "1-219",
    "font_class": "1-219",
    "unicode": "\uE959",
    "unicode_decimal": 59737
  }, {
    "icon_id": "21005676",
    "name": "1-179",
    "font_class": "1-179",
    "unicode": "\uE95A",
    "unicode_decimal": 59738
  }, {
    "icon_id": "21005677",
    "name": "1-226",
    "font_class": "1-226",
    "unicode": "\uE95B",
    "unicode_decimal": 59739
  }, {
    "icon_id": "21005678",
    "name": "1-204",
    "font_class": "1-204",
    "unicode": "\uE95C",
    "unicode_decimal": 59740
  }, {
    "icon_id": "21005679",
    "name": "1-224",
    "font_class": "1-224",
    "unicode": "\uE95D",
    "unicode_decimal": 59741
  }, {
    "icon_id": "21005680",
    "name": "1-212",
    "font_class": "1-212",
    "unicode": "\uE95E",
    "unicode_decimal": 59742
  }, {
    "icon_id": "21005681",
    "name": "1-228",
    "font_class": "1-228",
    "unicode": "\uE95F",
    "unicode_decimal": 59743
  }, {
    "icon_id": "21005682",
    "name": "1-210",
    "font_class": "1-210",
    "unicode": "\uE960",
    "unicode_decimal": 59744
  }, {
    "icon_id": "21005683",
    "name": "1-229",
    "font_class": "1-229",
    "unicode": "\uE961",
    "unicode_decimal": 59745
  }, {
    "icon_id": "21005684",
    "name": "1-240",
    "font_class": "1-240",
    "unicode": "\uE962",
    "unicode_decimal": 59746
  }, {
    "icon_id": "21005685",
    "name": "1-225",
    "font_class": "1-225",
    "unicode": "\uE963",
    "unicode_decimal": 59747
  }, {
    "icon_id": "21005686",
    "name": "1-237",
    "font_class": "1-237",
    "unicode": "\uE964",
    "unicode_decimal": 59748
  }, {
    "icon_id": "21005687",
    "name": "1-213",
    "font_class": "1-213",
    "unicode": "\uE965",
    "unicode_decimal": 59749
  }, {
    "icon_id": "21005688",
    "name": "1-244",
    "font_class": "1-244",
    "unicode": "\uE966",
    "unicode_decimal": 59750
  }, {
    "icon_id": "21005689",
    "name": "1-245",
    "font_class": "1-245",
    "unicode": "\uE967",
    "unicode_decimal": 59751
  }, {
    "icon_id": "21005690",
    "name": "1-247",
    "font_class": "1-247",
    "unicode": "\uE968",
    "unicode_decimal": 59752
  }, {
    "icon_id": "21005691",
    "name": "1-248",
    "font_class": "1-248",
    "unicode": "\uE969",
    "unicode_decimal": 59753
  }, {
    "icon_id": "21005692",
    "name": "1-221",
    "font_class": "1-221",
    "unicode": "\uE96A",
    "unicode_decimal": 59754
  }, {
    "icon_id": "21005693",
    "name": "1-254",
    "font_class": "1-254",
    "unicode": "\uE96B",
    "unicode_decimal": 59755
  }, {
    "icon_id": "21005694",
    "name": "1-243",
    "font_class": "1-243",
    "unicode": "\uE96C",
    "unicode_decimal": 59756
  }, {
    "icon_id": "21005695",
    "name": "1-214",
    "font_class": "1-214",
    "unicode": "\uE96D",
    "unicode_decimal": 59757
  }, {
    "icon_id": "21005696",
    "name": "1-208",
    "font_class": "1-208",
    "unicode": "\uE96E",
    "unicode_decimal": 59758
  }, {
    "icon_id": "21005697",
    "name": "1-220",
    "font_class": "1-220",
    "unicode": "\uE96F",
    "unicode_decimal": 59759
  }, {
    "icon_id": "21005698",
    "name": "1-242",
    "font_class": "1-242",
    "unicode": "\uE970",
    "unicode_decimal": 59760
  }, {
    "icon_id": "21005699",
    "name": "1-222",
    "font_class": "1-222",
    "unicode": "\uE971",
    "unicode_decimal": 59761
  }, {
    "icon_id": "21005700",
    "name": "1-234",
    "font_class": "1-234",
    "unicode": "\uE972",
    "unicode_decimal": 59762
  }, {
    "icon_id": "21005702",
    "name": "1-250",
    "font_class": "1-250",
    "unicode": "\uE973",
    "unicode_decimal": 59763
  }, {
    "icon_id": "21005703",
    "name": "1-227",
    "font_class": "1-227",
    "unicode": "\uE974",
    "unicode_decimal": 59764
  }, {
    "icon_id": "21005704",
    "name": "1-264",
    "font_class": "1-264",
    "unicode": "\uE975",
    "unicode_decimal": 59765
  }, {
    "icon_id": "21005705",
    "name": "1-265",
    "font_class": "1-265",
    "unicode": "\uE976",
    "unicode_decimal": 59766
  }, {
    "icon_id": "21005706",
    "name": "1-266",
    "font_class": "1-266",
    "unicode": "\uE977",
    "unicode_decimal": 59767
  }, {
    "icon_id": "21005707",
    "name": "1-272",
    "font_class": "1-272",
    "unicode": "\uE978",
    "unicode_decimal": 59768
  }, {
    "icon_id": "21005708",
    "name": "1-238",
    "font_class": "1-238",
    "unicode": "\uE979",
    "unicode_decimal": 59769
  }, {
    "icon_id": "21005709",
    "name": "1-277",
    "font_class": "1-277",
    "unicode": "\uE97A",
    "unicode_decimal": 59770
  }, {
    "icon_id": "21005710",
    "name": "1-239",
    "font_class": "1-239",
    "unicode": "\uE97B",
    "unicode_decimal": 59771
  }, {
    "icon_id": "21005711",
    "name": "1-279",
    "font_class": "1-279",
    "unicode": "\uE97C",
    "unicode_decimal": 59772
  }, {
    "icon_id": "21005712",
    "name": "1-249",
    "font_class": "1-249",
    "unicode": "\uE97D",
    "unicode_decimal": 59773
  }, {
    "icon_id": "21005713",
    "name": "1-233",
    "font_class": "1-233",
    "unicode": "\uE97E",
    "unicode_decimal": 59774
  }, {
    "icon_id": "21005714",
    "name": "1-267",
    "font_class": "1-267",
    "unicode": "\uE97F",
    "unicode_decimal": 59775
  }, {
    "icon_id": "21005715",
    "name": "1-235",
    "font_class": "1-235",
    "unicode": "\uE980",
    "unicode_decimal": 59776
  }, {
    "icon_id": "21005716",
    "name": "1-263",
    "font_class": "1-263",
    "unicode": "\uE981",
    "unicode_decimal": 59777
  }, {
    "icon_id": "21005717",
    "name": "1-276",
    "font_class": "1-276",
    "unicode": "\uE982",
    "unicode_decimal": 59778
  }, {
    "icon_id": "21005718",
    "name": "1-253",
    "font_class": "1-253",
    "unicode": "\uE983",
    "unicode_decimal": 59779
  }, {
    "icon_id": "21005719",
    "name": "1-241",
    "font_class": "1-241",
    "unicode": "\uE984",
    "unicode_decimal": 59780
  }, {
    "icon_id": "21005720",
    "name": "1-256",
    "font_class": "1-256",
    "unicode": "\uE985",
    "unicode_decimal": 59781
  }, {
    "icon_id": "21005721",
    "name": "1-273",
    "font_class": "1-273",
    "unicode": "\uE986",
    "unicode_decimal": 59782
  }, {
    "icon_id": "21005722",
    "name": "1-283",
    "font_class": "1-283",
    "unicode": "\uE987",
    "unicode_decimal": 59783
  }, {
    "icon_id": "21005723",
    "name": "1-291",
    "font_class": "1-291",
    "unicode": "\uE988",
    "unicode_decimal": 59784
  }, {
    "icon_id": "21005724",
    "name": "1-290",
    "font_class": "1-290",
    "unicode": "\uE989",
    "unicode_decimal": 59785
  }, {
    "icon_id": "21005725",
    "name": "1-295",
    "font_class": "1-295",
    "unicode": "\uE98A",
    "unicode_decimal": 59786
  }, {
    "icon_id": "21005726",
    "name": "1-218",
    "font_class": "1-218",
    "unicode": "\uE98B",
    "unicode_decimal": 59787
  }, {
    "icon_id": "21005727",
    "name": "1-280",
    "font_class": "1-280",
    "unicode": "\uE98C",
    "unicode_decimal": 59788
  }, {
    "icon_id": "21005728",
    "name": "1-294",
    "font_class": "1-294",
    "unicode": "\uE98D",
    "unicode_decimal": 59789
  }, {
    "icon_id": "21005729",
    "name": "1-236",
    "font_class": "1-236",
    "unicode": "\uE98E",
    "unicode_decimal": 59790
  }, {
    "icon_id": "21005730",
    "name": "1-278",
    "font_class": "1-278",
    "unicode": "\uE98F",
    "unicode_decimal": 59791
  }, {
    "icon_id": "21005731",
    "name": "1-282",
    "font_class": "1-282",
    "unicode": "\uE990",
    "unicode_decimal": 59792
  }, {
    "icon_id": "21005732",
    "name": "1-303",
    "font_class": "1-303",
    "unicode": "\uE991",
    "unicode_decimal": 59793
  }, {
    "icon_id": "21005733",
    "name": "1-287",
    "font_class": "1-287",
    "unicode": "\uE992",
    "unicode_decimal": 59794
  }, {
    "icon_id": "21005734",
    "name": "1-271",
    "font_class": "1-271",
    "unicode": "\uE993",
    "unicode_decimal": 59795
  }, {
    "icon_id": "21005735",
    "name": "1-298",
    "font_class": "1-298",
    "unicode": "\uE994",
    "unicode_decimal": 59796
  }, {
    "icon_id": "21005736",
    "name": "2-047",
    "font_class": "2-047",
    "unicode": "\uE995",
    "unicode_decimal": 59797
  }, {
    "icon_id": "21005737",
    "name": "1-300",
    "font_class": "1-300",
    "unicode": "\uE996",
    "unicode_decimal": 59798
  }, {
    "icon_id": "21005738",
    "name": "1-288",
    "font_class": "1-288",
    "unicode": "\uE997",
    "unicode_decimal": 59799
  }, {
    "icon_id": "21005739",
    "name": "1-320",
    "font_class": "1-320",
    "unicode": "\uE998",
    "unicode_decimal": 59800
  }, {
    "icon_id": "21005740",
    "name": "1-246",
    "font_class": "1-246",
    "unicode": "\uE999",
    "unicode_decimal": 59801
  }, {
    "icon_id": "21005741",
    "name": "1-297",
    "font_class": "1-297",
    "unicode": "\uE99A",
    "unicode_decimal": 59802
  }, {
    "icon_id": "21005742",
    "name": "1-314",
    "font_class": "1-314",
    "unicode": "\uE99B",
    "unicode_decimal": 59803
  }, {
    "icon_id": "21005743",
    "name": "1-199",
    "font_class": "1-199",
    "unicode": "\uE99C",
    "unicode_decimal": 59804
  }, {
    "icon_id": "21005744",
    "name": "1-301",
    "font_class": "1-301",
    "unicode": "\uE99D",
    "unicode_decimal": 59805
  }, {
    "icon_id": "21005745",
    "name": "1-318",
    "font_class": "1-318",
    "unicode": "\uE99E",
    "unicode_decimal": 59806
  }, {
    "icon_id": "21005746",
    "name": "1-302",
    "font_class": "1-302",
    "unicode": "\uE99F",
    "unicode_decimal": 59807
  }, {
    "icon_id": "21005747",
    "name": "1-289",
    "font_class": "1-289",
    "unicode": "\uE9A0",
    "unicode_decimal": 59808
  }, {
    "icon_id": "21005748",
    "name": "1-328",
    "font_class": "1-328",
    "unicode": "\uE9A1",
    "unicode_decimal": 59809
  }, {
    "icon_id": "21005750",
    "name": "1-308",
    "font_class": "1-308",
    "unicode": "\uE9A3",
    "unicode_decimal": 59811
  }, {
    "icon_id": "21005751",
    "name": "1-251",
    "font_class": "1-251",
    "unicode": "\uE9A4",
    "unicode_decimal": 59812
  }, {
    "icon_id": "21005752",
    "name": "1-286",
    "font_class": "1-286",
    "unicode": "\uE9A5",
    "unicode_decimal": 59813
  }, {
    "icon_id": "21005753",
    "name": "1-311",
    "font_class": "1-311",
    "unicode": "\uE9A6",
    "unicode_decimal": 59814
  }, {
    "icon_id": "21005754",
    "name": "1-334",
    "font_class": "1-334",
    "unicode": "\uE9A7",
    "unicode_decimal": 59815
  }, {
    "icon_id": "21005755",
    "name": "1-309",
    "font_class": "1-309",
    "unicode": "\uE9A8",
    "unicode_decimal": 59816
  }, {
    "icon_id": "21005756",
    "name": "1-327",
    "font_class": "1-327",
    "unicode": "\uE9A9",
    "unicode_decimal": 59817
  }, {
    "icon_id": "21005757",
    "name": "1-299",
    "font_class": "1-299",
    "unicode": "\uE9AA",
    "unicode_decimal": 59818
  }, {
    "icon_id": "21005758",
    "name": "1-332",
    "font_class": "1-332",
    "unicode": "\uE9AB",
    "unicode_decimal": 59819
  }, {
    "icon_id": "21005759",
    "name": "1-312",
    "font_class": "1-312",
    "unicode": "\uE9AC",
    "unicode_decimal": 59820
  }, {
    "icon_id": "21005760",
    "name": "1-340",
    "font_class": "1-340",
    "unicode": "\uE9AD",
    "unicode_decimal": 59821
  }, {
    "icon_id": "21005761",
    "name": "1-313",
    "font_class": "1-313",
    "unicode": "\uE9AE",
    "unicode_decimal": 59822
  }, {
    "icon_id": "21005762",
    "name": "1-331",
    "font_class": "1-331",
    "unicode": "\uE9AF",
    "unicode_decimal": 59823
  }, {
    "icon_id": "21005763",
    "name": "1-345",
    "font_class": "1-345",
    "unicode": "\uE9B0",
    "unicode_decimal": 59824
  }, {
    "icon_id": "21005764",
    "name": "1-339",
    "font_class": "1-339",
    "unicode": "\uE9B1",
    "unicode_decimal": 59825
  }, {
    "icon_id": "21005765",
    "name": "2-011",
    "font_class": "2-011",
    "unicode": "\uE9B2",
    "unicode_decimal": 59826
  }, {
    "icon_id": "21005766",
    "name": "1-274",
    "font_class": "1-274",
    "unicode": "\uE9B3",
    "unicode_decimal": 59827
  }, {
    "icon_id": "21005767",
    "name": "1-348",
    "font_class": "1-348",
    "unicode": "\uE9B4",
    "unicode_decimal": 59828
  }, {
    "icon_id": "21005768",
    "name": "1-344",
    "font_class": "1-344",
    "unicode": "\uE9B5",
    "unicode_decimal": 59829
  }, {
    "icon_id": "21005769",
    "name": "2-015",
    "font_class": "2-015",
    "unicode": "\uE9B6",
    "unicode_decimal": 59830
  }, {
    "icon_id": "21005770",
    "name": "1-268",
    "font_class": "1-268",
    "unicode": "\uE9B7",
    "unicode_decimal": 59831
  }, {
    "icon_id": "21005771",
    "name": "1-330",
    "font_class": "1-330",
    "unicode": "\uE9B8",
    "unicode_decimal": 59832
  }, {
    "icon_id": "21005772",
    "name": "1-351",
    "font_class": "1-351",
    "unicode": "\uE9B9",
    "unicode_decimal": 59833
  }, {
    "icon_id": "21005773",
    "name": "1-255",
    "font_class": "1-255",
    "unicode": "\uE9BA",
    "unicode_decimal": 59834
  }, {
    "icon_id": "21005774",
    "name": "1-322",
    "font_class": "1-322",
    "unicode": "\uE9BB",
    "unicode_decimal": 59835
  }, {
    "icon_id": "21005775",
    "name": "2-001",
    "font_class": "2-001",
    "unicode": "\uE9BC",
    "unicode_decimal": 59836
  }, {
    "icon_id": "21005776",
    "name": "1-342",
    "font_class": "1-342",
    "unicode": "\uE9BD",
    "unicode_decimal": 59837
  }, {
    "icon_id": "21005777",
    "name": "1-275",
    "font_class": "1-275",
    "unicode": "\uE9BE",
    "unicode_decimal": 59838
  }, {
    "icon_id": "21005778",
    "name": "1-350",
    "font_class": "1-350",
    "unicode": "\uE9BF",
    "unicode_decimal": 59839
  }, {
    "icon_id": "21005779",
    "name": "1-323",
    "font_class": "1-323",
    "unicode": "\uE9C0",
    "unicode_decimal": 59840
  }, {
    "icon_id": "21005780",
    "name": "1-343",
    "font_class": "1-343",
    "unicode": "\uE9C1",
    "unicode_decimal": 59841
  }, {
    "icon_id": "21005781",
    "name": "1-347",
    "font_class": "1-347",
    "unicode": "\uE9C2",
    "unicode_decimal": 59842
  }, {
    "icon_id": "21005782",
    "name": "2-003",
    "font_class": "2-003",
    "unicode": "\uE9C3",
    "unicode_decimal": 59843
  }, {
    "icon_id": "21005783",
    "name": "1-211",
    "font_class": "1-211",
    "unicode": "\uE9C4",
    "unicode_decimal": 59844
  }, {
    "icon_id": "21005784",
    "name": "2-012",
    "font_class": "2-012",
    "unicode": "\uE9C5",
    "unicode_decimal": 59845
  }, {
    "icon_id": "21005785",
    "name": "1-346",
    "font_class": "1-346",
    "unicode": "\uE9C6",
    "unicode_decimal": 59846
  }, {
    "icon_id": "21005786",
    "name": "2-023",
    "font_class": "2-023",
    "unicode": "\uE9C7",
    "unicode_decimal": 59847
  }, {
    "icon_id": "21005787",
    "name": "1-293",
    "font_class": "1-293",
    "unicode": "\uE9C8",
    "unicode_decimal": 59848
  }, {
    "icon_id": "21005788",
    "name": "2-020",
    "font_class": "2-020",
    "unicode": "\uE9C9",
    "unicode_decimal": 59849
  }, {
    "icon_id": "21005789",
    "name": "2-019",
    "font_class": "2-019",
    "unicode": "\uE9CA",
    "unicode_decimal": 59850
  }, {
    "icon_id": "21005790",
    "name": "2-004",
    "font_class": "2-004",
    "unicode": "\uE9CB",
    "unicode_decimal": 59851
  }, {
    "icon_id": "21005791",
    "name": "1-223",
    "font_class": "1-223",
    "unicode": "\uE9CC",
    "unicode_decimal": 59852
  }]
};
// CONCATENATED MODULE: ./src/utils/topology/data/sgge.js
var data2 = {
  "id": "2395018",
  "name": "国家电网图元规范",
  "font_family": "sgcc",
  "css_prefix_text": "sgcc-",
  "description": "",
  "glyphs": [{
    "icon_id": "21279569",
    "name": "太阳能",
    "font_class": "taiyangneng",
    "unicode": "\uE9A0",
    "unicode_decimal": 59808
  }, {
    "icon_id": "20209971",
    "name": "发电机",
    "font_class": "fadianji",
    "unicode": "\uE7B9",
    "unicode_decimal": 59321
  }, {
    "icon_id": "21086660",
    "name": "馈线",
    "font_class": "kuixian",
    "unicode": "\uE99F",
    "unicode_decimal": 59807
  }, {
    "icon_id": "20639453",
    "name": "下字型排列cab右",
    "font_class": "xiazixingpailiecabyou1",
    "unicode": "\uE99E",
    "unicode_decimal": 59806
  }, {
    "icon_id": "20638238",
    "name": "三相三个次级绕组电流互感器",
    "font_class": "sanxiangsangecijiraozudianliuhuganqi",
    "unicode": "\uE99D",
    "unicode_decimal": 59805
  }, {
    "icon_id": "20638236",
    "name": "两相三个次级绕组电流互感器",
    "font_class": "liangxiangsangecijiraozudianliuhuganqi",
    "unicode": "\uE99C",
    "unicode_decimal": 59804
  }, {
    "icon_id": "20638225",
    "name": "单相三个次级绕组电流互感器",
    "font_class": "danxiangsangecijiraozudianliuhuganqi",
    "unicode": "\uE8E8",
    "unicode_decimal": 59624
  }, {
    "icon_id": "20637730",
    "name": "三相六个次级绕组电流互感器",
    "font_class": "sanxiangliugecijiraozudianliuhuganqi",
    "unicode": "\uE8DD",
    "unicode_decimal": 59613
  }, {
    "icon_id": "20637723",
    "name": "两相五个次级绕组电流互感器",
    "font_class": "liangxiangwugecijiraozudianliuhuganqi",
    "unicode": "\uE99B",
    "unicode_decimal": 59803
  }, {
    "icon_id": "20637712",
    "name": "三相五个次级绕组电流互感器",
    "font_class": "sanxiangwugecijiraozudianliuhuganqi",
    "unicode": "\uE8F0",
    "unicode_decimal": 59632
  }, {
    "icon_id": "20637668",
    "name": "检修符",
    "font_class": "jianxiufu1",
    "unicode": "\uE99A",
    "unicode_decimal": 59802
  }, {
    "icon_id": "20637632",
    "name": "交叉跨越",
    "font_class": "jiaochakuayue1",
    "unicode": "\uE999",
    "unicode_decimal": 59801
  }, {
    "icon_id": "20637608",
    "name": "建议孔位",
    "font_class": "jianyikongwei1",
    "unicode": "\uE998",
    "unicode_decimal": 59800
  }, {
    "icon_id": "20637584",
    "name": "禁止遥控",
    "font_class": "jinzhiyaokong1",
    "unicode": "\uE997",
    "unicode_decimal": 59799
  }, {
    "icon_id": "20637572",
    "name": "接地符",
    "font_class": "jiedifu1",
    "unicode": "\uE8BB",
    "unicode_decimal": 59579
  }, {
    "icon_id": "20637549",
    "name": "缺陷符",
    "font_class": "quexianfu1",
    "unicode": "\uE996",
    "unicode_decimal": 59798
  }, {
    "icon_id": "20636493",
    "name": "双绕组有载可调变压器Dyn（中性点引出三角形-星形连接）",
    "font_class": "shuangraozuyouzaiketiaobianyaqiDynzhongxingdianyinchusanjiaoxing-xingxinglianjie",
    "unicode": "\uE907",
    "unicode_decimal": 59655
  }, {
    "icon_id": "20636064",
    "name": "两相六个次级绕组电流互感器",
    "font_class": "liangxiangliugecijiraozudianliuhuganqi1",
    "unicode": "\uE995",
    "unicode_decimal": 59797
  }, {
    "icon_id": "20635881",
    "name": "临时符",
    "font_class": "linshifu1",
    "unicode": "\uE994",
    "unicode_decimal": 59796
  }, {
    "icon_id": "20635813",
    "name": "临时保电符",
    "font_class": "linshibaodianfu1",
    "unicode": "\uE993",
    "unicode_decimal": 59795
  }, {
    "icon_id": "20635674",
    "name": "空余孔位",
    "font_class": "kongyukongwei",
    "unicode": "\uE992",
    "unicode_decimal": 59794
  }, {
    "icon_id": "20635442",
    "name": "管道",
    "font_class": "guandao1",
    "unicode": "\uE991",
    "unicode_decimal": 59793
  }, {
    "icon_id": "20635344",
    "name": "跌落式熔断器（分）",
    "font_class": "dielashirongduanqifen2",
    "unicode": "\uE990",
    "unicode_decimal": 59792
  }, {
    "icon_id": "20635321",
    "name": "工作许可",
    "font_class": "gongzuoxuke1",
    "unicode": "\uE98F",
    "unicode_decimal": 59791
  }, {
    "icon_id": "20635299",
    "name": "复合孔位",
    "font_class": "fuhekongwei1",
    "unicode": "\uE98E",
    "unicode_decimal": 59790
  }, {
    "icon_id": "20635272",
    "name": "电缆终端站",
    "font_class": "dianlanzhongduanzhan1",
    "unicode": "\uE98D",
    "unicode_decimal": 59789
  }, {
    "icon_id": "20635259",
    "name": "电缆排管",
    "font_class": "dianlanpaiguan1",
    "unicode": "\uE98C",
    "unicode_decimal": 59788
  }, {
    "icon_id": "20635252",
    "name": "电缆桥",
    "font_class": "dianlanqiao1",
    "unicode": "\uE951",
    "unicode_decimal": 59729
  }, {
    "icon_id": "20635201",
    "name": "重要用户符",
    "font_class": "zhongyaoyonghufu1",
    "unicode": "\uE98B",
    "unicode_decimal": 59787
  }, {
    "icon_id": "20635176",
    "name": "电抗器",
    "font_class": "diankangqi1",
    "unicode": "\uE93A",
    "unicode_decimal": 59706
  }, {
    "icon_id": "20635159",
    "name": "有载可调压自耦变压器",
    "font_class": "youzaiketiaoyazioubianyaqi2",
    "unicode": "\uE98A",
    "unicode_decimal": 59786
  }, {
    "icon_id": "20635136",
    "name": "用户供电点",
    "font_class": "yonghugongdiandian",
    "unicode": "\uE937",
    "unicode_decimal": 59703
  }, {
    "icon_id": "20635129",
    "name": "保护接地",
    "font_class": "baohujiedi",
    "unicode": "\uE989",
    "unicode_decimal": 59785
  }, {
    "icon_id": "20635124",
    "name": "已批复未实施孔位",
    "font_class": "yipifuweishishikongwei",
    "unicode": "\uE936",
    "unicode_decimal": 59702
  }, {
    "icon_id": "20635116",
    "name": "已申请未批复孔位",
    "font_class": "yishenqingweipifukongwei",
    "unicode": "\uE934",
    "unicode_decimal": 59700
  }, {
    "icon_id": "20635099",
    "name": "不可并符",
    "font_class": "bukebingfu",
    "unicode": "\uE988",
    "unicode_decimal": 59784
  }, {
    "icon_id": "20635095",
    "name": "保留孔位",
    "font_class": "baoliukongwei",
    "unicode": "\uE933",
    "unicode_decimal": 59699
  }, {
    "icon_id": "20635076",
    "name": "已实施孔位",
    "font_class": "yishishikongwei",
    "unicode": "\uE931",
    "unicode_decimal": 59697
  }, {
    "icon_id": "20635037",
    "name": "一个绕组上有中间抽头的变压器",
    "font_class": "yigeraozushangyouzhongjianchoutoudebianyaqi1",
    "unicode": "\uE987",
    "unicode_decimal": 59783
  }, {
    "icon_id": "20635026",
    "name": "保安锁符",
    "font_class": "baoansuofu",
    "unicode": "\uE986",
    "unicode_decimal": 59782
  }, {
    "icon_id": "20635001",
    "name": "无功补偿器",
    "font_class": "wugongbuchangqi",
    "unicode": "\uE91E",
    "unicode_decimal": 59678
  }, {
    "icon_id": "20634982",
    "name": "五绕组电压互感器",
    "font_class": "wuraozudianyahuganqi",
    "unicode": "\uE91F",
    "unicode_decimal": 59679
  }, {
    "icon_id": "20634959",
    "name": "尾线符",
    "font_class": "weixianfu",
    "unicode": "\uE91D",
    "unicode_decimal": 59677
  }, {
    "icon_id": "20634955",
    "name": "未知孔位",
    "font_class": "weizhikongwei",
    "unicode": "\uE919",
    "unicode_decimal": 59673
  }, {
    "icon_id": "20634944",
    "name": "损坏孔位",
    "font_class": "sunhuaikongwei",
    "unicode": "\uE918",
    "unicode_decimal": 59672
  }, {
    "icon_id": "20634911",
    "name": "四绕组电压互感器",
    "font_class": "siraozudianyahuganqi",
    "unicode": "\uE912",
    "unicode_decimal": 59666
  }, {
    "icon_id": "20634854",
    "name": "电容式电压互感器",
    "font_class": "dianrongshidianyahuganqi",
    "unicode": "\uE985",
    "unicode_decimal": 59781
  }, {
    "icon_id": "20633330",
    "name": "三绕组有载可调变压器1（星形-三星形-星形连接）",
    "font_class": "sanraozuyouzaiketiaobianyaqi1xingxing-sanxingxing-xingxinglianjie",
    "unicode": "\uE984",
    "unicode_decimal": 59780
  }, {
    "icon_id": "20632955",
    "name": "三绕组变压器1（星形-三星形-星形连接）",
    "font_class": "sanraozubianyaqi1xingxing-sanxingxing-xingxinglianjie",
    "unicode": "\uE8DF",
    "unicode_decimal": 59615
  }, {
    "icon_id": "20632896",
    "name": "三绕组有载可调变压器（星形-三星形-星形连接）",
    "font_class": "sanraozuyouzaiketiaobianyaqixingxing-sanxingxing-xingxinglianjie",
    "unicode": "\uE8D7",
    "unicode_decimal": 59607
  }, {
    "icon_id": "20626957",
    "name": "双绕组有载可调变压器YNd（中性点引出星形-三角形连接）",
    "font_class": "shuangraozuyouzaiketiaobianyaqiYNdzhongxingdianyinchuxingxing-sanjiaoxinglianjie",
    "unicode": "\uE92F",
    "unicode_decimal": 59695
  }, {
    "icon_id": "20622859",
    "name": "双绕组变压器Yyn（中性点引出星形-星形连接）",
    "font_class": "shuangraozubianyaqiYynzhongxingdianyinchuxingxing-xingxinglianjie",
    "unicode": "\uE983",
    "unicode_decimal": 59779
  }, {
    "icon_id": "20614993",
    "name": "分裂电抗器",
    "font_class": "fenliediankangqi",
    "unicode": "\uE982",
    "unicode_decimal": 59778
  }, {
    "icon_id": "20614874",
    "name": "钢管塔（直线型）",
    "font_class": "gangguantazhixianxing",
    "unicode": "\uE981",
    "unicode_decimal": 59777
  }, {
    "icon_id": "20614795",
    "name": "开闭器",
    "font_class": "kaibiqi",
    "unicode": "\uE89F",
    "unicode_decimal": 59551
  }, {
    "icon_id": "20603440",
    "name": "配变监测仪",
    "font_class": "peibianjianceyi",
    "unicode": "\uE8B7",
    "unicode_decimal": 59575
  }, {
    "icon_id": "20603128",
    "name": "三角形排列cab",
    "font_class": "sanjiaoxingpailiecab",
    "unicode": "\uE980",
    "unicode_decimal": 59776
  }, {
    "icon_id": "20600646",
    "name": "下字型排列abc右",
    "font_class": "xiazixingpailieabcyou",
    "unicode": "\uE91C",
    "unicode_decimal": 59676
  }, {
    "icon_id": "20600592",
    "name": "下字型排列cba左",
    "font_class": "xiazixingpailiecbazuo",
    "unicode": "\uE97F",
    "unicode_decimal": 59775
  }, {
    "icon_id": "20600222",
    "name": "下字型排列bac",
    "font_class": "xiazixingpailiebac",
    "unicode": "\uE922",
    "unicode_decimal": 59682
  }, {
    "icon_id": "20599929",
    "name": "水平排列abc",
    "font_class": "shuipingpailieabc",
    "unicode": "\uE8F5",
    "unicode_decimal": 59637
  }, {
    "icon_id": "20597372",
    "name": "可遥控符",
    "font_class": "keyaokongfu",
    "unicode": "\uE8A0",
    "unicode_decimal": 59552
  }, {
    "icon_id": "20597204",
    "name": "保电符",
    "font_class": "baodianfu",
    "unicode": "\uE97E",
    "unicode_decimal": 59774
  }, {
    "icon_id": "20596888",
    "name": "信号符",
    "font_class": "xinhaofu",
    "unicode": "\uE928",
    "unicode_decimal": 59688
  }, {
    "icon_id": "20596676",
    "name": "停用符",
    "font_class": "tingyongfu",
    "unicode": "\uE914",
    "unicode_decimal": 59668
  }, {
    "icon_id": "20596622",
    "name": "手动符",
    "font_class": "shoudongfu",
    "unicode": "\uE8FC",
    "unicode_decimal": 59644
  }, {
    "icon_id": "20596343",
    "name": "自切符",
    "font_class": "ziqiefu",
    "unicode": "\uE97D",
    "unicode_decimal": 59773
  }, {
    "icon_id": "20596257",
    "name": "单切",
    "font_class": "danqie",
    "unicode": "\uE965",
    "unicode_decimal": 59749
  }, {
    "icon_id": "20591050",
    "name": "洪水冲刷区",
    "font_class": "hongshuichongshuaqu",
    "unicode": "\uE97C",
    "unicode_decimal": 59772
  }, {
    "icon_id": "20589892",
    "name": "强腐蚀区",
    "font_class": "qiangfushiqu",
    "unicode": "\uE97B",
    "unicode_decimal": 59771
  }, {
    "icon_id": "20574310",
    "name": "开口三角形连接的三相绕组",
    "font_class": "kaikousanjiaoxinglianjiedesanxiangraozu",
    "unicode": "\uE97A",
    "unicode_decimal": 59770
  }, {
    "icon_id": "20574167",
    "name": "三角形接的三相绕组",
    "font_class": "sanjiaoxingjiedesanxiangraozu",
    "unicode": "\uE979",
    "unicode_decimal": 59769
  }, {
    "icon_id": "20573232",
    "name": "T形连接的三相绕组",
    "font_class": "Txinglianjiedesanxiangraozu",
    "unicode": "\uE978",
    "unicode_decimal": 59768
  }, {
    "icon_id": "20573165",
    "name": "v行连接的三相绕组",
    "font_class": "vhanglianjiedesanxiangraozu",
    "unicode": "\uE977",
    "unicode_decimal": 59767
  }, {
    "icon_id": "20572704",
    "name": "中性点引出的四相绕组",
    "font_class": "zhongxingdianyinchudesixiangraozu",
    "unicode": "\uE976",
    "unicode_decimal": 59766
  }, {
    "icon_id": "20572327",
    "name": "互不连接的m相绕组",
    "font_class": "hubulianjiedemxiangraozu",
    "unicode": "\uE975",
    "unicode_decimal": 59765
  }, {
    "icon_id": "20561267",
    "name": "两相四个次级绕组电流互感器",
    "font_class": "liangxiangsigecijiraozudianliuhuganqi",
    "unicode": "\uE8B3",
    "unicode_decimal": 59571
  }, {
    "icon_id": "20561254",
    "name": "三相四个次级绕组电流互感器",
    "font_class": "sanxiangsigecijiraozudianliuhuganqi",
    "unicode": "\uE90B",
    "unicode_decimal": 59659
  }, {
    "icon_id": "20559824",
    "name": "手车刀闸（试验）",
    "font_class": "shouchedaozhashiyan",
    "unicode": "\uE974",
    "unicode_decimal": 59764
  }, {
    "icon_id": "20559138",
    "name": "检修）",
    "font_class": "jianxiu1",
    "unicode": "\uE973",
    "unicode_decimal": 59763
  }, {
    "icon_id": "20556899",
    "name": "T型开关AB-C",
    "font_class": "TxingkaiguanAB-C",
    "unicode": "\uE96E",
    "unicode_decimal": 59758
  }, {
    "icon_id": "20553353",
    "name": "跌落式熔断器（分）",
    "font_class": "dielashirongduanqifen1",
    "unicode": "\uE972",
    "unicode_decimal": 59762
  }, {
    "icon_id": "20549697",
    "name": "运行光能发电站",
    "font_class": "yunhangguangnengfadianzhan",
    "unicode": "\uE971",
    "unicode_decimal": 59761
  }, {
    "icon_id": "20549414",
    "name": "规划光能发电站",
    "font_class": "guihuaguangnengfadianzhan",
    "unicode": "\uE970",
    "unicode_decimal": 59760
  }, {
    "icon_id": "20539794",
    "name": "双向隔离开关（分）",
    "font_class": "shuangxianggelikaiguanfen",
    "unicode": "\uE908",
    "unicode_decimal": 59656
  }, {
    "icon_id": "20539795",
    "name": "双三角形连接的六相绕组",
    "font_class": "shuangsanjiaoxinglianjiedeliuxiangraozu",
    "unicode": "\uE909",
    "unicode_decimal": 59657
  }, {
    "icon_id": "20539796",
    "name": "双绕组有载可调变压器YNd（中性点引出星形-三角形连接）2",
    "font_class": "shuangraozuyouzaiketiaobianyaqiYNdzhongxingdianyinchuxingxing-sanjiaoxinglianjie2",
    "unicode": "\uE90A",
    "unicode_decimal": 59658
  }, {
    "icon_id": "20539798",
    "name": "双绕组有载可调变压器Yyn（中性点引出星形-星形连接）",
    "font_class": "shuangraozuyouzaiketiaobianyaqiYynzhongxingdianyinchuxingxing-xingxinglianjie",
    "unicode": "\uE90C",
    "unicode_decimal": 59660
  }, {
    "icon_id": "20539799",
    "name": "三相一个次级绕组电流互感器",
    "font_class": "sanxiangyigecijiraozudianliuhuganqi",
    "unicode": "\uE90D",
    "unicode_decimal": 59661
  }, {
    "icon_id": "20539800",
    "name": "水泥杆",
    "font_class": "shuinigan",
    "unicode": "\uE90E",
    "unicode_decimal": 59662
  }, {
    "icon_id": "20539801",
    "name": "双向隔离开关（左）",
    "font_class": "shuangxianggelikaiguanzuo",
    "unicode": "\uE90F",
    "unicode_decimal": 59663
  }, {
    "icon_id": "20539802",
    "name": "上字型排列右bca",
    "font_class": "shangzixingpailieyoubca",
    "unicode": "\uE910",
    "unicode_decimal": 59664
  }, {
    "icon_id": "20539803",
    "name": "水平排列cba",
    "font_class": "shuipingpailiecba",
    "unicode": "\uE911",
    "unicode_decimal": 59665
  }, {
    "icon_id": "20539805",
    "name": "铁塔（直线型）",
    "font_class": "tietazhixianxing",
    "unicode": "\uE913",
    "unicode_decimal": 59667
  }, {
    "icon_id": "20539807",
    "name": "铁塔（耐张型）",
    "font_class": "tietanaizhangxing",
    "unicode": "\uE915",
    "unicode_decimal": 59669
  }, {
    "icon_id": "20539808",
    "name": "自调谐消弧线圈",
    "font_class": "zitiaoxiexiaohuxianquan",
    "unicode": "\uE916",
    "unicode_decimal": 59670
  }, {
    "icon_id": "20539809",
    "name": "通信电缆段",
    "font_class": "tongxindianlanduan",
    "unicode": "\uE917",
    "unicode_decimal": 59671
  }, {
    "icon_id": "20539812",
    "name": "无功补偿箱",
    "font_class": "wugongbuchangxiang",
    "unicode": "\uE91A",
    "unicode_decimal": 59674
  }, {
    "icon_id": "20539813",
    "name": "微气候、微地形区",
    "font_class": "weiqihouweidixingqu",
    "unicode": "\uE91B",
    "unicode_decimal": 59675
  }, {
    "icon_id": "20539818",
    "name": "下字型排列acb左",
    "font_class": "xiazixingpailieacbzuo",
    "unicode": "\uE920",
    "unicode_decimal": 59680
  }, {
    "icon_id": "20539819",
    "name": "下字型排列acb右",
    "font_class": "xiazixingpailieacbyou",
    "unicode": "\uE921",
    "unicode_decimal": 59681
  }, {
    "icon_id": "20539821",
    "name": "下字型排列bca右",
    "font_class": "xiazixingpailiebcayou",
    "unicode": "\uE923",
    "unicode_decimal": 59683
  }, {
    "icon_id": "20539822",
    "name": "下字型排列bca左",
    "font_class": "xiazixingpailiebcazuo",
    "unicode": "\uE924",
    "unicode_decimal": 59684
  }, {
    "icon_id": "20539824",
    "name": "下字型排列cab左",
    "font_class": "xiazixingpailiecabzuo",
    "unicode": "\uE926",
    "unicode_decimal": 59686
  }, {
    "icon_id": "20539825",
    "name": "双绕组变压器Yzn（中性点引出三角形-曲形连接）",
    "font_class": "shuangraozubianyaqiYznzhongxingdianyinchusanjiaoxing-quxinglianjie",
    "unicode": "\uE927",
    "unicode_decimal": 59687
  }, {
    "icon_id": "20539827",
    "name": "双绕组变压器Yd（中性点引出星形-三角形连接）",
    "font_class": "shuangraozubianyaqiYdzhongxingdianyinchuxingxing-sanjiaoxinglianjie",
    "unicode": "\uE929",
    "unicode_decimal": 59689
  }, {
    "icon_id": "20539828",
    "name": "消弧线圈",
    "font_class": "xiaohuxianquan",
    "unicode": "\uE92A",
    "unicode_decimal": 59690
  }, {
    "icon_id": "20539829",
    "name": "箱式变",
    "font_class": "xiangshibian",
    "unicode": "\uE92B",
    "unicode_decimal": 59691
  }, {
    "icon_id": "20539830",
    "name": "下字型排列cba右",
    "font_class": "xiazixingpailiecbayou",
    "unicode": "\uE92C",
    "unicode_decimal": 59692
  }, {
    "icon_id": "20539575",
    "name": "壁龛交接箱",
    "font_class": "bikanjiaojiexiang",
    "unicode": "\uE82D",
    "unicode_decimal": 59437
  }, {
    "icon_id": "20539831",
    "name": "一个绕组",
    "font_class": "yigeraozu",
    "unicode": "\uE92D",
    "unicode_decimal": 59693
  }, {
    "icon_id": "20539576",
    "name": "避雷器",
    "font_class": "bileiqi",
    "unicode": "\uE82E",
    "unicode_decimal": 59438
  }, {
    "icon_id": "20539832",
    "name": "星形连接的六相绕组",
    "font_class": "xingxinglianjiedeliuxiangraozu",
    "unicode": "\uE92E",
    "unicode_decimal": 59694
  }, {
    "icon_id": "20539834",
    "name": "星形连接的三相绕组",
    "font_class": "xingxinglianjiedesanxiangraozu",
    "unicode": "\uE930",
    "unicode_decimal": 59696
  }, {
    "icon_id": "20539579",
    "name": "变电站",
    "font_class": "biandianzhan",
    "unicode": "\uE831",
    "unicode_decimal": 59441
  }, {
    "icon_id": "20539580",
    "name": "垂直排列acb",
    "font_class": "chuizhipailieacb",
    "unicode": "\uE832",
    "unicode_decimal": 59442
  }, {
    "icon_id": "20539836",
    "name": "移相变压器",
    "font_class": "yixiangbianyaqi",
    "unicode": "\uE932",
    "unicode_decimal": 59698
  }, {
    "icon_id": "20539581",
    "name": "采集终端",
    "font_class": "caijizhongduan",
    "unicode": "\uE833",
    "unicode_decimal": 59443
  }, {
    "icon_id": "20539582",
    "name": "大跨越区",
    "font_class": "dakuayuequ",
    "unicode": "\uE834",
    "unicode_decimal": 59444
  }, {
    "icon_id": "20539583",
    "name": "垂直排列abc",
    "font_class": "chuizhipailieabc",
    "unicode": "\uE835",
    "unicode_decimal": 59445
  }, {
    "icon_id": "20539839",
    "name": "永久接头",
    "font_class": "yongjiujietou",
    "unicode": "\uE935",
    "unicode_decimal": 59701
  }, {
    "icon_id": "20539584",
    "name": "垂直排列bac",
    "font_class": "chuizhipailiebac",
    "unicode": "\uE836",
    "unicode_decimal": 59446
  }, {
    "icon_id": "20539586",
    "name": "垂直排列bca",
    "font_class": "chuizhipailiebca",
    "unicode": "\uE838",
    "unicode_decimal": 59448
  }, {
    "icon_id": "20539842",
    "name": "易受外力破坏区",
    "font_class": "yishouwailipohuaiqu",
    "unicode": "\uE938",
    "unicode_decimal": 59704
  }, {
    "icon_id": "20539843",
    "name": "易受风害区",
    "font_class": "yishoufenghaiqu",
    "unicode": "\uE939",
    "unicode_decimal": 59705
  }, {
    "icon_id": "20539589",
    "name": "导线段",
    "font_class": "daoxianduan",
    "unicode": "\uE83B",
    "unicode_decimal": 59451
  }, {
    "icon_id": "20539845",
    "name": "运行等离子体电厂",
    "font_class": "yunhangdenglizitidianchang",
    "unicode": "\uE93B",
    "unicode_decimal": 59707
  }, {
    "icon_id": "20539590",
    "name": "单相两个次级绕组电流互感器",
    "font_class": "danxianglianggecijiraozudianliuhuganqi",
    "unicode": "\uE83C",
    "unicode_decimal": 59452
  }, {
    "icon_id": "20539846",
    "name": "运行抽水蓄能电厂",
    "font_class": "yunhangchoushuixunengdianchang",
    "unicode": "\uE93C",
    "unicode_decimal": 59708
  }, {
    "icon_id": "20539591",
    "name": "单相六个次级绕组电流互感器",
    "font_class": "danxiangliugecijiraozudianliuhuganqi",
    "unicode": "\uE83D",
    "unicode_decimal": 59453
  }, {
    "icon_id": "20539847",
    "name": "有载可调压自耦变压器",
    "font_class": "youzaiketiaoyazioubianyaqi1",
    "unicode": "\uE93D",
    "unicode_decimal": 59709
  }, {
    "icon_id": "20539592",
    "name": "单相一个次级绕组电流互感器",
    "font_class": "danxiangyigecijiraozudianliuhuganqi",
    "unicode": "\uE83E",
    "unicode_decimal": 59454
  }, {
    "icon_id": "20539848",
    "name": "运行杆塔",
    "font_class": "yunhangganta",
    "unicode": "\uE93E",
    "unicode_decimal": 59710
  }, {
    "icon_id": "20539593",
    "name": "带电显示器",
    "font_class": "daidianxianshiqi",
    "unicode": "\uE83F",
    "unicode_decimal": 59455
  }, {
    "icon_id": "20539849",
    "name": "运行换流站",
    "font_class": "yunhanghuanliuzhan",
    "unicode": "\uE93F",
    "unicode_decimal": 59711
  }, {
    "icon_id": "20539594",
    "name": "单相五个次级绕组电流互感器",
    "font_class": "danxiangwugecijiraozudianliuhuganqi",
    "unicode": "\uE840",
    "unicode_decimal": 59456
  }, {
    "icon_id": "20539850",
    "name": "运行潮汐电厂",
    "font_class": "yunhangchaoxidianchang",
    "unicode": "\uE940",
    "unicode_decimal": 59712
  }, {
    "icon_id": "20539595",
    "name": "低压熔丝箱（合）",
    "font_class": "diyarongsixianghe",
    "unicode": "\uE841",
    "unicode_decimal": 59457
  }, {
    "icon_id": "20539851",
    "name": "运行风力发电站",
    "font_class": "yunhangfenglifadianzhan",
    "unicode": "\uE941",
    "unicode_decimal": 59713
  }, {
    "icon_id": "20539596",
    "name": "低压熔丝箱（分）",
    "font_class": "diyarongsixiangfen",
    "unicode": "\uE842",
    "unicode_decimal": 59458
  }, {
    "icon_id": "20539852",
    "name": "运行水电厂",
    "font_class": "yunhangshuidianchang",
    "unicode": "\uE942",
    "unicode_decimal": 59714
  }, {
    "icon_id": "20539597",
    "name": "垂直排列cab",
    "font_class": "chuizhipailiecab",
    "unicode": "\uE843",
    "unicode_decimal": 59459
  }, {
    "icon_id": "20539853",
    "name": "运行串补站",
    "font_class": "yunhangchuanbuzhan",
    "unicode": "\uE943",
    "unicode_decimal": 59715
  }, {
    "icon_id": "20539598",
    "name": "单相四个次级绕组电流互感器",
    "font_class": "danxiangsigecijiraozudianliuhuganqi",
    "unicode": "\uE844",
    "unicode_decimal": 59460
  }, {
    "icon_id": "20539854",
    "name": "运行变电站",
    "font_class": "yunhangbiandianzhan",
    "unicode": "\uE944",
    "unicode_decimal": 59716
  }, {
    "icon_id": "20539599",
    "name": "电缆段",
    "font_class": "dianlanduan",
    "unicode": "\uE845",
    "unicode_decimal": 59461
  }, {
    "icon_id": "20539855",
    "name": "运行核电站",
    "font_class": "yunhanghedianzhan",
    "unicode": "\uE945",
    "unicode_decimal": 59717
  }, {
    "icon_id": "20539856",
    "name": "中继站",
    "font_class": "zhongjizhan",
    "unicode": "\uE946",
    "unicode_decimal": 59718
  }, {
    "icon_id": "20539601",
    "name": "电缆分界箱",
    "font_class": "dianlanfenjiexiang",
    "unicode": "\uE847",
    "unicode_decimal": 59463
  }, {
    "icon_id": "20539857",
    "name": "直流发电机",
    "font_class": "zhiliufadianji",
    "unicode": "\uE947",
    "unicode_decimal": 59719
  }, {
    "icon_id": "20539602",
    "name": "导、地线覆冰区",
    "font_class": "daodixianfubingqu",
    "unicode": "\uE848",
    "unicode_decimal": 59464
  }, {
    "icon_id": "20539858",
    "name": "运行秸秆电厂",
    "font_class": "yunhangjiegandianchang",
    "unicode": "\uE948",
    "unicode_decimal": 59720
  }, {
    "icon_id": "20539603",
    "name": "电缆接地箱",
    "font_class": "dianlanjiedixiang",
    "unicode": "\uE849",
    "unicode_decimal": 59465
  }, {
    "icon_id": "20539859",
    "name": "运行开关站",
    "font_class": "yunhangkaiguanzhan",
    "unicode": "\uE949",
    "unicode_decimal": 59721
  }, {
    "icon_id": "20539604",
    "name": "电缆通风口",
    "font_class": "dianlantongfengkou",
    "unicode": "\uE84A",
    "unicode_decimal": 59466
  }, {
    "icon_id": "20539860",
    "name": "运行垃圾电厂",
    "font_class": "yunhanglajidianchang",
    "unicode": "\uE94A",
    "unicode_decimal": 59722
  }, {
    "icon_id": "20539605",
    "name": "电缆隧道",
    "font_class": "dianlansuidao",
    "unicode": "\uE84B",
    "unicode_decimal": 59467
  }, {
    "icon_id": "20539861",
    "name": "终端室（站）",
    "font_class": "zhongduanshizhan",
    "unicode": "\uE94B",
    "unicode_decimal": 59723
  }, {
    "icon_id": "20539606",
    "name": "电缆沟",
    "font_class": "dianlangou",
    "unicode": "\uE84C",
    "unicode_decimal": 59468
  }, {
    "icon_id": "20539862",
    "name": "柱上变压器",
    "font_class": "zhushangbianyaqi",
    "unicode": "\uE94C",
    "unicode_decimal": 59724
  }, {
    "icon_id": "20539607",
    "name": "低压配电箱",
    "font_class": "diyapeidianxiang",
    "unicode": "\uE84D",
    "unicode_decimal": 59469
  }, {
    "icon_id": "20539863",
    "name": "中性点引出的曲形折或互联星形的三相绕组",
    "font_class": "zhongxingdianyinchudequxingzhehuohulianxingxingdesanxiangraozu",
    "unicode": "\uE94D",
    "unicode_decimal": 59725
  }, {
    "icon_id": "20539608",
    "name": "电力电感器",
    "font_class": "dianlidianganqi",
    "unicode": "\uE84E",
    "unicode_decimal": 59470
  }, {
    "icon_id": "20539864",
    "name": "柱上变压器（公用变）",
    "font_class": "zhushangbianyaqigongyongbian",
    "unicode": "\uE94E",
    "unicode_decimal": 59726
  }, {
    "icon_id": "20539609",
    "name": "盗窃多发区",
    "font_class": "daoqieduofaqu",
    "unicode": "\uE84F",
    "unicode_decimal": 59471
  }, {
    "icon_id": "20539865",
    "name": "中性点引出星形连接的三相绕组",
    "font_class": "zhongxingdianyinchuxingxinglianjiedesanxiangraozu",
    "unicode": "\uE94F",
    "unicode_decimal": 59727
  }, {
    "icon_id": "20539610",
    "name": "电缆交叉互联箱",
    "font_class": "dianlanjiaochahulianxiang",
    "unicode": "\uE850",
    "unicode_decimal": 59472
  }, {
    "icon_id": "20539866",
    "name": "中性点引出的叉形连接六相绕组",
    "font_class": "zhongxingdianyinchudechaxinglianjieliuxiangraozu",
    "unicode": "\uE950",
    "unicode_decimal": 59728
  }, {
    "icon_id": "20539611",
    "name": "电缆中间接头",
    "font_class": "dianlanzhongjianjietou",
    "unicode": "\uE851",
    "unicode_decimal": 59473
  }, {
    "icon_id": "20539868",
    "name": "a级污秽区",
    "font_class": "ajiwuhuiqu",
    "unicode": "\uE952",
    "unicode_decimal": 59730
  }, {
    "icon_id": "20539613",
    "name": "断路器（合）",
    "font_class": "duanluqihe",
    "unicode": "\uE853",
    "unicode_decimal": 59475
  }, {
    "icon_id": "20539869",
    "name": "柱上重合器（分）",
    "font_class": "zhushangzhongheqifen",
    "unicode": "\uE953",
    "unicode_decimal": 59731
  }, {
    "icon_id": "20539870",
    "name": "柱上重合器（合）",
    "font_class": "zhushangzhongheqihe",
    "unicode": "\uE954",
    "unicode_decimal": 59732
  }, {
    "icon_id": "20539615",
    "name": "电缆终端头",
    "font_class": "dianlanzhongduantou",
    "unicode": "\uE855",
    "unicode_decimal": 59477
  }, {
    "icon_id": "20539871",
    "name": "运行火电厂",
    "font_class": "yunhanghuodianchang",
    "unicode": "\uE955",
    "unicode_decimal": 59733
  }, {
    "icon_id": "20539616",
    "name": "跌落式熔断器（合）",
    "font_class": "dielashirongduanqihe",
    "unicode": "\uE856",
    "unicode_decimal": 59478
  }, {
    "icon_id": "20539872",
    "name": "自耦变压器（星形连接）",
    "font_class": "zioubianyaqixingxinglianjie",
    "unicode": "\uE956",
    "unicode_decimal": 59734
  }, {
    "icon_id": "20539873",
    "name": "运行地热电厂",
    "font_class": "yunhangdiredianchang",
    "unicode": "\uE957",
    "unicode_decimal": 59735
  }, {
    "icon_id": "20539874",
    "name": "通信终端箱",
    "font_class": "tongxinzhongduanxiang",
    "unicode": "\uE958",
    "unicode_decimal": 59736
  }, {
    "icon_id": "20539619",
    "name": "电力电容器",
    "font_class": "dianlidianrongqi",
    "unicode": "\uE859",
    "unicode_decimal": 59481
  }, {
    "icon_id": "20539875",
    "name": "柱上断路器（分）",
    "font_class": "zhushangduanluqifen",
    "unicode": "\uE959",
    "unicode_decimal": 59737
  }, {
    "icon_id": "20539620",
    "name": "电力电阻器",
    "font_class": "dianlidianzuqi",
    "unicode": "\uE85A",
    "unicode_decimal": 59482
  }, {
    "icon_id": "20539876",
    "name": "柱上隔离开关（合）",
    "font_class": "zhushanggelikaiguanhe",
    "unicode": "\uE95A",
    "unicode_decimal": 59738
  }, {
    "icon_id": "20539621",
    "name": "分段器",
    "font_class": "fenduanqi",
    "unicode": "\uE85B",
    "unicode_decimal": 59483
  }, {
    "icon_id": "20539877",
    "name": "柱上断路器（合）",
    "font_class": "zhushangduanluqihe",
    "unicode": "\uE95B",
    "unicode_decimal": 59739
  }, {
    "icon_id": "20539622",
    "name": "负荷开关（合）",
    "font_class": "fuhekaiguanhe",
    "unicode": "\uE85C",
    "unicode_decimal": 59484
  }, {
    "icon_id": "20539878",
    "name": "柱上负荷开关（合）",
    "font_class": "zhushangfuhekaiguanhe",
    "unicode": "\uE95C",
    "unicode_decimal": 59740
  }, {
    "icon_id": "20539623",
    "name": "电流方向",
    "font_class": "dianliufangxiang",
    "unicode": "\uE85D",
    "unicode_decimal": 59485
  }, {
    "icon_id": "20539879",
    "name": "柱上隔离开关（分）",
    "font_class": "zhushanggelikaiguanfen",
    "unicode": "\uE95D",
    "unicode_decimal": 59741
  }, {
    "icon_id": "20539624",
    "name": "防雷符",
    "font_class": "fangleifu",
    "unicode": "\uE85E",
    "unicode_decimal": 59486
  }, {
    "icon_id": "20539880",
    "name": "柱上电容器",
    "font_class": "zhushangdianrongqi",
    "unicode": "\uE95E",
    "unicode_decimal": 59742
  }, {
    "icon_id": "20539625",
    "name": "方向标志",
    "font_class": "fangxiangbiaozhi",
    "unicode": "\uE85F",
    "unicode_decimal": 59487
  }, {
    "icon_id": "20539881",
    "name": "柱上负荷开关（分）",
    "font_class": "zhushangfuhekaiguanfen",
    "unicode": "\uE95F",
    "unicode_decimal": 59743
  }, {
    "icon_id": "20539626",
    "name": "高压用户",
    "font_class": "gaoyayonghu",
    "unicode": "\uE860",
    "unicode_decimal": 59488
  }, {
    "icon_id": "20539882",
    "name": "V型开关B-C",
    "font_class": "VxingkaiguanB-C",
    "unicode": "\uE960",
    "unicode_decimal": 59744
  }, {
    "icon_id": "20539883",
    "name": "自耦变压器",
    "font_class": "zioubianyaqi",
    "unicode": "\uE961",
    "unicode_decimal": 59745
  }, {
    "icon_id": "20539628",
    "name": "钢管杆",
    "font_class": "gangguangan",
    "unicode": "\uE862",
    "unicode_decimal": 59490
  }, {
    "icon_id": "20539884",
    "name": "V型开关OPEN",
    "font_class": "VxingkaiguanOPEN",
    "unicode": "\uE962",
    "unicode_decimal": 59746
  }, {
    "icon_id": "20539885",
    "name": "通信电缆接头",
    "font_class": "tongxindianlanjietou",
    "unicode": "\uE963",
    "unicode_decimal": 59747
  }, {
    "icon_id": "20539630",
    "name": "钢管塔（耐张型）",
    "font_class": "gangguantanaizhangxing",
    "unicode": "\uE864",
    "unicode_decimal": 59492
  }, {
    "icon_id": "20539886",
    "name": "e级污秽区",
    "font_class": "ejiwuhuiqu",
    "unicode": "\uE964",
    "unicode_decimal": 59748
  }, {
    "icon_id": "20539888",
    "name": "c级污秽区",
    "font_class": "cjiwuhuiqu",
    "unicode": "\uE966",
    "unicode_decimal": 59750
  }, {
    "icon_id": "20539633",
    "name": "放电线圈",
    "font_class": "fangdianxianquan",
    "unicode": "\uE867",
    "unicode_decimal": 59495
  }, {
    "icon_id": "20539889",
    "name": "b级污秽区",
    "font_class": "bjiwuhuiqu",
    "unicode": "\uE967",
    "unicode_decimal": 59751
  }, {
    "icon_id": "20539634",
    "name": "规划变电站",
    "font_class": "guihuabiandianzhan",
    "unicode": "\uE868",
    "unicode_decimal": 59496
  }, {
    "icon_id": "20539890",
    "name": "d级污秽区",
    "font_class": "djiwuhuiqu",
    "unicode": "\uE968",
    "unicode_decimal": 59752
  }, {
    "icon_id": "20539635",
    "name": "隔离开关（分）",
    "font_class": "gelikaiguanfen",
    "unicode": "\uE869",
    "unicode_decimal": 59497
  }, {
    "icon_id": "20539891",
    "name": "阻波器",
    "font_class": "zuboqi",
    "unicode": "\uE969",
    "unicode_decimal": 59753
  }, {
    "icon_id": "20539636",
    "name": "多雷区",
    "font_class": "duoleiqu",
    "unicode": "\uE86A",
    "unicode_decimal": 59498
  }, {
    "icon_id": "20539892",
    "name": "V型开关A-C",
    "font_class": "VxingkaiguanA-C",
    "unicode": "\uE96A",
    "unicode_decimal": 59754
  }, {
    "icon_id": "20539893",
    "name": "T型开关A-C",
    "font_class": "TxingkaiguanA-C",
    "unicode": "\uE96B",
    "unicode_decimal": 59755
  }, {
    "icon_id": "20539638",
    "name": "规划地热电厂",
    "font_class": "guihuadiredianchang",
    "unicode": "\uE86C",
    "unicode_decimal": 59500
  }, {
    "icon_id": "20539894",
    "name": "T型开关A-B",
    "font_class": "TxingkaiguanA-B",
    "unicode": "\uE96C",
    "unicode_decimal": 59756
  }, {
    "icon_id": "20539639",
    "name": "规划抽水蓄能电厂",
    "font_class": "guihuachoushuixunengdianchang",
    "unicode": "\uE86D",
    "unicode_decimal": 59501
  }, {
    "icon_id": "20539895",
    "name": "T型开关B-C",
    "font_class": "TxingkaiguanB-C",
    "unicode": "\uE96D",
    "unicode_decimal": 59757
  }, {
    "icon_id": "20539640",
    "name": "规划换流站",
    "font_class": "guihuahuanliuzhan",
    "unicode": "\uE86E",
    "unicode_decimal": 59502
  }, {
    "icon_id": "20539897",
    "name": "V型开关AB-C",
    "font_class": "VxingkaiguanAB-C",
    "unicode": "\uE96F",
    "unicode_decimal": 59759
  }, {
    "icon_id": "20539642",
    "name": "光缆段",
    "font_class": "guanglanduan",
    "unicode": "\uE870",
    "unicode_decimal": 59504
  }, {
    "icon_id": "20539643",
    "name": "工井",
    "font_class": "gongjing",
    "unicode": "\uE871",
    "unicode_decimal": 59505
  }, {
    "icon_id": "20539644",
    "name": "规划潮汐电厂",
    "font_class": "guihuachaoxidianchang",
    "unicode": "\uE872",
    "unicode_decimal": 59506
  }, {
    "icon_id": "20539645",
    "name": "隔离开关（合）",
    "font_class": "gelikaiguanhe",
    "unicode": "\uE873",
    "unicode_decimal": 59507
  }, {
    "icon_id": "20539646",
    "name": "电缆分支箱",
    "font_class": "dianlanfenzhixiang",
    "unicode": "\uE874",
    "unicode_decimal": 59508
  }, {
    "icon_id": "20539647",
    "name": "电缆防火墙",
    "font_class": "dianlanfanghuoqiang",
    "unicode": "\uE875",
    "unicode_decimal": 59509
  }, {
    "icon_id": "20539648",
    "name": "规划垃圾电厂",
    "font_class": "guihualajidianchang",
    "unicode": "\uE876",
    "unicode_decimal": 59510
  }, {
    "icon_id": "20539649",
    "name": "规划风力发电站",
    "font_class": "guihuafenglifadianzhan",
    "unicode": "\uE877",
    "unicode_decimal": 59511
  }, {
    "icon_id": "20539650",
    "name": "规划火电厂",
    "font_class": "guihuahuodianchang",
    "unicode": "\uE878",
    "unicode_decimal": 59512
  }, {
    "icon_id": "20539651",
    "name": "导、地线易舞动区",
    "font_class": "daodixianyiwudongqu",
    "unicode": "\uE879",
    "unicode_decimal": 59513
  }, {
    "icon_id": "20539652",
    "name": "故障指示器",
    "font_class": "guzhangzhishiqi",
    "unicode": "\uE87A",
    "unicode_decimal": 59514
  }, {
    "icon_id": "20539653",
    "name": "规划串补站",
    "font_class": "guihuachuanbuzhan",
    "unicode": "\uE87B",
    "unicode_decimal": 59515
  }, {
    "icon_id": "20539654",
    "name": "规划等离子体电厂",
    "font_class": "guihuadenglizitidianchang",
    "unicode": "\uE87C",
    "unicode_decimal": 59516
  }, {
    "icon_id": "20539655",
    "name": "规划开关站",
    "font_class": "guihuakaiguanzhan",
    "unicode": "\uE87D",
    "unicode_decimal": 59517
  }, {
    "icon_id": "20539656",
    "name": "规划水电厂",
    "font_class": "guihuashuidianchang",
    "unicode": "\uE87E",
    "unicode_decimal": 59518
  }, {
    "icon_id": "20539657",
    "name": "规划核电站",
    "font_class": "guihuahedianzhan",
    "unicode": "\uE87F",
    "unicode_decimal": 59519
  }, {
    "icon_id": "20539658",
    "name": "不良地质区",
    "font_class": "buliangdizhiqu",
    "unicode": "\uE880",
    "unicode_decimal": 59520
  }, {
    "icon_id": "20539659",
    "name": "断路器（分）",
    "font_class": "duanluqifen",
    "unicode": "\uE881",
    "unicode_decimal": 59521
  }, {
    "icon_id": "20539660",
    "name": "规划秸秆电厂",
    "font_class": "guihuajiegandianchang",
    "unicode": "\uE882",
    "unicode_decimal": 59522
  }, {
    "icon_id": "20539661",
    "name": "垂直排列cba",
    "font_class": "chuizhipailiecba",
    "unicode": "\uE883",
    "unicode_decimal": 59523
  }, {
    "icon_id": "20539662",
    "name": "互不连接的M相绕组",
    "font_class": "hubulianjiedeMxiangraozu",
    "unicode": "\uE884",
    "unicode_decimal": 59524
  }, {
    "icon_id": "20539663",
    "name": "环网柜",
    "font_class": "huanwanggui",
    "unicode": "\uE885",
    "unicode_decimal": 59525
  }, {
    "icon_id": "20539664",
    "name": "换流站",
    "font_class": "huanliuzhan",
    "unicode": "\uE886",
    "unicode_decimal": 59526
  }, {
    "icon_id": "20539665",
    "name": "计量器",
    "font_class": "jiliangqi",
    "unicode": "\uE887",
    "unicode_decimal": 59527
  }, {
    "icon_id": "20539666",
    "name": "互不连接的三相绕组",
    "font_class": "hubulianjiedesanxiangraozu",
    "unicode": "\uE888",
    "unicode_decimal": 59528
  }, {
    "icon_id": "20539667",
    "name": "环网箱式变",
    "font_class": "huanwangxiangshibian",
    "unicode": "\uE889",
    "unicode_decimal": 59529
  }, {
    "icon_id": "20539668",
    "name": "架空交接箱",
    "font_class": "jiakongjiaojiexiang",
    "unicode": "\uE88A",
    "unicode_decimal": 59530
  }, {
    "icon_id": "20539669",
    "name": "计量表计",
    "font_class": "jiliangbiaoji",
    "unicode": "\uE88B",
    "unicode_decimal": 59531
  }, {
    "icon_id": "20539671",
    "name": "检修）",
    "font_class": "jianxiu",
    "unicode": "\uE88D",
    "unicode_decimal": 59533
  }, {
    "icon_id": "20539673",
    "name": "接触器（分）",
    "font_class": "jiechuqifen",
    "unicode": "\uE88F",
    "unicode_decimal": 59535
  }, {
    "icon_id": "20539674",
    "name": "交流发电机",
    "font_class": "jiaoliufadianji",
    "unicode": "\uE890",
    "unicode_decimal": 59536
  }, {
    "icon_id": "20539675",
    "name": "间隙",
    "font_class": "jianxi",
    "unicode": "\uE891",
    "unicode_decimal": 59537
  }, {
    "icon_id": "20539677",
    "name": "接触器（合）",
    "font_class": "jiechuqihe",
    "unicode": "\uE893",
    "unicode_decimal": 59539
  }, {
    "icon_id": "20539678",
    "name": "接地刀闸（分）",
    "font_class": "jiedidaozhafen",
    "unicode": "\uE894",
    "unicode_decimal": 59540
  }, {
    "icon_id": "20539679",
    "name": "接地",
    "font_class": "jiedi",
    "unicode": "\uE895",
    "unicode_decimal": 59541
  }, {
    "icon_id": "20539680",
    "name": "进户点",
    "font_class": "jinhudian",
    "unicode": "\uE896",
    "unicode_decimal": 59542
  }, {
    "icon_id": "20539681",
    "name": "接地电阻",
    "font_class": "jiedidianzu",
    "unicode": "\uE897",
    "unicode_decimal": 59543
  }, {
    "icon_id": "20539682",
    "name": "局用站点",
    "font_class": "juyongzhandian",
    "unicode": "\uE898",
    "unicode_decimal": 59544
  }, {
    "icon_id": "20539684",
    "name": "接地刀闸（合）",
    "font_class": "jiedidaozhahe",
    "unicode": "\uE89A",
    "unicode_decimal": 59546
  }, {
    "icon_id": "20539686",
    "name": "接地变压器（曲折形连接）",
    "font_class": "jiedibianyaqiquzhexinglianjie",
    "unicode": "\uE89C",
    "unicode_decimal": 59548
  }, {
    "icon_id": "20539687",
    "name": "静止无功补偿器",
    "font_class": "jingzhiwugongbuchangqi",
    "unicode": "\uE89D",
    "unicode_decimal": 59549
  }, {
    "icon_id": "20539688",
    "name": "可拆卸固定接头",
    "font_class": "kechaixiegudingjietou",
    "unicode": "\uE89E",
    "unicode_decimal": 59550
  }, {
    "icon_id": "20539691",
    "name": "可调电容器",
    "font_class": "ketiaodianrongqi",
    "unicode": "\uE8A1",
    "unicode_decimal": 59553
  }, {
    "icon_id": "20539692",
    "name": "开断符",
    "font_class": "kaiduanfu",
    "unicode": "\uE8A2",
    "unicode_decimal": 59554
  }, {
    "icon_id": "20539693",
    "name": "开关站",
    "font_class": "kaiguanzhan",
    "unicode": "\uE8A3",
    "unicode_decimal": 59555
  }, {
    "icon_id": "20539695",
    "name": "两相四端绕组02",
    "font_class": "liangxiangsiduanraozu02",
    "unicode": "\uE8A5",
    "unicode_decimal": 59557
  }, {
    "icon_id": "20539696",
    "name": "两相四端绕组",
    "font_class": "liangxiangsiduanraozu",
    "unicode": "\uE8A6",
    "unicode_decimal": 59558
  }, {
    "icon_id": "20539698",
    "name": "连接线",
    "font_class": "lianjiexian",
    "unicode": "\uE8A8",
    "unicode_decimal": 59560
  }, {
    "icon_id": "20539699",
    "name": "两相两个次级绕组电流互感器",
    "font_class": "liangxianglianggecijiraozudianliuhuganqi",
    "unicode": "\uE8A9",
    "unicode_decimal": 59561
  }, {
    "icon_id": "20539702",
    "name": "六个独立个绕组",
    "font_class": "liugeduligeraozu",
    "unicode": "\uE8AC",
    "unicode_decimal": 59564
  }, {
    "icon_id": "20539703",
    "name": "母线",
    "font_class": "muxian",
    "unicode": "\uE8AD",
    "unicode_decimal": 59565
  }, {
    "icon_id": "20539705",
    "name": "耦合电容器",
    "font_class": "ouhedianrongqi",
    "unicode": "\uE8AF",
    "unicode_decimal": 59567
  }, {
    "icon_id": "20539707",
    "name": "木杆",
    "font_class": "mugan",
    "unicode": "\uE8B1",
    "unicode_decimal": 59569
  }, {
    "icon_id": "20539708",
    "name": "两相一个次级绕组电流互感器",
    "font_class": "liangxiangyigecijiraozudianliuhuganqi",
    "unicode": "\uE8B2",
    "unicode_decimal": 59570
  }, {
    "icon_id": "20539710",
    "name": "林竹区",
    "font_class": "linzhuqu",
    "unicode": "\uE8B4",
    "unicode_decimal": 59572
  }, {
    "icon_id": "20539711",
    "name": "落地交接箱",
    "font_class": "ladijiaojiexiang",
    "unicode": "\uE8B5",
    "unicode_decimal": 59573
  }, {
    "icon_id": "20539714",
    "name": "其他特殊区",
    "font_class": "qitateshuqu",
    "unicode": "\uE8B8",
    "unicode_decimal": 59576
  }, {
    "icon_id": "20539715",
    "name": "配电站（室）",
    "font_class": "peidianzhanshi",
    "unicode": "\uE8B9",
    "unicode_decimal": 59577
  }, {
    "icon_id": "20539716",
    "name": "曲折形或互联星形的三相绕组",
    "font_class": "quzhexinghuohulianxingxingdesanxiangraozu",
    "unicode": "\uE8BA",
    "unicode_decimal": 59578
  }, {
    "icon_id": "20539718",
    "name": "盘留",
    "font_class": "panliu",
    "unicode": "\uE8BC",
    "unicode_decimal": 59580
  }, {
    "icon_id": "20539719",
    "name": "鸟害多发区",
    "font_class": "niaohaiduofaqu",
    "unicode": "\uE8BD",
    "unicode_decimal": 59581
  }, {
    "icon_id": "20539720",
    "name": "熔断器",
    "font_class": "rongduanqi",
    "unicode": "\uE8BE",
    "unicode_decimal": 59582
  }, {
    "icon_id": "20539721",
    "name": "熔断式断路器（合）",
    "font_class": "rongduanshiduanluqihe",
    "unicode": "\uE8BF",
    "unicode_decimal": 59583
  }, {
    "icon_id": "20539722",
    "name": "熔断式断路器（分）",
    "font_class": "rongduanshiduanluqifen",
    "unicode": "\uE8C0",
    "unicode_decimal": 59584
  }, {
    "icon_id": "20539723",
    "name": "熔断式开关（合）",
    "font_class": "rongduanshikaiguanhe",
    "unicode": "\uE8C1",
    "unicode_decimal": 59585
  }, {
    "icon_id": "20539724",
    "name": "熔断式隔离开关（合）",
    "font_class": "rongduanshigelikaiguanhe",
    "unicode": "\uE8C2",
    "unicode_decimal": 59586
  }, {
    "icon_id": "20539725",
    "name": "熔断式负荷开关（合）",
    "font_class": "rongduanshifuhekaiguanhe",
    "unicode": "\uE8C3",
    "unicode_decimal": 59587
  }, {
    "icon_id": "20539726",
    "name": "熔断式负荷开关（分）",
    "font_class": "rongduanshifuhekaiguanfen",
    "unicode": "\uE8C4",
    "unicode_decimal": 59588
  }, {
    "icon_id": "20539727",
    "name": "三个独立个绕组",
    "font_class": "sangeduligeraozu",
    "unicode": "\uE8C5",
    "unicode_decimal": 59589
  }, {
    "icon_id": "20539728",
    "name": "熔断式开关（分）",
    "font_class": "rongduanshikaiguanfen",
    "unicode": "\uE8C6",
    "unicode_decimal": 59590
  }, {
    "icon_id": "20539729",
    "name": "三工位开关（分）",
    "font_class": "sangongweikaiguanfen",
    "unicode": "\uE8C7",
    "unicode_decimal": 59591
  }, {
    "icon_id": "20539730",
    "name": "熔断式隔离开关（分）",
    "font_class": "rongduanshigelikaiguanfen",
    "unicode": "\uE8C8",
    "unicode_decimal": 59592
  }, {
    "icon_id": "20539731",
    "name": "三联杆（钢管杆）",
    "font_class": "sanliangangangguangan",
    "unicode": "\uE8C9",
    "unicode_decimal": 59593
  }, {
    "icon_id": "20539732",
    "name": "三角形排列cba",
    "font_class": "sanjiaoxingpailiecba",
    "unicode": "\uE8CA",
    "unicode_decimal": 59594
  }, {
    "icon_id": "20539733",
    "name": "三工位开关（接地）",
    "font_class": "sangongweikaiguanjiedi",
    "unicode": "\uE8CB",
    "unicode_decimal": 59595
  }, {
    "icon_id": "20539734",
    "name": "三角形排列abc",
    "font_class": "sanjiaoxingpailieabc",
    "unicode": "\uE8CC",
    "unicode_decimal": 59596
  }, {
    "icon_id": "20539735",
    "name": "三角形排列bac",
    "font_class": "sanjiaoxingpailiebac",
    "unicode": "\uE8CD",
    "unicode_decimal": 59597
  }, {
    "icon_id": "20539736",
    "name": "三工位开关（合）",
    "font_class": "sangongweikaiguanhe",
    "unicode": "\uE8CE",
    "unicode_decimal": 59598
  }, {
    "icon_id": "20539737",
    "name": "三联杆（木杆）",
    "font_class": "sanlianganmugan",
    "unicode": "\uE8CF",
    "unicode_decimal": 59599
  }, {
    "icon_id": "20539738",
    "name": "三绕组变压器YNdy（中性点引出星形-三角形-星形连接）",
    "font_class": "sanraozubianyaqiYNdyzhongxingdianyinchuxingxing-sanjiaoxing-xingxinglianjie",
    "unicode": "\uE8D0",
    "unicode_decimal": 59600
  }, {
    "icon_id": "20539739",
    "name": "人口密集区",
    "font_class": "renkoumijiqu",
    "unicode": "\uE8D1",
    "unicode_decimal": 59601
  }, {
    "icon_id": "20539740",
    "name": "三角形排列acb",
    "font_class": "sanjiaoxingpailieacb",
    "unicode": "\uE8D2",
    "unicode_decimal": 59602
  }, {
    "icon_id": "20539741",
    "name": "三绕组变压器",
    "font_class": "sanraozubianyaqi",
    "unicode": "\uE8D3",
    "unicode_decimal": 59603
  }, {
    "icon_id": "20539742",
    "name": "三绕组电压互感器",
    "font_class": "sanraozudianyahuganqi",
    "unicode": "\uE8D4",
    "unicode_decimal": 59604
  }, {
    "icon_id": "20539743",
    "name": "三绕组变压器（三角形-星形-星形连接）",
    "font_class": "sanraozubianyaqisanjiaoxing-xingxing-xingxinglianjie",
    "unicode": "\uE8D5",
    "unicode_decimal": 59605
  }, {
    "icon_id": "20539744",
    "name": "上字型排列右acb",
    "font_class": "shangzixingpailieyouacb",
    "unicode": "\uE8D6",
    "unicode_decimal": 59606
  }, {
    "icon_id": "20539746",
    "name": "三绕组变压器（中性点引出星形-三角形连接）",
    "font_class": "sanraozubianyaqizhongxingdianyinchuxingxing-sanjiaoxinglianjie",
    "unicode": "\uE8D8",
    "unicode_decimal": 59608
  }, {
    "icon_id": "20539747",
    "name": "三绕组变压器YNdy（中性点引出星形-三角形-星形连接）2",
    "font_class": "sanraozubianyaqiYNdyzhongxingdianyinchuxingxing-sanjiaoxing-xingxinglianjie2",
    "unicode": "\uE8D9",
    "unicode_decimal": 59609
  }, {
    "icon_id": "20539748",
    "name": "三绕组变压器YNynd（中性点引出星形-星形-三角形连接）2",
    "font_class": "sanraozubianyaqiYNyndzhongxingdianyinchuxingxing-xingxing-sanjiaoxinglianjie2",
    "unicode": "\uE8DA",
    "unicode_decimal": 59610
  }, {
    "icon_id": "20539749",
    "name": "三绕组变压器（星形-三角形-星形连接）",
    "font_class": "sanraozubianyaqixingxing-sanjiaoxing-xingxinglianjie",
    "unicode": "\uE8DB",
    "unicode_decimal": 59611
  }, {
    "icon_id": "20539750",
    "name": "三绕组变压器（星形-星形-三角形连接）",
    "font_class": "sanraozubianyaqixingxing-xingxing-sanjiaoxinglianjie",
    "unicode": "\uE8DC",
    "unicode_decimal": 59612
  }, {
    "icon_id": "20539752",
    "name": "三绕组变压器YNynd（中性点引出星形-星形-三角形连接）",
    "font_class": "sanraozubianyaqiYNyndzhongxingdianyinchuxingxing-xingxing-sanjiaoxinglianjie",
    "unicode": "\uE8DE",
    "unicode_decimal": 59614
  }, {
    "icon_id": "20539754",
    "name": "上字型排列右bac",
    "font_class": "shangzixingpailieyoubac",
    "unicode": "\uE8E0",
    "unicode_decimal": 59616
  }, {
    "icon_id": "20539755",
    "name": "三角形排列bca",
    "font_class": "sanjiaoxingpailiebca",
    "unicode": "\uE8E1",
    "unicode_decimal": 59617
  }, {
    "icon_id": "20539756",
    "name": "上字型排列右abc",
    "font_class": "shangzixingpailieyouabc",
    "unicode": "\uE8E2",
    "unicode_decimal": 59618
  }, {
    "icon_id": "20539757",
    "name": "沙丘区",
    "font_class": "shaqiuqu",
    "unicode": "\uE8E3",
    "unicode_decimal": 59619
  }, {
    "icon_id": "20539758",
    "name": "三联杆（水泥杆）",
    "font_class": "sanlianganshuinigan",
    "unicode": "\uE8E4",
    "unicode_decimal": 59620
  }, {
    "icon_id": "20539759",
    "name": "双绕组变压器（有载调压）",
    "font_class": "shuangraozubianyaqiyouzaitiaoya",
    "unicode": "\uE8E5",
    "unicode_decimal": 59621
  }, {
    "icon_id": "20539760",
    "name": "上字型排列左cba",
    "font_class": "shangzixingpailiezuocba",
    "unicode": "\uE8E6",
    "unicode_decimal": 59622
  }, {
    "icon_id": "20539761",
    "name": "上字型排列右cba",
    "font_class": "shangzixingpailieyoucba",
    "unicode": "\uE8E7",
    "unicode_decimal": 59623
  }, {
    "icon_id": "20539763",
    "name": "上字型排列左cab",
    "font_class": "shangzixingpailiezuocab",
    "unicode": "\uE8E9",
    "unicode_decimal": 59625
  }, {
    "icon_id": "20539764",
    "name": "手车刀闸（分）",
    "font_class": "shouchedaozhafen",
    "unicode": "\uE8EA",
    "unicode_decimal": 59626
  }, {
    "icon_id": "20539765",
    "name": "双向隔离开关（右）",
    "font_class": "shuangxianggelikaiguanyou",
    "unicode": "\uE8EB",
    "unicode_decimal": 59627
  }, {
    "icon_id": "20539766",
    "name": "手车刀闸（合）",
    "font_class": "shouchedaozhahe",
    "unicode": "\uE8EC",
    "unicode_decimal": 59628
  }, {
    "icon_id": "20539767",
    "name": "双联杆（水泥杆）",
    "font_class": "shuanglianganshuinigan",
    "unicode": "\uE8ED",
    "unicode_decimal": 59629
  }, {
    "icon_id": "20539768",
    "name": "手车开关（分）",
    "font_class": "shouchekaiguanfen",
    "unicode": "\uE8EE",
    "unicode_decimal": 59630
  }, {
    "icon_id": "20539769",
    "name": "双绕组电压互感器",
    "font_class": "shuangraozudianyahuganqi",
    "unicode": "\uE8EF",
    "unicode_decimal": 59631
  }, {
    "icon_id": "20539771",
    "name": "双联杆（钢管杆）",
    "font_class": "shuangliangangangguangan",
    "unicode": "\uE8F1",
    "unicode_decimal": 59633
  }, {
    "icon_id": "20539772",
    "name": "双绕组变压器",
    "font_class": "shuangraozubianyaqi",
    "unicode": "\uE8F2",
    "unicode_decimal": 59634
  }, {
    "icon_id": "20539773",
    "name": "双绕组变压器（具有分接开关）",
    "font_class": "shuangraozubianyaqijuyoufenjiekaiguan",
    "unicode": "\uE8F3",
    "unicode_decimal": 59635
  }, {
    "icon_id": "20539774",
    "name": "上字型排列左bac",
    "font_class": "shangzixingpailiezuobac",
    "unicode": "\uE8F4",
    "unicode_decimal": 59636
  }, {
    "icon_id": "20539776",
    "name": "双绕组变压器（具有4个抽头星形-星形连接）",
    "font_class": "shuangraozubianyaqijuyou4gechoutouxingxing-xingxinglianjie",
    "unicode": "\uE8F6",
    "unicode_decimal": 59638
  }, {
    "icon_id": "20539777",
    "name": "上字型排列右cab",
    "font_class": "shangzixingpailieyoucab",
    "unicode": "\uE8F7",
    "unicode_decimal": 59639
  }, {
    "icon_id": "20539778",
    "name": "上字型排列左abc",
    "font_class": "shangzixingpailiezuoabc",
    "unicode": "\uE8F8",
    "unicode_decimal": 59640
  }, {
    "icon_id": "20539779",
    "name": "双绕组变压器（曲折形-星形）",
    "font_class": "shuangraozubianyaqiquzhexing-xingxing",
    "unicode": "\uE8F9",
    "unicode_decimal": 59641
  }, {
    "icon_id": "20539780",
    "name": "双绕组变压器（三星形-星形连接）",
    "font_class": "shuangraozubianyaqisanxingxing-xingxinglianjie",
    "unicode": "\uE8FA",
    "unicode_decimal": 59642
  }, {
    "icon_id": "20539781",
    "name": "上字型排列左bca",
    "font_class": "shangzixingpailiezuobca",
    "unicode": "\uE8FB",
    "unicode_decimal": 59643
  }, {
    "icon_id": "20539783",
    "name": "双绕组变压器YNd（中性点引出星形-三角形连接）2",
    "font_class": "shuangraozubianyaqiYNdzhongxingdianyinchuxingxing-sanjiaoxinglianjie2",
    "unicode": "\uE8FD",
    "unicode_decimal": 59645
  }, {
    "icon_id": "20539784",
    "name": "双绕组变压器（星形-星形连接）",
    "font_class": "shuangraozubianyaqixingxing-xingxinglianjie",
    "unicode": "\uE8FE",
    "unicode_decimal": 59646
  }, {
    "icon_id": "20539785",
    "name": "上字型排列左acb",
    "font_class": "shangzixingpailiezuoacb",
    "unicode": "\uE8FF",
    "unicode_decimal": 59647
  }, {
    "icon_id": "20539786",
    "name": "双绕组变压器Dyn（中性点引出三角形-星形连接）",
    "font_class": "shuangraozubianyaqiDynzhongxingdianyinchusanjiaoxing-xingxinglianjie",
    "unicode": "\uE900",
    "unicode_decimal": 59648
  }, {
    "icon_id": "20539787",
    "name": "手车开关（合）",
    "font_class": "shouchekaiguanhe",
    "unicode": "\uE901",
    "unicode_decimal": 59649
  }, {
    "icon_id": "20539788",
    "name": "双绕组变压器（绕组间有屏蔽）",
    "font_class": "shuangraozubianyaqiraozujianyoupingbi",
    "unicode": "\uE902",
    "unicode_decimal": 59650
  }, {
    "icon_id": "20539789",
    "name": "手车压变（带熔断器）",
    "font_class": "shoucheyabiandairongduanqi",
    "unicode": "\uE903",
    "unicode_decimal": 59651
  }, {
    "icon_id": "20539790",
    "name": "三相两个次级绕组电流互感器",
    "font_class": "sanxianglianggecijiraozudianliuhuganqi",
    "unicode": "\uE904",
    "unicode_decimal": 59652
  }, {
    "icon_id": "20539791",
    "name": "双联杆（木杆）",
    "font_class": "shuanglianganmugan",
    "unicode": "\uE905",
    "unicode_decimal": 59653
  }, {
    "icon_id": "20539792",
    "name": "双绕组变压器Yd（中性点引出星形-三角形连接）2",
    "font_class": "shuangraozubianyaqiYdzhongxingdianyinchuxingxing-sanjiaoxinglianjie2",
    "unicode": "\uE906",
    "unicode_decimal": 59654
  }]
};
// CONCATENATED MODULE: ./src/utils/topology/registerIconssetting.js





var customTools = [{
  group: '二极管',
  children: [{
    name: '发光二极管',
    icon: 'icon-faguangerjiguan',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE66C",
      name: 'faguangerjiguan',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '二极管',
    icon: 'icon-erjiguan',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE714",
      name: 'erjiguan',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '二极管1',
    icon: 'icon-erjiguan1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uEAB5",
      name: 'erjiguan1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }]
}, {
  group: '开关',
  children: [{
    name: '开关',
    icon: 'icon-kaiguan',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE64E",
      name: 'kaiguan',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }]
}, {
  group: '电感',
  children: [{
    name: '电感',
    icon: 'icon-diangan',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE613",
      name: 'diangan',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电感器',
    icon: 'icon-dianganqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE662",
      name: 'dianganqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '半电感器',
    icon: 'icon-bandianganqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE706",
      name: 'bandianganqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电感器1',
    icon: 'icon-dianganqi1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE70E",
      name: 'dianganqi1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电容电感电抗-电感',
    icon: 'icon-dianrongdiangandiankang-diangan-',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6FE",
      name: 'dianrongdiangandiankangdiangan',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电力_电力电感器',
    icon: 'icon-dianli_dianlidianganqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE61E",
      name: 'dianli_dianlidianganqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '三相变压器（电感矩阵型）',
    icon: 'icon-sanxiangbianyaqidianganjuzhenxing',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE7A4",
      name: 'sanxiangbianyaqidianganjuzhenxing',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电感器',
    icon: 'icon-dianganqi2',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE66A",
      name: 'dianganqi2',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '铁芯电感器',
    icon: 'icon-tiexindianganqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE66B",
      name: 'tiexindianganqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电力电感器',
    icon: 'icon-dianlidianganqi1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE830",
      name: 'dianlidianganqi1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }]
}, {
  group: '电容',
  children: [{
    name: '正能量电容器',
    icon: 'icon-dianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE60A",
      name: 'dianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电解电容器',
    icon: 'icon-dianjiedianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6E9",
      name: 'dianjiedianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '调谐可变电容器',
    icon: 'icon-tiaoxiekebiandianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6EB",
      name: 'tiaoxiekebiandianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电容器6',
    icon: 'icon-dianrongqi1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6EC",
      name: 'dianrongqi1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '多联电容器',
    icon: 'icon-duoliandianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6ED",
      name: 'duoliandianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电容器3',
    icon: 'icon-dianrongqi2',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6EA",
      name: 'dianrongqi2',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '联动电容器',
    icon: 'icon-liandongdianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6EE",
      name: 'liandongdianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '多电解电容器',
    icon: 'icon-duodianjiedianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6EF",
      name: 'duodianjiedianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '微调可变电容器2',
    icon: 'icon-weitiaokebiandianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6F0",
      name: 'weitiaokebiandianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电解电容器',
    icon: 'icon-dianjiedianrongqi1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6FA",
      name: 'dianjiedianrongqi1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '微调可变电容器1',
    icon: 'icon-weitiaokebiandianrongqi1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE701",
      name: 'weitiaokebiandianrongqi1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电容',
    icon: 'icon-dianrong1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE600",
      name: 'dianrong1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '拓扑图副本_可调电容器',
    icon: 'icon-tuoputufuben_ketiaodianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uEAAE",
      name: 'tuoputufuben_ketiaodianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '拓扑图副本_预调电容器',
    icon: 'icon-tuoputufuben_yutiaodianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uEAB2",
      name: 'tuoputufuben_yutiaodianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电容器',
    icon: 'icon-dianrongqi3',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE669",
      name: 'dianrongqi3',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '极性电容器',
    icon: 'icon-jixingdianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uEAB5",
      name: 'jixingdianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '柱上电容器',
    icon: 'icon-zhushangdianrongqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE865",
      name: 'zhushangdianrongqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }]
}, {
  group: '电阻',
  children: [{
    name: '记忆电阻',
    icon: 'icon-jiyidianzu',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6EC",
      name: 'jiyidianzu',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电阻分流器',
    icon: 'icon-dianzufenliuqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6ED",
      name: 'dianzufenliuqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电阻（非线性的）',
    icon: 'icon-dianzufeixianxingde',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6EE",
      name: 'dianzufeixianxingde',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '磁动电阻',
    icon: 'icon-cidongdianzu1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6FB",
      name: 'cidongdianzu1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电阻',
    icon: 'icon-dianzu',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6FD",
      name: 'dianzu',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电阻（分接的）',
    icon: 'icon-dianzufenjiede',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6FE",
      name: 'dianzufenjiede',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '可变电阻',
    icon: 'icon-kebiandianzu',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE701",
      name: 'kebiandianzu',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '预设电阻',
    icon: 'icon-yushedianzu',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE702",
      name: 'yushedianzu',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电阻',
    icon: 'icon-dianzu1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uEAB5",
      name: 'dianzu1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '可调电阻',
    icon: 'icon-ketiaodianzu',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uEAB7",
      name: 'ketiaodianzu',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电阻',
    icon: 'icon-dianzu2',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE600",
      name: 'dianzu2',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '可变电阻',
    icon: 'icon-kebiandianzu1',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE670",
      name: 'kebiandianzu1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电力电阻器',
    icon: 'icon-dianlidianzuqi',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE7F6",
      name: 'dianlidianzuqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电阻箱',
    icon: 'icon-dianzuxiang',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE66A",
      name: 'dianzuxiang',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '磁动电阻',
    icon: 'icon-cidongdianzu',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6DD",
      name: 'cidongdianzu',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '电阻（可调触点）',
    icon: 'icon-dianzuketiaochudian',
    data: {
      rect: {
        width: 100,
        height: 100
      },
      icon: "\uE6EB",
      name: 'dianzuketiaochudian',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }]
}, {
  group: '刀闸',
  children: [{
    name: '刀闸',
    icon: 'icon-dianli_daozha',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE61E",
      name: 'dianli_daozha',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '二工位隔离刀闸',
    icon: 'icon-ergongweigelidaozhae515d0c0-3621-4e33-bb52-a0d8f3a5a099',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE607",
      name: 'ergongweigelidaozhae515d0c0-3621-4e33-bb52-a0d8f3a5a099',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '二工位接地刀闸',
    icon: 'icon-ergongweijiedidaozha1b3e3338-6c57-4471-82dd-1be7fa42db41',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE606",
      name: 'ergongweijiedidaozha1b3e3338-6c57-4471-82dd-1be7fa42db41',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '手车刀闸（分）',
    icon: 'icon-shouchedaozhafen',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE7D6",
      name: 'shouchedaozhafen',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '手车刀闸（合）',
    icon: 'icon-shouchedaozhahe',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE84F",
      name: 'shouchedaozhahe',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }]
}, {
  group: '接地',
  children: [{
    name: '接地刀闸 （分）',
    icon: 'icon-jddz_f',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE665",
      name: 'jddz_f',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地刀闸 （合）',
    icon: 'icon-jddz_h',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE666",
      name: 'jddz_h',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地线',
    icon: 'icon-jiedixian',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE647",
      name: 'jiedixian',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '附属设备-接地刀',
    icon: 'icon-fushushebei-jiedidao',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE62D",
      name: 'fushushebei-jiedidao',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '附属设备-接地刀',
    icon: 'icon-fushushebei-jiedidao1',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE643",
      name: 'fushushebei-jiedidao1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '附属设备-接地刀',
    icon: 'icon-peidian_jiedi',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uECE8",
      name: 'peidian_jiedi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地间隙',
    icon: 'icon-jiedijianxi',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE6F1",
      name: 'jiedijianxi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地',
    icon: 'icon-jiedi',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE648",
      name: 'jiedi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地保护',
    icon: 'icon-jiedibaohu1',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE64A",
      name: 'jiedibaohu1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地刀闸 （分）',
    icon: 'icon-jiedidaozhafen',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE608",
      name: 'jiedidaozhafen',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地刀闸（分）1',
    icon: 'icon-jiedidaozhafen1',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE7C7",
      name: 'jiedidaozhafen1',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地避雷器',
    icon: 'icon-jiedibileiqi',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE800",
      name: 'jiedibileiqi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '三工位开关（接地）',
    icon: 'icon-sangongweikaiguanjiedi',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE7D1",
      name: 'sangongweikaiguanjiedi',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '三工位开关（接地）',
    icon: 'icon-jiedibianyaqiquzhexinglianjie',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE801",
      name: 'jiedibianyaqiquzhexinglianjie',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '接地开关',
    icon: 'icon-jiedikaiguan',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE604",
      name: 'jiedikaiguan',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }]
}, {
  group: '熔断器和断路器',
  children: [{
    name: '断路器',
    icon: 'icon-duanluqi4',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE60E",
      name: 'duanluqi4',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }, {
    name: '断路器',
    icon: 'icon-duanluqi5',
    data: {
      rect: {
        width: 90,
        height: 90
      },
      icon: "\uE61F",
      name: 'duanluqi5',
      iconFamily: 'iconfont',
      iconColor: "#ff1e02"
    }
  }]
}];
function getEESymbols(data) {
  var datas = [];
  var pa = {};
  pa.group = data.name;
  var children = [];

  var _iterator = _createForOfIteratorHelper(data.glyphs),
      _step;

  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var i = _step.value;
      var params = {};
      params.name = i.name;
      params.icon = data.font_family + " " + data.css_prefix_text + i.font_class;
      params.data = {
        rect: {
          width: 100,
          height: 100
        },
        icon: i.unicode,
        name: i.name,
        iconFamily: data.font_family,
        iconColor: "#ff1e02"
      };
      children.push(params);
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }

  pa.children = children;
  datas.push(pa);
  return datas;
}
function getDatas() {
  // .concat(customTools)
  return getEESymbols(eesymbols_data).concat(getEESymbols(data2));
}
var ces = [{
  group: '测试1',
  children: [{
    name: '测试2',
    icon: 't-icon t-dashboard-chart',
    svg: "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"25\" height=\"25\"><defs>\n        <style type=\"text/css\">\n          @font-face {\n            font-family: 'topology';\n            src: url('http://at.alicdn.com/t/font_1331132_h688rvffmbc.ttf?t=1569311680797') format('truetype');\n          }\n        </style>\n      </defs><g><path fill=\"none\" stroke=\"#000000\" paint-order=\"fill stroke markers\" d=\" M 25 12.5 A 12.5 12.5 0 1 1 24.99999375000052 12.487500002083326\" stroke-miterlimit=\"10\" stroke-dasharray=\"\"/><path fill=\"none\" stroke=\"#000000\" paint-order=\"fill stroke markers\" d=\" M 6.25 14.5 L 6.25 10.5 L 18.75 10.5 L 18.75 14.5 Z\" stroke-miterlimit=\"10\" stroke-dasharray=\"\"/><path fill=\"none\" stroke=\"#000000\" paint-order=\"fill stroke markers\" d=\"\" stroke-miterlimit=\"10\" stroke-dasharray=\"\"/></g></svg>",
    data: {
      "rotatedAnchors": [{
        "x": 222,
        "y": 334,
        "direction": 0
      }, {
        "x": 332,
        "y": 334,
        "direction": 2
      }],
      "animateDuration": 0,
      "animateFrames": [],
      "animateFrame": 0,
      "name": "electrical.resistors.Attenuator",
      "tags": [],
      "visible": true,
      "rect": {
        "x": 222,
        "y": 301,
        "width": 110.00000000000001,
        "height": 66,
        "center": {
          "x": 277,
          "y": 334
        },
        "ex": 332,
        "ey": 367
      },
      "fontColor": "#222222",
      "fontFamily": "\"Hiragino Sans GB\", \"Microsoft YaHei\", \"Helvetica Neue\", Helvetica, Arial",
      "fontSize": 13.200000000000001,
      "lineHeight": 1.5,
      "fontStyle": "normal",
      "fontWeight": "normal",
      "textAlign": "center",
      "textBaseline": "middle",
      "textBackground": "",
      "animateCycleIndex": 0,
      "events": [],
      "dash": 0,
      "lineDashOffset": 0,
      "lineWidth": 1,
      "strokeStyle": "#222222",
      "fillStyle": "",
      "globalAlpha": 1,
      "rotate": 0,
      "offsetRotate": 0,
      "textMaxLine": 0,
      "textOffsetX": 0,
      "textOffsetY": 0,
      "animatePos": 0,
      "id": "fde6c15",
      "zRotate": 0,
      "borderRadius": 0,
      "imageAlign": "center",
      "gradientAngle": 0,
      "gradientRadius": 0.01,
      "paddingTop": 0,
      "paddingBottom": 0,
      "paddingLeft": 0,
      "paddingRight": 0,
      "children": [],
      "TID": "03c68c0",
      "type": 0,
      "animateType": "",
      "paddingLeftNum": 0,
      "paddingRightNum": 0,
      "paddingTopNum": 0,
      "paddingBottomNum": 0,
      "textRect": {
        "x": 222,
        "y": 350.5,
        "width": 110.00000000000001,
        "height": 16.5,
        "center": {
          "x": 277,
          "y": 358.75
        },
        "ex": 332,
        "ey": 367
      },
      "fullTextRect": {
        "x": 222,
        "y": 301,
        "width": 110.00000000000001,
        "height": 66,
        "center": {
          "x": 277,
          "y": 334
        },
        "ex": 332,
        "ey": 367
      },
      "iconRect": {
        "x": 222,
        "y": 301,
        "width": 110.00000000000001,
        "height": 49.5,
        "center": {
          "x": 277,
          "y": 325.75
        },
        "ex": 332,
        "ey": 350.5
      },
      "fullIconRect": {
        "x": 222,
        "y": 301,
        "width": 110.00000000000001,
        "height": 66,
        "center": {
          "x": 277,
          "y": 334
        },
        "ex": 332,
        "ey": 367
      },
      "elementRendered": false,
      "animateReady": {
        "imageRatio": true,
        "points": [],
        "anchors": [{
          "x": 216.5,
          "y": 334,
          "direction": 0
        }, {
          "x": 337.5,
          "y": 334,
          "direction": 2
        }],
        "manualAnchors": [],
        "rotatedAnchors": [{
          "x": 216.5,
          "y": 334,
          "direction": 0
        }, {
          "x": 337.5,
          "y": 334,
          "direction": 2
        }],
        "animateDuration": 0,
        "animateFrame": 0,
        "name": "electrical.resistors.Attenuator",
        "tags": [],
        "visible": true,
        "rect": {
          "x": 216.5,
          "y": 297.7,
          "width": 121.00000000000003,
          "height": 72.60000000000001,
          "center": {
            "x": 277,
            "y": 334
          },
          "ex": 337.5,
          "ey": 370.3
        },
        "fontColor": "#222222",
        "fontFamily": "\"Hiragino Sans GB\", \"Microsoft YaHei\", \"Helvetica Neue\", Helvetica, Arial",
        "fontSize": 14.520000000000003,
        "lineHeight": 1.5,
        "fontStyle": "normal",
        "fontWeight": "normal",
        "textAlign": "center",
        "textBaseline": "middle",
        "textBackground": "",
        "animateCycleIndex": 0,
        "dash": 0,
        "lineDashOffset": 0,
        "lineWidth": 1,
        "strokeStyle": "#222222",
        "fillStyle": "",
        "globalAlpha": 1,
        "rotate": 0,
        "offsetRotate": 0,
        "textMaxLine": 0,
        "textOffsetX": 0,
        "textOffsetY": 0,
        "animatePos": 0,
        "id": "fde6c15",
        "zRotate": 0,
        "borderRadius": 0,
        "imageAlign": "center",
        "gradientAngle": 0,
        "gradientRadius": 0.01,
        "paddingTop": 0,
        "paddingBottom": 0,
        "paddingLeft": 0,
        "paddingRight": 0,
        "children": [],
        "TID": "03c68c0",
        "type": 0,
        "animateType": "",
        "paddingLeftNum": 0,
        "paddingRightNum": 0,
        "paddingTopNum": 0,
        "paddingBottomNum": 0,
        "textRect": {
          "x": 216.5,
          "y": 352.15,
          "width": 121.00000000000003,
          "height": 18.150000000000002,
          "center": {
            "x": 277,
            "y": 361.22499999999997
          },
          "ex": 337.5,
          "ey": 370.29999999999995
        },
        "fullTextRect": {
          "x": 216.5,
          "y": 297.7,
          "width": 121.00000000000003,
          "height": 72.60000000000001,
          "center": {
            "x": 277,
            "y": 334
          },
          "ex": 337.5,
          "ey": 370.3
        },
        "iconRect": {
          "x": 216.5,
          "y": 297.7,
          "width": 121.00000000000003,
          "height": 54.45,
          "center": {
            "x": 277,
            "y": 324.925
          },
          "ex": 337.5,
          "ey": 352.15
        },
        "fullIconRect": {
          "x": 216.5,
          "y": 297.7,
          "width": 121.00000000000003,
          "height": 72.60000000000001,
          "center": {
            "x": 277,
            "y": 334
          },
          "ex": 337.5,
          "ey": 370.3
        },
        "oldRect": {
          "x": 222,
          "y": 301,
          "width": 110.00000000000001,
          "height": 66,
          "center": {
            "x": 277,
            "y": 334
          },
          "ex": 332,
          "ey": 367
        },
        "z": null,
        "lastImage": null,
        "iconSize": null,
        "elementRendered": false
      },
      "oldRect": {
        "x": 227,
        "y": 304,
        "width": 100,
        "height": 60,
        "center": {
          "x": 277,
          "y": 334
        },
        "ex": 327,
        "ey": 364
      },
      "z": null,
      "lastImage": null,
      "iconSize": null,
      "tmp": null,
      "bkType": 0
    }
  }]
}];
// EXTERNAL MODULE: ./node_modules/file-saver/dist/FileSaver.min.js
var FileSaver_min = __webpack_require__("21a6");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/SpaceView.vue?vue&type=template&id=57e3469c&
var SpaceViewvue_type_template_id_57e3469c_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('a-tabs',{attrs:{"default-active-key":"1","size":"small"}},[_c('a-tab-pane',{key:"1",attrs:{"tab":"图片设置"}},[_c('div',{staticClass:"div-scoll"},[_c('a-form',{attrs:{"label-position":'right',"label-width":"80px"}},[_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{attrs:{"span":23}},[_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"图文名称"}},[_c('a-input',{attrs:{"placeholder":"请输图文名称"},on:{"change":_vm.changeData},model:{value:(_vm.canvasData.name),callback:function ($$v) {_vm.$set(_vm.canvasData, "name", $$v)},expression:"canvasData.name"}})],1)],1),_c('a-col',{attrs:{"span":23}},[_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"背景颜色"}},[_c('el-color-picker',{staticStyle:{"width":"100%"},on:{"change":_vm.changeData},model:{value:(_vm.canvasData.bkColor),callback:function ($$v) {_vm.$set(_vm.canvasData, "bkColor", $$v)},expression:"canvasData.bkColor"}})],1)],1),_c('a-col',{attrs:{"span":23}},[_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"背景网格"}},[_c('a-switch',{on:{"change":_vm.changeData},model:{value:(_vm.canvasData.grid),callback:function ($$v) {_vm.$set(_vm.canvasData, "grid", $$v)},expression:"canvasData.grid"}})],1)],1),_c('a-col',{attrs:{"span":23}},[_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"网格颜色"}},[_c('el-color-picker',{staticStyle:{"width":"100%"},on:{"change":_vm.changeData},model:{value:(_vm.canvasData.gridColor),callback:function ($$v) {_vm.$set(_vm.canvasData, "gridColor", $$v)},expression:"canvasData.gridColor"}})],1)],1),_c('a-col',{attrs:{"span":23}},[_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"网格大小"}},[_c('a-input',{on:{"input":_vm.changeData},model:{value:(_vm.canvasData.gridSize),callback:function ($$v) {_vm.$set(_vm.canvasData, "gridSize", $$v)},expression:"canvasData.gridSize"}})],1)],1),_c('a-col',{attrs:{"span":23}},[_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"标尺"}},[_c('a-switch',{on:{"change":_vm.changeData},model:{value:(_vm.canvasData.rule),callback:function ($$v) {_vm.$set(_vm.canvasData, "rule", $$v)},expression:"canvasData.rule"}})],1)],1),_c('a-col',{attrs:{"span":23}},[_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"标尺颜色"}},[_c('el-color-picker',{staticStyle:{"width":"100%"},on:{"change":_vm.changeData},model:{value:(_vm.canvasData.ruleColor),callback:function ($$v) {_vm.$set(_vm.canvasData, "ruleColor", $$v)},expression:"canvasData.ruleColor"}})],1)],1)],1),_c('a-divider'),_c('div',{staticClass:"abs",staticStyle:{"bottom":"0.1rem","text-align":"left"},attrs:{"_ngcontent-noe-c49":""}},[_c('ul',{staticClass:"ml30 mv10"},[_c('li',[_vm._v("← ↑ → ↓ ：移动5个像素")]),_c('li',[_vm._v("Ctrl + 鼠标点击：多选")]),_c('li',[_vm._v("Ctrl + 鼠标滚轮：缩放画布")]),_c('li',[_vm._v("Ctrl + ← ↑ → ↓ ：移动1个像素")]),_c('li',[_vm._v("Ctrl + 鼠标拖拽空白：移动整个画布")]),_c('li',[_vm._v("Shift/Alt + 鼠标拖拽节点：独立拖拽（子）节点")]),_c('li',[_vm._v("Ctrl + Shift + Alt +鼠标点击：添加锚点")]),_c('li',[_vm._v("鼠标移动到锚点上 Ctrl + Del：删除锚点")])])])],1)],1)]),_c('a-tab-pane',{key:"2",attrs:{"tab":"消息通信"}},[_c('div',{staticStyle:{"width":"100%","height":"86vh","overflow-y":"scroll"}},[_c('a-row',[_c('div',{staticStyle:{"text-align":"left","margin":"5px 3%"}},[_vm._v("Websocket地址")]),_c('a-divider'),_c('div',{staticStyle:{"text-align":"left","margin":"5px"}},[_c('a-input',{on:{"change":_vm.changeData},model:{value:(_vm.canvasData.websocket),callback:function ($$v) {_vm.$set(_vm.canvasData, "websocket", $$v)},expression:"canvasData.websocket"}})],1)],1),_c('a-row',[_c('div',{staticStyle:{"margin":"1vh 0"}},[_c('div',{staticStyle:{"text-align":"left","margin":"5px 3%"}},[_vm._v("MQTT地址")]),_c('a-divider'),_c('div',[_c('a-form',{attrs:{"label-position":'right',"label-width":"80px"}},[_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"URL地址"}},[_c('a-input',{attrs:{"placeholder":"请输入url地址"},model:{value:(_vm.form.mqttUrl),callback:function ($$v) {_vm.$set(_vm.form, "mqttUrl", $$v)},expression:"form.mqttUrl"}})],1),_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"Client ID"}},[_c('a-input',{attrs:{"placeholder":"请输入Client ID"},model:{value:(_vm.mqttOptions.clientId),callback:function ($$v) {_vm.$set(_vm.mqttOptions, "clientId", $$v)},expression:"mqttOptions.clientId"}})],1),_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"用户名"}},[_c('a-input',{attrs:{"placeholder":"请输入用户名"},model:{value:(_vm.mqttOptions.username),callback:function ($$v) {_vm.$set(_vm.mqttOptions, "username", $$v)},expression:"mqttOptions.username"}})],1),_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"密码"}},[_c('a-input',{attrs:{"placeholder":"请输入密码"},model:{value:(_vm.mqttOptions.password),callback:function ($$v) {_vm.$set(_vm.mqttOptions, "password", $$v)},expression:"mqttOptions.password"}})],1),_c('a-form-item',{attrs:{"label-col":_vm.formItemLayout.labelCol,"wrapper-col":_vm.formItemLayout.wrapperCol,"label":"Topics"}},[_c('a-input',{attrs:{"placeholder":"请输入Topics"},model:{value:(_vm.form.mqttTopics),callback:function ($$v) {_vm.$set(_vm.form, "mqttTopics", $$v)},expression:"form.mqttTopics"}})],1),_c('a-form-item',{attrs:{"wrapper-col":{ span: 12, offset: 6 }}},[_c('a-button',{attrs:{"type":"primary","block":""},on:{"click":_vm.handleSubmit}},[_vm._v("连接 ")])],1)],1)],1)],1)]),_c('a-row',[_c('div',{staticStyle:{"margin":"1vh 0"}},[_c('div',{staticStyle:{"text-align":"left","margin":"5px 3%"}},[_vm._v(" 消息处理JavaScript ")]),_c('a-divider'),_c('div',{staticStyle:{"margin-left":"5%","margin-right":"5%"}},[_c('a-form',[_c('a-form-item',[_c('a-input',{attrs:{"type":"textarea","rows":"10"},on:{"change":_vm.changeData},model:{value:(_vm.canvasData.socketFn),callback:function ($$v) {_vm.$set(_vm.canvasData, "socketFn", $$v)},expression:"canvasData.socketFn"}})],1)],1)],1)],1)])],1)])],1)],1)}
var SpaceViewvue_type_template_id_57e3469c_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/SpaceView.vue?vue&type=template&id=57e3469c&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
var es_object_assign = __webpack_require__("cca6");

// EXTERNAL MODULE: ./node_modules/lodash.pick/index.js
var lodash_pick = __webpack_require__("88bc");
var lodash_pick_default = /*#__PURE__*/__webpack_require__.n(lodash_pick);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/color/InputColor.vue?vue&type=template&id=3880365b&
var InputColorvue_type_template_id_3880365b_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.bkColor),expression:"bkColor"}],staticStyle:{"background":"hsl(0deg 0% 0% / 0%)","border":"0px","width":"30px","height":"30px"},attrs:{"type":"color"},domProps:{"value":(_vm.bkColor)},on:{"input":function($event){if($event.target.composing){ return; }_vm.bkColor=$event.target.value}}})}
var InputColorvue_type_template_id_3880365b_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/color/InputColor.vue?vue&type=template&id=3880365b&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/color/InputColor.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var InputColorvue_type_script_lang_js_ = ({
  props: {
    bkColor: {
      type: String,
      require: true
    }
  },
  data: function data() {
    return {};
  }
});
// CONCATENATED MODULE: ./src/components/topology/color/InputColor.vue?vue&type=script&lang=js&
 /* harmony default export */ var color_InputColorvue_type_script_lang_js_ = (InputColorvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
        injectStyles.call(
          this,
          (options.functional ? this.parent : this).$root.$options.shadowRoot
        )
      }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}

// CONCATENATED MODULE: ./src/components/topology/color/InputColor.vue





/* normalize component */

var component = normalizeComponent(
  color_InputColorvue_type_script_lang_js_,
  InputColorvue_type_template_id_3880365b_render,
  InputColorvue_type_template_id_3880365b_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var InputColor = (component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/SpaceView.vue?vue&type=script&lang=js&


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


var formItemLayout = {
  labelCol: {
    span: 8
  },
  wrapperCol: {
    span: 15
  }
};
/* harmony default export */ var SpaceViewvue_type_script_lang_js_ = ({
  props: {
    canvas: {
      type: Object,
      require: true
    }
  },
  components: {
    InputColor: InputColor
  },
  watch: {
    canvas: {
      handler: function handler(n, o) {
        if (!!n) {
          if (n.mqttOptions) {
            if (n.mqttOptions.clientId) {
              this.mqttOptions.clientId = n.mqttOptions.clientId;
            }

            if (n.mqttOptions.username) {
              this.mqttOptions.username = n.mqttOptions.username;
            }

            if (n.mqttOptions.password) {
              this.mqttOptions.password = n.mqttOptions.password;
            }
          }

          this.canvasData = lodash_pick_default()(Object.assign({}, n), "name", "bkColor", "grid", "gridColor", "gridSize", "rule", "ruleColor", "websocket", "mqttUrl", "mqttTopics", "socketFn");
        }
      },
      immediate: true,
      deep: true
    },
    bkColor: {
      handler: function handler(n, o) {
        this.canvasData.bkColor = n;
        this.changeData(n);
      },
      deep: true
    },
    gridColor: {
      handler: function handler(n, o) {
        this.canvasData.gridColor = n;
        this.changeData(n);
      },
      deep: true
    },
    ruleColor: {
      handler: function handler(n, o) {
        this.canvasData.ruleColor = n;
        this.changeData(n);
      },
      deep: true
    }
  },
  data: function data() {
    return {
      formItemLayout: formItemLayout,
      canvasData: {
        name: "",
        bkColor: "",
        grid: false,
        gridColor: "",
        gridSize: 0,
        rule: false,
        ruleColor: "",
        websocket: "",
        mqttUrl: "",
        mqttTopics: "",
        socketEvent: true,
        socketFn: ""
      },
      form: {
        mqttUrl: "",
        mqttTopics: ""
      },
      mqttOptions: {
        clientId: "",
        username: "",
        password: ""
      },
      bkColor: "#000",
      gridColor: "#000",
      ruleColor: "#000"
    };
  },
  methods: {
    handleSubmit: function handleSubmit(e) {
      if (!this.form.mqttUrl) {
        this.$message.warning("请填写mqttURL");
        return;
      }

      if (!this.form.mqttTopics) {
        this.$message.warning("请填写Topics");
        return;
      }

      this.canvasData.mqttUrl = this.form.mqttUrl;
      this.canvasData.mqttTopics = this.form.mqttTopics;
      this.changeData("");
    },
    changeData: function changeData(val) {
      var params = Object.assign({}, this.canvas);
      params.name = this.canvasData.name;
      params.bkColor = this.canvasData.bkColor;
      params.grid = this.canvasData.grid;
      params.gridColor = this.canvasData.gridColor;
      params.gridSize = this.canvasData.gridSize;
      params.rule = this.canvasData.rule;
      params.ruleColor = this.canvasData.ruleColor;
      params.websocket = this.canvasData.websocket;
      params.mqttUrl = this.canvasData.mqttUrl;
      params.mqttTopics = this.canvasData.mqttTopics;
      params.mqttOptions = this.mqttOptions;
      params.socketEvent = this.canvasData.socketEvent;
      params.socketFn = this.canvasData.socketFn;
      this.$emit("ok", params);
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/SpaceView.vue?vue&type=script&lang=js&
 /* harmony default export */ var topology_SpaceViewvue_type_script_lang_js_ = (SpaceViewvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/components/topology/SpaceView.vue?vue&type=style&index=0&lang=scss&
var SpaceViewvue_type_style_index_0_lang_scss_ = __webpack_require__("09c9");

// CONCATENATED MODULE: ./src/components/topology/SpaceView.vue






/* normalize component */

var SpaceView_component = normalizeComponent(
  topology_SpaceViewvue_type_script_lang_js_,
  SpaceViewvue_type_template_id_57e3469c_render,
  SpaceViewvue_type_template_id_57e3469c_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var SpaceView = (SpaceView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/NodeView.vue?vue&type=template&id=084bf28a&
var NodeViewvue_type_template_id_084bf28a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('a-tabs',{attrs:{"default-active-key":"1"}},[_c('a-tab-pane',{key:"1",attrs:{"tab":"外观"}},[_c('div',{staticClass:"div-scoll"},[_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"位置和大小"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-row',{staticStyle:{"margin-left":"0px","margin-right":"0px"},attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"X (px)"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.rect.x),callback:function ($$v) {_vm.$set(_vm.node.rect, "x", $$v)},expression:"node.rect.x"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"Y (px)"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.rect.y),callback:function ($$v) {_vm.$set(_vm.node.rect, "y", $$v)},expression:"node.rect.y"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"宽 (px)"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.rect.width),callback:function ($$v) {_vm.$set(_vm.node.rect, "width", $$v)},expression:"node.rect.width"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"高 (px)"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.rect.height),callback:function ($$v) {_vm.$set(_vm.node.rect, "height", $$v)},expression:"node.rect.height"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"圆角"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.borderRadius),callback:function ($$v) {_vm.$set(_vm.node, "borderRadius", _vm._n($$v))},expression:"node.borderRadius"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"旋转 °"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.rotate),callback:function ($$v) {_vm.$set(_vm.node, "rotate", _vm._n($$v))},expression:"node.rotate"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"内边距-左"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.paddingLeft),callback:function ($$v) {_vm.$set(_vm.node, "paddingLeft", _vm._n($$v))},expression:"node.paddingLeft"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"内边距-右"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.paddingRight),callback:function ($$v) {_vm.$set(_vm.node, "paddingRight", _vm._n($$v))},expression:"node.paddingRight"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"内边距-上"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.paddingTop),callback:function ($$v) {_vm.$set(_vm.node, "paddingTop", _vm._n($$v))},expression:"node.paddingTop"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"内边距-下"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.paddingBottom),callback:function ($$v) {_vm.$set(_vm.node, "paddingBottom", _vm._n($$v))},expression:"node.paddingBottom"}})],1)],1)],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"样式"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-row',{staticStyle:{"margin-left":"0px","margin-right":"0px"},attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"线条"}},[_c('a-select',{on:{"change":_vm.updateNode},model:{value:(_vm.node.dash),callback:function ($$v) {_vm.$set(_vm.node, "dash", $$v)},expression:"node.dash"}},_vm._l((_vm.lineOther),function(item){return _c('a-select-option',{key:item.type,attrs:{"value":item.type}},[_c('i',{class:("" + (item.name)),staticStyle:{"font-size":"7vh"}})])}),1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"线条颜色"}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.strokeStyle),callback:function ($$v) {_vm.$set(_vm.node, "strokeStyle", $$v)},expression:"node.strokeStyle"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"线条宽度 (px)"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.lineWidth),callback:function ($$v) {_vm.$set(_vm.node, "lineWidth", _vm._n($$v))},expression:"node.lineWidth"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"背景"}},[_c('a-select',{on:{"change":_vm.updateNode},model:{value:(_vm.node.bkType),callback:function ($$v) {_vm.$set(_vm.node, "bkType", $$v)},expression:"node.bkType"}},[_c('a-select-option',{attrs:{"value":0}},[_vm._v("纯色背景")]),_c('a-select-option',{attrs:{"value":1}},[_vm._v("线性渐变")]),_c('a-select-option',{attrs:{"value":2}},[_vm._v("径向渐变")])],1)],1)],1),(_vm.node.bkType === 0)?_c('div',[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"背景颜色"}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.fillStyle),callback:function ($$v) {_vm.$set(_vm.node, "fillStyle", $$v)},expression:"node.fillStyle"}})],1)],1)],1):_vm._e(),(_vm.node.bkType === 1)?_c('div',[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"开始颜色"}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.gradientFromColor),callback:function ($$v) {_vm.$set(_vm.node, "gradientFromColor", $$v)},expression:"node.gradientFromColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"结束颜色"}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.gradientToColor),callback:function ($$v) {_vm.$set(_vm.node, "gradientToColor", $$v)},expression:"node.gradientToColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"角度"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.gradientAngle),callback:function ($$v) {_vm.$set(_vm.node, "gradientAngle", _vm._n($$v))},expression:"node.gradientAngle"}})],1)],1)],1):_vm._e(),(_vm.node.bkType === 2)?_c('div',[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"开始颜色"}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.gradientFromColor),callback:function ($$v) {_vm.$set(_vm.node, "gradientFromColor", $$v)},expression:"node.gradientFromColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"结束颜色"}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.gradientToColor),callback:function ($$v) {_vm.$set(_vm.node, "gradientToColor", $$v)},expression:"node.gradientToColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"半径"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.gradientRadius),callback:function ($$v) {_vm.$set(_vm.node, "gradientRadius", _vm._n($$v))},expression:"node.gradientRadius"}})],1)],1)],1):_vm._e(),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"透明度(0 - 1)"}},[_c('a-input-number',{staticStyle:{"width":"100%"},on:{"change":_vm.updateNode},model:{value:(_vm.node.globalAlpha),callback:function ($$v) {_vm.$set(_vm.node, "globalAlpha", _vm._n($$v))},expression:"node.globalAlpha"}})],1)],1)],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"文字"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-row',{staticStyle:{"margin-left":"0px","margin-right":"0px"},attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"大小"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.fontSize),callback:function ($$v) {_vm.$set(_vm.node, "fontSize", _vm._n($$v))},expression:"node.fontSize"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"倾斜"}},[_c('a-select',{on:{"change":_vm.updateNode},model:{value:(_vm.node.fontStyle),callback:function ($$v) {_vm.$set(_vm.node, "fontStyle", $$v)},expression:"node.fontStyle"}},[_c('a-select-option',{attrs:{"value":'normal'}},[_vm._v("正常")]),_c('a-select-option',{attrs:{"value":'italic'}},[_vm._v("倾斜")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"颜色"}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.fontColor),callback:function ($$v) {_vm.$set(_vm.node, "fontColor", $$v)},expression:"node.fontColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"背景"}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.textBackground),callback:function ($$v) {_vm.$set(_vm.node, "textBackground", $$v)},expression:"node.textBackground"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"加粗"}},[_c('a-select',{on:{"change":_vm.updateNode},model:{value:(_vm.node.fontWeight),callback:function ($$v) {_vm.$set(_vm.node, "fontWeight", $$v)},expression:"node.fontWeight"}},[_c('a-select-option',{attrs:{"value":'normal'}},[_vm._v("正常")]),_c('a-select-option',{attrs:{"value":'bold'}},[_vm._v("加粗")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"水平对齐"}},[_c('a-select',{on:{"change":_vm.updateNode},model:{value:(_vm.node.textAlign),callback:function ($$v) {_vm.$set(_vm.node, "textAlign", $$v)},expression:"node.textAlign"}},[_c('a-select-option',{attrs:{"value":'left'}},[_vm._v("左对齐")]),_c('a-select-option',{attrs:{"value":'center'}},[_vm._v("居中")]),_c('a-select-option',{attrs:{"value":'right'}},[_vm._v("右对齐")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"垂直对齐"}},[_c('a-select',{on:{"change":_vm.updateNode},model:{value:(_vm.node.textBaseline),callback:function ($$v) {_vm.$set(_vm.node, "textBaseline", $$v)},expression:"node.textBaseline"}},[_c('a-select-option',{attrs:{"value":'top'}},[_vm._v("顶部对齐")]),_c('a-select-option',{attrs:{"value":'middle'}},[_vm._v("居中")]),_c('a-select-option',{attrs:{"value":'bottom'}},[_vm._v("底部对齐")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"行高"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.lineHeight),callback:function ($$v) {_vm.$set(_vm.node, "lineHeight", _vm._n($$v))},expression:"node.lineHeight"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"最大行数"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.textMaxLine),callback:function ($$v) {_vm.$set(_vm.node, "textMaxLine", _vm._n($$v))},expression:"node.textMaxLine"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"水平偏移（px）"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.textOffsetX),callback:function ($$v) {_vm.$set(_vm.node, "textOffsetX", _vm._n($$v))},expression:"node.textOffsetX"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"垂直偏移（px）"}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.textOffsetY),callback:function ($$v) {_vm.$set(_vm.node, "textOffsetY", _vm._n($$v))},expression:"node.textOffsetY"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"内容"}},[_c('a-input',{attrs:{"type":"textarea"},on:{"change":_vm.updateNode},model:{value:(_vm.node.text),callback:function ($$v) {_vm.$set(_vm.node, "text", $$v)},expression:"node.text"}})],1)],1)],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"图片"}},[_c('template',{slot:"extra"},[_c('a-tooltip',[_c('template',{slot:"title"},[_vm._v("图片、图标同时存在时，图片优先")]),_c('a-icon',{staticStyle:{"margin-top":"1vh"},attrs:{"type":"question-circle"}})],2)],1)],2),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"图片","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[(_vm.node.image)?_c('img',{staticStyle:{"width":"25px","height":"25px"},attrs:{"src":_vm.node.image}}):_vm._e(),(_vm.node.image)?_c('el-button',{staticStyle:{"margin-left":"5px"},attrs:{"type":"danger","size":"mini","icon":"el-icon-delete","circle":""},on:{"click":_vm.removeImage}}):_vm._e(),(!_vm.node.image)?_c('el-button',{staticStyle:{"margin-left":"5px"},attrs:{"type":"primary","size":"mini","icon":"el-icon-folder-add","circle":""},on:{"click":_vm.addImage}}):_vm._e()],1),_c('a-form-item',{attrs:{"label":"图片地址","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{on:{"change":_vm.updateNode},model:{value:(_vm.node.image),callback:function ($$v) {_vm.$set(_vm.node, "image", $$v)},expression:"node.image"}})],1),_c('a-form-item',{attrs:{"label":"宽度","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.imageWidth),callback:function ($$v) {_vm.$set(_vm.node, "imageWidth", _vm._n($$v))},expression:"node.imageWidth"}})],1),_c('a-form-item',{attrs:{"label":"高度","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{on:{"change":_vm.updateNode},model:{value:(_vm.node.imageHeight),callback:function ($$v) {_vm.$set(_vm.node, "imageHeight", _vm._n($$v))},expression:"node.imageHeight"}})],1),_c('a-form-item',{attrs:{"label":"保存比例","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-switch',{attrs:{"default-checked":""},on:{"change":_vm.updateNodeIconSize},model:{value:(_vm.node.imageRatio),callback:function ($$v) {_vm.$set(_vm.node, "imageRatio", $$v)},expression:"node.imageRatio"}})],1),_c('a-form-item',{attrs:{"label":"对齐方式","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{model:{value:(_vm.node.imageAlign),callback:function ($$v) {_vm.$set(_vm.node, "imageAlign", $$v)},expression:"node.imageAlign"}},_vm._l((_vm.iconAlineType),function(item,index){return _c('a-select-option',{key:index,attrs:{"value":item.type}},[_vm._v(_vm._s(item.name))])}),1)],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"图标"}},[_c('template',{slot:"extra"},[_c('a-tooltip',[_c('template',{slot:"title"},[_vm._v("图片、图标同时存在时，图片优先")]),_c('a-icon',{staticStyle:{"margin-top":"1vh"},attrs:{"type":"question-circle"}})],2)],1)],2),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"图标","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('i',{class:("" + (_vm.node.iconFamily)),staticStyle:{"width":"25px","height":"25px"}},[_vm._v(_vm._s(_vm.node.icon))]),(!!_vm.node.icon)?_c('el-button',{staticStyle:{"margin-left":"5px"},attrs:{"type":"danger","size":"mini","icon":"el-icon-delete","circle":""},on:{"click":_vm.removeIcon}}):_vm._e(),(!_vm.node.icon)?_c('el-button',{staticStyle:{"margin-left":"5px"},attrs:{"type":"primary","size":"mini","icon":"el-icon-folder-add","circle":""},on:{"click":_vm.addIcon}}):_vm._e(),_c('IconSelect',{ref:"iconSelect",on:{"selected":_vm.selected}})],1),_c('a-form-item',{attrs:{"label":"图标大小","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{on:{"change":_vm.updateNodeIconSize},model:{value:(_vm.iconSize),callback:function ($$v) {_vm.iconSize=_vm._n($$v)},expression:"iconSize"}})],1),_c('a-form-item',{attrs:{"label":"图标颜色","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('el-color-picker',{on:{"change":_vm.updateNode},model:{value:(_vm.node.iconColor),callback:function ($$v) {_vm.$set(_vm.node, "iconColor", $$v)},expression:"node.iconColor"}})],1),_c('a-form-item',{attrs:{"label":"对齐方式","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{model:{value:(_vm.node.imageAlign),callback:function ($$v) {_vm.$set(_vm.node, "imageAlign", $$v)},expression:"node.imageAlign"}},_vm._l((_vm.iconAlineType),function(item,index){return _c('a-select-option',{key:index,attrs:{"value":item.type}},[_vm._v(_vm._s(item.name))])}),1)],1)],1)],1)]),_c('a-tab-pane',{key:"2",attrs:{"tab":"事件"}},[_c('div',{staticClass:"div-scoll"},[_c('a-tabs',{attrs:{"default-active-key":"1","size":"small"}},[_c('a-tab-pane',{key:"1",attrs:{"tab":"事件"}},[_c('a-button',{staticStyle:{"width":"90%","margin":"5px 5%"},attrs:{"type":"primary"},on:{"click":_vm.addEvent}},[_vm._v("添加事件")]),_c('add-event',{ref:"addEvent",on:{"ok":_vm.saveEvent}}),_c('a-collapse',{model:{value:(_vm.activeKey),callback:function ($$v) {_vm.activeKey=$$v},expression:"activeKey"}},_vm._l((_vm.node.events),function(item,index){return _c('a-collapse-panel',{key:String(index),attrs:{"header":'事件' + (index + 1)}},[_c('a-tooltip',{attrs:{"slot":"extra","placement":"topLeft","title":"删除"},slot:"extra"},[_c('a-icon',{staticStyle:{"font-size":"2vh"},attrs:{"type":"delete"},on:{"click":function($event){return _vm.remove(index)}}})],1),_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件类型：")]),_c('a-input',{attrs:{"value":_vm.getEventType(item.type),"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件行为：")]),_c('a-input',{attrs:{"value":_vm.getEventAction(item.action),"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件动作：")]),_c('a-textarea',{attrs:{"value":item.value,"rows":6,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件标签：")]),_c('a-input',{attrs:{"value":item.params,"disabled":""}})],1)],1)],1)}),1)],1),_c('a-tab-pane',{key:"2",attrs:{"tab":"条件触发器"}},[_c('a-button',{staticStyle:{"width":"90%","margin":"5px 5%"},attrs:{"type":"primary"},on:{"click":_vm.addWheres}},[_vm._v("添加触发器")]),_c('add-wheres',{ref:"addWheres",on:{"ok":_vm.saveWheres}}),_c('a-collapse',{model:{value:(_vm.activeWheresKey),callback:function ($$v) {_vm.activeWheresKey=$$v},expression:"activeWheresKey"}},_vm._l((_vm.node.wheres),function(item,index){return _c('a-collapse-panel',{key:String(index),attrs:{"header":'触发器' + (index + 1)}},[_c('a-tooltip',{attrs:{"slot":"extra","placement":"topLeft","title":"删除"},slot:"extra"},[_c('a-icon',{staticStyle:{"font-size":"2vh"},attrs:{"type":"delete"},on:{"click":function($event){return _vm.removeWhere(index)}}})],1),_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("属性名：")]),_c('a-input',{attrs:{"value":item.key,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("条件：")]),_c('a-input',{attrs:{"value":item.comparison,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("属性值：")]),_c('a-input',{attrs:{"value":item.value,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("JavaScript：")]),_c('a-textarea',{attrs:{"value":item.fn,"rows":6,"disabled":""}})],1)],1),_c('a-collapse',{model:{value:(_vm.activeWheresKeyActions),callback:function ($$v) {_vm.activeWheresKeyActions=$$v},expression:"activeWheresKeyActions"}},_vm._l((item.actions),function(it,ind){return _c('a-collapse-panel',{key:String(ind),attrs:{"header":'事件' + (ind + 1)}},[_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件行为：")]),_c('a-input',{attrs:{"value":_vm.getEventAction(it.action),"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件动作：")]),_c('a-textarea',{attrs:{"value":it.value,"rows":6,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件标签：")]),_c('a-input',{attrs:{"value":it.params,"disabled":""}})],1)],1)],1)}),1)],1)}),1)],1)],1)],1)]),_c('a-tab-pane',{key:"3",attrs:{"tab":"动效"}},[_c('div',{staticClass:"div-scoll",staticStyle:{"text-align":"left"}},[_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"动画"}}),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"自动播放","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-switch',{model:{value:(_vm.node.animatePlay),callback:function ($$v) {_vm.$set(_vm.node, "animatePlay", $$v)},expression:"node.animatePlay"}})],1),_c('a-form-item',{attrs:{"label":"时长","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{attrs:{"disabled":true},model:{value:(_vm.node.animateDuration),callback:function ($$v) {_vm.$set(_vm.node, "animateDuration", $$v)},expression:"node.animateDuration"}})],1),_c('a-form-item',{attrs:{"label":"特效","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{on:{"change":_vm.animateTypeShow},model:{value:(_vm.node.animateType),callback:function ($$v) {_vm.$set(_vm.node, "animateType", $$v)},expression:"node.animateType"}},_vm._l((_vm.animateType),function(item,index){return _c('a-select-option',{key:index,attrs:{"value":item.type}},[_vm._v(" "+_vm._s(item.name)+" ")])}),1)],1),_c('a-form-item',{attrs:{"label":"循环次数","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{attrs:{"placeholder":"<1无限循环"},on:{"change":_vm.updateNode},model:{value:(_vm.node.animateCycle),callback:function ($$v) {_vm.$set(_vm.node, "animateCycle", $$v)},expression:"node.animateCycle"}})],1),_c('a-form-item',{attrs:{"wrapper-col":{ span: 18, offset: 3 }}},[_c('a-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.play),expression:"play"}],staticStyle:{"margin":"2%"},attrs:{"type":"primary","icon":"caret-right"},on:{"click":_vm.nodeStartPlay}},[_vm._v("播放")]),_c('a-button',{directives:[{name:"show",rawName:"v-show",value:(!_vm.play),expression:"!play"}],staticStyle:{"margin":"2%"},attrs:{"type":"danger","icon":"pause-circle"},on:{"click":_vm.nodePausePlay}},[_vm._v("暂停")]),_c('a-button',{attrs:{"type":"primary","icon":"close-circle"},on:{"click":_vm.nodeStopPlay}},[_vm._v("停止")])],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"音频"}}),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"音频/视频","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.node.audio),callback:function ($$v) {_vm.$set(_vm.node, "audio", $$v)},expression:"node.audio"}})],1),_c('a-form-item',{attrs:{"label":"播放方式","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{on:{"change":_vm.updateNode},model:{value:(_vm.node.playType),callback:function ($$v) {_vm.$set(_vm.node, "playType", $$v)},expression:"node.playType"}},[_c('a-select-option',{key:"0",attrs:{"value":0}},[_vm._v("手动播放")]),_c('a-select-option',{key:"1",attrs:{"value":1}},[_vm._v("自动播放")]),_c('a-select-option',{key:"2",attrs:{"value":2}},[_vm._v("跟随动画")])],1)],1),_c('a-form-item',{attrs:{"label":"是否循环","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-switch',{model:{value:(_vm.node.playLoop),callback:function ($$v) {_vm.$set(_vm.node, "playLoop", $$v)},expression:"node.playLoop"}})],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"外部网页"}}),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"网页URL","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.node.iframe),callback:function ($$v) {_vm.$set(_vm.node, "iframe", $$v)},expression:"node.iframe"}})],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"鼠标提示"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-form-item',{attrs:{"label":"Markdown/html"}},[_c('a-input',{attrs:{"type":"textarea"},model:{value:(_vm.node.markdown),callback:function ($$v) {_vm.$set(_vm.node, "markdown", $$v)},expression:"node.markdown"}})],1),_c('a-form-item',{attrs:{"label":"原生title"}},[_c('a-input',{attrs:{"type":"textarea"},model:{value:(_vm.node.title),callback:function ($$v) {_vm.$set(_vm.node, "title", $$v)},expression:"node.title"}})],1),_c('a-form-item',{attrs:{"label":"HTMLElement ID"}},[_c('a-input',{model:{value:(_vm.node.tipId),callback:function ($$v) {_vm.$set(_vm.node, "tipId", $$v)},expression:"node.tipId"}})],1)],1)],1)]),_c('a-tab-pane',{key:"4",attrs:{"tab":"数据"}},[_c('div',{staticClass:"div-scoll"},[_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"id","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-input',{attrs:{"disabled":true},on:{"change":_vm.updateNode},model:{value:(_vm.node.id),callback:function ($$v) {_vm.$set(_vm.node, "id", $$v)},expression:"node.id"}})],1),_c('a-form-item',{attrs:{"label":"标签","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-input',{attrs:{"placeholder":"回车即可添加"},nativeOn:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.enterTage($event)}},model:{value:(_vm.tag),callback:function ($$v) {_vm.tag=$$v},expression:"tag"}})],1),_c('div',{staticStyle:{"text-align":"left"}},_vm._l((_vm.node.tags),function(item,index){return _c('a-tag',{key:index,staticStyle:{"margin":"5px 5px"},attrs:{"color":"#2db7f5","closable":""},on:{"close":function($event){return _vm.tagClose(item, index)}}},[_vm._v(" "+_vm._s(item)+" ")])}),1)],1),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-form-item',{attrs:{"label":"数值"}},[_c('a-input',{on:{"change":_vm.updateNode},model:{value:(_vm.node.value),callback:function ($$v) {_vm.$set(_vm.node, "value", $$v)},expression:"node.value"}})],1)],1),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-form-item',{attrs:{"label":"node数据"}},[_c('a-input',{attrs:{"type":"textarea"},on:{"change":_vm.updateData},model:{value:(_vm.data),callback:function ($$v) {_vm.data=$$v},expression:"data"}})],1)],1)],1)]),_c('a-tab-pane',{key:"5",attrs:{"tab":"结构"}},[_c('div',{staticClass:"div-scoll"},[(_vm.node instanceof Object)?_c('a-directory-tree',{staticStyle:{"text-align":"left"},attrs:{"default-expand-all":"","multiple":""}},[_c('a-tree-node',{key:"0-0",attrs:{"title":'[节点]' + '-' + _vm.node.name + '-' + _vm.node.text}})],1):_vm._e(),(_vm.node instanceof Array)?_c('a-directory-tree',{staticStyle:{"text-align":"left"},attrs:{"default-expand-all":"","multiple":""}},[_c('a-tree-node',{key:"0-0",attrs:{"title":"parent 0"}},[_c('a-tree-node',{key:"0-0-0",attrs:{"title":"leaf 0-0","is-leaf":""}}),_c('a-tree-node',{key:"0-0-1",attrs:{"title":"leaf 0-1","is-leaf":""}})],1)],1):_vm._e()],1)])],1),_c('images',{ref:"images",on:{"ok":_vm.backImages}})],1)}
var NodeViewvue_type_template_id_084bf28a_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/NodeView.vue?vue&type=template&id=084bf28a&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/modules/AddEvent.vue?vue&type=template&id=3b3c3cd6&
var AddEventvue_type_template_id_3b3c3cd6_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a-modal',{attrs:{"title":_vm.title,"visible":_vm.visible,"confirm-loading":_vm.confirmLoading},on:{"ok":_vm.handleOk,"cancel":_vm.handleCancel}},[_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"事件类型","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{model:{value:(_vm.data.type),callback:function ($$v) {_vm.$set(_vm.data, "type", $$v)},expression:"data.type"}},[_c('a-select-option',{attrs:{"value":0}},[_vm._v("单击")]),_c('a-select-option',{attrs:{"value":1}},[_vm._v("双击")]),_c('a-select-option',{attrs:{"value":2}},[_vm._v("Websocket事件")]),_c('a-select-option',{attrs:{"value":3}},[_vm._v("MQTT")])],1)],1),_c('a-form-item',{attrs:{"label":"事件行为","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{on:{"change":_vm.changeAction},model:{value:(_vm.data.action),callback:function ($$v) {_vm.$set(_vm.data, "action", $$v)},expression:"data.action"}},_vm._l((_vm.eventAction),function(item,index){return _c('a-select-option',{key:index,attrs:{"value":item.value}},[_vm._v(_vm._s(item.name))])}),1)],1),_c('a-form-item',{attrs:{"label":_vm.name,"label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[(_vm.data.action != 2)?_c('a-input',{model:{value:(_vm.data.value),callback:function ($$v) {_vm.$set(_vm.data, "value", $$v)},expression:"data.value"}}):_c('a-textarea',{attrs:{"rows":15,"placeholder":_vm.msg},model:{value:(_vm.data.value),callback:function ($$v) {_vm.$set(_vm.data, "value", $$v)},expression:"data.value"}})],1),_c('a-form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.judge),expression:"judge"}],attrs:{"label":_vm.name1,"label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.data.params),callback:function ($$v) {_vm.$set(_vm.data, "params", $$v)},expression:"data.params"}})],1)],1)],1)}
var AddEventvue_type_template_id_3b3c3cd6_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/modules/AddEvent.vue?vue&type=template&id=3b3c3cd6&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/modules/AddEvent.vue?vue&type=script&lang=js&


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var msg = "";

/* harmony default export */ var AddEventvue_type_script_lang_js_ = ({
  data: function data() {
    return {
      title: "",
      judge: true,
      visible: false,
      msg: msg,
      confirmLoading: false,
      data: {
        type: 0,
        action: 0,
        value: "",
        params: ""
      },
      name: "链接地址",
      name1: "打开方式",
      eventAction: eventAction
    };
  },
  methods: {
    add: function add() {
      this.visible = true;
    },
    handleOk: function handleOk() {
      this.$emit("ok", Object.assign({}, this.data));
      this.handleCancel();
    },
    handleCancel: function handleCancel() {
      Object.assign(this.$data, this.$options.data());
    },
    changeAction: function changeAction(val) {
      switch (val) {
        case 0:
          this.name = "链接地址";
          this.name1 = "打开方式";
          this.judge = true;
          break;

        case 1:
          this.name = "动画标签";
          this.judge = false;
          break;

        case 5:
          this.name = "动画标签";
          this.judge = false;
          break;

        case 6:
          this.name = "动画标签";
          this.judge = false;
          break;

        case 2:
          this.name = "JavaScript";
          this.judge = false;
          break;

        case 3:
          this.name = "函数名称";
          this.name1 = "函数参数";
          this.judge = true;
          break;

        case 7:
          this.name = "消息名称";
          this.name1 = "消息参数";
          this.judge = true;
          break;
      }
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/modules/AddEvent.vue?vue&type=script&lang=js&
 /* harmony default export */ var modules_AddEventvue_type_script_lang_js_ = (AddEventvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./src/components/topology/modules/AddEvent.vue





/* normalize component */

var AddEvent_component = normalizeComponent(
  modules_AddEventvue_type_script_lang_js_,
  AddEventvue_type_template_id_3b3c3cd6_render,
  AddEventvue_type_template_id_3b3c3cd6_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var AddEvent = (AddEvent_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/modules/AddWheres.vue?vue&type=template&id=0df0b470&
var AddWheresvue_type_template_id_0df0b470_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a-modal',{attrs:{"title":_vm.title,"visible":_vm.visible,"confirm-loading":_vm.confirmLoading},on:{"ok":_vm.handleOk,"cancel":_vm.handleCancel}},[_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"属性名","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.data.key),callback:function ($$v) {_vm.$set(_vm.data, "key", $$v)},expression:"data.key"}})],1),_c('a-form-item',{attrs:{"label":"条件","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.data.comparison),callback:function ($$v) {_vm.$set(_vm.data, "comparison", $$v)},expression:"data.comparison"}})],1),_c('a-form-item',{attrs:{"label":"属性值","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.data.value),callback:function ($$v) {_vm.$set(_vm.data, "value", $$v)},expression:"data.value"}})],1),_c('a-form-item',{attrs:{"label":"JavaScript","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-textarea',{attrs:{"rows":10},model:{value:(_vm.data.fn),callback:function ($$v) {_vm.$set(_vm.data, "fn", $$v)},expression:"data.fn"}})],1),_c('a-form-item',{attrs:{"label":"添加事件","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-button',{attrs:{"type":"primary"},on:{"click":_vm.addEvent}},[_vm._v("添加事件")])],1)],1),_c('add-wheres-event',{ref:"addEvent",on:{"ok":_vm.saveEvent}}),_c('a-collapse',{model:{value:(_vm.activeKey),callback:function ($$v) {_vm.activeKey=$$v},expression:"activeKey"}},_vm._l((_vm.data.actions),function(item,index){return _c('a-collapse-panel',{key:String(index),attrs:{"header":'事件' + (index + 1)}},[_c('a-tooltip',{attrs:{"slot":"extra","placement":"topLeft","title":"删除"},slot:"extra"},[_c('a-icon',{staticStyle:{"font-size":"2vh"},attrs:{"type":"delete"},on:{"click":function($event){return _vm.remove(index)}}})],1),_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件行为：")]),_c('a-input',{attrs:{"value":_vm.getEventAction(item.action),"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件动作：")]),_c('a-textarea',{attrs:{"value":item.value,"rows":6,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件标签：")]),_c('a-input',{attrs:{"value":item.params,"disabled":""}})],1)],1)],1)}),1)],1)}
var AddWheresvue_type_template_id_0df0b470_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/modules/AddWheres.vue?vue&type=template&id=0df0b470&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/modules/AddWheresEvent.vue?vue&type=template&id=2cd1bebe&
var AddWheresEventvue_type_template_id_2cd1bebe_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a-modal',{attrs:{"title":_vm.title,"visible":_vm.visible,"confirm-loading":_vm.confirmLoading},on:{"ok":_vm.handleOk,"cancel":_vm.handleCancel}},[_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"事件行为","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{on:{"change":_vm.changeAction},model:{value:(_vm.data.action),callback:function ($$v) {_vm.$set(_vm.data, "action", $$v)},expression:"data.action"}},[_c('a-select-option',{attrs:{"value":0}},[_vm._v("打开链接")]),_c('a-select-option',{attrs:{"value":1}},[_vm._v("执行动画")]),_c('a-select-option',{attrs:{"value":2}},[_vm._v("停止动画")]),_c('a-select-option',{attrs:{"value":3}},[_vm._v("执行自定义函数")]),_c('a-select-option',{attrs:{"value":4}},[_vm._v("执行window函数")])],1)],1),_c('a-form-item',{attrs:{"label":_vm.name,"label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[(_vm.data.action != 3)?_c('a-input',{model:{value:(_vm.data.value),callback:function ($$v) {_vm.$set(_vm.data, "value", $$v)},expression:"data.value"}}):_c('a-textarea',{attrs:{"rows":15,"placeholder":_vm.msg},model:{value:(_vm.data.value),callback:function ($$v) {_vm.$set(_vm.data, "value", $$v)},expression:"data.value"}})],1),_c('a-form-item',{directives:[{name:"show",rawName:"v-show",value:(_vm.judge),expression:"judge"}],attrs:{"label":_vm.name1,"label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.data.params),callback:function ($$v) {_vm.$set(_vm.data, "params", $$v)},expression:"data.params"}})],1)],1)],1)}
var AddWheresEventvue_type_template_id_2cd1bebe_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/modules/AddWheresEvent.vue?vue&type=template&id=2cd1bebe&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/modules/AddWheresEvent.vue?vue&type=script&lang=js&


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var AddWheresEventvue_type_script_lang_js_msg = "示例：console.log(pen, params, client, window.topology);\npen - 画笔数据。\nparams - 填写的函数参数/websocket中json格式下的data/MQTT的message。\nclient - websocket/MQTT（mqtt.js）的连接客户端。window.topology - 画布组件";
/* harmony default export */ var AddWheresEventvue_type_script_lang_js_ = ({
  data: function data() {
    return {
      title: "",
      judge: true,
      visible: false,
      msg: AddWheresEventvue_type_script_lang_js_msg,
      confirmLoading: false,
      data: {
        type: 0,
        action: 0,
        value: "",
        params: ""
      },
      name: "链接地址",
      name1: "新标签页"
    };
  },
  methods: {
    add: function add() {
      this.visible = true;
    },
    handleOk: function handleOk() {
      this.$emit("ok", Object.assign({}, this.data));
      this.handleCancel();
    },
    handleCancel: function handleCancel() {
      Object.assign(this.$data, this.$options.data());
    },
    changeAction: function changeAction(val) {
      switch (val) {
        case 0:
          this.name = "链接地址";
          this.name1 = "新标签页";
          this.judge = true;
          break;

        case 1:
          this.name = "动画标签";
          this.judge = false;
          break;

        case 2:
          this.name = "动画标签";
          this.judge = false;
          break;

        case 3:
          this.name = "函数代码";
          this.judge = false;
          break;

        case 4:
          this.name = "函数名称";
          this.name1 = "函数参数";
          this.judge = true;
          break;
      }
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/modules/AddWheresEvent.vue?vue&type=script&lang=js&
 /* harmony default export */ var modules_AddWheresEventvue_type_script_lang_js_ = (AddWheresEventvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./src/components/topology/modules/AddWheresEvent.vue





/* normalize component */

var AddWheresEvent_component = normalizeComponent(
  modules_AddWheresEventvue_type_script_lang_js_,
  AddWheresEventvue_type_template_id_2cd1bebe_render,
  AddWheresEventvue_type_template_id_2cd1bebe_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var AddWheresEvent = (AddWheresEvent_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/modules/AddWheres.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var AddWheresvue_type_script_lang_js_ = ({
  components: {
    AddWheresEvent: AddWheresEvent
  },
  data: function data() {
    return {
      title: "",
      judge: true,
      visible: false,
      confirmLoading: false,
      activeKey: ["0"],
      data: {
        key: "",
        comparison: "",
        value: "",
        fn: "",
        actions: []
      }
    };
  },
  methods: {
    remove: function remove(index) {
      this.$delete(this.data.actions, index);
    },
    add: function add() {
      this.visible = true;
      this.title = "添加触发器";
    },
    handleOk: function handleOk() {
      this.$emit("ok", Object.assign({}, this.data));
      this.handleCancel();
    },
    handleCancel: function handleCancel() {
      Object.assign(this.$data, this.$options.data());
    },
    addEvent: function addEvent() {
      this.$refs.addEvent.add();
    },
    saveEvent: function saveEvent(data) {
      this.data.actions.push(data);
    },
    getEventAction: function getEventAction(action) {
      switch (action) {
        case 0:
          return "打开链接";

        case 1:
          return "执行动画";

        case 2:
          return "停止动画";

        case 3:
          return "执行自定义函数";

        case 4:
          return "执行window函数";
      }
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/modules/AddWheres.vue?vue&type=script&lang=js&
 /* harmony default export */ var modules_AddWheresvue_type_script_lang_js_ = (AddWheresvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./src/components/topology/modules/AddWheres.vue





/* normalize component */

var AddWheres_component = normalizeComponent(
  modules_AddWheresvue_type_script_lang_js_,
  AddWheresvue_type_template_id_0df0b470_render,
  AddWheresvue_type_template_id_0df0b470_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var AddWheres = (AddWheres_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/modules/Images.vue?vue&type=template&id=1f9f7b19&
var Imagesvue_type_template_id_1f9f7b19_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('a-modal',{attrs:{"title":_vm.title,"visible":_vm.open,"footer":null,"width":"70%"},on:{"update:visible":function($event){_vm.open=$event},"cancel":_vm.cancel}},[_c('a-divider',{attrs:{"orientation":"left"}},[_vm._v("外部URL方式")]),_c('a-row',{staticStyle:{"margin-bottom":"20px"}},[_c('a-col',{attrs:{"span":6}},[_c('a-input',{attrs:{"placeholder":"在线图片"},model:{value:(_vm.url),callback:function ($$v) {_vm.url=$$v},expression:"url"}})],1),_c('a-col',{attrs:{"span":4}},[_c('a-button',{staticStyle:{"margin-left":"5px"},attrs:{"type":"primary"},on:{"click":function($event){return _vm.selectImage(_vm.url)}}},[_vm._v("提交")])],1)],1),_c('a-divider',{attrs:{"orientation":"left"}},[_vm._v("选择图片方式")]),_c('a-row',{staticStyle:{"margin-bottom":"20px"}},[_c('a-col',{attrs:{"span":4}},[_c('a-button',{attrs:{"type":"primary"},on:{"click":_vm.goFile}},[_vm._v("上传图片")]),_c('input',{ref:"files",staticStyle:{"display":"none"},attrs:{"type":"file"},on:{"change":_vm.uploadImg}})],1)],1),_c('div',{staticStyle:{"height":"50vh","overflow-y":"scroll","overflow-x":"hidden"}},[_c('a-row',{attrs:{"gutter":4}},_vm._l((_vm.imageList),function(item){return _c('a-col',{key:item.id,staticStyle:{"text-align":"center"},attrs:{"span":6}},[_c('a-card',{attrs:{"shadow":"hover"}},[_c('img',{staticStyle:{"width":"100px","height":"100px"},attrs:{"src":_vm.baseapi + item.url}}),_c('div',{staticStyle:{"padding":"14px"}},[_c('div',{staticClass:"bottom clearfix"},[_c('el-button',{staticClass:"button",attrs:{"type":"text"},on:{"click":function($event){return _vm.selectImage(_vm.baseapi + item.url)}}},[_vm._v("选择图片")]),_c('a-button',{staticClass:"button",staticStyle:{"color":"red"},attrs:{"type":"text"},on:{"click":function($event){return _vm.deleteImage(item.id)}}},[_vm._v("删除")])],1)])])],1)}),1)],1)],1)],1)}
var Imagesvue_type_template_id_1f9f7b19_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/modules/Images.vue?vue&type=template&id=1f9f7b19&

// EXTERNAL MODULE: ./node_modules/axios/index.js
var axios = __webpack_require__("bc3a");
var axios_default = /*#__PURE__*/__webpack_require__.n(axios);

// CONCATENATED MODULE: ./src/utils/errorCode.js
/* harmony default export */ var errorCode = ({
  '401': '认证失败，无法访问系统资源',
  '403': '当前操作没有权限',
  '404': '访问资源不存在',
  'default': '系统未知错误，请反馈给管理员'
});
// CONCATENATED MODULE: ./src/utils/request.js


axios_default.a.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'; // 创建axios实例

var service = axios_default.a.create({
  // axios中请求配置有baseURL选项，表示请求URL公共部分
  baseURL: "/api",
  // 超时
  timeout: 10000
}); // request拦截器
// service.interceptors.request.use(config => {
//   // 是否需要设置 token
//   const isToken = (config.headers || {}).isToken === false
//   if (getToken() && !isToken) {
//     config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
//   }
//   // get请求映射params参数
//   if (config.method === 'get' && config.params) {
//     let url = config.url + '?';
//     for (const propName of Object.keys(config.params)) {
//       const value = config.params[propName];
//       var part = encodeURIComponent(propName) + "=";
//       if (value !== null && typeof(value) !== "undefined") {
//         if (typeof value === 'object') {
//           for (const key of Object.keys(value)) {
//             let params = propName + '[' + key + ']';
//             var subPart = encodeURIComponent(params) + "=";
//             url += subPart + encodeURIComponent(value[key]) + "&";
//           }
//         } else {
//           url += part + encodeURIComponent(value) + "&";
//         }
//       }
//     }
//     url = url.slice(0, -1);
//     config.params = {};
//     config.url = url;
//   }
//   return config
// }, error => {
//     console.log(error)
//     Promise.reject(error)
// })
// // 响应拦截器
// service.interceptors.response.use(res => {
//     // 未设置状态码则默认成功状态
//     const code = res.data.code || 200;
//     // 获取错误信息
//     const msg = errorCode[code] || res.data.msg || errorCode['default']
//     if (code === 401) {
//       MessageBox.confirm('登录状态已过期，您可以继续留在该页面，或者重新登录', '系统提示', {
//           confirmButtonText: '重新登录',
//           cancelButtonText: '取消',
//           type: 'warning'
//         }
//       ).then(() => {
//         store.dispatch('LogOut').then(() => {
//           location.href = '/index';
//         })
//       })
//     } else if (code === 500) {
//       Message({
//         message: msg,
//         type: 'error'
//       })
//       return Promise.reject(new Error(msg))
//     } else if (code !== 200) {
//       Notification.error({
//         title: msg
//       })
//       return Promise.reject('error')
//     } else {
//       return res.data
//     }
//   },
//   error => {
//     console.log('err' + error)
//     let { message } = error;
//     if (message == "Network Error") {
//       message = "后端接口连接异常";
//     }
//     else if (message.includes("timeout")) {
//       message = "系统接口请求超时";
//     }
//     else if (message.includes("Request failed with status code")) {
//       message = "系统接口" + message.substr(message.length - 3) + "异常";
//     }
//     Message({
//       message: message,
//       type: 'error',
//       duration: 5 * 1000
//     })
//     return Promise.reject(error)
//   }
// )

/* harmony default export */ var request = (service);
// CONCATENATED MODULE: ./src/api/images.js

function upload(data) {
  return request({
    url: '/images/upload',
    method: 'post',
    data: data
  });
}
function deleteImages(id) {
  return request({
    url: '/images/delete/' + id,
    method: 'delete'
  });
}
function images_list() {
  return request({
    url: '/images/list',
    method: 'get'
  });
}
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/modules/Images.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var Imagesvue_type_script_lang_js_ = ({
  data: function data() {
    return {
      title: "",
      open: false,
      url: "",
      imageList: [],
      baseapi: "/api",
      fit: "fill"
    };
  },
  methods: {
    init: function init() {
      this.open = true;
      this.title = "选择图片";
      this.getList();
    },
    selectImage: function selectImage(url) {
      if (!url) {
        this.$message.warning("请选择图片或填写图片url");
        return;
      }

      this.$emit("ok", String(url));
      this.cancel();
    },
    deleteImage: function deleteImage(id) {
      var _this = this;

      deleteImages(id).then(function (res) {
        if (res.code === 200) {
          _this.$message.info("删除成功");

          _this.getList();
        } else {
          _this.$message.warning("删除失败");
        }
      });
    },
    uploadImg: function uploadImg(e) {
      var _this2 = this;

      var fileList = e.target.files;
      var form = new FormData();

      if (fileList.length != 0) {
        for (var i = 0; i < fileList.length; i++) {
          form.append("imgFile", fileList[i]);
        }
      }

      upload(form).then(function (res) {
        if (res.code === 200) {
          _this2.$message.info("上传成功");

          _this2.getList();
        } else {
          _this2.$message.warning(res.msg);
        }
      });
    },
    goFile: function goFile() {
      this.$refs.files.click();
    },
    getList: function getList() {
      var _this3 = this;

      images_list().then(function (res) {
        if (res.code === 200) {
          _this3.imageList = res.data;
        }
      });
    },
    cancel: function cancel() {
      this.open = false;
      this.title = "";
      this.url = "";
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/modules/Images.vue?vue&type=script&lang=js&
 /* harmony default export */ var modules_Imagesvue_type_script_lang_js_ = (Imagesvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./src/components/topology/modules/Images.vue





/* normalize component */

var Images_component = normalizeComponent(
  modules_Imagesvue_type_script_lang_js_,
  Imagesvue_type_template_id_1f9f7b19_render,
  Imagesvue_type_template_id_1f9f7b19_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var Images = (Images_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/IconSelect.vue?vue&type=template&id=2a8ce4d1&scoped=true&
var IconSelectvue_type_template_id_2a8ce4d1_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('a-modal',{attrs:{"title":_vm.title,"visible":_vm.open,"footer":null,"width":"70%"},on:{"update:visible":function($event){_vm.open=$event},"cancel":_vm.cancel}},[_c('div',{staticClass:"icon-body"},[_c('a-input',{staticStyle:{"position":"relative"},attrs:{"clearable":"","placeholder":"请输入图标名称"},on:{"clear":_vm.filterIcons},nativeOn:{"input":function($event){return _vm.filterIcons($event)}},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v},expression:"name"}},[_c('i',{staticClass:"el-icon-search el-input__icon",attrs:{"slot":"suffix"},slot:"suffix"})]),_c('div',{staticClass:"icon-list"},_vm._l((_vm.iconList),function(item,index){return _c('div',{key:index,on:{"click":function($event){return _vm.selectedIcon(item)}}},[_c('i',{class:("iconfont " + (item.icon))}),_c('span',{staticStyle:{"margin-left":"5px"}},[_vm._v(_vm._s(item.name))])])}),0)],1)])],1)}
var IconSelectvue_type_template_id_2a8ce4d1_scoped_true_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/IconSelect.vue?vue&type=template&id=2a8ce4d1&scoped=true&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
var es_array_filter = __webpack_require__("4de4");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
var es_array_includes = __webpack_require__("caad");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
var es_string_includes = __webpack_require__("2532");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/IconSelect.vue?vue&type=script&lang=js&





//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var IconSelectvue_type_script_lang_js_ = ({
  name: "IconSelect",
  data: function data() {
    return {
      name: "",
      iconList: [],
      title: "",
      open: false
    };
  },
  methods: {
    cancel: function cancel() {
      this.open = false;
    },
    init: function init() {
      this.title = "选择图标";
      this.open = true;
      this.filterIcons();
      this.name = "";
    },
    filterIcons: function filterIcons() {
      var _this = this;

      this.iconList = [];

      var _iterator = _createForOfIteratorHelper(customTools),
          _step;

      try {
        for (_iterator.s(); !(_step = _iterator.n()).done;) {
          var i = _step.value;

          if (i.children) {
            for (var j = 0; j < i.children.length; j++) {
              this.iconList.push(i.children[j]);
            }
          }
        }
      } catch (err) {
        _iterator.e(err);
      } finally {
        _iterator.f();
      }

      if (this.name) {
        this.iconList = this.iconList.filter(function (item) {
          return item.name.includes(_this.name);
        });
      }
    },
    selectedIcon: function selectedIcon(item) {
      this.$emit("selected", item);
      this.cancel();
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/IconSelect.vue?vue&type=script&lang=js&
 /* harmony default export */ var topology_IconSelectvue_type_script_lang_js_ = (IconSelectvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/components/topology/IconSelect.vue?vue&type=style&index=0&id=2a8ce4d1&rel=stylesheet%2Fscss&lang=scss&scoped=true&
var IconSelectvue_type_style_index_0_id_2a8ce4d1_rel_stylesheet_2Fscss_lang_scss_scoped_true_ = __webpack_require__("7323");

// CONCATENATED MODULE: ./src/components/topology/IconSelect.vue






/* normalize component */

var IconSelect_component = normalizeComponent(
  topology_IconSelectvue_type_script_lang_js_,
  IconSelectvue_type_template_id_2a8ce4d1_scoped_true_render,
  IconSelectvue_type_template_id_2a8ce4d1_scoped_true_staticRenderFns,
  false,
  null,
  "2a8ce4d1",
  null
  
)

/* harmony default export */ var IconSelect = (IconSelect_component.exports);
// CONCATENATED MODULE: ./src/utils/topology/nodesettings.js
 //node动态

var animateType = [{
  name: "无",
  type: 0
}, {
  name: "上下跳动",
  type: "upDown"
}, {
  name: "左右跳动",
  type: "leftRight"
}, {
  name: "心跳",
  type: "heart"
}, {
  name: "成功",
  type: "success"
}, {
  name: "警告",
  type: "warning"
}, {
  name: "错误",
  type: "error"
}, {
  name: "炫耀",
  type: "show"
}];
var iconAlineType = [{
  name: "居中",
  type: "center"
}, {
  name: "上",
  type: "top"
}, {
  name: "下",
  type: "bottom"
}, {
  name: "左",
  type: "left"
}, {
  name: "右",
  type: "right"
}, {
  name: "左上",
  type: "left-top"
}, {
  name: "右上",
  type: "right-top"
}, {
  name: "左下",
  type: "left-bottom"
}, {
  name: "右下",
  type: "right-bottom"
}];
function setAnimate(node) {
  if (node.animateType === '') {
    return;
  }

  var state = node_Node.cloneState(node);

  switch (node.animateType) {
    case 'upDown':
      state.rect.y -= 10;
      state.rect.ey -= 10;
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: state
      });
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(node)
      });
      node.animateFrames.push({
        duration: 200,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      break;

    case 'leftRight':
      state.rect.x -= 10;
      state.rect.ex -= 10;
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      state.rect.x += 20;
      state.rect.ex += 20;
      node.animateFrames.push({
        duration: 80,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      state.rect.x -= 20;
      state.rect.ex -= 20;
      node.animateFrames.push({
        duration: 50,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      state.rect.x += 20;
      state.rect.ex += 20;
      node.animateFrames.push({
        duration: 30,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      node.animateFrames.push({
        duration: 300,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(node)
      });
      break;

    case 'heart':
      state.rect.x -= 5;
      state.rect.ex += 5;
      state.rect.y -= 5;
      state.rect.ey += 5;
      state.rect.width += 5;
      state.rect.height += 10;
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: state
      });
      node.animateFrames.push({
        duration: 400,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(node)
      });
      break;

    case 'success':
      state.strokeStyle = '#237804';
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: state
      });
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(node)
      });
      state.strokeStyle = '#237804';
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: state
      });
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(node)
      });
      state.strokeStyle = '#237804';
      state.fillStyle = '#389e0d22';
      node.animateFrames.push({
        duration: 3000,
        linear: true,
        initState: node_Node.cloneState(node),
        state: state
      });
      break;

    case 'warning':
      state.strokeStyle = '#fa8c16';
      state.dash = 2;
      node.animateFrames.push({
        duration: 300,
        linear: true,
        initState: node_Node.cloneState(node),
        state: state
      });
      state.strokeStyle = '#fa8c16';
      state.dash = 0;
      node.animateFrames.push({
        duration: 500,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      state.strokeStyle = '#fa8c16';
      state.dash = 2;
      node.animateFrames.push({
        duration: 300,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      break;

    case 'error':
      state.strokeStyle = '#cf1322';
      state.fillStyle = '#cf132222';
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: state
      });
      break;

    case 'show':
      state.strokeStyle = '#fa541c';
      state.rotate = -10;
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      state.rotate = 10;
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      state.rotate = 0;
      node.animateFrames.push({
        duration: 100,
        linear: true,
        initState: node_Node.cloneState(node),
        state: node_Node.cloneState(state)
      });
      break;
  }
}
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/NodeView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//






/* harmony default export */ var NodeViewvue_type_script_lang_js_ = ({
  props: {
    node: {
      type: Object
    }
  },
  watch: {
    // node:{
    //   deep: true,
    //   handler(n,v){
    //   }
    // },
    data: {
      handler: function handler(n, v) {
        if (n.data) {
          this.data = n.data;
        }
      },
      deep: true
    }
  },
  components: {
    AddEvent: AddEvent,
    AddWheres: AddWheres,
    Images: Images,
    IconSelect: IconSelect
  },
  data: function data() {
    return {
      activeKey: ["0"],
      activeName: "1",
      activeWheresKey: ["0"],
      activeWheresKeyActions: ["0"],
      lineOther: lineOther,
      datas: {},
      tag: "",
      animateType: animateType,
      iconAlineType: iconAlineType,
      data: this.node.data ? JSON.stringify(this.node.data) : "",
      iconSize: this.node.iconSize ? this.node.iconSize : 0,
      iconColor: this.node.iconColor ? this.node.iconColor : "#fff",
      play: true
    }; // \uea68|ltys
  },
  methods: {
    selected: function selected(item) {
      this.$set(this.node, "icon", item.data.icon);
      this.$set(this.node, "iconFamily", item.data.iconFamily);
      this.$set(this.node, "iconColor", item.data.iconColor);
      this.updateNode("");
    },
    backImages: function backImages(url) {
      this.$set(this.node, "image", url);
      this.updateNode(url);
    },
    addImage: function addImage() {
      this.$refs.images.init();
    },
    addIcon: function addIcon() {
      this.$refs.iconSelect.init();
    },
    removeImage: function removeImage() {
      this.$set(this.node, "image", "");
      this.updateNode("");
    },
    removeIcon: function removeIcon() {
      this.node.icon = "";
      this.updateNode("");
    },
    remove: function remove(index) {
      this.$delete(this.node.events, index);
    },
    toJson: function toJson(val) {
      if (!!val) {
        return JSON.stringify(val);
      }

      return "";
    },
    removeWhere: function removeWhere(index) {
      this.$delete(this.node.wheres, index);
    },
    getEventType: function getEventType(type) {
      switch (type) {
        case 0:
          return "单击";

        case 1:
          return "双击";

        case 2:
          return "Websocket事件";

        case 3:
          return "MQTT";
      }
    },
    getEventAction: function getEventAction(action) {
      switch (action) {
        case 0:
          return "打开链接";

        case 1:
          return "执行动画";

        case 5:
          return "暂停动画";

        case 6:
          return "停止动画";

        case 2:
          return "执行JavaScript";

        case 3:
          return "执行window函数";

        case 7:
          return "自定义消息";
      }
    },
    tagClose: function tagClose(val, index) {
      this.$delete(this.node.tags, index);
    },
    enterTage: function enterTage() {
      this.node.tags.push(this.tag);
      this.tag = "";
    },
    nodeStartPlay: function nodeStartPlay() {
      this.node.initAnimate();
      this.node.startAnimate();
      this.play = false;
    },
    nodePausePlay: function nodePausePlay() {
      this.node.initAnimate();
      this.node.pauseAnimate();
      this.play = true;
    },
    nodeStopPlay: function nodeStopPlay() {
      this.node.initAnimate();
      this.node.stopAnimate();
      this.play = true;
    },
    animateTypeShow: function animateTypeShow() {
      this.node.animateFrames = [];
      setAnimate(this.node);
    },
    addEvent: function addEvent() {
      this.$refs.addEvent.add();
    },
    addWheres: function addWheres() {
      this.$refs.addWheres.add();
    },
    saveEvent: function saveEvent(data) {
      this.node.events.push(data);
    },
    saveWheres: function saveWheres(data) {
      var _this = this;

      if (!!this.node.wheres) {
        this.node.wheres.push(data);
      } else {
        var params = [];
        params.push(data);
        this.$nextTick(function () {
          _this.$set(_this.node, "wheres", params); // this.$set(this.node.wheres,"actios",data.actions);

        });
      }
    },
    updateData: function updateData(val) {
      this.node.data = JSON.stringify(val);
      this.updateNode(val);
    },
    updateNodeIconSize: function updateNodeIconSize(val) {
      this.node.iconSize = val;
      this.updateNode(val);
    },
    updateNode: function updateNode(val) {
      this.$emit("ok", this.node);
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/NodeView.vue?vue&type=script&lang=js&
 /* harmony default export */ var topology_NodeViewvue_type_script_lang_js_ = (NodeViewvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/components/topology/NodeView.vue?vue&type=style&index=0&lang=scss&
var NodeViewvue_type_style_index_0_lang_scss_ = __webpack_require__("496f");

// CONCATENATED MODULE: ./src/components/topology/NodeView.vue






/* normalize component */

var NodeView_component = normalizeComponent(
  topology_NodeViewvue_type_script_lang_js_,
  NodeViewvue_type_template_id_084bf28a_render,
  NodeViewvue_type_template_id_084bf28a_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var NodeView = (NodeView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/LineView.vue?vue&type=template&id=117df5b0&
var LineViewvue_type_template_id_117df5b0_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('a-tabs',{attrs:{"default-active-key":"1"}},[_c('a-tab-pane',{key:"1",attrs:{"tab":"外观"}},[_c('div',{staticClass:"div-scoll"},[_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"位置"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-row',{staticStyle:{"margin-left":"0px","margin-right":"0px"},attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"起点x,y"}},[_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{attrs:{"span":12}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.from.x),callback:function ($$v) {_vm.$set(_vm.line.from, "x", _vm._n($$v))},expression:"line.from.x"}})],1),_c('a-col',{attrs:{"span":12}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.from.y),callback:function ($$v) {_vm.$set(_vm.line.from, "y", _vm._n($$v))},expression:"line.from.y"}})],1)],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"终点x,y"}},[_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{attrs:{"span":12}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.to.x),callback:function ($$v) {_vm.$set(_vm.line.to, "x", _vm._n($$v))},expression:"line.to.x"}})],1),_c('a-col',{attrs:{"span":12}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.to.y),callback:function ($$v) {_vm.$set(_vm.line.to, "y", _vm._n($$v))},expression:"line.to.y"}})],1)],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"起点箭头"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.fromArrow),callback:function ($$v) {_vm.$set(_vm.line, "fromArrow", $$v)},expression:"line.fromArrow"}},_vm._l((_vm.arrowTypes),function(item){return _c('a-select-option',{key:item,attrs:{"value":item}},[_c('i',{class:("t-icon t-to-" + item),staticStyle:{"font-size":"7vh"}})])}),1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"终点箭头"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.toArrow),callback:function ($$v) {_vm.$set(_vm.line, "toArrow", $$v)},expression:"line.toArrow"}},_vm._l((_vm.arrowTypes),function(item){return _c('a-select-option',{key:item,attrs:{"value":item}},[_c('i',{class:("t-icon t-to-" + item),staticStyle:{"font-size":"7vh"}})])}),1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"起点箭头颜色"}},[_c('el-color-picker',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.fromArrowColor),callback:function ($$v) {_vm.$set(_vm.line, "fromArrowColor", $$v)},expression:"line.fromArrowColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"终点箭头颜色"}},[_c('el-color-picker',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.toArrowColor),callback:function ($$v) {_vm.$set(_vm.line, "toArrowColor", $$v)},expression:"line.toArrowColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"起点箭头大小"}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.fromArrowSize),callback:function ($$v) {_vm.$set(_vm.line, "fromArrowSize", _vm._n($$v))},expression:"line.fromArrowSize"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"终点箭头大小"}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.toArrowSize),callback:function ($$v) {_vm.$set(_vm.line, "toArrowSize", _vm._n($$v))},expression:"line.toArrowSize"}})],1)],1)],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"样式"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"线条样式"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.dash),callback:function ($$v) {_vm.$set(_vm.line, "dash", $$v)},expression:"line.dash"}},_vm._l((_vm.lineOther),function(item){return _c('a-select-option',{key:item.type,attrs:{"value":item.type}},[_c('i',{class:("" + (item.name)),staticStyle:{"font-size":"5vh"}})])}),1)],1)],1),_c('a-col',{attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"连线类型"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.name),callback:function ($$v) {_vm.$set(_vm.line, "name", $$v)},expression:"line.name"}},_vm._l((_vm.lineList),function(item){return _c('a-select-option',{key:item.type,attrs:{"value":item.type}},[_c('i',{class:("t-icon t-" + (item.type)),staticStyle:{"font-size":"5vh"}})])}),1)],1)],1),_c('a-col',{attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"线条宽度"}},[_c('a-input',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.lineWidth),callback:function ($$v) {_vm.$set(_vm.line, "lineWidth", _vm._n($$v))},expression:"line.lineWidth"}})],1)],1),_c('a-col',{attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"边线宽度"}},[_c('a-input',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.borderWidth),callback:function ($$v) {_vm.$set(_vm.line, "borderWidth", _vm._n($$v))},expression:"line.borderWidth"}})],1)],1),_c('a-col',{attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"线条颜色"}},[_c('el-color-picker',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.strokeStyle),callback:function ($$v) {_vm.$set(_vm.line, "strokeStyle", $$v)},expression:"line.strokeStyle"}})],1)],1),_c('a-col',{attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"边线颜色"}},[_c('el-color-picker',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.borderColor),callback:function ($$v) {_vm.$set(_vm.line, "borderColor", $$v)},expression:"line.borderColor"}})],1)],1),_c('a-col',{attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"透明度"}},[_c('a-input',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.globalAlpha),callback:function ($$v) {_vm.$set(_vm.line, "globalAlpha", _vm._n($$v))},expression:"line.globalAlpha"}})],1)],1),_c('a-col',{attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"控制点"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.manualCps),callback:function ($$v) {_vm.$set(_vm.line, "manualCps", $$v)},expression:"line.manualCps"}},[_c('a-select-option',{attrs:{"value":0}},[_vm._v("自动计算")]),_c('a-select-option',{attrs:{"value":1}},[_vm._v("禁止自动计算")])],1)],1)],1),_vm._l((_vm.line.controlPoints),function(item,index){return _c('a-col',{key:index,attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":'控制点' + (index+1)}},[_vm._v(" x "),_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(item.x),callback:function ($$v) {_vm.$set(item, "x", _vm._n($$v))},expression:"item.x"}}),_vm._v(" y "),_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(item.y),callback:function ($$v) {_vm.$set(item, "y", _vm._n($$v))},expression:"item.y"}})],1)],1)})],2)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"文字"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-row',{staticStyle:{"margin-left":"0px","margin-right":"0px"},attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"大小"}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.fontSize),callback:function ($$v) {_vm.$set(_vm.line, "fontSize", _vm._n($$v))},expression:"line.fontSize"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"颜色"}},[_c('el-color-picker',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.fontColor),callback:function ($$v) {_vm.$set(_vm.line, "fontColor", $$v)},expression:"line.fontColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"背景"}},[_c('el-color-picker',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.textBackground),callback:function ($$v) {_vm.$set(_vm.line, "textBackground", $$v)},expression:"line.textBackground"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"倾斜"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.fontStyle),callback:function ($$v) {_vm.$set(_vm.line, "fontStyle", $$v)},expression:"line.fontStyle"}},[_c('a-select-option',{attrs:{"value":'normal'}},[_vm._v("正常")]),_c('a-select-option',{attrs:{"value":'italic'}},[_vm._v("倾斜")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"加粗"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.fontWeight),callback:function ($$v) {_vm.$set(_vm.line, "fontWeight", $$v)},expression:"line.fontWeight"}},[_c('a-select-option',{attrs:{"value":'normal'}},[_vm._v("正常")]),_c('a-select-option',{attrs:{"value":'bold'}},[_vm._v("加粗")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"水平对齐"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.textAlign),callback:function ($$v) {_vm.$set(_vm.line, "textAlign", $$v)},expression:"line.textAlign"}},[_c('a-select-option',{attrs:{"value":'left'}},[_vm._v("左对齐")]),_c('a-select-option',{attrs:{"value":'center'}},[_vm._v("居中")]),_c('a-select-option',{attrs:{"value":'right'}},[_vm._v("右对齐")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"垂直对齐"}},[_c('a-select',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.textBaseline),callback:function ($$v) {_vm.$set(_vm.line, "textBaseline", $$v)},expression:"line.textBaseline"}},[_c('a-select-option',{attrs:{"value":'top'}},[_vm._v("顶部对齐")]),_c('a-select-option',{attrs:{"value":'middle'}},[_vm._v("居中")]),_c('a-select-option',{attrs:{"value":'bottom'}},[_vm._v("底部对齐")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"行高"}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.lineHeight),callback:function ($$v) {_vm.$set(_vm.line, "lineHeight", _vm._n($$v))},expression:"line.lineHeight"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"最大行数"}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.textMaxLine),callback:function ($$v) {_vm.$set(_vm.line, "textMaxLine", _vm._n($$v))},expression:"line.textMaxLine"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"水平偏移（px）"}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.textOffsetX),callback:function ($$v) {_vm.$set(_vm.line, "textOffsetX", _vm._n($$v))},expression:"line.textOffsetX"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"垂直偏移（px）"}},[_c('a-input-number',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.textOffsetY),callback:function ($$v) {_vm.$set(_vm.line, "textOffsetY", _vm._n($$v))},expression:"line.textOffsetY"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"内容"}},[_c('a-textarea',{on:{"change":_vm.textChange},model:{value:(_vm.text),callback:function ($$v) {_vm.text=$$v},expression:"text"}})],1)],1)],1)],1)],1)]),_c('a-tab-pane',{key:"2",attrs:{"tab":"事件"}},[_c('div',{staticClass:"div-scoll"},[_c('a-tabs',{attrs:{"default-active-key":"1","size":"small"}},[_c('a-tab-pane',{key:"1",attrs:{"tab":"事件"}},[_c('a-button',{staticStyle:{"width":"90%","margin":"5px 5%"},attrs:{"type":"primary"},on:{"click":_vm.addEvent}},[_vm._v("添加事件")]),_c('add-event',{ref:"addEvent",on:{"ok":_vm.saveEvent}}),_c('a-collapse',{model:{value:(_vm.activeKey),callback:function ($$v) {_vm.activeKey=$$v},expression:"activeKey"}},_vm._l((_vm.line.events),function(item,index){return _c('a-collapse-panel',{key:String(index),attrs:{"header":'事件' + (index + 1)}},[_c('a-tooltip',{attrs:{"slot":"extra","placement":"topLeft","title":"删除"},slot:"extra"},[_c('a-icon',{staticStyle:{"font-size":"2vh"},attrs:{"type":"delete"},on:{"click":function($event){return _vm.remove(index)}}})],1),_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件类型：")]),_c('a-input',{attrs:{"value":_vm.getEventType(item.type),"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件行为：")]),_c('a-input',{attrs:{"value":_vm.getEventAction(item.action),"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件动作：")]),_c('a-textarea',{attrs:{"value":item.value,"rows":6,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件标签：")]),_c('a-input',{attrs:{"value":item.params,"disabled":""}})],1)],1)],1)}),1)],1),_c('a-tab-pane',{key:"2",attrs:{"tab":"条件触发器"}},[_c('a-button',{staticStyle:{"width":"90%","margin":"5px 5%"},attrs:{"type":"primary"},on:{"click":_vm.addWheres}},[_vm._v("添加触发器")]),_c('add-wheres',{ref:"addWheres",on:{"ok":_vm.saveWheres}}),_c('a-collapse',{model:{value:(_vm.activeWheresKey),callback:function ($$v) {_vm.activeWheresKey=$$v},expression:"activeWheresKey"}},_vm._l((_vm.line.wheres),function(item,index){return _c('a-collapse-panel',{key:String(index),attrs:{"header":'触发器' + (index + 1)}},[_c('a-tooltip',{attrs:{"slot":"extra","placement":"topLeft","title":"删除"},slot:"extra"},[_c('a-icon',{staticStyle:{"font-size":"2vh"},attrs:{"type":"delete"},on:{"click":function($event){return _vm.removeWhere(index)}}})],1),_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("属性名：")]),_c('a-input',{attrs:{"value":item.key,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("条件：")]),_c('a-input',{attrs:{"value":item.comparison,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("属性值：")]),_c('a-input',{attrs:{"value":item.value,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("JavaScript：")]),_c('a-textarea',{attrs:{"value":item.fn,"rows":6,"disabled":""}})],1)],1),_c('a-collapse',{model:{value:(_vm.activeWheresKeyActions),callback:function ($$v) {_vm.activeWheresKeyActions=$$v},expression:"activeWheresKeyActions"}},_vm._l((item.actions),function(it,ind){return _c('a-collapse-panel',{key:String(ind),attrs:{"header":'事件' + (ind + 1)}},[_c('a-row',{attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件行为：")]),_c('a-input',{attrs:{"value":_vm.getEventAction(it.action),"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件动作：")]),_c('a-textarea',{attrs:{"value":it.value,"rows":6,"disabled":""}})],1),_c('a-col',{staticStyle:{"padding":"0px 6%"},attrs:{"span":24}},[_c('span',{staticStyle:{"float":"left"}},[_vm._v("事件标签：")]),_c('a-input',{attrs:{"value":it.params,"disabled":""}})],1)],1)],1)}),1)],1)}),1)],1)],1)],1)]),_c('a-tab-pane',{key:"3",attrs:{"tab":"动效"}},[_c('div',{staticClass:"div-scoll",staticStyle:{"text-align":"left"}},[_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"动画"}}),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"自动播放","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-switch',{model:{value:(_vm.line.animatePlay),callback:function ($$v) {_vm.$set(_vm.line, "animatePlay", $$v)},expression:"line.animatePlay"}})],1),_c('a-form-item',{attrs:{"label":"反向流动","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-switch',{model:{value:(_vm.line.animateReverse),callback:function ($$v) {_vm.$set(_vm.line, "animateReverse", $$v)},expression:"line.animateReverse"}})],1),_c('a-form-item',{attrs:{"label":"动画类型","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{on:{"change":_vm.animateTypeShow},model:{value:(_vm.line.animateType),callback:function ($$v) {_vm.$set(_vm.line, "animateType", $$v)},expression:"line.animateType"}},_vm._l((_vm.animateType),function(item,index){return _c('a-select-option',{key:index,attrs:{"value":item.type}},[_vm._v(" "+_vm._s(item.name)+" ")])}),1)],1),_c('a-form-item',{attrs:{"label":"颜色","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('el-color-picker',{on:{"change":_vm.uploadLine},model:{value:(_vm.line.animateColor),callback:function ($$v) {_vm.$set(_vm.line, "animateColor", $$v)},expression:"line.animateColor"}})],1),_c('a-form-item',{attrs:{"label":"快慢","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-slider',{attrs:{"min":1,"max":5},model:{value:(_vm.line.animateSpan),callback:function ($$v) {_vm.$set(_vm.line, "animateSpan", $$v)},expression:"line.animateSpan"}})],1),_c('a-form-item',{attrs:{"label":"圆点大小","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{attrs:{"type":"number"},model:{value:(_vm.line.animateDotSize),callback:function ($$v) {_vm.$set(_vm.line, "animateDotSize", _vm._n($$v))},expression:"line.animateDotSize"}})],1),_c('a-form-item',{attrs:{"label":"循环次数","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{attrs:{"placeholder":"<1无限循环"},model:{value:(_vm.line.animateCycle),callback:function ($$v) {_vm.$set(_vm.line, "animateCycle", $$v)},expression:"line.animateCycle"}})],1),_c('a-form-item',{attrs:{"wrapper-col":{ span: 18, offset: 3 }}},[_c('a-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.play),expression:"play"}],staticStyle:{"margin":"2%"},attrs:{"type":"primary","icon":"caret-right"},on:{"click":_vm.lineStartPlay}},[_vm._v("播放")]),_c('a-button',{directives:[{name:"show",rawName:"v-show",value:(!_vm.play),expression:"!play"}],staticStyle:{"margin":"2%"},attrs:{"type":"danger","icon":"pause-circle"},on:{"click":_vm.linePausePlay}},[_vm._v("暂停")]),_c('a-button',{attrs:{"type":"primary","icon":"close-circle"},on:{"click":_vm.lineStopPlay}},[_vm._v("停止")])],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"音频"}}),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"音频/视频","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.line.audio),callback:function ($$v) {_vm.$set(_vm.line, "audio", $$v)},expression:"line.audio"}})],1),_c('a-form-item',{attrs:{"label":"播放方式","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-select',{model:{value:(_vm.line.playType),callback:function ($$v) {_vm.$set(_vm.line, "playType", $$v)},expression:"line.playType"}},[_c('a-select-option',{key:"0",attrs:{"value":0}},[_vm._v("手动播放")]),_c('a-select-option',{key:"1",attrs:{"value":1}},[_vm._v("自动播放")]),_c('a-select-option',{key:"2",attrs:{"value":2}},[_vm._v("跟随动画")])],1)],1),_c('a-form-item',{attrs:{"label":"是否循环","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-switch',{model:{value:(_vm.line.playLoop),callback:function ($$v) {_vm.$set(_vm.line, "playLoop", $$v)},expression:"line.playLoop"}})],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"外部网页"}}),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"网页URL","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input',{model:{value:(_vm.line.iframe),callback:function ($$v) {_vm.$set(_vm.line, "iframe", $$v)},expression:"line.iframe"}})],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)","margin-top":"10px"},attrs:{"title":"鼠标提示"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-form-item',{attrs:{"label":"Markdown/html"}},[_c('a-input',{attrs:{"type":"textarea"},model:{value:(_vm.line.markdown),callback:function ($$v) {_vm.$set(_vm.line, "markdown", $$v)},expression:"line.markdown"}})],1),_c('a-form-item',{attrs:{"label":"原生title"}},[_c('a-input',{attrs:{"type":"textarea"},model:{value:(_vm.line.title),callback:function ($$v) {_vm.$set(_vm.line, "title", $$v)},expression:"line.title"}})],1),_c('a-form-item',{attrs:{"label":"HTMLElement ID"}},[_c('a-input',{model:{value:(_vm.line.tipId),callback:function ($$v) {_vm.$set(_vm.line, "tipId", $$v)},expression:"line.tipId"}})],1)],1)],1)]),_c('a-tab-pane',{key:"4",attrs:{"tab":"数据"}},[_c('div',{staticClass:"div-scoll"},[_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"id","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-input',{attrs:{"disabled":true},model:{value:(_vm.line.id),callback:function ($$v) {_vm.$set(_vm.line, "id", $$v)},expression:"line.id"}})],1),_c('a-form-item',{attrs:{"label":"标签","label-col":{ span: 6 },"wrapper-col":{ span: 15 }}},[_c('a-input',{attrs:{"placeholder":"回车即可添加"},nativeOn:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.enterTage($event)}},model:{value:(_vm.tag),callback:function ($$v) {_vm.tag=$$v},expression:"tag"}})],1),_c('div',{staticStyle:{"text-align":"left"}},_vm._l((_vm.line.tags),function(item,index){return _c('a-tag',{key:index,staticStyle:{"margin":"5px 5px"},attrs:{"color":"#2db7f5","closable":""},on:{"close":function($event){return _vm.tagClose(item, index)}}},[_vm._v(" "+_vm._s(item)+" ")])}),1)],1)],1)]),_c('a-tab-pane',{key:"5",attrs:{"tab":"结构"}},[_c('div',{staticClass:"div-scoll"},[_c('a-directory-tree',{staticStyle:{"text-align":"left"},attrs:{"multiple":"","default-expand-all":""}},[_c('a-tree-node',{key:"0-0",attrs:{"title":'[连线]' + '-' + _vm.line.name}})],1)],1)])],1)],1)}
var LineViewvue_type_template_id_117df5b0_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/LineView.vue?vue&type=template&id=117df5b0&

// CONCATENATED MODULE: ./src/utils/topology/linesettings.js
var linesettings_animateType = [{
  name: "水流",
  type: ""
}, {
  name: "水珠流动",
  type: "beads"
}, {
  name: "圆点",
  type: "dot"
}, {
  name: "彗星",
  type: "comet"
}];
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/LineView.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//






/* harmony default export */ var LineViewvue_type_script_lang_js_ = ({
  props: {
    line: {
      type: Object
    }
  },
  components: {
    AddEvent: AddEvent,
    AddWheres: AddWheres
  },
  data: function data() {
    return {
      activeName: "1",
      activeKey: ["0"],
      activeWheresKey: ["0"],
      activeWheresKeyActions: ["0"],
      lineOther: lineOther,
      datas: {},
      lineList: lineList,
      arrowTypes: arrowTypes,
      fromArrowColor: this.line.fromArrowColor ? this.line.fromArrowColor : "#000",
      toArrowColor: this.line.toArrowColor ? this.line.toArrowColor : "#000",
      strokeStyle: this.line.strokeStyle ? this.line.strokeStyle : "#000",
      borderColor: this.line.borderColor ? this.line.borderColor : "#000",
      text: this.line.text ? this.line.text : "",
      animateColor: this.line.animateColor ? this.line.animateColor : "#fff",
      tag: "",
      animateType: linesettings_animateType,
      play: true
    };
  },
  methods: {
    handleFromArrowColor: function handleFromArrowColor(val) {
      this.line.fromArrowColor = val;
      this.uploadLine(val);
    },
    handleAnimateColor: function handleAnimateColor(val) {
      this.line.animateColor = val;
      this.uploadLine(val);
    },
    handleToArrowColor: function handleToArrowColor(val) {
      this.line.toArrowColor = val;
      this.uploadLine(val);
    },
    handleBorderColor: function handleBorderColor(val) {
      this.line.borderColor = val;
    },
    handleStrokeStyle: function handleStrokeStyle(val) {
      this.line.strokeStyle = val;
      this.uploadLine(val);
    },
    textChange: function textChange(val) {
      this.line.text = this.text;
      this.uploadLine(val);
    },
    remove: function remove(index) {
      this.$delete(this.line.events, index);
    },
    removeWhere: function removeWhere(index) {
      this.$delete(this.line.wheres, index);
    },
    getEventType: function getEventType(type) {
      switch (type) {
        case 0:
          return "单击";

        case 1:
          return "双击";

        case 2:
          return "Websocket事件";

        case 3:
          return "MQTT";
      }
    },
    getEventAction: function getEventAction(action) {
      switch (action) {
        case 0:
          return "打开链接";

        case 1:
          return "执行动画";

        case 5:
          return "暂停动画";

        case 6:
          return "停止动画";

        case 2:
          return "执行JavaScript";

        case 3:
          return "执行window函数";

        case 7:
          return "自定义消息";
      }
    },
    tagClose: function tagClose(val, index) {
      this.$delete(this.line.tags, index);
    },
    enterTage: function enterTage() {
      this.line.tags.push(this.tag);
      this.tag = "";
    },
    lineStartPlay: function lineStartPlay() {
      this.line.initAnimate();
      this.line.startAnimate();
      this.play = false;
    },
    linePausePlay: function linePausePlay() {
      this.line.initAnimate();
      this.line.pauseAnimate();
      this.play = true;
    },
    lineStopPlay: function lineStopPlay() {
      this.line.initAnimate();
      this.line.stopAnimate();
      this.play = true;
    },
    animateTypeShow: function animateTypeShow() {
      this.line.animateFrames = [];
      /* Cannot get final name for export "setAnimate" in "./src/utils/topology/linesettings.js" (known exports: animateType, known reexports: ) */ undefined(this.line);
    },
    addEvent: function addEvent() {
      this.$refs.addEvent.add();
    },
    saveEvent: function saveEvent(data) {
      this.line.events.push(data);
    },
    addWheres: function addWheres() {
      this.$refs.addWheres.add();
    },
    saveWheres: function saveWheres(data) {
      var _this = this;

      if (!!this.line.wheres) {
        this.line.wheres.push(data);
      } else {
        var params = [];
        params.push(data);
        this.$nextTick(function () {
          _this.$set(_this.line, "wheres", params);
        });
      }
    },
    uploadLine: function uploadLine(val) {
      this.$emit("ok", this.line);
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/LineView.vue?vue&type=script&lang=js&
 /* harmony default export */ var topology_LineViewvue_type_script_lang_js_ = (LineViewvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/components/topology/LineView.vue?vue&type=style&index=0&lang=scss&
var LineViewvue_type_style_index_0_lang_scss_ = __webpack_require__("136e");

// CONCATENATED MODULE: ./src/components/topology/LineView.vue






/* normalize component */

var LineView_component = normalizeComponent(
  topology_LineViewvue_type_script_lang_js_,
  LineViewvue_type_template_id_117df5b0_render,
  LineViewvue_type_template_id_117df5b0_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var LineView = (LineView_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/PensView.vue?vue&type=template&id=37844269&
var PensViewvue_type_template_id_37844269_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('a-tabs',{staticStyle:{"text-align":"left"},attrs:{"default-active-key":"1","size":"small"}},[_c('a-tab-pane',{key:"1",attrs:{"tab":"外观"}},[_c('div',{staticClass:"div-scoll"},[_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)"},attrs:{"title":"对齐"}}),_c('a-row',{staticStyle:{"margin":"0 5%"},attrs:{"gutter":24}},[_c('a-col',{attrs:{"span":3}},[_c('a-tooltip',{attrs:{"placement":"top"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("左对齐")])]),_c('i',{staticClass:"t-align-left t-icon",on:{"click":function($event){return _vm.clickAlignment('left')}}})],2)],1),_c('a-col',{attrs:{"span":3}},[_c('a-tooltip',{attrs:{"placement":"top"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("右对齐")])]),_c('i',{staticClass:"t-align-right t-icon",on:{"click":function($event){return _vm.clickAlignment('right')}}})],2)],1),_c('a-col',{attrs:{"span":3}},[_c('a-tooltip',{attrs:{"placement":"top"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("顶部对齐")])]),_c('i',{staticClass:"t-align-top t-icon",on:{"click":function($event){return _vm.clickAlignment('top')}}})],2)],1),_c('a-col',{attrs:{"span":3}},[_c('a-tooltip',{attrs:{"placement":"top"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("底部对齐")])]),_c('i',{staticClass:"t-align-bottom t-icon",on:{"click":function($event){return _vm.clickAlignment('bottom')}}})],2)],1),_c('a-col',{attrs:{"span":3}},[_c('a-tooltip',{attrs:{"placement":"top"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("垂直居中")])]),_c('i',{staticClass:"t-align-center t-icon",on:{"click":function($event){return _vm.clickAlignment('center')}}})],2)],1),_c('a-col',{attrs:{"span":3}},[_c('a-tooltip',{attrs:{"placement":"top"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("水平居中")])]),_c('i',{staticClass:"t-align-middle t-icon",on:{"click":function($event){return _vm.clickAlignment('middle')}}})],2)],1),_c('a-col',{attrs:{"span":3}},[_c('a-tooltip',{attrs:{"placement":"top"}},[_c('template',{slot:"title"},[_c('span',[_vm._v("等距分布，两端对齐，节点之间的间隔都相等")])]),_c('i',{staticClass:"t-icon t-horizontal-between",on:{"click":function($event){return _vm.clickSpaceBetween(50)}}})],2)],1)],1),_c('a-divider'),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)"},attrs:{"title":"样式"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-row',{staticStyle:{"margin-left":"0px","margin-right":"0px"},attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"线条"}},[_c('a-select',{on:{"change":function($event){return _vm.updateNode('dash',_vm.node.dash)}},model:{value:(_vm.node.dash),callback:function ($$v) {_vm.$set(_vm.node, "dash", $$v)},expression:"node.dash"}},_vm._l((_vm.lineOther),function(item){return _c('a-select-option',{key:item.type,attrs:{"value":item.type}},[_c('i',{class:("" + (item.name)),staticStyle:{"font-size":"7vh"}})])}),1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"线条颜色"}},[_c('el-color-picker',{on:{"change":function($event){return _vm.updateNode('strokeStyle',_vm.node.strokeStyle)}},model:{value:(_vm.node.strokeStyle),callback:function ($$v) {_vm.$set(_vm.node, "strokeStyle", $$v)},expression:"node.strokeStyle"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"线条宽度 (px)"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('lineWidth',_vm.node.lineWidth)}},model:{value:(_vm.node.lineWidth),callback:function ($$v) {_vm.$set(_vm.node, "lineWidth", _vm._n($$v))},expression:"node.lineWidth"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"背景"}},[_c('a-select',{on:{"change":function($event){return _vm.updateNode('bkType',_vm.node.bkType)}},model:{value:(_vm.node.bkType),callback:function ($$v) {_vm.$set(_vm.node, "bkType", $$v)},expression:"node.bkType"}},[_c('a-select-option',{attrs:{"value":0}},[_vm._v("纯色背景")]),_c('a-select-option',{attrs:{"value":1}},[_vm._v("线性渐变")]),_c('a-select-option',{attrs:{"value":2}},[_vm._v("径向渐变")])],1)],1)],1),(_vm.node.bkType === 0)?_c('div',[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"背景颜色"}},[_c('el-color-picker',{on:{"change":function($event){return _vm.updateNode('fillStyle',_vm.node.fillStyle)}},model:{value:(_vm.node.fillStyle),callback:function ($$v) {_vm.$set(_vm.node, "fillStyle", $$v)},expression:"node.fillStyle"}})],1)],1)],1):_vm._e(),(_vm.node.bkType === 1)?_c('div',[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"开始颜色"}},[_c('el-color-picker',{on:{"change":function($event){return _vm.updateNode('gradientFromColor',_vm.node.gradientFromColor)}},model:{value:(_vm.node.gradientFromColor),callback:function ($$v) {_vm.$set(_vm.node, "gradientFromColor", $$v)},expression:"node.gradientFromColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"结束颜色"}},[_c('el-color-picker',{on:{"change":function($event){return _vm.updateNode('gradientToColor',_vm.node.gradientToColor)}},model:{value:(_vm.node.gradientToColor),callback:function ($$v) {_vm.$set(_vm.node, "gradientToColor", $$v)},expression:"node.gradientToColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"角度"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('gradientAngle',_vm.node.gradientAngle)}},model:{value:(_vm.node.gradientAngle),callback:function ($$v) {_vm.$set(_vm.node, "gradientAngle", _vm._n($$v))},expression:"node.gradientAngle"}})],1)],1)],1):_vm._e(),(_vm.node.bkType === 2)?_c('div',[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"开始颜色"}},[_c('el-color-picker',{on:{"change":function($event){return _vm.updateNode('gradientFromColor',_vm.node.gradientFromColor)}},model:{value:(_vm.node.gradientFromColor),callback:function ($$v) {_vm.$set(_vm.node, "gradientFromColor", $$v)},expression:"node.gradientFromColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"结束颜色"}},[_c('el-color-picker',{on:{"change":function($event){return _vm.updateNode('gradientToColor',_vm.node.gradientToColor)}},model:{value:(_vm.node.gradientToColor),callback:function ($$v) {_vm.$set(_vm.node, "gradientToColor", $$v)},expression:"node.gradientToColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"半径"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('gradientRadius',_vm.node.gradientRadius)}},model:{value:(_vm.node.gradientRadius),callback:function ($$v) {_vm.$set(_vm.node, "gradientRadius", _vm._n($$v))},expression:"node.gradientRadius"}})],1)],1)],1):_vm._e(),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":24}},[_c('a-form-item',{attrs:{"label":"透明度（0 - 1）"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('globalAlpha',_vm.node.globalAlpha)}},model:{value:(_vm.node.globalAlpha),callback:function ($$v) {_vm.$set(_vm.node, "globalAlpha", _vm._n($$v))},expression:"node.globalAlpha"}})],1)],1)],1)],1),_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)"},attrs:{"title":"文字"}}),_c('a-form',{attrs:{"layout":'vertical'}},[_c('a-row',{staticStyle:{"margin-left":"0px","margin-right":"0px"},attrs:{"gutter":24}},[_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"大小"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('fontSize',_vm.node.fontSize)}},model:{value:(_vm.node.fontSize),callback:function ($$v) {_vm.$set(_vm.node, "fontSize", _vm._n($$v))},expression:"node.fontSize"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"倾斜"}},[_c('a-select',{on:{"change":function($event){return _vm.updateNode('fontStyle',_vm.node.fontStyle)}},model:{value:(_vm.node.fontStyle),callback:function ($$v) {_vm.$set(_vm.node, "fontStyle", $$v)},expression:"node.fontStyle"}},[_c('a-select-option',{attrs:{"value":'normal'}},[_vm._v("正常")]),_c('a-select-option',{attrs:{"value":'italic'}},[_vm._v("倾斜")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"颜色"}},[_c('el-color-picker',{on:{"change":function($event){return _vm.updateNode('fontColor',_vm.node.fontColor)}},model:{value:(_vm.node.fontColor),callback:function ($$v) {_vm.$set(_vm.node, "fontColor", $$v)},expression:"node.fontColor"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"背景"}},[_c('el-color-picker',{on:{"change":function($event){return _vm.updateNode('textBackground',_vm.node.textBackground)}},model:{value:(_vm.node.textBackground),callback:function ($$v) {_vm.$set(_vm.node, "textBackground", $$v)},expression:"node.textBackground"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"加粗"}},[_c('a-select',{on:{"change":function($event){return _vm.updateNode('fontWeight',_vm.node.fontWeight)}},model:{value:(_vm.node.fontWeight),callback:function ($$v) {_vm.$set(_vm.node, "fontWeight", $$v)},expression:"node.fontWeight"}},[_c('a-select-option',{attrs:{"value":'normal'}},[_vm._v("正常")]),_c('a-select-option',{attrs:{"value":'bold'}},[_vm._v("加粗")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"水平对齐"}},[_c('a-select',{on:{"change":function($event){return _vm.updateNode('textAlign',_vm.node.textAlign)}},model:{value:(_vm.node.textAlign),callback:function ($$v) {_vm.$set(_vm.node, "textAlign", $$v)},expression:"node.textAlign"}},[_c('a-select-option',{attrs:{"value":'left'}},[_vm._v("左对齐")]),_c('a-select-option',{attrs:{"value":'center'}},[_vm._v("居中")]),_c('a-select-option',{attrs:{"value":'right'}},[_vm._v("右对齐")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"垂直对齐"}},[_c('a-select',{on:{"change":function($event){return _vm.updateNode('textBaseline',_vm.node.textBaseline)}},model:{value:(_vm.node.textBaseline),callback:function ($$v) {_vm.$set(_vm.node, "textBaseline", $$v)},expression:"node.textBaseline"}},[_c('a-select-option',{attrs:{"value":'top'}},[_vm._v("顶部对齐")]),_c('a-select-option',{attrs:{"value":'middle'}},[_vm._v("居中")]),_c('a-select-option',{attrs:{"value":'bottom'}},[_vm._v("底部对齐")])],1)],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"行高"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('lineHeight',_vm.node.lineHeight)}},model:{value:(_vm.node.lineHeight),callback:function ($$v) {_vm.$set(_vm.node, "lineHeight", _vm._n($$v))},expression:"node.lineHeight"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"最大行数"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('textMaxLine',_vm.node.textMaxLine)}},model:{value:(_vm.node.textMaxLine),callback:function ($$v) {_vm.$set(_vm.node, "textMaxLine", _vm._n($$v))},expression:"node.textMaxLine"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"水平偏移（px）"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('textOffsetX',_vm.node.textOffsetX)}},model:{value:(_vm.node.textOffsetX),callback:function ($$v) {_vm.$set(_vm.node, "textOffsetX", _vm._n($$v))},expression:"node.textOffsetX"}})],1)],1),_c('a-col',{staticStyle:{"padding-left":"2px","padding-right":"2px"},attrs:{"span":12}},[_c('a-form-item',{attrs:{"label":"垂直偏移（px）"}},[_c('a-input-number',{on:{"change":function($event){return _vm.updateNode('textOffsetY',_vm.node.textOffsetY)}},model:{value:(_vm.node.textOffsetY),callback:function ($$v) {_vm.$set(_vm.node, "textOffsetY", _vm._n($$v))},expression:"node.textOffsetY"}})],1)],1)],1)],1)],1)]),_c('a-tab-pane',{key:"2",attrs:{"tab":"布局"}},[_c('a-page-header',{staticStyle:{"border":"1px solid rgb(235, 237, 240)"},attrs:{"title":"排版"}}),_c('a-form',{attrs:{"layout":'horizontal'}},[_c('a-form-item',{attrs:{"label":"最大宽度","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{model:{value:(_vm.params.maxWidth),callback:function ($$v) {_vm.$set(_vm.params, "maxWidth", _vm._n($$v))},expression:"params.maxWidth"}})],1),_c('a-form-item',{attrs:{"label":"节点宽度","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{model:{value:(_vm.params.nodeWidth),callback:function ($$v) {_vm.$set(_vm.params, "nodeWidth", _vm._n($$v))},expression:"params.nodeWidth"}})],1),_c('a-form-item',{attrs:{"label":"节点高度","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{model:{value:(_vm.params.nodeHeight),callback:function ($$v) {_vm.$set(_vm.params, "nodeHeight", _vm._n($$v))},expression:"params.nodeHeight"}})],1),_c('a-form-item',{attrs:{"label":"水平个数","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{model:{value:(_vm.params.maxCount),callback:function ($$v) {_vm.$set(_vm.params, "maxCount", _vm._n($$v))},expression:"params.maxCount"}})],1),_c('a-form-item',{attrs:{"label":"水平间距","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{model:{value:(_vm.params.spaceWidth),callback:function ($$v) {_vm.$set(_vm.params, "spaceWidth", _vm._n($$v))},expression:"params.spaceWidth"}})],1),_c('a-form-item',{attrs:{"label":"垂直间距","label-col":{ span: 8 },"wrapper-col":{ span: 15 }}},[_c('a-input-number',{model:{value:(_vm.params.spaceHeight),callback:function ($$v) {_vm.$set(_vm.params, "spaceHeight", _vm._n($$v))},expression:"params.spaceHeight"}})],1),_c('a-form-item',{staticStyle:{"text-align":"center"}},[_c('a-button',{attrs:{"type":"primary"},on:{"click":_vm.typeSetting}},[_vm._v("开始排版")])],1)],1)],1),_c('a-tab-pane',{key:"3",attrs:{"tab":"结构"}},[_c('div',{staticClass:"div-scoll"},[_c('a-directory-tree',{staticStyle:{"text-align":"left"},attrs:{"multiple":"","default-expand-all":""}},_vm._l((_vm.pens),function(item,index){return _c('a-tree-node',{key:index,attrs:{"title":_vm.getTitle(item)}})}),1)],1)])],1)],1)}
var PensViewvue_type_template_id_37844269_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/PensView.vue?vue&type=template&id=37844269&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/PensView.vue?vue&type=script&lang=js&

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


/* harmony default export */ var PensViewvue_type_script_lang_js_ = ({
  props: {
    pens: {
      type: Array,
      require: true
    }
  },
  data: function data() {
    return {
      params: {
        maxWidth: 1000,
        nodeWidth: 0,
        nodeHeight: 0,
        maxCount: 0,
        spaceWidth: 30,
        spaceHeight: 30
      },
      lineOther: lineOther,
      node: {
        dash: 0,
        strokeStyle: "",
        lineWidth: 1,
        bkType: 0,
        fillStyle: "",
        gradientFromColor: "",
        gradientToColor: "",
        gradientAngle: 0,
        gradientRadius: 0,
        globalAlpha: 0,
        fontSize: 12,
        fontStyle: "normal",
        fontColor: "",
        textBackground: "",
        fontWeight: "normal",
        textAlign: "center",
        textBaseline: "middle",
        lineHeight: 0,
        textMaxLine: 0,
        textOffsetX: 0,
        textOffsetY: 0
      }
    };
  },
  methods: {
    getTitle: function getTitle(item) {
      if (item.type === 0) {
        return "[节点]" + " - " + item.name;
      }

      if (item.type === 1) {
        return "[连线]" + " - " + item.name;
      }

      return "";
    },
    clickAlignment: function clickAlignment(type) {
      var rect = getRect(this.pens);
      this.$emit("no", rect, type);
    },
    typeSetting: function typeSetting() {
      this.$emit("ok", this.params);
    },
    clickSpaceBetween: function clickSpaceBetween() {
      this.$emit("spaceB", this.params);
    },
    updateNode: function updateNode(name, val) {
      this.$emit("updateSub", name, val);
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/PensView.vue?vue&type=script&lang=js&
 /* harmony default export */ var topology_PensViewvue_type_script_lang_js_ = (PensViewvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./src/components/topology/PensView.vue





/* normalize component */

var PensView_component = normalizeComponent(
  topology_PensViewvue_type_script_lang_js_,
  PensViewvue_type_template_id_37844269_render,
  PensViewvue_type_template_id_37844269_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var PensView = (PensView_component.exports);
// CONCATENATED MODULE: ./src/utils/topology/data/svgset.js
var svgset_svgData = [{
  "id": "1",
  "name": "test",
  "fullname": "atlassian.ces",
  "icon": "",
  "image": "http://img11.360buyimg.com/n0/g15/M07/03/1E/rBEhWlHVFuoIAAAAAAG79RU3IvAAAAxawFBZ1kAAbwN983.jpg",
  "data": {
    "name": "atlassian.ces",
    "rect": {
      "height": 25,
      "width": 25
    },
    "image": "http://img11.360buyimg.com/n0/g15/M07/03/1E/rBEhWlHVFuoIAAAAAAG79RU3IvAAAAxawFBZ1kAAbwN983.jpg"
  },
  "class": "工具",
  "subClassId": "108095a",
  "subClassName": "工具",
  "sort": "",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "2020-06-20T15:59:41.348Z",
  "updatedAt": "2020-06-20T15:59:41.348Z",
  "deletedAt": "0001-01-01T00:00:00Z",
  "py": "ces",
  "checked": true
}];
// CONCATENATED MODULE: ./src/utils/topology/setting.js


var tools = [{
  "id": "5e634a93a5a7bfc82d0af610",
  "name": "正方形",
  "icon": "t-icon t-rect",
  "data": {
    "icon": "",
    "iconColor": "#2f54eb",
    "iconFamily": "topology",
    "name": "square",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "Topology"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a001",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e64a2f0ccc3e29a0c467e88",
  "name": "矩形",
  "icon": "t-icon t-rectangle",
  "data": {
    "font": {
      "textAlign": "left"
    },
    "icon": "",
    "iconColor": "#2f54eb",
    "iconFamily": "topology",
    "name": "rectangle",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 50,
      "width": 120
    },
    "text": "Topology",
    "textOffsetX": 10
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a002",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e64a306ccc3e29a0c467e99",
  "name": "菱形",
  "icon": "t-icon t-diamond",
  "data": {
    "name": "diamond",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "菱形"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a003",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e64a301ccc3e29a0c467e94",
  "name": "三角形",
  "icon": "t-icon t-triangle",
  "data": {
    "name": "triangle",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "三角形"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a004",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e64a2f7ccc3e29a0c467e90",
  "name": "圆",
  "icon": "t-icon t-circle",
  "data": {
    "name": "circle",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "圆"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a005",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e64a309ccc3e29a0c467e9b",
  "name": "五边形",
  "icon": "t-icon t-pentagon",
  "data": {
    "name": "pentagon",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "五边形"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a006",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e65dac9fff7c114623f1bba",
  "name": "六边形",
  "icon": "t-icon t-hexagon",
  "data": {
    "name": "hexagon",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "六边形"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a007",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e65da60fff7c114623f1b86",
  "name": "五角星",
  "icon": "t-icon t-pentagram",
  "data": {
    "name": "pentagram",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "五角星"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a008",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e65dbb6fff7c114623f1c1f",
  "name": "左箭头",
  "icon": "t-icon t-arrow-left",
  "data": {
    "name": "leftArrow",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 60,
      "width": 120
    },
    "text": "左箭头"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a009",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e65dbdafff7c114623f1c2a",
  "name": "右箭头",
  "icon": "t-icon t-arrow-right",
  "data": {
    "name": "rightArrow",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 60,
      "width": 120
    },
    "text": "右箭头"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a010",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e65dc07fff7c114623f1c40",
  "name": "双向箭头",
  "icon": "t-icon t-twoway-arrow",
  "data": {
    "name": "twowayArrow",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 60,
      "width": 150
    },
    "text": "双向箭头"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a011",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e65dda8fff7c114623f1cff",
  "name": "消息框",
  "icon": "t-icon t-msg",
  "data": {
    "name": "message",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "消息框"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a012",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e66079dfff7c114623f2d98",
  "name": "云",
  "icon": "t-icon t-cloud",
  "data": {
    "name": "cloud",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "云"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a013",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6607dbfff7c114623f2db1",
  "name": "文档",
  "icon": "t-icon t-file",
  "data": {
    "name": "file",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 80
    },
    "text": "文档"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a014",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660814fff7c114623f2dc9",
  "name": "图片",
  "icon": "t-icon t-picture",
  "data": {
    "image": "/assets/logo/logo.png",
    "name": "image",
    "paddingBottom": 0,
    "paddingLeft": 0,
    "paddingRight": 0,
    "paddingTop": 0,
    "rect": {
      "height": 100,
      "width": 100
    }
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a015",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e66084ffff7c114623f2ddf",
  "name": "文本",
  "icon": "t-icon t-text",
  "data": {
    "autoRect": true,
    "name": "text",
    "rect": {
      "height": 30,
      "width": 100
    },
    "text": "文字"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a016",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660a0ffff7c114623f2ecc",
  "name": "立方体",
  "icon": "t-icon t-cube",
  "data": {
    "fillStyle": "#ddd",
    "icon": "",
    "iconColor": "#777",
    "iconFamily": "topology",
    "iconSize": 30,
    "is3D": true,
    "name": "cube",
    "rect": {
      "height": 100,
      "width": 60
    },
    "text": "",
    "z": 40
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a017",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660a8efff7c114623f2f16",
  "name": "用户",
  "icon": "t-icon t-people",
  "data": {
    "name": "people",
    "rect": {
      "height": 100,
      "width": 70
    },
    "text": ""
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a018",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660adefff7c114623f2f37",
  "name": "视频/网页",
  "icon": "t-icon t-pc",
  "data": {
    "name": "div",
    "paddingBottom": 10,
    "paddingLeft": 10,
    "paddingRight": 10,
    "paddingTop": 10,
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "视频/网页"
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a019",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660b57fff7c114623f2f7d",
  "name": "直线",
  "icon": "t-icon t-line",
  "data": {
    "name": "line",
    "rect": {
      "height": 0,
      "width": 100
    },
    "toArrow": "",
    "type": 0
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a020",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660c32fff7c114623f3000",
  "name": "连线",
  "icon": "t-icon t-curve2",
  "data": {
    "manualCps": true,
    "name": "curve",
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "",
    "type": 1
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a021",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660c32fff7c114623f3001",
  "name": "涂鸦",
  "icon": "t-icon t-pencil",
  "data": {
    "doing": true,
    "name": "graffiti",
    "rect": {
      "height": 0,
      "width": 0
    }
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a022",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "605060e80e4624bd91f31353",
  "name": "涂鸦2",
  "icon": "t-icon t-pencil-close",
  "data": {
    "closePath": true,
    "doing": true,
    "name": "graffiti",
    "rect": {
      "height": 0,
      "width": 0
    }
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a022",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660c32fff7c114623f3002",
  "name": "钢笔",
  "icon": "t-icon t-pen",
  "data": {
    "doing": true,
    "name": "lines",
    "rect": {
      "height": 0,
      "width": 0
    },
    "type": 1
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a023",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660c52fff7c114623f3002",
  "name": "钢笔节点",
  "icon": "t-icon t-dakai",
  "data": {
    "doing": true,
    "name": "lines",
    "rect": {
      "height": 0,
      "width": 0
    },
    "type": 0
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a024",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e661c52fff7c114623f3002",
  "name": "钢笔闭合节点",
  "icon": "t-icon t-quanfengbi",
  "data": {
    "closePath": true,
    "doing": true,
    "name": "lines",
    "rect": {
      "height": 0,
      "width": 0
    },
    "type": 0
  },
  "class": "架构拓扑图",
  "subClassId": "183bf0d2",
  "subClassName": "基本形状",
  "sort": "a024",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660c32fff7c114623f3100",
  "name": "主题",
  "icon": "t-icon t-zhuti",
  "data": {
    "borderRadius": 0.5,
    "name": "mindNode",
    "rect": {
      "height": 50,
      "width": 200
    },
    "text": "主题"
  },
  "class": "架构拓扑图",
  "subClassId": "7e319b51",
  "subClassName": "脑图",
  "sort": "a001",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e660c32fff7c114623f3101",
  "name": "子主题",
  "icon": "t-icon t-zizhuti",
  "data": {
    "name": "mindLine",
    "rect": {
      "height": 40,
      "width": 160
    },
    "text": "子主题"
  },
  "class": "架构拓扑图",
  "subClassId": "7e319b51",
  "subClassName": "脑图",
  "sort": "a002",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e689451b60b4d01c919a5ae",
  "name": "开始/结束",
  "icon": "t-icon t-flow-start",
  "data": {
    "borderRadius": 0.5,
    "name": "rectangle",
    "rect": {
      "height": 40,
      "width": 120
    },
    "text": "开始"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b001",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f057fcb861e383de58ad5",
  "name": "流程",
  "icon": "t-icon t-rectangle",
  "data": {
    "name": "rectangle",
    "rect": {
      "height": 40,
      "width": 120
    },
    "text": "流程"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b002",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f05cdcb861e383de58b0f",
  "name": "判定",
  "icon": "t-icon t-diamond",
  "data": {
    "name": "diamond",
    "rect": {
      "height": 60,
      "width": 120
    },
    "text": "判定"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b003",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f05ffcb861e383de58b23",
  "name": "数据",
  "icon": "t-icon t-flow-data",
  "data": {
    "name": "flowData",
    "rect": {
      "height": 50,
      "width": 120
    },
    "text": "数据"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b004",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f07bccb861e383de58c13",
  "name": "准备",
  "icon": "t-icon t-flow-ready",
  "data": {
    "name": "hexagon",
    "rect": {
      "height": 50,
      "width": 120
    },
    "text": "准备"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b005",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f07fbcb861e383de58c30",
  "name": "子流程",
  "icon": "t-icon t-flow-subprocess",
  "data": {
    "name": "flowSubprocess",
    "rect": {
      "height": 50,
      "width": 120
    },
    "text": "子流程"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b006",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f082acb861e383de58c45",
  "name": "数据库",
  "icon": "t-icon t-db",
  "data": {
    "name": "flowDb",
    "rect": {
      "height": 120,
      "width": 80
    },
    "text": "数据库"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b007",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f086ccb861e383de58c64",
  "name": "文档",
  "icon": "t-icon t-flow-document",
  "data": {
    "name": "flowDocument",
    "rect": {
      "height": 100,
      "width": 120
    },
    "text": "文档"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b008",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f08b7cb861e383de58c82",
  "name": "内部存储",
  "icon": "t-icon t-internal-storage",
  "data": {
    "name": "flowInternalStorage",
    "rect": {
      "height": 80,
      "width": 120
    },
    "text": "内部存储"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b009",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f08dccb861e383de58c93",
  "name": "外部存储",
  "icon": "t-icon t-extern-storage",
  "data": {
    "name": "flowExternStorage",
    "rect": {
      "height": 80,
      "width": 120
    },
    "text": "外部存储"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b010",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0928cb861e383de58cb2",
  "name": "队列",
  "icon": "t-icon t-flow-queue",
  "data": {
    "name": "flowQueue",
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "队列"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b011",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0959cb861e383de58ccc",
  "name": "手动输入",
  "icon": "t-icon t-flow-manually",
  "data": {
    "name": "flowManually",
    "rect": {
      "height": 80,
      "width": 120
    },
    "text": "手动输入"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b012",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0984cb861e383de58cde",
  "name": "展示",
  "icon": "t-icon t-flow-display",
  "data": {
    "name": "flowDisplay",
    "rect": {
      "height": 80,
      "width": 120
    },
    "text": "展示"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b014",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f09b2cb861e383de58cf4",
  "name": "并行模式",
  "icon": "t-icon t-flow-parallel",
  "data": {
    "name": "flowParallel",
    "rect": {
      "height": 50,
      "width": 120
    },
    "text": "并行模式"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b015",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f09e1cb861e383de58d0a",
  "name": "注释",
  "icon": "t-icon t-flow-comment",
  "data": {
    "name": "flowComment",
    "rect": {
      "height": 100,
      "width": 100
    },
    "text": "注释"
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b016",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0a38cb861e383de58d2c",
  "name": "用户",
  "icon": "t-icon t-people",
  "data": {
    "name": "people",
    "rect": {
      "height": 100,
      "width": 70
    },
    "text": ""
  },
  "class": "UML图",
  "subClassId": "4d45c86",
  "subClassName": "流程图",
  "sort": "b017",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0a96cb861e383de58d55",
  "name": "开始",
  "icon": "t-icon t-inital",
  "data": {
    "fillStyle": "#555",
    "name": "circle",
    "rect": {
      "height": 30,
      "width": 30
    },
    "strokeStyle": "transparent",
    "text": ""
  },
  "class": "UML图",
  "subClassId": "2ff994d",
  "subClassName": "活动图",
  "sort": "b018",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0af8cb861e383de58d80",
  "name": "活动",
  "icon": "t-icon t-action",
  "data": {
    "borderRadius": 0.25,
    "name": "rectangle",
    "rect": {
      "height": 50,
      "width": 150
    },
    "text": "活动"
  },
  "class": "UML图",
  "subClassId": "2ff994d",
  "subClassName": "活动图",
  "sort": "b019",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0ac1cb861e383de58d69",
  "name": "结束",
  "icon": "t-icon t-final",
  "data": {
    "name": "activityFinal",
    "rect": {
      "height": 30,
      "width": 30
    },
    "text": ""
  },
  "class": "UML图",
  "subClassId": "2ff994d",
  "subClassName": "活动图",
  "sort": "b019",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0b3fcb861e383de58d9e",
  "name": "决策/合并",
  "icon": "t-icon t-diamond",
  "data": {
    "name": "diamond",
    "rect": {
      "height": 50,
      "width": 120
    },
    "text": "决策"
  },
  "class": "UML图",
  "subClassId": "2ff994d",
  "subClassName": "活动图",
  "sort": "b020",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0b72cb861e383de58db4",
  "name": "垂直泳道",
  "icon": "t-icon t-swimlane-v",
  "data": {
    "name": "swimlaneV",
    "rect": {
      "height": 500,
      "width": 200
    },
    "text": "垂直泳道"
  },
  "class": "UML图",
  "subClassId": "2ff994d",
  "subClassName": "活动图",
  "sort": "b021",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0ba3cb861e383de58dcc",
  "name": "水平泳道",
  "icon": "t-icon t-swimlane-h",
  "data": {
    "name": "swimlaneH",
    "rect": {
      "height": 200,
      "width": 500
    },
    "text": "水平泳道"
  },
  "class": "UML图",
  "subClassId": "2ff994d",
  "subClassName": "活动图",
  "sort": "b022",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0c16cb861e383de58df7",
  "name": "垂直分岔/汇合",
  "icon": "t-icon t-fork-v",
  "data": {
    "fillStyle": "#555",
    "name": "forkV",
    "rect": {
      "height": 150,
      "width": 10
    },
    "strokeStyle": "transparent",
    "text": ""
  },
  "class": "UML图",
  "subClassId": "2ff994d",
  "subClassName": "活动图",
  "sort": "b023",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0c47cb861e383de58e10",
  "name": "水平分岔/汇合",
  "icon": "t-icon t-fork",
  "data": {
    "fillStyle": "#555",
    "name": "forkH",
    "rect": {
      "height": 10,
      "width": 150
    },
    "strokeStyle": "transparent",
    "text": ""
  },
  "class": "UML图",
  "subClassId": "2ff994d",
  "subClassName": "活动图",
  "sort": "b024",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0cc1cb861e383de58e40",
  "name": "生命线",
  "icon": "t-icon t-lifeline",
  "data": {
    "name": "lifeline",
    "rect": {
      "height": 240,
      "width": 150
    },
    "text": "生命线"
  },
  "class": "UML图",
  "subClassId": "53c1df",
  "subClassName": "时序图和类图",
  "sort": "b025",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0cf6cb861e383de58e57",
  "name": "激活",
  "icon": "t-icon t-focus",
  "data": {
    "name": "sequenceFocus",
    "rect": {
      "height": 200,
      "width": 12
    },
    "text": ""
  },
  "class": "UML图",
  "subClassId": "53c1df",
  "subClassName": "时序图和类图",
  "sort": "b026",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0da7cb861e383de58e99",
  "name": "简单类",
  "icon": "t-icon t-simple-class",
  "data": {
    "children": [{
      "font": {
        "color": "#222",
        "fontFamily": "Arial",
        "textAlign": "left",
        "textBaseline": "top"
      },
      "name": "text",
      "paddingBottom": 10,
      "paddingLeft": 10,
      "paddingRight": 10,
      "paddingTop": 10,
      "rectInParent": {
        "height": "100%",
        "rotate": 0,
        "width": "100%",
        "x": 0,
        "y": 0
      },
      "text": ""
    }],
    "fillStyle": "#ffffba",
    "font": {
      "color": "#222",
      "fontFamily": "Arial",
      "fontWeight": "bold"
    },
    "name": "simpleClass",
    "paddingTop": 40,
    "rect": {
      "height": 200,
      "width": 270
    },
    "strokeStyle": "#7e1212",
    "text": "Topolgoy"
  },
  "class": "UML图",
  "subClassId": "53c1df",
  "subClassName": "时序图和类图",
  "sort": "b027",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0dfccb861e383de58ebe",
  "name": "类",
  "icon": "t-icon t-class",
  "data": {
    "children": [{
      "font": {
        "color": "#222",
        "fontFamily": "Arial",
        "textAlign": "left",
        "textBaseline": "top"
      },
      "name": "text",
      "paddingBottom": 10,
      "paddingLeft": 10,
      "paddingRight": 10,
      "paddingTop": 10,
      "rectInParent": {
        "height": "50%",
        "rotate": 0,
        "width": "100%",
        "x": 0,
        "y": 0
      },
      "text": "- name: string"
    }, {
      "font": {
        "color": "#222",
        "fontFamily": "Arial",
        "textAlign": "left",
        "textBaseline": "top"
      },
      "name": "text",
      "paddingBottom": 10,
      "paddingLeft": 10,
      "paddingRight": 10,
      "paddingTop": 10,
      "rectInParent": {
        "height": "50%",
        "rotate": 0,
        "width": "100%",
        "x": 0,
        "y": "50%"
      },
      "text": "+ setName(name: string): void"
    }],
    "fillStyle": "#ffffba",
    "font": {
      "color": "#222",
      "fontFamily": "Arial",
      "fontWeight": "bold"
    },
    "name": "interfaceClass",
    "paddingTop": 40,
    "rect": {
      "height": 200,
      "width": 270
    },
    "strokeStyle": "#7e1212",
    "text": "Topolgoy"
  },
  "class": "UML图",
  "subClassId": "53c1df",
  "subClassName": "时序图和类图",
  "sort": "b028",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0e72cb861e383de58eed",
  "name": "折线图",
  "icon": "t-icon t-line-chart",
  "data": {
    "data": {
      "echarts": {
        "option": {
          "title": {
            "text": '折线图堆叠'
          },
          "tooltip": {
            "trigger": 'axis'
          },
          "legend": {
            "data": ['测试1']
          },
          "grid": {
            "left": '3%',
            "right": '4%',
            "bottom": '3%',
            "containLabel": true
          },
          "toolbox": {
            "feature": {
              "saveAsImage": {}
            }
          },
          "xAxis": {
            "type": 'category',
            "boundaryGap": false,
            "data": ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
          },
          "yAxis": {
            "type": 'value'
          },
          "series": [{
            "name": '测试1',
            "type": 'line',
            "stack": '总量',
            "data": [120, 132, 101, 134, 90, 230, 210]
          }]
        }
      }
    },
    "name": "echarts",
    "rect": {
      "height": 200,
      "width": 300
    },
    "text": ""
  },
  "class": "图表",
  "subClassId": "4f5e710b",
  "subClassName": "Echarts图表",
  "sort": "c001",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0ebfcb861e383de58f10",
  "name": "柱状图",
  "icon": "t-icon t-bar-chart",
  "data": {
    "data": {
      "echarts": {
        "option": {
          "title": {
            "text": '某地区蒸发量和降水量'
          },
          "tooltip": {
            "trigger": 'axis'
          },
          "legend": {
            "data": ['测试1']
          },
          "toolbox": {
            "show": true
          },
          "calculable": true,
          "xAxis": [{
            "type": 'category',
            "data": ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
          }],
          "yAxis": [{
            "type": 'value'
          }],
          "series": [{
            "name": '测试1',
            "type": 'bar',
            "data": [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
          }]
        }
      }
    },
    "name": "echarts",
    "rect": {
      "height": 200,
      "width": 300
    },
    "text": ""
  },
  "class": "图表",
  "subClassId": "4f5e710b",
  "subClassName": "Echarts图表",
  "sort": "c002",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0f32cb861e383de58f3c",
  "name": "饼图",
  "icon": "t-icon t-pie-chart",
  "data": {
    "data": {
      "echarts": {
        "option": {
          "legend": {
            "data": ["直接访问", "邮件营销", "联盟广告", "视频广告", "搜索引擎"],
            "orient": "vertical",
            "x": "left"
          },
          "series": [{
            "avoidLabelOverlap": false,
            "data": [{
              "name": "直接访问",
              "value": 335
            }, {
              "name": "邮件营销",
              "value": 310
            }, {
              "name": "联盟广告",
              "value": 234
            }, {
              "name": "视频广告",
              "value": 135
            }, {
              "name": "搜索引擎",
              "value": 1548
            }],
            "label": {
              "emphasis": {
                "show": true,
                "textStyle": {
                  "fontSize": "30",
                  "fontWeight": "bold"
                }
              },
              "normal": {
                "position": "center",
                "show": false
              }
            },
            "labelLine": {
              "normal": {
                "show": false
              }
            },
            "name": "访问来源",
            "radius": ["50%", "70%"],
            "type": "pie"
          }],
          "tooltip": {
            "formatter": "{a} <br/>{b}: {c} ({d}%)",
            "trigger": "item"
          }
        }
      }
    },
    "name": "echarts",
    "rect": {
      "height": 200,
      "width": 200
    },
    "text": ""
  },
  "class": "图表",
  "subClassId": "4f5e710b",
  "subClassName": "Echarts图表",
  "sort": "c003",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}, {
  "id": "5e6f0f7fcb861e383de58f5c",
  "name": "仪表盘",
  "icon": "t-icon t-dashboard-chart",
  "data": {
    "data": {
      "echarts": {
        "option": {
          "series": [{
            "data": [{
              "name": "完成率",
              "value": 50
            }],
            "detail": {
              "formatter": "{value}%"
            },
            "name": "业务指标",
            "type": "gauge"
          }],
          "toolbox": {
            "feature": {
              "restore": {},
              "saveAsImage": {}
            }
          },
          "tooltip": {
            "formatter": "{a} <br/>{b} : {c}%"
          }
        }
      }
    },
    "name": "echarts",
    "rect": {
      "height": 300,
      "width": 300
    },
    "text": ""
  },
  "class": "图表",
  "subClassId": "4f5e710b",
  "subClassName": "Echarts图表",
  "sort": "c004",
  "raw": false,
  "state": 1,
  "userId": "",
  "userName": "",
  "editorId": "",
  "editorName": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "updatedAt": "0001-01-01T00:00:00Z",
  "deletedAt": "0001-01-01T00:00:00Z"
}];
function assembleSvg() {
  var newTools = [];
  var params = {};
  var children = [];
  var group = "";
  var s = 0;

  var _iterator = _createForOfIteratorHelper(svgset_svgData),
      _step;

  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var i = _step.value;

      if (i.subClassName != group && group != "") {
        params.group = group;
        params.children = children;
        newTools.push(params);
        params = {};
        children = [];
      }

      group = i.subClassName;
      children.push(i);

      if (s == svgset_svgData.length - 1) {
        params.group = group;
        params.children = children;
        newTools.push(params);
      }

      s++;
      group = i.subClassName;
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }

  return newTools;
}
function assemble() {
  var newTools = [];
  var params = {};
  var children = [];
  var group = "";
  var s = 0;

  var _iterator2 = _createForOfIteratorHelper(tools),
      _step2;

  try {
    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
      var i = _step2.value;

      if (i.subClassName != group && group != "") {
        params.group = group;
        params.children = children;
        newTools.push(params);
        group = i.subClassName;
        params = {};
        children = [];
      }

      children.push(i);

      if (s == tools.length - 1) {
        params.group = group;
        params.children = children;
        newTools.push(params);
      }

      s++;
      group = i.subClassName;
    }
  } catch (err) {
    _iterator2.e(err);
  } finally {
    _iterator2.f();
  }

  return newTools;
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
var es_string_match = __webpack_require__("466d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
var web_dom_collections_for_each = __webpack_require__("159b");

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/jsbn/util.js
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
function int2char(n) {
    return BI_RM.charAt(n);
}
//#region BIT_OPERATIONS
// (public) this & a
function op_and(x, y) {
    return x & y;
}
// (public) this | a
function op_or(x, y) {
    return x | y;
}
// (public) this ^ a
function op_xor(x, y) {
    return x ^ y;
}
// (public) this & ~a
function op_andnot(x, y) {
    return x & ~y;
}
// return index of lowest 1-bit in x, x < 2^31
function lbit(x) {
    if (x == 0) {
        return -1;
    }
    var r = 0;
    if ((x & 0xffff) == 0) {
        x >>= 16;
        r += 16;
    }
    if ((x & 0xff) == 0) {
        x >>= 8;
        r += 8;
    }
    if ((x & 0xf) == 0) {
        x >>= 4;
        r += 4;
    }
    if ((x & 3) == 0) {
        x >>= 2;
        r += 2;
    }
    if ((x & 1) == 0) {
        ++r;
    }
    return r;
}
// return number of 1 bits in x
function cbit(x) {
    var r = 0;
    while (x != 0) {
        x &= x - 1;
        ++r;
    }
    return r;
}
//#endregion BIT_OPERATIONS

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/jsbn/base64.js

var b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var b64pad = "=";
function base64_hex2b64(h) {
    var i;
    var c;
    var ret = "";
    for (i = 0; i + 3 <= h.length; i += 3) {
        c = parseInt(h.substring(i, i + 3), 16);
        ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);
    }
    if (i + 1 == h.length) {
        c = parseInt(h.substring(i, i + 1), 16);
        ret += b64map.charAt(c << 2);
    }
    else if (i + 2 == h.length) {
        c = parseInt(h.substring(i, i + 2), 16);
        ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);
    }
    while ((ret.length & 3) > 0) {
        ret += b64pad;
    }
    return ret;
}
// convert a base64 string to hex
function b64tohex(s) {
    var ret = "";
    var i;
    var k = 0; // b64 state, 0-3
    var slop = 0;
    for (i = 0; i < s.length; ++i) {
        if (s.charAt(i) == b64pad) {
            break;
        }
        var v = b64map.indexOf(s.charAt(i));
        if (v < 0) {
            continue;
        }
        if (k == 0) {
            ret += int2char(v >> 2);
            slop = v & 3;
            k = 1;
        }
        else if (k == 1) {
            ret += int2char((slop << 2) | (v >> 4));
            slop = v & 0xf;
            k = 2;
        }
        else if (k == 2) {
            ret += int2char(slop);
            ret += int2char(v >> 2);
            slop = v & 3;
            k = 3;
        }
        else {
            ret += int2char((slop << 2) | (v >> 4));
            ret += int2char(v & 0xf);
            k = 0;
        }
    }
    if (k == 1) {
        ret += int2char(slop << 2);
    }
    return ret;
}
// convert a base64 string to a byte/number array
function b64toBA(s) {
    // piggyback on b64tohex for now, optimize later
    var h = b64tohex(s);
    var i;
    var a = [];
    for (i = 0; 2 * i < h.length; ++i) {
        a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);
    }
    return a;
}

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/asn1js/hex.js
// Hex JavaScript decoder
// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// 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.
/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
var decoder;
var Hex = {
    decode: function (a) {
        var i;
        if (decoder === undefined) {
            var hex = "0123456789ABCDEF";
            var ignore = " \f\n\r\t\u00A0\u2028\u2029";
            decoder = {};
            for (i = 0; i < 16; ++i) {
                decoder[hex.charAt(i)] = i;
            }
            hex = hex.toLowerCase();
            for (i = 10; i < 16; ++i) {
                decoder[hex.charAt(i)] = i;
            }
            for (i = 0; i < ignore.length; ++i) {
                decoder[ignore.charAt(i)] = -1;
            }
        }
        var out = [];
        var bits = 0;
        var char_count = 0;
        for (i = 0; i < a.length; ++i) {
            var c = a.charAt(i);
            if (c == "=") {
                break;
            }
            c = decoder[c];
            if (c == -1) {
                continue;
            }
            if (c === undefined) {
                throw new Error("Illegal character at offset " + i);
            }
            bits |= c;
            if (++char_count >= 2) {
                out[out.length] = bits;
                bits = 0;
                char_count = 0;
            }
            else {
                bits <<= 4;
            }
        }
        if (char_count) {
            throw new Error("Hex encoding incomplete: 4 bits missing");
        }
        return out;
    }
};

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/asn1js/base64.js
// Base64 JavaScript decoder
// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// 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.
/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
var base64_decoder;
var Base64 = {
    decode: function (a) {
        var i;
        if (base64_decoder === undefined) {
            var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
            var ignore = "= \f\n\r\t\u00A0\u2028\u2029";
            base64_decoder = Object.create(null);
            for (i = 0; i < 64; ++i) {
                base64_decoder[b64.charAt(i)] = i;
            }
            base64_decoder['-'] = 62; //+
            base64_decoder['_'] = 63; //-
            for (i = 0; i < ignore.length; ++i) {
                base64_decoder[ignore.charAt(i)] = -1;
            }
        }
        var out = [];
        var bits = 0;
        var char_count = 0;
        for (i = 0; i < a.length; ++i) {
            var c = a.charAt(i);
            if (c == "=") {
                break;
            }
            c = base64_decoder[c];
            if (c == -1) {
                continue;
            }
            if (c === undefined) {
                throw new Error("Illegal character at offset " + i);
            }
            bits |= c;
            if (++char_count >= 4) {
                out[out.length] = (bits >> 16);
                out[out.length] = (bits >> 8) & 0xFF;
                out[out.length] = bits & 0xFF;
                bits = 0;
                char_count = 0;
            }
            else {
                bits <<= 6;
            }
        }
        switch (char_count) {
            case 1:
                throw new Error("Base64 encoding incomplete: at least 2 bits missing");
            case 2:
                out[out.length] = (bits >> 10);
                break;
            case 3:
                out[out.length] = (bits >> 16);
                out[out.length] = (bits >> 8) & 0xFF;
                break;
        }
        return out;
    },
    re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
    unarmor: function (a) {
        var m = Base64.re.exec(a);
        if (m) {
            if (m[1]) {
                a = m[1];
            }
            else if (m[2]) {
                a = m[2];
            }
            else {
                throw new Error("RegExp out of sync");
            }
        }
        return Base64.decode(a);
    }
};

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/asn1js/int10.js
// Big integer base-10 printing library
// Copyright (c) 2014 Lapo Luchini <lapo@lapo.it>
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// 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.
/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
var max = 10000000000000; // biggest integer that can still fit 2^53 when multiplied by 256
var Int10 = /** @class */ (function () {
    function Int10(value) {
        this.buf = [+value || 0];
    }
    Int10.prototype.mulAdd = function (m, c) {
        // assert(m <= 256)
        var b = this.buf;
        var l = b.length;
        var i;
        var t;
        for (i = 0; i < l; ++i) {
            t = b[i] * m + c;
            if (t < max) {
                c = 0;
            }
            else {
                c = 0 | (t / max);
                t -= c * max;
            }
            b[i] = t;
        }
        if (c > 0) {
            b[i] = c;
        }
    };
    Int10.prototype.sub = function (c) {
        // assert(m <= 256)
        var b = this.buf;
        var l = b.length;
        var i;
        var t;
        for (i = 0; i < l; ++i) {
            t = b[i] - c;
            if (t < 0) {
                t += max;
                c = 1;
            }
            else {
                c = 0;
            }
            b[i] = t;
        }
        while (b[b.length - 1] === 0) {
            b.pop();
        }
    };
    Int10.prototype.toString = function (base) {
        if ((base || 10) != 10) {
            throw new Error("only base 10 is supported");
        }
        var b = this.buf;
        var s = b[b.length - 1].toString();
        for (var i = b.length - 2; i >= 0; --i) {
            s += (max + b[i]).toString().substring(1);
        }
        return s;
    };
    Int10.prototype.valueOf = function () {
        var b = this.buf;
        var v = 0;
        for (var i = b.length - 1; i >= 0; --i) {
            v = v * max + b[i];
        }
        return v;
    };
    Int10.prototype.simplify = function () {
        var b = this.buf;
        return (b.length == 1) ? b[0] : this;
    };
    return Int10;
}());


// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/asn1js/asn1.js
// ASN.1 JavaScript decoder
// Copyright (c) 2008-2014 Lapo Luchini <lapo@lapo.it>
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// 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.
/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
/*global oids */

var ellipsis = "\u2026";
var reTimeS = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
var reTimeL = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
function stringCut(str, len) {
    if (str.length > len) {
        str = str.substring(0, len) + ellipsis;
    }
    return str;
}
var asn1_Stream = /** @class */ (function () {
    function Stream(enc, pos) {
        this.hexDigits = "0123456789ABCDEF";
        if (enc instanceof Stream) {
            this.enc = enc.enc;
            this.pos = enc.pos;
        }
        else {
            // enc should be an array or a binary string
            this.enc = enc;
            this.pos = pos;
        }
    }
    Stream.prototype.get = function (pos) {
        if (pos === undefined) {
            pos = this.pos++;
        }
        if (pos >= this.enc.length) {
            throw new Error("Requesting byte offset " + pos + " on a stream of length " + this.enc.length);
        }
        return ("string" === typeof this.enc) ? this.enc.charCodeAt(pos) : this.enc[pos];
    };
    Stream.prototype.hexByte = function (b) {
        return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF);
    };
    Stream.prototype.hexDump = function (start, end, raw) {
        var s = "";
        for (var i = start; i < end; ++i) {
            s += this.hexByte(this.get(i));
            if (raw !== true) {
                switch (i & 0xF) {
                    case 0x7:
                        s += "  ";
                        break;
                    case 0xF:
                        s += "\n";
                        break;
                    default:
                        s += " ";
                }
            }
        }
        return s;
    };
    Stream.prototype.isASCII = function (start, end) {
        for (var i = start; i < end; ++i) {
            var c = this.get(i);
            if (c < 32 || c > 176) {
                return false;
            }
        }
        return true;
    };
    Stream.prototype.parseStringISO = function (start, end) {
        var s = "";
        for (var i = start; i < end; ++i) {
            s += String.fromCharCode(this.get(i));
        }
        return s;
    };
    Stream.prototype.parseStringUTF = function (start, end) {
        var s = "";
        for (var i = start; i < end;) {
            var c = this.get(i++);
            if (c < 128) {
                s += String.fromCharCode(c);
            }
            else if ((c > 191) && (c < 224)) {
                s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));
            }
            else {
                s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));
            }
        }
        return s;
    };
    Stream.prototype.parseStringBMP = function (start, end) {
        var str = "";
        var hi;
        var lo;
        for (var i = start; i < end;) {
            hi = this.get(i++);
            lo = this.get(i++);
            str += String.fromCharCode((hi << 8) | lo);
        }
        return str;
    };
    Stream.prototype.parseTime = function (start, end, shortYear) {
        var s = this.parseStringISO(start, end);
        var m = (shortYear ? reTimeS : reTimeL).exec(s);
        if (!m) {
            return "Unrecognized time: " + s;
        }
        if (shortYear) {
            // to avoid querying the timer, use the fixed range [1970, 2069]
            // it will conform with ITU X.400 [-10, +40] sliding window until 2030
            m[1] = +m[1];
            m[1] += (+m[1] < 70) ? 2000 : 1900;
        }
        s = m[1] + "-" + m[2] + "-" + m[3] + " " + m[4];
        if (m[5]) {
            s += ":" + m[5];
            if (m[6]) {
                s += ":" + m[6];
                if (m[7]) {
                    s += "." + m[7];
                }
            }
        }
        if (m[8]) {
            s += " UTC";
            if (m[8] != "Z") {
                s += m[8];
                if (m[9]) {
                    s += ":" + m[9];
                }
            }
        }
        return s;
    };
    Stream.prototype.parseInteger = function (start, end) {
        var v = this.get(start);
        var neg = (v > 127);
        var pad = neg ? 255 : 0;
        var len;
        var s = "";
        // skip unuseful bits (not allowed in DER)
        while (v == pad && ++start < end) {
            v = this.get(start);
        }
        len = end - start;
        if (len === 0) {
            return neg ? -1 : 0;
        }
        // show bit length of huge integers
        if (len > 4) {
            s = v;
            len <<= 3;
            while (((+s ^ pad) & 0x80) == 0) {
                s = +s << 1;
                --len;
            }
            s = "(" + len + " bit)\n";
        }
        // decode the integer
        if (neg) {
            v = v - 256;
        }
        var n = new Int10(v);
        for (var i = start + 1; i < end; ++i) {
            n.mulAdd(256, this.get(i));
        }
        return s + n.toString();
    };
    Stream.prototype.parseBitString = function (start, end, maxLength) {
        var unusedBit = this.get(start);
        var lenBit = ((end - start - 1) << 3) - unusedBit;
        var intro = "(" + lenBit + " bit)\n";
        var s = "";
        for (var i = start + 1; i < end; ++i) {
            var b = this.get(i);
            var skip = (i == end - 1) ? unusedBit : 0;
            for (var j = 7; j >= skip; --j) {
                s += (b >> j) & 1 ? "1" : "0";
            }
            if (s.length > maxLength) {
                return intro + stringCut(s, maxLength);
            }
        }
        return intro + s;
    };
    Stream.prototype.parseOctetString = function (start, end, maxLength) {
        if (this.isASCII(start, end)) {
            return stringCut(this.parseStringISO(start, end), maxLength);
        }
        var len = end - start;
        var s = "(" + len + " byte)\n";
        maxLength /= 2; // we work in bytes
        if (len > maxLength) {
            end = start + maxLength;
        }
        for (var i = start; i < end; ++i) {
            s += this.hexByte(this.get(i));
        }
        if (len > maxLength) {
            s += ellipsis;
        }
        return s;
    };
    Stream.prototype.parseOID = function (start, end, maxLength) {
        var s = "";
        var n = new Int10();
        var bits = 0;
        for (var i = start; i < end; ++i) {
            var v = this.get(i);
            n.mulAdd(128, v & 0x7F);
            bits += 7;
            if (!(v & 0x80)) { // finished
                if (s === "") {
                    n = n.simplify();
                    if (n instanceof Int10) {
                        n.sub(80);
                        s = "2." + n.toString();
                    }
                    else {
                        var m = n < 80 ? n < 40 ? 0 : 1 : 2;
                        s = m + "." + (n - m * 40);
                    }
                }
                else {
                    s += "." + n.toString();
                }
                if (s.length > maxLength) {
                    return stringCut(s, maxLength);
                }
                n = new Int10();
                bits = 0;
            }
        }
        if (bits > 0) {
            s += ".incomplete";
        }
        return s;
    };
    return Stream;
}());

var ASN1 = /** @class */ (function () {
    function ASN1(stream, header, length, tag, sub) {
        if (!(tag instanceof asn1_ASN1Tag)) {
            throw new Error("Invalid tag value.");
        }
        this.stream = stream;
        this.header = header;
        this.length = length;
        this.tag = tag;
        this.sub = sub;
    }
    ASN1.prototype.typeName = function () {
        switch (this.tag.tagClass) {
            case 0: // universal
                switch (this.tag.tagNumber) {
                    case 0x00:
                        return "EOC";
                    case 0x01:
                        return "BOOLEAN";
                    case 0x02:
                        return "INTEGER";
                    case 0x03:
                        return "BIT_STRING";
                    case 0x04:
                        return "OCTET_STRING";
                    case 0x05:
                        return "NULL";
                    case 0x06:
                        return "OBJECT_IDENTIFIER";
                    case 0x07:
                        return "ObjectDescriptor";
                    case 0x08:
                        return "EXTERNAL";
                    case 0x09:
                        return "REAL";
                    case 0x0A:
                        return "ENUMERATED";
                    case 0x0B:
                        return "EMBEDDED_PDV";
                    case 0x0C:
                        return "UTF8String";
                    case 0x10:
                        return "SEQUENCE";
                    case 0x11:
                        return "SET";
                    case 0x12:
                        return "NumericString";
                    case 0x13:
                        return "PrintableString"; // ASCII subset
                    case 0x14:
                        return "TeletexString"; // aka T61String
                    case 0x15:
                        return "VideotexString";
                    case 0x16:
                        return "IA5String"; // ASCII
                    case 0x17:
                        return "UTCTime";
                    case 0x18:
                        return "GeneralizedTime";
                    case 0x19:
                        return "GraphicString";
                    case 0x1A:
                        return "VisibleString"; // ASCII subset
                    case 0x1B:
                        return "GeneralString";
                    case 0x1C:
                        return "UniversalString";
                    case 0x1E:
                        return "BMPString";
                }
                return "Universal_" + this.tag.tagNumber.toString();
            case 1:
                return "Application_" + this.tag.tagNumber.toString();
            case 2:
                return "[" + this.tag.tagNumber.toString() + "]"; // Context
            case 3:
                return "Private_" + this.tag.tagNumber.toString();
        }
    };
    ASN1.prototype.content = function (maxLength) {
        if (this.tag === undefined) {
            return null;
        }
        if (maxLength === undefined) {
            maxLength = Infinity;
        }
        var content = this.posContent();
        var len = Math.abs(this.length);
        if (!this.tag.isUniversal()) {
            if (this.sub !== null) {
                return "(" + this.sub.length + " elem)";
            }
            return this.stream.parseOctetString(content, content + len, maxLength);
        }
        switch (this.tag.tagNumber) {
            case 0x01: // BOOLEAN
                return (this.stream.get(content) === 0) ? "false" : "true";
            case 0x02: // INTEGER
                return this.stream.parseInteger(content, content + len);
            case 0x03: // BIT_STRING
                return this.sub ? "(" + this.sub.length + " elem)" :
                    this.stream.parseBitString(content, content + len, maxLength);
            case 0x04: // OCTET_STRING
                return this.sub ? "(" + this.sub.length + " elem)" :
                    this.stream.parseOctetString(content, content + len, maxLength);
            // case 0x05: // NULL
            case 0x06: // OBJECT_IDENTIFIER
                return this.stream.parseOID(content, content + len, maxLength);
            // case 0x07: // ObjectDescriptor
            // case 0x08: // EXTERNAL
            // case 0x09: // REAL
            // case 0x0A: // ENUMERATED
            // case 0x0B: // EMBEDDED_PDV
            case 0x10: // SEQUENCE
            case 0x11: // SET
                if (this.sub !== null) {
                    return "(" + this.sub.length + " elem)";
                }
                else {
                    return "(no elem)";
                }
            case 0x0C: // UTF8String
                return stringCut(this.stream.parseStringUTF(content, content + len), maxLength);
            case 0x12: // NumericString
            case 0x13: // PrintableString
            case 0x14: // TeletexString
            case 0x15: // VideotexString
            case 0x16: // IA5String
            // case 0x19: // GraphicString
            case 0x1A: // VisibleString
                // case 0x1B: // GeneralString
                // case 0x1C: // UniversalString
                return stringCut(this.stream.parseStringISO(content, content + len), maxLength);
            case 0x1E: // BMPString
                return stringCut(this.stream.parseStringBMP(content, content + len), maxLength);
            case 0x17: // UTCTime
            case 0x18: // GeneralizedTime
                return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17));
        }
        return null;
    };
    ASN1.prototype.toString = function () {
        return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + ((this.sub === null) ? "null" : this.sub.length) + "]";
    };
    ASN1.prototype.toPrettyString = function (indent) {
        if (indent === undefined) {
            indent = "";
        }
        var s = indent + this.typeName() + " @" + this.stream.pos;
        if (this.length >= 0) {
            s += "+";
        }
        s += this.length;
        if (this.tag.tagConstructed) {
            s += " (constructed)";
        }
        else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) {
            s += " (encapsulates)";
        }
        s += "\n";
        if (this.sub !== null) {
            indent += "  ";
            for (var i = 0, max = this.sub.length; i < max; ++i) {
                s += this.sub[i].toPrettyString(indent);
            }
        }
        return s;
    };
    ASN1.prototype.posStart = function () {
        return this.stream.pos;
    };
    ASN1.prototype.posContent = function () {
        return this.stream.pos + this.header;
    };
    ASN1.prototype.posEnd = function () {
        return this.stream.pos + this.header + Math.abs(this.length);
    };
    ASN1.prototype.toHexString = function () {
        return this.stream.hexDump(this.posStart(), this.posEnd(), true);
    };
    ASN1.decodeLength = function (stream) {
        var buf = stream.get();
        var len = buf & 0x7F;
        if (len == buf) {
            return len;
        }
        // no reason to use Int10, as it would be a huge buffer anyways
        if (len > 6) {
            throw new Error("Length over 48 bits not supported at position " + (stream.pos - 1));
        }
        if (len === 0) {
            return null;
        } // undefined
        buf = 0;
        for (var i = 0; i < len; ++i) {
            buf = (buf * 256) + stream.get();
        }
        return buf;
    };
    /**
     * Retrieve the hexadecimal value (as a string) of the current ASN.1 element
     * @returns {string}
     * @public
     */
    ASN1.prototype.getHexStringValue = function () {
        var hexString = this.toHexString();
        var offset = this.header * 2;
        var length = this.length * 2;
        return hexString.substr(offset, length);
    };
    ASN1.decode = function (str) {
        var stream;
        if (!(str instanceof asn1_Stream)) {
            stream = new asn1_Stream(str, 0);
        }
        else {
            stream = str;
        }
        var streamStart = new asn1_Stream(stream);
        var tag = new asn1_ASN1Tag(stream);
        var len = ASN1.decodeLength(stream);
        var start = stream.pos;
        var header = start - streamStart.pos;
        var sub = null;
        var getSub = function () {
            var ret = [];
            if (len !== null) {
                // definite length
                var end = start + len;
                while (stream.pos < end) {
                    ret[ret.length] = ASN1.decode(stream);
                }
                if (stream.pos != end) {
                    throw new Error("Content size is not correct for container starting at offset " + start);
                }
            }
            else {
                // undefined length
                try {
                    for (;;) {
                        var s = ASN1.decode(stream);
                        if (s.tag.isEOC()) {
                            break;
                        }
                        ret[ret.length] = s;
                    }
                    len = start - stream.pos; // undefined lengths are represented as negative values
                }
                catch (e) {
                    throw new Error("Exception while decoding undefined length content: " + e);
                }
            }
            return ret;
        };
        if (tag.tagConstructed) {
            // must have valid content
            sub = getSub();
        }
        else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) {
            // sometimes BitString and OctetString are used to encapsulate ASN.1
            try {
                if (tag.tagNumber == 0x03) {
                    if (stream.get() != 0) {
                        throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
                    }
                }
                sub = getSub();
                for (var i = 0; i < sub.length; ++i) {
                    if (sub[i].tag.isEOC()) {
                        throw new Error("EOC is not supposed to be actual content.");
                    }
                }
            }
            catch (e) {
                // but silently ignore when they don't
                sub = null;
            }
        }
        if (sub === null) {
            if (len === null) {
                throw new Error("We can't skip over an invalid tag with undefined length at offset " + start);
            }
            stream.pos = start + Math.abs(len);
        }
        return new ASN1(streamStart, header, len, tag, sub);
    };
    return ASN1;
}());

var asn1_ASN1Tag = /** @class */ (function () {
    function ASN1Tag(stream) {
        var buf = stream.get();
        this.tagClass = buf >> 6;
        this.tagConstructed = ((buf & 0x20) !== 0);
        this.tagNumber = buf & 0x1F;
        if (this.tagNumber == 0x1F) { // long tag
            var n = new Int10();
            do {
                buf = stream.get();
                n.mulAdd(128, buf & 0x7F);
            } while (buf & 0x80);
            this.tagNumber = n.simplify();
        }
    }
    ASN1Tag.prototype.isUniversal = function () {
        return this.tagClass === 0x00;
    };
    ASN1Tag.prototype.isEOC = function () {
        return this.tagClass === 0x00 && this.tagNumber === 0x00;
    };
    return ASN1Tag;
}());


// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js
// Copyright (c) 2005  Tom Wu
// All Rights Reserved.
// See "LICENSE" for details.
// Basic JavaScript BN library - subset useful for RSA encryption.

// Bits per digit
var dbits;
// JavaScript engine analysis
var canary = 0xdeadbeefcafe;
var j_lm = ((canary & 0xffffff) == 0xefcafe);
//#region
var lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];
var lplim = (1 << 26) / lowprimes[lowprimes.length - 1];
//#endregion
// (public) Constructor
var jsbn_BigInteger = /** @class */ (function () {
    function BigInteger(a, b, c) {
        if (a != null) {
            if ("number" == typeof a) {
                this.fromNumber(a, b, c);
            }
            else if (b == null && "string" != typeof a) {
                this.fromString(a, 256);
            }
            else {
                this.fromString(a, b);
            }
        }
    }
    //#region PUBLIC
    // BigInteger.prototype.toString = bnToString;
    // (public) return string representation in given radix
    BigInteger.prototype.toString = function (b) {
        if (this.s < 0) {
            return "-" + this.negate().toString(b);
        }
        var k;
        if (b == 16) {
            k = 4;
        }
        else if (b == 8) {
            k = 3;
        }
        else if (b == 2) {
            k = 1;
        }
        else if (b == 32) {
            k = 5;
        }
        else if (b == 4) {
            k = 2;
        }
        else {
            return this.toRadix(b);
        }
        var km = (1 << k) - 1;
        var d;
        var m = false;
        var r = "";
        var i = this.t;
        var p = this.DB - (i * this.DB) % k;
        if (i-- > 0) {
            if (p < this.DB && (d = this[i] >> p) > 0) {
                m = true;
                r = int2char(d);
            }
            while (i >= 0) {
                if (p < k) {
                    d = (this[i] & ((1 << p) - 1)) << (k - p);
                    d |= this[--i] >> (p += this.DB - k);
                }
                else {
                    d = (this[i] >> (p -= k)) & km;
                    if (p <= 0) {
                        p += this.DB;
                        --i;
                    }
                }
                if (d > 0) {
                    m = true;
                }
                if (m) {
                    r += int2char(d);
                }
            }
        }
        return m ? r : "0";
    };
    // BigInteger.prototype.negate = bnNegate;
    // (public) -this
    BigInteger.prototype.negate = function () {
        var r = nbi();
        BigInteger.ZERO.subTo(this, r);
        return r;
    };
    // BigInteger.prototype.abs = bnAbs;
    // (public) |this|
    BigInteger.prototype.abs = function () {
        return (this.s < 0) ? this.negate() : this;
    };
    // BigInteger.prototype.compareTo = bnCompareTo;
    // (public) return + if this > a, - if this < a, 0 if equal
    BigInteger.prototype.compareTo = function (a) {
        var r = this.s - a.s;
        if (r != 0) {
            return r;
        }
        var i = this.t;
        r = i - a.t;
        if (r != 0) {
            return (this.s < 0) ? -r : r;
        }
        while (--i >= 0) {
            if ((r = this[i] - a[i]) != 0) {
                return r;
            }
        }
        return 0;
    };
    // BigInteger.prototype.bitLength = bnBitLength;
    // (public) return the number of bits in "this"
    BigInteger.prototype.bitLength = function () {
        if (this.t <= 0) {
            return 0;
        }
        return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));
    };
    // BigInteger.prototype.mod = bnMod;
    // (public) this mod a
    BigInteger.prototype.mod = function (a) {
        var r = nbi();
        this.abs().divRemTo(a, null, r);
        if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {
            a.subTo(r, r);
        }
        return r;
    };
    // BigInteger.prototype.modPowInt = bnModPowInt;
    // (public) this^e % m, 0 <= e < 2^32
    BigInteger.prototype.modPowInt = function (e, m) {
        var z;
        if (e < 256 || m.isEven()) {
            z = new Classic(m);
        }
        else {
            z = new Montgomery(m);
        }
        return this.exp(e, z);
    };
    // BigInteger.prototype.clone = bnClone;
    // (public)
    BigInteger.prototype.clone = function () {
        var r = nbi();
        this.copyTo(r);
        return r;
    };
    // BigInteger.prototype.intValue = bnIntValue;
    // (public) return value as integer
    BigInteger.prototype.intValue = function () {
        if (this.s < 0) {
            if (this.t == 1) {
                return this[0] - this.DV;
            }
            else if (this.t == 0) {
                return -1;
            }
        }
        else if (this.t == 1) {
            return this[0];
        }
        else if (this.t == 0) {
            return 0;
        }
        // assumes 16 < DB < 32
        return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];
    };
    // BigInteger.prototype.byteValue = bnByteValue;
    // (public) return value as byte
    BigInteger.prototype.byteValue = function () {
        return (this.t == 0) ? this.s : (this[0] << 24) >> 24;
    };
    // BigInteger.prototype.shortValue = bnShortValue;
    // (public) return value as short (assumes DB>=16)
    BigInteger.prototype.shortValue = function () {
        return (this.t == 0) ? this.s : (this[0] << 16) >> 16;
    };
    // BigInteger.prototype.signum = bnSigNum;
    // (public) 0 if this == 0, 1 if this > 0
    BigInteger.prototype.signum = function () {
        if (this.s < 0) {
            return -1;
        }
        else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) {
            return 0;
        }
        else {
            return 1;
        }
    };
    // BigInteger.prototype.toByteArray = bnToByteArray;
    // (public) convert to bigendian byte array
    BigInteger.prototype.toByteArray = function () {
        var i = this.t;
        var r = [];
        r[0] = this.s;
        var p = this.DB - (i * this.DB) % 8;
        var d;
        var k = 0;
        if (i-- > 0) {
            if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p) {
                r[k++] = d | (this.s << (this.DB - p));
            }
            while (i >= 0) {
                if (p < 8) {
                    d = (this[i] & ((1 << p) - 1)) << (8 - p);
                    d |= this[--i] >> (p += this.DB - 8);
                }
                else {
                    d = (this[i] >> (p -= 8)) & 0xff;
                    if (p <= 0) {
                        p += this.DB;
                        --i;
                    }
                }
                if ((d & 0x80) != 0) {
                    d |= -256;
                }
                if (k == 0 && (this.s & 0x80) != (d & 0x80)) {
                    ++k;
                }
                if (k > 0 || d != this.s) {
                    r[k++] = d;
                }
            }
        }
        return r;
    };
    // BigInteger.prototype.equals = bnEquals;
    BigInteger.prototype.equals = function (a) {
        return (this.compareTo(a) == 0);
    };
    // BigInteger.prototype.min = bnMin;
    BigInteger.prototype.min = function (a) {
        return (this.compareTo(a) < 0) ? this : a;
    };
    // BigInteger.prototype.max = bnMax;
    BigInteger.prototype.max = function (a) {
        return (this.compareTo(a) > 0) ? this : a;
    };
    // BigInteger.prototype.and = bnAnd;
    BigInteger.prototype.and = function (a) {
        var r = nbi();
        this.bitwiseTo(a, op_and, r);
        return r;
    };
    // BigInteger.prototype.or = bnOr;
    BigInteger.prototype.or = function (a) {
        var r = nbi();
        this.bitwiseTo(a, op_or, r);
        return r;
    };
    // BigInteger.prototype.xor = bnXor;
    BigInteger.prototype.xor = function (a) {
        var r = nbi();
        this.bitwiseTo(a, op_xor, r);
        return r;
    };
    // BigInteger.prototype.andNot = bnAndNot;
    BigInteger.prototype.andNot = function (a) {
        var r = nbi();
        this.bitwiseTo(a, op_andnot, r);
        return r;
    };
    // BigInteger.prototype.not = bnNot;
    // (public) ~this
    BigInteger.prototype.not = function () {
        var r = nbi();
        for (var i = 0; i < this.t; ++i) {
            r[i] = this.DM & ~this[i];
        }
        r.t = this.t;
        r.s = ~this.s;
        return r;
    };
    // BigInteger.prototype.shiftLeft = bnShiftLeft;
    // (public) this << n
    BigInteger.prototype.shiftLeft = function (n) {
        var r = nbi();
        if (n < 0) {
            this.rShiftTo(-n, r);
        }
        else {
            this.lShiftTo(n, r);
        }
        return r;
    };
    // BigInteger.prototype.shiftRight = bnShiftRight;
    // (public) this >> n
    BigInteger.prototype.shiftRight = function (n) {
        var r = nbi();
        if (n < 0) {
            this.lShiftTo(-n, r);
        }
        else {
            this.rShiftTo(n, r);
        }
        return r;
    };
    // BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
    // (public) returns index of lowest 1-bit (or -1 if none)
    BigInteger.prototype.getLowestSetBit = function () {
        for (var i = 0; i < this.t; ++i) {
            if (this[i] != 0) {
                return i * this.DB + lbit(this[i]);
            }
        }
        if (this.s < 0) {
            return this.t * this.DB;
        }
        return -1;
    };
    // BigInteger.prototype.bitCount = bnBitCount;
    // (public) return number of set bits
    BigInteger.prototype.bitCount = function () {
        var r = 0;
        var x = this.s & this.DM;
        for (var i = 0; i < this.t; ++i) {
            r += cbit(this[i] ^ x);
        }
        return r;
    };
    // BigInteger.prototype.testBit = bnTestBit;
    // (public) true iff nth bit is set
    BigInteger.prototype.testBit = function (n) {
        var j = Math.floor(n / this.DB);
        if (j >= this.t) {
            return (this.s != 0);
        }
        return ((this[j] & (1 << (n % this.DB))) != 0);
    };
    // BigInteger.prototype.setBit = bnSetBit;
    // (public) this | (1<<n)
    BigInteger.prototype.setBit = function (n) {
        return this.changeBit(n, op_or);
    };
    // BigInteger.prototype.clearBit = bnClearBit;
    // (public) this & ~(1<<n)
    BigInteger.prototype.clearBit = function (n) {
        return this.changeBit(n, op_andnot);
    };
    // BigInteger.prototype.flipBit = bnFlipBit;
    // (public) this ^ (1<<n)
    BigInteger.prototype.flipBit = function (n) {
        return this.changeBit(n, op_xor);
    };
    // BigInteger.prototype.add = bnAdd;
    // (public) this + a
    BigInteger.prototype.add = function (a) {
        var r = nbi();
        this.addTo(a, r);
        return r;
    };
    // BigInteger.prototype.subtract = bnSubtract;
    // (public) this - a
    BigInteger.prototype.subtract = function (a) {
        var r = nbi();
        this.subTo(a, r);
        return r;
    };
    // BigInteger.prototype.multiply = bnMultiply;
    // (public) this * a
    BigInteger.prototype.multiply = function (a) {
        var r = nbi();
        this.multiplyTo(a, r);
        return r;
    };
    // BigInteger.prototype.divide = bnDivide;
    // (public) this / a
    BigInteger.prototype.divide = function (a) {
        var r = nbi();
        this.divRemTo(a, r, null);
        return r;
    };
    // BigInteger.prototype.remainder = bnRemainder;
    // (public) this % a
    BigInteger.prototype.remainder = function (a) {
        var r = nbi();
        this.divRemTo(a, null, r);
        return r;
    };
    // BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
    // (public) [this/a,this%a]
    BigInteger.prototype.divideAndRemainder = function (a) {
        var q = nbi();
        var r = nbi();
        this.divRemTo(a, q, r);
        return [q, r];
    };
    // BigInteger.prototype.modPow = bnModPow;
    // (public) this^e % m (HAC 14.85)
    BigInteger.prototype.modPow = function (e, m) {
        var i = e.bitLength();
        var k;
        var r = nbv(1);
        var z;
        if (i <= 0) {
            return r;
        }
        else if (i < 18) {
            k = 1;
        }
        else if (i < 48) {
            k = 3;
        }
        else if (i < 144) {
            k = 4;
        }
        else if (i < 768) {
            k = 5;
        }
        else {
            k = 6;
        }
        if (i < 8) {
            z = new Classic(m);
        }
        else if (m.isEven()) {
            z = new Barrett(m);
        }
        else {
            z = new Montgomery(m);
        }
        // precomputation
        var g = [];
        var n = 3;
        var k1 = k - 1;
        var km = (1 << k) - 1;
        g[1] = z.convert(this);
        if (k > 1) {
            var g2 = nbi();
            z.sqrTo(g[1], g2);
            while (n <= km) {
                g[n] = nbi();
                z.mulTo(g2, g[n - 2], g[n]);
                n += 2;
            }
        }
        var j = e.t - 1;
        var w;
        var is1 = true;
        var r2 = nbi();
        var t;
        i = nbits(e[j]) - 1;
        while (j >= 0) {
            if (i >= k1) {
                w = (e[j] >> (i - k1)) & km;
            }
            else {
                w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);
                if (j > 0) {
                    w |= e[j - 1] >> (this.DB + i - k1);
                }
            }
            n = k;
            while ((w & 1) == 0) {
                w >>= 1;
                --n;
            }
            if ((i -= n) < 0) {
                i += this.DB;
                --j;
            }
            if (is1) { // ret == 1, don't bother squaring or multiplying it
                g[w].copyTo(r);
                is1 = false;
            }
            else {
                while (n > 1) {
                    z.sqrTo(r, r2);
                    z.sqrTo(r2, r);
                    n -= 2;
                }
                if (n > 0) {
                    z.sqrTo(r, r2);
                }
                else {
                    t = r;
                    r = r2;
                    r2 = t;
                }
                z.mulTo(r2, g[w], r);
            }
            while (j >= 0 && (e[j] & (1 << i)) == 0) {
                z.sqrTo(r, r2);
                t = r;
                r = r2;
                r2 = t;
                if (--i < 0) {
                    i = this.DB - 1;
                    --j;
                }
            }
        }
        return z.revert(r);
    };
    // BigInteger.prototype.modInverse = bnModInverse;
    // (public) 1/this % m (HAC 14.61)
    BigInteger.prototype.modInverse = function (m) {
        var ac = m.isEven();
        if ((this.isEven() && ac) || m.signum() == 0) {
            return BigInteger.ZERO;
        }
        var u = m.clone();
        var v = this.clone();
        var a = nbv(1);
        var b = nbv(0);
        var c = nbv(0);
        var d = nbv(1);
        while (u.signum() != 0) {
            while (u.isEven()) {
                u.rShiftTo(1, u);
                if (ac) {
                    if (!a.isEven() || !b.isEven()) {
                        a.addTo(this, a);
                        b.subTo(m, b);
                    }
                    a.rShiftTo(1, a);
                }
                else if (!b.isEven()) {
                    b.subTo(m, b);
                }
                b.rShiftTo(1, b);
            }
            while (v.isEven()) {
                v.rShiftTo(1, v);
                if (ac) {
                    if (!c.isEven() || !d.isEven()) {
                        c.addTo(this, c);
                        d.subTo(m, d);
                    }
                    c.rShiftTo(1, c);
                }
                else if (!d.isEven()) {
                    d.subTo(m, d);
                }
                d.rShiftTo(1, d);
            }
            if (u.compareTo(v) >= 0) {
                u.subTo(v, u);
                if (ac) {
                    a.subTo(c, a);
                }
                b.subTo(d, b);
            }
            else {
                v.subTo(u, v);
                if (ac) {
                    c.subTo(a, c);
                }
                d.subTo(b, d);
            }
        }
        if (v.compareTo(BigInteger.ONE) != 0) {
            return BigInteger.ZERO;
        }
        if (d.compareTo(m) >= 0) {
            return d.subtract(m);
        }
        if (d.signum() < 0) {
            d.addTo(m, d);
        }
        else {
            return d;
        }
        if (d.signum() < 0) {
            return d.add(m);
        }
        else {
            return d;
        }
    };
    // BigInteger.prototype.pow = bnPow;
    // (public) this^e
    BigInteger.prototype.pow = function (e) {
        return this.exp(e, new NullExp());
    };
    // BigInteger.prototype.gcd = bnGCD;
    // (public) gcd(this,a) (HAC 14.54)
    BigInteger.prototype.gcd = function (a) {
        var x = (this.s < 0) ? this.negate() : this.clone();
        var y = (a.s < 0) ? a.negate() : a.clone();
        if (x.compareTo(y) < 0) {
            var t = x;
            x = y;
            y = t;
        }
        var i = x.getLowestSetBit();
        var g = y.getLowestSetBit();
        if (g < 0) {
            return x;
        }
        if (i < g) {
            g = i;
        }
        if (g > 0) {
            x.rShiftTo(g, x);
            y.rShiftTo(g, y);
        }
        while (x.signum() > 0) {
            if ((i = x.getLowestSetBit()) > 0) {
                x.rShiftTo(i, x);
            }
            if ((i = y.getLowestSetBit()) > 0) {
                y.rShiftTo(i, y);
            }
            if (x.compareTo(y) >= 0) {
                x.subTo(y, x);
                x.rShiftTo(1, x);
            }
            else {
                y.subTo(x, y);
                y.rShiftTo(1, y);
            }
        }
        if (g > 0) {
            y.lShiftTo(g, y);
        }
        return y;
    };
    // BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
    // (public) test primality with certainty >= 1-.5^t
    BigInteger.prototype.isProbablePrime = function (t) {
        var i;
        var x = this.abs();
        if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) {
            for (i = 0; i < lowprimes.length; ++i) {
                if (x[0] == lowprimes[i]) {
                    return true;
                }
            }
            return false;
        }
        if (x.isEven()) {
            return false;
        }
        i = 1;
        while (i < lowprimes.length) {
            var m = lowprimes[i];
            var j = i + 1;
            while (j < lowprimes.length && m < lplim) {
                m *= lowprimes[j++];
            }
            m = x.modInt(m);
            while (i < j) {
                if (m % lowprimes[i++] == 0) {
                    return false;
                }
            }
        }
        return x.millerRabin(t);
    };
    //#endregion PUBLIC
    //#region PROTECTED
    // BigInteger.prototype.copyTo = bnpCopyTo;
    // (protected) copy this to r
    BigInteger.prototype.copyTo = function (r) {
        for (var i = this.t - 1; i >= 0; --i) {
            r[i] = this[i];
        }
        r.t = this.t;
        r.s = this.s;
    };
    // BigInteger.prototype.fromInt = bnpFromInt;
    // (protected) set from integer value x, -DV <= x < DV
    BigInteger.prototype.fromInt = function (x) {
        this.t = 1;
        this.s = (x < 0) ? -1 : 0;
        if (x > 0) {
            this[0] = x;
        }
        else if (x < -1) {
            this[0] = x + this.DV;
        }
        else {
            this.t = 0;
        }
    };
    // BigInteger.prototype.fromString = bnpFromString;
    // (protected) set from string and radix
    BigInteger.prototype.fromString = function (s, b) {
        var k;
        if (b == 16) {
            k = 4;
        }
        else if (b == 8) {
            k = 3;
        }
        else if (b == 256) {
            k = 8;
            /* byte array */
        }
        else if (b == 2) {
            k = 1;
        }
        else if (b == 32) {
            k = 5;
        }
        else if (b == 4) {
            k = 2;
        }
        else {
            this.fromRadix(s, b);
            return;
        }
        this.t = 0;
        this.s = 0;
        var i = s.length;
        var mi = false;
        var sh = 0;
        while (--i >= 0) {
            var x = (k == 8) ? (+s[i]) & 0xff : intAt(s, i);
            if (x < 0) {
                if (s.charAt(i) == "-") {
                    mi = true;
                }
                continue;
            }
            mi = false;
            if (sh == 0) {
                this[this.t++] = x;
            }
            else if (sh + k > this.DB) {
                this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;
                this[this.t++] = (x >> (this.DB - sh));
            }
            else {
                this[this.t - 1] |= x << sh;
            }
            sh += k;
            if (sh >= this.DB) {
                sh -= this.DB;
            }
        }
        if (k == 8 && ((+s[0]) & 0x80) != 0) {
            this.s = -1;
            if (sh > 0) {
                this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;
            }
        }
        this.clamp();
        if (mi) {
            BigInteger.ZERO.subTo(this, this);
        }
    };
    // BigInteger.prototype.clamp = bnpClamp;
    // (protected) clamp off excess high words
    BigInteger.prototype.clamp = function () {
        var c = this.s & this.DM;
        while (this.t > 0 && this[this.t - 1] == c) {
            --this.t;
        }
    };
    // BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
    // (protected) r = this << n*DB
    BigInteger.prototype.dlShiftTo = function (n, r) {
        var i;
        for (i = this.t - 1; i >= 0; --i) {
            r[i + n] = this[i];
        }
        for (i = n - 1; i >= 0; --i) {
            r[i] = 0;
        }
        r.t = this.t + n;
        r.s = this.s;
    };
    // BigInteger.prototype.drShiftTo = bnpDRShiftTo;
    // (protected) r = this >> n*DB
    BigInteger.prototype.drShiftTo = function (n, r) {
        for (var i = n; i < this.t; ++i) {
            r[i - n] = this[i];
        }
        r.t = Math.max(this.t - n, 0);
        r.s = this.s;
    };
    // BigInteger.prototype.lShiftTo = bnpLShiftTo;
    // (protected) r = this << n
    BigInteger.prototype.lShiftTo = function (n, r) {
        var bs = n % this.DB;
        var cbs = this.DB - bs;
        var bm = (1 << cbs) - 1;
        var ds = Math.floor(n / this.DB);
        var c = (this.s << bs) & this.DM;
        for (var i = this.t - 1; i >= 0; --i) {
            r[i + ds + 1] = (this[i] >> cbs) | c;
            c = (this[i] & bm) << bs;
        }
        for (var i = ds - 1; i >= 0; --i) {
            r[i] = 0;
        }
        r[ds] = c;
        r.t = this.t + ds + 1;
        r.s = this.s;
        r.clamp();
    };
    // BigInteger.prototype.rShiftTo = bnpRShiftTo;
    // (protected) r = this >> n
    BigInteger.prototype.rShiftTo = function (n, r) {
        r.s = this.s;
        var ds = Math.floor(n / this.DB);
        if (ds >= this.t) {
            r.t = 0;
            return;
        }
        var bs = n % this.DB;
        var cbs = this.DB - bs;
        var bm = (1 << bs) - 1;
        r[0] = this[ds] >> bs;
        for (var i = ds + 1; i < this.t; ++i) {
            r[i - ds - 1] |= (this[i] & bm) << cbs;
            r[i - ds] = this[i] >> bs;
        }
        if (bs > 0) {
            r[this.t - ds - 1] |= (this.s & bm) << cbs;
        }
        r.t = this.t - ds;
        r.clamp();
    };
    // BigInteger.prototype.subTo = bnpSubTo;
    // (protected) r = this - a
    BigInteger.prototype.subTo = function (a, r) {
        var i = 0;
        var c = 0;
        var m = Math.min(a.t, this.t);
        while (i < m) {
            c += this[i] - a[i];
            r[i++] = c & this.DM;
            c >>= this.DB;
        }
        if (a.t < this.t) {
            c -= a.s;
            while (i < this.t) {
                c += this[i];
                r[i++] = c & this.DM;
                c >>= this.DB;
            }
            c += this.s;
        }
        else {
            c += this.s;
            while (i < a.t) {
                c -= a[i];
                r[i++] = c & this.DM;
                c >>= this.DB;
            }
            c -= a.s;
        }
        r.s = (c < 0) ? -1 : 0;
        if (c < -1) {
            r[i++] = this.DV + c;
        }
        else if (c > 0) {
            r[i++] = c;
        }
        r.t = i;
        r.clamp();
    };
    // BigInteger.prototype.multiplyTo = bnpMultiplyTo;
    // (protected) r = this * a, r != this,a (HAC 14.12)
    // "this" should be the larger one if appropriate.
    BigInteger.prototype.multiplyTo = function (a, r) {
        var x = this.abs();
        var y = a.abs();
        var i = x.t;
        r.t = i + y.t;
        while (--i >= 0) {
            r[i] = 0;
        }
        for (i = 0; i < y.t; ++i) {
            r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);
        }
        r.s = 0;
        r.clamp();
        if (this.s != a.s) {
            BigInteger.ZERO.subTo(r, r);
        }
    };
    // BigInteger.prototype.squareTo = bnpSquareTo;
    // (protected) r = this^2, r != this (HAC 14.16)
    BigInteger.prototype.squareTo = function (r) {
        var x = this.abs();
        var i = r.t = 2 * x.t;
        while (--i >= 0) {
            r[i] = 0;
        }
        for (i = 0; i < x.t - 1; ++i) {
            var c = x.am(i, x[i], r, 2 * i, 0, 1);
            if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {
                r[i + x.t] -= x.DV;
                r[i + x.t + 1] = 1;
            }
        }
        if (r.t > 0) {
            r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);
        }
        r.s = 0;
        r.clamp();
    };
    // BigInteger.prototype.divRemTo = bnpDivRemTo;
    // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
    // r != q, this != m.  q or r may be null.
    BigInteger.prototype.divRemTo = function (m, q, r) {
        var pm = m.abs();
        if (pm.t <= 0) {
            return;
        }
        var pt = this.abs();
        if (pt.t < pm.t) {
            if (q != null) {
                q.fromInt(0);
            }
            if (r != null) {
                this.copyTo(r);
            }
            return;
        }
        if (r == null) {
            r = nbi();
        }
        var y = nbi();
        var ts = this.s;
        var ms = m.s;
        var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus
        if (nsh > 0) {
            pm.lShiftTo(nsh, y);
            pt.lShiftTo(nsh, r);
        }
        else {
            pm.copyTo(y);
            pt.copyTo(r);
        }
        var ys = y.t;
        var y0 = y[ys - 1];
        if (y0 == 0) {
            return;
        }
        var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);
        var d1 = this.FV / yt;
        var d2 = (1 << this.F1) / yt;
        var e = 1 << this.F2;
        var i = r.t;
        var j = i - ys;
        var t = (q == null) ? nbi() : q;
        y.dlShiftTo(j, t);
        if (r.compareTo(t) >= 0) {
            r[r.t++] = 1;
            r.subTo(t, r);
        }
        BigInteger.ONE.dlShiftTo(ys, t);
        t.subTo(y, y); // "negative" y so we can replace sub with am later
        while (y.t < ys) {
            y[y.t++] = 0;
        }
        while (--j >= 0) {
            // Estimate quotient digit
            var qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);
            if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) { // Try it out
                y.dlShiftTo(j, t);
                r.subTo(t, r);
                while (r[i] < --qd) {
                    r.subTo(t, r);
                }
            }
        }
        if (q != null) {
            r.drShiftTo(ys, q);
            if (ts != ms) {
                BigInteger.ZERO.subTo(q, q);
            }
        }
        r.t = ys;
        r.clamp();
        if (nsh > 0) {
            r.rShiftTo(nsh, r);
        } // Denormalize remainder
        if (ts < 0) {
            BigInteger.ZERO.subTo(r, r);
        }
    };
    // BigInteger.prototype.invDigit = bnpInvDigit;
    // (protected) return "-1/this % 2^DB"; useful for Mont. reduction
    // justification:
    //         xy == 1 (mod m)
    //         xy =  1+km
    //   xy(2-xy) = (1+km)(1-km)
    // x[y(2-xy)] = 1-k^2m^2
    // x[y(2-xy)] == 1 (mod m^2)
    // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
    // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
    // JS multiply "overflows" differently from C/C++, so care is needed here.
    BigInteger.prototype.invDigit = function () {
        if (this.t < 1) {
            return 0;
        }
        var x = this[0];
        if ((x & 1) == 0) {
            return 0;
        }
        var y = x & 3; // y == 1/x mod 2^2
        y = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4
        y = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8
        y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16
        // last step - calculate inverse mod DV directly;
        // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
        y = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits
        // we really want the negative inverse, and -DV < y < DV
        return (y > 0) ? this.DV - y : -y;
    };
    // BigInteger.prototype.isEven = bnpIsEven;
    // (protected) true iff this is even
    BigInteger.prototype.isEven = function () {
        return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;
    };
    // BigInteger.prototype.exp = bnpExp;
    // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
    BigInteger.prototype.exp = function (e, z) {
        if (e > 0xffffffff || e < 1) {
            return BigInteger.ONE;
        }
        var r = nbi();
        var r2 = nbi();
        var g = z.convert(this);
        var i = nbits(e) - 1;
        g.copyTo(r);
        while (--i >= 0) {
            z.sqrTo(r, r2);
            if ((e & (1 << i)) > 0) {
                z.mulTo(r2, g, r);
            }
            else {
                var t = r;
                r = r2;
                r2 = t;
            }
        }
        return z.revert(r);
    };
    // BigInteger.prototype.chunkSize = bnpChunkSize;
    // (protected) return x s.t. r^x < DV
    BigInteger.prototype.chunkSize = function (r) {
        return Math.floor(Math.LN2 * this.DB / Math.log(r));
    };
    // BigInteger.prototype.toRadix = bnpToRadix;
    // (protected) convert to radix string
    BigInteger.prototype.toRadix = function (b) {
        if (b == null) {
            b = 10;
        }
        if (this.signum() == 0 || b < 2 || b > 36) {
            return "0";
        }
        var cs = this.chunkSize(b);
        var a = Math.pow(b, cs);
        var d = nbv(a);
        var y = nbi();
        var z = nbi();
        var r = "";
        this.divRemTo(d, y, z);
        while (y.signum() > 0) {
            r = (a + z.intValue()).toString(b).substr(1) + r;
            y.divRemTo(d, y, z);
        }
        return z.intValue().toString(b) + r;
    };
    // BigInteger.prototype.fromRadix = bnpFromRadix;
    // (protected) convert from radix string
    BigInteger.prototype.fromRadix = function (s, b) {
        this.fromInt(0);
        if (b == null) {
            b = 10;
        }
        var cs = this.chunkSize(b);
        var d = Math.pow(b, cs);
        var mi = false;
        var j = 0;
        var w = 0;
        for (var i = 0; i < s.length; ++i) {
            var x = intAt(s, i);
            if (x < 0) {
                if (s.charAt(i) == "-" && this.signum() == 0) {
                    mi = true;
                }
                continue;
            }
            w = b * w + x;
            if (++j >= cs) {
                this.dMultiply(d);
                this.dAddOffset(w, 0);
                j = 0;
                w = 0;
            }
        }
        if (j > 0) {
            this.dMultiply(Math.pow(b, j));
            this.dAddOffset(w, 0);
        }
        if (mi) {
            BigInteger.ZERO.subTo(this, this);
        }
    };
    // BigInteger.prototype.fromNumber = bnpFromNumber;
    // (protected) alternate constructor
    BigInteger.prototype.fromNumber = function (a, b, c) {
        if ("number" == typeof b) {
            // new BigInteger(int,int,RNG)
            if (a < 2) {
                this.fromInt(1);
            }
            else {
                this.fromNumber(a, c);
                if (!this.testBit(a - 1)) {
                    // force MSB set
                    this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this);
                }
                if (this.isEven()) {
                    this.dAddOffset(1, 0);
                } // force odd
                while (!this.isProbablePrime(b)) {
                    this.dAddOffset(2, 0);
                    if (this.bitLength() > a) {
                        this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);
                    }
                }
            }
        }
        else {
            // new BigInteger(int,RNG)
            var x = [];
            var t = a & 7;
            x.length = (a >> 3) + 1;
            b.nextBytes(x);
            if (t > 0) {
                x[0] &= ((1 << t) - 1);
            }
            else {
                x[0] = 0;
            }
            this.fromString(x, 256);
        }
    };
    // BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
    // (protected) r = this op a (bitwise)
    BigInteger.prototype.bitwiseTo = function (a, op, r) {
        var i;
        var f;
        var m = Math.min(a.t, this.t);
        for (i = 0; i < m; ++i) {
            r[i] = op(this[i], a[i]);
        }
        if (a.t < this.t) {
            f = a.s & this.DM;
            for (i = m; i < this.t; ++i) {
                r[i] = op(this[i], f);
            }
            r.t = this.t;
        }
        else {
            f = this.s & this.DM;
            for (i = m; i < a.t; ++i) {
                r[i] = op(f, a[i]);
            }
            r.t = a.t;
        }
        r.s = op(this.s, a.s);
        r.clamp();
    };
    // BigInteger.prototype.changeBit = bnpChangeBit;
    // (protected) this op (1<<n)
    BigInteger.prototype.changeBit = function (n, op) {
        var r = BigInteger.ONE.shiftLeft(n);
        this.bitwiseTo(r, op, r);
        return r;
    };
    // BigInteger.prototype.addTo = bnpAddTo;
    // (protected) r = this + a
    BigInteger.prototype.addTo = function (a, r) {
        var i = 0;
        var c = 0;
        var m = Math.min(a.t, this.t);
        while (i < m) {
            c += this[i] + a[i];
            r[i++] = c & this.DM;
            c >>= this.DB;
        }
        if (a.t < this.t) {
            c += a.s;
            while (i < this.t) {
                c += this[i];
                r[i++] = c & this.DM;
                c >>= this.DB;
            }
            c += this.s;
        }
        else {
            c += this.s;
            while (i < a.t) {
                c += a[i];
                r[i++] = c & this.DM;
                c >>= this.DB;
            }
            c += a.s;
        }
        r.s = (c < 0) ? -1 : 0;
        if (c > 0) {
            r[i++] = c;
        }
        else if (c < -1) {
            r[i++] = this.DV + c;
        }
        r.t = i;
        r.clamp();
    };
    // BigInteger.prototype.dMultiply = bnpDMultiply;
    // (protected) this *= n, this >= 0, 1 < n < DV
    BigInteger.prototype.dMultiply = function (n) {
        this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);
        ++this.t;
        this.clamp();
    };
    // BigInteger.prototype.dAddOffset = bnpDAddOffset;
    // (protected) this += n << w words, this >= 0
    BigInteger.prototype.dAddOffset = function (n, w) {
        if (n == 0) {
            return;
        }
        while (this.t <= w) {
            this[this.t++] = 0;
        }
        this[w] += n;
        while (this[w] >= this.DV) {
            this[w] -= this.DV;
            if (++w >= this.t) {
                this[this.t++] = 0;
            }
            ++this[w];
        }
    };
    // BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
    // (protected) r = lower n words of "this * a", a.t <= n
    // "this" should be the larger one if appropriate.
    BigInteger.prototype.multiplyLowerTo = function (a, n, r) {
        var i = Math.min(this.t + a.t, n);
        r.s = 0; // assumes a,this >= 0
        r.t = i;
        while (i > 0) {
            r[--i] = 0;
        }
        for (var j = r.t - this.t; i < j; ++i) {
            r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);
        }
        for (var j = Math.min(a.t, n); i < j; ++i) {
            this.am(0, a[i], r, i, 0, n - i);
        }
        r.clamp();
    };
    // BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
    // (protected) r = "this * a" without lower n words, n > 0
    // "this" should be the larger one if appropriate.
    BigInteger.prototype.multiplyUpperTo = function (a, n, r) {
        --n;
        var i = r.t = this.t + a.t - n;
        r.s = 0; // assumes a,this >= 0
        while (--i >= 0) {
            r[i] = 0;
        }
        for (i = Math.max(n - this.t, 0); i < a.t; ++i) {
            r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);
        }
        r.clamp();
        r.drShiftTo(1, r);
    };
    // BigInteger.prototype.modInt = bnpModInt;
    // (protected) this % n, n < 2^26
    BigInteger.prototype.modInt = function (n) {
        if (n <= 0) {
            return 0;
        }
        var d = this.DV % n;
        var r = (this.s < 0) ? n - 1 : 0;
        if (this.t > 0) {
            if (d == 0) {
                r = this[0] % n;
            }
            else {
                for (var i = this.t - 1; i >= 0; --i) {
                    r = (d * r + this[i]) % n;
                }
            }
        }
        return r;
    };
    // BigInteger.prototype.millerRabin = bnpMillerRabin;
    // (protected) true if probably prime (HAC 4.24, Miller-Rabin)
    BigInteger.prototype.millerRabin = function (t) {
        var n1 = this.subtract(BigInteger.ONE);
        var k = n1.getLowestSetBit();
        if (k <= 0) {
            return false;
        }
        var r = n1.shiftRight(k);
        t = (t + 1) >> 1;
        if (t > lowprimes.length) {
            t = lowprimes.length;
        }
        var a = nbi();
        for (var i = 0; i < t; ++i) {
            // Pick bases at random, instead of starting at 2
            a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);
            var y = a.modPow(r, this);
            if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
                var j = 1;
                while (j++ < k && y.compareTo(n1) != 0) {
                    y = y.modPowInt(2, this);
                    if (y.compareTo(BigInteger.ONE) == 0) {
                        return false;
                    }
                }
                if (y.compareTo(n1) != 0) {
                    return false;
                }
            }
        }
        return true;
    };
    // BigInteger.prototype.square = bnSquare;
    // (public) this^2
    BigInteger.prototype.square = function () {
        var r = nbi();
        this.squareTo(r);
        return r;
    };
    //#region ASYNC
    // Public API method
    BigInteger.prototype.gcda = function (a, callback) {
        var x = (this.s < 0) ? this.negate() : this.clone();
        var y = (a.s < 0) ? a.negate() : a.clone();
        if (x.compareTo(y) < 0) {
            var t = x;
            x = y;
            y = t;
        }
        var i = x.getLowestSetBit();
        var g = y.getLowestSetBit();
        if (g < 0) {
            callback(x);
            return;
        }
        if (i < g) {
            g = i;
        }
        if (g > 0) {
            x.rShiftTo(g, x);
            y.rShiftTo(g, y);
        }
        // Workhorse of the algorithm, gets called 200 - 800 times per 512 bit keygen.
        var gcda1 = function () {
            if ((i = x.getLowestSetBit()) > 0) {
                x.rShiftTo(i, x);
            }
            if ((i = y.getLowestSetBit()) > 0) {
                y.rShiftTo(i, y);
            }
            if (x.compareTo(y) >= 0) {
                x.subTo(y, x);
                x.rShiftTo(1, x);
            }
            else {
                y.subTo(x, y);
                y.rShiftTo(1, y);
            }
            if (!(x.signum() > 0)) {
                if (g > 0) {
                    y.lShiftTo(g, y);
                }
                setTimeout(function () { callback(y); }, 0); // escape
            }
            else {
                setTimeout(gcda1, 0);
            }
        };
        setTimeout(gcda1, 10);
    };
    // (protected) alternate constructor
    BigInteger.prototype.fromNumberAsync = function (a, b, c, callback) {
        if ("number" == typeof b) {
            if (a < 2) {
                this.fromInt(1);
            }
            else {
                this.fromNumber(a, c);
                if (!this.testBit(a - 1)) {
                    this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this);
                }
                if (this.isEven()) {
                    this.dAddOffset(1, 0);
                }
                var bnp_1 = this;
                var bnpfn1_1 = function () {
                    bnp_1.dAddOffset(2, 0);
                    if (bnp_1.bitLength() > a) {
                        bnp_1.subTo(BigInteger.ONE.shiftLeft(a - 1), bnp_1);
                    }
                    if (bnp_1.isProbablePrime(b)) {
                        setTimeout(function () { callback(); }, 0); // escape
                    }
                    else {
                        setTimeout(bnpfn1_1, 0);
                    }
                };
                setTimeout(bnpfn1_1, 0);
            }
        }
        else {
            var x = [];
            var t = a & 7;
            x.length = (a >> 3) + 1;
            b.nextBytes(x);
            if (t > 0) {
                x[0] &= ((1 << t) - 1);
            }
            else {
                x[0] = 0;
            }
            this.fromString(x, 256);
        }
    };
    return BigInteger;
}());

//#region REDUCERS
//#region NullExp
var NullExp = /** @class */ (function () {
    function NullExp() {
    }
    // NullExp.prototype.convert = nNop;
    NullExp.prototype.convert = function (x) {
        return x;
    };
    // NullExp.prototype.revert = nNop;
    NullExp.prototype.revert = function (x) {
        return x;
    };
    // NullExp.prototype.mulTo = nMulTo;
    NullExp.prototype.mulTo = function (x, y, r) {
        x.multiplyTo(y, r);
    };
    // NullExp.prototype.sqrTo = nSqrTo;
    NullExp.prototype.sqrTo = function (x, r) {
        x.squareTo(r);
    };
    return NullExp;
}());
// Modular reduction using "classic" algorithm
var Classic = /** @class */ (function () {
    function Classic(m) {
        this.m = m;
    }
    // Classic.prototype.convert = cConvert;
    Classic.prototype.convert = function (x) {
        if (x.s < 0 || x.compareTo(this.m) >= 0) {
            return x.mod(this.m);
        }
        else {
            return x;
        }
    };
    // Classic.prototype.revert = cRevert;
    Classic.prototype.revert = function (x) {
        return x;
    };
    // Classic.prototype.reduce = cReduce;
    Classic.prototype.reduce = function (x) {
        x.divRemTo(this.m, null, x);
    };
    // Classic.prototype.mulTo = cMulTo;
    Classic.prototype.mulTo = function (x, y, r) {
        x.multiplyTo(y, r);
        this.reduce(r);
    };
    // Classic.prototype.sqrTo = cSqrTo;
    Classic.prototype.sqrTo = function (x, r) {
        x.squareTo(r);
        this.reduce(r);
    };
    return Classic;
}());
//#endregion
//#region Montgomery
// Montgomery reduction
var Montgomery = /** @class */ (function () {
    function Montgomery(m) {
        this.m = m;
        this.mp = m.invDigit();
        this.mpl = this.mp & 0x7fff;
        this.mph = this.mp >> 15;
        this.um = (1 << (m.DB - 15)) - 1;
        this.mt2 = 2 * m.t;
    }
    // Montgomery.prototype.convert = montConvert;
    // xR mod m
    Montgomery.prototype.convert = function (x) {
        var r = nbi();
        x.abs().dlShiftTo(this.m.t, r);
        r.divRemTo(this.m, null, r);
        if (x.s < 0 && r.compareTo(jsbn_BigInteger.ZERO) > 0) {
            this.m.subTo(r, r);
        }
        return r;
    };
    // Montgomery.prototype.revert = montRevert;
    // x/R mod m
    Montgomery.prototype.revert = function (x) {
        var r = nbi();
        x.copyTo(r);
        this.reduce(r);
        return r;
    };
    // Montgomery.prototype.reduce = montReduce;
    // x = x/R mod m (HAC 14.32)
    Montgomery.prototype.reduce = function (x) {
        while (x.t <= this.mt2) {
            // pad x so am has enough room later
            x[x.t++] = 0;
        }
        for (var i = 0; i < this.m.t; ++i) {
            // faster way of calculating u0 = x[i]*mp mod DV
            var j = x[i] & 0x7fff;
            var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;
            // use am to combine the multiply-shift-add into one call
            j = i + this.m.t;
            x[j] += this.m.am(0, u0, x, i, 0, this.m.t);
            // propagate carry
            while (x[j] >= x.DV) {
                x[j] -= x.DV;
                x[++j]++;
            }
        }
        x.clamp();
        x.drShiftTo(this.m.t, x);
        if (x.compareTo(this.m) >= 0) {
            x.subTo(this.m, x);
        }
    };
    // Montgomery.prototype.mulTo = montMulTo;
    // r = "xy/R mod m"; x,y != r
    Montgomery.prototype.mulTo = function (x, y, r) {
        x.multiplyTo(y, r);
        this.reduce(r);
    };
    // Montgomery.prototype.sqrTo = montSqrTo;
    // r = "x^2/R mod m"; x != r
    Montgomery.prototype.sqrTo = function (x, r) {
        x.squareTo(r);
        this.reduce(r);
    };
    return Montgomery;
}());
//#endregion Montgomery
//#region Barrett
// Barrett modular reduction
var Barrett = /** @class */ (function () {
    function Barrett(m) {
        this.m = m;
        // setup Barrett
        this.r2 = nbi();
        this.q3 = nbi();
        jsbn_BigInteger.ONE.dlShiftTo(2 * m.t, this.r2);
        this.mu = this.r2.divide(m);
    }
    // Barrett.prototype.convert = barrettConvert;
    Barrett.prototype.convert = function (x) {
        if (x.s < 0 || x.t > 2 * this.m.t) {
            return x.mod(this.m);
        }
        else if (x.compareTo(this.m) < 0) {
            return x;
        }
        else {
            var r = nbi();
            x.copyTo(r);
            this.reduce(r);
            return r;
        }
    };
    // Barrett.prototype.revert = barrettRevert;
    Barrett.prototype.revert = function (x) {
        return x;
    };
    // Barrett.prototype.reduce = barrettReduce;
    // x = x mod m (HAC 14.42)
    Barrett.prototype.reduce = function (x) {
        x.drShiftTo(this.m.t - 1, this.r2);
        if (x.t > this.m.t + 1) {
            x.t = this.m.t + 1;
            x.clamp();
        }
        this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);
        this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);
        while (x.compareTo(this.r2) < 0) {
            x.dAddOffset(1, this.m.t + 1);
        }
        x.subTo(this.r2, x);
        while (x.compareTo(this.m) >= 0) {
            x.subTo(this.m, x);
        }
    };
    // Barrett.prototype.mulTo = barrettMulTo;
    // r = x*y mod m; x,y != r
    Barrett.prototype.mulTo = function (x, y, r) {
        x.multiplyTo(y, r);
        this.reduce(r);
    };
    // Barrett.prototype.sqrTo = barrettSqrTo;
    // r = x^2 mod m; x != r
    Barrett.prototype.sqrTo = function (x, r) {
        x.squareTo(r);
        this.reduce(r);
    };
    return Barrett;
}());
//#endregion
//#endregion REDUCERS
// return new, unset BigInteger
function nbi() { return new jsbn_BigInteger(null); }
function parseBigInt(str, r) {
    return new jsbn_BigInteger(str, r);
}
// am: Compute w_j += (x*this_i), propagate carries,
// c is initial carry, returns final carry.
// c < 3*dvalue, x < 2*dvalue, this_i < dvalue
// We need to select the fastest one that works in this environment.
var inBrowser = typeof navigator !== "undefined";
if (inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) {
    // am2 avoids a big mult-and-extract completely.
    // Max digit bits should be <= 30 because we do bitwise ops
    // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
    jsbn_BigInteger.prototype.am = function am2(i, x, w, j, c, n) {
        var xl = x & 0x7fff;
        var xh = x >> 15;
        while (--n >= 0) {
            var l = this[i] & 0x7fff;
            var h = this[i++] >> 15;
            var m = xh * l + h * xl;
            l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);
            c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);
            w[j++] = l & 0x3fffffff;
        }
        return c;
    };
    dbits = 30;
}
else if (inBrowser && j_lm && (navigator.appName != "Netscape")) {
    // am1: use a single mult and divide to get the high bits,
    // max digit bits should be 26 because
    // max internal value = 2*dvalue^2-2*dvalue (< 2^53)
    jsbn_BigInteger.prototype.am = function am1(i, x, w, j, c, n) {
        while (--n >= 0) {
            var v = x * this[i++] + w[j] + c;
            c = Math.floor(v / 0x4000000);
            w[j++] = v & 0x3ffffff;
        }
        return c;
    };
    dbits = 26;
}
else { // Mozilla/Netscape seems to prefer am3
    // Alternately, set max digit bits to 28 since some
    // browsers slow down when dealing with 32-bit numbers.
    jsbn_BigInteger.prototype.am = function am3(i, x, w, j, c, n) {
        var xl = x & 0x3fff;
        var xh = x >> 14;
        while (--n >= 0) {
            var l = this[i] & 0x3fff;
            var h = this[i++] >> 14;
            var m = xh * l + h * xl;
            l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;
            c = (l >> 28) + (m >> 14) + xh * h;
            w[j++] = l & 0xfffffff;
        }
        return c;
    };
    dbits = 28;
}
jsbn_BigInteger.prototype.DB = dbits;
jsbn_BigInteger.prototype.DM = ((1 << dbits) - 1);
jsbn_BigInteger.prototype.DV = (1 << dbits);
var BI_FP = 52;
jsbn_BigInteger.prototype.FV = Math.pow(2, BI_FP);
jsbn_BigInteger.prototype.F1 = BI_FP - dbits;
jsbn_BigInteger.prototype.F2 = 2 * dbits - BI_FP;
// Digit conversions
var BI_RC = [];
var rr;
var vv;
rr = "0".charCodeAt(0);
for (vv = 0; vv <= 9; ++vv) {
    BI_RC[rr++] = vv;
}
rr = "a".charCodeAt(0);
for (vv = 10; vv < 36; ++vv) {
    BI_RC[rr++] = vv;
}
rr = "A".charCodeAt(0);
for (vv = 10; vv < 36; ++vv) {
    BI_RC[rr++] = vv;
}
function intAt(s, i) {
    var c = BI_RC[s.charCodeAt(i)];
    return (c == null) ? -1 : c;
}
// return bigint initialized to value
function nbv(i) {
    var r = nbi();
    r.fromInt(i);
    return r;
}
// returns bit length of the integer x
function nbits(x) {
    var r = 1;
    var t;
    if ((t = x >>> 16) != 0) {
        x = t;
        r += 16;
    }
    if ((t = x >> 8) != 0) {
        x = t;
        r += 8;
    }
    if ((t = x >> 4) != 0) {
        x = t;
        r += 4;
    }
    if ((t = x >> 2) != 0) {
        x = t;
        r += 2;
    }
    if ((t = x >> 1) != 0) {
        x = t;
        r += 1;
    }
    return r;
}
// "constants"
jsbn_BigInteger.ZERO = nbv(0);
jsbn_BigInteger.ONE = nbv(1);

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/jsbn/prng4.js
// prng4.js - uses Arcfour as a PRNG
var Arcfour = /** @class */ (function () {
    function Arcfour() {
        this.i = 0;
        this.j = 0;
        this.S = [];
    }
    // Arcfour.prototype.init = ARC4init;
    // Initialize arcfour context from key, an array of ints, each from [0..255]
    Arcfour.prototype.init = function (key) {
        var i;
        var j;
        var t;
        for (i = 0; i < 256; ++i) {
            this.S[i] = i;
        }
        j = 0;
        for (i = 0; i < 256; ++i) {
            j = (j + this.S[i] + key[i % key.length]) & 255;
            t = this.S[i];
            this.S[i] = this.S[j];
            this.S[j] = t;
        }
        this.i = 0;
        this.j = 0;
    };
    // Arcfour.prototype.next = ARC4next;
    Arcfour.prototype.next = function () {
        var t;
        this.i = (this.i + 1) & 255;
        this.j = (this.j + this.S[this.i]) & 255;
        t = this.S[this.i];
        this.S[this.i] = this.S[this.j];
        this.S[this.j] = t;
        return this.S[(t + this.S[this.i]) & 255];
    };
    return Arcfour;
}());

// Plug in your RNG constructor here
function prng_newstate() {
    return new Arcfour();
}
// Pool size must be a multiple of 4 and greater than 32.
// An array of bytes the size of the pool will be passed to init()
var rng_psize = 256;

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/jsbn/rng.js
// Random number generator - requires a PRNG backend, e.g. prng4.js

var rng_state;
var rng_pool = null;
var rng_pptr;
// Initialize the pool with junk if needed.
if (rng_pool == null) {
    rng_pool = [];
    rng_pptr = 0;
    var rng_t = void 0;
    if (window.crypto && window.crypto.getRandomValues) {
        // Extract entropy (2048 bits) from RNG if available
        var rng_z = new Uint32Array(256);
        window.crypto.getRandomValues(rng_z);
        for (rng_t = 0; rng_t < rng_z.length; ++rng_t) {
            rng_pool[rng_pptr++] = rng_z[rng_t] & 255;
        }
    }
    // Use mouse events for entropy, if we do not have enough entropy by the time
    // we need it, entropy will be generated by Math.random.
    var count = 0;
    var onMouseMoveListener_1 = function (ev) {
        count = count || 0;
        if (count >= 256 || rng_pptr >= rng_psize) {
            if (window.removeEventListener) {
                window.removeEventListener("mousemove", onMouseMoveListener_1, false);
            }
            else if (window.detachEvent) {
                window.detachEvent("onmousemove", onMouseMoveListener_1);
            }
            return;
        }
        try {
            var mouseCoordinates = ev.x + ev.y;
            rng_pool[rng_pptr++] = mouseCoordinates & 255;
            count += 1;
        }
        catch (e) {
            // Sometimes Firefox will deny permission to access event properties for some reason. Ignore.
        }
    };
    if (window.addEventListener) {
        window.addEventListener("mousemove", onMouseMoveListener_1, false);
    }
    else if (window.attachEvent) {
        window.attachEvent("onmousemove", onMouseMoveListener_1);
    }
}
function rng_get_byte() {
    if (rng_state == null) {
        rng_state = prng_newstate();
        // At this point, we may not have collected enough entropy.  If not, fall back to Math.random
        while (rng_pptr < rng_psize) {
            var random = Math.floor(65536 * Math.random());
            rng_pool[rng_pptr++] = random & 255;
        }
        rng_state.init(rng_pool);
        for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {
            rng_pool[rng_pptr] = 0;
        }
        rng_pptr = 0;
    }
    // TODO: allow reseeding after first request
    return rng_state.next();
}
var SecureRandom = /** @class */ (function () {
    function SecureRandom() {
    }
    SecureRandom.prototype.nextBytes = function (ba) {
        for (var i = 0; i < ba.length; ++i) {
            ba[i] = rng_get_byte();
        }
    };
    return SecureRandom;
}());


// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/jsbn/rsa.js
// Depends on jsbn.js and rng.js
// Version 1.1: support utf-8 encoding in pkcs1pad2
// convert a (hex) string to a bignum object


// function linebrk(s,n) {
//   var ret = "";
//   var i = 0;
//   while(i + n < s.length) {
//     ret += s.substring(i,i+n) + "\n";
//     i += n;
//   }
//   return ret + s.substring(i,s.length);
// }
// function byte2Hex(b) {
//   if(b < 0x10)
//     return "0" + b.toString(16);
//   else
//     return b.toString(16);
// }
function pkcs1pad1(s, n) {
    if (n < s.length + 22) {
        console.error("Message too long for RSA");
        return null;
    }
    var len = n - s.length - 6;
    var filler = "";
    for (var f = 0; f < len; f += 2) {
        filler += "ff";
    }
    var m = "0001" + filler + "00" + s;
    return parseBigInt(m, 16);
}
// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint
function pkcs1pad2(s, n) {
    if (n < s.length + 11) { // TODO: fix for utf-8
        console.error("Message too long for RSA");
        return null;
    }
    var ba = [];
    var i = s.length - 1;
    while (i >= 0 && n > 0) {
        var c = s.charCodeAt(i--);
        if (c < 128) { // encode using utf-8
            ba[--n] = c;
        }
        else if ((c > 127) && (c < 2048)) {
            ba[--n] = (c & 63) | 128;
            ba[--n] = (c >> 6) | 192;
        }
        else {
            ba[--n] = (c & 63) | 128;
            ba[--n] = ((c >> 6) & 63) | 128;
            ba[--n] = (c >> 12) | 224;
        }
    }
    ba[--n] = 0;
    var rng = new SecureRandom();
    var x = [];
    while (n > 2) { // random non-zero pad
        x[0] = 0;
        while (x[0] == 0) {
            rng.nextBytes(x);
        }
        ba[--n] = x[0];
    }
    ba[--n] = 2;
    ba[--n] = 0;
    return new jsbn_BigInteger(ba);
}
// "empty" RSA key constructor
var rsa_RSAKey = /** @class */ (function () {
    function RSAKey() {
        this.n = null;
        this.e = 0;
        this.d = null;
        this.p = null;
        this.q = null;
        this.dmp1 = null;
        this.dmq1 = null;
        this.coeff = null;
    }
    //#region PROTECTED
    // protected
    // RSAKey.prototype.doPublic = RSADoPublic;
    // Perform raw public operation on "x": return x^e (mod n)
    RSAKey.prototype.doPublic = function (x) {
        return x.modPowInt(this.e, this.n);
    };
    // RSAKey.prototype.doPrivate = RSADoPrivate;
    // Perform raw private operation on "x": return x^d (mod n)
    RSAKey.prototype.doPrivate = function (x) {
        if (this.p == null || this.q == null) {
            return x.modPow(this.d, this.n);
        }
        // TODO: re-calculate any missing CRT params
        var xp = x.mod(this.p).modPow(this.dmp1, this.p);
        var xq = x.mod(this.q).modPow(this.dmq1, this.q);
        while (xp.compareTo(xq) < 0) {
            xp = xp.add(this.p);
        }
        return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);
    };
    //#endregion PROTECTED
    //#region PUBLIC
    // RSAKey.prototype.setPublic = RSASetPublic;
    // Set the public key fields N and e from hex strings
    RSAKey.prototype.setPublic = function (N, E) {
        if (N != null && E != null && N.length > 0 && E.length > 0) {
            this.n = parseBigInt(N, 16);
            this.e = parseInt(E, 16);
        }
        else {
            console.error("Invalid RSA public key");
        }
    };
    // RSAKey.prototype.encrypt = RSAEncrypt;
    // Return the PKCS#1 RSA encryption of "text" as an even-length hex string
    RSAKey.prototype.encrypt = function (text) {
        var maxLength = (this.n.bitLength() + 7) >> 3;
        var m = pkcs1pad2(text, maxLength);
        if (m == null) {
            return null;
        }
        var c = this.doPublic(m);
        if (c == null) {
            return null;
        }
        var h = c.toString(16);
        var length = h.length;
        // fix zero before result
        for (var i = 0; i < maxLength * 2 - length; i++) {
            h = "0" + h;
        }
        return h;
    };
    // RSAKey.prototype.setPrivate = RSASetPrivate;
    // Set the private key fields N, e, and d from hex strings
    RSAKey.prototype.setPrivate = function (N, E, D) {
        if (N != null && E != null && N.length > 0 && E.length > 0) {
            this.n = parseBigInt(N, 16);
            this.e = parseInt(E, 16);
            this.d = parseBigInt(D, 16);
        }
        else {
            console.error("Invalid RSA private key");
        }
    };
    // RSAKey.prototype.setPrivateEx = RSASetPrivateEx;
    // Set the private key fields N, e, d and CRT params from hex strings
    RSAKey.prototype.setPrivateEx = function (N, E, D, P, Q, DP, DQ, C) {
        if (N != null && E != null && N.length > 0 && E.length > 0) {
            this.n = parseBigInt(N, 16);
            this.e = parseInt(E, 16);
            this.d = parseBigInt(D, 16);
            this.p = parseBigInt(P, 16);
            this.q = parseBigInt(Q, 16);
            this.dmp1 = parseBigInt(DP, 16);
            this.dmq1 = parseBigInt(DQ, 16);
            this.coeff = parseBigInt(C, 16);
        }
        else {
            console.error("Invalid RSA private key");
        }
    };
    // RSAKey.prototype.generate = RSAGenerate;
    // Generate a new random private key B bits long, using public expt E
    RSAKey.prototype.generate = function (B, E) {
        var rng = new SecureRandom();
        var qs = B >> 1;
        this.e = parseInt(E, 16);
        var ee = new jsbn_BigInteger(E, 16);
        for (;;) {
            for (;;) {
                this.p = new jsbn_BigInteger(B - qs, 1, rng);
                if (this.p.subtract(jsbn_BigInteger.ONE).gcd(ee).compareTo(jsbn_BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) {
                    break;
                }
            }
            for (;;) {
                this.q = new jsbn_BigInteger(qs, 1, rng);
                if (this.q.subtract(jsbn_BigInteger.ONE).gcd(ee).compareTo(jsbn_BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) {
                    break;
                }
            }
            if (this.p.compareTo(this.q) <= 0) {
                var t = this.p;
                this.p = this.q;
                this.q = t;
            }
            var p1 = this.p.subtract(jsbn_BigInteger.ONE);
            var q1 = this.q.subtract(jsbn_BigInteger.ONE);
            var phi = p1.multiply(q1);
            if (phi.gcd(ee).compareTo(jsbn_BigInteger.ONE) == 0) {
                this.n = this.p.multiply(this.q);
                this.d = ee.modInverse(phi);
                this.dmp1 = this.d.mod(p1);
                this.dmq1 = this.d.mod(q1);
                this.coeff = this.q.modInverse(this.p);
                break;
            }
        }
    };
    // RSAKey.prototype.decrypt = RSADecrypt;
    // Return the PKCS#1 RSA decryption of "ctext".
    // "ctext" is an even-length hex string and the output is a plain string.
    RSAKey.prototype.decrypt = function (ctext) {
        var c = parseBigInt(ctext, 16);
        var m = this.doPrivate(c);
        if (m == null) {
            return null;
        }
        return pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3);
    };
    // Generate a new random private key B bits long, using public expt E
    RSAKey.prototype.generateAsync = function (B, E, callback) {
        var rng = new SecureRandom();
        var qs = B >> 1;
        this.e = parseInt(E, 16);
        var ee = new jsbn_BigInteger(E, 16);
        var rsa = this;
        // These functions have non-descript names because they were originally for(;;) loops.
        // I don't know about cryptography to give them better names than loop1-4.
        var loop1 = function () {
            var loop4 = function () {
                if (rsa.p.compareTo(rsa.q) <= 0) {
                    var t = rsa.p;
                    rsa.p = rsa.q;
                    rsa.q = t;
                }
                var p1 = rsa.p.subtract(jsbn_BigInteger.ONE);
                var q1 = rsa.q.subtract(jsbn_BigInteger.ONE);
                var phi = p1.multiply(q1);
                if (phi.gcd(ee).compareTo(jsbn_BigInteger.ONE) == 0) {
                    rsa.n = rsa.p.multiply(rsa.q);
                    rsa.d = ee.modInverse(phi);
                    rsa.dmp1 = rsa.d.mod(p1);
                    rsa.dmq1 = rsa.d.mod(q1);
                    rsa.coeff = rsa.q.modInverse(rsa.p);
                    setTimeout(function () { callback(); }, 0); // escape
                }
                else {
                    setTimeout(loop1, 0);
                }
            };
            var loop3 = function () {
                rsa.q = nbi();
                rsa.q.fromNumberAsync(qs, 1, rng, function () {
                    rsa.q.subtract(jsbn_BigInteger.ONE).gcda(ee, function (r) {
                        if (r.compareTo(jsbn_BigInteger.ONE) == 0 && rsa.q.isProbablePrime(10)) {
                            setTimeout(loop4, 0);
                        }
                        else {
                            setTimeout(loop3, 0);
                        }
                    });
                });
            };
            var loop2 = function () {
                rsa.p = nbi();
                rsa.p.fromNumberAsync(B - qs, 1, rng, function () {
                    rsa.p.subtract(jsbn_BigInteger.ONE).gcda(ee, function (r) {
                        if (r.compareTo(jsbn_BigInteger.ONE) == 0 && rsa.p.isProbablePrime(10)) {
                            setTimeout(loop3, 0);
                        }
                        else {
                            setTimeout(loop2, 0);
                        }
                    });
                });
            };
            setTimeout(loop2, 0);
        };
        setTimeout(loop1, 0);
    };
    RSAKey.prototype.sign = function (text, digestMethod, digestName) {
        var header = getDigestHeader(digestName);
        var digest = header + digestMethod(text).toString();
        var m = pkcs1pad1(digest, this.n.bitLength() / 4);
        if (m == null) {
            return null;
        }
        var c = this.doPrivate(m);
        if (c == null) {
            return null;
        }
        var h = c.toString(16);
        if ((h.length & 1) == 0) {
            return h;
        }
        else {
            return "0" + h;
        }
    };
    RSAKey.prototype.verify = function (text, signature, digestMethod) {
        var c = parseBigInt(signature, 16);
        var m = this.doPublic(c);
        if (m == null) {
            return null;
        }
        var unpadded = m.toString(16).replace(/^1f+00/, "");
        var digest = removeDigestHeader(unpadded);
        return digest == digestMethod(text).toString();
    };
    return RSAKey;
}());

// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext
function pkcs1unpad2(d, n) {
    var b = d.toByteArray();
    var i = 0;
    while (i < b.length && b[i] == 0) {
        ++i;
    }
    if (b.length - i != n - 1 || b[i] != 2) {
        return null;
    }
    ++i;
    while (b[i] != 0) {
        if (++i >= b.length) {
            return null;
        }
    }
    var ret = "";
    while (++i < b.length) {
        var c = b[i] & 255;
        if (c < 128) { // utf-8 decode
            ret += String.fromCharCode(c);
        }
        else if ((c > 191) && (c < 224)) {
            ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63));
            ++i;
        }
        else {
            ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63));
            i += 2;
        }
    }
    return ret;
}
// https://tools.ietf.org/html/rfc3447#page-43
var DIGEST_HEADERS = {
    md2: "3020300c06082a864886f70d020205000410",
    md5: "3020300c06082a864886f70d020505000410",
    sha1: "3021300906052b0e03021a05000414",
    sha224: "302d300d06096086480165030402040500041c",
    sha256: "3031300d060960864801650304020105000420",
    sha384: "3041300d060960864801650304020205000430",
    sha512: "3051300d060960864801650304020305000440",
    ripemd160: "3021300906052b2403020105000414"
};
function getDigestHeader(name) {
    return DIGEST_HEADERS[name] || "";
}
function removeDigestHeader(str) {
    for (var name_1 in DIGEST_HEADERS) {
        if (DIGEST_HEADERS.hasOwnProperty(name_1)) {
            var header = DIGEST_HEADERS[name_1];
            var len = header.length;
            if (str.substr(0, len) == header) {
                return str.substr(len);
            }
        }
    }
    return str;
}
// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string
// function RSAEncryptB64(text) {
//  var h = this.encrypt(text);
//  if(h) return hex2b64(h); else return null;
// }
// public
// RSAKey.prototype.encrypt_b64 = RSAEncryptB64;

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js
/*!
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
var YAHOO = {};
YAHOO.lang = {
    /**
     * Utility to set up the prototype, constructor and superclass properties to
     * support an inheritance strategy that can chain constructors and methods.
     * Static members will not be inherited.
     *
     * @method extend
     * @static
     * @param {Function} subc   the object to modify
     * @param {Function} superc the object to inherit
     * @param {Object} overrides  additional properties/methods to add to the
     *                              subclass prototype.  These will override the
     *                              matching items obtained from the superclass
     *                              if present.
     */
    extend: function (subc, superc, overrides) {
        if (!superc || !subc) {
            throw new Error("YAHOO.lang.extend failed, please check that " +
                "all dependencies are included.");
        }
        var F = function () { };
        F.prototype = superc.prototype;
        subc.prototype = new F();
        subc.prototype.constructor = subc;
        subc.superclass = superc.prototype;
        if (superc.prototype.constructor == Object.prototype.constructor) {
            superc.prototype.constructor = superc;
        }
        if (overrides) {
            var i;
            for (i in overrides) {
                subc.prototype[i] = overrides[i];
            }
            /*
             * IE will not enumerate native functions in a derived object even if the
             * function was overridden.  This is a workaround for specific functions
             * we care about on the Object prototype.
             * @property _IEEnumFix
             * @param {Function} r  the object to receive the augmentation
             * @param {Function} s  the object that supplies the properties to augment
             * @static
             * @private
             */
            var _IEEnumFix = function () { }, ADD = ["toString", "valueOf"];
            try {
                if (/MSIE/.test(navigator.userAgent)) {
                    _IEEnumFix = function (r, s) {
                        for (i = 0; i < ADD.length; i = i + 1) {
                            var fname = ADD[i], f = s[fname];
                            if (typeof f === 'function' && f != Object.prototype[fname]) {
                                r[fname] = f;
                            }
                        }
                    };
                }
            }
            catch (ex) { }
            ;
            _IEEnumFix(subc.prototype, overrides);
        }
    }
};

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js
/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license
 */
/*
 * asn1.js - ASN.1 DER encoder classes
 *
 * Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)
 *
 * This software is licensed under the terms of the MIT License.
 * https://kjur.github.io/jsrsasign/license
 *
 * The above copyright and license notice shall be
 * included in all copies or substantial portions of the Software.
 */


/**
 * @fileOverview
 * @name asn1-1.0.js
 * @author Kenji Urushima kenji.urushima@gmail.com
 * @version asn1 1.0.13 (2017-Jun-02)
 * @since jsrsasign 2.1
 * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
 */
/**
 * kjur's class library name space
 * <p>
 * This name space provides following name spaces:
 * <ul>
 * <li>{@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder</li>
 * <li>{@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL</li>
 * <li>{@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature
 * class and utilities</li>
 * </ul>
 * </p>
 * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.
 * @name KJUR
 * @namespace kjur's class library name space
 */
var KJUR = {};
/**
 * kjur's ASN.1 class library name space
 * <p>
 * This is ITU-T X.690 ASN.1 DER encoder class library and
 * class structure and methods is very similar to
 * org.bouncycastle.asn1 package of
 * well known BouncyCaslte Cryptography Library.
 * <h4>PROVIDING ASN.1 PRIMITIVES</h4>
 * Here are ASN.1 DER primitive classes.
 * <ul>
 * <li>0x01 {@link KJUR.asn1.DERBoolean}</li>
 * <li>0x02 {@link KJUR.asn1.DERInteger}</li>
 * <li>0x03 {@link KJUR.asn1.DERBitString}</li>
 * <li>0x04 {@link KJUR.asn1.DEROctetString}</li>
 * <li>0x05 {@link KJUR.asn1.DERNull}</li>
 * <li>0x06 {@link KJUR.asn1.DERObjectIdentifier}</li>
 * <li>0x0a {@link KJUR.asn1.DEREnumerated}</li>
 * <li>0x0c {@link KJUR.asn1.DERUTF8String}</li>
 * <li>0x12 {@link KJUR.asn1.DERNumericString}</li>
 * <li>0x13 {@link KJUR.asn1.DERPrintableString}</li>
 * <li>0x14 {@link KJUR.asn1.DERTeletexString}</li>
 * <li>0x16 {@link KJUR.asn1.DERIA5String}</li>
 * <li>0x17 {@link KJUR.asn1.DERUTCTime}</li>
 * <li>0x18 {@link KJUR.asn1.DERGeneralizedTime}</li>
 * <li>0x30 {@link KJUR.asn1.DERSequence}</li>
 * <li>0x31 {@link KJUR.asn1.DERSet}</li>
 * </ul>
 * <h4>OTHER ASN.1 CLASSES</h4>
 * <ul>
 * <li>{@link KJUR.asn1.ASN1Object}</li>
 * <li>{@link KJUR.asn1.DERAbstractString}</li>
 * <li>{@link KJUR.asn1.DERAbstractTime}</li>
 * <li>{@link KJUR.asn1.DERAbstractStructured}</li>
 * <li>{@link KJUR.asn1.DERTaggedObject}</li>
 * </ul>
 * <h4>SUB NAME SPACES</h4>
 * <ul>
 * <li>{@link KJUR.asn1.cades} - CAdES long term signature format</li>
 * <li>{@link KJUR.asn1.cms} - Cryptographic Message Syntax</li>
 * <li>{@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)</li>
 * <li>{@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format</li>
 * <li>{@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL</li>
 * </ul>
 * </p>
 * NOTE: Please ignore method summary and document of this namespace.
 * This caused by a bug of jsdoc2.
 * @name KJUR.asn1
 * @namespace
 */
if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1)
    KJUR.asn1 = {};
/**
 * ASN1 utilities class
 * @name KJUR.asn1.ASN1Util
 * @class ASN1 utilities class
 * @since asn1 1.0.2
 */
KJUR.asn1.ASN1Util = new function () {
    this.integerToByteHex = function (i) {
        var h = i.toString(16);
        if ((h.length % 2) == 1)
            h = '0' + h;
        return h;
    };
    this.bigIntToMinTwosComplementsHex = function (bigIntegerValue) {
        var h = bigIntegerValue.toString(16);
        if (h.substr(0, 1) != '-') {
            if (h.length % 2 == 1) {
                h = '0' + h;
            }
            else {
                if (!h.match(/^[0-7]/)) {
                    h = '00' + h;
                }
            }
        }
        else {
            var hPos = h.substr(1);
            var xorLen = hPos.length;
            if (xorLen % 2 == 1) {
                xorLen += 1;
            }
            else {
                if (!h.match(/^[0-7]/)) {
                    xorLen += 2;
                }
            }
            var hMask = '';
            for (var i = 0; i < xorLen; i++) {
                hMask += 'f';
            }
            var biMask = new jsbn_BigInteger(hMask, 16);
            var biNeg = biMask.xor(bigIntegerValue).add(jsbn_BigInteger.ONE);
            h = biNeg.toString(16).replace(/^-/, '');
        }
        return h;
    };
    /**
     * get PEM string from hexadecimal data and header string
     * @name getPEMStringFromHex
     * @memberOf KJUR.asn1.ASN1Util
     * @function
     * @param {String} dataHex hexadecimal string of PEM body
     * @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')
     * @return {String} PEM formatted string of input data
     * @description
     * This method converts a hexadecimal string to a PEM string with
     * a specified header. Its line break will be CRLF("\r\n").
     * @example
     * var pem  = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');
     * // value of pem will be:
     * -----BEGIN PRIVATE KEY-----
     * YWFh
     * -----END PRIVATE KEY-----
     */
    this.getPEMStringFromHex = function (dataHex, pemHeader) {
        return hextopem(dataHex, pemHeader);
    };
    /**
     * generate ASN1Object specifed by JSON parameters
     * @name newObject
     * @memberOf KJUR.asn1.ASN1Util
     * @function
     * @param {Array} param JSON parameter to generate ASN1Object
     * @return {KJUR.asn1.ASN1Object} generated object
     * @since asn1 1.0.3
     * @description
     * generate any ASN1Object specified by JSON param
     * including ASN.1 primitive or structured.
     * Generally 'param' can be described as follows:
     * <blockquote>
     * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}
     * </blockquote>
     * 'TYPE-OF-ASN1OBJ' can be one of following symbols:
     * <ul>
     * <li>'bool' - DERBoolean</li>
     * <li>'int' - DERInteger</li>
     * <li>'bitstr' - DERBitString</li>
     * <li>'octstr' - DEROctetString</li>
     * <li>'null' - DERNull</li>
     * <li>'oid' - DERObjectIdentifier</li>
     * <li>'enum' - DEREnumerated</li>
     * <li>'utf8str' - DERUTF8String</li>
     * <li>'numstr' - DERNumericString</li>
     * <li>'prnstr' - DERPrintableString</li>
     * <li>'telstr' - DERTeletexString</li>
     * <li>'ia5str' - DERIA5String</li>
     * <li>'utctime' - DERUTCTime</li>
     * <li>'gentime' - DERGeneralizedTime</li>
     * <li>'seq' - DERSequence</li>
     * <li>'set' - DERSet</li>
     * <li>'tag' - DERTaggedObject</li>
     * </ul>
     * @example
     * newObject({'prnstr': 'aaa'});
     * newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})
     * // ASN.1 Tagged Object
     * newObject({'tag': {'tag': 'a1',
     *                    'explicit': true,
     *                    'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});
     * // more simple representation of ASN.1 Tagged Object
     * newObject({'tag': ['a1',
     *                    true,
     *                    {'seq': [
     *                      {'int': 3},
     *                      {'prnstr': 'aaa'}]}
     *                   ]});
     */
    this.newObject = function (param) {
        var _KJUR = KJUR, _KJUR_asn1 = _KJUR.asn1, _DERBoolean = _KJUR_asn1.DERBoolean, _DERInteger = _KJUR_asn1.DERInteger, _DERBitString = _KJUR_asn1.DERBitString, _DEROctetString = _KJUR_asn1.DEROctetString, _DERNull = _KJUR_asn1.DERNull, _DERObjectIdentifier = _KJUR_asn1.DERObjectIdentifier, _DEREnumerated = _KJUR_asn1.DEREnumerated, _DERUTF8String = _KJUR_asn1.DERUTF8String, _DERNumericString = _KJUR_asn1.DERNumericString, _DERPrintableString = _KJUR_asn1.DERPrintableString, _DERTeletexString = _KJUR_asn1.DERTeletexString, _DERIA5String = _KJUR_asn1.DERIA5String, _DERUTCTime = _KJUR_asn1.DERUTCTime, _DERGeneralizedTime = _KJUR_asn1.DERGeneralizedTime, _DERSequence = _KJUR_asn1.DERSequence, _DERSet = _KJUR_asn1.DERSet, _DERTaggedObject = _KJUR_asn1.DERTaggedObject, _newObject = _KJUR_asn1.ASN1Util.newObject;
        var keys = Object.keys(param);
        if (keys.length != 1)
            throw "key of param shall be only one.";
        var key = keys[0];
        if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + key + ":") == -1)
            throw "undefined key: " + key;
        if (key == "bool")
            return new _DERBoolean(param[key]);
        if (key == "int")
            return new _DERInteger(param[key]);
        if (key == "bitstr")
            return new _DERBitString(param[key]);
        if (key == "octstr")
            return new _DEROctetString(param[key]);
        if (key == "null")
            return new _DERNull(param[key]);
        if (key == "oid")
            return new _DERObjectIdentifier(param[key]);
        if (key == "enum")
            return new _DEREnumerated(param[key]);
        if (key == "utf8str")
            return new _DERUTF8String(param[key]);
        if (key == "numstr")
            return new _DERNumericString(param[key]);
        if (key == "prnstr")
            return new _DERPrintableString(param[key]);
        if (key == "telstr")
            return new _DERTeletexString(param[key]);
        if (key == "ia5str")
            return new _DERIA5String(param[key]);
        if (key == "utctime")
            return new _DERUTCTime(param[key]);
        if (key == "gentime")
            return new _DERGeneralizedTime(param[key]);
        if (key == "seq") {
            var paramList = param[key];
            var a = [];
            for (var i = 0; i < paramList.length; i++) {
                var asn1Obj = _newObject(paramList[i]);
                a.push(asn1Obj);
            }
            return new _DERSequence({ 'array': a });
        }
        if (key == "set") {
            var paramList = param[key];
            var a = [];
            for (var i = 0; i < paramList.length; i++) {
                var asn1Obj = _newObject(paramList[i]);
                a.push(asn1Obj);
            }
            return new _DERSet({ 'array': a });
        }
        if (key == "tag") {
            var tagParam = param[key];
            if (Object.prototype.toString.call(tagParam) === '[object Array]' &&
                tagParam.length == 3) {
                var obj = _newObject(tagParam[2]);
                return new _DERTaggedObject({ tag: tagParam[0],
                    explicit: tagParam[1],
                    obj: obj });
            }
            else {
                var newParam = {};
                if (tagParam.explicit !== undefined)
                    newParam.explicit = tagParam.explicit;
                if (tagParam.tag !== undefined)
                    newParam.tag = tagParam.tag;
                if (tagParam.obj === undefined)
                    throw "obj shall be specified for 'tag'.";
                newParam.obj = _newObject(tagParam.obj);
                return new _DERTaggedObject(newParam);
            }
        }
    };
    /**
     * get encoded hexadecimal string of ASN1Object specifed by JSON parameters
     * @name jsonToASN1HEX
     * @memberOf KJUR.asn1.ASN1Util
     * @function
     * @param {Array} param JSON parameter to generate ASN1Object
     * @return hexadecimal string of ASN1Object
     * @since asn1 1.0.4
     * @description
     * As for ASN.1 object representation of JSON object,
     * please see {@link newObject}.
     * @example
     * jsonToASN1HEX({'prnstr': 'aaa'});
     */
    this.jsonToASN1HEX = function (param) {
        var asn1Obj = this.newObject(param);
        return asn1Obj.getEncodedHex();
    };
};
/**
 * get dot noted oid number string from hexadecimal value of OID
 * @name oidHexToInt
 * @memberOf KJUR.asn1.ASN1Util
 * @function
 * @param {String} hex hexadecimal value of object identifier
 * @return {String} dot noted string of object identifier
 * @since jsrsasign 4.8.3 asn1 1.0.7
 * @description
 * This static method converts from hexadecimal string representation of
 * ASN.1 value of object identifier to oid number string.
 * @example
 * KJUR.asn1.ASN1Util.oidHexToInt('550406') &rarr; "2.5.4.6"
 */
KJUR.asn1.ASN1Util.oidHexToInt = function (hex) {
    var s = "";
    var i01 = parseInt(hex.substr(0, 2), 16);
    var i0 = Math.floor(i01 / 40);
    var i1 = i01 % 40;
    var s = i0 + "." + i1;
    var binbuf = "";
    for (var i = 2; i < hex.length; i += 2) {
        var value = parseInt(hex.substr(i, 2), 16);
        var bin = ("00000000" + value.toString(2)).slice(-8);
        binbuf = binbuf + bin.substr(1, 7);
        if (bin.substr(0, 1) == "0") {
            var bi = new jsbn_BigInteger(binbuf, 2);
            s = s + "." + bi.toString(10);
            binbuf = "";
        }
    }
    ;
    return s;
};
/**
 * get hexadecimal value of object identifier from dot noted oid value
 * @name oidIntToHex
 * @memberOf KJUR.asn1.ASN1Util
 * @function
 * @param {String} oidString dot noted string of object identifier
 * @return {String} hexadecimal value of object identifier
 * @since jsrsasign 4.8.3 asn1 1.0.7
 * @description
 * This static method converts from object identifier value string.
 * to hexadecimal string representation of it.
 * @example
 * KJUR.asn1.ASN1Util.oidIntToHex("2.5.4.6") &rarr; "550406"
 */
KJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {
    var itox = function (i) {
        var h = i.toString(16);
        if (h.length == 1)
            h = '0' + h;
        return h;
    };
    var roidtox = function (roid) {
        var h = '';
        var bi = new jsbn_BigInteger(roid, 10);
        var b = bi.toString(2);
        var padLen = 7 - b.length % 7;
        if (padLen == 7)
            padLen = 0;
        var bPad = '';
        for (var i = 0; i < padLen; i++)
            bPad += '0';
        b = bPad + b;
        for (var i = 0; i < b.length - 1; i += 7) {
            var b8 = b.substr(i, 7);
            if (i != b.length - 7)
                b8 = '1' + b8;
            h += itox(parseInt(b8, 2));
        }
        return h;
    };
    if (!oidString.match(/^[0-9.]+$/)) {
        throw "malformed oid string: " + oidString;
    }
    var h = '';
    var a = oidString.split('.');
    var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);
    h += itox(i0);
    a.splice(0, 2);
    for (var i = 0; i < a.length; i++) {
        h += roidtox(a[i]);
    }
    return h;
};
// ********************************************************************
//  Abstract ASN.1 Classes
// ********************************************************************
// ********************************************************************
/**
 * base class for ASN.1 DER encoder object
 * @name KJUR.asn1.ASN1Object
 * @class base class for ASN.1 DER encoder object
 * @property {Boolean} isModified flag whether internal data was changed
 * @property {String} hTLV hexadecimal string of ASN.1 TLV
 * @property {String} hT hexadecimal string of ASN.1 TLV tag(T)
 * @property {String} hL hexadecimal string of ASN.1 TLV length(L)
 * @property {String} hV hexadecimal string of ASN.1 TLV value(V)
 * @description
 */
KJUR.asn1.ASN1Object = function () {
    var isModified = true;
    var hTLV = null;
    var hT = '00';
    var hL = '00';
    var hV = '';
    /**
     * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)
     * @name getLengthHexFromValue
     * @memberOf KJUR.asn1.ASN1Object#
     * @function
     * @return {String} hexadecimal string of ASN.1 TLV length(L)
     */
    this.getLengthHexFromValue = function () {
        if (typeof this.hV == "undefined" || this.hV == null) {
            throw "this.hV is null or undefined.";
        }
        if (this.hV.length % 2 == 1) {
            throw "value hex must be even length: n=" + hV.length + ",v=" + this.hV;
        }
        var n = this.hV.length / 2;
        var hN = n.toString(16);
        if (hN.length % 2 == 1) {
            hN = "0" + hN;
        }
        if (n < 128) {
            return hN;
        }
        else {
            var hNlen = hN.length / 2;
            if (hNlen > 15) {
                throw "ASN.1 length too long to represent by 8x: n = " + n.toString(16);
            }
            var head = 128 + hNlen;
            return head.toString(16) + hN;
        }
    };
    /**
     * get hexadecimal string of ASN.1 TLV bytes
     * @name getEncodedHex
     * @memberOf KJUR.asn1.ASN1Object#
     * @function
     * @return {String} hexadecimal string of ASN.1 TLV
     */
    this.getEncodedHex = function () {
        if (this.hTLV == null || this.isModified) {
            this.hV = this.getFreshValueHex();
            this.hL = this.getLengthHexFromValue();
            this.hTLV = this.hT + this.hL + this.hV;
            this.isModified = false;
            //alert("first time: " + this.hTLV);
        }
        return this.hTLV;
    };
    /**
     * get hexadecimal string of ASN.1 TLV value(V) bytes
     * @name getValueHex
     * @memberOf KJUR.asn1.ASN1Object#
     * @function
     * @return {String} hexadecimal string of ASN.1 TLV value(V) bytes
     */
    this.getValueHex = function () {
        this.getEncodedHex();
        return this.hV;
    };
    this.getFreshValueHex = function () {
        return '';
    };
};
// == BEGIN DERAbstractString ================================================
/**
 * base class for ASN.1 DER string classes
 * @name KJUR.asn1.DERAbstractString
 * @class base class for ASN.1 DER string classes
 * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
 * @property {String} s internal string of value
 * @extends KJUR.asn1.ASN1Object
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>str - specify initial ASN.1 value(V) by a string</li>
 * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
 * </ul>
 * NOTE: 'params' can be omitted.
 */
KJUR.asn1.DERAbstractString = function (params) {
    KJUR.asn1.DERAbstractString.superclass.constructor.call(this);
    var s = null;
    var hV = null;
    /**
     * get string value of this string object
     * @name getString
     * @memberOf KJUR.asn1.DERAbstractString#
     * @function
     * @return {String} string value of this string object
     */
    this.getString = function () {
        return this.s;
    };
    /**
     * set value by a string
     * @name setString
     * @memberOf KJUR.asn1.DERAbstractString#
     * @function
     * @param {String} newS value by a string to set
     */
    this.setString = function (newS) {
        this.hTLV = null;
        this.isModified = true;
        this.s = newS;
        this.hV = stohex(this.s);
    };
    /**
     * set value by a hexadecimal string
     * @name setStringHex
     * @memberOf KJUR.asn1.DERAbstractString#
     * @function
     * @param {String} newHexString value by a hexadecimal string to set
     */
    this.setStringHex = function (newHexString) {
        this.hTLV = null;
        this.isModified = true;
        this.s = null;
        this.hV = newHexString;
    };
    this.getFreshValueHex = function () {
        return this.hV;
    };
    if (typeof params != "undefined") {
        if (typeof params == "string") {
            this.setString(params);
        }
        else if (typeof params['str'] != "undefined") {
            this.setString(params['str']);
        }
        else if (typeof params['hex'] != "undefined") {
            this.setStringHex(params['hex']);
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);
// == END   DERAbstractString ================================================
// == BEGIN DERAbstractTime ==================================================
/**
 * base class for ASN.1 DER Generalized/UTCTime class
 * @name KJUR.asn1.DERAbstractTime
 * @class base class for ASN.1 DER Generalized/UTCTime class
 * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})
 * @extends KJUR.asn1.ASN1Object
 * @description
 * @see KJUR.asn1.ASN1Object - superclass
 */
KJUR.asn1.DERAbstractTime = function (params) {
    KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);
    var s = null;
    var date = null;
    // --- PRIVATE METHODS --------------------
    this.localDateToUTC = function (d) {
        utc = d.getTime() + (d.getTimezoneOffset() * 60000);
        var utcDate = new Date(utc);
        return utcDate;
    };
    /*
     * format date string by Data object
     * @name formatDate
     * @memberOf KJUR.asn1.AbstractTime;
     * @param {Date} dateObject
     * @param {string} type 'utc' or 'gen'
     * @param {boolean} withMillis flag for with millisections or not
     * @description
     * 'withMillis' flag is supported from asn1 1.0.6.
     */
    this.formatDate = function (dateObject, type, withMillis) {
        var pad = this.zeroPadding;
        var d = this.localDateToUTC(dateObject);
        var year = String(d.getFullYear());
        if (type == 'utc')
            year = year.substr(2, 2);
        var month = pad(String(d.getMonth() + 1), 2);
        var day = pad(String(d.getDate()), 2);
        var hour = pad(String(d.getHours()), 2);
        var min = pad(String(d.getMinutes()), 2);
        var sec = pad(String(d.getSeconds()), 2);
        var s = year + month + day + hour + min + sec;
        if (withMillis === true) {
            var millis = d.getMilliseconds();
            if (millis != 0) {
                var sMillis = pad(String(millis), 3);
                sMillis = sMillis.replace(/[0]+$/, "");
                s = s + "." + sMillis;
            }
        }
        return s + "Z";
    };
    this.zeroPadding = function (s, len) {
        if (s.length >= len)
            return s;
        return new Array(len - s.length + 1).join('0') + s;
    };
    // --- PUBLIC METHODS --------------------
    /**
     * get string value of this string object
     * @name getString
     * @memberOf KJUR.asn1.DERAbstractTime#
     * @function
     * @return {String} string value of this time object
     */
    this.getString = function () {
        return this.s;
    };
    /**
     * set value by a string
     * @name setString
     * @memberOf KJUR.asn1.DERAbstractTime#
     * @function
     * @param {String} newS value by a string to set such like "130430235959Z"
     */
    this.setString = function (newS) {
        this.hTLV = null;
        this.isModified = true;
        this.s = newS;
        this.hV = stohex(newS);
    };
    /**
     * set value by a Date object
     * @name setByDateValue
     * @memberOf KJUR.asn1.DERAbstractTime#
     * @function
     * @param {Integer} year year of date (ex. 2013)
     * @param {Integer} month month of date between 1 and 12 (ex. 12)
     * @param {Integer} day day of month
     * @param {Integer} hour hours of date
     * @param {Integer} min minutes of date
     * @param {Integer} sec seconds of date
     */
    this.setByDateValue = function (year, month, day, hour, min, sec) {
        var dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));
        this.setByDate(dateObject);
    };
    this.getFreshValueHex = function () {
        return this.hV;
    };
};
YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);
// == END   DERAbstractTime ==================================================
// == BEGIN DERAbstractStructured ============================================
/**
 * base class for ASN.1 DER structured class
 * @name KJUR.asn1.DERAbstractStructured
 * @class base class for ASN.1 DER structured class
 * @property {Array} asn1Array internal array of ASN1Object
 * @extends KJUR.asn1.ASN1Object
 * @description
 * @see KJUR.asn1.ASN1Object - superclass
 */
KJUR.asn1.DERAbstractStructured = function (params) {
    KJUR.asn1.DERAbstractString.superclass.constructor.call(this);
    var asn1Array = null;
    /**
     * set value by array of ASN1Object
     * @name setByASN1ObjectArray
     * @memberOf KJUR.asn1.DERAbstractStructured#
     * @function
     * @param {array} asn1ObjectArray array of ASN1Object to set
     */
    this.setByASN1ObjectArray = function (asn1ObjectArray) {
        this.hTLV = null;
        this.isModified = true;
        this.asn1Array = asn1ObjectArray;
    };
    /**
     * append an ASN1Object to internal array
     * @name appendASN1Object
     * @memberOf KJUR.asn1.DERAbstractStructured#
     * @function
     * @param {ASN1Object} asn1Object to add
     */
    this.appendASN1Object = function (asn1Object) {
        this.hTLV = null;
        this.isModified = true;
        this.asn1Array.push(asn1Object);
    };
    this.asn1Array = new Array();
    if (typeof params != "undefined") {
        if (typeof params['array'] != "undefined") {
            this.asn1Array = params['array'];
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);
// ********************************************************************
//  ASN.1 Object Classes
// ********************************************************************
// ********************************************************************
/**
 * class for ASN.1 DER Boolean
 * @name KJUR.asn1.DERBoolean
 * @class class for ASN.1 DER Boolean
 * @extends KJUR.asn1.ASN1Object
 * @description
 * @see KJUR.asn1.ASN1Object - superclass
 */
KJUR.asn1.DERBoolean = function () {
    KJUR.asn1.DERBoolean.superclass.constructor.call(this);
    this.hT = "01";
    this.hTLV = "0101ff";
};
YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);
// ********************************************************************
/**
 * class for ASN.1 DER Integer
 * @name KJUR.asn1.DERInteger
 * @class class for ASN.1 DER Integer
 * @extends KJUR.asn1.ASN1Object
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>int - specify initial ASN.1 value(V) by integer value</li>
 * <li>bigint - specify initial ASN.1 value(V) by BigInteger object</li>
 * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
 * </ul>
 * NOTE: 'params' can be omitted.
 */
KJUR.asn1.DERInteger = function (params) {
    KJUR.asn1.DERInteger.superclass.constructor.call(this);
    this.hT = "02";
    /**
     * set value by Tom Wu's BigInteger object
     * @name setByBigInteger
     * @memberOf KJUR.asn1.DERInteger#
     * @function
     * @param {BigInteger} bigIntegerValue to set
     */
    this.setByBigInteger = function (bigIntegerValue) {
        this.hTLV = null;
        this.isModified = true;
        this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);
    };
    /**
     * set value by integer value
     * @name setByInteger
     * @memberOf KJUR.asn1.DERInteger
     * @function
     * @param {Integer} integer value to set
     */
    this.setByInteger = function (intValue) {
        var bi = new jsbn_BigInteger(String(intValue), 10);
        this.setByBigInteger(bi);
    };
    /**
     * set value by integer value
     * @name setValueHex
     * @memberOf KJUR.asn1.DERInteger#
     * @function
     * @param {String} hexadecimal string of integer value
     * @description
     * <br/>
     * NOTE: Value shall be represented by minimum octet length of
     * two's complement representation.
     * @example
     * new KJUR.asn1.DERInteger(123);
     * new KJUR.asn1.DERInteger({'int': 123});
     * new KJUR.asn1.DERInteger({'hex': '1fad'});
     */
    this.setValueHex = function (newHexString) {
        this.hV = newHexString;
    };
    this.getFreshValueHex = function () {
        return this.hV;
    };
    if (typeof params != "undefined") {
        if (typeof params['bigint'] != "undefined") {
            this.setByBigInteger(params['bigint']);
        }
        else if (typeof params['int'] != "undefined") {
            this.setByInteger(params['int']);
        }
        else if (typeof params == "number") {
            this.setByInteger(params);
        }
        else if (typeof params['hex'] != "undefined") {
            this.setValueHex(params['hex']);
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);
// ********************************************************************
/**
 * class for ASN.1 DER encoded BitString primitive
 * @name KJUR.asn1.DERBitString
 * @class class for ASN.1 DER encoded BitString primitive
 * @extends KJUR.asn1.ASN1Object
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>bin - specify binary string (ex. '10111')</li>
 * <li>array - specify array of boolean (ex. [true,false,true,true])</li>
 * <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>
 * <li>obj - specify {@link KJUR.asn1.ASN1Util.newObject}
 * argument for "BitString encapsulates" structure.</li>
 * </ul>
 * NOTE1: 'params' can be omitted.<br/>
 * NOTE2: 'obj' parameter have been supported since
 * asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).<br/>
 * @example
 * // default constructor
 * o = new KJUR.asn1.DERBitString();
 * // initialize with binary string
 * o = new KJUR.asn1.DERBitString({bin: "1011"});
 * // initialize with boolean array
 * o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});
 * // initialize with hexadecimal string (04 is unused bits)
 * o = new KJUR.asn1.DEROctetString({hex: "04bac0"});
 * // initialize with ASN1Util.newObject argument for encapsulated
 * o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
 * // above generates a ASN.1 data like this:
 * // BIT STRING, encapsulates {
 * //   SEQUENCE {
 * //     INTEGER 3
 * //     PrintableString 'aaa'
 * //     }
 * //   }
 */
KJUR.asn1.DERBitString = function (params) {
    if (params !== undefined && typeof params.obj !== "undefined") {
        var o = KJUR.asn1.ASN1Util.newObject(params.obj);
        params.hex = "00" + o.getEncodedHex();
    }
    KJUR.asn1.DERBitString.superclass.constructor.call(this);
    this.hT = "03";
    /**
     * set ASN.1 value(V) by a hexadecimal string including unused bits
     * @name setHexValueIncludingUnusedBits
     * @memberOf KJUR.asn1.DERBitString#
     * @function
     * @param {String} newHexStringIncludingUnusedBits
     */
    this.setHexValueIncludingUnusedBits = function (newHexStringIncludingUnusedBits) {
        this.hTLV = null;
        this.isModified = true;
        this.hV = newHexStringIncludingUnusedBits;
    };
    /**
     * set ASN.1 value(V) by unused bit and hexadecimal string of value
     * @name setUnusedBitsAndHexValue
     * @memberOf KJUR.asn1.DERBitString#
     * @function
     * @param {Integer} unusedBits
     * @param {String} hValue
     */
    this.setUnusedBitsAndHexValue = function (unusedBits, hValue) {
        if (unusedBits < 0 || 7 < unusedBits) {
            throw "unused bits shall be from 0 to 7: u = " + unusedBits;
        }
        var hUnusedBits = "0" + unusedBits;
        this.hTLV = null;
        this.isModified = true;
        this.hV = hUnusedBits + hValue;
    };
    /**
     * set ASN.1 DER BitString by binary string<br/>
     * @name setByBinaryString
     * @memberOf KJUR.asn1.DERBitString#
     * @function
     * @param {String} binaryString binary value string (i.e. '10111')
     * @description
     * Its unused bits will be calculated automatically by length of
     * 'binaryValue'. <br/>
     * NOTE: Trailing zeros '0' will be ignored.
     * @example
     * o = new KJUR.asn1.DERBitString();
     * o.setByBooleanArray("01011");
     */
    this.setByBinaryString = function (binaryString) {
        binaryString = binaryString.replace(/0+$/, '');
        var unusedBits = 8 - binaryString.length % 8;
        if (unusedBits == 8)
            unusedBits = 0;
        for (var i = 0; i <= unusedBits; i++) {
            binaryString += '0';
        }
        var h = '';
        for (var i = 0; i < binaryString.length - 1; i += 8) {
            var b = binaryString.substr(i, 8);
            var x = parseInt(b, 2).toString(16);
            if (x.length == 1)
                x = '0' + x;
            h += x;
        }
        this.hTLV = null;
        this.isModified = true;
        this.hV = '0' + unusedBits + h;
    };
    /**
     * set ASN.1 TLV value(V) by an array of boolean<br/>
     * @name setByBooleanArray
     * @memberOf KJUR.asn1.DERBitString#
     * @function
     * @param {array} booleanArray array of boolean (ex. [true, false, true])
     * @description
     * NOTE: Trailing falses will be ignored in the ASN.1 DER Object.
     * @example
     * o = new KJUR.asn1.DERBitString();
     * o.setByBooleanArray([false, true, false, true, true]);
     */
    this.setByBooleanArray = function (booleanArray) {
        var s = '';
        for (var i = 0; i < booleanArray.length; i++) {
            if (booleanArray[i] == true) {
                s += '1';
            }
            else {
                s += '0';
            }
        }
        this.setByBinaryString(s);
    };
    /**
     * generate an array of falses with specified length<br/>
     * @name newFalseArray
     * @memberOf KJUR.asn1.DERBitString
     * @function
     * @param {Integer} nLength length of array to generate
     * @return {array} array of boolean falses
     * @description
     * This static method may be useful to initialize boolean array.
     * @example
     * o = new KJUR.asn1.DERBitString();
     * o.newFalseArray(3) &rarr; [false, false, false]
     */
    this.newFalseArray = function (nLength) {
        var a = new Array(nLength);
        for (var i = 0; i < nLength; i++) {
            a[i] = false;
        }
        return a;
    };
    this.getFreshValueHex = function () {
        return this.hV;
    };
    if (typeof params != "undefined") {
        if (typeof params == "string" && params.toLowerCase().match(/^[0-9a-f]+$/)) {
            this.setHexValueIncludingUnusedBits(params);
        }
        else if (typeof params['hex'] != "undefined") {
            this.setHexValueIncludingUnusedBits(params['hex']);
        }
        else if (typeof params['bin'] != "undefined") {
            this.setByBinaryString(params['bin']);
        }
        else if (typeof params['array'] != "undefined") {
            this.setByBooleanArray(params['array']);
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);
// ********************************************************************
/**
 * class for ASN.1 DER OctetString<br/>
 * @name KJUR.asn1.DEROctetString
 * @class class for ASN.1 DER OctetString
 * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
 * @extends KJUR.asn1.DERAbstractString
 * @description
 * This class provides ASN.1 OctetString simple type.<br/>
 * Supported "params" attributes are:
 * <ul>
 * <li>str - to set a string as a value</li>
 * <li>hex - to set a hexadecimal string as a value</li>
 * <li>obj - to set a encapsulated ASN.1 value by JSON object
 * which is defined in {@link KJUR.asn1.ASN1Util.newObject}</li>
 * </ul>
 * NOTE: A parameter 'obj' have been supported
 * for "OCTET STRING, encapsulates" structure.
 * since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).
 * @see KJUR.asn1.DERAbstractString - superclass
 * @example
 * // default constructor
 * o = new KJUR.asn1.DEROctetString();
 * // initialize with string
 * o = new KJUR.asn1.DEROctetString({str: "aaa"});
 * // initialize with hexadecimal string
 * o = new KJUR.asn1.DEROctetString({hex: "616161"});
 * // initialize with ASN1Util.newObject argument
 * o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});
 * // above generates a ASN.1 data like this:
 * // OCTET STRING, encapsulates {
 * //   SEQUENCE {
 * //     INTEGER 3
 * //     PrintableString 'aaa'
 * //     }
 * //   }
 */
KJUR.asn1.DEROctetString = function (params) {
    if (params !== undefined && typeof params.obj !== "undefined") {
        var o = KJUR.asn1.ASN1Util.newObject(params.obj);
        params.hex = o.getEncodedHex();
    }
    KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);
    this.hT = "04";
};
YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);
// ********************************************************************
/**
 * class for ASN.1 DER Null
 * @name KJUR.asn1.DERNull
 * @class class for ASN.1 DER Null
 * @extends KJUR.asn1.ASN1Object
 * @description
 * @see KJUR.asn1.ASN1Object - superclass
 */
KJUR.asn1.DERNull = function () {
    KJUR.asn1.DERNull.superclass.constructor.call(this);
    this.hT = "05";
    this.hTLV = "0500";
};
YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);
// ********************************************************************
/**
 * class for ASN.1 DER ObjectIdentifier
 * @name KJUR.asn1.DERObjectIdentifier
 * @class class for ASN.1 DER ObjectIdentifier
 * @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})
 * @extends KJUR.asn1.ASN1Object
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)</li>
 * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
 * </ul>
 * NOTE: 'params' can be omitted.
 */
KJUR.asn1.DERObjectIdentifier = function (params) {
    var itox = function (i) {
        var h = i.toString(16);
        if (h.length == 1)
            h = '0' + h;
        return h;
    };
    var roidtox = function (roid) {
        var h = '';
        var bi = new jsbn_BigInteger(roid, 10);
        var b = bi.toString(2);
        var padLen = 7 - b.length % 7;
        if (padLen == 7)
            padLen = 0;
        var bPad = '';
        for (var i = 0; i < padLen; i++)
            bPad += '0';
        b = bPad + b;
        for (var i = 0; i < b.length - 1; i += 7) {
            var b8 = b.substr(i, 7);
            if (i != b.length - 7)
                b8 = '1' + b8;
            h += itox(parseInt(b8, 2));
        }
        return h;
    };
    KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);
    this.hT = "06";
    /**
     * set value by a hexadecimal string
     * @name setValueHex
     * @memberOf KJUR.asn1.DERObjectIdentifier#
     * @function
     * @param {String} newHexString hexadecimal value of OID bytes
     */
    this.setValueHex = function (newHexString) {
        this.hTLV = null;
        this.isModified = true;
        this.s = null;
        this.hV = newHexString;
    };
    /**
     * set value by a OID string<br/>
     * @name setValueOidString
     * @memberOf KJUR.asn1.DERObjectIdentifier#
     * @function
     * @param {String} oidString OID string (ex. 2.5.4.13)
     * @example
     * o = new KJUR.asn1.DERObjectIdentifier();
     * o.setValueOidString("2.5.4.13");
     */
    this.setValueOidString = function (oidString) {
        if (!oidString.match(/^[0-9.]+$/)) {
            throw "malformed oid string: " + oidString;
        }
        var h = '';
        var a = oidString.split('.');
        var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);
        h += itox(i0);
        a.splice(0, 2);
        for (var i = 0; i < a.length; i++) {
            h += roidtox(a[i]);
        }
        this.hTLV = null;
        this.isModified = true;
        this.s = null;
        this.hV = h;
    };
    /**
     * set value by a OID name
     * @name setValueName
     * @memberOf KJUR.asn1.DERObjectIdentifier#
     * @function
     * @param {String} oidName OID name (ex. 'serverAuth')
     * @since 1.0.1
     * @description
     * OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.
     * Otherwise raise error.
     * @example
     * o = new KJUR.asn1.DERObjectIdentifier();
     * o.setValueName("serverAuth");
     */
    this.setValueName = function (oidName) {
        var oid = KJUR.asn1.x509.OID.name2oid(oidName);
        if (oid !== '') {
            this.setValueOidString(oid);
        }
        else {
            throw "DERObjectIdentifier oidName undefined: " + oidName;
        }
    };
    this.getFreshValueHex = function () {
        return this.hV;
    };
    if (params !== undefined) {
        if (typeof params === "string") {
            if (params.match(/^[0-2].[0-9.]+$/)) {
                this.setValueOidString(params);
            }
            else {
                this.setValueName(params);
            }
        }
        else if (params.oid !== undefined) {
            this.setValueOidString(params.oid);
        }
        else if (params.hex !== undefined) {
            this.setValueHex(params.hex);
        }
        else if (params.name !== undefined) {
            this.setValueName(params.name);
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);
// ********************************************************************
/**
 * class for ASN.1 DER Enumerated
 * @name KJUR.asn1.DEREnumerated
 * @class class for ASN.1 DER Enumerated
 * @extends KJUR.asn1.ASN1Object
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>int - specify initial ASN.1 value(V) by integer value</li>
 * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
 * </ul>
 * NOTE: 'params' can be omitted.
 * @example
 * new KJUR.asn1.DEREnumerated(123);
 * new KJUR.asn1.DEREnumerated({int: 123});
 * new KJUR.asn1.DEREnumerated({hex: '1fad'});
 */
KJUR.asn1.DEREnumerated = function (params) {
    KJUR.asn1.DEREnumerated.superclass.constructor.call(this);
    this.hT = "0a";
    /**
     * set value by Tom Wu's BigInteger object
     * @name setByBigInteger
     * @memberOf KJUR.asn1.DEREnumerated#
     * @function
     * @param {BigInteger} bigIntegerValue to set
     */
    this.setByBigInteger = function (bigIntegerValue) {
        this.hTLV = null;
        this.isModified = true;
        this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);
    };
    /**
     * set value by integer value
     * @name setByInteger
     * @memberOf KJUR.asn1.DEREnumerated#
     * @function
     * @param {Integer} integer value to set
     */
    this.setByInteger = function (intValue) {
        var bi = new jsbn_BigInteger(String(intValue), 10);
        this.setByBigInteger(bi);
    };
    /**
     * set value by integer value
     * @name setValueHex
     * @memberOf KJUR.asn1.DEREnumerated#
     * @function
     * @param {String} hexadecimal string of integer value
     * @description
     * <br/>
     * NOTE: Value shall be represented by minimum octet length of
     * two's complement representation.
     */
    this.setValueHex = function (newHexString) {
        this.hV = newHexString;
    };
    this.getFreshValueHex = function () {
        return this.hV;
    };
    if (typeof params != "undefined") {
        if (typeof params['int'] != "undefined") {
            this.setByInteger(params['int']);
        }
        else if (typeof params == "number") {
            this.setByInteger(params);
        }
        else if (typeof params['hex'] != "undefined") {
            this.setValueHex(params['hex']);
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);
// ********************************************************************
/**
 * class for ASN.1 DER UTF8String
 * @name KJUR.asn1.DERUTF8String
 * @class class for ASN.1 DER UTF8String
 * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
 * @extends KJUR.asn1.DERAbstractString
 * @description
 * @see KJUR.asn1.DERAbstractString - superclass
 */
KJUR.asn1.DERUTF8String = function (params) {
    KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);
    this.hT = "0c";
};
YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);
// ********************************************************************
/**
 * class for ASN.1 DER NumericString
 * @name KJUR.asn1.DERNumericString
 * @class class for ASN.1 DER NumericString
 * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
 * @extends KJUR.asn1.DERAbstractString
 * @description
 * @see KJUR.asn1.DERAbstractString - superclass
 */
KJUR.asn1.DERNumericString = function (params) {
    KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);
    this.hT = "12";
};
YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);
// ********************************************************************
/**
 * class for ASN.1 DER PrintableString
 * @name KJUR.asn1.DERPrintableString
 * @class class for ASN.1 DER PrintableString
 * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
 * @extends KJUR.asn1.DERAbstractString
 * @description
 * @see KJUR.asn1.DERAbstractString - superclass
 */
KJUR.asn1.DERPrintableString = function (params) {
    KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);
    this.hT = "13";
};
YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);
// ********************************************************************
/**
 * class for ASN.1 DER TeletexString
 * @name KJUR.asn1.DERTeletexString
 * @class class for ASN.1 DER TeletexString
 * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
 * @extends KJUR.asn1.DERAbstractString
 * @description
 * @see KJUR.asn1.DERAbstractString - superclass
 */
KJUR.asn1.DERTeletexString = function (params) {
    KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);
    this.hT = "14";
};
YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);
// ********************************************************************
/**
 * class for ASN.1 DER IA5String
 * @name KJUR.asn1.DERIA5String
 * @class class for ASN.1 DER IA5String
 * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})
 * @extends KJUR.asn1.DERAbstractString
 * @description
 * @see KJUR.asn1.DERAbstractString - superclass
 */
KJUR.asn1.DERIA5String = function (params) {
    KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);
    this.hT = "16";
};
YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);
// ********************************************************************
/**
 * class for ASN.1 DER UTCTime
 * @name KJUR.asn1.DERUTCTime
 * @class class for ASN.1 DER UTCTime
 * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})
 * @extends KJUR.asn1.DERAbstractTime
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')</li>
 * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
 * <li>date - specify Date object.</li>
 * </ul>
 * NOTE: 'params' can be omitted.
 * <h4>EXAMPLES</h4>
 * @example
 * d1 = new KJUR.asn1.DERUTCTime();
 * d1.setString('130430125959Z');
 *
 * d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});
 * d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});
 * d4 = new KJUR.asn1.DERUTCTime('130430125959Z');
 */
KJUR.asn1.DERUTCTime = function (params) {
    KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);
    this.hT = "17";
    /**
     * set value by a Date object<br/>
     * @name setByDate
     * @memberOf KJUR.asn1.DERUTCTime#
     * @function
     * @param {Date} dateObject Date object to set ASN.1 value(V)
     * @example
     * o = new KJUR.asn1.DERUTCTime();
     * o.setByDate(new Date("2016/12/31"));
     */
    this.setByDate = function (dateObject) {
        this.hTLV = null;
        this.isModified = true;
        this.date = dateObject;
        this.s = this.formatDate(this.date, 'utc');
        this.hV = stohex(this.s);
    };
    this.getFreshValueHex = function () {
        if (typeof this.date == "undefined" && typeof this.s == "undefined") {
            this.date = new Date();
            this.s = this.formatDate(this.date, 'utc');
            this.hV = stohex(this.s);
        }
        return this.hV;
    };
    if (params !== undefined) {
        if (params.str !== undefined) {
            this.setString(params.str);
        }
        else if (typeof params == "string" && params.match(/^[0-9]{12}Z$/)) {
            this.setString(params);
        }
        else if (params.hex !== undefined) {
            this.setStringHex(params.hex);
        }
        else if (params.date !== undefined) {
            this.setByDate(params.date);
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);
// ********************************************************************
/**
 * class for ASN.1 DER GeneralizedTime
 * @name KJUR.asn1.DERGeneralizedTime
 * @class class for ASN.1 DER GeneralizedTime
 * @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})
 * @property {Boolean} withMillis flag to show milliseconds or not
 * @extends KJUR.asn1.DERAbstractTime
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')</li>
 * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>
 * <li>date - specify Date object.</li>
 * <li>millis - specify flag to show milliseconds (from 1.0.6)</li>
 * </ul>
 * NOTE1: 'params' can be omitted.
 * NOTE2: 'withMillis' property is supported from asn1 1.0.6.
 */
KJUR.asn1.DERGeneralizedTime = function (params) {
    KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);
    this.hT = "18";
    this.withMillis = false;
    /**
     * set value by a Date object
     * @name setByDate
     * @memberOf KJUR.asn1.DERGeneralizedTime#
     * @function
     * @param {Date} dateObject Date object to set ASN.1 value(V)
     * @example
     * When you specify UTC time, use 'Date.UTC' method like this:<br/>
     * o1 = new DERUTCTime();
     * o1.setByDate(date);
     *
     * date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59
     */
    this.setByDate = function (dateObject) {
        this.hTLV = null;
        this.isModified = true;
        this.date = dateObject;
        this.s = this.formatDate(this.date, 'gen', this.withMillis);
        this.hV = stohex(this.s);
    };
    this.getFreshValueHex = function () {
        if (this.date === undefined && this.s === undefined) {
            this.date = new Date();
            this.s = this.formatDate(this.date, 'gen', this.withMillis);
            this.hV = stohex(this.s);
        }
        return this.hV;
    };
    if (params !== undefined) {
        if (params.str !== undefined) {
            this.setString(params.str);
        }
        else if (typeof params == "string" && params.match(/^[0-9]{14}Z$/)) {
            this.setString(params);
        }
        else if (params.hex !== undefined) {
            this.setStringHex(params.hex);
        }
        else if (params.date !== undefined) {
            this.setByDate(params.date);
        }
        if (params.millis === true) {
            this.withMillis = true;
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);
// ********************************************************************
/**
 * class for ASN.1 DER Sequence
 * @name KJUR.asn1.DERSequence
 * @class class for ASN.1 DER Sequence
 * @extends KJUR.asn1.DERAbstractStructured
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>array - specify array of ASN1Object to set elements of content</li>
 * </ul>
 * NOTE: 'params' can be omitted.
 */
KJUR.asn1.DERSequence = function (params) {
    KJUR.asn1.DERSequence.superclass.constructor.call(this, params);
    this.hT = "30";
    this.getFreshValueHex = function () {
        var h = '';
        for (var i = 0; i < this.asn1Array.length; i++) {
            var asn1Obj = this.asn1Array[i];
            h += asn1Obj.getEncodedHex();
        }
        this.hV = h;
        return this.hV;
    };
};
YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);
// ********************************************************************
/**
 * class for ASN.1 DER Set
 * @name KJUR.asn1.DERSet
 * @class class for ASN.1 DER Set
 * @extends KJUR.asn1.DERAbstractStructured
 * @description
 * <br/>
 * As for argument 'params' for constructor, you can specify one of
 * following properties:
 * <ul>
 * <li>array - specify array of ASN1Object to set elements of content</li>
 * <li>sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.</li>
 * </ul>
 * NOTE1: 'params' can be omitted.<br/>
 * NOTE2: sortflag is supported since 1.0.5.
 */
KJUR.asn1.DERSet = function (params) {
    KJUR.asn1.DERSet.superclass.constructor.call(this, params);
    this.hT = "31";
    this.sortFlag = true; // item shall be sorted only in ASN.1 DER
    this.getFreshValueHex = function () {
        var a = new Array();
        for (var i = 0; i < this.asn1Array.length; i++) {
            var asn1Obj = this.asn1Array[i];
            a.push(asn1Obj.getEncodedHex());
        }
        if (this.sortFlag == true)
            a.sort();
        this.hV = a.join('');
        return this.hV;
    };
    if (typeof params != "undefined") {
        if (typeof params.sortflag != "undefined" &&
            params.sortflag == false)
            this.sortFlag = false;
    }
};
YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);
// ********************************************************************
/**
 * class for ASN.1 DER TaggedObject
 * @name KJUR.asn1.DERTaggedObject
 * @class class for ASN.1 DER TaggedObject
 * @extends KJUR.asn1.ASN1Object
 * @description
 * <br/>
 * Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.
 * For example, if you find '[1]' tag in a ASN.1 dump,
 * 'tagNoHex' will be 'a1'.
 * <br/>
 * As for optional argument 'params' for constructor, you can specify *ANY* of
 * following properties:
 * <ul>
 * <li>explicit - specify true if this is explicit tag otherwise false
 *     (default is 'true').</li>
 * <li>tag - specify tag (default is 'a0' which means [0])</li>
 * <li>obj - specify ASN1Object which is tagged</li>
 * </ul>
 * @example
 * d1 = new KJUR.asn1.DERUTF8String({'str':'a'});
 * d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});
 * hex = d2.getEncodedHex();
 */
KJUR.asn1.DERTaggedObject = function (params) {
    KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);
    this.hT = "a0";
    this.hV = '';
    this.isExplicit = true;
    this.asn1Object = null;
    /**
     * set value by an ASN1Object
     * @name setString
     * @memberOf KJUR.asn1.DERTaggedObject#
     * @function
     * @param {Boolean} isExplicitFlag flag for explicit/implicit tag
     * @param {Integer} tagNoHex hexadecimal string of ASN.1 tag
     * @param {ASN1Object} asn1Object ASN.1 to encapsulate
     */
    this.setASN1Object = function (isExplicitFlag, tagNoHex, asn1Object) {
        this.hT = tagNoHex;
        this.isExplicit = isExplicitFlag;
        this.asn1Object = asn1Object;
        if (this.isExplicit) {
            this.hV = this.asn1Object.getEncodedHex();
            this.hTLV = null;
            this.isModified = true;
        }
        else {
            this.hV = null;
            this.hTLV = asn1Object.getEncodedHex();
            this.hTLV = this.hTLV.replace(/^../, tagNoHex);
            this.isModified = false;
        }
    };
    this.getFreshValueHex = function () {
        return this.hV;
    };
    if (typeof params != "undefined") {
        if (typeof params['tag'] != "undefined") {
            this.hT = params['tag'];
        }
        if (typeof params['explicit'] != "undefined") {
            this.isExplicit = params['explicit'];
        }
        if (typeof params['obj'] != "undefined") {
            this.asn1Object = params['obj'];
            this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);
        }
    }
};
YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/JSEncryptRSAKey.js
var JSEncryptRSAKey_extends = (undefined && undefined.__extends) || (function () {
    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);
    };
    return function (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 __());
    };
})();







/**
 * Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.
 * This object is just a decorator for parsing the key parameter
 * @param {string|Object} key - The key in string format, or an object containing
 * the parameters needed to build a RSAKey object.
 * @constructor
 */
var JSEncryptRSAKey_JSEncryptRSAKey = /** @class */ (function (_super) {
    JSEncryptRSAKey_extends(JSEncryptRSAKey, _super);
    function JSEncryptRSAKey(key) {
        var _this = _super.call(this) || this;
        // Call the super constructor.
        //  RSAKey.call(this);
        // If a key key was provided.
        if (key) {
            // If this is a string...
            if (typeof key === "string") {
                _this.parseKey(key);
            }
            else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||
                JSEncryptRSAKey.hasPublicKeyProperty(key)) {
                // Set the values for the key.
                _this.parsePropertiesFrom(key);
            }
        }
        return _this;
    }
    /**
     * Method to parse a pem encoded string containing both a public or private key.
     * The method will translate the pem encoded string in a der encoded string and
     * will parse private key and public key parameters. This method accepts public key
     * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).
     *
     * @todo Check how many rsa formats use the same format of pkcs #1.
     *
     * The format is defined as:
     * PublicKeyInfo ::= SEQUENCE {
     *   algorithm       AlgorithmIdentifier,
     *   PublicKey       BIT STRING
     * }
     * Where AlgorithmIdentifier is:
     * AlgorithmIdentifier ::= SEQUENCE {
     *   algorithm       OBJECT IDENTIFIER,     the OID of the enc algorithm
     *   parameters      ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
     * }
     * and PublicKey is a SEQUENCE encapsulated in a BIT STRING
     * RSAPublicKey ::= SEQUENCE {
     *   modulus           INTEGER,  -- n
     *   publicExponent    INTEGER   -- e
     * }
     * it's possible to examine the structure of the keys obtained from openssl using
     * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/
     * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer
     * @private
     */
    JSEncryptRSAKey.prototype.parseKey = function (pem) {
        try {
            var modulus = 0;
            var public_exponent = 0;
            var reHex = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/;
            var der = reHex.test(pem) ? Hex.decode(pem) : Base64.unarmor(pem);
            var asn1 = ASN1.decode(der);
            // Fixes a bug with OpenSSL 1.0+ private keys
            if (asn1.sub.length === 3) {
                asn1 = asn1.sub[2].sub[0];
            }
            if (asn1.sub.length === 9) {
                // Parse the private key.
                modulus = asn1.sub[1].getHexStringValue(); // bigint
                this.n = parseBigInt(modulus, 16);
                public_exponent = asn1.sub[2].getHexStringValue(); // int
                this.e = parseInt(public_exponent, 16);
                var private_exponent = asn1.sub[3].getHexStringValue(); // bigint
                this.d = parseBigInt(private_exponent, 16);
                var prime1 = asn1.sub[4].getHexStringValue(); // bigint
                this.p = parseBigInt(prime1, 16);
                var prime2 = asn1.sub[5].getHexStringValue(); // bigint
                this.q = parseBigInt(prime2, 16);
                var exponent1 = asn1.sub[6].getHexStringValue(); // bigint
                this.dmp1 = parseBigInt(exponent1, 16);
                var exponent2 = asn1.sub[7].getHexStringValue(); // bigint
                this.dmq1 = parseBigInt(exponent2, 16);
                var coefficient = asn1.sub[8].getHexStringValue(); // bigint
                this.coeff = parseBigInt(coefficient, 16);
            }
            else if (asn1.sub.length === 2) {
                // Parse the public key.
                var bit_string = asn1.sub[1];
                var sequence = bit_string.sub[0];
                modulus = sequence.sub[0].getHexStringValue();
                this.n = parseBigInt(modulus, 16);
                public_exponent = sequence.sub[1].getHexStringValue();
                this.e = parseInt(public_exponent, 16);
            }
            else {
                return false;
            }
            return true;
        }
        catch (ex) {
            return false;
        }
    };
    /**
     * Translate rsa parameters in a hex encoded string representing the rsa key.
     *
     * The translation follow the ASN.1 notation :
     * RSAPrivateKey ::= SEQUENCE {
     *   version           Version,
     *   modulus           INTEGER,  -- n
     *   publicExponent    INTEGER,  -- e
     *   privateExponent   INTEGER,  -- d
     *   prime1            INTEGER,  -- p
     *   prime2            INTEGER,  -- q
     *   exponent1         INTEGER,  -- d mod (p1)
     *   exponent2         INTEGER,  -- d mod (q-1)
     *   coefficient       INTEGER,  -- (inverse of q) mod p
     * }
     * @returns {string}  DER Encoded String representing the rsa private key
     * @private
     */
    JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {
        var options = {
            array: [
                new KJUR.asn1.DERInteger({ int: 0 }),
                new KJUR.asn1.DERInteger({ bigint: this.n }),
                new KJUR.asn1.DERInteger({ int: this.e }),
                new KJUR.asn1.DERInteger({ bigint: this.d }),
                new KJUR.asn1.DERInteger({ bigint: this.p }),
                new KJUR.asn1.DERInteger({ bigint: this.q }),
                new KJUR.asn1.DERInteger({ bigint: this.dmp1 }),
                new KJUR.asn1.DERInteger({ bigint: this.dmq1 }),
                new KJUR.asn1.DERInteger({ bigint: this.coeff })
            ]
        };
        var seq = new KJUR.asn1.DERSequence(options);
        return seq.getEncodedHex();
    };
    /**
     * base64 (pem) encoded version of the DER encoded representation
     * @returns {string} pem encoded representation without header and footer
     * @public
     */
    JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {
        return base64_hex2b64(this.getPrivateBaseKey());
    };
    /**
     * Translate rsa parameters in a hex encoded string representing the rsa public key.
     * The representation follow the ASN.1 notation :
     * PublicKeyInfo ::= SEQUENCE {
     *   algorithm       AlgorithmIdentifier,
     *   PublicKey       BIT STRING
     * }
     * Where AlgorithmIdentifier is:
     * AlgorithmIdentifier ::= SEQUENCE {
     *   algorithm       OBJECT IDENTIFIER,     the OID of the enc algorithm
     *   parameters      ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
     * }
     * and PublicKey is a SEQUENCE encapsulated in a BIT STRING
     * RSAPublicKey ::= SEQUENCE {
     *   modulus           INTEGER,  -- n
     *   publicExponent    INTEGER   -- e
     * }
     * @returns {string} DER Encoded String representing the rsa public key
     * @private
     */
    JSEncryptRSAKey.prototype.getPublicBaseKey = function () {
        var first_sequence = new KJUR.asn1.DERSequence({
            array: [
                new KJUR.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),
                new KJUR.asn1.DERNull()
            ]
        });
        var second_sequence = new KJUR.asn1.DERSequence({
            array: [
                new KJUR.asn1.DERInteger({ bigint: this.n }),
                new KJUR.asn1.DERInteger({ int: this.e })
            ]
        });
        var bit_string = new KJUR.asn1.DERBitString({
            hex: "00" + second_sequence.getEncodedHex()
        });
        var seq = new KJUR.asn1.DERSequence({
            array: [
                first_sequence,
                bit_string
            ]
        });
        return seq.getEncodedHex();
    };
    /**
     * base64 (pem) encoded version of the DER encoded representation
     * @returns {string} pem encoded representation without header and footer
     * @public
     */
    JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {
        return base64_hex2b64(this.getPublicBaseKey());
    };
    /**
     * wrap the string in block of width chars. The default value for rsa keys is 64
     * characters.
     * @param {string} str the pem encoded string without header and footer
     * @param {Number} [width=64] - the length the string has to be wrapped at
     * @returns {string}
     * @private
     */
    JSEncryptRSAKey.wordwrap = function (str, width) {
        width = width || 64;
        if (!str) {
            return str;
        }
        var regex = "(.{1," + width + "})( +|$\n?)|(.{1," + width + "})";
        return str.match(RegExp(regex, "g")).join("\n");
    };
    /**
     * Retrieve the pem encoded private key
     * @returns {string} the pem encoded private key with header/footer
     * @public
     */
    JSEncryptRSAKey.prototype.getPrivateKey = function () {
        var key = "-----BEGIN RSA PRIVATE KEY-----\n";
        key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + "\n";
        key += "-----END RSA PRIVATE KEY-----";
        return key;
    };
    /**
     * Retrieve the pem encoded public key
     * @returns {string} the pem encoded public key with header/footer
     * @public
     */
    JSEncryptRSAKey.prototype.getPublicKey = function () {
        var key = "-----BEGIN PUBLIC KEY-----\n";
        key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + "\n";
        key += "-----END PUBLIC KEY-----";
        return key;
    };
    /**
     * Check if the object contains the necessary parameters to populate the rsa modulus
     * and public exponent parameters.
     * @param {Object} [obj={}] - An object that may contain the two public key
     * parameters
     * @returns {boolean} true if the object contains both the modulus and the public exponent
     * properties (n and e)
     * @todo check for types of n and e. N should be a parseable bigInt object, E should
     * be a parseable integer number
     * @private
     */
    JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {
        obj = obj || {};
        return (obj.hasOwnProperty("n") &&
            obj.hasOwnProperty("e"));
    };
    /**
     * Check if the object contains ALL the parameters of an RSA key.
     * @param {Object} [obj={}] - An object that may contain nine rsa key
     * parameters
     * @returns {boolean} true if the object contains all the parameters needed
     * @todo check for types of the parameters all the parameters but the public exponent
     * should be parseable bigint objects, the public exponent should be a parseable integer number
     * @private
     */
    JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {
        obj = obj || {};
        return (obj.hasOwnProperty("n") &&
            obj.hasOwnProperty("e") &&
            obj.hasOwnProperty("d") &&
            obj.hasOwnProperty("p") &&
            obj.hasOwnProperty("q") &&
            obj.hasOwnProperty("dmp1") &&
            obj.hasOwnProperty("dmq1") &&
            obj.hasOwnProperty("coeff"));
    };
    /**
     * Parse the properties of obj in the current rsa object. Obj should AT LEAST
     * include the modulus and public exponent (n, e) parameters.
     * @param {Object} obj - the object containing rsa parameters
     * @private
     */
    JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {
        this.n = obj.n;
        this.e = obj.e;
        if (obj.hasOwnProperty("d")) {
            this.d = obj.d;
            this.p = obj.p;
            this.q = obj.q;
            this.dmp1 = obj.dmp1;
            this.dmq1 = obj.dmq1;
            this.coeff = obj.coeff;
        }
    };
    return JSEncryptRSAKey;
}(rsa_RSAKey));


// EXTERNAL MODULE: ./node_modules/jsencrypt/lib/version.json
var version = __webpack_require__("a524");

// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/JSEncrypt.js



/**
 *
 * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour
 * possible parameters are:
 * - default_key_size        {number}  default: 1024 the key size in bit
 * - default_public_exponent {string}  default: '010001' the hexadecimal representation of the public exponent
 * - log                     {boolean} default: false whether log warn/error or not
 * @constructor
 */
var JSEncrypt_JSEncrypt = /** @class */ (function () {
    function JSEncrypt(options) {
        if (options === void 0) { options = {}; }
        options = options || {};
        this.default_key_size = options.default_key_size ? parseInt(options.default_key_size, 10) : 1024;
        this.default_public_exponent = options.default_public_exponent || "010001"; // 65537 default openssl public exponent for rsa key type
        this.log = options.log || false;
        // The private and public key.
        this.key = null;
    }
    /**
     * Method to set the rsa key parameter (one method is enough to set both the public
     * and the private key, since the private key contains the public key paramenters)
     * Log a warning if logs are enabled
     * @param {Object|string} key the pem encoded string or an object (with or without header/footer)
     * @public
     */
    JSEncrypt.prototype.setKey = function (key) {
        if (this.log && this.key) {
            console.warn("A key was already set, overriding existing.");
        }
        this.key = new JSEncryptRSAKey_JSEncryptRSAKey(key);
    };
    /**
     * Proxy method for setKey, for api compatibility
     * @see setKey
     * @public
     */
    JSEncrypt.prototype.setPrivateKey = function (privkey) {
        // Create the key.
        this.setKey(privkey);
    };
    /**
     * Proxy method for setKey, for api compatibility
     * @see setKey
     * @public
     */
    JSEncrypt.prototype.setPublicKey = function (pubkey) {
        // Sets the public key.
        this.setKey(pubkey);
    };
    /**
     * Proxy method for RSAKey object's decrypt, decrypt the string using the private
     * components of the rsa key object. Note that if the object was not set will be created
     * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
     * @param {string} str base64 encoded crypted string to decrypt
     * @return {string} the decrypted string
     * @public
     */
    JSEncrypt.prototype.decrypt = function (str) {
        // Return the decrypted string.
        try {
            return this.getKey().decrypt(b64tohex(str));
        }
        catch (ex) {
            return false;
        }
    };
    /**
     * Proxy method for RSAKey object's encrypt, encrypt the string using the public
     * components of the rsa key object. Note that if the object was not set will be created
     * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
     * @param {string} str the string to encrypt
     * @return {string} the encrypted string encoded in base64
     * @public
     */
    JSEncrypt.prototype.encrypt = function (str) {
        // Return the encrypted string.
        try {
            return base64_hex2b64(this.getKey().encrypt(str));
        }
        catch (ex) {
            return false;
        }
    };
    /**
     * Proxy method for RSAKey object's sign.
     * @param {string} str the string to sign
     * @param {function} digestMethod hash method
     * @param {string} digestName the name of the hash algorithm
     * @return {string} the signature encoded in base64
     * @public
     */
    JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {
        // return the RSA signature of 'str' in 'hex' format.
        try {
            return base64_hex2b64(this.getKey().sign(str, digestMethod, digestName));
        }
        catch (ex) {
            return false;
        }
    };
    /**
     * Proxy method for RSAKey object's verify.
     * @param {string} str the string to verify
     * @param {string} signature the signature encoded in base64 to compare the string to
     * @param {function} digestMethod hash method
     * @return {boolean} whether the data and signature match
     * @public
     */
    JSEncrypt.prototype.verify = function (str, signature, digestMethod) {
        // Return the decrypted 'digest' of the signature.
        try {
            return this.getKey().verify(str, b64tohex(signature), digestMethod);
        }
        catch (ex) {
            return false;
        }
    };
    /**
     * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object
     * will be created and returned
     * @param {callback} [cb] the callback to be called if we want the key to be generated
     * in an async fashion
     * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object
     * @public
     */
    JSEncrypt.prototype.getKey = function (cb) {
        // Only create new if it does not exist.
        if (!this.key) {
            // Get a new private key.
            this.key = new JSEncryptRSAKey_JSEncryptRSAKey();
            if (cb && {}.toString.call(cb) === "[object Function]") {
                this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);
                return;
            }
            // Generate the key.
            this.key.generate(this.default_key_size, this.default_public_exponent);
        }
        return this.key;
    };
    /**
     * Returns the pem encoded representation of the private key
     * If the key doesn't exists a new key will be created
     * @returns {string} pem encoded representation of the private key WITH header and footer
     * @public
     */
    JSEncrypt.prototype.getPrivateKey = function () {
        // Return the private representation of this key.
        return this.getKey().getPrivateKey();
    };
    /**
     * Returns the pem encoded representation of the private key
     * If the key doesn't exists a new key will be created
     * @returns {string} pem encoded representation of the private key WITHOUT header and footer
     * @public
     */
    JSEncrypt.prototype.getPrivateKeyB64 = function () {
        // Return the private representation of this key.
        return this.getKey().getPrivateBaseKeyB64();
    };
    /**
     * Returns the pem encoded representation of the public key
     * If the key doesn't exists a new key will be created
     * @returns {string} pem encoded representation of the public key WITH header and footer
     * @public
     */
    JSEncrypt.prototype.getPublicKey = function () {
        // Return the private representation of this key.
        return this.getKey().getPublicKey();
    };
    /**
     * Returns the pem encoded representation of the public key
     * If the key doesn't exists a new key will be created
     * @returns {string} pem encoded representation of the public key WITHOUT header and footer
     * @public
     */
    JSEncrypt.prototype.getPublicKeyB64 = function () {
        // Return the private representation of this key.
        return this.getKey().getPublicBaseKeyB64();
    };
    JSEncrypt.version = version.version;
    return JSEncrypt;
}());


// CONCATENATED MODULE: ./node_modules/jsencrypt/lib/index.js


/* harmony default export */ var lib = (JSEncrypt_JSEncrypt);

// CONCATENATED MODULE: ./src/utils/rsautils.js




var pubKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp5W/FXtPx+7ZbMm3MLudBjQVXtA4ZVsAq5s0I+PXvEa6h07V5/JB//12hiyIjaweVAmxiOfGWINfZ2cqmIkiBD1oXLWw+TFUiLECIaVDhS86lsACR7Lj2ZN3ueDyQEzMsL8jf3hzPWEoEfcJoOlptFEA9z/ZChjsojnwORCL05QIDAQAB";
var priKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAKnlb8Ve0/H7tlsybcwu50GNBVe0DhlWwCrmzQj49e8RrqHTtXn8kH//XaGLIiNrB5UCbGI58ZYg19nZyqYiSIEPWhctbD5MVSIsQIhpUOFLzqWwAJHsuPZk3e54PJATMywvyN/eHM9YSgR9wmg6Wm0UQD3P9kKGOyiOfA5EIvTlAgMBAAECgYBcMJ3H8b78bePz9JdT1peyID2n65JC+anpHbhgiAebpHKoaWLuQLiAXCeIgyERKwDAQMJjQqHvHv9BvUaTg8LnMmnpJOT0VcHVzvXN2D4rHkun5sIkTak0FiMkAYdflIXYXqvoYjdHj9T03R0wUlYCAKdYrYvXXNNw6+tW/mlU+QJBAOA5qwmhB5AIU7tXSwY780LohwGLQuqCEzoy8sGW96/iz/zqmeXV6xBcgLNN7qOH23br/L3EtZC+OxueBlvm7g8CQQDB+NjgpMdAXbZKeQyuKf9wGAUQxxex/uXSDrozVS2IAKoG+6aarpGldsKXfOMYvgHD9kXYNia34DMJMEbPp+HLAkAdyUthUhTxG0oUPvpmb5xXLRCSMe/Hu1PWjWIWOXnZ0aWTkY60K4C4gbFPIHEtJCURXTQL+Y+tFLhBaPKrTrgdAkBipRweeo4+RKo9C3yQYhlet0h0NNvvEJNuFUFKc8n4/WV6saYTyi2VuWTSx5dycMbTEr6Ia1mbb3Bk/uE0H8urAkA2qvoW6bf4cgEgMKvoX2UnVV90EoRqpuDIV6W79XjeP+dj3sRkJlvYbCatlXNjX2fLrtctUgkACQlrEHIItixV"; //  在JsEncrypt原型上写了分段加密方法 encryptLong 使用时替换encrypt方法即可

lib.prototype.encryptLong = function (string) {
  var k = this.getKey();
  var maxLength = (k.n.bitLength() + 7 >> 3) - 11;

  try {
    var lt = "";
    var ct = "";

    if (string.length > maxLength) {
      lt = string.match(/.{1,50}/g);
      lt.forEach(function (entry) {
        var t1 = k.encrypt(entry);
        ct += t1;
      });
      return hex2b64(ct);
    }

    var t = k.encrypt(string);
    var y = hex2b64(t);
    return y;
  } catch (ex) {
    return false;
  }
}; // //  在JsEncrypt原型上写了分段加密方法 encryptLong 使用时替换decrypt方法即可


lib.prototype.decryptLong = function (string) {
  var k = this.getKey();
  var maxLength = k.n.bitLength() + 7 >> 3; //var maxLength = 128;

  try {
    var str = bytesToHex(string); //var b=hex2Bytes(str);

    var inputLen = str.length;
    var ct = "";

    if (str.length > maxLength) {
      var lt = str.match(/.{1,256}/g);
      lt.forEach(function (entry) {
        var t1 = k.decrypt(entry);
        ct += t1;
      });
      return ct;
    }

    var y = k.decrypt(bytesToHex(string));
    return y;
  } catch (ex) {
    return false;
  }
};
/**
 * 公钥加密
 * @param {*} id 
 * @returns 
 */


function encryption(id) {
  var encryptor = new lib();
  encryptor.setPublicKey(pubKey);
  return encryptor.encrypt(id);
}
/**
 * 私钥解密
 * @param {*} id 
 * @returns 
 */

function rsautils_decrypt(id) {
  var decrypt = new lib();
  decrypt.setPrivateKey(priKey);
  return decrypt.decrypt(id);
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.fill.js
var es_array_fill = __webpack_require__("cb29");

// CONCATENATED MODULE: ./src/utils/topology/customgraph.js



// 自定义组件



/**
 * 普通icon作为图标的方法一下
 */

function myShape(ctx, node) {
  ctx.beginPath(); // 必须判空再填充

  (node.fillStyle || node.bkType) && ctx.fill();
  ctx.stroke();
}
function myTextRect(node) {
  node.textRect = new rect_Rect(node.rect.x + 10, node.rect.y + node.rect.height * 2 / 3, node.rect.width - 20, node.rect.height / 3 - 5);
  node.fullTextRect = node.rect;
}
function myIconRect(node) {// console.log(node)
  // node.iconRect = new Rect(node.rect.x, node.rect.y + 10, node.rect.width, node.rect.height);
  // node.fullIconRect = node.rect;
}
function myAnchors(node) {
  // for (let i = 1; i <= 9; i += 1) {
  //   node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height * (i * 0.1), Direction.Left));
  //   node.anchors.push(new Point(node.rect.x + node.rect.width * (i * 0.1), node.rect.y, Direction.Up));
  //   node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height * (i * 0.1), Direction.Right));
  //   node.anchors.push(new Point(node.rect.x + node.rect.width * (i * 0.1), node.rect.y + node.rect.height, Direction.Bottom));
  // }
  //中间点
  node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
  node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
  node.anchors.push(new Point(node.rect.x + node.rect.width, node.rect.y + node.rect.height / 2, Direction.Right));
  node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom)); // demo，其他自定义锚点。这里只是示例。
  // for (let i = 10; i < 360; i += 10) {
  //   if (i % 90 === 0) {
  //     continue;
  //   }
  //   const direction = Math.floor(i / 90);
  //   const pt = new Point(
  //     node.rect.center.x + (Math.sin((i / 180) * Math.PI) * node.rect.width) / 2,
  //     node.rect.center.y + (Math.cos((i / 180) * Math.PI) * node.rect.height) / 2,
  //     direction
  //   );
  //   pt.hidden = true;
  //   node.anchors.push(pt);
  // }
}
function getRegisterNode(name) {
  registerNode(name, myShape, myAnchors, myIconRect, null);
}
function customgraph_registerIcons() {
  var _iterator = _createForOfIteratorHelper(getDatas()),
      _step;

  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var i = _step.value;

      if (i.children) {
        var _iterator2 = _createForOfIteratorHelper(i.children),
            _step2;

        try {
          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
            var j = _step2.value;
            getRegisterNode(j.data.name);
          }
        } catch (err) {
          _iterator2.e(err);
        } finally {
          _iterator2.f();
        }
      }
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }
}
function registerSvgs() {
  var _iterator3 = _createForOfIteratorHelper(assembleSvg()),
      _step3;

  try {
    for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
      var i = _step3.value;

      if (i.children) {
        var _iterator4 = _createForOfIteratorHelper(i.children),
            _step4;

        try {
          for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
            var j = _step4.value;
            getSvgToCavansRegisterNode(j.data.name);
          }
        } catch (err) {
          _iterator4.e(err);
        } finally {
          _iterator4.f();
        }
      }
    }
  } catch (err) {
    _iterator3.e(err);
  } finally {
    _iterator3.f();
  }
}
function getSvgToCavansRegisterNode(name) {
  registerNode(name, myIconRect, myAnchors, myIconRect, null);
}
function svgTocavansShape(ctx, node) {
  node.tmp = {};
  node.tmp.x = node.rect.x;
  node.tmp.y = node.rect.y;
  node.tmp.w = node.rect.width / 100;
  node.tmp.h = node.rect.height / 100;
  ctx.beginPath();
  node.tmp.lastX = node.tmp.x + 0 * node.tmp.w;
  node.tmp.lastY = node.tmp.y + 0 * node.tmp.h;
  ctx.moveTo(node.tmp.lastX, node.tmp.lastY);
  node.tmp.lastX = node.tmp.x + 100 * node.tmp.w;
  node.tmp.lastY = node.tmp.y + 100 * node.tmp.h;
  ctx.lineTo(node.tmp.lastX, node.tmp.lastY);
  ctx.stroke();
  ctx.beginPath();
  node.tmp.lastX = node.tmp.x + 100 * node.tmp.w;
  node.tmp.lastY = node.tmp.y + 0 * node.tmp.h;
  ctx.moveTo(node.tmp.lastX, node.tmp.lastY);
  node.tmp.lastX = node.tmp.x + 0 * node.tmp.w;
  node.tmp.lastY = node.tmp.y + 100 * node.tmp.h;
  ctx.lineTo(node.tmp.lastX, node.tmp.lastY);
  ctx.stroke();
  node.tmp = null;
}
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/topology/Workspace.vue?vue&type=script&lang=js&











//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
 // 图形库

















customgraph_registerIcons();
registerSvgs();
/* harmony default export */ var Workspacevue_type_script_lang_js_ = ({
  name: "TopologyWorkspace",
  components: {
    SpaceView: SpaceView,
    NodeView: NodeView,
    LineView: LineView,
    PensView: PensView
  },
  props: {
    backUrl: {
      type: String,
      default: "/back"
    },
    previewUrl: {
      type: String,
      default: "/preview"
    },
    getTopologyId: {
      type: Function,
      default: null
    },
    save: {
      type: Function,
      default: null
    }
  },
  data: function data() {
    return {
      lineList: lineList,
      collapsed: false,
      canvas: "",
      lineName: "curve",
      fromArrow: "triangleSolid",
      toArrow: "triangleSolid",
      node: {},
      lineData: {},
      pens: [],
      arrowTypes: arrowTypes,
      customStyle: "background: #fff;border-radius: 4px;margin-right:2%;margin-bottom: 15px;border: 0;overflow: hidden",
      headMenu: headMenu,
      tools: [],
      toolSvgs: [],
      //组态相应默认配置
      scale: 100,
      locked: 0,
      opt: "space",
      lineWidth: 1,
      topologyData: {},
      topologyId: "",
      event: {
        name: "",
        data: null
      }
    };
  },
  created: function created() {
    register();
    register_register();
    src_register_register();
    sequence_diagram_src_register_register();
    chart_diagram_src_register_register();
    this.tools = assemble(); // this.toolSvgs = assembleSvg();

    this.registerIcons();
  },
  mounted: function mounted() {
    document.addEventListener("keydown", this.saveContent);
    this.init();
  },
  destroyed: function destroyed() {
    document.removeEventListener("keydown", this.saveContent);
    this.canvas.destroy();
  },
  computed: {
    scalecom: {
      get: function get() {
        return Math.round(this.scale * 100);
      },
      set: function set(val) {
        this.scale = val / 100;
        this.canvas.scaleTo(val / 100);
      }
    },
    lineWidthcom: {
      get: function get() {
        return this.lineWidth;
      },
      set: function set(val) {
        this.lineWidth = val;
        this.canvas.data.lineWidth = val;
      }
    }
  },
  watch: {
    $route: function $route(val) {
      this.open();
    }
  },
  methods: {
    allowDrop: function allowDrop(event) {
      event.preventDefault();
    },
    back: function back() {
      this.$router.push({
        path: this.backUrl
      });
    },
    saveContent: function saveContent(e) {
      var key = window.event.keyCode ? window.event.keyCode : window.event.which;

      if (key === 83 && e.ctrlKey) {
        this.saveTopology();
        e.preventDefault();
      }
    },
    registerIcons: function registerIcons() {
      var _iterator = _createForOfIteratorHelper(getDatas()),
          _step;

      try {
        for (_iterator.s(); !(_step = _iterator.n()).done;) {
          var i = _step.value;
          this.tools.push(i);
        }
      } catch (err) {
        _iterator.e(err);
      } finally {
        _iterator.f();
      }
    },
    handlLineName: function handlLineName(val) {
      this.canvas.data.lineName = val;
    },
    handleFromArrowType: function handleFromArrowType(val) {
      this.canvas.data.fromArrow = val;
    },
    handleToArrowType: function handleToArrowType(val) {
      this.canvas.data.toArrow = val;
    },
    lockClick: function lockClick() {
      if (this.locked > 0) {
        this.locked = 0;
        this.canvas.lock(0);
      } else {
        this.canvas.lock(1);
        this.locked = 1;
      }
    },
    //文件及编辑
    operationFile: function operationFile(type, name) {
      switch (type) {
        case 1:
          if (name === "add") {
            this.$router.push({
              path: "/workspace"
            });
            this.topologyData = {};
            this.canvas.open(this.topologyData);
            this.canvas.render();
          }

          if (name === "open") {
            this.handle_replace();
          }

          if (name === "import") {
            this.handle_replace();
          }

          if (name === "json") {
            this.handle_saveJson();
          }

          if (name === "png") {
            this.handle_savePng();
          }

          if (name === "svg") {
            this.handle_saveSvg();
          }

          if (name === "lately") {}

          break;

        case 2:
          if (name === "revoke") {
            this.canvas.undo();
          } else if (name === "shear") {
            this.canvas.cut();
          } else if (name === "copy") {
            this.canvas.copy();
          } else if (name === "paste") {
            this.canvas.paste();
          }

          break;

        default:
          console.log("暂无方法，请执行填写");
          break;
      }
    },
    //预览
    preview: function preview() {
      this.topologyData = JSON.parse(JSON.stringify(this.canvas.data));

      if (!this.$route.query.id) {
        this.$message.warning("未保存数据");
        return;
      }

      this.$router.push({
        path: this.previewUrl,
        query: {
          id: this.$route.query.id
        }
      });
    },
    open: function open() {
      var _this = this;

      return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                if (!_this.$route.query.id) {
                  _context.next = 3;
                  break;
                }

                _context.next = 3;
                return _this.getTopologyId(rsautils_decrypt(_this.$route.query.id)).then(function (res) {
                  if (res.code === 200) {
                    _this.topologyData = res.data.data;
                  }
                }).catch(function (res) {
                  _this.topologyData = {};
                });

              case 3:
                if (_this.topologyData) {
                  _this.canvas.open(_this.topologyData);

                  _this.canvas.render();

                  _this.toArrow = _this.canvas.data.toArrow;
                  _this.fromArrow = _this.canvas.data.fromArrow;
                  _this.lineName = _this.canvas.data.lineName;

                  _this.canvas.lock(0);
                }

              case 4:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }))();
    },
    init: function init() {
      var _this2 = this;

      // 2. 创建画布
      // 其中，第一个参数'topo-canvas'表示canvas所在的父dom元素id，通常为<div class="canvas" id="topo-canvas"></div>；
      // 第二个参数{}表示画布选项，这里表示全部使用默认值。具体选项请参考后面的api文档。
      this.canvas = new core_Topology("topology-hrhx", {
        rotateCursor: "./rotate.cur",
        on: function on(event, data) {
          _this2.optionsSet(event, data, _this2.canvas);
        }
      }); // this.onSvgICON();
      // 3. 渲染图形
      // 画布图形数据，可以来自于官网下载的json

      this.open();
    },
    //处理svg图标
    onSvgICON: function onSvgICON() {
      window.Point = Point;

      if (window.registerTools) {
        window.registerTools(svgData);
      }
    },
    onDrag: function onDrag(event, node, it) {
      // console.log(event,node,it)
      if (it) {
        event.dataTransfer.setData("Text", JSON.stringify({
          name: node.fullname,
          rect: {
            width: 100,
            height: 100
          }
        }));
      } else {
        // if(node.data.name=="echarts"){
        //   node.removeFromDiv();
        // }
        // console.log(node.data.icon.charCodeAt().toString(16))
        event.dataTransfer.setData("Text", JSON.stringify(node.data));
      }
    },
    handle_replace: function handle_replace() {
      var input = document.createElement("input");
      input.type = "file";

      input.onchange = function (event) {
        var elem = event.srcElement || event.target;

        if (elem.files && elem.files[0]) {
          var name = elem.files[0].name.replace(".json", "");
          var reader = new FileReader();
          reader.readAsText(elem.files[0]);
        }
      };

      input.click();
    },
    handle_saveJson: function handle_saveJson() {
      if (!!this.canvas.data.name) {
        FileSaver_min["saveAs"](new Blob([JSON.stringify(this.canvas.data)], {
          type: "text/plain;charset=utf-8"
        }), this.canvas.data.name + ".json");
      } else {
        this.$notification.warn({
          message: "请填写图文名称"
        });
      }
    },
    handle_savePng: function handle_savePng() {
      if (!!this.canvas.data.name) {
        this.canvas.saveAsImage(this.canvas.data.name + ".png");
      } else {
        this.$notification.warn({
          message: "请填写图文名称"
        });
      }
    },
    handle_saveSvg: function handle_saveSvg() {
      var name = "";

      if (!!this.canvas.data.name) {
        name = this.canvas.data.name + ".svg";
      } else {
        this.$notification.warn({
          message: "请填写图文名称"
        });
        return;
      }

      var ctx = new C2S(this.canvas.canvas.width + 200, this.canvas.canvas.height + 200);

      var _iterator2 = _createForOfIteratorHelper(this.canvas.data.pens),
          _step2;

      try {
        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
          var item = _step2.value;
          item.render(ctx);
        }
      } catch (err) {
        _iterator2.e(err);
      } finally {
        _iterator2.f();
      }

      var mySerializedSVG = ctx.getSerializedSvg();
      mySerializedSVG = mySerializedSVG.replace("<defs/>", "<defs>\n    <style type=\"text/css\">\n      @font-face {\n        font-family: 'topology';\n        src: url('http://at.alicdn.com/t/font_1331132_h688rvffmbc.ttf?t=1569311680797') format('truetype');\n      }\n    </style>\n  </defs>");
      mySerializedSVG = mySerializedSVG.replace(/--le5le--/g, "&#x");
      var urlObject = window.URL || window;
      var export_blob = new Blob([mySerializedSVG]);
      var url = urlObject.createObjectURL(export_blob);
      var a = document.createElement("a");
      a.setAttribute("download", name);
      a.setAttribute("href", url);
      var evt = document.createEvent("MouseEvents");
      evt.initEvent("click", true, true);
      a.dispatchEvent(evt);
    },
    updateProps: function updateProps(node) {
      console.log(node);
      this.canvas.updateProps(this.canvas.data.pens);
    },
    updateLines: function updateLines(line) {
      this.canvas.updateProps(this.canvas.data.pens);
    },
    uploadCanvasData: function uploadCanvasData(data) {
      this.canvas.open(data);
      this.canvas.render();
    },
    updatePens: function updatePens(params) {
      layout(this.pens, params);
      this.canvas.updateProps(this.canvas.data.pens);
    },
    updatePensSubclass: function updatePensSubclass(name, val) {
      var _iterator3 = _createForOfIteratorHelper(this.pens),
          _step3;

      try {
        for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
          var item = _step3.value;
          item[name] = val;
        }
      } catch (err) {
        _iterator3.e(err);
      } finally {
        _iterator3.f();
      }

      this.canvas.updateProps(this.canvas.data.pens);
    },
    updateAlignNodes: function updateAlignNodes(rect, align) {
      alignNodes(this.pens, rect, align);
      this.canvas.updateProps(this.canvas.data.pens);
    },
    updateSpaceBetween: function updateSpaceBetween(params) {
      spaceBetween(this.pens, params.maxWidth);
      this.canvas.updateProps(this.canvas.data.pens);
    },
    saveTopology: function saveTopology() {
      var _this3 = this;

      return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
        var params;
        return regeneratorRuntime.wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                params = {};

                if (!!_this3.$route.query.id) {
                  params.id = rsautils_decrypt(_this3.$route.query.id);
                }

                if (_this3.canvas.data.name) {
                  _context2.next = 5;
                  break;
                }

                _this3.$message.error("请填写图文名称");

                return _context2.abrupt("return");

              case 5:
                params.name = _this3.canvas.data.name;
                params.data = _this3.canvas.data;
                _context2.next = 9;
                return _this3.save(params).then(function (res) {
                  if (res.code === 200) {
                    _this3.$message.success("保存成功");

                    _this3.$router.push({
                      path: "/workspace",
                      query: {
                        id: encryption(String(res.data.id))
                      }
                    });
                  }
                }).catch(function (res) {
                  _this3.$route.query.id = "";
                });

              case 9:
              case "end":
                return _context2.stop();
            }
          }
        }, _callee2);
      }))();
    },
    optionsSet: function optionsSet(event, data, canvas) {
      switch (event) {
        case "scale":
          this.scale = data;
          break;

        case "locked":
          this.locked = data;
          this.opt = "space";
          break;

        case "space":
          this.opt = event;
          break;

        case "node":
          this.opt = event;
          this.node = data;

        case "addNode":
          this.opt = event;
          this.node = data;

        case "addLine":
          this.opt = event;
          this.lineData = data;
          break;

        case "line":
          this.opt = event;
          this.lineData = data;
          break;

        case "multi":
          this.opt = event;
          this.pens = data;
          break;

        case "delete":
          this.opt = "space";
          break;
      }
    }
  }
});
// CONCATENATED MODULE: ./src/views/topology/Workspace.vue?vue&type=script&lang=js&
 /* harmony default export */ var topology_Workspacevue_type_script_lang_js_ = (Workspacevue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/views/topology/Workspace.vue?vue&type=style&index=0&lang=scss&
var Workspacevue_type_style_index_0_lang_scss_ = __webpack_require__("962e");

// CONCATENATED MODULE: ./src/views/topology/Workspace.vue






/* normalize component */

var Workspace_component = normalizeComponent(
  topology_Workspacevue_type_script_lang_js_,
  Workspacevue_type_template_id_09266e92_render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var Workspace = (Workspace_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/topology/Preview.vue?vue&type=template&id=05e23e82&
var Previewvue_type_template_id_05e23e82_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{"overflow":"hidden"}},[_c('div',{staticStyle:{"width":"100%","height":"100vh"},attrs:{"id":"topology-hrhx"}}),_c('div',{staticClass:"tools"},[_c('a-button',{attrs:{"type":"primary"},on:{"click":_vm.onBack}},[_c('a-icon',{attrs:{"type":"left"}}),_vm._v(" 返回 ")],1),_c('div'),_c('a-button',{staticStyle:{"margin-right":"5px"},attrs:{"type":"primary"},on:{"click":_vm.onSizeWindow}},[_c('a-icon',{attrs:{"type":"border"}}),_vm._v(" 适合窗口大小 ")],1)],1)])}
var Previewvue_type_template_id_05e23e82_staticRenderFns = []


// CONCATENATED MODULE: ./src/views/topology/Preview.vue?vue&type=template&id=05e23e82&

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
var es_string_split = __webpack_require__("1276");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/topology/Preview.vue?vue&type=script&lang=js&




//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

var Data = "";

/* harmony default export */ var Previewvue_type_script_lang_js_ = ({
  name: "Preview",
  props: {
    getTopologyId: {
      type: Function,
      default: null
    }
  },
  data: function data() {
    return {
      canvas: {},
      locked: 0,
      showTools: true,
      topologyData: null
    };
  },
  created: function created() {},
  mounted: function mounted() {
    this.init();
    var that = this;

    window.onresize = function () {
      setTimeout(function () {
        that.onSizeWindow();
      }, 100);
    };
  },
  destroyed: function destroyed() {
    this.canvas.destroy();
    window.onresize = null;
  },
  methods: {
    onBack: function onBack() {
      // this.$router.push({
      //   path: "/workspace",
      //   query: {
      //     id: this.$route.query.id,
      //   },
      // });
      this.$router.go(-1);
    },
    onSizeWindow: function onSizeWindow() {
      this.canvas.fitView(5);
      this.canvas.centerView(15);
    },
    onSizeOri: function onSizeOri() {
      this.canvas.open(this.topologyData);
    },
    init: function init() {
      var _this = this;

      return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
        var id;
        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                _this.canvas = new core_Topology("topology-hrhx", {}); // Data.locked=1;
                // this.topologyData=Data
                // 3. 渲染图形
                // 画布图形数据，可以来自于官网下载的json

                id = _this.$route.query.id;

                if (rsautils_decrypt(id) === null) {
                  id = _this.$route.fullPath.split("id=")[1];
                  console.log(rsautils_decrypt(id));
                }

                _context.next = 5;
                return _this.getTopologyId(rsautils_decrypt(id)).then(function (res) {
                  if (res.code === 200) {
                    _this.topologyData = res.data.data;
                  }
                }).catch(function (res) {
                  _this.topologyData = {};
                });

              case 5:
                _this.canvas.open(_this.topologyData);

                _this.canvas.data.locked = 1; // 或 用window.topology对象 === 上面的canvas
                // topology.open(json);
                // 4. 如果json发送变化，重绘

                _this.canvas.render();

                _this.onSizeWindow();

                topology.data.socketEvent = true;
                topology.on("websocket", function (e) {
                  var msg = JSON.parse(e);

                  if (msg.code) {
                    if (msg.code === 200) {
                      _this.$message.success(msg.msg);
                    } else {
                      _this.$message.error(msg.msg);
                    }
                  }
                });

              case 11:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }))();
    }
  }
});
// CONCATENATED MODULE: ./src/views/topology/Preview.vue?vue&type=script&lang=js&
 /* harmony default export */ var topology_Previewvue_type_script_lang_js_ = (Previewvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/views/topology/Preview.vue?vue&type=style&index=0&lang=scss&
var Previewvue_type_style_index_0_lang_scss_ = __webpack_require__("bccd");

// CONCATENATED MODULE: ./src/views/topology/Preview.vue






/* normalize component */

var Preview_component = normalizeComponent(
  topology_Previewvue_type_script_lang_js_,
  Previewvue_type_template_id_05e23e82_render,
  Previewvue_type_template_id_05e23e82_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var Preview = (Preview_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/PreviewToImg.vue?vue&type=template&id=5cfae9b5&
var PreviewToImgvue_type_template_id_5cfae9b5_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{"overflow":"hidden"}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],style:({ width: _vm.width, height: _vm.height }),attrs:{"id":"topology-hrhx"}}),_c('el-tooltip',{attrs:{"content":_vm.title,"placement":"top"}},[_c('el-image',{style:({ width: _vm.width, height: _vm.height }),attrs:{"src":_vm.imgData,"lazy":""}},[_c('div',{staticClass:"image-slot",attrs:{"slot":"error"},slot:"error"},[_c('i',{staticClass:"el-icon-picture-outline"})])])],1)],1)}
var PreviewToImgvue_type_template_id_5cfae9b5_staticRenderFns = []


// CONCATENATED MODULE: ./src/components/topology/PreviewToImg.vue?vue&type=template&id=5cfae9b5&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/topology/PreviewToImg.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


/* harmony default export */ var PreviewToImgvue_type_script_lang_js_ = ({
  props: {
    canvasData: {
      type: Object,
      require: true
    },
    height: {
      type: String,
      require: true
    },
    width: {
      type: String,
      require: true
    },
    title: {
      type: String,
      require: true
    }
  },
  watch: {
    canvasData: {
      handler: function handler(n, o) {
        var _this = this;

        this.$nextTick(function () {
          _this.init();
        });
      },
      deep: true
    }
  },
  data: function data() {
    return {
      canvas: {},
      locked: 0,
      showTools: true,
      imgData: ""
    };
  },
  created: function created() {
    chart_diagram_src_register_register();
  },
  mounted: function mounted() {
    this.init();
  },
  methods: {
    onBack: function onBack() {//   this.$router.push({
      //     path: "/workspace",
      //   });
    },
    onSizeWindow: function onSizeWindow() {
      this.canvas.fitView(20);
    },
    onSizeOri: function onSizeOri() {//   this.canvas.open(this.$store.state.canvas.topologyData);
    },
    init: function init() {
      this.canvas = new core_Topology("topology-hrhx");
      this.canvasData.locked = 1; // 3. 渲染图形
      // 画布图形数据，可以来自于官网下载的json

      this.canvasData.websocket = "";
      this.canvas.open(this.canvasData); // 或 用window.topology对象 === 上面的canvas
      // topology.open(json);
      // 4. 如果json发送变化，重绘

      this.canvas.render();
      this.imgData = this.canvas.toImage();
      this.canvas.destroy();
    }
  }
});
// CONCATENATED MODULE: ./src/components/topology/PreviewToImg.vue?vue&type=script&lang=js&
 /* harmony default export */ var topology_PreviewToImgvue_type_script_lang_js_ = (PreviewToImgvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/components/topology/PreviewToImg.vue?vue&type=style&index=0&lang=scss&
var PreviewToImgvue_type_style_index_0_lang_scss_ = __webpack_require__("9cda");

// CONCATENATED MODULE: ./src/components/topology/PreviewToImg.vue






/* normalize component */

var PreviewToImg_component = normalizeComponent(
  topology_PreviewToImgvue_type_script_lang_js_,
  PreviewToImgvue_type_template_id_5cfae9b5_render,
  PreviewToImgvue_type_template_id_5cfae9b5_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var PreviewToImg = (PreviewToImg_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/configuration/ParamsConfig.vue?vue&type=template&id=57a5622f&
var ParamsConfigvue_type_template_id_57a5622f_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"app-container"},[_c('el-row',{staticClass:"mb8",attrs:{"gutter":10}},[_c('el-col',{attrs:{"span":24}},[_c('el-button',{attrs:{"type":"primary","plain":"","icon":"el-icon-plus","size":"mini"},on:{"click":_vm.addTopology}},[_vm._v("创建组态")])],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":24}},[_c('el-card',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}]},[_c('el-row',{attrs:{"gutter":20}},_vm._l((_vm.topologyList),function(item,index){return _c('el-col',{key:index,attrs:{"span":6}},[_c('el-card',{attrs:{"body-style":{ padding: '0px' }}},[_c('div',{on:{"click":function($event){return _vm.previeData(item)}}},[_c('preview-to-img',{attrs:{"canvasData":_vm.changeJson(item.data),"width":'100%',"height":'20vh',"title":'点击预览'}})],1),_c('div',{staticStyle:{"padding":"14px"}},[_c('el-row',[_c('el-col',{attrs:{"span":19}},[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":item.name,"placement":"top-start"}},[_c('span',[_vm._v(_vm._s(_vm.splitName(item.name)))])])],1),_c('el-col',{attrs:{"span":4}},[_c('span',[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":"显示/隐藏","placement":"top-start"}},[_c('el-switch',{attrs:{"active-value":"1","inactive-value":"0"},on:{"change":function($event){return _vm.handleSwitchItChange(item)}},model:{value:(item.switchIt),callback:function ($$v) {_vm.$set(item, "switchIt", $$v)},expression:"item.switchIt"}})],1)],1)])],1),_c('div',{staticClass:"bottom clearfix"},[_c('el-button',{attrs:{"size":"mini","type":"text","icon":"el-icon-s-tools"},on:{"click":function($event){return _vm.uploadTopology(item)}}},[_vm._v("修改组态")]),_c('el-button',{attrs:{"size":"mini","type":"text","icon":"el-icon-s-tools"},on:{"click":function($event){return _vm.handleAdd(item)}}},[_vm._v("采集参数设置")]),_c('el-button',{attrs:{"size":"mini","type":"text","icon":"el-icon-delete"},on:{"click":function($event){return _vm.removeTopology(item.id)}}},[_vm._v("删除")]),_c('el-button',{attrs:{"size":"mini","type":"text","icon":"el-icon-s-tools"},on:{"click":function($event){return _vm.handleMutual(item)}}},[_vm._v("交互参数设置")]),_c('el-button',{attrs:{"size":"mini","type":"text","icon":"el-icon-delete"},on:{"click":function($event){return _vm.removeTopologyHandle(item.id)}}},[_vm._v("清空原有配置")])],1)],1)])],1)}),1),_c('pagination',{directives:[{name:"show",rawName:"v-show",value:(_vm.total > 0),expression:"total > 0"}],attrs:{"total":_vm.total,"page":_vm.queryParams.pageNum,"limit":_vm.queryParams.pageSize},on:{"update:page":function($event){return _vm.$set(_vm.queryParams, "pageNum", $event)},"update:limit":function($event){return _vm.$set(_vm.queryParams, "pageSize", $event)},"pagination":function($event){return _vm.init()}}})],1)],1)],1),_c('add-params',{ref:"addParams",on:{"ok":_vm.paramsSet}}),_c('add-mutual',{ref:"addMutual",on:{"ok":_vm.mutualSet}})],1)}
var ParamsConfigvue_type_template_id_57a5622f_staticRenderFns = []


// CONCATENATED MODULE: ./src/views/configuration/ParamsConfig.vue?vue&type=template&id=57a5622f&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/configuration/modules/AddParams.vue?vue&type=template&id=7eeb6167&
var AddParamsvue_type_template_id_7eeb6167_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"app-container"},[_c('el-dialog',{attrs:{"title":_vm.title,"visible":_vm.open,"fullscreen":""},on:{"update:visible":function($event){_vm.open=$event},"close":_vm.cancel}},[_c('a-steps',{attrs:{"current":_vm.current}},[_c('a-step',{attrs:{"title":"第一步"}}),_c('a-step',{attrs:{"title":"第二步"}})],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.current == 0),expression:"current == 0"}],staticClass:"steps-content"},[_c('el-form',{ref:"form",staticStyle:{"margin":"10px"},attrs:{"model":_vm.form,"rules":_vm.rules,"label-width":"120px"}},[_c('el-row',[_c('el-col',{attrs:{"span":24}},[_c('el-form-item',{attrs:{"label":"获取方式","prop":"dataAcquisitionMode"}},[_c('el-select',{attrs:{"placeholder":"请选择获取方式","clearable":"","size":"small"},model:{value:(_vm.form.dataAcquisitionMode),callback:function ($$v) {_vm.$set(_vm.form, "dataAcquisitionMode", $$v)},expression:"form.dataAcquisitionMode"}},_vm._l((_vm.dataAcquisitionMode),function(dict){return _c('el-option',{key:dict.dictValue,attrs:{"label":dict.dictLabel,"value":dict.dictValue}})}),1)],1)],1),_c('el-col',{attrs:{"span":16}},[_c('el-form-item',{attrs:{"label":"条件"}},[_c('el-input',{attrs:{"type":"textarea","rows":10,"placeholder":"请输入执行语句/表名/共享ip+端口"},model:{value:(_vm.form.sentence),callback:function ($$v) {_vm.$set(_vm.form, "sentence", $$v)},expression:"form.sentence"}})],1)],1),_c('el-col',{attrs:{"span":16}},[_c('ul',{staticClass:"ml30 mv10",staticStyle:{"color":"red","margin-left":"100px"}},[_c('li',[_vm._v("获取方式为mysql或oracle时，条件为sql语句。")]),_c('li',[_vm._v("获取方式为influxdb时，条件为Flux函数")]),_c('li',[_vm._v("获取方式为redis时，条件为redis中key值")]),_c('li',[_vm._v("获取方式为共享服务端时，条件为共享服务端ip+端口")])])])],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":12}})],1)],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.current == 1),expression:"current == 1"}],staticClass:"steps-content"},[_c('el-table',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],attrs:{"height":'62vh',"border":"","data":_vm.handleList}},[_c('el-table-column',{attrs:{"type":"index","align":"center"}}),_c('el-table-column',{attrs:{"label":"tag标识","align":"center","prop":"tag","show-overflow-tooltip":true}}),_c('el-table-column',{attrs:{"label":"类型","align":"center","prop":"type","formatter":_vm.typeFormat,"show-overflow-tooltip":true}}),_c('el-table-column',{attrs:{"label":"操作","align":"center","class-name":"small-padding fixed-width"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"size":"mini","type":"text","icon":"el-icon-caret-right"},on:{"click":function($event){return _vm.configIt(scope.row)}}},[_vm._v("配置")])]}}])})],1)],1),_c('div',{staticClass:"steps-action",attrs:{"slot":"footer"},slot:"footer"},[(_vm.current < 1)?_c('a-button',{attrs:{"type":"primary"},on:{"click":_vm.next}},[_vm._v(" 下一步 ")]):_vm._e(),(_vm.current > 0)?_c('a-button',{on:{"click":_vm.prev}},[_vm._v(" 上一步 ")]):_vm._e(),(_vm.current == 1)?_c('a-button',{staticStyle:{"margin-left":"8px"},attrs:{"type":"primary"},on:{"click":_vm.complete}},[_vm._v(" 完成 ")]):_vm._e()],1)],1),_c('tag-config',{ref:"tagconfig",attrs:{"list":_vm.list}})],1)}
var AddParamsvue_type_template_id_7eeb6167_staticRenderFns = []


// CONCATENATED MODULE: ./src/views/configuration/modules/AddParams.vue?vue&type=template&id=7eeb6167&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/configuration/modules/TagConfig.vue?vue&type=template&id=6e374d9e&
var TagConfigvue_type_template_id_6e374d9e_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-dialog',{attrs:{"title":_vm.title,"width":"70%","visible":_vm.open},on:{"update:visible":function($event){_vm.open=$event},"close":_vm.cancelTags}},[_c('el-row',{staticClass:"mb8",attrs:{"gutter":10}},[_c('el-col',{attrs:{"span":1.5}},[_c('el-button',{attrs:{"type":"primary","plain":"","icon":"el-icon-plus","size":"mini"},on:{"click":_vm.add}},[_vm._v("新增")])],1),_c('el-col',{attrs:{"span":1.5}},[_c('el-button',{attrs:{"type":"success","plain":"","icon":"el-icon-edit","size":"mini","disabled":_vm.single},on:{"click":_vm.update}},[_vm._v("修改")])],1),_c('el-col',{attrs:{"span":1.5}},[_c('el-button',{attrs:{"type":"danger","plain":"","icon":"el-icon-delete","size":"mini","disabled":_vm.multiple},on:{"click":_vm.handleDelete}},[_vm._v("删除")])],1)],1),_c('el-row',[_c('el-col',[_c('el-table',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],attrs:{"height":'62vh',"border":"","data":_vm.handle},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"55","align":"center"}}),_c('el-table-column',{attrs:{"label":"类型","align":"center","prop":"type","formatter":_vm.typeFormat,"show-overflow-tooltip":true}}),_c('el-table-column',{attrs:{"label":"字段/点位","align":"center","prop":"point","show-overflow-tooltip":true}}),(_vm.column)?_c('el-table-column',{attrs:{"label":"共享类型","align":"center","prop":"shareType","formatter":_vm.shareTypeFormat,"show-overflow-tooltip":true}}):_vm._e(),_c('el-table-column',{attrs:{"label":"是否为判断","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-switch',{attrs:{"disabled":""},model:{value:(scope.row.judge),callback:function ($$v) {_vm.$set(scope.row, "judge", $$v)},expression:"scope.row.judge"}})]}}])}),_c('el-table-column',{attrs:{"label":"获取原始值","align":"center","prop":"pointValue","show-overflow-tooltip":true}}),_c('el-table-column',{attrs:{"label":"组态改变值","align":"center","prop":"changeValue","show-overflow-tooltip":true}})],1)],1)],1),_c('div',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.submitHandle}},[_vm._v("确 定")]),_c('el-button',{on:{"click":_vm.submitHandle}},[_vm._v("取 消")])],1)],1),_c('el-dialog',{attrs:{"title":'添加配置',"width":"65%","visible":_vm.load},on:{"update:visible":function($event){_vm.load=$event},"close":_vm.cancel}},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"rules":_vm.rules,"label-width":"120px","inline":true}},[_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"组态类型","prop":"type"}},[_c('el-select',{attrs:{"filterable":"","placeholder":"请选择组态类型"},model:{value:(_vm.form.type),callback:function ($$v) {_vm.$set(_vm.form, "type", $$v)},expression:"form.type"}},_vm._l((_vm.tagAttribute),function(dict){return _c('el-option',{key:dict.dictValue,attrs:{"label":dict.dictLabel,"value":dict.dictValue}})}),1)],1)],1),(!_vm.form.customChart || _vm.form.type != 'data')?_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"数据字段/点位","prop":"point"}},[_c('el-input',{attrs:{"placeholder":"请输入数据字段/点位"},model:{value:(_vm.form.point),callback:function ($$v) {_vm.$set(_vm.form, "point", $$v)},expression:"form.point"}})],1)],1):_vm._e()],1),_c('el-row',{directives:[{name:"show",rawName:"v-show",value:(_vm.form.type != 'data'),expression:"form.type != 'data'"}]},[_c('el-col',{directives:[{name:"show",rawName:"v-show",value:(_vm.column),expression:"column"}],attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"共享类型","prop":"shareType"}},[_c('el-select',{attrs:{"filterable":"","placeholder":"请选择共享类型"},model:{value:(_vm.form.shareType),callback:function ($$v) {_vm.$set(_vm.form, "shareType", $$v)},expression:"form.shareType"}},_vm._l((_vm.shareTypeList),function(dict){return _c('el-option',{key:dict.dictValue,attrs:{"label":dict.dictLabel,"value":dict.dictValue}})}),1)],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"是否为判断","prop":"judge"}},[_c('el-radio-group',{attrs:{"size":"small"},model:{value:(_vm.form.judge),callback:function ($$v) {_vm.$set(_vm.form, "judge", $$v)},expression:"form.judge"}},[_c('el-radio',{attrs:{"label":true,"border":""}},[_vm._v("开启")]),_c('el-radio',{attrs:{"label":false,"border":""}},[_vm._v("关闭")])],1)],1)],1),_c('el-col',{directives:[{name:"show",rawName:"v-show",value:(_vm.form.judge),expression:"form.judge"}],attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"获取原始值","prop":"pointValue"}},[_c('el-input',{attrs:{"placeholder":"请输入获取原始值"},model:{value:(_vm.form.pointValue),callback:function ($$v) {_vm.$set(_vm.form, "pointValue", $$v)},expression:"form.pointValue"}})],1)],1),_c('el-col',{directives:[{name:"show",rawName:"v-show",value:(_vm.form.judge),expression:"form.judge"}],attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"组态改变值","prop":"changeValue"}},[(_vm.form.type!='icon'&&_vm.form.type!='image')?_c('el-input',{attrs:{"placeholder":"请输入组态改变值"},model:{value:(_vm.form.changeValue),callback:function ($$v) {_vm.$set(_vm.form, "changeValue", $$v)},expression:"form.changeValue"}}):_vm._e(),(_vm.form.type==='icon')?_c('el-select',{staticStyle:{"margin-left":"20px"},attrs:{"multiple":"","collapse-tags":"","filterable":"","placeholder":"请输入组态改变值"},on:{"change":_vm.iconChange},model:{value:(_vm.selectIcons),callback:function ($$v) {_vm.selectIcons=$$v},expression:"selectIcons"}},_vm._l((_vm.options),function(item){return _c('el-option-group',{key:item.group,attrs:{"label":item.group}},_vm._l((item.children),function(item1){return _c('el-option',{key:item1.icon,attrs:{"label":item1.data.icon+'%'+item1.data.iconFamily,"value":item1.data.icon+'%'+item1.data.iconFamily}},[_c('i',{class:("iconfont " + (item1.icon)),staticStyle:{"font-size":"25px"}})])}),1)}),1):_vm._e(),(_vm.form.type==='image')?_c('el-select',{staticStyle:{"margin-left":"20px"},attrs:{"multiple":"","collapse-tags":"","filterable":"","placeholder":"请输入组态改变值"},on:{"change":_vm.imageChange},model:{value:(_vm.selectImage),callback:function ($$v) {_vm.selectImage=$$v},expression:"selectImage"}},_vm._l((_vm.imageList),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.id,"value":_vm.baseapi + item.url}},[_c('span',[_vm._v(" "+_vm._s(item.id)+" ")]),_c('el-image',{staticStyle:{"width":"25px","height":"25px","float":"right"},attrs:{"src":_vm.baseapi + item.url,"fit":_vm.fit}})],1)}),1):_vm._e()],1)],1)],1),_c('el-row',{directives:[{name:"show",rawName:"v-show",value:(_vm.form.type === 'data'),expression:"form.type === 'data'"}]},[_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"图表名称","prop":"title"}},[_c('el-input',{attrs:{"placeholder":"请输入echarts Title"},model:{value:(_vm.form.title),callback:function ($$v) {_vm.$set(_vm.form, "title", $$v)},expression:"form.title"}})],1)],1),_c('el-col',{attrs:{"span":12}},[_c('el-form-item',{attrs:{"label":"自定义图表","prop":"customChart"}},[_c('el-radio-group',{attrs:{"size":"small"},model:{value:(_vm.form.customChart),callback:function ($$v) {_vm.$set(_vm.form, "customChart", $$v)},expression:"form.customChart"}},[_c('el-radio',{attrs:{"label":true,"border":""}},[_vm._v("开启")]),_c('el-radio',{attrs:{"label":false,"border":""}},[_vm._v("关闭")])],1)],1)],1),_c('el-col',{directives:[{name:"show",rawName:"v-show",value:(_vm.form.customChart),expression:"form.customChart"}],attrs:{"span":24}},[_c('el-row',[_c('el-col',{attrs:{"span":24}},[_c('el-button',{staticStyle:{"margin-bottom":"5px"},attrs:{"size":"mini","type":"primary"},on:{"click":function($event){return _vm.handleAdd()}}},[_vm._v("添加")]),_c('el-table',{ref:"mytable",staticStyle:{"width":"100%"},attrs:{"data":_vm.table_data}},[_vm._l((_vm.table_columns),function(item,index,key){return _c('el-table-column',{key:key,attrs:{"align":"center","item":item,"index":index,"label":item.label},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.edit && item.input === 'text')?_c('el-input',{attrs:{"size":"small","placeholder":'请输入' + item.label},model:{value:(scope.row[item.prop]),callback:function ($$v) {_vm.$set(scope.row, item.prop, $$v)},expression:"scope.row[item.prop]"}}):_vm._e(),(scope.row.edit && item.input === 'select')?_c('el-select',{attrs:{"filterable":"","placeholder":'请选择' + item.label},model:{value:(scope.row[item.prop]),callback:function ($$v) {_vm.$set(scope.row, item.prop, $$v)},expression:"scope.row[item.prop]"}},[_c('el-option',{attrs:{"value":'',"label":"请选择"}}),_vm._l((_vm.dictEcharts(item.selectName)),function(dict){return _c('el-option',{key:dict.dictValue,attrs:{"label":dict.dictLabel,"value":dict.dictValue}})})],2):_vm._e(),(!scope.row.edit)?_c('span',[_vm._v(_vm._s(_vm.dictEchartsFormat(item.selectName, scope.row[item.prop])))]):_vm._e()]}}],null,true)})}),_c('el-table-column',{attrs:{"label":"操作","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(_vm.is_edit && scope.row.add == undefined)?_c('div',{staticStyle:{"display":"inline-block"}},[(!scope.row.edit)?_c('el-button',{staticStyle:{"margin-right":"5px"},attrs:{"size":"mini","type":"primary"},on:{"click":function($event){return _vm.handleEdit(scope.$index, scope.row)}}},[_vm._v("Edit")]):_vm._e(),(scope.row.edit)?_c('el-button',{staticStyle:{"margin-right":"5px"},attrs:{"size":"mini","type":"success","plain":true},on:{"click":function($event){return _vm.handleSave(scope.$index, scope.row)}}},[_vm._v("Save")]):_vm._e()],1):_vm._e(),(scope.row.add != undefined && scope.row.add)?_c('div',{staticStyle:{"display":"inline-block"}},[(scope.row.edit)?_c('el-button',{attrs:{"size":"mini","type":"success","plain":true},on:{"click":function($event){return _vm.handleSave(scope.$index, scope.row)}}},[_vm._v("Save")]):_vm._e()],1):_vm._e(),(_vm.is_delete && scope.row.add == undefined)?_c('el-button',{attrs:{"size":"mini","plain":true,"type":"danger"},on:{"click":function($event){return _vm.handleDeleteIt(scope.$index, scope.row)}}},[_vm._v("Delete")]):_vm._e()]}}])})],2)],1)],1)],1)],1)],1),_c('div',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.submitForm}},[_vm._v("确 定")]),_c('el-button',{on:{"click":_vm.cancel}},[_vm._v("取 消")])],1)],1)],1)}
var TagConfigvue_type_template_id_6e374d9e_staticRenderFns = []


// CONCATENATED MODULE: ./src/views/configuration/modules/TagConfig.vue?vue&type=template&id=6e374d9e&

// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
function _arrayWithHoles(arr) {
  if (Array.isArray(arr)) return arr;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js








function _iterableToArray(iter) {
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js




function _toArray(arr) {
  return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js

function _arrayWithoutHoles(arr) {
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js




function _toConsumableArray(arr) {
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
var es_array_join = __webpack_require__("a15b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
var es_array_splice = __webpack_require__("a434");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/configuration/modules/TagConfig.vue?vue&type=script&lang=js&










//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var TagConfigvue_type_script_lang_js_type = [{
  required: true,
  message: "请选择组态类型",
  trigger: "change"
}];
var TagConfigvue_type_script_lang_js_point = [{
  required: true,
  message: "请填写字段/点位",
  trigger: "blur"
}];
var shareType = [{
  required: true,
  message: "请选择共享类型",
  trigger: "change"
}];
var TagConfigvue_type_script_lang_js_judge = [{
  required: true,
  message: "请选择是否为判断",
  trigger: "change"
}]; //type: "boolean",

var customChart = [{
  type: "boolean",
  required: true,
  message: "请选择自定义图表",
  trigger: "blur"
}];
var pointValue = [{
  required: true,
  message: "请填写原始值",
  trigger: "blur"
}];
var changeValue = [{
  required: true,
  message: "请填写改变值",
  trigger: "blur"
}];
var title = [{
  type: "string",
  required: true,
  message: "请填写图表名称",
  trigger: "blur"
}];

/* harmony default export */ var TagConfigvue_type_script_lang_js_ = ({
  props: {
    list: {
      type: "Function",
      default: null
    }
  },
  data: function data() {
    return {
      imageList: [],
      baseapi: "/api",
      title: "",
      row: {},
      column: false,
      open: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      options: [],
      selectIcons: [],
      selectImage: [],
      form: {
        type: "",
        point: "",
        shareType: "",
        judge: false,
        customChart: true,
        pointValue: "",
        changeValue: "",
        title: "",
        echartsArray: []
      },
      rules: {},
      loading: false,
      handle: [],
      //tagType类型
      tagType: [],
      load: false,
      tagAttribute: [],
      shareTypeList: [],
      //以下为测试
      new_date_json: {},
      //数据结构
      is_edit: true,
      //是否可编辑
      is_delete: true,
      //是否可删除
      //表头信息
      table_columns: [{
        prop: "axis",
        label: "echarts轴",
        input: "select",
        selectName: "echarts_axis"
      }, {
        prop: "name",
        label: "名称",
        input: "text"
      }, {
        prop: "point",
        label: "数据字段/点位",
        input: "text"
      }, {
        prop: "seriesType",
        label: "echarts类型",
        input: "select",
        selectName: "echarts_series_type"
      }],
      //表格数据
      table_data: [],
      echartsAxisList: [],
      echartsSeriesTypeList: []
    };
  },
  watch: {
    //动态校验
    "form.type": {
      handler: function handler(n, o) {
        this.rules = {};
        this.rules.type = TagConfigvue_type_script_lang_js_type;

        if (n === "") {
          return;
        }

        if (n != "data") {
          this.rules.point = TagConfigvue_type_script_lang_js_point;
          this.form.customChart = false;
          this.rules.judge = TagConfigvue_type_script_lang_js_judge;

          if (this.column) {
            this.rules.shareType = shareType;
          }
        } else {
          this.rules.point = "";
          this.rules.title = title;
          this.rules.customChart = customChart;
        }
      },
      immediate: true,
      deep: true
    },
    "form.customChart": {
      handler: function handler(n, o) {
        console.log(n);

        if (n === "") {
          return;
        }

        if (!n) {
          this.rules.point = TagConfigvue_type_script_lang_js_point;
        }
      },
      immediate: true,
      deep: true
    },
    "form.judge": {
      handler: function handler(n, o) {
        if (n === "") {
          return;
        }

        if (this.form.type != "data" && n) {
          this.rules.pointValue = pointValue;
          this.rules.changeValue = changeValue;
        } else {
          delete this.rules.pointValue;
          delete this.rules.changeValue;
        }
      },
      immediate: true,
      deep: true
    }
  },
  created: function created() {
    this.options = getDatas();
  },
  methods: {
    getList: function getList() {
      var _this = this;

      list().then(function (res) {
        if (res.code === 200) {
          _this.imageList = res.data;
        }
      });
    },
    imageChange: function imageChange(val) {
      this.form.changeValue = val.join(",");
    },
    iconChange: function iconChange(val) {
      this.form.changeValue = val.join(",");
    },
    switchChange: function switchChange(val) {
      console.log(val);
    },
    handleDelete: function handleDelete() {
      for (var i = this.ids.length - 1; i >= 0; i--) {
        this.handle.splice(this.handle.indexOf(this.ids[i]), 1);
      }

      this.ids = [];
      this.$message.success("删除成功");
    },
    // 多选框选中数据
    handleSelectionChange: function handleSelectionChange(selection) {
      this.ids = selection.map(function (item) {
        return item;
      });
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    getTagAttribute: function getTagAttribute() {
      var _this2 = this;

      this.getDicts("tag_attribute").then(function (response) {
        _this2.tagAttribute = response.data;
      });
    },
    getShareTypeList: function getShareTypeList() {
      var _this3 = this;

      this.getDicts("share_type").then(function (response) {
        _this3.shareTypeList = response.data;
      });
    },
    getEchartsAxisList: function getEchartsAxisList() {
      var _this4 = this;

      this.getDicts("echarts_axis").then(function (response) {
        _this4.echartsAxisList = response.data;
      });
    },
    getEchartsSeriesTypeList: function getEchartsSeriesTypeList() {
      var _this5 = this;

      this.getDicts("echarts_series_type").then(function (response) {
        _this5.echartsSeriesTypeList = response.data;
      });
    },
    init: function init(row, data) {
      this.open = true;
      this.title = "配置" + row.tag;
      this.row = Object.assign({}, row);
      this.column = data.dataAcquisitionMode === "4" ? true : false;
      this.handle = this.row.handle;
      this.getList();
      this.getTagAttribute();
      this.getShareTypeList();
      this.getEchartsAxisList();
      this.getEchartsSeriesTypeList();
    },
    typeFormat: function typeFormat(row, column) {
      return this.selectDictLabel(this.tagAttribute, row.type);
    },
    shareTypeFormat: function shareTypeFormat(row, column) {
      return this.selectDictLabel(this.shareTypeList, row.shareType);
    },
    dictEchartsFormat: function dictEchartsFormat(type, val) {
      if (type === "echarts_axis") {
        return this.selectDictLabel(this.echartsAxisList, val);
      }

      if (type === "echarts_series_type") {
        return this.selectDictLabel(this.echartsSeriesTypeList, val);
      }

      return val;
    },
    dictEcharts: function dictEcharts(type) {
      if (type === "echarts_axis") {
        return this.echartsAxisList;
      }

      if (type === "echarts_series_type") {
        return this.echartsSeriesTypeList;
      }

      return [];
    },
    add: function add() {
      this.load = true;
    },
    update: function update() {
      var _this6 = this;

      this.load = true;
      this.$nextTick(function () {
        _this6.form = Object.assign({}, _this6.ids[0]);

        if (!_this6.form.echartsArray) {
          _this6.form.echartsArray = [];
        }

        if (_this6.form.type === "icon") {
          _this6.selectIcons = _this6.form.changeValue.split(",");
        }

        if (_this6.form.type === "image") {
          _this6.selectImage = _this6.form.changeValue.split(",");
        }

        _this6.initEditAttribute();
      });
    },
    submitForm: function submitForm() {
      var _this7 = this;

      this.$refs["form"].validate(function (valid) {
        if (valid) {
          var params = Object.assign({}, _this7.form);

          if (_this7.form.changeValue) {
            if (_this7.form.changeValue instanceof Array) {
              params.changeValue = _this7.form.changeValue.join(",");
            }
          }

          if (params.type === "data") {
            if (!params.customChart) {
              if (_this7.table_data.length < 1) {
                _this7.$message.warning("请添加图表数据");

                return;
              }
            }
          }

          params.echartsArray = _toConsumableArray(_this7.table_data);

          if (_this7.handle.indexOf(_this7.ids[0]) > -1) {
            _this7.handle.splice(_this7.handle.indexOf(_this7.ids[0]), 1, params);

            _this7.ids = [];

            _this7.$message.success("修改成功");
          } else {
            _this7.$message.success("添加成功");

            _this7.handle.push(params);
          }

          _this7.cancel();
        }
      });
    },
    reset: function reset() {
      this.table_data = []; // this.resetForm("form");

      this.$refs["form"].resetFields();
    },
    cancel: function cancel() {
      this.load = false;
      this.reset();
    },
    cancelTags: function cancelTags() {
      this.open = false;
      this.handle = [];
      this.row = {};
      this.column = false;
    },
    submitHandle: function submitHandle() {
      this.cancelTags();
    },
    // 以下为测试
    //编辑
    handleEdit: function handleEdit(index, row) {
      row.edit = true;
    },
    //删除
    handleDeleteIt: function handleDeleteIt(index, row) {
      this.table_data.splice(index, 1);
      this.$message({
        message: "删除成功！",
        type: "success"
      });
    },
    //保存
    handleSave: function handleSave(index, row) {
      row.edit = false;
      delete this.table_data[index].add;
      this.$message({
        message: "保存成功！",
        type: "success"
      });
    },
    handleAdd: function handleAdd() {
      var addDataJson = {};

      for (var key in this.new_date_json) {
        if (key === "edit") {
          delete addDataJson[key];
        } else if (key === "add") {
          delete addDataJson[key];
        } else {
          addDataJson[key] = "";
        }
      }

      addDataJson.edit = true;
      addDataJson.add = true;
      this.table_data.push(addDataJson);
    },
    //初始化编辑属性
    initEditAttribute: function initEditAttribute() {
      var self = this;
      var edit = self.edit;

      var _this$form$echartsArr = _toArray(this.form.echartsArray),
          dataArray = _this$form$echartsArr.slice(0);

      if (dataArray.length > 0) {
        //添加编辑事件
        for (var index in dataArray) {
          dataArray[index]["edit"] = false;
          this.table_data.push(dataArray[index]);
        }

        if (Object.keys(this.new_date_json).length === 0) {
          //新增时，初始化数据结构
          this.initAddDataJson(dataArray[0]);
        }
      }
    },
    initAddDataJson: function initAddDataJson(dataArray) {
      //新增时，初始化数据结构
      var dataJson = dataArray;
      var newDateJson = {};

      for (var key in dataJson) {
        if (key === "edit") {
          newDateJson[key] = "true";
        } else {
          newDateJson[key] = "";
        }
      }

      newDateJson["add"] = true;
      this.new_date_json = newDateJson;
    }
  }
});
// CONCATENATED MODULE: ./src/views/configuration/modules/TagConfig.vue?vue&type=script&lang=js&
 /* harmony default export */ var modules_TagConfigvue_type_script_lang_js_ = (TagConfigvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./src/views/configuration/modules/TagConfig.vue





/* normalize component */

var TagConfig_component = normalizeComponent(
  modules_TagConfigvue_type_script_lang_js_,
  TagConfigvue_type_template_id_6e374d9e_render,
  TagConfigvue_type_template_id_6e374d9e_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var TagConfig = (TagConfig_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/configuration/modules/AddParams.vue?vue&type=script&lang=js&





//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var AddParamsvue_type_script_lang_js_ = ({
  props: {
    list: {
      type: "Function",
      default: null
    },
    save: {
      type: "Function",
      default: null
    }
  },
  components: {
    TagConfig: TagConfig
  },
  data: function data() {
    return {
      topologyData: {},
      loading: false,
      //切换下一步
      current: 0,
      // 采集数据字典
      dataAcquisitionMode: [],
      //tagType类型
      tagType: [],
      // 表单校验
      rules: {},
      // 表单参数
      form: {
        dataAcquisitionMode: "",
        sentence: ""
      },
      //文件中的数据
      fileData: {},
      //处理的list
      handleList: [],
      open: false,
      title: ""
    };
  },
  methods: {
    update: function update(row) {
      var _this = this;

      this.open = true;
      this.title = "设置参数";
      this.getDicts("data_acquisition_mode").then(function (response) {
        _this.dataAcquisitionMode = response.data;
      });
      this.getDicts("tag_type").then(function (response) {
        _this.tagType = response.data;
      });
      this.topologyData = Object.assign({}, row);
      this.fileData = Object.assign({}, JSON.parse(row.data));
      this.handleList = [];

      if (this.fileData.topologyHandle) {
        if (!!this.fileData.topologyHandle.dataAcquisitionMode) {
          this.form.dataAcquisitionMode = this.fileData.topologyHandle.dataAcquisitionMode;
        }

        if (!!this.fileData.topologyHandle.sentence) {
          this.form.sentence = this.fileData.topologyHandle.sentence;
        }

        if (!!this.fileData.topologyHandle.change) {
          var _iterator = _createForOfIteratorHelper(this.fileData.pens),
              _step;

          try {
            for (_iterator.s(); !(_step = _iterator.n()).done;) {
              var s = _step.value;
              var judge = true;
              var param = {};

              if (s.tags.length > 0) {
                var _iterator2 = _createForOfIteratorHelper(this.fileData.topologyHandle.change),
                    _step2;

                try {
                  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
                    var s1 = _step2.value;

                    if (s.tags[0] === s1.tag) {
                      param.tag = s1.tag;
                      param.type = s1.type;
                      param.handle = s1.handle;

                      if (s.name === "echarts") {
                        param.echarts = s.data.echarts;
                      }

                      judge = false;
                    }
                  }
                } catch (err) {
                  _iterator2.e(err);
                } finally {
                  _iterator2.f();
                }

                if (judge) {
                  param.tag = s.tags[0];
                  param.type = s.type;
                  param.handle = [];

                  if (s.name === "echarts") {
                    param.echarts = s.data.echarts;
                  }
                }

                this.handleList.push(param);
              }
            }
          } catch (err) {
            _iterator.e(err);
          } finally {
            _iterator.f();
          }
        } else {
          var _iterator3 = _createForOfIteratorHelper(this.fileData.pens),
              _step3;

          try {
            for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
              var _s = _step3.value;

              if (_s.tags.length > 0) {
                var _param = {};
                _param.tag = _s.tags[0];
                _param.type = _s.type;
                _param.handle = [];

                if (_s.name === "echarts") {
                  _param.echarts = _s.data.echarts;
                }

                this.handleList.push(_param);
              }
            }
          } catch (err) {
            _iterator3.e(err);
          } finally {
            _iterator3.f();
          }
        }
      } else {
        var _iterator4 = _createForOfIteratorHelper(this.fileData.pens),
            _step4;

        try {
          for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
            var _s2 = _step4.value;

            if (_s2.tags.length > 0) {
              var _param2 = {};
              _param2.tag = _s2.tags[0];
              _param2.type = _s2.type;

              if (_s2.name === "echarts") {
                _param2.echarts = _s2.data.echarts;
              }

              _param2.handle = [];
              this.handleList.push(_param2);
            }
          }
        } catch (err) {
          _iterator4.e(err);
        } finally {
          _iterator4.f();
        }
      }
    },
    paramsList: function paramsList() {},
    cancel: function cancel() {
      this.open = false;
      Object.assign(this.$data, this.$options.data());
    },
    complete: function complete() {
      var _this2 = this;

      return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
        var topologyHandle;
        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                topologyHandle = {};
                topologyHandle.dataAcquisitionMode = _this2.form.dataAcquisitionMode;
                topologyHandle.sentence = _this2.form.sentence;
                topologyHandle.change = _this2.handleList;
                _this2.fileData.topologyHandle = topologyHandle;
                _this2.topologyData.data = Object.assign({}, _this2.fileData);
                _context.next = 8;
                return save(Object.assign({}, _this2.topologyData)).then(function (res) {
                  if (res.code === 200) {
                    _this2.$message.success("配置成功");
                  }
                });

              case 8:
                _this2.cancel();

                _this2.$emit("ok");

              case 10:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }))();
    },
    configIt: function configIt(row) {
      this.$refs.tagconfig.init(row, Object.assign({}, this.form));
    },
    // 公告状态字典翻译
    typeFormat: function typeFormat(row, column) {
      return this.selectDictLabel(this.tagType, row.type);
    },
    next: function next() {
      if (!this.form.dataAcquisitionMode) {
        this.$message.warning("请选择获取方式");
        return;
      }

      if (!this.form.sentence) {
        this.$message.warning("请填写执行语句/表名");
        return;
      }

      this.current++;
    },
    prev: function prev() {
      this.current--;
    },
    tagConfigHandle: function tagConfigHandle(row) {}
  }
});
// CONCATENATED MODULE: ./src/views/configuration/modules/AddParams.vue?vue&type=script&lang=js&
 /* harmony default export */ var modules_AddParamsvue_type_script_lang_js_ = (AddParamsvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/views/configuration/modules/AddParams.vue?vue&type=style&index=0&lang=css&
var AddParamsvue_type_style_index_0_lang_css_ = __webpack_require__("ae21");

// CONCATENATED MODULE: ./src/views/configuration/modules/AddParams.vue






/* normalize component */

var AddParams_component = normalizeComponent(
  modules_AddParamsvue_type_script_lang_js_,
  AddParamsvue_type_template_id_7eeb6167_render,
  AddParamsvue_type_template_id_7eeb6167_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var AddParams = (AddParams_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"597a4731-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/configuration/modules/AddMutual.vue?vue&type=template&id=64a17aeb&
var AddMutualvue_type_template_id_64a17aeb_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"app-container"},[_c('el-dialog',{attrs:{"title":_vm.title,"visible":_vm.open,"fullscreen":""},on:{"update:visible":function($event){_vm.open=$event},"close":_vm.cancel}},[_c('el-row',[_c('el-col',{attrs:{"span":24}},[_c('el-button',{staticStyle:{"margin-bottom":"5px"},attrs:{"size":"mini","type":"primary"},on:{"click":function($event){return _vm.handleAdd()}}},[_vm._v("添加")]),_c('el-form',{ref:"form"},[_c('el-table',{ref:"mytable",staticStyle:{"width":"100%"},attrs:{"data":_vm.table_data}},[_vm._l((_vm.table_columns),function(item,index,key){return _c('el-table-column',{key:key,attrs:{"align":"center","item":item,"index":index,"label":item.label},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.edit && item.input === 'textarea')?_c('el-input',{attrs:{"type":"textarea","rows":1,"placeholder":"请输入执行语句/表名/共享ip+端口"},model:{value:(scope.row[item.prop]),callback:function ($$v) {_vm.$set(scope.row, item.prop, $$v)},expression:"scope.row[item.prop]"}}):_vm._e(),(scope.row.edit && item.input === 'input')?_c('el-input',{attrs:{"size":"small","placeholder":'请输入' + item.label},model:{value:(scope.row[item.prop]),callback:function ($$v) {_vm.$set(scope.row, item.prop, $$v)},expression:"scope.row[item.prop]"}}):_vm._e(),(scope.row.edit && item.input === 'selectTag')?_c('el-select',{attrs:{"filterable":"","placeholder":'请选择' + item.label},model:{value:(scope.row[item.prop]),callback:function ($$v) {_vm.$set(scope.row, item.prop, $$v)},expression:"scope.row[item.prop]"}},[_c('el-option',{attrs:{"value":'',"label":"请选择"}}),_vm._l((_vm.tags),function(dict){return _c('el-option',{key:dict,attrs:{"label":dict,"value":dict}})})],2):_vm._e(),(scope.row.edit && item.input === 'select')?_c('el-select',{attrs:{"filterable":"","placeholder":'请选择' + item.label},on:{"change":function($event){return _vm.changeSelect(scope.row[item.prop], item.prop)}},model:{value:(scope.row[item.prop]),callback:function ($$v) {_vm.$set(scope.row, item.prop, $$v)},expression:"scope.row[item.prop]"}},[_c('el-option',{attrs:{"value":'',"label":"请选择"}}),_vm._l((_vm.dictIt(item.selectName)),function(dict){return _c('el-option',{key:dict.dictValue,attrs:{"label":dict.dictLabel,"value":dict.dictValue}})})],2):_vm._e(),(!scope.row.edit)?_c('span',[_vm._v(_vm._s(_vm.dictFormat(item.selectName, scope.row[item.prop])))]):_vm._e()]}}],null,true)})}),_c('el-table-column',{attrs:{"label":"操作","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(_vm.is_edit && scope.row.add == undefined)?_c('div',{staticStyle:{"display":"inline-block"}},[(!scope.row.edit)?_c('el-button',{staticStyle:{"margin-right":"5px"},attrs:{"size":"mini","type":"primary"},on:{"click":function($event){return _vm.handleEdit(scope.$index, scope.row)}}},[_vm._v("Edit")]):_vm._e(),(scope.row.edit)?_c('el-button',{staticStyle:{"margin-right":"5px"},attrs:{"size":"mini","type":"success","plain":true},on:{"click":function($event){return _vm.handleSave(scope.$index, scope.row)}}},[_vm._v("Save")]):_vm._e()],1):_vm._e(),(scope.row.add != undefined && scope.row.add)?_c('div',{staticStyle:{"display":"inline-block"}},[(scope.row.edit)?_c('el-button',{attrs:{"size":"mini","type":"success","plain":true},on:{"click":function($event){return _vm.handleSave(scope.$index, scope.row)}}},[_vm._v("Save")]):_vm._e()],1):_vm._e(),(_vm.is_delete && scope.row.add == undefined)?_c('el-button',{attrs:{"size":"mini","plain":true,"type":"danger"},on:{"click":function($event){return _vm.handleDeleteIt(scope.$index, scope.row)}}},[_vm._v("Delete")]):_vm._e()]}}])})],2)],1)],1)],1),_c('div',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.submitForm}},[_vm._v("确 定")]),_c('el-button',{on:{"click":_vm.cancel}},[_vm._v("取 消")])],1)],1)],1)}
var AddMutualvue_type_template_id_64a17aeb_staticRenderFns = []


// CONCATENATED MODULE: ./src/views/configuration/modules/AddMutual.vue?vue&type=template&id=64a17aeb&

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/configuration/modules/AddMutual.vue?vue&type=script&lang=js&









//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var AddMutualvue_type_script_lang_js_ = ({
  props: {
    save: {
      type: "Function",
      default: null
    }
  },
  data: function data() {
    return {
      topologyData: {},
      title: "",
      open: false,
      // 采集数据字典
      dataAcquisitionMode: [],
      shareTypeList: [],
      tags: [],
      table_columns: [{
        prop: "setter",
        label: "设置者tag",
        input: "selectTag",
        selectName: "selectTag"
      }, {
        prop: "settee",
        label: "被设置者tag",
        input: "selectTag",
        selectName: "selectTag"
      }, {
        prop: "dataAcquisitionMode",
        label: "获取方式",
        input: "select",
        selectName: "data_acquisition_mode"
      }, {
        prop: "condition",
        label: "条件",
        input: "textarea"
      }, {
        prop: "point",
        label: "点位/字段",
        input: "input"
      }, {
        prop: "shareType",
        label: "点位类型",
        input: "select",
        selectName: "share_type"
      }, {
        prop: "assignment",
        label: "赋值",
        input: "input"
      }],
      table_data: [],
      new_date_json: {},
      //数据结构
      is_edit: true,
      //是否可编辑
      is_delete: true //是否可删除

    };
  },
  methods: {
    changeSelect: function changeSelect(val, type) {
      if (type === "dataAcquisitionMode") {
        if (val < 2) {
          this.$message.warning("可以无需填写‘点位/字段’和‘赋值’");
        }
      }
    },
    submitForm: function submitForm() {
      var _this = this;

      return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
        var datas;
        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                datas = JSON.parse(_this.topologyData.data);
                datas.mutualList = _toConsumableArray(_this.table_data);
                _this.topologyData.data = datas;
                _context.next = 5;
                return save(Object.assign({}, _this.topologyData)).then(function (res) {
                  if (res.code === 200) {
                    _this.$message.success("配置成功");
                  }
                });

              case 5:
                _this.cancel();

                _this.$emit("ok");

              case 7:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }))();
    },
    //编辑
    handleEdit: function handleEdit(index, row) {
      row.edit = true;
    },
    //删除
    handleDeleteIt: function handleDeleteIt(index, row) {
      this.table_data.splice(index, 1);
      this.$message({
        message: "删除成功！",
        type: "success"
      });
    },
    //保存
    handleSave: function handleSave(index, row) {
      if (!row.setter) {
        this.$message.warning("请填写设置者tag");
        return;
      }

      if (!row.settee) {
        this.$message.warning("请填写被设置者tag");
        return;
      }

      if (row.settee === row.setter) {
        this.$message.warning("设置者tag与被设置者不能相同");
        return;
      }

      if (!row.condition) {
        this.$message.warning("请填写条件");
        return;
      }

      if (!row.dataAcquisitionMode) {
        this.$message.warning("请填写获取方式");
        return;
      } else {
        if (row.dataAcquisitionMode > 1) {
          if (!row.point) {
            this.$message.warning("请填写点位/字段");
            return;
          }

          if (!row.assignment) {
            this.$message.warning("请填写赋值");
            return;
          }
        }
      }

      row.edit = false;
      delete this.table_data[index].add;
      this.$message({
        message: "保存成功！",
        type: "success"
      });
    },
    handleAdd: function handleAdd() {
      var addDataJson = {};

      for (var key in this.new_date_json) {
        if (key === "edit") {
          delete addDataJson[key];
        } else if (key === "add") {
          delete addDataJson[key];
        } else {
          addDataJson[key] = "";
        }
      }

      addDataJson.edit = true;
      addDataJson.add = true;
      this.table_data.push(addDataJson);
    },
    dictIt: function dictIt(type) {
      if (type === "data_acquisition_mode") {
        return this.dataAcquisitionMode;
      }

      if (type === "share_type") {
        return this.shareTypeList;
      }

      return [];
    },
    dictFormat: function dictFormat(type, val) {
      if (type === "data_acquisition_mode") {
        return this.selectDictLabel(this.dataAcquisitionMode, val);
      }

      if (type === "share_type") {
        return this.selectDictLabel(this.shareTypeList, val);
      }

      return val;
    },
    init: function init(row) {
      var _this2 = this;

      this.title = "设置交互参数";
      this.topologyData = Object.assign({}, row);
      this.open = true;

      if (JSON.parse(row.data).mutualList) {
        this.initEditAttribute(JSON.parse(row.data).mutualList);
      } else {
        this.initEditAttribute([]);
      }

      var datas = Object.assign({}, JSON.parse(row.data));

      var _iterator = _createForOfIteratorHelper(datas.pens),
          _step;

      try {
        for (_iterator.s(); !(_step = _iterator.n()).done;) {
          var s = _step.value;

          if (s.tags.length > 0) {
            this.tags.push(s.tags[0]);
          }
        }
      } catch (err) {
        _iterator.e(err);
      } finally {
        _iterator.f();
      }

      this.getDicts("data_acquisition_mode").then(function (response) {
        _this2.dataAcquisitionMode = response.data;
      });
      this.getDicts("share_type").then(function (response) {
        _this2.shareTypeList = response.data;
      });
    },
    cancel: function cancel() {
      this.title = "";
      this.open = false;
      this.tags = [];
      this.table_data = [];
    },
    //初始化编辑属性
    initEditAttribute: function initEditAttribute(val) {
      var self = this;
      var edit = self.edit;

      var _val = _toArray(val),
          dataArray = _val.slice(0);

      if (dataArray.length > 0) {
        //添加编辑事件
        for (var index in dataArray) {
          dataArray[index]["edit"] = false;
          this.table_data.push(dataArray[index]);
        }

        if (Object.keys(this.new_date_json).length === 0) {
          //新增时，初始化数据结构
          this.initAddDataJson(dataArray[0]);
        }
      }
    },
    initAddDataJson: function initAddDataJson(dataArray) {
      //新增时，初始化数据结构
      var dataJson = dataArray;
      var newDateJson = {};

      for (var key in dataJson) {
        if (key === "edit") {
          newDateJson[key] = "true";
        } else {
          newDateJson[key] = "";
        }
      }

      newDateJson["add"] = true;
      this.new_date_json = newDateJson;
    }
  }
});
// CONCATENATED MODULE: ./src/views/configuration/modules/AddMutual.vue?vue&type=script&lang=js&
 /* harmony default export */ var modules_AddMutualvue_type_script_lang_js_ = (AddMutualvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./src/views/configuration/modules/AddMutual.vue





/* normalize component */

var AddMutual_component = normalizeComponent(
  modules_AddMutualvue_type_script_lang_js_,
  AddMutualvue_type_template_id_64a17aeb_render,
  AddMutualvue_type_template_id_64a17aeb_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var AddMutual = (AddMutual_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/configuration/ParamsConfig.vue?vue&type=script&lang=js&



//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var ParamsConfigvue_type_script_lang_js_ = ({
  name: "ParamsConfig",
  props: {
    list: {
      type: "Function",
      default: null
    },
    deleteTopology: {
      type: "Function",
      default: null
    },
    deleteTopologyHandle: {
      type: "Function",
      default: null
    },
    updateTopology: {
      type: "Function",
      default: null
    },
    save: {
      type: "Function",
      default: null
    }
  },
  components: {
    AddParams: AddParams,
    PreviewToImg: PreviewToImg,
    AddMutual: AddMutual
  },
  data: function data() {
    return {
      // 遮罩层
      loading: false,
      topologyList: [],
      // 总条数
      total: 0,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10
      }
    };
  },
  created: function created() {
    this.init();
  },
  methods: {
    splitName: function splitName(name) {
      if (name.length > 15) {
        return name.substr(0, 16) + "...";
      }

      return name;
    },
    handleSwitchItChange: function handleSwitchItChange(row) {
      var _this = this;

      var text = row.switchIt === "0" ? "隐藏" : "显示";
      this.$confirm('确认要"' + text + '""' + row.name + '"吗?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function () {
        var params = {};
        params.switchIt = row.switchIt;
        params.id = row.id;
        return updateTopology(params);
      }).then(function () {
        _this.msgSuccess(text + "成功");
      }).catch(function () {
        row.switchIt = row.switchIt === "0" ? "1" : "0";
      });
    },
    changeJson: function changeJson(data) {
      return JSON.parse(data);
    },
    previeData: function previeData(row) {
      this.$router.push({
        path: "/preview",
        query: {
          id: encryption(String(row.id))
        }
      });
    },
    init: function init() {
      var _this2 = this;

      return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
        return regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                _this2.loading = true;
                _context.next = 3;
                return list(_this2.queryParams).then(function (res) {
                  _this2.topologyList = res.rows;
                  _this2.total = res.total;
                });

              case 3:
                _this2.loading = false;

              case 4:
              case "end":
                return _context.stop();
            }
          }
        }, _callee);
      }))();
    },
    uploadTopology: function uploadTopology(row) {
      this.$router.push({
        path: "/workspace",
        query: {
          id: encryption(String(row.id))
        }
      });
    },
    addTopology: function addTopology() {
      this.$store.state.canvas.topologyData = {};
      this.$router.push({
        path: "/workspace"
      });
    },
    removeTopology: function removeTopology(id) {
      var _this3 = this;

      this.$confirm("确认要删除吗?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function () {
        deleteTopology(id).then(function (res) {
          if (res.code === 200) {
            _this3.$message.success("删除成功");

            _this3.init();
          }
        });
      });
    },
    removeTopologyHandle: function removeTopologyHandle(id) {
      var _this4 = this;

      this.$confirm("确认要删除原有配置吗?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function () {
        deleteTopologyHandle(id).then(function (res) {
          if (res.code === 200) {
            _this4.$message.success("删除原有配置成功");

            _this4.init();
          }
        });
      });
    },
    paramsSet: function paramsSet() {
      this.init();
    },

    /** 新增按钮操作 */
    handleAdd: function handleAdd(row) {
      var params = JSON.parse(row.data);

      if (!params.websocket && !params.mqttUrl) {
        this.$message.warning("未设置webscoket或mqttUrl");
        return;
      }

      this.$refs.addParams.update(row);
    },
    handleMutual: function handleMutual(row) {
      this.$refs.addMutual.init(row);
    },
    mutualSet: function mutualSet() {
      this.init();
    }
  }
});
// CONCATENATED MODULE: ./src/views/configuration/ParamsConfig.vue?vue&type=script&lang=js&
 /* harmony default export */ var configuration_ParamsConfigvue_type_script_lang_js_ = (ParamsConfigvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/views/configuration/ParamsConfig.vue?vue&type=style&index=0&lang=css&
var ParamsConfigvue_type_style_index_0_lang_css_ = __webpack_require__("eba8");

// CONCATENATED MODULE: ./src/views/configuration/ParamsConfig.vue






/* normalize component */

var ParamsConfig_component = normalizeComponent(
  configuration_ParamsConfigvue_type_script_lang_js_,
  ParamsConfigvue_type_template_id_57a5622f_render,
  ParamsConfigvue_type_template_id_57a5622f_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var ParamsConfig = (ParamsConfig_component.exports);
// CONCATENATED MODULE: ./package/index.js


//组件



 //方法






 // 定义组件列表

var componentsList = [Workspace, Preview, PreviewToImg, ParamsConfig];

var install = function install(Vue) {
  // 注册所有组件
  componentsList.map(function (component) {
    Vue.component(component.name, component);
  });
};

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue);
}


// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js




/***/ }),

/***/ "fb6a":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
var isObject = __webpack_require__("861d");
var isArray = __webpack_require__("e8b5");
var toAbsoluteIndex = __webpack_require__("23cb");
var toLength = __webpack_require__("50c4");
var toIndexedObject = __webpack_require__("fc6a");
var createProperty = __webpack_require__("8418");
var wellKnownSymbol = __webpack_require__("b622");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");

var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');

var SPECIES = wellKnownSymbol('species');
var nativeSlice = [].slice;
var max = Math.max;

// `Array.prototype.slice` method
// https://tc39.es/ecma262/#sec-array.prototype.slice
// fallback for not array-like ES3 strings and DOM objects
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  slice: function slice(start, end) {
    var O = toIndexedObject(this);
    var length = toLength(O.length);
    var k = toAbsoluteIndex(start, length);
    var fin = toAbsoluteIndex(end === undefined ? length : end, length);
    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
    var Constructor, result, n;
    if (isArray(O)) {
      Constructor = O.constructor;
      // cross-realm fallback
      if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
        Constructor = undefined;
      } else if (isObject(Constructor)) {
        Constructor = Constructor[SPECIES];
        if (Constructor === null) Constructor = undefined;
      }
      if (Constructor === Array || Constructor === undefined) {
        return nativeSlice.call(O, k, fin);
      }
    }
    result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
    result.length = n;
    return result;
  }
});


/***/ }),

/***/ "fc6a":
/***/ (function(module, exports, __webpack_require__) {

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__("44ad");
var requireObjectCoercible = __webpack_require__("1d80");

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ }),

/***/ "fdbc":
/***/ (function(module, exports) {

// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
  CSSRuleList: 0,
  CSSStyleDeclaration: 0,
  CSSValueList: 0,
  ClientRectList: 0,
  DOMRectList: 0,
  DOMStringList: 0,
  DOMTokenList: 1,
  DataTransferItemList: 0,
  FileList: 0,
  HTMLAllCollection: 0,
  HTMLCollection: 0,
  HTMLFormElement: 0,
  HTMLSelectElement: 0,
  MediaList: 0,
  MimeTypeArray: 0,
  NamedNodeMap: 0,
  NodeList: 1,
  PaintRequestList: 0,
  Plugin: 0,
  PluginArray: 0,
  SVGLengthList: 0,
  SVGNumberList: 0,
  SVGPathSegList: 0,
  SVGPointList: 0,
  SVGStringList: 0,
  SVGTransformList: 0,
  SourceBufferList: 0,
  StyleSheetList: 0,
  TextTrackCueList: 0,
  TextTrackList: 0,
  TouchList: 0
};


/***/ }),

/***/ "fdbf":
/***/ (function(module, exports, __webpack_require__) {

var NATIVE_SYMBOL = __webpack_require__("4930");

module.exports = NATIVE_SYMBOL
  /* global Symbol -- safe */
  && !Symbol.sham
  && typeof Symbol.iterator == 'symbol';


/***/ }),

/***/ "fea9":
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__("da84");

module.exports = global.Promise;


/***/ })

/******/ });
});