|
- (self["webpackChunk"] = self["webpackChunk"] || []).push([["canvg"],{
-
- /***/ "./node_modules/@amcharts/amcharts4/.internal/canvg/index.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@amcharts/amcharts4/.internal/canvg/index.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
- /* harmony export */ "AElement": () => (/* binding */ AElement),
- /* harmony export */ "AnimateColorElement": () => (/* binding */ AnimateColorElement),
- /* harmony export */ "AnimateElement": () => (/* binding */ AnimateElement),
- /* harmony export */ "AnimateTransformElement": () => (/* binding */ AnimateTransformElement),
- /* harmony export */ "BoundingBox": () => (/* binding */ BoundingBox),
- /* harmony export */ "CB1": () => (/* binding */ CB1),
- /* harmony export */ "CB2": () => (/* binding */ CB2),
- /* harmony export */ "CB3": () => (/* binding */ CB3),
- /* harmony export */ "CB4": () => (/* binding */ CB4),
- /* harmony export */ "Canvg": () => (/* binding */ Canvg),
- /* harmony export */ "CircleElement": () => (/* binding */ CircleElement),
- /* harmony export */ "ClipPathElement": () => (/* binding */ ClipPathElement),
- /* harmony export */ "DefsElement": () => (/* binding */ DefsElement),
- /* harmony export */ "DescElement": () => (/* binding */ DescElement),
- /* harmony export */ "Document": () => (/* binding */ Document),
- /* harmony export */ "Element": () => (/* binding */ Element),
- /* harmony export */ "EllipseElement": () => (/* binding */ EllipseElement),
- /* harmony export */ "FeColorMatrixElement": () => (/* binding */ FeColorMatrixElement),
- /* harmony export */ "FeCompositeElement": () => (/* binding */ FeCompositeElement),
- /* harmony export */ "FeDropShadowElement": () => (/* binding */ FeDropShadowElement),
- /* harmony export */ "FeGaussianBlurElement": () => (/* binding */ FeGaussianBlurElement),
- /* harmony export */ "FeMorphologyElement": () => (/* binding */ FeMorphologyElement),
- /* harmony export */ "FilterElement": () => (/* binding */ FilterElement),
- /* harmony export */ "Font": () => (/* binding */ Font),
- /* harmony export */ "FontElement": () => (/* binding */ FontElement),
- /* harmony export */ "FontFaceElement": () => (/* binding */ FontFaceElement),
- /* harmony export */ "GElement": () => (/* binding */ GElement),
- /* harmony export */ "GlyphElement": () => (/* binding */ GlyphElement),
- /* harmony export */ "GradientElement": () => (/* binding */ GradientElement),
- /* harmony export */ "ImageElement": () => (/* binding */ ImageElement),
- /* harmony export */ "LineElement": () => (/* binding */ LineElement),
- /* harmony export */ "LinearGradientElement": () => (/* binding */ LinearGradientElement),
- /* harmony export */ "MarkerElement": () => (/* binding */ MarkerElement),
- /* harmony export */ "MaskElement": () => (/* binding */ MaskElement),
- /* harmony export */ "Matrix": () => (/* binding */ Matrix),
- /* harmony export */ "MissingGlyphElement": () => (/* binding */ MissingGlyphElement),
- /* harmony export */ "Mouse": () => (/* binding */ Mouse),
- /* harmony export */ "PSEUDO_ZERO": () => (/* binding */ PSEUDO_ZERO),
- /* harmony export */ "Parser": () => (/* binding */ Parser),
- /* harmony export */ "PathElement": () => (/* binding */ PathElement),
- /* harmony export */ "PathParser": () => (/* binding */ PathParser),
- /* harmony export */ "PatternElement": () => (/* binding */ PatternElement),
- /* harmony export */ "Point": () => (/* binding */ Point),
- /* harmony export */ "PolygonElement": () => (/* binding */ PolygonElement),
- /* harmony export */ "PolylineElement": () => (/* binding */ PolylineElement),
- /* harmony export */ "Property": () => (/* binding */ Property),
- /* harmony export */ "QB1": () => (/* binding */ QB1),
- /* harmony export */ "QB2": () => (/* binding */ QB2),
- /* harmony export */ "QB3": () => (/* binding */ QB3),
- /* harmony export */ "RadialGradientElement": () => (/* binding */ RadialGradientElement),
- /* harmony export */ "RectElement": () => (/* binding */ RectElement),
- /* harmony export */ "RenderedElement": () => (/* binding */ RenderedElement),
- /* harmony export */ "Rotate": () => (/* binding */ Rotate),
- /* harmony export */ "SVGElement": () => (/* binding */ SVGElement),
- /* harmony export */ "SVGFontLoader": () => (/* binding */ SVGFontLoader),
- /* harmony export */ "Scale": () => (/* binding */ Scale),
- /* harmony export */ "Screen": () => (/* binding */ Screen),
- /* harmony export */ "Skew": () => (/* binding */ Skew),
- /* harmony export */ "SkewX": () => (/* binding */ SkewX),
- /* harmony export */ "SkewY": () => (/* binding */ SkewY),
- /* harmony export */ "StopElement": () => (/* binding */ StopElement),
- /* harmony export */ "StyleElement": () => (/* binding */ StyleElement),
- /* harmony export */ "SymbolElement": () => (/* binding */ SymbolElement),
- /* harmony export */ "TRefElement": () => (/* binding */ TRefElement),
- /* harmony export */ "TSpanElement": () => (/* binding */ TSpanElement),
- /* harmony export */ "TextElement": () => (/* binding */ TextElement),
- /* harmony export */ "TextPathElement": () => (/* binding */ TextPathElement),
- /* harmony export */ "TitleElement": () => (/* binding */ TitleElement),
- /* harmony export */ "Transform": () => (/* binding */ Transform),
- /* harmony export */ "Translate": () => (/* binding */ Translate),
- /* harmony export */ "UnknownElement": () => (/* binding */ UnknownElement),
- /* harmony export */ "UseElement": () => (/* binding */ UseElement),
- /* harmony export */ "ViewPort": () => (/* binding */ ViewPort),
- /* harmony export */ "compressSpaces": () => (/* binding */ compressSpaces),
- /* harmony export */ "getSelectorSpecificity": () => (/* binding */ getSelectorSpecificity),
- /* harmony export */ "normalizeAttributeName": () => (/* binding */ normalizeAttributeName),
- /* harmony export */ "normalizeColor": () => (/* binding */ normalizeColor),
- /* harmony export */ "parseExternalUrl": () => (/* binding */ parseExternalUrl),
- /* harmony export */ "presets": () => (/* binding */ index),
- /* harmony export */ "toNumbers": () => (/* binding */ toNumbers),
- /* harmony export */ "trimLeft": () => (/* binding */ trimLeft),
- /* harmony export */ "trimRight": () => (/* binding */ trimRight),
- /* harmony export */ "vectorMagnitude": () => (/* binding */ vectorMagnitude),
- /* harmony export */ "vectorsAngle": () => (/* binding */ vectorsAngle),
- /* harmony export */ "vectorsRatio": () => (/* binding */ vectorsRatio)
- /* harmony export */ });
- /* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.map */ "./node_modules/core-js/modules/es.array.map.js");
- /* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec */ "./node_modules/core-js/modules/es.regexp.exec.js");
- /* harmony import */ var core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.match */ "./node_modules/core-js/modules/es.string.match.js");
- /* harmony import */ var core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.string.replace */ "./node_modules/core-js/modules/es.string.replace.js");
- /* harmony import */ var core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.string.starts-with */ "./node_modules/core-js/modules/es.string.starts-with.js");
- /* harmony import */ var core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with__WEBPACK_IMPORTED_MODULE_4__);
- /* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.join */ "./node_modules/core-js/modules/es.array.join.js");
- /* harmony import */ var core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join__WEBPACK_IMPORTED_MODULE_5__);
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
- /* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol */ "./node_modules/core-js/modules/es.symbol.js");
- /* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_7__);
- /* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.filter */ "./node_modules/core-js/modules/es.array.filter.js");
- /* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_8__);
- /* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.for-each */ "./node_modules/core-js/modules/es.array.for-each.js");
- /* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_9__);
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_10__);
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
- /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_11__);
- /* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.keys */ "./node_modules/core-js/modules/es.object.keys.js");
- /* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_12__);
- /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
- /* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13__);
- /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
- /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__);
- /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
- /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
- /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
- /* harmony import */ var core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.array.concat */ "./node_modules/core-js/modules/es.array.concat.js");
- /* harmony import */ var core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat__WEBPACK_IMPORTED_MODULE_19__);
- /* harmony import */ var core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.every */ "./node_modules/core-js/modules/es.array.every.js");
- /* harmony import */ var core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_every__WEBPACK_IMPORTED_MODULE_20__);
- /* harmony import */ var core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.reduce */ "./node_modules/core-js/modules/es.array.reduce.js");
- /* harmony import */ var core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce__WEBPACK_IMPORTED_MODULE_21__);
- /* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.to-string */ "./node_modules/core-js/modules/es.object.to-string.js");
- /* harmony import */ var core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string__WEBPACK_IMPORTED_MODULE_22__);
- /* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.promise */ "./node_modules/core-js/modules/es.promise.js");
- /* harmony import */ var core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise__WEBPACK_IMPORTED_MODULE_23__);
- /* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.string.split */ "./node_modules/core-js/modules/es.string.split.js");
- /* harmony import */ var core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split__WEBPACK_IMPORTED_MODULE_24__);
- /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js");
- /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_25__);
- /* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.function.name */ "./node_modules/core-js/modules/es.function.name.js");
- /* harmony import */ var core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name__WEBPACK_IMPORTED_MODULE_26__);
- /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! rgbcolor */ "./node_modules/rgbcolor/index.js");
- /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(rgbcolor__WEBPACK_IMPORTED_MODULE_27__);
- /* harmony import */ var core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.reflect.construct */ "./node_modules/core-js/modules/es.reflect.construct.js");
- /* harmony import */ var core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct__WEBPACK_IMPORTED_MODULE_28__);
- /* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string */ "./node_modules/core-js/modules/es.regexp.to-string.js");
- /* harmony import */ var core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string__WEBPACK_IMPORTED_MODULE_29__);
- /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
- /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
- /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");
- /* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! core-js/modules/es.array.from */ "./node_modules/core-js/modules/es.array.from.js");
- /* harmony import */ var core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from__WEBPACK_IMPORTED_MODULE_33__);
- /* harmony import */ var core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! core-js/modules/es.array.includes */ "./node_modules/core-js/modules/es.array.includes.js");
- /* harmony import */ var core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes__WEBPACK_IMPORTED_MODULE_34__);
- /* harmony import */ var core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! core-js/modules/es.array.some */ "./node_modules/core-js/modules/es.array.some.js");
- /* harmony import */ var core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some__WEBPACK_IMPORTED_MODULE_35__);
- /* harmony import */ var core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! core-js/modules/es.string.includes */ "./node_modules/core-js/modules/es.string.includes.js");
- /* harmony import */ var core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes__WEBPACK_IMPORTED_MODULE_36__);
- /* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! core-js/modules/es.string.iterator */ "./node_modules/core-js/modules/es.string.iterator.js");
- /* harmony import */ var core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator__WEBPACK_IMPORTED_MODULE_37__);
- /* harmony import */ var core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! core-js/modules/es.string.trim */ "./node_modules/core-js/modules/es.string.trim.js");
- /* harmony import */ var core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_trim__WEBPACK_IMPORTED_MODULE_38__);
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
- /* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! core-js/modules/es.array.index-of */ "./node_modules/core-js/modules/es.array.index-of.js");
- /* harmony import */ var core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of__WEBPACK_IMPORTED_MODULE_40__);
- /* harmony import */ var core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! core-js/modules/es.array.reverse */ "./node_modules/core-js/modules/es.array.reverse.js");
- /* harmony import */ var core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reverse__WEBPACK_IMPORTED_MODULE_41__);
- /* harmony import */ var _babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @babel/runtime/helpers/get */ "./node_modules/@babel/runtime/helpers/esm/get.js");
- /* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! core-js/modules/es.number.constructor */ "./node_modules/core-js/modules/es.number.constructor.js");
- /* harmony import */ var core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor__WEBPACK_IMPORTED_MODULE_43__);
- /* harmony import */ var core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! core-js/modules/es.array.fill */ "./node_modules/core-js/modules/es.array.fill.js");
- /* harmony import */ var core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_fill__WEBPACK_IMPORTED_MODULE_44__);
- /* harmony import */ var core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! core-js/modules/es.reflect.delete-property */ "./node_modules/core-js/modules/es.reflect.delete-property.js");
- /* harmony import */ var core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_delete_property__WEBPACK_IMPORTED_MODULE_45__);
- /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
- /* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! core-js/modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
- /* harmony import */ var core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator__WEBPACK_IMPORTED_MODULE_47__);
- /* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
- /* harmony import */ var core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator__WEBPACK_IMPORTED_MODULE_48__);
- /* harmony import */ var core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! core-js/modules/es.symbol.description */ "./node_modules/core-js/modules/es.symbol.description.js");
- /* harmony import */ var core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description__WEBPACK_IMPORTED_MODULE_49__);
- /* harmony import */ var core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator */ "./node_modules/core-js/modules/es.symbol.iterator.js");
- /* harmony import */ var core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator__WEBPACK_IMPORTED_MODULE_50__);
- /* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! core-js/modules/es.array.slice */ "./node_modules/core-js/modules/es.array.slice.js");
- /* harmony import */ var core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice__WEBPACK_IMPORTED_MODULE_51__);
- /* harmony import */ var core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! core-js/modules/es.map */ "./node_modules/core-js/modules/es.map.js");
- /* harmony import */ var core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map__WEBPACK_IMPORTED_MODULE_52__);
- /* harmony import */ var core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! core-js/modules/es.reflect.apply */ "./node_modules/core-js/modules/es.reflect.apply.js");
- /* harmony import */ var core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_apply__WEBPACK_IMPORTED_MODULE_53__);
- /* harmony import */ var core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! core-js/modules/es.reflect.get-prototype-of */ "./node_modules/core-js/modules/es.reflect.get-prototype-of.js");
- /* harmony import */ var core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_prototype_of__WEBPACK_IMPORTED_MODULE_54__);
- /* harmony import */ var stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! stackblur-canvas */ "./node_modules/stackblur-canvas/dist/stackblur-es.js");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /**
- * HTML-safe compress white-spaces.
- * @param str - String to compress.
- */
- function compressSpaces(str) {
- return str.replace(/(?!\u3000)\s+/gm, ' ');
- }
- /**
- * HTML-safe left trim.
- * @param str - String to trim.
- */
-
- function trimLeft(str) {
- return str.replace(/^[\n \t]+/, '');
- }
- /**
- * HTML-safe right trim.
- * @param str - String to trim.
- */
-
- function trimRight(str) {
- return str.replace(/[\n \t]+$/, '');
- }
- /**
- * String to numbers array.
- * @param str - Numbers string.
- */
-
- function toNumbers(str) {
- var matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
- return matches.map(parseFloat);
- } // Microsoft Edge fix
-
- var allUppercase = /^[A-Z-]+$/;
- /**
- * Normalize attribute name.
- * @param name - Attribute name.
- */
-
- function normalizeAttributeName(name) {
- if (allUppercase.test(name)) {
- return name.toLowerCase();
- }
-
- return name;
- }
- /**
- * Parse external URL.
- * @param url - CSS url string.
- */
-
- function parseExternalUrl(url) {
- // single quotes [2]
- // v double quotes [3]
- // v v no quotes [4]
- // v v v
- var urlMatch = url.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/) || [];
- return urlMatch[2] || urlMatch[3] || urlMatch[4];
- }
- /**
- * Transform floats to integers in rgb colors.
- * @param color - Color to normalize.
- */
-
- function normalizeColor(color) {
- if (!color.startsWith('rgb')) {
- return color;
- }
-
- var rgbParts = 3;
- var normalizedColor = color.replace(/\d+(\.\d+)?/g, function (num, isFloat) {
- return rgbParts-- && isFloat ? String(Math.round(parseFloat(num))) : num;
- });
- return normalizedColor;
- }
-
- // slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
- var attributeRegex = /(\[[^\]]+\])/g;
- var idRegex = /(#[^\s\+>~\.\[:]+)/g;
- var classRegex = /(\.[^\s\+>~\.\[:]+)/g;
- var pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi;
- var pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi;
- var pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g;
- var elementRegex = /([^\s\+>~\.\[:]+)/g;
-
- function findSelectorMatch(selector, regex) {
- var matches = selector.match(regex);
-
- if (!matches) {
- return [selector, 0];
- }
-
- return [selector.replace(regex, ' '), matches.length];
- }
- /**
- * Measure selector specificity.
- * @param selector - Selector to measure.
- */
-
-
- function getSelectorSpecificity(selector) {
- var specificity = [0, 0, 0];
- var currentSelector = selector.replace(/:not\(([^\)]*)\)/g, ' $1 ').replace(/{[\s\S]*/gm, ' ');
- var delta = 0;
-
- var _findSelectorMatch = findSelectorMatch(currentSelector, attributeRegex);
-
- var _findSelectorMatch2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch, 2);
-
- currentSelector = _findSelectorMatch2[0];
- delta = _findSelectorMatch2[1];
- specificity[1] += delta;
-
- var _findSelectorMatch3 = findSelectorMatch(currentSelector, idRegex);
-
- var _findSelectorMatch4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch3, 2);
-
- currentSelector = _findSelectorMatch4[0];
- delta = _findSelectorMatch4[1];
- specificity[0] += delta;
-
- var _findSelectorMatch5 = findSelectorMatch(currentSelector, classRegex);
-
- var _findSelectorMatch6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch5, 2);
-
- currentSelector = _findSelectorMatch6[0];
- delta = _findSelectorMatch6[1];
- specificity[1] += delta;
-
- var _findSelectorMatch7 = findSelectorMatch(currentSelector, pseudoElementRegex);
-
- var _findSelectorMatch8 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch7, 2);
-
- currentSelector = _findSelectorMatch8[0];
- delta = _findSelectorMatch8[1];
- specificity[2] += delta;
-
- var _findSelectorMatch9 = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
-
- var _findSelectorMatch10 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch9, 2);
-
- currentSelector = _findSelectorMatch10[0];
- delta = _findSelectorMatch10[1];
- specificity[1] += delta;
-
- var _findSelectorMatch11 = findSelectorMatch(currentSelector, pseudoClassRegex);
-
- var _findSelectorMatch12 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch11, 2);
-
- currentSelector = _findSelectorMatch12[0];
- delta = _findSelectorMatch12[1];
- specificity[1] += delta;
- currentSelector = currentSelector.replace(/[\*\s\+>~]/g, ' ').replace(/[#\.]/g, ' ');
-
- var _findSelectorMatch13 = findSelectorMatch(currentSelector, elementRegex);
-
- var _findSelectorMatch14 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch13, 2);
-
- currentSelector = _findSelectorMatch14[0];
- delta = _findSelectorMatch14[1];
- // lgtm [js/useless-assignment-to-local]
- specificity[2] += delta;
- return specificity.join('');
- }
-
- var PSEUDO_ZERO = .00000001;
- /**
- * Vector magnitude.
- */
-
- function vectorMagnitude(v) {
- return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
- }
- /**
- * Ratio between two vectors.
- */
-
- function vectorsRatio(u, v) {
- return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
- }
- /**
- * Angle between two vectors.
- */
-
- function vectorsAngle(u, v) {
- return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
- }
- function CB1(t) {
- return t * t * t;
- }
- function CB2(t) {
- return 3 * t * t * (1 - t);
- }
- function CB3(t) {
- return 3 * t * (1 - t) * (1 - t);
- }
- function CB4(t) {
- return (1 - t) * (1 - t) * (1 - t);
- }
- function QB1(t) {
- return t * t;
- }
- function QB2(t) {
- return 2 * t * (1 - t);
- }
- function QB3(t) {
- return (1 - t) * (1 - t);
- }
-
- function createCommonjsModule(fn, module) {
- return module = { exports: {} }, fn(module, module.exports), module.exports;
- }
-
- var runtime_1 = createCommonjsModule(function (module) {
- /**
- * 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.
- */
- var runtime = function (exports) {
-
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined$1; // 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";
-
- 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;
- }
-
- exports.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);
- };
- });
- }
-
- exports.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;
- };
-
- exports.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.
-
-
- exports.awrap = function (arg) {
- return {
- __await: arg
- };
- };
-
- function AsyncIterator(generator, PromiseImpl) {
- 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 PromiseImpl.resolve(value.__await).then(function (value) {
- invoke("next", value, resolve, reject);
- }, function (err) {
- invoke("throw", err, resolve, reject);
- });
- }
-
- return PromiseImpl.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.
- result.value = unwrapped;
- resolve(result);
- }, function (error) {
- // If a rejected Promise was yielded, throw the rejection back
- // into the async generator function so it can be handled there.
- return invoke("throw", error, resolve, reject);
- });
- }
- }
-
- var previousPromise;
-
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new PromiseImpl(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;
- };
-
- exports.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.
-
- exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
- if (PromiseImpl === void 0) PromiseImpl = Promise;
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
- return exports.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$1) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
-
- if (context.method === "throw") {
- // Note: ["return"] must be used for ES3 parsing compatibility.
- 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$1;
- 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$1;
- }
- } 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);
- }
-
- exports.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$1;
- next.done = true;
- return next;
- };
-
- return next.next = next;
- }
- } // Return an iterator with no values.
-
-
- return {
- next: doneResult
- };
- }
-
- exports.values = values;
-
- function doneResult() {
- return {
- value: undefined$1,
- 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$1;
- this.done = false;
- this.delegate = null;
- this.method = "next";
- this.arg = undefined$1;
- 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$1;
- }
- }
- }
- },
- 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$1;
- }
-
- 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$1;
- }
-
- return ContinueSentinel;
- }
- }; // Regardless of whether this script is executing as a CommonJS module
- // or not, return the runtime object so that we can declare the variable
- // regeneratorRuntime in the outer scope, which allows this module to be
- // injected easily by `bin/regenerator --include-runtime script.js`.
-
- return exports;
- }( // If this script is executing as a CommonJS module, use module.exports
- // as the regeneratorRuntime namespace. Otherwise create a new empty
- // object. Either way, the resulting object will be used to initialize
- // the regeneratorRuntime variable at the top of this file.
- module.exports );
-
- try {
- regeneratorRuntime = runtime;
- } catch (accidentalStrictMode) {
- // This module should not be running in strict mode, so the above
- // assignment should always work unless something is misconfigured. Just
- // in case runtime.js accidentally runs in strict mode, we can escape
- // strict mode using a global Function call. This could conceivably fail
- // if a Content Security Policy forbids using Function, but in that case
- // the proper solution is to fix the accidental strict mode problem. If
- // you've misconfigured your bundler to force strict mode and applied a
- // CSP to forbid Function, and you're not willing to fix either of those
- // problems, please detail your unique predicament in a GitHub issue.
- Function("r", "regeneratorRuntime = r")(runtime);
- }
- });
-
- var Property = /*#__PURE__*/function () {
- function Property(document, name, value) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Property);
-
- this.document = document;
- this.name = name;
- this.value = value;
- this.isNormalizedColor = false;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Property, [{
- key: "hasValue",
- value: function hasValue() {
- var value = this.value;
- return value !== null && value !== '' && value !== 0 && typeof value !== 'undefined';
- }
- }, {
- key: "isString",
- value: function isString(regexp) {
- var value = this.value;
- var result = typeof value === 'string';
-
- if (!result || !regexp) {
- return result;
- }
-
- return regexp.test(value);
- }
- }, {
- key: "isUrlDefinition",
- value: function isUrlDefinition() {
- return this.isString(/^url\(/);
- }
- }, {
- key: "isPixels",
- value: function isPixels() {
- if (!this.hasValue()) {
- return false;
- }
-
- var asString = this.getString();
-
- switch (true) {
- case /px$/.test(asString):
- case /^[0-9]+$/.test(asString):
- return true;
-
- default:
- return false;
- }
- }
- }, {
- key: "setValue",
- value: function setValue(value) {
- this.value = value;
- return this;
- }
- }, {
- key: "getValue",
- value: function getValue(def) {
- if (typeof def === 'undefined' || this.hasValue()) {
- return this.value;
- }
-
- return def;
- }
- }, {
- key: "getNumber",
- value: function getNumber(def) {
- if (!this.hasValue()) {
- if (typeof def === 'undefined') {
- return 0;
- }
-
- return parseFloat(def);
- }
-
- var value = this.value;
- var n = parseFloat(value);
-
- if (this.isString(/%$/)) {
- n = n / 100.0;
- }
-
- return n;
- }
- }, {
- key: "getString",
- value: function getString(def) {
- if (typeof def === 'undefined' || this.hasValue()) {
- return typeof this.value === 'undefined' ? '' : String(this.value);
- }
-
- return String(def);
- }
- }, {
- key: "getColor",
- value: function getColor(def) {
- var color = this.getString(def);
-
- if (this.isNormalizedColor) {
- return color;
- }
-
- this.isNormalizedColor = true;
- color = normalizeColor(color);
- this.value = color;
- return color;
- }
- }, {
- key: "getDpi",
- value: function getDpi() {
- return 96.0; // TODO: compute?
- }
- }, {
- key: "getRem",
- value: function getRem() {
- return this.document.rootEmSize;
- }
- }, {
- key: "getEm",
- value: function getEm() {
- return this.document.emSize;
- }
- }, {
- key: "getUnits",
- value: function getUnits() {
- return this.getString().replace(/[0-9\.\-]/g, '');
- }
- }, {
- key: "getPixels",
- value: function getPixels(axisOrIsFontSize) {
- var processPercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- if (!this.hasValue()) {
- return 0;
- }
-
- var _ref = typeof axisOrIsFontSize === 'boolean' ? [undefined, axisOrIsFontSize] : [axisOrIsFontSize],
- _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
- axis = _ref2[0],
- isFontSize = _ref2[1];
-
- var viewPort = this.document.screen.viewPort;
-
- switch (true) {
- case this.isString(/vmin$/):
- return this.getNumber() / 100.0 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
-
- case this.isString(/vmax$/):
- return this.getNumber() / 100.0 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
-
- case this.isString(/vw$/):
- return this.getNumber() / 100.0 * viewPort.computeSize('x');
-
- case this.isString(/vh$/):
- return this.getNumber() / 100.0 * viewPort.computeSize('y');
-
- case this.isString(/rem$/):
- return this.getNumber() * this.getRem();
-
- case this.isString(/em$/):
- return this.getNumber() * this.getEm();
-
- case this.isString(/ex$/):
- return this.getNumber() * this.getEm() / 2.0;
-
- case this.isString(/px$/):
- return this.getNumber();
-
- case this.isString(/pt$/):
- return this.getNumber() * this.getDpi() * (1.0 / 72.0);
-
- case this.isString(/pc$/):
- return this.getNumber() * 15;
-
- case this.isString(/cm$/):
- return this.getNumber() * this.getDpi() / 2.54;
-
- case this.isString(/mm$/):
- return this.getNumber() * this.getDpi() / 25.4;
-
- case this.isString(/in$/):
- return this.getNumber() * this.getDpi();
-
- case this.isString(/%$/) && isFontSize:
- return this.getNumber() * this.getEm();
-
- case this.isString(/%$/):
- return this.getNumber() * viewPort.computeSize(axis);
-
- default:
- {
- var n = this.getNumber();
-
- if (processPercent && n < 1.0) {
- return n * viewPort.computeSize(axis);
- }
-
- return n;
- }
- }
- }
- }, {
- key: "getMilliseconds",
- value: function getMilliseconds() {
- if (!this.hasValue()) {
- return 0;
- }
-
- if (this.isString(/ms$/)) {
- return this.getNumber();
- }
-
- return this.getNumber() * 1000;
- }
- }, {
- key: "getRadians",
- value: function getRadians() {
- if (!this.hasValue()) {
- return 0;
- }
-
- switch (true) {
- case this.isString(/deg$/):
- return this.getNumber() * (Math.PI / 180.0);
-
- case this.isString(/grad$/):
- return this.getNumber() * (Math.PI / 200.0);
-
- case this.isString(/rad$/):
- return this.getNumber();
-
- default:
- return this.getNumber() * (Math.PI / 180.0);
- }
- }
- }, {
- key: "getDefinition",
- value: function getDefinition() {
- var asString = this.getString();
- var name = asString.match(/#([^\)'"]+)/);
-
- if (name) {
- name = name[1];
- }
-
- if (!name) {
- name = asString;
- }
-
- return this.document.definitions[name];
- }
- }, {
- key: "getFillStyleDefinition",
- value: function getFillStyleDefinition(element, opacity) {
- var def = this.getDefinition();
-
- if (!def) {
- return null;
- } // gradient
-
-
- if (typeof def.createGradient === 'function') {
- return def.createGradient(this.document.ctx, element, opacity);
- } // pattern
-
-
- if (typeof def.createPattern === 'function') {
- if (def.getHrefAttribute().hasValue()) {
- var patternTransform = def.getAttribute('patternTransform');
- def = def.getHrefAttribute().getDefinition();
-
- if (patternTransform.hasValue()) {
- def.getAttribute('patternTransform', true).setValue(patternTransform.value);
- }
- }
-
- return def.createPattern(this.document.ctx, element, opacity);
- }
-
- return null;
- }
- }, {
- key: "getTextBaseline",
- value: function getTextBaseline() {
- if (!this.hasValue()) {
- return null;
- }
-
- return Property.textBaselineMapping[this.getString()];
- }
- }, {
- key: "addOpacity",
- value: function addOpacity(opacity) {
- var value = this.getColor();
- var len = value.length;
- var commas = 0; // Simulate old RGBColor version, which can't parse rgba.
-
- for (var i = 0; i < len; i++) {
- if (value[i] === ',') {
- commas++;
- }
-
- if (commas === 3) {
- break;
- }
- }
-
- if (opacity.hasValue() && this.isString() && commas !== 3) {
- var color = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(value);
-
- if (color.ok) {
- color.alpha = opacity.getNumber();
- value = color.toRGBA();
- }
- }
-
- return new Property(this.document, this.name, value);
- }
- }], [{
- key: "empty",
- value: function empty(document) {
- return new Property(document, 'EMPTY', '');
- }
- }]);
-
- return Property;
- }();
- Property.textBaselineMapping = {
- 'baseline': 'alphabetic',
- 'before-edge': 'top',
- 'text-before-edge': 'top',
- 'middle': 'middle',
- 'central': 'middle',
- 'after-edge': 'bottom',
- 'text-after-edge': 'bottom',
- 'ideographic': 'ideographic',
- 'alphabetic': 'alphabetic',
- 'hanging': 'hanging',
- 'mathematical': 'alphabetic'
- };
-
- var ViewPort = /*#__PURE__*/function () {
- function ViewPort() {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ViewPort);
-
- this.viewPorts = [];
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ViewPort, [{
- key: "clear",
- value: function clear() {
- this.viewPorts = [];
- }
- }, {
- key: "setCurrent",
- value: function setCurrent(width, height) {
- this.viewPorts.push({
- width: width,
- height: height
- });
- }
- }, {
- key: "removeCurrent",
- value: function removeCurrent() {
- this.viewPorts.pop();
- }
- }, {
- key: "getCurrent",
- value: function getCurrent() {
- var viewPorts = this.viewPorts;
- return viewPorts[viewPorts.length - 1];
- }
- }, {
- key: "computeSize",
- value: function computeSize(d) {
- if (typeof d === 'number') {
- return d;
- }
-
- if (d === 'x') {
- return this.width;
- }
-
- if (d === 'y') {
- return this.height;
- }
-
- return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
- }
- }, {
- key: "width",
- get: function get() {
- return this.getCurrent().width;
- }
- }, {
- key: "height",
- get: function get() {
- return this.getCurrent().height;
- }
- }]);
-
- return ViewPort;
- }();
-
- var Point = /*#__PURE__*/function () {
- function Point(x, y) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Point);
-
- this.x = x;
- this.y = y;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Point, [{
- key: "angleTo",
- value: function angleTo(point) {
- return Math.atan2(point.y - this.y, point.x - this.x);
- }
- }, {
- key: "applyTransform",
- value: function applyTransform(transform) {
- var x = this.x,
- y = this.y;
- var xp = x * transform[0] + y * transform[2] + transform[4];
- var yp = x * transform[1] + y * transform[3] + transform[5];
- this.x = xp;
- this.y = yp;
- }
- }], [{
- key: "parse",
- value: function parse(point) {
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
-
- var _toNumbers = toNumbers(point),
- _toNumbers2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers, 2),
- _toNumbers2$ = _toNumbers2[0],
- x = _toNumbers2$ === void 0 ? defaultValue : _toNumbers2$,
- _toNumbers2$2 = _toNumbers2[1],
- y = _toNumbers2$2 === void 0 ? defaultValue : _toNumbers2$2;
-
- return new Point(x, y);
- }
- }, {
- key: "parseScale",
- value: function parseScale(scale) {
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
-
- var _toNumbers3 = toNumbers(scale),
- _toNumbers4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers3, 2),
- _toNumbers4$ = _toNumbers4[0],
- x = _toNumbers4$ === void 0 ? defaultValue : _toNumbers4$,
- _toNumbers4$2 = _toNumbers4[1],
- y = _toNumbers4$2 === void 0 ? x : _toNumbers4$2;
-
- return new Point(x, y);
- }
- }, {
- key: "parsePath",
- value: function parsePath(path) {
- var points = toNumbers(path);
- var len = points.length;
- var pathPoints = [];
-
- for (var i = 0; i < len; i += 2) {
- pathPoints.push(new Point(points[i], points[i + 1]));
- }
-
- return pathPoints;
- }
- }]);
-
- return Point;
- }();
-
- var Mouse = /*#__PURE__*/function () {
- function Mouse(screen) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Mouse);
-
- this.screen = screen;
- this.working = false;
- this.events = [];
- this.eventElements = [];
- this.onClick = this.onClick.bind(this);
- this.onMouseMove = this.onMouseMove.bind(this);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Mouse, [{
- key: "isWorking",
- value: function isWorking() {
- return this.working;
- }
- }, {
- key: "start",
- value: function start() {
- if (this.working) {
- return;
- }
-
- var screen = this.screen,
- onClick = this.onClick,
- onMouseMove = this.onMouseMove;
- var canvas = screen.ctx.canvas;
- canvas.onclick = onClick;
- canvas.onmousemove = onMouseMove;
- this.working = true;
- }
- }, {
- key: "stop",
- value: function stop() {
- if (!this.working) {
- return;
- }
-
- var canvas = this.screen.ctx.canvas;
- this.working = false;
- canvas.onclick = null;
- canvas.onmousemove = null;
- }
- }, {
- key: "hasEvents",
- value: function hasEvents() {
- return this.working && this.events.length > 0;
- }
- }, {
- key: "runEvents",
- value: function runEvents() {
- if (!this.working) {
- return;
- }
-
- var document = this.screen,
- events = this.events,
- eventElements = this.eventElements;
- var style = document.ctx.canvas.style;
-
- if (style) {
- style.cursor = '';
- }
-
- events.forEach(function (_ref, i) {
- var run = _ref.run;
- var element = eventElements[i];
-
- while (element) {
- run(element);
- element = element.parent;
- }
- }); // done running, clear
-
- this.events = [];
- this.eventElements = [];
- }
- }, {
- key: "checkPath",
- value: function checkPath(element, ctx) {
- if (!this.working || !ctx) {
- return;
- }
-
- var events = this.events,
- eventElements = this.eventElements;
- events.forEach(function (_ref2, i) {
- var x = _ref2.x,
- y = _ref2.y;
-
- if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
- eventElements[i] = element;
- }
- });
- }
- }, {
- key: "checkBoundingBox",
- value: function checkBoundingBox(element, boundingBox) {
- if (!this.working || !boundingBox) {
- return;
- }
-
- var events = this.events,
- eventElements = this.eventElements;
- events.forEach(function (_ref3, i) {
- var x = _ref3.x,
- y = _ref3.y;
-
- if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
- eventElements[i] = element;
- }
- });
- }
- }, {
- key: "mapXY",
- value: function mapXY(x, y) {
- var _this$screen = this.screen,
- window = _this$screen.window,
- ctx = _this$screen.ctx;
- var point = new Point(x, y);
- var element = ctx.canvas;
-
- while (element) {
- point.x -= element.offsetLeft;
- point.y -= element.offsetTop;
- element = element.offsetParent;
- }
-
- if (window.scrollX) {
- point.x += window.scrollX;
- }
-
- if (window.scrollY) {
- point.y += window.scrollY;
- }
-
- return point;
- }
- }, {
- key: "onClick",
- value: function onClick(evt) {
- var _this$mapXY = this.mapXY((evt || event).clientX, (evt || event).clientY),
- x = _this$mapXY.x,
- y = _this$mapXY.y;
-
- this.events.push({
- type: 'onclick',
- x: x,
- y: y,
- run: function run(event) {
- if (event.onClick) {
- event.onClick();
- }
- }
- });
- }
- }, {
- key: "onMouseMove",
- value: function onMouseMove(evt) {
- var _this$mapXY2 = this.mapXY((evt || event).clientX, (evt || event).clientY),
- x = _this$mapXY2.x,
- y = _this$mapXY2.y;
-
- this.events.push({
- type: 'onmousemove',
- x: x,
- y: y,
- run: function run(event) {
- if (event.onMouseMove) {
- event.onMouseMove();
- }
- }
- });
- }
- }]);
-
- return Mouse;
- }();
-
- var defaultWindow = typeof window !== 'undefined' ? window : null;
- var defaultFetch = typeof fetch !== 'undefined' ? fetch.bind(void 0) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
- : null;
-
- var Screen = /*#__PURE__*/function () {
- function Screen(ctx) {
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref$fetch = _ref.fetch,
- fetch = _ref$fetch === void 0 ? defaultFetch : _ref$fetch,
- _ref$window = _ref.window,
- window = _ref$window === void 0 ? defaultWindow : _ref$window;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Screen);
-
- this.ctx = ctx;
- this.FRAMERATE = 30;
- this.MAX_VIRTUAL_PIXELS = 30000;
- this.CLIENT_WIDTH = 800;
- this.CLIENT_HEIGHT = 600;
- this.viewPort = new ViewPort();
- this.mouse = new Mouse(this);
- this.animations = [];
- this.waits = [];
- this.frameDuration = 0;
- this.isReadyLock = false;
- this.isFirstRender = true;
- this.intervalId = null;
- this.window = window;
- this.fetch = fetch;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Screen, [{
- key: "wait",
- value: function wait(checker) {
- this.waits.push(checker);
- }
- }, {
- key: "ready",
- value: function ready() {
- if (!this.readyPromise) {
- return Promise.resolve();
- }
-
- return this.readyPromise;
- }
- }, {
- key: "isReady",
- value: function isReady() {
- if (this.isReadyLock) {
- return true;
- }
-
- var isReadyLock = this.waits.every(function (_) {
- return _();
- });
-
- if (isReadyLock) {
- this.waits = [];
-
- if (this.resolveReady) {
- this.resolveReady();
- }
- }
-
- this.isReadyLock = isReadyLock;
- return isReadyLock;
- }
- }, {
- key: "setDefaults",
- value: function setDefaults(ctx) {
- // initial values and defaults
- ctx.strokeStyle = 'rgba(0,0,0,0)';
- ctx.lineCap = 'butt';
- ctx.lineJoin = 'miter';
- ctx.miterLimit = 4;
- }
- }, {
- key: "setViewBox",
- value: function setViewBox(_ref2) {
- var document = _ref2.document,
- ctx = _ref2.ctx,
- aspectRatio = _ref2.aspectRatio,
- width = _ref2.width,
- desiredWidth = _ref2.desiredWidth,
- height = _ref2.height,
- desiredHeight = _ref2.desiredHeight,
- _ref2$minX = _ref2.minX,
- minX = _ref2$minX === void 0 ? 0 : _ref2$minX,
- _ref2$minY = _ref2.minY,
- minY = _ref2$minY === void 0 ? 0 : _ref2$minY,
- refX = _ref2.refX,
- refY = _ref2.refY,
- _ref2$clip = _ref2.clip,
- clip = _ref2$clip === void 0 ? false : _ref2$clip,
- _ref2$clipX = _ref2.clipX,
- clipX = _ref2$clipX === void 0 ? 0 : _ref2$clipX,
- _ref2$clipY = _ref2.clipY,
- clipY = _ref2$clipY === void 0 ? 0 : _ref2$clipY;
- // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
- var cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
-
- var _cleanAspectRatio$spl = cleanAspectRatio.split(' '),
- _cleanAspectRatio$spl2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_cleanAspectRatio$spl, 2),
- aspectRatioAlign = _cleanAspectRatio$spl2[0],
- aspectRatioMeetOrSlice = _cleanAspectRatio$spl2[1];
-
- var align = aspectRatioAlign || 'xMidYMid';
- var meetOrSlice = aspectRatioMeetOrSlice || 'meet'; // calculate scale
-
- var scaleX = width / desiredWidth;
- var scaleY = height / desiredHeight;
- var scaleMin = Math.min(scaleX, scaleY);
- var scaleMax = Math.max(scaleX, scaleY);
- var finalDesiredWidth = desiredWidth;
- var finalDesiredHeight = desiredHeight;
-
- if (meetOrSlice === 'meet') {
- finalDesiredWidth *= scaleMin;
- finalDesiredHeight *= scaleMin;
- }
-
- if (meetOrSlice === 'slice') {
- finalDesiredWidth *= scaleMax;
- finalDesiredHeight *= scaleMax;
- }
-
- var refXProp = new Property(document, 'refX', refX);
- var refYProp = new Property(document, 'refY', refY);
- var hasRefs = refXProp.hasValue() && refYProp.hasValue();
-
- if (hasRefs) {
- ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
- }
-
- if (clip) {
- var scaledClipX = scaleMin * clipX;
- var scaledClipY = scaleMin * clipY;
- ctx.beginPath();
- ctx.moveTo(scaledClipX, scaledClipY);
- ctx.lineTo(width, scaledClipY);
- ctx.lineTo(width, height);
- ctx.lineTo(scaledClipX, height);
- ctx.closePath();
- ctx.clip();
- }
-
- if (!hasRefs) {
- var isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
- var isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
- var isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
- var isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
-
- if (/^xMid/.test(align) && (isMeetMinY || isSliceMaxY)) {
- ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
- }
-
- if (/YMid$/.test(align) && (isMeetMinX || isSliceMaxX)) {
- ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
- }
-
- if (/^xMax/.test(align) && (isMeetMinY || isSliceMaxY)) {
- ctx.translate(width - finalDesiredWidth, 0);
- }
-
- if (/YMax$/.test(align) && (isMeetMinX || isSliceMaxX)) {
- ctx.translate(0, height - finalDesiredHeight);
- }
- } // scale
-
-
- switch (true) {
- case align === 'none':
- ctx.scale(scaleX, scaleY);
- break;
-
- case meetOrSlice === 'meet':
- ctx.scale(scaleMin, scaleMin);
- break;
-
- case meetOrSlice === 'slice':
- ctx.scale(scaleMax, scaleMax);
- break;
- } // translate
-
-
- ctx.translate(-minX, -minY);
- }
- }, {
- key: "start",
- value: function start(element) {
- var _this = this;
-
- var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref3$enableRedraw = _ref3.enableRedraw,
- enableRedraw = _ref3$enableRedraw === void 0 ? false : _ref3$enableRedraw,
- _ref3$ignoreMouse = _ref3.ignoreMouse,
- ignoreMouse = _ref3$ignoreMouse === void 0 ? false : _ref3$ignoreMouse,
- _ref3$ignoreAnimation = _ref3.ignoreAnimation,
- ignoreAnimation = _ref3$ignoreAnimation === void 0 ? false : _ref3$ignoreAnimation,
- _ref3$ignoreDimension = _ref3.ignoreDimensions,
- ignoreDimensions = _ref3$ignoreDimension === void 0 ? false : _ref3$ignoreDimension,
- _ref3$ignoreClear = _ref3.ignoreClear,
- ignoreClear = _ref3$ignoreClear === void 0 ? false : _ref3$ignoreClear,
- forceRedraw = _ref3.forceRedraw,
- scaleWidth = _ref3.scaleWidth,
- scaleHeight = _ref3.scaleHeight,
- offsetX = _ref3.offsetX,
- offsetY = _ref3.offsetY;
-
- var FRAMERATE = this.FRAMERATE,
- mouse = this.mouse;
- var frameDuration = 1000 / FRAMERATE;
- this.frameDuration = frameDuration;
- this.readyPromise = new Promise(function (resolve) {
- _this.resolveReady = resolve;
- });
-
- if (this.isReady()) {
- this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
- }
-
- if (!enableRedraw) {
- return;
- }
-
- var now = Date.now();
- var then = now;
- var delta = 0;
-
- var tick = function tick() {
- now = Date.now();
- delta = now - then;
-
- if (delta >= frameDuration) {
- then = now - delta % frameDuration;
-
- if (_this.shouldUpdate(ignoreAnimation, forceRedraw)) {
- _this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
-
- mouse.runEvents();
- }
- }
-
- _this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
- };
-
- if (!ignoreMouse) {
- mouse.start();
- }
-
- this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
- }
- }, {
- key: "stop",
- value: function stop() {
- if (this.intervalId) {
- raf__WEBPACK_IMPORTED_MODULE_25___default().cancel(this.intervalId);
- this.intervalId = null;
- }
-
- this.mouse.stop();
- }
- }, {
- key: "shouldUpdate",
- value: function shouldUpdate(ignoreAnimation, forceRedraw) {
- // need update from animations?
- if (!ignoreAnimation) {
- var frameDuration = this.frameDuration;
- var shouldUpdate = this.animations.reduce(function (shouldUpdate, animation) {
- return animation.update(frameDuration) || shouldUpdate;
- }, false);
-
- if (shouldUpdate) {
- return true;
- }
- } // need update from redraw?
-
-
- if (typeof forceRedraw === 'function' && forceRedraw()) {
- return true;
- }
-
- if (!this.isReadyLock && this.isReady()) {
- return true;
- } // need update from mouse events?
-
-
- if (this.mouse.hasEvents()) {
- return true;
- }
-
- return false;
- }
- }, {
- key: "render",
- value: function render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
- var CLIENT_WIDTH = this.CLIENT_WIDTH,
- CLIENT_HEIGHT = this.CLIENT_HEIGHT,
- viewPort = this.viewPort,
- ctx = this.ctx,
- isFirstRender = this.isFirstRender;
- var canvas = ctx.canvas;
- viewPort.clear();
-
- if (canvas.width && canvas.height) {
- viewPort.setCurrent(canvas.width, canvas.height);
- } else {
- viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
- }
-
- var widthStyle = element.getStyle('width');
- var heightStyle = element.getStyle('height');
-
- if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
- // set canvas size
- if (widthStyle.hasValue()) {
- canvas.width = widthStyle.getPixels('x');
-
- if (canvas.style) {
- canvas.style.width = "".concat(canvas.width, "px");
- }
- }
-
- if (heightStyle.hasValue()) {
- canvas.height = heightStyle.getPixels('y');
-
- if (canvas.style) {
- canvas.style.height = "".concat(canvas.height, "px");
- }
- }
- }
-
- var cWidth = canvas.clientWidth || canvas.width;
- var cHeight = canvas.clientHeight || canvas.height;
-
- if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
- cWidth = widthStyle.getPixels('x');
- cHeight = heightStyle.getPixels('y');
- }
-
- viewPort.setCurrent(cWidth, cHeight);
-
- if (typeof offsetX === 'number') {
- element.getAttribute('x', true).setValue(offsetX);
- }
-
- if (typeof offsetY === 'number') {
- element.getAttribute('y', true).setValue(offsetY);
- }
-
- if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {
- var viewBox = toNumbers(element.getAttribute('viewBox').getString());
- var xRatio = 0;
- var yRatio = 0;
-
- if (typeof scaleWidth === 'number') {
- var _widthStyle = element.getStyle('width');
-
- if (_widthStyle.hasValue()) {
- xRatio = _widthStyle.getPixels('x') / scaleWidth;
- } else if (!isNaN(viewBox[2])) {
- xRatio = viewBox[2] / scaleWidth;
- }
- }
-
- if (typeof scaleHeight === 'number') {
- var _heightStyle = element.getStyle('height');
-
- if (_heightStyle.hasValue()) {
- yRatio = _heightStyle.getPixels('y') / scaleHeight;
- } else if (!isNaN(viewBox[3])) {
- yRatio = viewBox[3] / scaleHeight;
- }
- }
-
- if (!xRatio) {
- xRatio = yRatio;
- }
-
- if (!yRatio) {
- yRatio = xRatio;
- }
-
- element.getAttribute('width', true).setValue(scaleWidth);
- element.getAttribute('height', true).setValue(scaleHeight);
- var transformStyle = element.getStyle('transform', true, true);
- transformStyle.setValue("".concat(transformStyle.getString(), " scale(").concat(1.0 / xRatio, ", ").concat(1.0 / yRatio, ")"));
- } // clear and render
-
-
- if (!ignoreClear) {
- ctx.clearRect(0, 0, cWidth, cHeight);
- }
-
- element.render(ctx);
-
- if (isFirstRender) {
- this.isFirstRender = false;
- }
- }
- }]);
-
- return Screen;
- }();
- Screen.defaultWindow = defaultWindow;
- Screen.defaultFetch = defaultFetch;
-
- var defaultFetch$1 = Screen.defaultFetch;
- var DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : null;
-
- var Parser = /*#__PURE__*/function () {
- function Parser() {
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
- _ref$fetch = _ref.fetch,
- fetch = _ref$fetch === void 0 ? defaultFetch$1 : _ref$fetch,
- _ref$DOMParser = _ref.DOMParser,
- DOMParser = _ref$DOMParser === void 0 ? DefaultDOMParser : _ref$DOMParser;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Parser);
-
- this.fetch = fetch;
- this.DOMParser = DOMParser;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Parser, [{
- key: "parse",
- value: function () {
- var _parse = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(resource) {
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- if (!/^</.test(resource)) {
- _context.next = 2;
- break;
- }
-
- return _context.abrupt("return", this.parseFromString(resource));
-
- case 2:
- return _context.abrupt("return", this.load(resource));
-
- case 3:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this);
- }));
-
- function parse(_x) {
- return _parse.apply(this, arguments);
- }
-
- return parse;
- }()
- }, {
- key: "parseFromString",
- value: function parseFromString(xml) {
- var parser = new this.DOMParser();
-
- try {
- return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
- } catch (err) {
- return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
- }
- }
- }, {
- key: "checkDocument",
- value: function checkDocument(document) {
- var parserError = document.getElementsByTagName('parsererror')[0];
-
- if (parserError) {
- throw new Error(parserError.textContent);
- }
-
- return document;
- }
- }, {
- key: "load",
- value: function () {
- var _load = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(url) {
- var response, xml;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- _context2.next = 2;
- return this.fetch(url);
-
- case 2:
- response = _context2.sent;
- _context2.next = 5;
- return response.text();
-
- case 5:
- xml = _context2.sent;
- return _context2.abrupt("return", this.parseFromString(xml));
-
- case 7:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2, this);
- }));
-
- function load(_x2) {
- return _load.apply(this, arguments);
- }
-
- return load;
- }()
- }]);
-
- return Parser;
- }();
-
- var Translate = /*#__PURE__*/function () {
- function Translate(_, point) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Translate);
-
- this.type = 'translate';
- this.point = null;
- this.point = Point.parse(point);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Translate, [{
- key: "apply",
- value: function apply(ctx) {
- var _this$point = this.point,
- x = _this$point.x,
- y = _this$point.y;
- ctx.translate(x || 0.0, y || 0.0);
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var _this$point2 = this.point,
- x = _this$point2.x,
- y = _this$point2.y;
- ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
- }
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- var _this$point3 = this.point,
- x = _this$point3.x,
- y = _this$point3.y;
- point.applyTransform([1, 0, 0, 1, x || 0.0, y || 0.0]);
- }
- }]);
-
- return Translate;
- }();
-
- var Rotate = /*#__PURE__*/function () {
- function Rotate(document, rotate) {
- var transformOrigin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Rotate);
-
- this.type = 'rotate';
- this.angle = null;
- this.cx = 0;
- this.cy = 0;
- var numbers = toNumbers(rotate);
- this.angle = new Property(document, 'angle', numbers[0]);
- this.cx = (numbers[1] || 0) + (transformOrigin[0] || 0);
- this.cy = (numbers[2] || 0) + (transformOrigin[1] || 0);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Rotate, [{
- key: "apply",
- value: function apply(ctx) {
- var cx = this.cx,
- cy = this.cy,
- angle = this.angle;
- ctx.translate(cx, cy);
- ctx.rotate(angle.getRadians());
- ctx.translate(-cx, -cy);
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var cx = this.cx,
- cy = this.cy,
- angle = this.angle;
- ctx.translate(cx, cy);
- ctx.rotate(-1.0 * angle.getRadians());
- ctx.translate(-cx, -cy);
- }
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- var cx = this.cx,
- cy = this.cy,
- angle = this.angle;
- var rad = angle.getRadians();
- point.applyTransform([1, 0, 0, 1, cx || 0.0, cy || 0.0 // this.p.y
- ]);
- point.applyTransform([Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0]);
- point.applyTransform([1, 0, 0, 1, -cx || 0.0, -cy || 0.0 // -this.p.y
- ]);
- }
- }]);
-
- return Rotate;
- }();
-
- var Scale = /*#__PURE__*/function () {
- function Scale(_, scale) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Scale);
-
- this.type = 'scale';
- this.scale = null;
- var scaleSize = Point.parseScale(scale); // Workaround for node-canvas
-
- if (scaleSize.x === 0 || scaleSize.y === 0) {
- scaleSize.x = PSEUDO_ZERO;
- scaleSize.y = PSEUDO_ZERO;
- }
-
- this.scale = scaleSize;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Scale, [{
- key: "apply",
- value: function apply(ctx) {
- var _this$scale = this.scale,
- x = _this$scale.x,
- y = _this$scale.y;
- ctx.scale(x, y || x);
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var _this$scale2 = this.scale,
- x = _this$scale2.x,
- y = _this$scale2.y;
- ctx.scale(1.0 / x, 1.0 / y || x);
- }
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- var _this$scale3 = this.scale,
- x = _this$scale3.x,
- y = _this$scale3.y;
- point.applyTransform([x || 0.0, 0, 0, y || 0.0, 0, 0]);
- }
- }]);
-
- return Scale;
- }();
-
- var Matrix = /*#__PURE__*/function () {
- function Matrix(_, matrix) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Matrix);
-
- this.type = 'matrix';
- this.matrix = [];
- this.matrix = toNumbers(matrix);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Matrix, [{
- key: "apply",
- value: function apply(ctx) {
- var matrix = this.matrix;
- ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var matrix = this.matrix;
- var a = matrix[0];
- var b = matrix[2];
- var c = matrix[4];
- var d = matrix[1];
- var e = matrix[3];
- var f = matrix[5];
- var g = 0.0;
- var h = 0.0;
- var i = 1.0;
- var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
- ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));
- }
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- point.applyTransform(this.matrix);
- }
- }]);
-
- return Matrix;
- }();
-
- function _createSuper(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var Skew = /*#__PURE__*/function (_Matrix) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(Skew, _Matrix);
-
- var _super = _createSuper(Skew);
-
- function Skew(document, skew) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Skew);
-
- _this = _super.call(this, document, skew);
- _this.type = 'skew';
- _this.angle = null;
- _this.angle = new Property(document, 'angle', skew);
- return _this;
- }
-
- return Skew;
- }(Matrix);
-
- function _createSuper$1(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$1()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var SkewX = /*#__PURE__*/function (_Skew) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewX, _Skew);
-
- var _super = _createSuper$1(SkewX);
-
- function SkewX(document, skew) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewX);
-
- _this = _super.call(this, document, skew);
- _this.type = 'skewX';
- _this.matrix = [1, 0, Math.tan(_this.angle.getRadians()), 1, 0, 0];
- return _this;
- }
-
- return SkewX;
- }(Skew);
-
- function _createSuper$2(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$2()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var SkewY = /*#__PURE__*/function (_Skew) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewY, _Skew);
-
- var _super = _createSuper$2(SkewY);
-
- function SkewY(document, skew) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewY);
-
- _this = _super.call(this, document, skew);
- _this.type = 'skewY';
- _this.matrix = [1, Math.tan(_this.angle.getRadians()), 0, 1, 0, 0];
- return _this;
- }
-
- return SkewY;
- }(Skew);
-
- function parseTransforms(transform) {
- return compressSpaces(transform).trim().replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g, ') ').split(/\s(?=[a-z])/);
- }
-
- function parseTransform(transform) {
- var _transform$split = transform.split('('),
- _transform$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_transform$split, 2),
- type = _transform$split2[0],
- value = _transform$split2[1];
-
- return [type.trim(), value.trim().replace(')', '')];
- }
-
- var Transform = /*#__PURE__*/function () {
- function Transform(document, transform, transformOrigin) {
- var _this = this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Transform);
-
- this.document = document;
- this.transforms = [];
- var data = parseTransforms(transform);
- var originCoords = transformOrigin ? toNumbers(transformOrigin) : [];
- data.forEach(function (transform) {
- if (transform === 'none') {
- return;
- }
-
- var _parseTransform = parseTransform(transform),
- _parseTransform2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_parseTransform, 2),
- type = _parseTransform2[0],
- value = _parseTransform2[1];
-
- var TransformType = Transform.transformTypes[type];
-
- if (typeof TransformType !== 'undefined') {
- _this.transforms.push(new TransformType(_this.document, value, originCoords));
- }
- });
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Transform, [{
- key: "apply",
- value: function apply(ctx) {
- var transforms = this.transforms;
- var len = transforms.length;
-
- for (var i = 0; i < len; i++) {
- transforms[i].apply(ctx);
- }
- }
- }, {
- key: "unapply",
- value: function unapply(ctx) {
- var transforms = this.transforms;
- var len = transforms.length;
-
- for (var i = len - 1; i >= 0; i--) {
- transforms[i].unapply(ctx);
- }
- } // TODO: applyToPoint unused ... remove?
-
- }, {
- key: "applyToPoint",
- value: function applyToPoint(point) {
- var transforms = this.transforms;
- var len = transforms.length;
-
- for (var i = 0; i < len; i++) {
- transforms[i].applyToPoint(point);
- }
- }
- }], [{
- key: "fromElement",
- value: function fromElement(document, element) {
- var transformStyle = element.getStyle('transform', false, true);
- var transformOriginStyle = element.getStyle('transform-origin', false, true);
-
- if (transformStyle.hasValue()) {
- return new Transform(document, transformStyle.getString(), transformOriginStyle.getString());
- }
-
- return null;
- }
- }]);
-
- return Transform;
- }();
- Transform.transformTypes = {
- translate: Translate,
- rotate: Rotate,
- scale: Scale,
- matrix: Matrix,
- skewX: SkewX,
- skewY: SkewY
- };
-
- var Element = /*#__PURE__*/function () {
- function Element(document, node) {
- var _this = this;
-
- var captureTextNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Element);
-
- this.document = document;
- this.node = node;
- this.captureTextNodes = captureTextNodes;
- this.attributes = {};
- this.styles = {};
- this.stylesSpecificity = {};
- this.animationFrozen = false;
- this.animationFrozenValue = '';
- this.parent = null;
- this.children = [];
-
- if (!node || node.nodeType !== 1) {
- // ELEMENT_NODE
- return;
- } // add attributes
-
-
- Array.from(node.attributes).forEach(function (attribute) {
- var nodeName = normalizeAttributeName(attribute.nodeName);
- _this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
- });
- this.addStylesFromStyleDefinition(); // add inline styles
-
- if (this.getAttribute('style').hasValue()) {
- var styles = this.getAttribute('style').getString().split(';').map(function (_) {
- return _.trim();
- });
- styles.forEach(function (style) {
- if (!style) {
- return;
- }
-
- var _style$split$map = style.split(':').map(function (_) {
- return _.trim();
- }),
- _style$split$map2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_style$split$map, 2),
- name = _style$split$map2[0],
- value = _style$split$map2[1];
-
- _this.styles[name] = new Property(document, name, value);
- });
- }
-
- var definitions = document.definitions;
- var id = this.getAttribute('id'); // add id
-
- if (id.hasValue()) {
- if (!definitions[id.getValue()]) {
- definitions[id.getValue()] = this;
- }
- }
-
- Array.from(node.childNodes).forEach(function (childNode) {
- if (childNode.nodeType === 1) {
- _this.addChild(childNode); // ELEMENT_NODE
-
- } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {
- var textNode = document.createTextNode(childNode);
-
- if (textNode.getText().length > 0) {
- _this.addChild(textNode); // TEXT_NODE
-
- }
- }
- });
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Element, [{
- key: "getAttribute",
- value: function getAttribute(name) {
- var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- var attr = this.attributes[name];
-
- if (!attr && createIfNotExists) {
- var _attr = new Property(this.document, name, '');
-
- this.attributes[name] = _attr;
- return _attr;
- }
-
- return attr || Property.empty(this.document);
- }
- }, {
- key: "getHrefAttribute",
- value: function getHrefAttribute() {
- for (var key in this.attributes) {
- if (key === 'href' || /:href$/.test(key)) {
- return this.attributes[key];
- }
- }
-
- return Property.empty(this.document);
- }
- }, {
- key: "getStyle",
- value: function getStyle(name) {
- var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
- var skipAncestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var style = this.styles[name];
-
- if (style) {
- return style;
- }
-
- var attr = this.getAttribute(name);
-
- if (attr && attr.hasValue()) {
- this.styles[name] = attr; // move up to me to cache
-
- return attr;
- }
-
- if (!skipAncestors) {
- var parent = this.parent;
-
- if (parent) {
- var parentStyle = parent.getStyle(name);
-
- if (parentStyle && parentStyle.hasValue()) {
- return parentStyle;
- }
- }
- }
-
- if (createIfNotExists) {
- var _style = new Property(this.document, name, '');
-
- this.styles[name] = _style;
- return _style;
- }
-
- return style || Property.empty(this.document);
- }
- }, {
- key: "render",
- value: function render(ctx) {
- // don't render display=none
- // don't render visibility=hidden
- if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {
- return;
- }
-
- ctx.save();
-
- if (this.getStyle('mask').hasValue()) {
- // mask
- var mask = this.getStyle('mask').getDefinition();
-
- if (mask) {
- this.applyEffects(ctx);
- mask.apply(ctx, this);
- }
- } else if (this.getStyle('filter').getValue('none') !== 'none') {
- // filter
- var filter = this.getStyle('filter').getDefinition();
-
- if (filter) {
- this.applyEffects(ctx);
- filter.apply(ctx, this);
- }
- } else {
- this.setContext(ctx);
- this.renderChildren(ctx);
- this.clearContext(ctx);
- }
-
- ctx.restore();
- }
- }, {
- key: "setContext",
- value: function setContext(_) {}
- }, {
- key: "applyEffects",
- value: function applyEffects(ctx) {
- // transform
- var transform = Transform.fromElement(this.document, this);
-
- if (transform) {
- transform.apply(ctx);
- } // clip
-
-
- var clipPathStyleProp = this.getStyle('clip-path', false, true);
-
- if (clipPathStyleProp.hasValue()) {
- var clip = clipPathStyleProp.getDefinition();
-
- if (clip) {
- clip.apply(ctx);
- }
- }
- }
- }, {
- key: "clearContext",
- value: function clearContext(_) {}
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- this.children.forEach(function (child) {
- child.render(ctx);
- });
- }
- }, {
- key: "addChild",
- value: function addChild(childNode) {
- var child = childNode instanceof Element ? childNode : this.document.createElement(childNode);
- child.parent = this;
-
- if (!Element.ignoreChildTypes.includes(child.type)) {
- this.children.push(child);
- }
- }
- }, {
- key: "matchesSelector",
- value: function matchesSelector(selector) {
- var node = this.node;
-
- if (typeof node.matches === 'function') {
- return node.matches(selector);
- }
-
- var styleClasses = node.getAttribute('class');
-
- if (!styleClasses || styleClasses === '') {
- return false;
- }
-
- return styleClasses.split(' ').some(function (styleClass) {
- if (".".concat(styleClass) === selector) {
- return true;
- }
- });
- }
- }, {
- key: "addStylesFromStyleDefinition",
- value: function addStylesFromStyleDefinition() {
- var _this$document = this.document,
- styles = _this$document.styles,
- stylesSpecificity = _this$document.stylesSpecificity;
-
- for (var selector in styles) {
- if (selector[0] !== '@' && this.matchesSelector(selector)) {
- var style = styles[selector];
- var specificity = stylesSpecificity[selector];
-
- if (style) {
- for (var name in style) {
- var existingSpecificity = this.stylesSpecificity[name];
-
- if (typeof existingSpecificity === 'undefined') {
- existingSpecificity = '000';
- }
-
- if (specificity >= existingSpecificity) {
- this.styles[name] = style[name];
- this.stylesSpecificity[name] = specificity;
- }
- }
- }
- }
- }
- }
- }, {
- key: "removeStyles",
- value: function removeStyles(element, ignoreStyles) {
- var toRestore = ignoreStyles.reduce(function (toRestore, name) {
- var styleProp = element.getStyle(name);
-
- if (!styleProp.hasValue()) {
- return toRestore;
- }
-
- var value = styleProp.getString();
- styleProp.setValue('');
- return [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_39__.default)(toRestore), [[name, value]]);
- }, []);
- return toRestore;
- }
- }, {
- key: "restoreStyles",
- value: function restoreStyles(element, styles) {
- styles.forEach(function (_ref) {
- var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
- name = _ref2[0],
- value = _ref2[1];
-
- element.getStyle(name, true).setValue(value);
- });
- }
- }]);
-
- return Element;
- }();
- Element.ignoreChildTypes = ['title'];
-
- function _createSuper$3(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$3()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var UnknownElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UnknownElement, _Element);
-
- var _super = _createSuper$3(UnknownElement);
-
- function UnknownElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UnknownElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
-
- return _this;
- }
-
- return UnknownElement;
- }(Element);
-
- function wrapFontFamily(fontFamily) {
- var trimmed = fontFamily.trim();
- return /^('|")/.test(trimmed) ? trimmed : "\"".concat(trimmed, "\"");
- }
-
- function prepareFontFamily(fontFamily) {
- return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
- }
- /**
- * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
- */
-
-
- function prepareFontStyle(fontStyle) {
- if (!fontStyle) {
- return '';
- }
-
- var targetFontStyle = fontStyle.trim().toLowerCase();
-
- switch (targetFontStyle) {
- case 'normal':
- case 'italic':
- case 'oblique':
- case 'inherit':
- case 'initial':
- case 'unset':
- return targetFontStyle;
-
- default:
- if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
- return targetFontStyle;
- }
-
- return '';
- }
- }
- /**
- * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
- */
-
-
- function prepareFontWeight(fontWeight) {
- if (!fontWeight) {
- return '';
- }
-
- var targetFontWeight = fontWeight.trim().toLowerCase();
-
- switch (targetFontWeight) {
- case 'normal':
- case 'bold':
- case 'lighter':
- case 'bolder':
- case 'inherit':
- case 'initial':
- case 'unset':
- return targetFontWeight;
-
- default:
- if (/^[\d.]+$/.test(targetFontWeight)) {
- return targetFontWeight;
- }
-
- return '';
- }
- }
-
- var Font = /*#__PURE__*/function () {
- function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Font);
-
- var inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};
- this.fontFamily = fontFamily || inheritFont.fontFamily;
- this.fontSize = fontSize || inheritFont.fontSize;
- this.fontStyle = fontStyle || inheritFont.fontStyle;
- this.fontWeight = fontWeight || inheritFont.fontWeight;
- this.fontVariant = fontVariant || inheritFont.fontVariant;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Font, [{
- key: "toString",
- value: function toString() {
- return [prepareFontStyle(this.fontStyle), this.fontVariant, prepareFontWeight(this.fontWeight), this.fontSize, // Wrap fontFamily only on nodejs and only for canvas.ctx
- prepareFontFamily(this.fontFamily)].join(' ').trim();
- }
- }], [{
- key: "parse",
- value: function parse() {
- var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
- var inherit = arguments.length > 1 ? arguments[1] : undefined;
- var fontStyle = '';
- var fontVariant = '';
- var fontWeight = '';
- var fontSize = '';
- var fontFamily = '';
- var parts = compressSpaces(font).trim().split(' ');
- var set = {
- fontSize: false,
- fontStyle: false,
- fontWeight: false,
- fontVariant: false
- };
- parts.forEach(function (part) {
- switch (true) {
- case !set.fontStyle && Font.styles.includes(part):
- if (part !== 'inherit') {
- fontStyle = part;
- }
-
- set.fontStyle = true;
- break;
-
- case !set.fontVariant && Font.variants.includes(part):
- if (part !== 'inherit') {
- fontVariant = part;
- }
-
- set.fontStyle = true;
- set.fontVariant = true;
- break;
-
- case !set.fontWeight && Font.weights.includes(part):
- if (part !== 'inherit') {
- fontWeight = part;
- }
-
- set.fontStyle = true;
- set.fontVariant = true;
- set.fontWeight = true;
- break;
-
- case !set.fontSize:
- if (part !== 'inherit') {
- var _part$split = part.split('/');
-
- var _part$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_part$split, 1);
-
- fontSize = _part$split2[0];
- }
-
- set.fontStyle = true;
- set.fontVariant = true;
- set.fontWeight = true;
- set.fontSize = true;
- break;
-
- default:
- if (part !== 'inherit') {
- fontFamily += part;
- }
-
- }
- });
- return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
- }
- }]);
-
- return Font;
- }();
- Font.styles = 'normal|italic|oblique|inherit';
- Font.variants = 'normal|small-caps|inherit';
- Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
-
- var BoundingBox = /*#__PURE__*/function () {
- function BoundingBox() {
- var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.NaN;
- var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.NaN;
- var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.NaN;
- var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Number.NaN;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, BoundingBox);
-
- this.x1 = x1;
- this.y1 = y1;
- this.x2 = x2;
- this.y2 = y2;
- this.addPoint(x1, y1);
- this.addPoint(x2, y2);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(BoundingBox, [{
- key: "addPoint",
- value: function addPoint(x, y) {
- if (typeof x !== 'undefined') {
- if (isNaN(this.x1) || isNaN(this.x2)) {
- this.x1 = x;
- this.x2 = x;
- }
-
- if (x < this.x1) {
- this.x1 = x;
- }
-
- if (x > this.x2) {
- this.x2 = x;
- }
- }
-
- if (typeof y !== 'undefined') {
- if (isNaN(this.y1) || isNaN(this.y2)) {
- this.y1 = y;
- this.y2 = y;
- }
-
- if (y < this.y1) {
- this.y1 = y;
- }
-
- if (y > this.y2) {
- this.y2 = y;
- }
- }
- }
- }, {
- key: "addX",
- value: function addX(x) {
- this.addPoint(x, null);
- }
- }, {
- key: "addY",
- value: function addY(y) {
- this.addPoint(null, y);
- }
- }, {
- key: "addBoundingBox",
- value: function addBoundingBox(boundingBox) {
- if (!boundingBox) {
- return;
- }
-
- var x1 = boundingBox.x1,
- y1 = boundingBox.y1,
- x2 = boundingBox.x2,
- y2 = boundingBox.y2;
- this.addPoint(x1, y1);
- this.addPoint(x2, y2);
- }
- }, {
- key: "sumCubic",
- value: function sumCubic(t, p0, p1, p2, p3) {
- return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;
- }
- }, {
- key: "bezierCurveAdd",
- value: function bezierCurveAdd(forX, p0, p1, p2, p3) {
- var b = 6 * p0 - 12 * p1 + 6 * p2;
- var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
- var c = 3 * p1 - 3 * p0;
-
- if (a === 0) {
- if (b === 0) {
- return;
- }
-
- var t = -c / b;
-
- if (0 < t && t < 1) {
- if (forX) {
- this.addX(this.sumCubic(t, p0, p1, p2, p3));
- } else {
- this.addY(this.sumCubic(t, p0, p1, p2, p3));
- }
- }
-
- return;
- }
-
- var b2ac = Math.pow(b, 2) - 4 * c * a;
-
- if (b2ac < 0) {
- return;
- }
-
- var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
-
- if (0 < t1 && t1 < 1) {
- if (forX) {
- this.addX(this.sumCubic(t1, p0, p1, p2, p3));
- } else {
- this.addY(this.sumCubic(t1, p0, p1, p2, p3));
- }
- }
-
- var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
-
- if (0 < t2 && t2 < 1) {
- if (forX) {
- this.addX(this.sumCubic(t2, p0, p1, p2, p3));
- } else {
- this.addY(this.sumCubic(t2, p0, p1, p2, p3));
- }
- }
- } // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
-
- }, {
- key: "addBezierCurve",
- value: function addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
- this.addPoint(p0x, p0y);
- this.addPoint(p3x, p3y);
- this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
- this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
- }
- }, {
- key: "addQuadraticCurve",
- value: function addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
- var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
-
- var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
-
- var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
-
- var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
-
- this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
- }
- }, {
- key: "isPointInBox",
- value: function isPointInBox(x, y) {
- var x1 = this.x1,
- y1 = this.y1,
- x2 = this.x2,
- y2 = this.y2;
- return x1 <= x && x <= x2 && y1 <= y && y <= y2;
- }
- }, {
- key: "x",
- get: function get() {
- return this.x1;
- }
- }, {
- key: "y",
- get: function get() {
- return this.y1;
- }
- }, {
- key: "width",
- get: function get() {
- return this.x2 - this.x1;
- }
- }, {
- key: "height",
- get: function get() {
- return this.y2 - this.y1;
- }
- }]);
-
- return BoundingBox;
- }();
-
- function _createSuper$4(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$4()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var RenderedElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RenderedElement, _Element);
-
- var _super = _createSuper$4(RenderedElement);
-
- function RenderedElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RenderedElement);
-
- _this = _super.apply(this, arguments);
- _this.modifiedEmSizeStack = false;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RenderedElement, [{
- key: "calculateOpacity",
- value: function calculateOpacity() {
- var opacity = 1.0; // tslint:disable-next-line: no-this-assignment
-
- var element = this;
-
- while (element) {
- var opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
-
- if (opacityStyle.hasValue()) {
- opacity *= opacityStyle.getNumber();
- }
-
- element = element.parent;
- }
-
- return opacity;
- }
- }, {
- key: "setContext",
- value: function setContext(ctx) {
- var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- if (!fromMeasure) {
- // causes stack overflow when measuring text with gradients
- // fill
- var fillStyleProp = this.getStyle('fill');
- var fillOpacityStyleProp = this.getStyle('fill-opacity');
- var strokeStyleProp = this.getStyle('stroke');
- var strokeOpacityProp = this.getStyle('stroke-opacity');
-
- if (fillStyleProp.isUrlDefinition()) {
- var fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
-
- if (fillStyle) {
- ctx.fillStyle = fillStyle;
- }
- } else if (fillStyleProp.hasValue()) {
- if (fillStyleProp.getString() === 'currentColor') {
- fillStyleProp.setValue(this.getStyle('color').getColor());
- }
-
- var _fillStyle = fillStyleProp.getColor();
-
- if (_fillStyle !== 'inherit') {
- ctx.fillStyle = _fillStyle === 'none' ? 'rgba(0,0,0,0)' : _fillStyle;
- }
- }
-
- if (fillOpacityStyleProp.hasValue()) {
- var _fillStyle2 = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();
-
- ctx.fillStyle = _fillStyle2;
- } // stroke
-
-
- if (strokeStyleProp.isUrlDefinition()) {
- var strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
-
- if (strokeStyle) {
- ctx.strokeStyle = strokeStyle;
- }
- } else if (strokeStyleProp.hasValue()) {
- if (strokeStyleProp.getString() === 'currentColor') {
- strokeStyleProp.setValue(this.getStyle('color').getColor());
- }
-
- var _strokeStyle = strokeStyleProp.getString();
-
- if (_strokeStyle !== 'inherit') {
- ctx.strokeStyle = _strokeStyle === 'none' ? 'rgba(0,0,0,0)' : _strokeStyle;
- }
- }
-
- if (strokeOpacityProp.hasValue()) {
- var _strokeStyle2 = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();
-
- ctx.strokeStyle = _strokeStyle2;
- }
-
- var strokeWidthStyleProp = this.getStyle('stroke-width');
-
- if (strokeWidthStyleProp.hasValue()) {
- var newLineWidth = strokeWidthStyleProp.getPixels();
- ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
- : newLineWidth;
- }
-
- var strokeLinecapStyleProp = this.getStyle('stroke-linecap');
- var strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
- var strokeMiterlimitProp = this.getStyle('stroke-miterlimit');
- var pointOrderStyleProp = this.getStyle('paint-order');
- var strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
- var strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
-
- if (strokeLinecapStyleProp.hasValue()) {
- ctx.lineCap = strokeLinecapStyleProp.getString();
- }
-
- if (strokeLinejoinStyleProp.hasValue()) {
- ctx.lineJoin = strokeLinejoinStyleProp.getString();
- }
-
- if (strokeMiterlimitProp.hasValue()) {
- ctx.miterLimit = strokeMiterlimitProp.getNumber();
- }
-
- if (pointOrderStyleProp.hasValue()) {
- // ?
- ctx.paintOrder = pointOrderStyleProp.getValue();
- }
-
- if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
- var gaps = toNumbers(strokeDasharrayStyleProp.getString());
-
- if (typeof ctx.setLineDash !== 'undefined') {
- ctx.setLineDash(gaps);
- } else if (typeof ctx.webkitLineDash !== 'undefined') {
- ctx.webkitLineDash = gaps;
- } else if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
- ctx.mozDash = gaps;
- }
-
- var offset = strokeDashoffsetProp.getPixels();
-
- if (typeof ctx.lineDashOffset !== 'undefined') {
- ctx.lineDashOffset = offset;
- } else if (typeof ctx.webkitLineDashOffset !== 'undefined') {
- ctx.webkitLineDashOffset = offset;
- } else if (typeof ctx.mozDashOffset !== 'undefined') {
- ctx.mozDashOffset = offset;
- }
- }
- } // font
-
-
- this.modifiedEmSizeStack = false;
-
- if (typeof ctx.font !== 'undefined') {
- var fontStyleProp = this.getStyle('font');
- var fontStyleStyleProp = this.getStyle('font-style');
- var fontVariantStyleProp = this.getStyle('font-variant');
- var fontWeightStyleProp = this.getStyle('font-weight');
- var fontSizeStyleProp = this.getStyle('font-size');
- var fontFamilyStyleProp = this.getStyle('font-family');
- var font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? "".concat(fontSizeStyleProp.getPixels(true), "px") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));
- fontStyleStyleProp.setValue(font.fontStyle);
- fontVariantStyleProp.setValue(font.fontVariant);
- fontWeightStyleProp.setValue(font.fontWeight);
- fontSizeStyleProp.setValue(font.fontSize);
- fontFamilyStyleProp.setValue(font.fontFamily);
- ctx.font = font.toString();
-
- if (fontSizeStyleProp.isPixels()) {
- this.document.emSize = fontSizeStyleProp.getPixels();
- this.modifiedEmSizeStack = true;
- }
- }
-
- if (!fromMeasure) {
- // effects
- this.applyEffects(ctx); // opacity
-
- ctx.globalAlpha = this.calculateOpacity();
- }
- }
- }, {
- key: "clearContext",
- value: function clearContext(ctx) {
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(RenderedElement.prototype), "clearContext", this).call(this, ctx);
-
- if (this.modifiedEmSizeStack) {
- this.document.popEmSize();
- }
- }
- }]);
-
- return RenderedElement;
- }(Element);
-
- function _createSuper$5(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$5()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TextElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextElement, _RenderedElement);
-
- var _super = _createSuper$5(TextElement);
-
- function TextElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextElement);
-
- _this = _super.call(this, document, node, (this instanceof TextElement ? this.constructor : void 0) === TextElement ? true : captureTextNodes);
- _this.type = 'text';
- _this.x = 0;
- _this.y = 0;
- _this.measureCache = -1;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextElement, [{
- key: "setContext",
- value: function setContext(ctx) {
- var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(TextElement.prototype), "setContext", this).call(this, ctx, fromMeasure);
-
- var textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();
-
- if (textBaseline) {
- ctx.textBaseline = textBaseline;
- }
- }
- }, {
- key: "initializeCoordinates",
- value: function initializeCoordinates(ctx) {
- this.x = this.getAttribute('x').getPixels('x');
- this.y = this.getAttribute('y').getPixels('y');
- var dxAttr = this.getAttribute('dx');
- var dyAttr = this.getAttribute('dy');
-
- if (dxAttr.hasValue()) {
- this.x += dxAttr.getPixels('x');
- }
-
- if (dyAttr.hasValue()) {
- this.y += dyAttr.getPixels('y');
- }
-
- this.x += this.getAnchorDelta(ctx, this, 0);
- }
- }, {
- key: "getBoundingBox",
- value: function getBoundingBox(ctx) {
- var _this2 = this;
-
- if (this.type !== 'text') {
- return this.getTElementBoundingBox(ctx);
- }
-
- this.initializeCoordinates(ctx);
- var boundingBox = null;
- this.children.forEach(function (_, i) {
- var childBoundingBox = _this2.getChildBoundingBox(ctx, _this2, _this2, i);
-
- if (!boundingBox) {
- boundingBox = childBoundingBox;
- } else {
- boundingBox.addBoundingBox(childBoundingBox);
- }
- });
- return boundingBox;
- }
- }, {
- key: "getFontSize",
- value: function getFontSize() {
- var document = this.document,
- parent = this.parent;
- var inheritFontSize = Font.parse(document.ctx.font).fontSize;
- var fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
- return fontSize;
- }
- }, {
- key: "getTElementBoundingBox",
- value: function getTElementBoundingBox(ctx) {
- var fontSize = this.getFontSize();
- return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
- }
- }, {
- key: "getGlyph",
- value: function getGlyph(font, text, i) {
- var char = text[i];
- var glyph = null;
-
- if (font.isArabic) {
- var len = text.length;
- var prevChar = text[i - 1];
- var nextChar = text[i + 1];
- var arabicForm = 'isolated';
-
- if ((i === 0 || prevChar === ' ') && i < len - 2 && nextChar !== ' ') {
- arabicForm = 'terminal';
- }
-
- if (i > 0 && prevChar !== ' ' && i < len - 2 && nextChar !== ' ') {
- arabicForm = 'medial';
- }
-
- if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
- arabicForm = 'initial';
- }
-
- if (typeof font.glyphs[char] !== 'undefined') {
- glyph = font.glyphs[char][arabicForm];
-
- if (!glyph && font.glyphs[char].type === 'glyph') {
- glyph = font.glyphs[char];
- }
- }
- } else {
- glyph = font.glyphs[char];
- }
-
- if (!glyph) {
- glyph = font.missingGlyph;
- }
-
- return glyph;
- }
- }, {
- key: "getText",
- value: function getText() {
- return '';
- }
- }, {
- key: "getTextFromNode",
- value: function getTextFromNode(node) {
- var textNode = node || this.node;
- var childNodes = Array.from(textNode.parentNode.childNodes);
- var index = childNodes.indexOf(textNode);
- var lastIndex = childNodes.length - 1;
- var text = compressSpaces(textNode.value || textNode.text || textNode.textContent || '');
-
- if (index === 0) {
- text = trimLeft(text);
- }
-
- if (index === lastIndex) {
- text = trimRight(text);
- }
-
- return text;
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- var _this3 = this;
-
- if (this.type !== 'text') {
- this.renderTElementChildren(ctx);
- return;
- }
-
- this.initializeCoordinates(ctx);
- this.children.forEach(function (_, i) {
- _this3.renderChild(ctx, _this3, _this3, i);
- });
- var mouse = this.document.screen.mouse; // Do not calc bounding box if mouse is not working.
-
- if (mouse.isWorking()) {
- mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
- }
- }
- }, {
- key: "renderTElementChildren",
- value: function renderTElementChildren(ctx) {
- var document = this.document,
- parent = this.parent;
- var renderText = this.getText();
- var customFont = parent.getStyle('font-family').getDefinition();
-
- if (customFont) {
- var unitsPerEm = customFont.fontFace.unitsPerEm;
- var ctxFont = Font.parse(document.ctx.font);
- var fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
- var fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
- var scale = fontSize / unitsPerEm;
- var text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;
- var dx = toNumbers(parent.getAttribute('dx').getString());
- var len = text.length;
-
- for (var i = 0; i < len; i++) {
- var glyph = this.getGlyph(customFont, text, i);
- ctx.translate(this.x, this.y);
- ctx.scale(scale, -scale);
- var lw = ctx.lineWidth;
- ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
-
- if (fontStyle === 'italic') {
- ctx.transform(1, 0, .4, 1, 0, 0);
- }
-
- glyph.render(ctx);
-
- if (fontStyle === 'italic') {
- ctx.transform(1, 0, -.4, 1, 0, 0);
- }
-
- ctx.lineWidth = lw;
- ctx.scale(1 / scale, -1 / scale);
- ctx.translate(-this.x, -this.y);
- this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
-
- if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
- this.x += dx[i];
- }
- }
-
- return;
- }
-
- var x = this.x,
- y = this.y;
-
- if (ctx.paintOrder === 'stroke') {
- if (ctx.strokeStyle) {
- ctx.strokeText(renderText, x, y);
- }
-
- if (ctx.fillStyle) {
- ctx.fillText(renderText, x, y);
- }
- } else {
- if (ctx.fillStyle) {
- ctx.fillText(renderText, x, y);
- }
-
- if (ctx.strokeStyle) {
- ctx.strokeText(renderText, x, y);
- }
- }
- }
- }, {
- key: "getAnchorDelta",
- value: function getAnchorDelta(ctx, parent, startI) {
- var textAnchor = this.getStyle('text-anchor').getString('start');
-
- if (textAnchor !== 'start') {
- var children = parent.children;
- var len = children.length;
- var child = null;
- var width = 0;
-
- for (var i = startI; i < len; i++) {
- child = children[i];
-
- if (i > startI && child.getAttribute('x').hasValue() || child.getAttribute('text-anchor').hasValue()) {
- break; // new group
- }
-
- width += child.measureTextRecursive(ctx);
- }
-
- return -1 * (textAnchor === 'end' ? width : width / 2.0);
- }
-
- return 0;
- }
- }, {
- key: "adjustChildCoordinates",
- value: function adjustChildCoordinates(ctx, textParent, parent, i) {
- var child = parent.children[i];
-
- if (typeof child.measureText !== 'function') {
- return child;
- }
-
- ctx.save();
- child.setContext(ctx, true);
- var xAttr = child.getAttribute('x');
- var yAttr = child.getAttribute('y');
- var dxAttr = child.getAttribute('dx');
- var dyAttr = child.getAttribute('dy');
- var textAnchor = child.getAttribute('text-anchor').getString('start');
-
- if (i === 0 && child.type !== 'textNode') {
- if (!xAttr.hasValue()) {
- xAttr.setValue(textParent.getAttribute('x').getValue('0'));
- }
-
- if (!yAttr.hasValue()) {
- yAttr.setValue(textParent.getAttribute('y').getValue('0'));
- }
-
- if (!dxAttr.hasValue()) {
- dxAttr.setValue(textParent.getAttribute('dx').getValue('0'));
- }
-
- if (!dyAttr.hasValue()) {
- dyAttr.setValue(textParent.getAttribute('dy').getValue('0'));
- }
- }
-
- if (xAttr.hasValue()) {
- child.x = xAttr.getPixels('x') + textParent.getAnchorDelta(ctx, parent, i);
-
- if (textAnchor !== 'start') {
- var width = child.measureTextRecursive(ctx);
- child.x += -1 * (textAnchor === 'end' ? width : width / 2.0);
- }
-
- if (dxAttr.hasValue()) {
- child.x += dxAttr.getPixels('x');
- }
- } else {
- if (textAnchor !== 'start') {
- var _width = child.measureTextRecursive(ctx);
-
- textParent.x += -1 * (textAnchor === 'end' ? _width : _width / 2.0);
- }
-
- if (dxAttr.hasValue()) {
- textParent.x += dxAttr.getPixels('x');
- }
-
- child.x = textParent.x;
- }
-
- textParent.x = child.x + child.measureText(ctx);
-
- if (yAttr.hasValue()) {
- child.y = yAttr.getPixels('y');
-
- if (dyAttr.hasValue()) {
- child.y += dyAttr.getPixels('y');
- }
- } else {
- if (dyAttr.hasValue()) {
- textParent.y += dyAttr.getPixels('y');
- }
-
- child.y = textParent.y;
- }
-
- textParent.y = child.y;
- child.clearContext(ctx);
- ctx.restore();
- return child;
- }
- }, {
- key: "getChildBoundingBox",
- value: function getChildBoundingBox(ctx, textParent, parent, i) {
- var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
- var boundingBox = child.getBoundingBox(ctx);
-
- if (!boundingBox) {
- return null;
- }
-
- child.children.forEach(function (_, i) {
- var childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
- boundingBox.addBoundingBox(childBoundingBox);
- });
- return boundingBox;
- }
- }, {
- key: "renderChild",
- value: function renderChild(ctx, textParent, parent, i) {
- var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
- child.render(ctx);
- child.children.forEach(function (_, i) {
- textParent.renderChild(ctx, textParent, child, i);
- });
- }
- }, {
- key: "measureTextRecursive",
- value: function measureTextRecursive(ctx) {
- var width = this.children.reduce(function (width, child) {
- return width + child.measureTextRecursive(ctx);
- }, this.measureText(ctx));
- return width;
- }
- }, {
- key: "measureText",
- value: function measureText(ctx) {
- var measureCache = this.measureCache;
-
- if (~measureCache) {
- return measureCache;
- }
-
- var renderText = this.getText();
- var measure = this.measureTargetText(ctx, renderText);
- this.measureCache = measure;
- return measure;
- }
- }, {
- key: "measureTargetText",
- value: function measureTargetText(ctx, targetText) {
- if (!targetText.length) {
- return 0;
- }
-
- var parent = this.parent;
- var customFont = parent.getStyle('font-family').getDefinition();
-
- if (customFont) {
- var fontSize = this.getFontSize();
- var text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;
- var dx = toNumbers(parent.getAttribute('dx').getString());
- var len = text.length;
- var _measure = 0;
-
- for (var i = 0; i < len; i++) {
- var glyph = this.getGlyph(customFont, text, i);
- _measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
-
- if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
- _measure += dx[i];
- }
- }
-
- return _measure;
- }
-
- if (!ctx.measureText) {
- return targetText.length * 10;
- }
-
- ctx.save();
- this.setContext(ctx, true);
-
- var _ctx$measureText = ctx.measureText(targetText),
- measure = _ctx$measureText.width;
-
- this.clearContext(ctx);
- ctx.restore();
- return measure;
- }
- }]);
-
- return TextElement;
- }(RenderedElement);
-
- function _createSuper$6(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$6()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TSpanElement = /*#__PURE__*/function (_TextElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TSpanElement, _TextElement);
-
- var _super = _createSuper$6(TSpanElement);
-
- function TSpanElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TSpanElement);
-
- _this = _super.call(this, document, node, (this instanceof TSpanElement ? this.constructor : void 0) === TSpanElement ? true : captureTextNodes);
- _this.type = 'tspan'; // if this node has children, then they own the text
-
- _this.text = _this.children.length > 0 ? '' : _this.getTextFromNode();
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TSpanElement, [{
- key: "getText",
- value: function getText() {
- return this.text;
- }
- }]);
-
- return TSpanElement;
- }(TextElement);
-
- function _createSuper$7(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$7()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TextNode = /*#__PURE__*/function (_TSpanElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextNode, _TSpanElement);
-
- var _super = _createSuper$7(TextNode);
-
- function TextNode() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextNode);
-
- _this = _super.apply(this, arguments);
- _this.type = 'textNode';
- return _this;
- }
-
- return TextNode;
- }(TSpanElement);
-
- function preparePath(path) {
- var d = path.replace(/,/gm, ' ') // get rid of all commas
- // As the end of a match can also be the start of the next match, we need to run this replace twice.
- .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
- .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
- .replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2') // prefix commands with spaces
- .replace(/([0-9])([+\-])/gm, '$1 $2') // separate digits on +- signs
- // Again, we need to run this twice to find all occurances
- .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
- .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
- .replace(/([Aa](?:\s+(?:[0-9]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm, '$1 $2 $3 '); // shorthand elliptical arc path syntax
-
- return compressSpaces(d).trim();
- }
-
- var PathParser = /*#__PURE__*/function () {
- function PathParser(path) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathParser);
-
- this.control = null;
- this.start = null;
- this.current = null;
- this.command = '';
- this.tokens = [];
- this.i = -1;
- this.previousCommand = '';
- this.points = [];
- this.angles = [];
- this.tokens = preparePath(path).split(' ');
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathParser, [{
- key: "reset",
- value: function reset() {
- this.i = -1;
- this.command = '';
- this.previousCommand = '';
- this.start = new Point(0, 0);
- this.control = new Point(0, 0);
- this.current = new Point(0, 0);
- this.points = [];
- this.angles = [];
- }
- }, {
- key: "isEnd",
- value: function isEnd() {
- var i = this.i,
- tokens = this.tokens;
- return i >= tokens.length - 1;
- }
- }, {
- key: "isCommandOrEnd",
- value: function isCommandOrEnd() {
- if (this.isEnd()) {
- return true;
- }
-
- var i = this.i,
- tokens = this.tokens;
- return /^[A-Za-z]$/.test(tokens[i + 1]);
- }
- }, {
- key: "isRelativeCommand",
- value: function isRelativeCommand() {
- switch (this.command) {
- case 'm':
- case 'l':
- case 'h':
- case 'v':
- case 'c':
- case 's':
- case 'q':
- case 't':
- case 'a':
- case 'z':
- return true;
-
- default:
- return false;
- }
- }
- }, {
- key: "getToken",
- value: function getToken() {
- this.i++;
- return this.tokens[this.i];
- }
- }, {
- key: "getScalar",
- value: function getScalar() {
- return parseFloat(this.getToken());
- }
- }, {
- key: "nextCommand",
- value: function nextCommand() {
- this.previousCommand = this.command;
- this.command = this.getToken();
- }
- }, {
- key: "getPoint",
- value: function getPoint() {
- var point = new Point(this.getScalar(), this.getScalar());
- return this.makeAbsolute(point);
- }
- }, {
- key: "getAsControlPoint",
- value: function getAsControlPoint() {
- var point = this.getPoint();
- this.control = point;
- return point;
- }
- }, {
- key: "getAsCurrentPoint",
- value: function getAsCurrentPoint() {
- var point = this.getPoint();
- this.current = point;
- return point;
- }
- }, {
- key: "getReflectedControlPoint",
- value: function getReflectedControlPoint() {
- var previousCommand = this.previousCommand.toLowerCase();
-
- if (previousCommand !== 'c' && previousCommand !== 's' && previousCommand !== 'q' && previousCommand !== 't') {
- return this.current;
- } // reflect point
-
-
- var _this$current = this.current,
- cx = _this$current.x,
- cy = _this$current.y,
- _this$control = this.control,
- ox = _this$control.x,
- oy = _this$control.y;
- var point = new Point(2 * cx - ox, 2 * cy - oy);
- return point;
- }
- }, {
- key: "makeAbsolute",
- value: function makeAbsolute(point) {
- if (this.isRelativeCommand()) {
- var _this$current2 = this.current,
- x = _this$current2.x,
- y = _this$current2.y;
- point.x += x;
- point.y += y;
- }
-
- return point;
- }
- }, {
- key: "addMarker",
- value: function addMarker(point, from, priorTo) {
- var points = this.points,
- angles = this.angles; // if the last angle isn't filled in because we didn't have this point yet ...
-
- if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
- angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
- }
-
- this.addMarkerAngle(point, from ? from.angleTo(point) : null);
- }
- }, {
- key: "addMarkerAngle",
- value: function addMarkerAngle(point, angle) {
- this.points.push(point);
- this.angles.push(angle);
- }
- }, {
- key: "getMarkerPoints",
- value: function getMarkerPoints() {
- return this.points;
- }
- }, {
- key: "getMarkerAngles",
- value: function getMarkerAngles() {
- var angles = this.angles;
- var len = angles.length;
-
- for (var i = 0; i < len; i++) {
- if (!angles[i]) {
- for (var j = i + 1; j < len; j++) {
- if (angles[j]) {
- angles[i] = angles[j];
- break;
- }
- }
- }
- }
-
- return angles;
- }
- }]);
-
- return PathParser;
- }();
-
- function _createSuper$8(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$8()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var PathElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PathElement, _RenderedElement);
-
- var _super = _createSuper$8(PathElement);
-
- function PathElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'path';
- _this.pathParser = null;
- _this.pathParser = new PathParser(_this.getAttribute('d').getString());
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathElement, [{
- key: "path",
- value: function path(ctx) {
- var pathParser = this.pathParser;
- var boundingBox = new BoundingBox();
- pathParser.reset();
-
- if (ctx) {
- ctx.beginPath();
- }
-
- while (!pathParser.isEnd()) {
- pathParser.nextCommand();
-
- switch (pathParser.command) {
- case 'M':
- case 'm':
- this.pathM(ctx, boundingBox);
- break;
-
- case 'L':
- case 'l':
- this.pathL(ctx, boundingBox);
- break;
-
- case 'H':
- case 'h':
- this.pathH(ctx, boundingBox);
- break;
-
- case 'V':
- case 'v':
- this.pathV(ctx, boundingBox);
- break;
-
- case 'C':
- case 'c':
- this.pathC(ctx, boundingBox);
- break;
-
- case 'S':
- case 's':
- this.pathS(ctx, boundingBox);
- break;
-
- case 'Q':
- case 'q':
- this.pathQ(ctx, boundingBox);
- break;
-
- case 'T':
- case 't':
- this.pathT(ctx, boundingBox);
- break;
-
- case 'A':
- case 'a':
- this.pathA(ctx, boundingBox);
- break;
-
- case 'Z':
- case 'z':
- this.pathZ(ctx, boundingBox);
- break;
- }
- }
-
- return boundingBox;
- }
- }, {
- key: "getBoundingBox",
- value: function getBoundingBox(_) {
- return this.path();
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- var pathParser = this.pathParser;
- var points = pathParser.getMarkerPoints();
- var angles = pathParser.getMarkerAngles();
- var markers = points.map(function (point, i) {
- return [point, angles[i]];
- });
- return markers;
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- this.path(ctx);
- this.document.screen.mouse.checkPath(this, ctx);
- var fillRuleStyleProp = this.getStyle('fill-rule');
-
- if (ctx.fillStyle !== '') {
- if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
- ctx.fill(fillRuleStyleProp.getString());
- } else {
- ctx.fill();
- }
- }
-
- if (ctx.strokeStyle !== '') {
- ctx.stroke();
- }
-
- var markers = this.getMarkers();
-
- if (markers) {
- var markersLastIndex = markers.length - 1;
- var markerStartStyleProp = this.getStyle('marker-start');
- var markerMidStyleProp = this.getStyle('marker-mid');
- var markerEndStyleProp = this.getStyle('marker-end');
-
- if (markerStartStyleProp.isUrlDefinition()) {
- var marker = markerStartStyleProp.getDefinition();
-
- var _markers$ = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[0], 2),
- point = _markers$[0],
- angle = _markers$[1];
-
- marker.render(ctx, point, angle);
- }
-
- if (markerMidStyleProp.isUrlDefinition()) {
- var _marker = markerMidStyleProp.getDefinition();
-
- for (var i = 1; i < markersLastIndex; i++) {
- var _markers$i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[i], 2),
- _point = _markers$i[0],
- _angle = _markers$i[1];
-
- _marker.render(ctx, _point, _angle);
- }
- }
-
- if (markerEndStyleProp.isUrlDefinition()) {
- var _marker2 = markerEndStyleProp.getDefinition();
-
- var _markers$markersLastI = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[markersLastIndex], 2),
- _point2 = _markers$markersLastI[0],
- _angle2 = _markers$markersLastI[1];
-
- _marker2.render(ctx, _point2, _angle2);
- }
- }
- }
- }, {
- key: "pathM",
- value: function pathM(ctx, boundingBox) {
- var pathParser = this.pathParser;
- var point = pathParser.getAsCurrentPoint();
- var x = point.x,
- y = point.y;
- pathParser.addMarker(point);
- boundingBox.addPoint(x, y);
-
- if (ctx) {
- ctx.moveTo(x, y);
- }
-
- pathParser.start = pathParser.current;
-
- while (!pathParser.isCommandOrEnd()) {
- var _point3 = pathParser.getAsCurrentPoint();
-
- var _x = _point3.x,
- _y = _point3.y;
- pathParser.addMarker(_point3, pathParser.start);
- boundingBox.addPoint(_x, _y);
-
- if (ctx) {
- ctx.lineTo(_x, _y);
- }
- }
- }
- }, {
- key: "pathL",
- value: function pathL(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = pathParser.getAsCurrentPoint();
- var x = point.x,
- y = point.y;
- pathParser.addMarker(point, current);
- boundingBox.addPoint(x, y);
-
- if (ctx) {
- ctx.lineTo(x, y);
- }
- }
- }
- }, {
- key: "pathH",
- value: function pathH(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
- pathParser.addMarker(point, current);
- pathParser.current = point;
- boundingBox.addPoint(point.x, point.y);
-
- if (ctx) {
- ctx.lineTo(point.x, point.y);
- }
- }
- }
- }, {
- key: "pathV",
- value: function pathV(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
- pathParser.addMarker(point, current);
- pathParser.current = point;
- boundingBox.addPoint(point.x, point.y);
-
- if (ctx) {
- ctx.lineTo(point.x, point.y);
- }
- }
- }
- }, {
- key: "pathC",
- value: function pathC(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = pathParser.getPoint();
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- pathParser.addMarker(currentPoint, controlPoint, point);
- boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
-
- if (ctx) {
- ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }
- }, {
- key: "pathS",
- value: function pathS(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = pathParser.getReflectedControlPoint();
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- pathParser.addMarker(currentPoint, controlPoint, point);
- boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
-
- if (ctx) {
- ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }
- }, {
- key: "pathQ",
- value: function pathQ(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- pathParser.addMarker(currentPoint, controlPoint, controlPoint);
- boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
-
- if (ctx) {
- ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }
- }, {
- key: "pathT",
- value: function pathT(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var controlPoint = pathParser.getReflectedControlPoint();
- pathParser.control = controlPoint;
- var currentPoint = pathParser.getAsCurrentPoint();
- pathParser.addMarker(currentPoint, controlPoint, controlPoint);
- boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
-
- if (ctx) {
- ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }
- }, {
- key: "pathA",
- value: function pathA(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var rx = pathParser.getScalar();
- var ry = pathParser.getScalar();
- var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0);
- var largeArcFlag = pathParser.getScalar();
- var sweepFlag = pathParser.getScalar();
- var currentPoint = pathParser.getAsCurrentPoint(); // Conversion from endpoint to center parameterization
- // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
- // x1', y1'
-
- var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
-
- var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
-
- if (l > 1) {
- rx *= Math.sqrt(l);
- ry *= Math.sqrt(l);
- } // cx', cy'
-
-
- var s = (largeArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(currp.y, 2) - Math.pow(ry, 2) * Math.pow(currp.x, 2)) / (Math.pow(rx, 2) * Math.pow(currp.y, 2) + Math.pow(ry, 2) * Math.pow(currp.x, 2)));
-
- if (isNaN(s)) {
- s = 0;
- }
-
- var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
-
- var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
-
- var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // angle delta
-
- var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
- var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
- var ad = vectorsAngle(u, v);
-
- if (vectorsRatio(u, v) <= -1) {
- ad = Math.PI;
- }
-
- if (vectorsRatio(u, v) >= 1) {
- ad = 0;
- } // for markers
-
-
- var dir = 1 - sweepFlag ? 1.0 : -1.0;
- var ah = a1 + dir * (ad / 2.0);
- var halfWay = new Point(centp.x + rx * Math.cos(ah), centp.y + ry * Math.sin(ah));
- pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
- pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
- boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
-
- if (ctx && !isNaN(a1) && !isNaN(ad)) {
- var r = rx > ry ? rx : ry;
- var sx = rx > ry ? 1 : rx / ry;
- var sy = rx > ry ? ry / rx : 1;
- ctx.translate(centp.x, centp.y);
- ctx.rotate(xAxisRotation);
- ctx.scale(sx, sy);
- ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
- ctx.scale(1 / sx, 1 / sy);
- ctx.rotate(-xAxisRotation);
- ctx.translate(-centp.x, -centp.y);
- }
- }
- }
- }, {
- key: "pathZ",
- value: function pathZ(ctx, boundingBox) {
- var pathParser = this.pathParser;
-
- if (ctx) {
- // only close path if it is not a straight line
- if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {
- ctx.closePath();
- }
- }
-
- pathParser.current = pathParser.start;
- }
- }]);
-
- return PathElement;
- }(RenderedElement);
-
- function _createSuper$9(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$9()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var SVGElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SVGElement, _RenderedElement);
-
- var _super = _createSuper$9(SVGElement);
-
- function SVGElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'svg';
- _this.root = false;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGElement, [{
- key: "clearContext",
- value: function clearContext(ctx) {
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(SVGElement.prototype), "clearContext", this).call(this, ctx);
-
- this.document.screen.viewPort.removeCurrent();
- }
- }, {
- key: "setContext",
- value: function setContext(ctx) {
- var document = this.document;
- var screen = document.screen,
- window = document.window;
- var canvas = ctx.canvas;
- screen.setDefaults(ctx);
-
- if (canvas.style && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {
- ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
- var fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
-
- if (fontSizeProp.hasValue()) {
- document.rootEmSize = fontSizeProp.getPixels('y');
- document.emSize = document.rootEmSize;
- }
- }
-
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(SVGElement.prototype), "setContext", this).call(this, ctx); // create new view port
-
-
- if (!this.getAttribute('x').hasValue()) {
- this.getAttribute('x', true).setValue(0);
- }
-
- if (!this.getAttribute('y').hasValue()) {
- this.getAttribute('y', true).setValue(0);
- }
-
- ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
- var _screen$viewPort = screen.viewPort,
- width = _screen$viewPort.width,
- height = _screen$viewPort.height;
-
- if (!this.getStyle('width').hasValue()) {
- this.getStyle('width', true).setValue('100%');
- }
-
- if (!this.getStyle('height').hasValue()) {
- this.getStyle('height', true).setValue('100%');
- }
-
- if (!this.getStyle('color').hasValue()) {
- this.getStyle('color', true).setValue('black');
- }
-
- var refXAttr = this.getAttribute('refX');
- var refYAttr = this.getAttribute('refY');
- var viewBoxAttr = this.getAttribute('viewBox');
- var viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;
- var clip = !this.root && this.getAttribute('overflow').getValue('hidden') !== 'visible';
- var minX = 0;
- var minY = 0;
- var clipX = 0;
- var clipY = 0;
-
- if (viewBox) {
- minX = viewBox[0];
- minY = viewBox[1];
- }
-
- if (!this.root) {
- width = this.getStyle('width').getPixels('x');
- height = this.getStyle('height').getPixels('y');
-
- if (this.type === 'marker') {
- clipX = minX;
- clipY = minY;
- minX = 0;
- minY = 0;
- }
- }
-
- screen.viewPort.setCurrent(width, height);
-
- if (viewBox) {
- width = viewBox[2];
- height = viewBox[3];
- }
-
- document.setViewBox({
- ctx: ctx,
- aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
- width: screen.viewPort.width,
- desiredWidth: width,
- height: screen.viewPort.height,
- desiredHeight: height,
- minX: minX,
- minY: minY,
- refX: refXAttr.getValue(),
- refY: refYAttr.getValue(),
- clip: clip,
- clipX: clipX,
- clipY: clipY
- });
-
- if (viewBox) {
- screen.viewPort.removeCurrent();
- screen.viewPort.setCurrent(width, height);
- }
- }
- /**
- * Resize SVG to fit in given size.
- * @param width
- * @param height
- * @param preserveAspectRatio
- */
-
- }, {
- key: "resize",
- value: function resize(width) {
- var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
- var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- var widthAttr = this.getAttribute('width', true);
- var heightAttr = this.getAttribute('height', true);
- var viewBoxAttr = this.getAttribute('viewBox');
- var styleAttr = this.getAttribute('style');
- var originWidth = widthAttr.getNumber(0);
- var originHeight = heightAttr.getNumber(0);
-
- if (preserveAspectRatio) {
- if (typeof preserveAspectRatio === 'string') {
- this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
- } else {
- var preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
-
- if (preserveAspectRatioAttr.hasValue()) {
- preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
- }
- }
- }
-
- widthAttr.setValue(width);
- heightAttr.setValue(height);
-
- if (!viewBoxAttr.hasValue()) {
- viewBoxAttr.setValue("0 0 ".concat(originWidth || width, " ").concat(originHeight || height));
- }
-
- if (styleAttr.hasValue()) {
- var widthStyle = this.getStyle('width');
- var heightStyle = this.getStyle('height');
-
- if (widthStyle.hasValue()) {
- widthStyle.setValue("".concat(width, "px"));
- }
-
- if (heightStyle.hasValue()) {
- heightStyle.setValue("".concat(height, "px"));
- }
- }
- }
- }]);
-
- return SVGElement;
- }(RenderedElement);
-
- function _createSuper$a(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$a()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var RectElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RectElement, _PathElement);
-
- var _super = _createSuper$a(RectElement);
-
- function RectElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RectElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'rect';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RectElement, [{
- key: "path",
- value: function path(ctx) {
- var x = this.getAttribute('x').getPixels('x');
- var y = this.getAttribute('y').getPixels('y');
- var width = this.getStyle('width').getPixels('x');
- var height = this.getStyle('height').getPixels('y');
- var rxAttr = this.getAttribute('rx');
- var ryAttr = this.getAttribute('ry');
- var rx = rxAttr.getPixels('x');
- var ry = ryAttr.getPixels('y');
-
- if (rxAttr.hasValue() && !ryAttr.hasValue()) {
- ry = rx;
- }
-
- if (ryAttr.hasValue() && !rxAttr.hasValue()) {
- rx = ry;
- }
-
- rx = Math.min(rx, width / 2.0);
- ry = Math.min(ry, height / 2.0);
-
- if (ctx) {
- var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
- ctx.beginPath(); // always start the path so we don't fill prior paths
-
- if (height > 0 && width > 0) {
- ctx.moveTo(x + rx, y);
- ctx.lineTo(x + width - rx, y);
- ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);
- ctx.lineTo(x + width, y + height - ry);
- ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);
- ctx.lineTo(x + rx, y + height);
- ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);
- ctx.lineTo(x, y + ry);
- ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);
- ctx.closePath();
- }
- }
-
- return new BoundingBox(x, y, x + width, y + height);
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- return null;
- }
- }]);
-
- return RectElement;
- }(PathElement);
-
- function _createSuper$b(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$b()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var CircleElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(CircleElement, _PathElement);
-
- var _super = _createSuper$b(CircleElement);
-
- function CircleElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, CircleElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'circle';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(CircleElement, [{
- key: "path",
- value: function path(ctx) {
- var cx = this.getAttribute('cx').getPixels('x');
- var cy = this.getAttribute('cy').getPixels('y');
- var r = this.getAttribute('r').getPixels();
-
- if (ctx && r > 0) {
- ctx.beginPath();
- ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
- ctx.closePath();
- }
-
- return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- return null;
- }
- }]);
-
- return CircleElement;
- }(PathElement);
-
- function _createSuper$c(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$c()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var EllipseElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(EllipseElement, _PathElement);
-
- var _super = _createSuper$c(EllipseElement);
-
- function EllipseElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, EllipseElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'ellipse';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(EllipseElement, [{
- key: "path",
- value: function path(ctx) {
- var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
- var rx = this.getAttribute('rx').getPixels('x');
- var ry = this.getAttribute('ry').getPixels('y');
- var cx = this.getAttribute('cx').getPixels('x');
- var cy = this.getAttribute('cy').getPixels('y');
-
- if (ctx && rx > 0 && ry > 0) {
- ctx.beginPath();
- ctx.moveTo(cx + rx, cy);
- ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);
- ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);
- ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);
- ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);
- ctx.closePath();
- }
-
- return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- return null;
- }
- }]);
-
- return EllipseElement;
- }(PathElement);
-
- function _createSuper$d(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$d()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var LineElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LineElement, _PathElement);
-
- var _super = _createSuper$d(LineElement);
-
- function LineElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LineElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'line';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LineElement, [{
- key: "getPoints",
- value: function getPoints() {
- return [new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')), new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))];
- }
- }, {
- key: "path",
- value: function path(ctx) {
- var _this$getPoints = this.getPoints(),
- _this$getPoints2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints, 2),
- _this$getPoints2$ = _this$getPoints2[0],
- x0 = _this$getPoints2$.x,
- y0 = _this$getPoints2$.y,
- _this$getPoints2$2 = _this$getPoints2[1],
- x1 = _this$getPoints2$2.x,
- y1 = _this$getPoints2$2.y;
-
- if (ctx) {
- ctx.beginPath();
- ctx.moveTo(x0, y0);
- ctx.lineTo(x1, y1);
- }
-
- return new BoundingBox(x0, y0, x1, y1);
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- var _this$getPoints3 = this.getPoints(),
- _this$getPoints4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints3, 2),
- p0 = _this$getPoints4[0],
- p1 = _this$getPoints4[1];
-
- var a = p0.angleTo(p1);
- return [[p0, a], [p1, a]];
- }
- }]);
-
- return LineElement;
- }(PathElement);
-
- function _createSuper$e(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$e()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var PolylineElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolylineElement, _PathElement);
-
- var _super = _createSuper$e(PolylineElement);
-
- function PolylineElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolylineElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'polyline';
- _this.points = [];
- _this.points = Point.parsePath(_this.getAttribute('points').getString());
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolylineElement, [{
- key: "path",
- value: function path(ctx) {
- var points = this.points;
-
- var _points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(points, 1),
- _points$ = _points[0],
- x0 = _points$.x,
- y0 = _points$.y;
-
- var boundingBox = new BoundingBox(x0, y0);
-
- if (ctx) {
- ctx.beginPath();
- ctx.moveTo(x0, y0);
- }
-
- points.forEach(function (_ref) {
- var x = _ref.x,
- y = _ref.y;
- boundingBox.addPoint(x, y);
-
- if (ctx) {
- ctx.lineTo(x, y);
- }
- });
- return boundingBox;
- }
- }, {
- key: "getMarkers",
- value: function getMarkers() {
- var points = this.points;
- var lastIndex = points.length - 1;
- var markers = [];
- points.forEach(function (point, i) {
- if (i === lastIndex) {
- return;
- }
-
- markers.push([point, point.angleTo(points[i + 1])]);
- });
-
- if (markers.length > 0) {
- markers.push([points[points.length - 1], markers[markers.length - 1][1]]);
- }
-
- return markers;
- }
- }]);
-
- return PolylineElement;
- }(PathElement);
-
- function _createSuper$f(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$f()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var PolygonElement = /*#__PURE__*/function (_PolylineElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolygonElement, _PolylineElement);
-
- var _super = _createSuper$f(PolygonElement);
-
- function PolygonElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolygonElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'polygon';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolygonElement, [{
- key: "path",
- value: function path(ctx) {
- var boundingBox = (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(PolygonElement.prototype), "path", this).call(this, ctx);
-
- var _this$points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(this.points, 1),
- _this$points$ = _this$points[0],
- x = _this$points$.x,
- y = _this$points$.y;
-
- if (ctx) {
- ctx.lineTo(x, y);
- ctx.closePath();
- }
-
- return boundingBox;
- }
- }]);
-
- return PolygonElement;
- }(PolylineElement);
-
- function _createSuper$g(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$g()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var PatternElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PatternElement, _Element);
-
- var _super = _createSuper$g(PatternElement);
-
- function PatternElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PatternElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'pattern';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PatternElement, [{
- key: "createPattern",
- value: function createPattern(ctx, _, parentOpacityProp) {
- var width = this.getStyle('width').getPixels('x', true);
- var height = this.getStyle('height').getPixels('y', true); // render me using a temporary svg element
-
- var patternSvg = new SVGElement(this.document, null);
- patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
- patternSvg.attributes.width = new Property(this.document, 'width', "".concat(width, "px"));
- patternSvg.attributes.height = new Property(this.document, 'height', "".concat(height, "px"));
- patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
- patternSvg.children = this.children;
- var patternCanvas = this.document.createCanvas(width, height);
- var patternCtx = patternCanvas.getContext('2d');
- var xAttr = this.getAttribute('x');
- var yAttr = this.getAttribute('y');
-
- if (xAttr.hasValue() && yAttr.hasValue()) {
- patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
- }
-
- if (parentOpacityProp.hasValue()) {
- this.styles['fill-opacity'] = parentOpacityProp;
- } else {
- Reflect.deleteProperty(this.styles, 'fill-opacity');
- } // render 3x3 grid so when we transform there's no white space on edges
-
-
- for (var x = -1; x <= 1; x++) {
- for (var y = -1; y <= 1; y++) {
- patternCtx.save();
- patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
- patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
- patternSvg.render(patternCtx);
- patternCtx.restore();
- }
- }
-
- var pattern = ctx.createPattern(patternCanvas, 'repeat');
- return pattern;
- }
- }]);
-
- return PatternElement;
- }(Element);
-
- function _createSuper$h(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$h()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var MarkerElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MarkerElement, _Element);
-
- var _super = _createSuper$h(MarkerElement);
-
- function MarkerElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MarkerElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'marker';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MarkerElement, [{
- key: "render",
- value: function render(ctx, point, angle) {
- if (!point) {
- return;
- }
-
- var x = point.x,
- y = point.y;
- var orient = this.getAttribute('orient').getValue('auto');
- var markerUnits = this.getAttribute('markerUnits').getValue('strokeWidth');
- ctx.translate(x, y);
-
- if (orient === 'auto') {
- ctx.rotate(angle);
- }
-
- if (markerUnits === 'strokeWidth') {
- ctx.scale(ctx.lineWidth, ctx.lineWidth);
- }
-
- ctx.save(); // render me using a temporary svg element
-
- var markerSvg = new SVGElement(this.document, null);
- markerSvg.type = this.type;
- markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
- markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
- markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
- markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
- markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
- markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
- markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
- markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
- markerSvg.children = this.children;
- markerSvg.render(ctx);
- ctx.restore();
-
- if (markerUnits === 'strokeWidth') {
- ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
- }
-
- if (orient === 'auto') {
- ctx.rotate(-angle);
- }
-
- ctx.translate(-x, -y);
- }
- }]);
-
- return MarkerElement;
- }(Element);
-
- function _createSuper$i(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$i()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var DefsElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DefsElement, _Element);
-
- var _super = _createSuper$i(DefsElement);
-
- function DefsElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DefsElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'defs';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(DefsElement, [{
- key: "render",
- value: function render() {// NOOP
- }
- }]);
-
- return DefsElement;
- }(Element);
-
- function _createSuper$j(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$j()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var GElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GElement, _RenderedElement);
-
- var _super = _createSuper$j(GElement);
-
- function GElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'g';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GElement, [{
- key: "getBoundingBox",
- value: function getBoundingBox(ctx) {
- var boundingBox = new BoundingBox();
- this.children.forEach(function (child) {
- boundingBox.addBoundingBox(child.getBoundingBox(ctx));
- });
- return boundingBox;
- }
- }]);
-
- return GElement;
- }(RenderedElement);
-
- function _createSuper$k(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$k()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var GradientElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GradientElement, _Element);
-
- var _super = _createSuper$k(GradientElement);
-
- function GradientElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GradientElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.attributesToInherit = ['gradientUnits'];
- _this.stops = [];
-
- var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
- stops = _assertThisInitialize.stops,
- children = _assertThisInitialize.children;
-
- children.forEach(function (child) {
- if (child.type === 'stop') {
- stops.push(child);
- }
- });
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GradientElement, [{
- key: "getGradientUnits",
- value: function getGradientUnits() {
- return this.getAttribute('gradientUnits').getString('objectBoundingBox');
- }
- }, {
- key: "createGradient",
- value: function createGradient(ctx, element, parentOpacityProp) {
- var _this2 = this;
-
- // tslint:disable-next-line: no-this-assignment
- var stopsContainer = this;
-
- if (this.getHrefAttribute().hasValue()) {
- stopsContainer = this.getHrefAttribute().getDefinition();
- this.inheritStopContainer(stopsContainer);
- }
-
- var _stopsContainer = stopsContainer,
- stops = _stopsContainer.stops;
- var gradient = this.getGradient(ctx, element);
-
- if (!gradient) {
- return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
- }
-
- stops.forEach(function (stop) {
- gradient.addColorStop(stop.offset, _this2.addParentOpacity(parentOpacityProp, stop.color));
- });
-
- if (this.getAttribute('gradientTransform').hasValue()) {
- // render as transformed pattern on temporary canvas
- var document = this.document;
- var _document$screen = document.screen,
- MAX_VIRTUAL_PIXELS = _document$screen.MAX_VIRTUAL_PIXELS,
- viewPort = _document$screen.viewPort;
-
- var _viewPort$viewPorts = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(viewPort.viewPorts, 1),
- rootView = _viewPort$viewPorts[0];
-
- var rect = new RectElement(document, null);
- rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
- rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
- rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
- rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
- var group = new GElement(document, null);
- group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
- group.children = [rect];
- var patternSvg = new SVGElement(document, null);
- patternSvg.attributes.x = new Property(document, 'x', 0);
- patternSvg.attributes.y = new Property(document, 'y', 0);
- patternSvg.attributes.width = new Property(document, 'width', rootView.width);
- patternSvg.attributes.height = new Property(document, 'height', rootView.height);
- patternSvg.children = [group];
- var patternCanvas = document.createCanvas(rootView.width, rootView.height);
- var patternCtx = patternCanvas.getContext('2d');
- patternCtx.fillStyle = gradient;
- patternSvg.render(patternCtx);
- return patternCtx.createPattern(patternCanvas, 'no-repeat');
- }
-
- return gradient;
- }
- }, {
- key: "inheritStopContainer",
- value: function inheritStopContainer(stopsContainer) {
- var _this3 = this;
-
- this.attributesToInherit.forEach(function (attributeToInherit) {
- if (!_this3.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
- _this3.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
- }
- });
- }
- }, {
- key: "addParentOpacity",
- value: function addParentOpacity(parentOpacityProp, color) {
- if (parentOpacityProp.hasValue()) {
- var colorProp = new Property(this.document, 'color', color);
- return colorProp.addOpacity(parentOpacityProp).getColor();
- }
-
- return color;
- }
- }]);
-
- return GradientElement;
- }(Element);
-
- function _createSuper$l(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$l()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var LinearGradientElement = /*#__PURE__*/function (_GradientElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LinearGradientElement, _GradientElement);
-
- var _super = _createSuper$l(LinearGradientElement);
-
- function LinearGradientElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LinearGradientElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'linearGradient';
-
- _this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LinearGradientElement, [{
- key: "getGradient",
- value: function getGradient(ctx, element) {
- var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
- var boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;
-
- if (isBoundingBoxUnits && !boundingBox) {
- return null;
- }
-
- if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {
- this.getAttribute('x1', true).setValue(0);
- this.getAttribute('y1', true).setValue(0);
- this.getAttribute('x2', true).setValue(1);
- this.getAttribute('y2', true).setValue(0);
- }
-
- var x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');
- var y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');
- var x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');
- var y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');
-
- if (x1 === x2 && y1 === y2) {
- return null;
- }
-
- return ctx.createLinearGradient(x1, y1, x2, y2);
- }
- }]);
-
- return LinearGradientElement;
- }(GradientElement);
-
- function _createSuper$m(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$m()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var RadialGradientElement = /*#__PURE__*/function (_GradientElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RadialGradientElement, _GradientElement);
-
- var _super = _createSuper$m(RadialGradientElement);
-
- function RadialGradientElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RadialGradientElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'radialGradient';
-
- _this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RadialGradientElement, [{
- key: "getGradient",
- value: function getGradient(ctx, element) {
- var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
- var boundingBox = element.getBoundingBox(ctx);
-
- if (isBoundingBoxUnits && !boundingBox) {
- return null;
- }
-
- if (!this.getAttribute('cx').hasValue()) {
- this.getAttribute('cx', true).setValue('50%');
- }
-
- if (!this.getAttribute('cy').hasValue()) {
- this.getAttribute('cy', true).setValue('50%');
- }
-
- if (!this.getAttribute('r').hasValue()) {
- this.getAttribute('r', true).setValue('50%');
- }
-
- var cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');
- var cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');
- var fx = cx;
- var fy = cy;
-
- if (this.getAttribute('fx').hasValue()) {
- fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');
- }
-
- if (this.getAttribute('fy').hasValue()) {
- fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');
- }
-
- var r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();
- var fr = this.getAttribute('fr').getPixels();
- return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
- }
- }]);
-
- return RadialGradientElement;
- }(GradientElement);
-
- function _createSuper$n(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$n()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var StopElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StopElement, _Element);
-
- var _super = _createSuper$n(StopElement);
-
- function StopElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StopElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'stop';
- var offset = Math.max(0, Math.min(1, _this.getAttribute('offset').getNumber()));
-
- var stopOpacity = _this.getStyle('stop-opacity');
-
- var stopColor = _this.getStyle('stop-color', true);
-
- if (stopColor.getString() === '') {
- stopColor.setValue('#000');
- }
-
- if (stopOpacity.hasValue()) {
- stopColor = stopColor.addOpacity(stopOpacity);
- }
-
- _this.offset = offset;
- _this.color = stopColor.getColor();
- return _this;
- }
-
- return StopElement;
- }(Element);
-
- function _createSuper$o(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$o()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var AnimateElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateElement, _Element);
-
- var _super = _createSuper$o(AnimateElement);
-
- function AnimateElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'animate';
- _this.duration = 0;
- _this.initialValue = null;
- _this.initialUnits = '';
- _this.removed = false;
- _this.frozen = false;
- document.screen.animations.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
- _this.begin = _this.getAttribute('begin').getMilliseconds();
- _this.maxDuration = _this.begin + _this.getAttribute('dur').getMilliseconds();
- _this.from = _this.getAttribute('from');
- _this.to = _this.getAttribute('to');
- _this.values = _this.getAttribute('values');
-
- if (_this.values.hasValue()) {
- _this.values.setValue(_this.values.getString().split(';'));
- }
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateElement, [{
- key: "getProperty",
- value: function getProperty() {
- var attributeType = this.getAttribute('attributeType').getString();
- var attributeName = this.getAttribute('attributeName').getString();
-
- if (attributeType === 'CSS') {
- return this.parent.getStyle(attributeName, true);
- }
-
- return this.parent.getAttribute(attributeName, true);
- }
- }, {
- key: "calcValue",
- value: function calcValue() {
- var initialUnits = this.initialUnits;
-
- var _this$getProgress = this.getProgress(),
- progress = _this$getProgress.progress,
- from = _this$getProgress.from,
- to = _this$getProgress.to; // tween value linearly
-
-
- var newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
-
- if (initialUnits === '%') {
- newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
- }
-
- return "".concat(newValue).concat(initialUnits);
- }
- }, {
- key: "update",
- value: function update(delta) {
- var parent = this.parent;
- var prop = this.getProperty(); // set initial value
-
- if (!this.initialValue) {
- this.initialValue = prop.getString();
- this.initialUnits = prop.getUnits();
- } // if we're past the end time
-
-
- if (this.duration > this.maxDuration) {
- var fill = this.getAttribute('fill').getString('remove'); // loop for indefinitely repeating animations
-
- if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {
- this.duration = 0;
- } else if (fill === 'freeze' && !this.frozen) {
- this.frozen = true;
- parent.animationFrozen = true;
- parent.animationFrozenValue = prop.getString();
- } else if (fill === 'remove' && !this.removed) {
- this.removed = true;
- prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);
- return true;
- }
-
- return false;
- }
-
- this.duration += delta; // if we're past the begin time
-
- var updated = false;
-
- if (this.begin < this.duration) {
- var newValue = this.calcValue(); // tween
-
- var typeAttr = this.getAttribute('type');
-
- if (typeAttr.hasValue()) {
- // for transform, etc.
- var type = typeAttr.getString();
- newValue = "".concat(type, "(").concat(newValue, ")");
- }
-
- prop.setValue(newValue);
- updated = true;
- }
-
- return updated;
- }
- }, {
- key: "getProgress",
- value: function getProgress() {
- var document = this.document,
- values = this.values;
- var result = {
- progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
- };
-
- if (values.hasValue()) {
- var p = result.progress * (values.getValue().length - 1);
- var lb = Math.floor(p);
- var ub = Math.ceil(p);
- result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
- result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
- result.progress = (p - lb) / (ub - lb);
- } else {
- result.from = this.from;
- result.to = this.to;
- }
-
- return result;
- }
- }]);
-
- return AnimateElement;
- }(Element);
-
- function _createSuper$p(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$p()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var AnimateColorElement = /*#__PURE__*/function (_AnimateElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateColorElement, _AnimateElement);
-
- var _super = _createSuper$p(AnimateColorElement);
-
- function AnimateColorElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateColorElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'animateColor';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateColorElement, [{
- key: "calcValue",
- value: function calcValue() {
- var _this$getProgress = this.getProgress(),
- progress = _this$getProgress.progress,
- from = _this$getProgress.from,
- to = _this$getProgress.to;
-
- var colorFrom = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(from.getColor());
- var colorTo = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(to.getColor());
-
- if (colorFrom.ok && colorTo.ok) {
- // tween color linearly
- var r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
- var g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
- var b = colorFrom.b + (colorTo.b - colorFrom.b) * progress; // ? alpha
-
- return "rgb(".concat(parseInt(r, 10), ", ").concat(parseInt(g, 10), ", ").concat(parseInt(b, 10), ")");
- }
-
- return this.getAttribute('from').getColor();
- }
- }]);
-
- return AnimateColorElement;
- }(AnimateElement);
-
- function _createSuper$q(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$q()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var AnimateTransformElement = /*#__PURE__*/function (_AnimateElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateTransformElement, _AnimateElement);
-
- var _super = _createSuper$q(AnimateTransformElement);
-
- function AnimateTransformElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateTransformElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'animateTransform';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateTransformElement, [{
- key: "calcValue",
- value: function calcValue() {
- var _this$getProgress = this.getProgress(),
- progress = _this$getProgress.progress,
- from = _this$getProgress.from,
- to = _this$getProgress.to; // tween value linearly
-
-
- var transformFrom = toNumbers(from.getString());
- var transformTo = toNumbers(to.getString());
- var newValue = transformFrom.map(function (from, i) {
- var to = transformTo[i];
- return from + (to - from) * progress;
- }).join(' ');
- return newValue;
- }
- }]);
-
- return AnimateTransformElement;
- }(AnimateElement);
-
- function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { 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 it, 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; } } }; }
-
- 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(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
-
- 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; }
-
- function _createSuper$r(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$r()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FontElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontElement, _Element);
-
- var _super = _createSuper$r(FontElement);
-
- function FontElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'font';
- _this.glyphs = {};
- _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
- var definitions = document.definitions;
-
- var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
- children = _assertThisInitialize.children;
-
- var _iterator = _createForOfIteratorHelper(children),
- _step;
-
- try {
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
- var child = _step.value;
-
- switch (child.type) {
- case 'font-face':
- {
- _this.fontFace = child;
- var fontFamilyStyle = child.getStyle('font-family');
-
- if (fontFamilyStyle.hasValue()) {
- definitions[fontFamilyStyle.getString()] = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this);
- }
-
- break;
- }
-
- case 'missing-glyph':
- _this.missingGlyph = child;
- break;
-
- case 'glyph':
- {
- var glyph = child;
-
- if (glyph.arabicForm) {
- _this.isRTL = true;
- _this.isArabic = true;
-
- if (typeof _this.glyphs[glyph.unicode] === 'undefined') {
- _this.glyphs[glyph.unicode] = {};
- }
-
- _this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
- } else {
- _this.glyphs[glyph.unicode] = glyph;
- }
-
- break;
- }
-
- default:
- }
- }
- } catch (err) {
- _iterator.e(err);
- } finally {
- _iterator.f();
- }
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FontElement, [{
- key: "render",
- value: function render() {// NO RENDER
- }
- }]);
-
- return FontElement;
- }(Element);
-
- function _createSuper$s(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$s()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FontFaceElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontFaceElement, _Element);
-
- var _super = _createSuper$s(FontFaceElement);
-
- function FontFaceElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontFaceElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'font-face';
- _this.ascent = _this.getAttribute('ascent').getNumber();
- _this.descent = _this.getAttribute('descent').getNumber();
- _this.unitsPerEm = _this.getAttribute('units-per-em').getNumber();
- return _this;
- }
-
- return FontFaceElement;
- }(Element);
-
- function _createSuper$t(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$t()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var MissingGlyphElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MissingGlyphElement, _PathElement);
-
- var _super = _createSuper$t(MissingGlyphElement);
-
- function MissingGlyphElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MissingGlyphElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'missing-glyph';
- _this.horizAdvX = 0;
- return _this;
- }
-
- return MissingGlyphElement;
- }(PathElement);
-
- function _createSuper$u(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$u()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var GlyphElement = /*#__PURE__*/function (_PathElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GlyphElement, _PathElement);
-
- var _super = _createSuper$u(GlyphElement);
-
- function GlyphElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GlyphElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'glyph';
- _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
- _this.unicode = _this.getAttribute('unicode').getString();
- _this.arabicForm = _this.getAttribute('arabic-form').getString();
- return _this;
- }
-
- return GlyphElement;
- }(PathElement);
-
- function _createSuper$v(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$v()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TRefElement = /*#__PURE__*/function (_TextElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TRefElement, _TextElement);
-
- var _super = _createSuper$v(TRefElement);
-
- function TRefElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TRefElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'tref';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TRefElement, [{
- key: "getText",
- value: function getText() {
- var element = this.getHrefAttribute().getDefinition();
-
- if (element) {
- var firstChild = element.children[0];
-
- if (firstChild) {
- return firstChild.getText();
- }
- }
-
- return '';
- }
- }]);
-
- return TRefElement;
- }(TextElement);
-
- function _createSuper$w(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$w()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var AElement = /*#__PURE__*/function (_TextElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AElement, _TextElement);
-
- var _super = _createSuper$w(AElement);
-
- function AElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'a';
- var childNodes = node.childNodes;
- var firstChild = childNodes[0];
- var hasText = childNodes.length > 0 && Array.from(childNodes).every(function (node) {
- return node.nodeType === 3;
- });
- _this.hasText = hasText;
- _this.text = hasText ? _this.getTextFromNode(firstChild) : '';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AElement, [{
- key: "getText",
- value: function getText() {
- return this.text;
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- if (this.hasText) {
- // render as text element
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(AElement.prototype), "renderChildren", this).call(this, ctx);
-
- var document = this.document,
- x = this.x,
- y = this.y;
- var mouse = document.screen.mouse;
- var fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize); // Do not calc bounding box if mouse is not working.
-
- if (mouse.isWorking()) {
- mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
- }
- } else if (this.children.length > 0) {
- // render as temporary group
- var g = new GElement(this.document, null);
- g.children = this.children;
- g.parent = this;
- g.render(ctx);
- }
- }
- }, {
- key: "onClick",
- value: function onClick() {
- var window = this.document.window;
-
- if (window) {
- window.open(this.getHrefAttribute().getString());
- }
- }
- }, {
- key: "onMouseMove",
- value: function onMouseMove() {
- var ctx = this.document.ctx;
- ctx.canvas.style.cursor = 'pointer';
- }
- }]);
-
- return AElement;
- }(TextElement);
-
- function _createForOfIteratorHelper$1(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray$1(o))) { 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 it, 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; } } }; }
-
- function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(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(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
-
- function _arrayLikeToArray$1(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; }
-
- function _createSuper$x(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$x()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TextPathElement = /*#__PURE__*/function (_TextElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextPathElement, _TextElement);
-
- var _super = _createSuper$x(TextPathElement);
-
- function TextPathElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextPathElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'textPath';
- _this.textWidth = 0;
- _this.textHeight = 0;
- _this.pathLength = -1;
- _this.glyphInfo = null;
- _this.letterSpacingCache = [];
- _this.measuresCache = new Map([['', 0]]);
-
- var pathElement = _this.getHrefAttribute().getDefinition();
-
- _this.text = _this.getTextFromNode();
- _this.dataArray = _this.parsePathData(pathElement);
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextPathElement, [{
- key: "getText",
- value: function getText() {
- return this.text;
- }
- }, {
- key: "path",
- value: function path(ctx) {
- var dataArray = this.dataArray;
-
- if (ctx) {
- ctx.beginPath();
- }
-
- dataArray.forEach(function (_ref) {
- var command = _ref.command,
- points = _ref.points;
-
- switch (command) {
- case 'L':
- if (ctx) {
- ctx.lineTo(points[0], points[1]);
- }
-
- break;
-
- case 'M':
- if (ctx) {
- ctx.moveTo(points[0], points[1]);
- }
-
- break;
-
- case 'C':
- if (ctx) {
- ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
- }
-
- break;
-
- case 'Q':
- if (ctx) {
- ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
- }
-
- break;
-
- case 'A':
- {
- var cx = points[0];
- var cy = points[1];
- var rx = points[2];
- var ry = points[3];
- var theta = points[4];
- var dTheta = points[5];
- var psi = points[6];
- var fs = points[7];
- var r = rx > ry ? rx : ry;
- var scaleX = rx > ry ? 1 : rx / ry;
- var scaleY = rx > ry ? ry / rx : 1;
-
- if (ctx) {
- ctx.translate(cx, cy);
- ctx.rotate(psi);
- ctx.scale(scaleX, scaleY);
- ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
- ctx.scale(1 / scaleX, 1 / scaleY);
- ctx.rotate(-psi);
- ctx.translate(-cx, -cy);
- }
-
- break;
- }
-
- case 'z':
- if (ctx) {
- ctx.closePath();
- }
-
- break;
- }
- });
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- this.setTextData(ctx);
- ctx.save();
- var textDecoration = this.parent.getStyle('text-decoration').getString();
- var fontSize = this.getFontSize();
- var glyphInfo = this.glyphInfo;
- var fill = ctx.fillStyle;
-
- if (textDecoration === 'underline') {
- ctx.beginPath();
- }
-
- glyphInfo.forEach(function (glyph, i) {
- var p0 = glyph.p0,
- p1 = glyph.p1,
- partialText = glyph.text;
- ctx.save();
- ctx.translate(p0.x, p0.y);
- ctx.rotate(glyphInfo[i].rotation);
-
- if (ctx.fillStyle) {
- ctx.fillText(partialText, 0, 0);
- }
-
- if (ctx.strokeStyle) {
- ctx.strokeText(partialText, 0, 0);
- }
-
- ctx.restore();
-
- if (textDecoration === 'underline') {
- if (i === 0) {
- ctx.moveTo(p0.x, p0.y + fontSize / 8);
- }
-
- ctx.lineTo(p1.x, p1.y + fontSize / 5);
- } //// To assist with debugging visually, uncomment following
- //
- // ctx.beginPath();
- // if (i % 2)
- // ctx.strokeStyle = 'red';
- // else
- // ctx.strokeStyle = 'green';
- // ctx.moveTo(p0.x, p0.y);
- // ctx.lineTo(p1.x, p1.y);
- // ctx.stroke();
- // ctx.closePath();
-
- });
-
- if (textDecoration === 'underline') {
- ctx.lineWidth = fontSize / 20;
- ctx.strokeStyle = fill;
- ctx.stroke();
- ctx.closePath();
- }
-
- ctx.restore();
- }
- }, {
- key: "getLetterSpacingAt",
- value: function getLetterSpacingAt() {
- var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
- return this.letterSpacingCache[idx] || 0;
- }
- }, {
- key: "findSegmentToFitChar",
- value: function findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, c, charI) {
- var offset = inputOffset;
- var glyphWidth = this.measureText(ctx, c);
-
- if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {
- glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
- }
-
- if (charI > -1) {
- offset += this.getLetterSpacingAt(charI);
- }
-
- var splineStep = this.textHeight / 20;
- var segment = {
- p0: this.getEquidistantPointOnPath(offset, splineStep),
- p1: this.getEquidistantPointOnPath(offset + glyphWidth, splineStep)
- };
- offset += glyphWidth;
- return {
- offset: offset,
- segment: segment
- };
- }
- }, {
- key: "measureText",
- value: function measureText(ctx, text) {
- var measuresCache = this.measuresCache;
- var targetText = text || this.getText();
-
- if (measuresCache.has(targetText)) {
- return measuresCache.get(targetText);
- }
-
- var measure = this.measureTargetText(ctx, targetText);
- measuresCache.set(targetText, measure);
- return measure;
- } // This method supposes what all custom fonts already loaded.
- // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
- // You need to call this method manually to update glyphs cache.
-
- }, {
- key: "setTextData",
- value: function setTextData(ctx) {
- var _this2 = this;
-
- if (this.glyphInfo) {
- return;
- }
-
- var renderText = this.getText();
- var chars = renderText.split('');
- var spacesNumber = renderText.split(' ').length - 1;
- var dx = toNumbers(this.parent.getAttribute('dx').getString('0'));
- var anchor = this.parent.getStyle('text-anchor').getString('start');
- var thisSpacing = this.getStyle('letter-spacing');
- var parentSpacing = this.parent.getStyle('letter-spacing');
- var letterSpacing = 0;
-
- if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {
- letterSpacing = parentSpacing.getPixels();
- } else if (thisSpacing.hasValue()) {
- if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {
- letterSpacing = thisSpacing.getPixels();
- }
- } // fill letter-spacing cache
-
-
- var letterSpacingCache = [];
- var textLen = renderText.length;
- this.letterSpacingCache = letterSpacingCache;
-
- for (var i = 0; i < textLen; i++) {
- letterSpacingCache.push(typeof dx[i] !== 'undefined' ? dx[i] : letterSpacing);
- }
-
- var dxSum = letterSpacingCache.reduce(function (acc, cur) {
- return acc + cur || 0;
- }, 0);
- this.textWidth = this.measureText(ctx);
- this.textHeight = this.getFontSize();
- var textFullWidth = Math.max(this.textWidth + dxSum, 0);
- this.glyphInfo = [];
- var fullPathWidth = this.getPathLength();
- var startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
- var offset = 0;
-
- if (anchor === 'middle' || anchor === 'center') {
- offset = -textFullWidth / 2;
- }
-
- if (anchor === 'end' || anchor === 'right') {
- offset = -textFullWidth;
- }
-
- offset += startOffset;
- chars.forEach(function (char, i) {
- // Find such segment what distance between p0 and p1 is approx. width of glyph
- var _this2$findSegmentToF = _this2.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, char, i),
- nextOffset = _this2$findSegmentToF.offset,
- segment = _this2$findSegmentToF.segment;
-
- offset = nextOffset;
-
- if (!segment.p0 || !segment.p1) {
- return;
- }
-
- var width = _this2.getLineLength(segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y); // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.
- // Can foresee having a rough pair table built in that the developer can override as needed.
- // Or use "dx" attribute of the <text> node as a naive replacement
-
-
- var kern = 0; // placeholder for future implementation
-
- var midpoint = _this2.getPointOnLine(kern + width / 2.0, segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y);
-
- var rotation = Math.atan2(segment.p1.y - segment.p0.y, segment.p1.x - segment.p0.x);
-
- _this2.glyphInfo.push({
- transposeX: midpoint.x,
- transposeY: midpoint.y,
- text: chars[i],
- p0: segment.p0,
- p1: segment.p1,
- rotation: rotation
- });
- });
- }
- }, {
- key: "parsePathData",
- value: function parsePathData(path) {
- this.pathLength = -1; // reset path length
-
- if (!path) {
- return [];
- }
-
- var pathCommands = [];
- var pathParser = path.pathParser;
- pathParser.reset(); // convert l, H, h, V, and v to L
-
- while (!pathParser.isEnd()) {
- var current = pathParser.current;
- var startX = current ? current.x : 0;
- var startY = current ? current.y : 0;
- var cmd = '';
- var points = [];
- pathParser.nextCommand();
- var upperCommand = pathParser.command.toUpperCase();
-
- switch (pathParser.command) {
- case 'M':
- case 'm':
- cmd = this.pathM(pathParser, points);
- break;
-
- case 'L':
- case 'l':
- cmd = this.pathL(pathParser, points);
- break;
-
- case 'H':
- case 'h':
- cmd = this.pathH(pathParser, points);
- break;
-
- case 'V':
- case 'v':
- cmd = this.pathV(pathParser, points);
- break;
-
- case 'C':
- case 'c':
- this.pathC(pathParser, points);
- break;
-
- case 'S':
- case 's':
- cmd = this.pathS(pathParser, points);
- break;
-
- case 'Q':
- case 'q':
- this.pathQ(pathParser, points);
- break;
-
- case 'T':
- case 't':
- cmd = this.pathT(pathParser, points);
- break;
-
- case 'A':
- case 'a':
- points = this.pathA(pathParser);
- break;
-
- case 'Z':
- case 'z':
- pathParser.current = pathParser.start;
- break;
- }
-
- if (upperCommand !== 'Z') {
- pathCommands.push({
- command: cmd || upperCommand,
- points: points,
- start: {
- x: startX,
- y: startY
- },
- pathLength: this.calcLength(startX, startY, cmd || upperCommand, points)
- });
- } else {
- pathCommands.push({
- command: 'z',
- points: [],
- pathLength: 0
- });
- }
- }
-
- return pathCommands;
- }
- }, {
- key: "pathM",
- value: function pathM(pathParser, points) {
- var p = pathParser.getAsCurrentPoint(); // pathParser.addMarker(p);
-
- points.push(p.x, p.y);
- pathParser.start = pathParser.current;
-
- while (!pathParser.isCommandOrEnd()) {
- var _p = pathParser.getAsCurrentPoint();
-
- points.push(_p.x, _p.y);
- return 'L';
- }
- }
- }, {
- key: "pathL",
- value: function pathL(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var p = pathParser.getAsCurrentPoint();
- points.push(p.x, p.y);
- }
-
- return 'L';
- }
- }, {
- key: "pathH",
- value: function pathH(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
- points.push(point.x, point.y);
- pathParser.current = point;
- }
-
- return 'L';
- }
- }, {
- key: "pathV",
- value: function pathV(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current;
- var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
- points.push(point.x, point.y);
- pathParser.current = point;
- }
-
- return 'L';
- }
- }, {
- key: "pathC",
- value: function pathC(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var point = pathParser.getPoint();
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }, {
- key: "pathS",
- value: function pathS(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var point = pathParser.getReflectedControlPoint();
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
-
- return 'C';
- }
- }, {
- key: "pathQ",
- value: function pathQ(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var controlPoint = pathParser.getAsControlPoint();
- var currentPoint = pathParser.getAsCurrentPoint();
- points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
- }
- }, {
- key: "pathT",
- value: function pathT(pathParser, points) {
- while (!pathParser.isCommandOrEnd()) {
- var controlPoint = pathParser.getReflectedControlPoint();
- pathParser.control = controlPoint;
- var currentPoint = pathParser.getAsCurrentPoint();
- points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
- }
-
- return 'Q';
- }
- }, {
- key: "pathA",
- value: function pathA(pathParser) {
- while (!pathParser.isCommandOrEnd()) {
- var current = pathParser.current; // x1, y1
-
- var rx = pathParser.getScalar();
- var ry = pathParser.getScalar();
- var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0); // φ
-
- var largeArcFlag = pathParser.getScalar(); // fA
-
- var sweepFlag = pathParser.getScalar(); // fS
-
- var currentPoint = pathParser.getAsCurrentPoint(); // x2, y2
- // Conversion from endpoint to center parameterization
- // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
- // x1', y1'
-
- var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
-
- var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
-
- if (l > 1) {
- rx *= Math.sqrt(l);
- ry *= Math.sqrt(l);
- } // cx', cy'
-
-
- var s = (largeArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(currp.y, 2) - Math.pow(ry, 2) * Math.pow(currp.x, 2)) / (Math.pow(rx, 2) * Math.pow(currp.y, 2) + Math.pow(ry, 2) * Math.pow(currp.x, 2)));
-
- if (isNaN(s)) {
- s = 0;
- }
-
- var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
-
- var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
-
- var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // θ1
- // angle delta
-
- var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
- var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
- var ad = vectorsAngle(u, v); // Δθ
-
- if (vectorsRatio(u, v) <= -1) {
- ad = Math.PI;
- }
-
- if (vectorsRatio(u, v) >= 1) {
- ad = 0;
- }
-
- if (sweepFlag === 0 && ad > 0) {
- ad = ad - 2 * Math.PI;
- }
-
- if (sweepFlag === 1 && ad < 0) {
- ad = ad + 2 * Math.PI;
- }
-
- return [centp.x, centp.y, rx, ry, a1, ad, xAxisRotation, sweepFlag];
- }
- }
- }, {
- key: "calcLength",
- value: function calcLength(x, y, cmd, points) {
- var len = 0;
- var p1 = null;
- var p2 = null;
- var t = 0;
-
- switch (cmd) {
- case 'L':
- return this.getLineLength(x, y, points[0], points[1]);
-
- case 'C':
- // Approximates by breaking curve into 100 line segments
- len = 0.0;
- p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
-
- for (t = 0.01; t <= 1; t += 0.01) {
- p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- p1 = p2;
- }
-
- return len;
-
- case 'Q':
- // Approximates by breaking curve into 100 line segments
- len = 0.0;
- p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
-
- for (t = 0.01; t <= 1; t += 0.01) {
- p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- p1 = p2;
- }
-
- return len;
-
- case 'A':
- // Approximates by breaking curve into line segments
- len = 0.0;
- var start = points[4]; // 4 = theta
-
- var dTheta = points[5]; // 5 = dTheta
-
- var end = points[4] + dTheta;
- var inc = Math.PI / 180.0; // 1 degree resolution
-
- if (Math.abs(start - end) < inc) {
- inc = Math.abs(start - end);
- } // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
-
-
- p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
-
- if (dTheta < 0) {
- // clockwise
- for (t = start - inc; t > end; t -= inc) {
- p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- p1 = p2;
- }
- } else {
- // counter-clockwise
- for (t = start + inc; t < end; t += inc) {
- p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- p1 = p2;
- }
- }
-
- p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
- len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
- return len;
- }
-
- return 0;
- }
- }, {
- key: "getPointOnLine",
- value: function getPointOnLine(dist, P1x, P1y, P2x, P2y) {
- var fromX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : P1x;
- var fromY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : P1y;
- var m = (P2y - P1y) / (P2x - P1x + PSEUDO_ZERO);
- var run = Math.sqrt(dist * dist / (1 + m * m));
-
- if (P2x < P1x) {
- run *= -1;
- }
-
- var rise = m * run;
- var pt = null;
-
- if (P2x === P1x) {
- // vertical line
- pt = {
- x: fromX,
- y: fromY + rise
- };
- } else if ((fromY - P1y) / (fromX - P1x + PSEUDO_ZERO) === m) {
- pt = {
- x: fromX + run,
- y: fromY + rise
- };
- } else {
- var ix = 0;
- var iy = 0;
- var len = this.getLineLength(P1x, P1y, P2x, P2y);
-
- if (len < PSEUDO_ZERO) {
- return null;
- }
-
- var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);
- u = u / (len * len);
- ix = P1x + u * (P2x - P1x);
- iy = P1y + u * (P2y - P1y);
- var pRise = this.getLineLength(fromX, fromY, ix, iy);
- var pRun = Math.sqrt(dist * dist - pRise * pRise);
- run = Math.sqrt(pRun * pRun / (1 + m * m));
-
- if (P2x < P1x) {
- run *= -1;
- }
-
- rise = m * run;
- pt = {
- x: ix + run,
- y: iy + rise
- };
- }
-
- return pt;
- }
- }, {
- key: "getPointOnPath",
- value: function getPointOnPath(distance) {
- var fullLen = this.getPathLength();
- var cumulativePathLength = 0;
- var p = null;
-
- if (distance < -0.00005 || distance - 0.00005 > fullLen) {
- return null;
- }
-
- var dataArray = this.dataArray;
-
- var _iterator = _createForOfIteratorHelper$1(dataArray),
- _step;
-
- try {
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
- var pathCmd = _step.value;
-
- if (pathCmd && (pathCmd.pathLength < 0.00005 || cumulativePathLength + pathCmd.pathLength + 0.00005 < distance)) {
- cumulativePathLength += pathCmd.pathLength;
- continue;
- }
-
- var delta = distance - cumulativePathLength;
- var currentT = 0;
-
- switch (pathCmd.command) {
- case 'L':
- p = this.getPointOnLine(delta, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.start.x, pathCmd.start.y);
- break;
-
- case 'A':
- var start = pathCmd.points[4]; // 4 = theta
-
- var dTheta = pathCmd.points[5]; // 5 = dTheta
-
- var end = pathCmd.points[4] + dTheta;
- currentT = start + delta / pathCmd.pathLength * dTheta;
-
- if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {
- break;
- }
-
- p = this.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);
- break;
-
- case 'C':
- currentT = delta / pathCmd.pathLength;
-
- if (currentT > 1) {
- currentT = 1;
- }
-
- p = this.getPointOnCubicBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], pathCmd.points[4], pathCmd.points[5]);
- break;
-
- case 'Q':
- currentT = delta / pathCmd.pathLength;
-
- if (currentT > 1) {
- currentT = 1;
- }
-
- p = this.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);
- break;
-
- default:
- }
-
- if (p) {
- return p;
- }
-
- break;
- }
- } catch (err) {
- _iterator.e(err);
- } finally {
- _iterator.f();
- }
-
- return null;
- }
- }, {
- key: "getLineLength",
- value: function getLineLength(x1, y1, x2, y2) {
- return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
- }
- }, {
- key: "getPathLength",
- value: function getPathLength() {
- if (this.pathLength === -1) {
- this.pathLength = this.dataArray.reduce(function (length, command) {
- return command.pathLength > 0 ? length + command.pathLength : length;
- }, 0);
- }
-
- return this.pathLength;
- }
- }, {
- key: "getPointOnCubicBezier",
- value: function getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {
- var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);
- var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);
- return {
- x: x,
- y: y
- };
- }
- }, {
- key: "getPointOnQuadraticBezier",
- value: function getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {
- var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);
- var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);
- return {
- x: x,
- y: y
- };
- }
- }, {
- key: "getPointOnEllipticalArc",
- value: function getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
- var cosPsi = Math.cos(psi);
- var sinPsi = Math.sin(psi);
- var pt = {
- x: rx * Math.cos(theta),
- y: ry * Math.sin(theta)
- };
- return {
- x: cx + (pt.x * cosPsi - pt.y * sinPsi),
- y: cy + (pt.x * sinPsi + pt.y * cosPsi)
- };
- } // TODO need some optimisations. possibly build cache only for curved segments?
-
- }, {
- key: "buildEquidistantCache",
- value: function buildEquidistantCache(inputStep, inputPrecision) {
- var fullLen = this.getPathLength();
- var precision = inputPrecision || 0.25; // accuracy vs performance
-
- var step = inputStep || fullLen / 100;
-
- if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {
- // Prepare cache
- this.equidistantCache = {
- step: step,
- precision: precision,
- points: []
- }; // Calculate points
-
- var s = 0;
-
- for (var l = 0; l <= fullLen; l += precision) {
- var p0 = this.getPointOnPath(l);
- var p1 = this.getPointOnPath(l + precision);
-
- if (!p0 || !p1) {
- continue;
- }
-
- s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
-
- if (s >= step) {
- this.equidistantCache.points.push({
- x: p0.x,
- y: p0.y,
- distance: l
- });
- s -= step;
- }
- }
- }
- }
- }, {
- key: "getEquidistantPointOnPath",
- value: function getEquidistantPointOnPath(targetDistance, step, precision) {
- this.buildEquidistantCache(step, precision);
-
- if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {
- return null;
- }
-
- var idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));
- return this.equidistantCache.points[idx] || null;
- }
- }]);
-
- return TextPathElement;
- }(TextElement);
-
- function _createSuper$y(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$y()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var ImageElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ImageElement, _RenderedElement);
-
- var _super = _createSuper$y(ImageElement);
-
- function ImageElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ImageElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'image';
- _this.loaded = false;
-
- var href = _this.getHrefAttribute().getString();
-
- if (!href) {
- return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(_this);
- }
-
- var isSvg = /\.svg$/.test(href);
- document.images.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
-
- if (!isSvg) {
- _this.loadImage(href);
- } else {
- _this.loadSvg(href);
- }
-
- _this.isSvg = isSvg;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ImageElement, [{
- key: "loadImage",
- value: function () {
- var _loadImage = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(href) {
- var image;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.prev = 0;
- _context.next = 3;
- return this.document.createImage(href);
-
- case 3:
- image = _context.sent;
- this.image = image;
- _context.next = 10;
- break;
-
- case 7:
- _context.prev = 7;
- _context.t0 = _context["catch"](0);
- // tslint:disable-next-line: no-console
- console.error("Error while loading image \"".concat(href, "\":"), _context.t0);
-
- case 10:
- this.loaded = true;
-
- case 11:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this, [[0, 7]]);
- }));
-
- function loadImage(_x) {
- return _loadImage.apply(this, arguments);
- }
-
- return loadImage;
- }()
- }, {
- key: "loadSvg",
- value: function () {
- var _loadSvg = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(href) {
- var response, svg;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- _context2.prev = 0;
- _context2.next = 3;
- return this.document.fetch(href);
-
- case 3:
- response = _context2.sent;
- _context2.next = 6;
- return response.text();
-
- case 6:
- svg = _context2.sent;
- this.image = svg;
- _context2.next = 13;
- break;
-
- case 10:
- _context2.prev = 10;
- _context2.t0 = _context2["catch"](0);
- // tslint:disable-next-line: no-console
- console.error("Error while loading image \"".concat(href, "\":"), _context2.t0);
-
- case 13:
- this.loaded = true;
-
- case 14:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2, this, [[0, 10]]);
- }));
-
- function loadSvg(_x2) {
- return _loadSvg.apply(this, arguments);
- }
-
- return loadSvg;
- }()
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- var document = this.document,
- image = this.image,
- loaded = this.loaded;
- var x = this.getAttribute('x').getPixels('x');
- var y = this.getAttribute('y').getPixels('y');
- var width = this.getStyle('width').getPixels('x');
- var height = this.getStyle('height').getPixels('y');
-
- if (!loaded || !image || !width || !height) {
- return;
- }
-
- ctx.save();
-
- if (this.isSvg) {
- document.canvg.forkString(ctx, this.image, {
- ignoreMouse: true,
- ignoreAnimation: true,
- ignoreDimensions: true,
- ignoreClear: true,
- offsetX: x,
- offsetY: y,
- scaleWidth: width,
- scaleHeight: height
- }).render();
- } else {
- var _image = this.image;
- ctx.translate(x, y);
- document.setViewBox({
- ctx: ctx,
- aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
- width: width,
- desiredWidth: _image.width,
- height: height,
- desiredHeight: _image.height
- });
-
- if (this.loaded) {
- if (typeof _image.complete === 'undefined' || _image.complete) {
- ctx.drawImage(_image, 0, 0);
- }
- }
- }
-
- ctx.restore();
- }
- }, {
- key: "getBoundingBox",
- value: function getBoundingBox() {
- var x = this.getAttribute('x').getPixels('x');
- var y = this.getAttribute('y').getPixels('y');
- var width = this.getStyle('width').getPixels('x');
- var height = this.getStyle('height').getPixels('y');
- return new BoundingBox(x, y, x + width, y + height);
- }
- }]);
-
- return ImageElement;
- }(RenderedElement);
-
- function _createSuper$z(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$z()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$z() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var SymbolElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SymbolElement, _RenderedElement);
-
- var _super = _createSuper$z(SymbolElement);
-
- function SymbolElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SymbolElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'symbol';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SymbolElement, [{
- key: "render",
- value: function render(_) {// NO RENDER
- }
- }]);
-
- return SymbolElement;
- }(RenderedElement);
-
- var SVGFontLoader = /*#__PURE__*/function () {
- function SVGFontLoader(document) {
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGFontLoader);
-
- this.document = document;
- this.loaded = false;
- document.fonts.push(this);
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGFontLoader, [{
- key: "load",
- value: function () {
- var _load = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(fontFamily, url) {
- var document, svgDocument, fonts;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.prev = 0;
- document = this.document;
- _context.next = 4;
- return document.canvg.parser.load(url);
-
- case 4:
- svgDocument = _context.sent;
- fonts = svgDocument.getElementsByTagName('font');
- Array.from(fonts).forEach(function (fontNode) {
- var font = document.createElement(fontNode);
- document.definitions[fontFamily] = font;
- });
- _context.next = 12;
- break;
-
- case 9:
- _context.prev = 9;
- _context.t0 = _context["catch"](0);
- // tslint:disable-next-line: no-console
- console.error("Error while loading font \"".concat(url, "\":"), _context.t0);
-
- case 12:
- this.loaded = true;
-
- case 13:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this, [[0, 9]]);
- }));
-
- function load(_x, _x2) {
- return _load.apply(this, arguments);
- }
-
- return load;
- }()
- }]);
-
- return SVGFontLoader;
- }();
-
- function _createSuper$A(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$A()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var StyleElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StyleElement, _Element);
-
- var _super = _createSuper$A(StyleElement);
-
- function StyleElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StyleElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'style';
- var css = compressSpaces(Array.from(node.childNodes).map(function (_) {
- return _.data;
- }).join('').replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
- .replace(/@import.*;/g, '') // remove imports
- );
- var cssDefs = css.split('}');
- cssDefs.forEach(function (_) {
- var def = _.trim();
-
- if (!def) {
- return;
- }
-
- var cssParts = def.split('{');
- var cssClasses = cssParts[0].split(',');
- var cssProps = cssParts[1].split(';');
- cssClasses.forEach(function (_) {
- var cssClass = _.trim();
-
- if (!cssClass) {
- return;
- }
-
- var props = document.styles[cssClass] || {};
- cssProps.forEach(function (cssProp) {
- var prop = cssProp.indexOf(':');
- var name = cssProp.substr(0, prop).trim();
- var value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
-
- if (name && value) {
- props[name] = new Property(document, name, value);
- }
- });
- document.styles[cssClass] = props;
- document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
-
- if (cssClass === '@font-face') {
- // && !nodeEnv
- var fontFamily = props['font-family'].getString().replace(/"|'/g, '');
- var srcs = props.src.getString().split(',');
- srcs.forEach(function (src) {
- if (src.indexOf('format("svg")') > 0) {
- var url = parseExternalUrl(src);
-
- if (url) {
- new SVGFontLoader(document).load(fontFamily, url);
- }
- }
- });
- }
- });
- });
- return _this;
- }
-
- return StyleElement;
- }(Element);
- StyleElement.parseExternalUrl = parseExternalUrl;
-
- function _createSuper$B(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$B()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var UseElement = /*#__PURE__*/function (_RenderedElement) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UseElement, _RenderedElement);
-
- var _super = _createSuper$B(UseElement);
-
- function UseElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UseElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'use';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(UseElement, [{
- key: "setContext",
- value: function setContext(ctx) {
- (0,_babel_runtime_helpers_get__WEBPACK_IMPORTED_MODULE_42__.default)((0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(UseElement.prototype), "setContext", this).call(this, ctx);
-
- var xAttr = this.getAttribute('x');
- var yAttr = this.getAttribute('y');
-
- if (xAttr.hasValue()) {
- ctx.translate(xAttr.getPixels('x'), 0);
- }
-
- if (yAttr.hasValue()) {
- ctx.translate(0, yAttr.getPixels('y'));
- }
- }
- }, {
- key: "path",
- value: function path(ctx) {
- var element = this.element;
-
- if (element) {
- element.path(ctx);
- }
- }
- }, {
- key: "renderChildren",
- value: function renderChildren(ctx) {
- var document = this.document,
- element = this.element;
-
- if (element) {
- var tempSvg = element;
-
- if (element.type === 'symbol') {
- // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
- tempSvg = new SVGElement(document, null);
- tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
- tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
- tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
- tempSvg.children = element.children;
- }
-
- if (tempSvg.type === 'svg') {
- var widthStyle = this.getStyle('width', false, true);
- var heightStyle = this.getStyle('height', false, true); // if symbol or svg, inherit width/height from me
-
- if (widthStyle.hasValue()) {
- tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
- }
-
- if (heightStyle.hasValue()) {
- tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
- }
- }
-
- var oldParent = tempSvg.parent;
- tempSvg.parent = this;
- tempSvg.render(ctx);
- tempSvg.parent = oldParent;
- }
- }
- }, {
- key: "getBoundingBox",
- value: function getBoundingBox(ctx) {
- var element = this.element;
-
- if (element) {
- return element.getBoundingBox(ctx);
- }
-
- return null;
- }
- }, {
- key: "elementTransform",
- value: function elementTransform() {
- var document = this.document,
- element = this.element;
- return Transform.fromElement(document, element);
- }
- }, {
- key: "element",
- get: function get() {
- if (!this._element) {
- this._element = this.getHrefAttribute().getDefinition();
- }
-
- return this._element;
- }
- }]);
-
- return UseElement;
- }(RenderedElement);
-
- function _createSuper$C(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$C()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- function imGet(img, x, y, width, _, rgba) {
- return img[y * width * 4 + x * 4 + rgba];
- }
-
- function imSet(img, x, y, width, _, rgba, val) {
- img[y * width * 4 + x * 4 + rgba] = val;
- }
-
- function m(matrix, i, v) {
- var mi = matrix[i];
- return mi * (mi < 0 ? v - 255 : v);
- }
-
- function c(a, m1, m2, m3) {
- return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
- }
-
- var FeColorMatrixElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeColorMatrixElement, _Element);
-
- var _super = _createSuper$C(FeColorMatrixElement);
-
- function FeColorMatrixElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeColorMatrixElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'feColorMatrix';
- var matrix = toNumbers(_this.getAttribute('values').getString());
-
- switch (_this.getAttribute('type').getString('matrix')) {
- // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
- case 'saturate':
- {
- var s = matrix[0];
- matrix = [0.213 + 0.787 * s, 0.715 - 0.715 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 + 0.285 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 - 0.715 * s, 0.072 + 0.928 * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
- break;
- }
-
- case 'hueRotate':
- {
- var a = matrix[0] * Math.PI / 180.0;
- matrix = [c(a, 0.213, 0.787, -0.213), c(a, 0.715, -0.715, -0.715), c(a, 0.072, -0.072, 0.928), 0, 0, c(a, 0.213, -0.213, 0.143), c(a, 0.715, 0.285, 0.140), c(a, 0.072, -0.072, -0.283), 0, 0, c(a, 0.213, -0.213, -0.787), c(a, 0.715, -0.715, 0.715), c(a, 0.072, 0.928, 0.072), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
- break;
- }
-
- case 'luminanceToAlpha':
- matrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0, 0, 0, 0, 0, 1];
- break;
- }
-
- _this.matrix = matrix;
- _this.includeOpacity = _this.getAttribute('includeOpacity').hasValue();
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeColorMatrixElement, [{
- key: "apply",
- value: function apply(ctx, _, __, width, height) {
- // assuming x==0 && y==0 for now
- var includeOpacity = this.includeOpacity,
- matrix = this.matrix;
- var srcData = ctx.getImageData(0, 0, width, height);
-
- for (var y = 0; y < height; y++) {
- for (var x = 0; x < width; x++) {
- var r = imGet(srcData.data, x, y, width, height, 0);
- var g = imGet(srcData.data, x, y, width, height, 1);
- var b = imGet(srcData.data, x, y, width, height, 2);
- var a = imGet(srcData.data, x, y, width, height, 3);
- var nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
- var ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
- var nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
- var na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
-
- if (includeOpacity) {
- nr = ng = nb = 0;
- na *= a / 255;
- }
-
- imSet(srcData.data, x, y, width, height, 0, nr);
- imSet(srcData.data, x, y, width, height, 1, ng);
- imSet(srcData.data, x, y, width, height, 2, nb);
- imSet(srcData.data, x, y, width, height, 3, na);
- }
- }
-
- ctx.clearRect(0, 0, width, height);
- ctx.putImageData(srcData, 0, 0);
- }
- }]);
-
- return FeColorMatrixElement;
- }(Element);
-
- function _createSuper$D(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$D()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$D() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var MaskElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MaskElement, _Element);
-
- var _super = _createSuper$D(MaskElement);
-
- function MaskElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MaskElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'mask';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MaskElement, [{
- key: "apply",
- value: function apply(ctx, element) {
- var document = this.document; // render as temp svg
-
- var x = this.getAttribute('x').getPixels('x');
- var y = this.getAttribute('y').getPixels('y');
- var width = this.getStyle('width').getPixels('x');
- var height = this.getStyle('height').getPixels('y');
-
- if (!width && !height) {
- var boundingBox = new BoundingBox();
- this.children.forEach(function (child) {
- boundingBox.addBoundingBox(child.getBoundingBox(ctx));
- });
- x = Math.floor(boundingBox.x1);
- y = Math.floor(boundingBox.y1);
- width = Math.floor(boundingBox.width);
- height = Math.floor(boundingBox.height);
- }
-
- var ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
- var maskCanvas = document.createCanvas(x + width, y + height);
- var maskCtx = maskCanvas.getContext('2d');
- document.screen.setDefaults(maskCtx);
- this.renderChildren(maskCtx); // convert mask to alpha with a fake node
- // TODO: refactor out apply from feColorMatrix
-
- new FeColorMatrixElement(document, {
- nodeType: 1,
- childNodes: [],
- attributes: [{
- nodeName: 'type',
- value: 'luminanceToAlpha'
- }, {
- nodeName: 'includeOpacity',
- value: 'true'
- }]
- }).apply(maskCtx, 0, 0, x + width, y + height);
- var tmpCanvas = document.createCanvas(x + width, y + height);
- var tmpCtx = tmpCanvas.getContext('2d');
- document.screen.setDefaults(tmpCtx);
- element.render(tmpCtx);
- tmpCtx.globalCompositeOperation = 'destination-in';
- tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
- tmpCtx.fillRect(0, 0, x + width, y + height);
- ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
- ctx.fillRect(0, 0, x + width, y + height); // reassign mask
-
- this.restoreStyles(element, ignoredStyles);
- }
- }, {
- key: "render",
- value: function render(_) {// NO RENDER
- }
- }]);
-
- return MaskElement;
- }(Element);
- MaskElement.ignoreStyles = ['mask', 'transform', 'clip-path'];
-
- function _createSuper$E(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$E()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$E() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var noop = function noop() {};
-
- var ClipPathElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ClipPathElement, _Element);
-
- var _super = _createSuper$E(ClipPathElement);
-
- function ClipPathElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ClipPathElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'clipPath';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ClipPathElement, [{
- key: "apply",
- value: function apply(ctx) {
- var document = this.document;
- var contextProto = Reflect.getPrototypeOf(ctx);
- var beginPath = ctx.beginPath,
- closePath = ctx.closePath;
-
- if (contextProto) {
- contextProto.beginPath = noop;
- contextProto.closePath = noop;
- }
-
- Reflect.apply(beginPath, ctx, []);
- this.children.forEach(function (child) {
- if (typeof child.path === 'undefined') {
- return;
- }
-
- var transform = typeof child.elementTransform !== 'undefined' ? child.elementTransform() : null; // handle <use />
-
- if (!transform) {
- transform = Transform.fromElement(document, child);
- }
-
- if (transform) {
- transform.apply(ctx);
- }
-
- child.path(ctx);
-
- if (contextProto) {
- contextProto.closePath = closePath;
- }
-
- if (transform) {
- transform.unapply(ctx);
- }
- });
- Reflect.apply(closePath, ctx, []);
- ctx.clip();
-
- if (contextProto) {
- contextProto.beginPath = beginPath;
- contextProto.closePath = closePath;
- }
- }
- }, {
- key: "render",
- value: function render(_) {// NO RENDER
- }
- }]);
-
- return ClipPathElement;
- }(Element);
-
- function _createSuper$F(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$F()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$F() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FilterElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FilterElement, _Element);
-
- var _super = _createSuper$F(FilterElement);
-
- function FilterElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FilterElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'filter';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FilterElement, [{
- key: "apply",
- value: function apply(ctx, element) {
- // render as temp svg
- var document = this.document,
- children = this.children;
- var boundingBox = element.getBoundingBox(ctx);
-
- if (!boundingBox) {
- return;
- }
-
- var px = 0;
- var py = 0;
- children.forEach(function (child) {
- var efd = child.extraFilterDistance || 0;
- px = Math.max(px, efd);
- py = Math.max(py, efd);
- });
- var width = Math.floor(boundingBox.width);
- var height = Math.floor(boundingBox.height);
- var tmpCanvasWidth = width + 2 * px;
- var tmpCanvasHeight = height + 2 * py;
-
- if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
- return;
- }
-
- var x = Math.floor(boundingBox.x);
- var y = Math.floor(boundingBox.y);
- var ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
- var tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
- var tmpCtx = tmpCanvas.getContext('2d');
- document.screen.setDefaults(tmpCtx);
- tmpCtx.translate(-x + px, -y + py);
- element.render(tmpCtx); // apply filters
-
- children.forEach(function (child) {
- if (typeof child.apply === 'function') {
- child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
- }
- }); // render on me
-
- ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
- this.restoreStyles(element, ignoredStyles);
- }
- }, {
- key: "render",
- value: function render(_) {// NO RENDER
- }
- }]);
-
- return FilterElement;
- }(Element);
- FilterElement.ignoreStyles = ['filter', 'transform', 'clip-path'];
-
- function _createSuper$G(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$G()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$G() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FeDropShadowElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeDropShadowElement, _Element);
-
- var _super = _createSuper$G(FeDropShadowElement);
-
- function FeDropShadowElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeDropShadowElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'feDropShadow';
-
- _this.addStylesFromStyleDefinition();
-
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeDropShadowElement, [{
- key: "apply",
- value: function apply(_, __, ___, ____, _____) {// TODO: implement
- }
- }]);
-
- return FeDropShadowElement;
- }(Element);
-
- function _createSuper$H(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$H()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$H() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FeMorphologyElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeMorphologyElement, _Element);
-
- var _super = _createSuper$H(FeMorphologyElement);
-
- function FeMorphologyElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeMorphologyElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'feMorphology';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeMorphologyElement, [{
- key: "apply",
- value: function apply(_, __, ___, ____, _____) {// TODO: implement
- }
- }]);
-
- return FeMorphologyElement;
- }(Element);
-
- function _createSuper$I(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$I()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$I() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FeCompositeElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeCompositeElement, _Element);
-
- var _super = _createSuper$I(FeCompositeElement);
-
- function FeCompositeElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeCompositeElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'feComposite';
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeCompositeElement, [{
- key: "apply",
- value: function apply(_, __, ___, ____, _____) {// TODO: implement
- }
- }]);
-
- return FeCompositeElement;
- }(Element);
-
- function _createSuper$J(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$J()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$J() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var FeGaussianBlurElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeGaussianBlurElement, _Element);
-
- var _super = _createSuper$J(FeGaussianBlurElement);
-
- function FeGaussianBlurElement(document, node, captureTextNodes) {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeGaussianBlurElement);
-
- _this = _super.call(this, document, node, captureTextNodes);
- _this.type = 'feGaussianBlur';
- _this.blurRadius = Math.floor(_this.getAttribute('stdDeviation').getNumber());
- _this.extraFilterDistance = _this.blurRadius;
- return _this;
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeGaussianBlurElement, [{
- key: "apply",
- value: function apply(ctx, x, y, width, height) {
- var document = this.document,
- blurRadius = this.blurRadius;
- var body = document.window ? document.window.document.body : null;
- var canvas = ctx.canvas; // StackBlur requires canvas be on document
-
- canvas.id = document.getUniqueId();
-
- if (body) {
- canvas.style.display = 'none';
- body.appendChild(canvas);
- }
-
- (0,stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__.canvasRGBA)(canvas, x, y, width, height, blurRadius);
-
- if (body) {
- body.removeChild(canvas);
- }
- }
- }]);
-
- return FeGaussianBlurElement;
- }(Element);
-
- function _createSuper$K(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$K()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$K() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var TitleElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TitleElement, _Element);
-
- var _super = _createSuper$K(TitleElement);
-
- function TitleElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TitleElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'title';
- return _this;
- }
-
- return TitleElement;
- }(Element);
-
- function _createSuper$L(Derived) { return function () { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(Derived), result; if (_isNativeReflectConstruct$L()) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_31__.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(this, result); }; }
-
- function _isNativeReflectConstruct$L() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
-
- var DescElement = /*#__PURE__*/function (_Element) {
- (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DescElement, _Element);
-
- var _super = _createSuper$L(DescElement);
-
- function DescElement() {
- var _this;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DescElement);
-
- _this = _super.apply(this, arguments);
- _this.type = 'desc';
- return _this;
- }
-
- return DescElement;
- }(Element);
-
- var elementTypes = {
- 'svg': SVGElement,
- 'rect': RectElement,
- 'circle': CircleElement,
- 'ellipse': EllipseElement,
- 'line': LineElement,
- 'polyline': PolylineElement,
- 'polygon': PolygonElement,
- 'path': PathElement,
- 'pattern': PatternElement,
- 'marker': MarkerElement,
- 'defs': DefsElement,
- 'linearGradient': LinearGradientElement,
- 'radialGradient': RadialGradientElement,
- 'stop': StopElement,
- 'animate': AnimateElement,
- 'animateColor': AnimateColorElement,
- 'animateTransform': AnimateTransformElement,
- 'font': FontElement,
- 'font-face': FontFaceElement,
- 'missing-glyph': MissingGlyphElement,
- 'glyph': GlyphElement,
- 'text': TextElement,
- 'tspan': TSpanElement,
- 'tref': TRefElement,
- 'a': AElement,
- 'textPath': TextPathElement,
- 'image': ImageElement,
- 'g': GElement,
- 'symbol': SymbolElement,
- 'style': StyleElement,
- 'use': UseElement,
- 'mask': MaskElement,
- 'clipPath': ClipPathElement,
- 'filter': FilterElement,
- 'feDropShadow': FeDropShadowElement,
- 'feMorphology': FeMorphologyElement,
- 'feComposite': FeCompositeElement,
- 'feColorMatrix': FeColorMatrixElement,
- 'feGaussianBlur': FeGaussianBlurElement,
- 'title': TitleElement,
- 'desc': DescElement
- };
-
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
-
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
-
- function createCanvas(width, height) {
- var canvas = document.createElement('canvas');
- canvas.width = width;
- canvas.height = height;
- return canvas;
- }
-
- function createImage(_x) {
- return _createImage.apply(this, arguments);
- }
-
- function _createImage() {
- _createImage = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(src) {
- var anonymousCrossOrigin,
- image,
- _args = arguments;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- anonymousCrossOrigin = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
- image = document.createElement('img');
-
- if (anonymousCrossOrigin) {
- image.crossOrigin = 'Anonymous';
- }
-
- return _context.abrupt("return", new Promise(function (resolve, reject) {
- image.onload = function () {
- resolve(image);
- };
-
- image.onerror = function () {
- reject();
- };
-
- image.src = src;
- }));
-
- case 4:
- case "end":
- return _context.stop();
- }
- }
- }, _callee);
- }));
- return _createImage.apply(this, arguments);
- }
-
- var Document = /*#__PURE__*/function () {
- function Document(canvg) {
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- _ref$rootEmSize = _ref.rootEmSize,
- rootEmSize = _ref$rootEmSize === void 0 ? 12 : _ref$rootEmSize,
- _ref$emSize = _ref.emSize,
- emSize = _ref$emSize === void 0 ? 12 : _ref$emSize,
- _ref$createCanvas = _ref.createCanvas,
- createCanvas = _ref$createCanvas === void 0 ? Document.createCanvas : _ref$createCanvas,
- _ref$createImage = _ref.createImage,
- createImage = _ref$createImage === void 0 ? Document.createImage : _ref$createImage,
- anonymousCrossOrigin = _ref.anonymousCrossOrigin;
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Document);
-
- this.canvg = canvg;
- this.definitions = {};
- this.styles = {};
- this.stylesSpecificity = {};
- this.images = [];
- this.fonts = [];
- this.emSizeStack = [];
- this.uniqueId = 0;
- this.screen = canvg.screen;
- this.rootEmSize = rootEmSize;
- this.emSize = emSize;
- this.createCanvas = createCanvas;
- this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
- this.screen.wait(this.isImagesLoaded.bind(this));
- this.screen.wait(this.isFontsLoaded.bind(this));
- }
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Document, [{
- key: "bindCreateImage",
- value: function bindCreateImage(createImage, anonymousCrossOrigin) {
- if (typeof anonymousCrossOrigin === 'boolean') {
- return function (source, forceAnonymousCrossOrigin) {
- return createImage(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin);
- };
- }
-
- return createImage;
- }
- }, {
- key: "popEmSize",
- value: function popEmSize() {
- var emSizeStack = this.emSizeStack;
- emSizeStack.pop();
- }
- }, {
- key: "getUniqueId",
- value: function getUniqueId() {
- return "canvg".concat(++this.uniqueId);
- }
- }, {
- key: "isImagesLoaded",
- value: function isImagesLoaded() {
- return this.images.every(function (_) {
- return _.loaded;
- });
- }
- }, {
- key: "isFontsLoaded",
- value: function isFontsLoaded() {
- return this.fonts.every(function (_) {
- return _.loaded;
- });
- }
- }, {
- key: "createDocumentElement",
- value: function createDocumentElement(document) {
- var documentElement = this.createElement(document.documentElement);
- documentElement.root = true;
- documentElement.addStylesFromStyleDefinition();
- this.documentElement = documentElement;
- return documentElement;
- }
- }, {
- key: "createElement",
- value: function createElement(node) {
- var elementType = node.nodeName.replace(/^[^:]+:/, '');
- var ElementType = Document.elementTypes[elementType];
-
- if (typeof ElementType !== 'undefined') {
- return new ElementType(this, node);
- }
-
- return new UnknownElement(this, node);
- }
- }, {
- key: "createTextNode",
- value: function createTextNode(node) {
- return new TextNode(this, node);
- }
- }, {
- key: "setViewBox",
- value: function setViewBox(config) {
- this.screen.setViewBox(_objectSpread({
- document: this
- }, config));
- }
- }, {
- key: "window",
- get: function get() {
- return this.screen.window;
- }
- }, {
- key: "fetch",
- get: function get() {
- return this.screen.fetch;
- }
- }, {
- key: "ctx",
- get: function get() {
- return this.screen.ctx;
- }
- }, {
- key: "emSize",
- get: function get() {
- var emSizeStack = this.emSizeStack;
- return emSizeStack[emSizeStack.length - 1];
- },
- set: function set(value) {
- var emSizeStack = this.emSizeStack;
- emSizeStack.push(value);
- }
- }]);
-
- return Document;
- }();
- Document.createCanvas = createCanvas;
- Document.createImage = createImage;
- Document.elementTypes = elementTypes;
-
- function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
-
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
- /**
- * SVG renderer on canvas.
- */
-
- var Canvg = /*#__PURE__*/function () {
- /**
- * Main constructor.
- * @param ctx - Rendering context.
- * @param svg - SVG Document.
- * @param options - Rendering options.
- */
- function Canvg(ctx, svg) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
- (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Canvg);
-
- this.parser = new Parser(options);
- this.screen = new Screen(ctx, options);
- this.options = options;
- var document = new Document(this, options);
- var documentElement = document.createDocumentElement(svg);
- this.document = document;
- this.documentElement = documentElement;
- }
- /**
- * Create Canvg isntance from SVG source string or URL.
- * @param ctx - Rendering context.
- * @param svg - SVG source string or URL.
- * @param options - Rendering options.
- */
-
-
- (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Canvg, [{
- key: "fork",
-
- /**
- * Create new Canvg instance with inherited options.
- * @param ctx - Rendering context.
- * @param svg - SVG source string or URL.
- * @param options - Rendering options.
- */
- value: function fork(ctx, svg) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- return Canvg.from(ctx, svg, _objectSpread$1({}, this.options, {}, options));
- }
- /**
- * Create new Canvg instance with inherited options.
- * @param ctx - Rendering context.
- * @param svg - SVG source string.
- * @param options - Rendering options.
- */
-
- }, {
- key: "forkString",
- value: function forkString(ctx, svg) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- return Canvg.fromString(ctx, svg, _objectSpread$1({}, this.options, {}, options));
- }
- /**
- * Document is ready promise.
- */
-
- }, {
- key: "ready",
- value: function ready() {
- return this.screen.ready();
- }
- /**
- * Document is ready value.
- */
-
- }, {
- key: "isReady",
- value: function isReady() {
- return this.screen.isReady();
- }
- /**
- * Render only first frame, ignoring animations and mouse.
- * @param options - Rendering options.
- */
-
- }, {
- key: "render",
- value: function () {
- var _render = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
- var options,
- _args = arguments;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
- this.start(_objectSpread$1({
- enableRedraw: true,
- ignoreAnimation: true,
- ignoreMouse: true
- }, options));
- _context.next = 4;
- return this.ready();
-
- case 4:
- this.stop();
-
- case 5:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, this);
- }));
-
- function render() {
- return _render.apply(this, arguments);
- }
-
- return render;
- }()
- /**
- * Start rendering.
- * @param options - Render options.
- */
-
- }, {
- key: "start",
- value: function start() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var documentElement = this.documentElement,
- screen = this.screen,
- baseOptions = this.options;
- screen.start(documentElement, _objectSpread$1({
- enableRedraw: true
- }, baseOptions, {}, options));
- }
- /**
- * Stop rendering.
- */
-
- }, {
- key: "stop",
- value: function stop() {
- this.screen.stop();
- }
- /**
- * Resize SVG to fit in given size.
- * @param width
- * @param height
- * @param preserveAspectRatio
- */
-
- }, {
- key: "resize",
- value: function resize(width) {
- var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
- var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
- this.documentElement.resize(width, height, preserveAspectRatio);
- }
- }], [{
- key: "from",
- value: function () {
- var _from = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee2(ctx, svg) {
- var options,
- parser,
- svgDocument,
- _args2 = arguments;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
- parser = new Parser(options);
- _context2.next = 4;
- return parser.parse(svg);
-
- case 4:
- svgDocument = _context2.sent;
- return _context2.abrupt("return", new Canvg(ctx, svgDocument, options));
-
- case 6:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2);
- }));
-
- function from(_x, _x2) {
- return _from.apply(this, arguments);
- }
-
- return from;
- }()
- /**
- * Create Canvg isntance from SVG source string.
- * @param ctx - Rendering context.
- * @param svg - SVG source string.
- * @param options - Rendering options.
- */
-
- }, {
- key: "fromString",
- value: function fromString(ctx, svg) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- var parser = new Parser(options);
- var svgDocument = parser.parseFromString(svg);
- return new Canvg(ctx, svgDocument, options);
- }
- }]);
-
- return Canvg;
- }();
-
- /**
- * Options preset for `OffscreenCanvas`.
- * @param config - Preset requirements.
- * @param config.DOMParser - XML/HTML parser from string into DOM Document.
- */
- function offscreen() {
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
- DOMParserFallback = _ref.DOMParser;
-
- var preset = {
- window: null,
- ignoreAnimation: true,
- ignoreMouse: true,
- DOMParser: DOMParserFallback,
- createCanvas: function createCanvas(width, height) {
- return new OffscreenCanvas(width, height);
- },
- createImage: function createImage(url) {
- return (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
- var response, blob, img;
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _context.next = 2;
- return fetch(url);
-
- case 2:
- response = _context.sent;
- _context.next = 5;
- return response.blob();
-
- case 5:
- blob = _context.sent;
- _context.next = 8;
- return createImageBitmap(blob);
-
- case 8:
- img = _context.sent;
- return _context.abrupt("return", img);
-
- case 10:
- case "end":
- return _context.stop();
- }
- }
- }, _callee);
- }))();
- }
- };
-
- if (typeof DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {
- Reflect.deleteProperty(preset, 'DOMParser');
- }
-
- return preset;
- }
-
- /**
- * Options preset for `node-canvas`.
- * @param config - Preset requirements.
- * @param config.DOMParser - XML/HTML parser from string into DOM Document.
- * @param config.canvas - `node-canvas` exports.
- * @param config.fetch - WHATWG-compatible `fetch` function.
- */
- function node(_ref) {
- var DOMParser = _ref.DOMParser,
- canvas = _ref.canvas,
- fetch = _ref.fetch;
- return {
- window: null,
- ignoreAnimation: true,
- ignoreMouse: true,
- DOMParser: DOMParser,
- fetch: fetch,
- createCanvas: canvas.createCanvas,
- createImage: canvas.loadImage
- };
- }
-
-
-
- var index = /*#__PURE__*/Object.freeze({
- __proto__: null,
- offscreen: offscreen,
- node: node
- });
-
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Canvg);
-
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9yZWdlbmVyYXRvci1ydW50aW1lL3J1bnRpbWUuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTQtcHJlc2VudCwgRmFjZWJvb2ssIEluYy5cbiAq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ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O1xuXG4gICAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgLy8gRGlzcGF0Y2ggdGhlIGV4Y2VwdGlvbiBieSBsb29waW5nIGJhY2sgYXJvdW5kIHRvIHRoZVxuICAgICAgICAgIC8vIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpIGNhbGwgYWJvdmUuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAg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hIHJldHVybiBtZXRob2QsIGdpdmUgaXQgYVxuICAgICAgICAgIC8vIGNoYW5jZSB0byBjbGVhbiB1cC5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbWF5YmVJbnZva2VEZWxlZ2F0ZShkZWxlZ2F0ZSwgY29udGV4dCk7XG5cbiAgICAgICAgICBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgLy8gSWYgbWF5YmVJbnZva2VEZWxlZ2F0ZShjb250ZXh0KSBjaGFuZ2VkIGNvbnRleHQubWV0aG9kIGZyb21cbiAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnV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lvbi5cbiAgICAgICAgICByZXR1cm4gaGFuZGxlKFwiZW5kXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYpIHtcbiAgICAgICAgICB2YXIgaGFzQ2F0Y2ggPSBoYXNPd24uY2FsbChlbnRyeSwgXCJjYXRjaExvY1wiKTtcbiAgICAgICAgICB2YXIgaGFzRmluYWxseSA9IGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIik7XG5cbiAgICAgICAgICBpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA9IHJlY29yZC5hcmc7XG4gICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRocm93bjtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgY29udGV4dC5jYXRjaCBtZXRob2QgbXVzdCBvbmx5IGJlIGNhbGxlZCB3aXRoIGEgbG9jYXRpb25cbiAgICAgIC8vIGFyZ3VtZW50IHRoYXQgY29ycmVzcG9uZHMgdG8gYSBrbm93biBjYXRjaCBibG9jay5cbiAgICAgIHRocm93IG5ldyBFcnJvcihcImlsbGVnYWwgY2F0Y2ggYXR0ZW1wdFwiKTtcbiAgIC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7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
-
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
- \*********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
- /* harmony export */ });
- 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;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _arrayWithHoles)
- /* harmony export */ });
- function _arrayWithHoles(arr) {
- if (Array.isArray(arr)) return arr;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles)
- /* harmony export */ });
- /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
-
- function _arrayWithoutHoles(arr) {
- if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
- /*!**************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
- \**************************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _assertThisInitialized)
- /* harmony export */ });
- function _assertThisInitialized(self) {
- if (self === void 0) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
-
- return self;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
- \*********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _asyncToGenerator)
- /* harmony export */ });
- 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);
- });
- };
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _classCallCheck)
- /* harmony export */ });
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js":
- /*!****************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
- \****************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _createClass)
- /* harmony export */ });
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
-
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _defineProperty)
- /* harmony export */ });
- function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/get.js":
- /*!********************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/get.js ***!
- \********************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _get)
- /* harmony export */ });
- /* harmony import */ var _superPropBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superPropBase.js */ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js");
-
- function _get(target, property, receiver) {
- if (typeof Reflect !== "undefined" && Reflect.get) {
- _get = Reflect.get;
- } else {
- _get = function _get(target, property, receiver) {
- var base = (0,_superPropBase_js__WEBPACK_IMPORTED_MODULE_0__.default)(target, property);
- if (!base) return;
- var desc = Object.getOwnPropertyDescriptor(base, property);
-
- if (desc.get) {
- return desc.get.call(receiver);
- }
-
- return desc.value;
- };
- }
-
- return _get(target, property, receiver || target);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _getPrototypeOf)
- /* harmony export */ });
- function _getPrototypeOf(o) {
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
- return o.__proto__ || Object.getPrototypeOf(o);
- };
- return _getPrototypeOf(o);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js":
- /*!*************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
- \*************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _inherits)
- /* harmony export */ });
- /* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
-
- function _inherits(subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function");
- }
-
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- writable: true,
- configurable: true
- }
- });
- if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(subClass, superClass);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
- /*!********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
- \********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _iterableToArray)
- /* harmony export */ });
- function _iterableToArray(iter) {
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
- /*!*************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
- \*************************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _iterableToArrayLimit)
- /* harmony export */ });
- function _iterableToArrayLimit(arr, i) {
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
-
- if (_i == null) return;
- var _arr = [];
- var _n = true;
- var _d = false;
-
- var _s, _e;
-
- try {
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
- _arr.push(_s.value);
-
- if (i && _arr.length === i) break;
- }
- } catch (err) {
- _d = true;
- _e = err;
- } finally {
- try {
- if (!_n && _i["return"] != null) _i["return"]();
- } finally {
- if (_d) throw _e;
- }
- }
-
- return _arr;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
- /*!********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
- \********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _nonIterableRest)
- /* harmony export */ });
- 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.");
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _nonIterableSpread)
- /* harmony export */ });
- 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.");
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
- /*!******************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
- \******************************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _possibleConstructorReturn)
- /* harmony export */ });
- /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
- /* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
-
-
- function _possibleConstructorReturn(self, call) {
- if (call && ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__.default)(call) === "object" || typeof call === "function")) {
- return call;
- } else if (call !== void 0) {
- throw new TypeError("Derived constructors may only return object or undefined");
- }
-
- return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__.default)(self);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
- \*******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _setPrototypeOf)
- /* harmony export */ });
- function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
- o.__proto__ = p;
- return o;
- };
-
- return _setPrototypeOf(o, p);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
- /*!******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
- \******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _slicedToArray)
- /* harmony export */ });
- /* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
- /* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js");
- /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
- /* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
-
-
-
-
- function _slicedToArray(arr, i) {
- return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__.default)(arr, i) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__.default)(arr, i) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__.default)();
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js":
- /*!******************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/superPropBase.js ***!
- \******************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _superPropBase)
- /* harmony export */ });
- /* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
-
- function _superPropBase(object, property) {
- while (!Object.prototype.hasOwnProperty.call(object, property)) {
- object = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(object);
- if (object === null) break;
- }
-
- return object;
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _toConsumableArray)
- /* harmony export */ });
- /* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js");
- /* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
- /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
- /* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js");
-
-
-
-
- function _toConsumableArray(arr) {
- return (0,_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__.default)(arr) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__.default)(arr) || (0,_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__.default)();
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
- /*!***********************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
- \***********************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _typeof)
- /* harmony export */ });
- function _typeof(obj) {
- "@babel/helpers - typeof";
-
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
- _typeof = function _typeof(obj) {
- return typeof obj;
- };
- } else {
- _typeof = function _typeof(obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
- };
- }
-
- return _typeof(obj);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
- /*!*******************************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
- \*******************************************************************************/
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
- /* harmony export */ });
- /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
-
- function _unsupportedIterableToArray(o, minLen) {
- if (!o) return;
- if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(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 (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
- }
-
- /***/ }),
-
- /***/ "./node_modules/@babel/runtime/regenerator/index.js":
- /*!**********************************************************!*\
- !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/an-instance.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/internals/an-instance.js ***!
- \*******************************************************/
- /***/ ((module) => {
-
- module.exports = function (it, Constructor, name) {
- if (!(it instanceof Constructor)) {
- throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
- } return it;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-fill.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/internals/array-fill.js ***!
- \******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
-
- // `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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-from.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/internals/array-from.js ***!
- \******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js");
- var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
- var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
-
- // `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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/array-reduce.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/internals/array-reduce.js ***!
- \********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
-
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
- var createMethod = function (IS_RIGHT) {
- return function (that, callbackfn, argumentsLength, memo) {
- aFunction(callbackfn);
- var O = toObject(that);
- var self = IndexedObject(O);
- var length = toLength(O.length);
- var index = IS_RIGHT ? length - 1 : 0;
- var i = IS_RIGHT ? -1 : 1;
- if (argumentsLength < 2) while (true) {
- if (index in self) {
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if (IS_RIGHT ? index < 0 : length <= index) {
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
- };
- };
-
- module.exports = {
- // `Array.prototype.reduce` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
- left: createMethod(false),
- // `Array.prototype.reduceRight` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
- right: createMethod(true)
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js":
- /*!****************************************************************************!*\
- !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
- \****************************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
-
- // 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);
- } catch (error) {
- iteratorClose(iterator);
- throw error;
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/check-correctness-of-iteration.js":
- /*!**************************************************************************!*\
- !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
- \**************************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- 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 es/no-array-from, 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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/classof.js":
- /*!***************************************************!*\
- !*** ./node_modules/core-js/internals/classof.js ***!
- \***************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
- var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- 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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/collection-strong.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/internals/collection-strong.js ***!
- \*************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
- var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
- var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
- var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var fastKey = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js").fastKey;
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
-
- var setInternalState = InternalStateModule.set;
- var internalStateGetterFor = InternalStateModule.getterFor;
-
- module.exports = {
- getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
- var C = wrapper(function (that, iterable) {
- anInstance(that, C, CONSTRUCTOR_NAME);
- setInternalState(that, {
- type: CONSTRUCTOR_NAME,
- index: create(null),
- first: undefined,
- last: undefined,
- size: 0
- });
- if (!DESCRIPTORS) that.size = 0;
- if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
- });
-
- var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
-
- var define = function (that, key, value) {
- var state = getInternalState(that);
- var entry = getEntry(that, key);
- var previous, index;
- // change existing entry
- if (entry) {
- entry.value = value;
- // create new entry
- } else {
- state.last = entry = {
- index: index = fastKey(key, true),
- key: key,
- value: value,
- previous: previous = state.last,
- next: undefined,
- removed: false
- };
- if (!state.first) state.first = entry;
- if (previous) previous.next = entry;
- if (DESCRIPTORS) state.size++;
- else that.size++;
- // add to index
- if (index !== 'F') state.index[index] = entry;
- } return that;
- };
-
- var getEntry = function (that, key) {
- var state = getInternalState(that);
- // fast case
- var index = fastKey(key);
- var entry;
- if (index !== 'F') return state.index[index];
- // frozen object case
- for (entry = state.first; entry; entry = entry.next) {
- if (entry.key == key) return entry;
- }
- };
-
- redefineAll(C.prototype, {
- // `{ Map, Set }.prototype.clear()` methods
- // https://tc39.es/ecma262/#sec-map.prototype.clear
- // https://tc39.es/ecma262/#sec-set.prototype.clear
- clear: function clear() {
- var that = this;
- var state = getInternalState(that);
- var data = state.index;
- var entry = state.first;
- while (entry) {
- entry.removed = true;
- if (entry.previous) entry.previous = entry.previous.next = undefined;
- delete data[entry.index];
- entry = entry.next;
- }
- state.first = state.last = undefined;
- if (DESCRIPTORS) state.size = 0;
- else that.size = 0;
- },
- // `{ Map, Set }.prototype.delete(key)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.delete
- // https://tc39.es/ecma262/#sec-set.prototype.delete
- 'delete': function (key) {
- var that = this;
- var state = getInternalState(that);
- var entry = getEntry(that, key);
- if (entry) {
- var next = entry.next;
- var prev = entry.previous;
- delete state.index[entry.index];
- entry.removed = true;
- if (prev) prev.next = next;
- if (next) next.previous = prev;
- if (state.first == entry) state.first = next;
- if (state.last == entry) state.last = prev;
- if (DESCRIPTORS) state.size--;
- else that.size--;
- } return !!entry;
- },
- // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.foreach
- // https://tc39.es/ecma262/#sec-set.prototype.foreach
- forEach: function forEach(callbackfn /* , that = undefined */) {
- var state = getInternalState(this);
- var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
- var entry;
- while (entry = entry ? entry.next : state.first) {
- boundFunction(entry.value, entry.key, this);
- // revert to the last existing entry
- while (entry && entry.removed) entry = entry.previous;
- }
- },
- // `{ Map, Set}.prototype.has(key)` methods
- // https://tc39.es/ecma262/#sec-map.prototype.has
- // https://tc39.es/ecma262/#sec-set.prototype.has
- has: function has(key) {
- return !!getEntry(this, key);
- }
- });
-
- redefineAll(C.prototype, IS_MAP ? {
- // `Map.prototype.get(key)` method
- // https://tc39.es/ecma262/#sec-map.prototype.get
- get: function get(key) {
- var entry = getEntry(this, key);
- return entry && entry.value;
- },
- // `Map.prototype.set(key, value)` method
- // https://tc39.es/ecma262/#sec-map.prototype.set
- set: function set(key, value) {
- return define(this, key === 0 ? 0 : key, value);
- }
- } : {
- // `Set.prototype.add(value)` method
- // https://tc39.es/ecma262/#sec-set.prototype.add
- add: function add(value) {
- return define(this, value = value === 0 ? 0 : value, value);
- }
- });
- if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
- get: function () {
- return getInternalState(this).size;
- }
- });
- return C;
- },
- setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
- var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
- var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
- var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
- // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
- // https://tc39.es/ecma262/#sec-map.prototype.entries
- // https://tc39.es/ecma262/#sec-map.prototype.keys
- // https://tc39.es/ecma262/#sec-map.prototype.values
- // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
- // https://tc39.es/ecma262/#sec-set.prototype.entries
- // https://tc39.es/ecma262/#sec-set.prototype.keys
- // https://tc39.es/ecma262/#sec-set.prototype.values
- // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
- defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
- setInternalState(this, {
- type: ITERATOR_NAME,
- target: iterated,
- state: getInternalCollectionState(iterated),
- kind: kind,
- last: undefined
- });
- }, function () {
- var state = getInternalIteratorState(this);
- var kind = state.kind;
- var entry = state.last;
- // revert to the last existing entry
- while (entry && entry.removed) entry = entry.previous;
- // get next entry
- if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
- // or finish the iteration
- state.target = undefined;
- return { value: undefined, done: true };
- }
- // return step by kind
- if (kind == 'keys') return { value: entry.key, done: false };
- if (kind == 'values') return { value: entry.value, done: false };
- return { value: [entry.key, entry.value], done: false };
- }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
-
- // `{ Map, Set }.prototype[@@species]` accessors
- // https://tc39.es/ecma262/#sec-get-map-@@species
- // https://tc39.es/ecma262/#sec-get-set-@@species
- setSpecies(CONSTRUCTOR_NAME);
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/collection.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/internals/collection.js ***!
- \******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js");
- var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
- var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
-
- module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
- var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
- var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
- var ADDER = IS_MAP ? 'set' : 'add';
- var NativeConstructor = global[CONSTRUCTOR_NAME];
- var NativePrototype = NativeConstructor && NativeConstructor.prototype;
- var Constructor = NativeConstructor;
- var exported = {};
-
- var fixMethod = function (KEY) {
- var nativeMethod = NativePrototype[KEY];
- redefine(NativePrototype, KEY,
- KEY == 'add' ? function add(value) {
- nativeMethod.call(this, value === 0 ? 0 : value);
- return this;
- } : KEY == 'delete' ? function (key) {
- return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
- } : KEY == 'get' ? function get(key) {
- return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
- } : KEY == 'has' ? function has(key) {
- return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
- } : function set(key, value) {
- nativeMethod.call(this, key === 0 ? 0 : key, value);
- return this;
- }
- );
- };
-
- var REPLACE = isForced(
- CONSTRUCTOR_NAME,
- typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
- new NativeConstructor().entries().next();
- }))
- );
-
- if (REPLACE) {
- // create collection constructor
- Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
- InternalMetadataModule.REQUIRED = true;
- } else if (isForced(CONSTRUCTOR_NAME, true)) {
- var instance = new Constructor();
- // early implementations not supports chaining
- var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
- // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
- var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
- // most early implementations doesn't supports iterables, most modern - not close it correctly
- // eslint-disable-next-line no-new -- required for testing
- var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
- // for early implementations -0 and +0 not the same
- var BUGGY_ZERO = !IS_WEAK && fails(function () {
- // V8 ~ Chromium 42- fails only with 5+ elements
- var $instance = new NativeConstructor();
- var index = 5;
- while (index--) $instance[ADDER](index, index);
- return !$instance.has(-0);
- });
-
- if (!ACCEPT_ITERABLES) {
- Constructor = wrapper(function (dummy, iterable) {
- anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
- var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
- if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
- return that;
- });
- Constructor.prototype = NativePrototype;
- NativePrototype.constructor = Constructor;
- }
-
- if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
- fixMethod('delete');
- fixMethod('has');
- IS_MAP && fixMethod('get');
- }
-
- if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
-
- // weak collections should not contains .clear method
- if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
- }
-
- exported[CONSTRUCTOR_NAME] = Constructor;
- $({ global: true, forced: Constructor != NativeConstructor }, exported);
-
- setToStringTag(Constructor, CONSTRUCTOR_NAME);
-
- if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
-
- return Constructor;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/correct-prototype-getter.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
- \********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- module.exports = !fails(function () {
- function F() { /* empty */ }
- F.prototype.constructor = null;
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
- return Object.getPrototypeOf(new F()) !== F.prototype;
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/create-iterator-constructor.js":
- /*!***********************************************************************!*\
- !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
- \***********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js").IteratorPrototype;
- var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
-
- 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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/create-property.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/internals/create-property.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
- var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
- var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
-
- 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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/define-iterator.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/internals/define-iterator.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "./node_modules/core-js/internals/create-iterator-constructor.js");
- var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
- var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
- var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js");
-
- 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.prototype.{ 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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/define-well-known-symbol.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/internals/define-well-known-symbol.js ***!
- \********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
-
- module.exports = function (NAME) {
- var Symbol = path.Symbol || (path.Symbol = {});
- if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
- value: wrappedWellKnownSymbolModule.f(NAME)
- });
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/engine-is-browser.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/internals/engine-is-browser.js ***!
- \*************************************************************/
- /***/ ((module) => {
-
- module.exports = typeof window == 'object';
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/engine-is-ios.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/internals/engine-is-ios.js ***!
- \*********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
-
- module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/engine-is-node.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/internals/engine-is-node.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
-
- module.exports = classof(global.process) == 'process';
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/engine-is-webos-webkit.js":
- /*!******************************************************************!*\
- !*** ./node_modules/core-js/internals/engine-is-webos-webkit.js ***!
- \******************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
-
- module.exports = /web0s(?!.*chrome)/i.test(userAgent);
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/freezing.js":
- /*!****************************************************!*\
- !*** ./node_modules/core-js/internals/freezing.js ***!
- \****************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- module.exports = !fails(function () {
- // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
- return Object.isExtensible(Object.preventExtensions({}));
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/function-bind.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/internals/function-bind.js ***!
- \*********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
-
- var slice = [].slice;
- var factories = {};
-
- var construct = function (C, argsLength, args) {
- if (!(argsLength in factories)) {
- for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
- // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
- factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
- } return factories[argsLength](C, args);
- };
-
- // `Function.prototype.bind` method implementation
- // https://tc39.es/ecma262/#sec-function.prototype.bind
- module.exports = Function.bind || function bind(that /* , ...args */) {
- var fn = aFunction(this);
- var partArgs = slice.call(arguments, 1);
- var boundFunction = function bound(/* args... */) {
- var args = partArgs.concat(slice.call(arguments));
- return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
- };
- if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
- return boundFunction;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/get-iterator-method.js":
- /*!***************************************************************!*\
- !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
- \***************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- var ITERATOR = wellKnownSymbol('iterator');
-
- module.exports = function (it) {
- if (it != undefined) return it[ITERATOR]
- || it['@@iterator']
- || Iterators[classof(it)];
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/host-report-errors.js":
- /*!**************************************************************!*\
- !*** ./node_modules/core-js/internals/host-report-errors.js ***!
- \**************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
-
- module.exports = function (a, b) {
- var console = global.console;
- if (console && console.error) {
- arguments.length === 1 ? console.error(a) : console.error(a, b);
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/internal-metadata.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/internals/internal-metadata.js ***!
- \*************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
- var FREEZING = __webpack_require__(/*! ../internals/freezing */ "./node_modules/core-js/internals/freezing.js");
-
- var METADATA = uid('meta');
- var id = 0;
-
- // eslint-disable-next-line es/no-object-isextensible -- safe
- var isExtensible = Object.isExtensible || function () {
- return true;
- };
-
- var setMetadata = function (it) {
- defineProperty(it, METADATA, { value: {
- objectID: 'O' + ++id, // object ID
- weakData: {} // weak collections IDs
- } });
- };
-
- var fastKey = function (it, create) {
- // return a primitive with prefix
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if (!has(it, METADATA)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return 'F';
- // not necessary to add metadata
- if (!create) return 'E';
- // add missing metadata
- setMetadata(it);
- // return object ID
- } return it[METADATA].objectID;
- };
-
- var getWeakData = function (it, create) {
- if (!has(it, METADATA)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return true;
- // not necessary to add metadata
- if (!create) return false;
- // add missing metadata
- setMetadata(it);
- // return the store of weak collections IDs
- } return it[METADATA].weakData;
- };
-
- // add metadata on freeze-family methods calling
- var onFreeze = function (it) {
- if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
- return it;
- };
-
- var meta = module.exports = {
- REQUIRED: false,
- fastKey: fastKey,
- getWeakData: getWeakData,
- onFreeze: onFreeze
- };
-
- hiddenKeys[METADATA] = true;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/is-array-iterator-method.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
- \********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
-
- 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);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/iterate.js":
- /*!***************************************************!*\
- !*** ./node_modules/core-js/internals/iterate.js ***!
- \***************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
- var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
-
- 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);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/iterator-close.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/internals/iterator-close.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
-
- module.exports = function (iterator) {
- var returnMethod = iterator['return'];
- if (returnMethod !== undefined) {
- return anObject(returnMethod.call(iterator)).value;
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/iterators-core.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/internals/iterators-core.js ***!
- \**********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
-
- 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;
-
- /* eslint-disable es/no-array-prototype-keys -- safe */
- 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 = {};
-
- // `%IteratorPrototype%[@@iterator]()` method
- // https://tc39.es/ecma262/#sec-%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
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/iterators.js":
- /*!*****************************************************!*\
- !*** ./node_modules/core-js/internals/iterators.js ***!
- \*****************************************************/
- /***/ ((module) => {
-
- module.exports = {};
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/microtask.js":
- /*!*****************************************************!*\
- !*** ./node_modules/core-js/internals/microtask.js ***!
- \*****************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
- var macrotask = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
- var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
- var IS_WEBOS_WEBKIT = __webpack_require__(/*! ../internals/engine-is-webos-webkit */ "./node_modules/core-js/internals/engine-is-webos-webkit.js");
- var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
-
- 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);
- // workaround of WebKit ~ iOS Safari 10.1 bug
- promise.constructor = Promise;
- 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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/native-promise-constructor.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/core-js/internals/native-promise-constructor.js ***!
- \**********************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
-
- module.exports = global.Promise;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/new-promise-capability.js":
- /*!******************************************************************!*\
- !*** ./node_modules/core-js/internals/new-promise-capability.js ***!
- \******************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
-
- 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);
- };
-
- // `NewPromiseCapability` abstract operation
- // https://tc39.es/ecma262/#sec-newpromisecapability
- module.exports.f = function (C) {
- return new PromiseCapability(C);
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-get-own-property-names-external.js":
- /*!**********************************************************************************!*\
- !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***!
- \**********************************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- /* eslint-disable es/no-object-getownpropertynames -- safe */
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var $getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
-
- var toString = {}.toString;
-
- var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
-
- var getWindowNames = function (it) {
- try {
- return $getOwnPropertyNames(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)
- : $getOwnPropertyNames(toIndexedObject(it));
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-get-prototype-of.js":
- /*!*******************************************************************!*\
- !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
- \*******************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
- var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
-
- var IE_PROTO = sharedKey('IE_PROTO');
- var ObjectPrototype = Object.prototype;
-
- // `Object.getPrototypeOf` method
- // https://tc39.es/ecma262/#sec-object.getprototypeof
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
- 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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/object-to-string.js":
- /*!************************************************************!*\
- !*** ./node_modules/core-js/internals/object-to-string.js ***!
- \************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
- var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
-
- // `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) + ']';
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/perform.js":
- /*!***************************************************!*\
- !*** ./node_modules/core-js/internals/perform.js ***!
- \***************************************************/
- /***/ ((module) => {
-
- module.exports = function (exec) {
- try {
- return { error: false, value: exec() };
- } catch (error) {
- return { error: true, value: error };
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/promise-resolve.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/internals/promise-resolve.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
-
- 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;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/redefine-all.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/internals/redefine-all.js ***!
- \********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
-
- module.exports = function (target, src, options) {
- for (var key in src) redefine(target, key, src[key], options);
- return target;
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/set-species.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/internals/set-species.js ***!
- \*******************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
-
- 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; }
- });
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/set-to-string-tag.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
- \*************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- 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 });
- }
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/string-trim-forced.js":
- /*!**************************************************************!*\
- !*** ./node_modules/core-js/internals/string-trim-forced.js ***!
- \**************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");
-
- var non = '\u200B\u0085\u180E';
-
- // check that a method works with the correct list
- // of whitespaces and has a correct name
- module.exports = function (METHOD_NAME) {
- return fails(function () {
- return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
- });
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/task.js":
- /*!************************************************!*\
- !*** ./node_modules/core-js/internals/task.js ***!
- \************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
- var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
- var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
- var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
- var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
-
- 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
- };
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/to-string-tag-support.js":
- /*!*****************************************************************!*\
- !*** ./node_modules/core-js/internals/to-string-tag-support.js ***!
- \*****************************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
- var test = {};
-
- test[TO_STRING_TAG] = 'z';
-
- module.exports = String(test) === '[object z]';
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/internals/well-known-symbol-wrapped.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
- \*********************************************************************/
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- exports.f = wellKnownSymbol;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.concat.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.concat.js ***!
- \*********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
- var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
- var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
-
- 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;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.every.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.every.js ***!
- \********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $every = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").every;
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
-
- var STRICT_METHOD = arrayMethodIsStrict('every');
-
- // `Array.prototype.every` method
- // https://tc39.es/ecma262/#sec-array.prototype.every
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
- every: function every(callbackfn /* , thisArg */) {
- return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.fill.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.fill.js ***!
- \*******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var fill = __webpack_require__(/*! ../internals/array-fill */ "./node_modules/core-js/internals/array-fill.js");
- var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
-
- // `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');
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.from.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.from.js ***!
- \*******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var from = __webpack_require__(/*! ../internals/array-from */ "./node_modules/core-js/internals/array-from.js");
- var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
-
- var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
- // eslint-disable-next-line es/no-array-from -- required for testing
- Array.from(iterable);
- });
-
- // `Array.from` method
- // https://tc39.es/ecma262/#sec-array.from
- $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
- from: from
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.index-of.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.index-of.js ***!
- \***********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- /* eslint-disable es/no-array-prototype-indexof -- required for testing */
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $indexOf = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").indexOf;
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
-
- var nativeIndexOf = [].indexOf;
-
- var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
- var STRICT_METHOD = arrayMethodIsStrict('indexOf');
-
- // `Array.prototype.indexOf` method
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
- $({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
- indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? nativeIndexOf.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.iterator.js":
- /*!***********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.iterator.js ***!
- \***********************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
- var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
- var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
-
- 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');
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.join.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.join.js ***!
- \*******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
-
- 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);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.map.js":
- /*!******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.map.js ***!
- \******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $map = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").map;
- var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
-
- 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);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.reduce.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.reduce.js ***!
- \*********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "./node_modules/core-js/internals/array-reduce.js").left;
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
- var CHROME_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
- var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
-
- var STRICT_METHOD = arrayMethodIsStrict('reduce');
- // Chrome 80-82 has a critical bug
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
- var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
-
- // `Array.prototype.reduce` method
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
- reduce: function reduce(callbackfn /* , initialValue */) {
- return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.reverse.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.reverse.js ***!
- \**********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
-
- var nativeReverse = [].reverse;
- var test = [1, 2];
-
- // `Array.prototype.reverse` method
- // https://tc39.es/ecma262/#sec-array.prototype.reverse
- // fix for Safari 12.0 bug
- // https://bugs.webkit.org/show_bug.cgi?id=188794
- $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
- reverse: function reverse() {
- // eslint-disable-next-line no-self-assign -- dirty hack
- if (isArray(this)) this.length = this.length;
- return nativeReverse.call(this);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.slice.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.slice.js ***!
- \********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
- var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
-
- 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;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.array.some.js":
- /*!*******************************************************!*\
- !*** ./node_modules/core-js/modules/es.array.some.js ***!
- \*******************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $some = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").some;
- var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
-
- var STRICT_METHOD = arrayMethodIsStrict('some');
-
- // `Array.prototype.some` method
- // https://tc39.es/ecma262/#sec-array.prototype.some
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
- some: function some(callbackfn /* , thisArg */) {
- return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.map.js":
- /*!************************************************!*\
- !*** ./node_modules/core-js/modules/es.map.js ***!
- \************************************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var collection = __webpack_require__(/*! ../internals/collection */ "./node_modules/core-js/internals/collection.js");
- var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "./node_modules/core-js/internals/collection-strong.js");
-
- // `Map` constructor
- // https://tc39.es/ecma262/#sec-map-objects
- module.exports = collection('Map', function (init) {
- return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
- }, collectionStrong);
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js":
- /*!*******************************************************************************!*\
- !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***!
- \*******************************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
-
- var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
- var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
-
- // `Object.getOwnPropertyDescriptor` method
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
- $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
- getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
- return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js":
- /*!********************************************************************************!*\
- !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***!
- \********************************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
- var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
-
- // `Object.getOwnPropertyDescriptors` method
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
- $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
- getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
- var O = toIndexedObject(object);
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
- var keys = ownKeys(O);
- var result = {};
- var index = 0;
- var key, descriptor;
- while (keys.length > index) {
- descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
- if (descriptor !== undefined) createProperty(result, key, descriptor);
- }
- return result;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.object.keys.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/modules/es.object.keys.js ***!
- \********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- 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));
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.object.to-string.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/modules/es.object.to-string.js ***!
- \*************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "./node_modules/core-js/internals/to-string-tag-support.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var toString = __webpack_require__(/*! ../internals/object-to-string */ "./node_modules/core-js/internals/object-to-string.js");
-
- // `Object.prototype.toString` method
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
- if (!TO_STRING_TAG_SUPPORT) {
- redefine(Object.prototype, 'toString', toString, { unsafe: true });
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.promise.js":
- /*!****************************************************!*\
- !*** ./node_modules/core-js/modules/es.promise.js ***!
- \****************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "./node_modules/core-js/internals/native-promise-constructor.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
- var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
- var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
- var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
- var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
- var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "./node_modules/core-js/internals/species-constructor.js");
- var task = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
- var microtask = __webpack_require__(/*! ../internals/microtask */ "./node_modules/core-js/internals/microtask.js");
- var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "./node_modules/core-js/internals/promise-resolve.js");
- var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "./node_modules/core-js/internals/host-report-errors.js");
- var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
- var perform = __webpack_require__(/*! ../internals/perform */ "./node_modules/core-js/internals/perform.js");
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
- var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var IS_BROWSER = __webpack_require__(/*! ../internals/engine-is-browser */ "./node_modules/core-js/internals/engine-is-browser.js");
- var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
- var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
-
- var SPECIES = wellKnownSymbol('species');
- var PROMISE = 'Promise';
- var getInternalState = InternalStateModule.get;
- var setInternalState = InternalStateModule.set;
- var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
- var NativePromisePrototype = NativePromise && NativePromise.prototype;
- var PromiseConstructor = NativePromise;
- var PromiseConstructorPrototype = NativePromisePrototype;
- var TypeError = global.TypeError;
- var document = global.document;
- var process = global.process;
- 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 SUBCLASSING = false;
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
-
- var FORCED = isForced(PROMISE, function () {
- var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
- // 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 (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
- // We need Promise#finally in the pure version for preventing prototype pollution
- if (IS_PURE && !PromiseConstructorPrototype['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 = new PromiseConstructor(function (resolve) { resolve(1); });
- var FakePromise = function (exec) {
- exec(function () { /* empty */ }, function () { /* empty */ });
- };
- var constructor = promise.constructor = {};
- constructor[SPECIES] = FakePromise;
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
- if (!SUBCLASSING) return true;
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
- });
-
- 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);
- }
- };
- PromiseConstructorPrototype = PromiseConstructor.prototype;
- // 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(PromiseConstructorPrototype, {
- // `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' && NativePromisePrototype !== Object.prototype) {
- nativeThen = NativePromisePrototype.then;
-
- if (!SUBCLASSING) {
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
- redefine(NativePromisePrototype, '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 });
-
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
- redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });
- }
-
- // make `.constructor === Promise` work for native promise-based APIs
- try {
- delete NativePromisePrototype.constructor;
- } catch (error) { /* empty */ }
-
- // make `instanceof Promise` work for native promise-based APIs
- if (setPrototypeOf) {
- setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);
- }
- }
- }
-
- $({ 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;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.reflect.apply.js":
- /*!**********************************************************!*\
- !*** ./node_modules/core-js/modules/es.reflect.apply.js ***!
- \**********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- var nativeApply = getBuiltIn('Reflect', 'apply');
- var functionApply = Function.apply;
-
- // MS Edge argumentsList argument is optional
- var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
- nativeApply(function () { /* empty */ });
- });
-
- // `Reflect.apply` method
- // https://tc39.es/ecma262/#sec-reflect.apply
- $({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
- apply: function apply(target, thisArgument, argumentsList) {
- aFunction(target);
- anObject(argumentsList);
- return nativeApply
- ? nativeApply(target, thisArgument, argumentsList)
- : functionApply.call(target, thisArgument, argumentsList);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.reflect.construct.js":
- /*!**************************************************************!*\
- !*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
- \**************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
-
- var nativeConstruct = getBuiltIn('Reflect', 'construct');
-
- // `Reflect.construct` method
- // https://tc39.es/ecma262/#sec-reflect.construct
- // MS Edge supports only 2 arguments and argumentsList argument is optional
- // FF Nightly sets third argument as `new.target`, but does not create `this` from it
- var NEW_TARGET_BUG = fails(function () {
- function F() { /* empty */ }
- return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
- });
- var ARGS_BUG = !fails(function () {
- nativeConstruct(function () { /* empty */ });
- });
- var FORCED = NEW_TARGET_BUG || ARGS_BUG;
-
- $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
- construct: function construct(Target, args /* , newTarget */) {
- aFunction(Target);
- anObject(args);
- var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
- if (Target == newTarget) {
- // w/o altered newTarget, optimization for 0-4 arguments
- switch (args.length) {
- case 0: return new Target();
- case 1: return new Target(args[0]);
- case 2: return new Target(args[0], args[1]);
- case 3: return new Target(args[0], args[1], args[2]);
- case 4: return new Target(args[0], args[1], args[2], args[3]);
- }
- // w/o altered newTarget, lot of arguments case
- var $args = [null];
- $args.push.apply($args, args);
- return new (bind.apply(Target, $args))();
- }
- // with altered newTarget, not support built-in constructors
- var proto = newTarget.prototype;
- var instance = create(isObject(proto) ? proto : Object.prototype);
- var result = Function.apply.call(Target, instance, args);
- return isObject(result) ? result : instance;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.reflect.delete-property.js":
- /*!********************************************************************!*\
- !*** ./node_modules/core-js/modules/es.reflect.delete-property.js ***!
- \********************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
-
- // `Reflect.deleteProperty` method
- // https://tc39.es/ecma262/#sec-reflect.deleteproperty
- $({ target: 'Reflect', stat: true }, {
- deleteProperty: function deleteProperty(target, propertyKey) {
- var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
- return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.reflect.get-prototype-of.js":
- /*!*********************************************************************!*\
- !*** ./node_modules/core-js/modules/es.reflect.get-prototype-of.js ***!
- \*********************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
- var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
-
- // `Reflect.getPrototypeOf` method
- // https://tc39.es/ecma262/#sec-reflect.getprototypeof
- $({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
- getPrototypeOf: function getPrototypeOf(target) {
- return objectGetPrototypeOf(anObject(target));
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.regexp.to-string.js":
- /*!*************************************************************!*\
- !*** ./node_modules/core-js/modules/es.regexp.to-string.js ***!
- \*************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var flags = __webpack_require__(/*! ../internals/regexp-flags */ "./node_modules/core-js/internals/regexp-flags.js");
-
- var TO_STRING = 'toString';
- var RegExpPrototype = RegExp.prototype;
- var nativeToString = RegExpPrototype[TO_STRING];
-
- var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
- // FF44- RegExp#toString has a wrong name
- var INCORRECT_NAME = nativeToString.name != TO_STRING;
-
- // `RegExp.prototype.toString` method
- // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
- if (NOT_GENERIC || INCORRECT_NAME) {
- redefine(RegExp.prototype, TO_STRING, function toString() {
- var R = anObject(this);
- var p = String(R.source);
- var rf = R.flags;
- var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
- return '/' + p + '/' + f;
- }, { unsafe: true });
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.iterator.js":
- /*!************************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.iterator.js ***!
- \************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "./node_modules/core-js/internals/string-multibyte.js").charAt;
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
- var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
-
- 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 };
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.match.js":
- /*!*********************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.match.js ***!
- \*********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
- var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
- var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");
-
- // @@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;
- }
- ];
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.starts-with.js":
- /*!***************************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.starts-with.js ***!
- \***************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
- var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
- var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
- var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
- var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
-
- // eslint-disable-next-line es/no-string-prototype-startswith -- safe
- var $startsWith = ''.startsWith;
- var min = Math.min;
-
- var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
- // https://github.com/zloirock/core-js/pull/702
- var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
- var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
- return descriptor && !descriptor.writable;
- }();
-
- // `String.prototype.startsWith` method
- // https://tc39.es/ecma262/#sec-string.prototype.startswith
- $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
- startsWith: function startsWith(searchString /* , position = 0 */) {
- var that = String(requireObjectCoercible(this));
- notARegExp(searchString);
- var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
- var search = String(searchString);
- return $startsWith
- ? $startsWith.call(that, search, index)
- : that.slice(index, index + search.length) === search;
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.string.trim.js":
- /*!********************************************************!*\
- !*** ./node_modules/core-js/modules/es.string.trim.js ***!
- \********************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var $trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
- var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "./node_modules/core-js/internals/string-trim-forced.js");
-
- // `String.prototype.trim` method
- // https://tc39.es/ecma262/#sec-string.prototype.trim
- $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
- trim: function trim() {
- return $trim(this);
- }
- });
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.symbol.description.js":
- /*!***************************************************************!*\
- !*** ./node_modules/core-js/modules/es.symbol.description.js ***!
- \***************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
- // `Symbol.prototype.description` getter
- // https://tc39.es/ecma262/#sec-symbol.prototype.description
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
- var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");
-
- 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
- });
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.symbol.iterator.js":
- /*!************************************************************!*\
- !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***!
- \************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
-
- // `Symbol.iterator` well-known symbol
- // https://tc39.es/ecma262/#sec-symbol.iterator
- defineWellKnownSymbol('iterator');
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/es.symbol.js":
- /*!***************************************************!*\
- !*** ./node_modules/core-js/modules/es.symbol.js ***!
- \***************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- "use strict";
-
- var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
- var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
- var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
- var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
- var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
- var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
- var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
- var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
- var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
- var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
- var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
- var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
- var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
- var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
- var nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
- var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
- var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
- var getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "./node_modules/core-js/internals/object-get-own-property-names-external.js");
- var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
- var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
- var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
- var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
- var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
- var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
- var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
- var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
- var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
- var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
- var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
- var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
- var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
- var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").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;
-
-
- /***/ }),
-
- /***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js":
- /*!**********************************************************************!*\
- !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
- \**********************************************************************/
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
-
- var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
- var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
- var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
- var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
- var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
-
- 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];
- }
- }
- }
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/performance-now/lib/performance-now.js":
- /*!*************************************************************!*\
- !*** ./node_modules/performance-now/lib/performance-now.js ***!
- \*************************************************************/
- /***/ (function(module) {
-
- // Generated by CoffeeScript 1.12.2
- (function() {
- var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
-
- if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
- module.exports = function() {
- return performance.now();
- };
- } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
- module.exports = function() {
- return (getNanoSeconds() - nodeLoadTime) / 1e6;
- };
- hrtime = process.hrtime;
- getNanoSeconds = function() {
- var hr;
- hr = hrtime();
- return hr[0] * 1e9 + hr[1];
- };
- moduleLoadTime = getNanoSeconds();
- upTime = process.uptime() * 1e9;
- nodeLoadTime = moduleLoadTime - upTime;
- } else if (Date.now) {
- module.exports = function() {
- return Date.now() - loadTime;
- };
- loadTime = Date.now();
- } else {
- module.exports = function() {
- return new Date().getTime() - loadTime;
- };
- loadTime = new Date().getTime();
- }
-
- }).call(this);
-
- //# sourceMappingURL=performance-now.js.map
-
-
- /***/ }),
-
- /***/ "./node_modules/raf/index.js":
- /*!***********************************!*\
- !*** ./node_modules/raf/index.js ***!
- \***********************************/
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
- var now = __webpack_require__(/*! performance-now */ "./node_modules/performance-now/lib/performance-now.js")
- , root = typeof window === 'undefined' ? __webpack_require__.g : window
- , vendors = ['moz', 'webkit']
- , suffix = 'AnimationFrame'
- , raf = root['request' + suffix]
- , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
-
- for(var i = 0; !raf && i < vendors.length; i++) {
- raf = root[vendors[i] + 'Request' + suffix]
- caf = root[vendors[i] + 'Cancel' + suffix]
- || root[vendors[i] + 'CancelRequest' + suffix]
- }
-
- // Some versions of FF have rAF but not cAF
- if(!raf || !caf) {
- var last = 0
- , id = 0
- , queue = []
- , frameDuration = 1000 / 60
-
- raf = function(callback) {
- if(queue.length === 0) {
- var _now = now()
- , next = Math.max(0, frameDuration - (_now - last))
- last = next + _now
- setTimeout(function() {
- var cp = queue.slice(0)
- // Clear queue here to prevent
- // callbacks from appending listeners
- // to the current frame's queue
- queue.length = 0
- for(var i = 0; i < cp.length; i++) {
- if(!cp[i].cancelled) {
- try{
- cp[i].callback(last)
- } catch(e) {
- setTimeout(function() { throw e }, 0)
- }
- }
- }
- }, Math.round(next))
- }
- queue.push({
- handle: ++id,
- callback: callback,
- cancelled: false
- })
- return id
- }
-
- caf = function(handle) {
- for(var i = 0; i < queue.length; i++) {
- if(queue[i].handle === handle) {
- queue[i].cancelled = true
- }
- }
- }
- }
-
- module.exports = function(fn) {
- // Wrap in a new function to prevent
- // `cancel` potentially being assigned
- // to the native rAF function
- return raf.call(root, fn)
- }
- module.exports.cancel = function() {
- caf.apply(root, arguments)
- }
- module.exports.polyfill = function(object) {
- if (!object) {
- object = root;
- }
- object.requestAnimationFrame = raf
- object.cancelAnimationFrame = caf
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/regenerator-runtime/runtime.js":
- /*!*****************************************************!*\
- !*** ./node_modules/regenerator-runtime/runtime.js ***!
- \*****************************************************/
- /***/ ((module) => {
-
- /**
- * 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.
- */
-
- var runtime = (function (exports) {
- "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";
-
- function define(obj, key, value) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- return obj[key];
- }
- try {
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
- define({}, "");
- } catch (err) {
- define = function(obj, key, value) {
- return obj[key] = value;
- };
- }
-
- 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;
- }
- exports.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;
- GeneratorFunction.displayName = define(
- GeneratorFunctionPrototype,
- toStringTagSymbol,
- "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) {
- define(prototype, method, function(arg) {
- return this._invoke(method, arg);
- });
- });
- }
-
- exports.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;
- };
-
- exports.mark = function(genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
- define(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.
- exports.awrap = function(arg) {
- return { __await: arg };
- };
-
- function AsyncIterator(generator, PromiseImpl) {
- 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 PromiseImpl.resolve(value.__await).then(function(value) {
- invoke("next", value, resolve, reject);
- }, function(err) {
- invoke("throw", err, resolve, reject);
- });
- }
-
- return PromiseImpl.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.
- result.value = unwrapped;
- resolve(result);
- }, function(error) {
- // If a rejected Promise was yielded, throw the rejection back
- // into the async generator function so it can be handled there.
- return invoke("throw", error, resolve, reject);
- });
- }
- }
-
- var previousPromise;
-
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new PromiseImpl(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;
- };
- exports.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.
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
- if (PromiseImpl === void 0) PromiseImpl = Promise;
-
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList),
- PromiseImpl
- );
-
- return exports.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") {
- // Note: ["return"] must be used for ES3 parsing compatibility.
- 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);
-
- define(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);
- }
-
- exports.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 };
- }
- exports.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;
- }
- };
-
- // Regardless of whether this script is executing as a CommonJS module
- // or not, return the runtime object so that we can declare the variable
- // regeneratorRuntime in the outer scope, which allows this module to be
- // injected easily by `bin/regenerator --include-runtime script.js`.
- return exports;
-
- }(
- // If this script is executing as a CommonJS module, use module.exports
- // as the regeneratorRuntime namespace. Otherwise create a new empty
- // object. Either way, the resulting object will be used to initialize
- // the regeneratorRuntime variable at the top of this file.
- true ? module.exports : 0
- ));
-
- try {
- regeneratorRuntime = runtime;
- } catch (accidentalStrictMode) {
- // This module should not be running in strict mode, so the above
- // assignment should always work unless something is misconfigured. Just
- // in case runtime.js accidentally runs in strict mode, we can escape
- // strict mode using a global Function call. This could conceivably fail
- // if a Content Security Policy forbids using Function, but in that case
- // the proper solution is to fix the accidental strict mode problem. If
- // you've misconfigured your bundler to force strict mode and applied a
- // CSP to forbid Function, and you're not willing to fix either of those
- // problems, please detail your unique predicament in a GitHub issue.
- Function("r", "regeneratorRuntime = r")(runtime);
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/rgbcolor/index.js":
- /*!****************************************!*\
- !*** ./node_modules/rgbcolor/index.js ***!
- \****************************************/
- /***/ ((module) => {
-
- /*
- Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
- http://www.phpied.com/rgb-color-parser-in-javascript/
- */
-
- module.exports = function(color_string) {
- this.ok = false;
- this.alpha = 1.0;
-
- // strip any leading #
- if (color_string.charAt(0) == '#') { // remove # if any
- color_string = color_string.substr(1,6);
- }
-
- color_string = color_string.replace(/ /g,'');
- color_string = color_string.toLowerCase();
-
- // before getting into regexps, try simple matches
- // and overwrite the input
- var simple_colors = {
- aliceblue: 'f0f8ff',
- antiquewhite: 'faebd7',
- aqua: '00ffff',
- aquamarine: '7fffd4',
- azure: 'f0ffff',
- beige: 'f5f5dc',
- bisque: 'ffe4c4',
- black: '000000',
- blanchedalmond: 'ffebcd',
- blue: '0000ff',
- blueviolet: '8a2be2',
- brown: 'a52a2a',
- burlywood: 'deb887',
- cadetblue: '5f9ea0',
- chartreuse: '7fff00',
- chocolate: 'd2691e',
- coral: 'ff7f50',
- cornflowerblue: '6495ed',
- cornsilk: 'fff8dc',
- crimson: 'dc143c',
- cyan: '00ffff',
- darkblue: '00008b',
- darkcyan: '008b8b',
- darkgoldenrod: 'b8860b',
- darkgray: 'a9a9a9',
- darkgreen: '006400',
- darkkhaki: 'bdb76b',
- darkmagenta: '8b008b',
- darkolivegreen: '556b2f',
- darkorange: 'ff8c00',
- darkorchid: '9932cc',
- darkred: '8b0000',
- darksalmon: 'e9967a',
- darkseagreen: '8fbc8f',
- darkslateblue: '483d8b',
- darkslategray: '2f4f4f',
- darkturquoise: '00ced1',
- darkviolet: '9400d3',
- deeppink: 'ff1493',
- deepskyblue: '00bfff',
- dimgray: '696969',
- dodgerblue: '1e90ff',
- feldspar: 'd19275',
- firebrick: 'b22222',
- floralwhite: 'fffaf0',
- forestgreen: '228b22',
- fuchsia: 'ff00ff',
- gainsboro: 'dcdcdc',
- ghostwhite: 'f8f8ff',
- gold: 'ffd700',
- goldenrod: 'daa520',
- gray: '808080',
- green: '008000',
- greenyellow: 'adff2f',
- honeydew: 'f0fff0',
- hotpink: 'ff69b4',
- indianred : 'cd5c5c',
- indigo : '4b0082',
- ivory: 'fffff0',
- khaki: 'f0e68c',
- lavender: 'e6e6fa',
- lavenderblush: 'fff0f5',
- lawngreen: '7cfc00',
- lemonchiffon: 'fffacd',
- lightblue: 'add8e6',
- lightcoral: 'f08080',
- lightcyan: 'e0ffff',
- lightgoldenrodyellow: 'fafad2',
- lightgrey: 'd3d3d3',
- lightgreen: '90ee90',
- lightpink: 'ffb6c1',
- lightsalmon: 'ffa07a',
- lightseagreen: '20b2aa',
- lightskyblue: '87cefa',
- lightslateblue: '8470ff',
- lightslategray: '778899',
- lightsteelblue: 'b0c4de',
- lightyellow: 'ffffe0',
- lime: '00ff00',
- limegreen: '32cd32',
- linen: 'faf0e6',
- magenta: 'ff00ff',
- maroon: '800000',
- mediumaquamarine: '66cdaa',
- mediumblue: '0000cd',
- mediumorchid: 'ba55d3',
- mediumpurple: '9370d8',
- mediumseagreen: '3cb371',
- mediumslateblue: '7b68ee',
- mediumspringgreen: '00fa9a',
- mediumturquoise: '48d1cc',
- mediumvioletred: 'c71585',
- midnightblue: '191970',
- mintcream: 'f5fffa',
- mistyrose: 'ffe4e1',
- moccasin: 'ffe4b5',
- navajowhite: 'ffdead',
- navy: '000080',
- oldlace: 'fdf5e6',
- olive: '808000',
- olivedrab: '6b8e23',
- orange: 'ffa500',
- orangered: 'ff4500',
- orchid: 'da70d6',
- palegoldenrod: 'eee8aa',
- palegreen: '98fb98',
- paleturquoise: 'afeeee',
- palevioletred: 'd87093',
- papayawhip: 'ffefd5',
- peachpuff: 'ffdab9',
- peru: 'cd853f',
- pink: 'ffc0cb',
- plum: 'dda0dd',
- powderblue: 'b0e0e6',
- purple: '800080',
- rebeccapurple: '663399',
- red: 'ff0000',
- rosybrown: 'bc8f8f',
- royalblue: '4169e1',
- saddlebrown: '8b4513',
- salmon: 'fa8072',
- sandybrown: 'f4a460',
- seagreen: '2e8b57',
- seashell: 'fff5ee',
- sienna: 'a0522d',
- silver: 'c0c0c0',
- skyblue: '87ceeb',
- slateblue: '6a5acd',
- slategray: '708090',
- snow: 'fffafa',
- springgreen: '00ff7f',
- steelblue: '4682b4',
- tan: 'd2b48c',
- teal: '008080',
- thistle: 'd8bfd8',
- tomato: 'ff6347',
- turquoise: '40e0d0',
- violet: 'ee82ee',
- violetred: 'd02090',
- wheat: 'f5deb3',
- white: 'ffffff',
- whitesmoke: 'f5f5f5',
- yellow: 'ffff00',
- yellowgreen: '9acd32'
- };
- color_string = simple_colors[color_string] || color_string;
- // emd of simple type-in colors
-
- // array of color definition objects
- var color_defs = [
- {
- re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
- example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
- process: function (bits){
- return [
- parseInt(bits[1]),
- parseInt(bits[2]),
- parseInt(bits[3]),
- parseFloat(bits[4])
- ];
- }
- },
- {
- re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
- example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
- process: function (bits){
- return [
- parseInt(bits[1]),
- parseInt(bits[2]),
- parseInt(bits[3])
- ];
- }
- },
- {
- re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- example: ['#00ff00', '336699'],
- process: function (bits){
- return [
- parseInt(bits[1], 16),
- parseInt(bits[2], 16),
- parseInt(bits[3], 16)
- ];
- }
- },
- {
- re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- example: ['#fb0', 'f0f'],
- process: function (bits){
- return [
- parseInt(bits[1] + bits[1], 16),
- parseInt(bits[2] + bits[2], 16),
- parseInt(bits[3] + bits[3], 16)
- ];
- }
- }
- ];
-
- // search through the definitions to find a match
- for (var i = 0; i < color_defs.length; i++) {
- var re = color_defs[i].re;
- var processor = color_defs[i].process;
- var bits = re.exec(color_string);
- if (bits) {
- var channels = processor(bits);
- this.r = channels[0];
- this.g = channels[1];
- this.b = channels[2];
- if (channels.length > 3) {
- this.alpha = channels[3];
- }
- this.ok = true;
- }
-
- }
-
- // validate/cleanup values
- this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
- this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
- this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
- this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);
-
- // some getters
- this.toRGB = function () {
- return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
- }
- this.toRGBA = function () {
- return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
- }
- this.toHex = function () {
- var r = this.r.toString(16);
- var g = this.g.toString(16);
- var b = this.b.toString(16);
- if (r.length == 1) r = '0' + r;
- if (g.length == 1) g = '0' + g;
- if (b.length == 1) b = '0' + b;
- return '#' + r + g + b;
- }
-
- // help
- this.getHelpXML = function () {
-
- var examples = new Array();
- // add regexps
- for (var i = 0; i < color_defs.length; i++) {
- var example = color_defs[i].example;
- for (var j = 0; j < example.length; j++) {
- examples[examples.length] = example[j];
- }
- }
- // add type-in colors
- for (var sc in simple_colors) {
- examples[examples.length] = sc;
- }
-
- var xml = document.createElement('ul');
- xml.setAttribute('id', 'rgbcolor-examples');
- for (var i = 0; i < examples.length; i++) {
- try {
- var list_item = document.createElement('li');
- var list_color = new RGBColor(examples[i]);
- var example_div = document.createElement('div');
- example_div.style.cssText =
- 'margin: 3px; '
- + 'border: 1px solid black; '
- + 'background:' + list_color.toHex() + '; '
- + 'color:' + list_color.toHex()
- ;
- example_div.appendChild(document.createTextNode('test'));
- var list_item_value = document.createTextNode(
- ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
- );
- list_item.appendChild(example_div);
- list_item.appendChild(list_item_value);
- xml.appendChild(list_item);
-
- } catch(e){}
- }
- return xml;
-
- }
-
- }
-
-
- /***/ }),
-
- /***/ "./node_modules/stackblur-canvas/dist/stackblur-es.js":
- /*!************************************************************!*\
- !*** ./node_modules/stackblur-canvas/dist/stackblur-es.js ***!
- \************************************************************/
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "BlurStack": () => (/* binding */ BlurStack),
- /* harmony export */ "canvasRGB": () => (/* binding */ processCanvasRGB),
- /* harmony export */ "canvasRGBA": () => (/* binding */ processCanvasRGBA),
- /* harmony export */ "image": () => (/* binding */ processImage),
- /* harmony export */ "imageDataRGB": () => (/* binding */ processImageDataRGB),
- /* harmony export */ "imageDataRGBA": () => (/* binding */ processImageDataRGBA)
- /* harmony export */ });
- function _typeof(obj) {
- "@babel/helpers - typeof";
-
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
- _typeof = function (obj) {
- return typeof obj;
- };
- } else {
- _typeof = function (obj) {
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
- };
- }
-
- return _typeof(obj);
- }
-
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
-
- /* eslint-disable no-bitwise -- used for calculations */
-
- /* eslint-disable unicorn/prefer-query-selector -- aiming at
- backward-compatibility */
-
- /**
- * StackBlur - a fast almost Gaussian Blur For Canvas
- *
- * In case you find this class useful - especially in commercial projects -
- * I am not totally unhappy for a small donation to my PayPal account
- * mario@quasimondo.de
- *
- * Or support me on flattr:
- * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
- *
- * @module StackBlur
- * @author Mario Klingemann
- * Contact: mario@quasimondo.com
- * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
- * Twitter: @quasimondo
- *
- * @copyright (c) 2010 Mario Klingemann
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
- var mulTable = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];
- var shgTable = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];
- /**
- * @param {string|HTMLImageElement} img
- * @param {string|HTMLCanvasElement} canvas
- * @param {Float} radius
- * @param {boolean} blurAlphaChannel
- * @param {boolean} useOffset
- * @param {boolean} skipStyles
- * @returns {undefined}
- */
-
- function processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {
- if (typeof img === 'string') {
- img = document.getElementById(img);
- }
-
- if (!img || !('naturalWidth' in img)) {
- return;
- }
-
- var dimensionType = useOffset ? 'offset' : 'natural';
- var w = img[dimensionType + 'Width'];
- var h = img[dimensionType + 'Height'];
-
- if (typeof canvas === 'string') {
- canvas = document.getElementById(canvas);
- }
-
- if (!canvas || !('getContext' in canvas)) {
- return;
- }
-
- if (!skipStyles) {
- canvas.style.width = w + 'px';
- canvas.style.height = h + 'px';
- }
-
- canvas.width = w;
- canvas.height = h;
- var context = canvas.getContext('2d');
- context.clearRect(0, 0, w, h);
- context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);
-
- if (isNaN(radius) || radius < 1) {
- return;
- }
-
- if (blurAlphaChannel) {
- processCanvasRGBA(canvas, 0, 0, w, h, radius);
- } else {
- processCanvasRGB(canvas, 0, 0, w, h, radius);
- }
- }
- /**
- * @param {string|HTMLCanvasElement} canvas
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @throws {Error|TypeError}
- * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}
- */
-
-
- function getImageDataFromCanvas(canvas, topX, topY, width, height) {
- if (typeof canvas === 'string') {
- canvas = document.getElementById(canvas);
- }
-
- if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {
- throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');
- }
-
- var context = canvas.getContext('2d');
-
- try {
- return context.getImageData(topX, topY, width, height);
- } catch (e) {
- throw new Error('unable to access image data: ' + e);
- }
- }
- /**
- * @param {HTMLCanvasElement} canvas
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @param {Float} radius
- * @returns {undefined}
- */
-
-
- function processCanvasRGBA(canvas, topX, topY, width, height, radius) {
- if (isNaN(radius) || radius < 1) {
- return;
- }
-
- radius |= 0;
- var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
- imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);
- canvas.getContext('2d').putImageData(imageData, topX, topY);
- }
- /**
- * @param {ImageData} imageData
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @param {Float} radius
- * @returns {ImageData}
- */
-
-
- function processImageDataRGBA(imageData, topX, topY, width, height, radius) {
- var pixels = imageData.data;
- var div = 2 * radius + 1; // const w4 = width << 2;
-
- var widthMinus1 = width - 1;
- var heightMinus1 = height - 1;
- var radiusPlus1 = radius + 1;
- var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
- var stackStart = new BlurStack();
- var stack = stackStart;
- var stackEnd;
-
- for (var i = 1; i < div; i++) {
- stack = stack.next = new BlurStack();
-
- if (i === radiusPlus1) {
- stackEnd = stack;
- }
- }
-
- stack.next = stackStart;
- var stackIn = null,
- stackOut = null,
- yw = 0,
- yi = 0;
- var mulSum = mulTable[radius];
- var shgSum = shgTable[radius];
-
- for (var y = 0; y < height; y++) {
- stack = stackStart;
- var pr = pixels[yi],
- pg = pixels[yi + 1],
- pb = pixels[yi + 2],
- pa = pixels[yi + 3];
-
- for (var _i = 0; _i < radiusPlus1; _i++) {
- stack.r = pr;
- stack.g = pg;
- stack.b = pb;
- stack.a = pa;
- stack = stack.next;
- }
-
- var rInSum = 0,
- gInSum = 0,
- bInSum = 0,
- aInSum = 0,
- rOutSum = radiusPlus1 * pr,
- gOutSum = radiusPlus1 * pg,
- bOutSum = radiusPlus1 * pb,
- aOutSum = radiusPlus1 * pa,
- rSum = sumFactor * pr,
- gSum = sumFactor * pg,
- bSum = sumFactor * pb,
- aSum = sumFactor * pa;
-
- for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {
- var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);
- var r = pixels[p],
- g = pixels[p + 1],
- b = pixels[p + 2],
- a = pixels[p + 3];
- var rbs = radiusPlus1 - _i2;
- rSum += (stack.r = r) * rbs;
- gSum += (stack.g = g) * rbs;
- bSum += (stack.b = b) * rbs;
- aSum += (stack.a = a) * rbs;
- rInSum += r;
- gInSum += g;
- bInSum += b;
- aInSum += a;
- stack = stack.next;
- }
-
- stackIn = stackStart;
- stackOut = stackEnd;
-
- for (var x = 0; x < width; x++) {
- var paInitial = aSum * mulSum >> shgSum;
- pixels[yi + 3] = paInitial;
-
- if (paInitial !== 0) {
- var _a2 = 255 / paInitial;
-
- pixels[yi] = (rSum * mulSum >> shgSum) * _a2;
- pixels[yi + 1] = (gSum * mulSum >> shgSum) * _a2;
- pixels[yi + 2] = (bSum * mulSum >> shgSum) * _a2;
- } else {
- pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;
- }
-
- rSum -= rOutSum;
- gSum -= gOutSum;
- bSum -= bOutSum;
- aSum -= aOutSum;
- rOutSum -= stackIn.r;
- gOutSum -= stackIn.g;
- bOutSum -= stackIn.b;
- aOutSum -= stackIn.a;
-
- var _p = x + radius + 1;
-
- _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;
- rInSum += stackIn.r = pixels[_p];
- gInSum += stackIn.g = pixels[_p + 1];
- bInSum += stackIn.b = pixels[_p + 2];
- aInSum += stackIn.a = pixels[_p + 3];
- rSum += rInSum;
- gSum += gInSum;
- bSum += bInSum;
- aSum += aInSum;
- stackIn = stackIn.next;
- var _stackOut = stackOut,
- _r = _stackOut.r,
- _g = _stackOut.g,
- _b = _stackOut.b,
- _a = _stackOut.a;
- rOutSum += _r;
- gOutSum += _g;
- bOutSum += _b;
- aOutSum += _a;
- rInSum -= _r;
- gInSum -= _g;
- bInSum -= _b;
- aInSum -= _a;
- stackOut = stackOut.next;
- yi += 4;
- }
-
- yw += width;
- }
-
- for (var _x = 0; _x < width; _x++) {
- yi = _x << 2;
-
- var _pr = pixels[yi],
- _pg = pixels[yi + 1],
- _pb = pixels[yi + 2],
- _pa = pixels[yi + 3],
- _rOutSum = radiusPlus1 * _pr,
- _gOutSum = radiusPlus1 * _pg,
- _bOutSum = radiusPlus1 * _pb,
- _aOutSum = radiusPlus1 * _pa,
- _rSum = sumFactor * _pr,
- _gSum = sumFactor * _pg,
- _bSum = sumFactor * _pb,
- _aSum = sumFactor * _pa;
-
- stack = stackStart;
-
- for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {
- stack.r = _pr;
- stack.g = _pg;
- stack.b = _pb;
- stack.a = _pa;
- stack = stack.next;
- }
-
- var yp = width;
- var _gInSum = 0,
- _bInSum = 0,
- _aInSum = 0,
- _rInSum = 0;
-
- for (var _i4 = 1; _i4 <= radius; _i4++) {
- yi = yp + _x << 2;
-
- var _rbs = radiusPlus1 - _i4;
-
- _rSum += (stack.r = _pr = pixels[yi]) * _rbs;
- _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;
- _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;
- _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;
- _rInSum += _pr;
- _gInSum += _pg;
- _bInSum += _pb;
- _aInSum += _pa;
- stack = stack.next;
-
- if (_i4 < heightMinus1) {
- yp += width;
- }
- }
-
- yi = _x;
- stackIn = stackStart;
- stackOut = stackEnd;
-
- for (var _y = 0; _y < height; _y++) {
- var _p2 = yi << 2;
-
- pixels[_p2 + 3] = _pa = _aSum * mulSum >> shgSum;
-
- if (_pa > 0) {
- _pa = 255 / _pa;
- pixels[_p2] = (_rSum * mulSum >> shgSum) * _pa;
- pixels[_p2 + 1] = (_gSum * mulSum >> shgSum) * _pa;
- pixels[_p2 + 2] = (_bSum * mulSum >> shgSum) * _pa;
- } else {
- pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;
- }
-
- _rSum -= _rOutSum;
- _gSum -= _gOutSum;
- _bSum -= _bOutSum;
- _aSum -= _aOutSum;
- _rOutSum -= stackIn.r;
- _gOutSum -= stackIn.g;
- _bOutSum -= stackIn.b;
- _aOutSum -= stackIn.a;
- _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;
- _rSum += _rInSum += stackIn.r = pixels[_p2];
- _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];
- _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];
- _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];
- stackIn = stackIn.next;
- _rOutSum += _pr = stackOut.r;
- _gOutSum += _pg = stackOut.g;
- _bOutSum += _pb = stackOut.b;
- _aOutSum += _pa = stackOut.a;
- _rInSum -= _pr;
- _gInSum -= _pg;
- _bInSum -= _pb;
- _aInSum -= _pa;
- stackOut = stackOut.next;
- yi += width;
- }
- }
-
- return imageData;
- }
- /**
- * @param {HTMLCanvasElement} canvas
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @param {Float} radius
- * @returns {undefined}
- */
-
-
- function processCanvasRGB(canvas, topX, topY, width, height, radius) {
- if (isNaN(radius) || radius < 1) {
- return;
- }
-
- radius |= 0;
- var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
- imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);
- canvas.getContext('2d').putImageData(imageData, topX, topY);
- }
- /**
- * @param {ImageData} imageData
- * @param {Integer} topX
- * @param {Integer} topY
- * @param {Integer} width
- * @param {Integer} height
- * @param {Float} radius
- * @returns {ImageData}
- */
-
-
- function processImageDataRGB(imageData, topX, topY, width, height, radius) {
- var pixels = imageData.data;
- var div = 2 * radius + 1; // const w4 = width << 2;
-
- var widthMinus1 = width - 1;
- var heightMinus1 = height - 1;
- var radiusPlus1 = radius + 1;
- var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
- var stackStart = new BlurStack();
- var stack = stackStart;
- var stackEnd;
-
- for (var i = 1; i < div; i++) {
- stack = stack.next = new BlurStack();
-
- if (i === radiusPlus1) {
- stackEnd = stack;
- }
- }
-
- stack.next = stackStart;
- var stackIn = null;
- var stackOut = null;
- var mulSum = mulTable[radius];
- var shgSum = shgTable[radius];
- var p, rbs;
- var yw = 0,
- yi = 0;
-
- for (var y = 0; y < height; y++) {
- var pr = pixels[yi],
- pg = pixels[yi + 1],
- pb = pixels[yi + 2],
- rOutSum = radiusPlus1 * pr,
- gOutSum = radiusPlus1 * pg,
- bOutSum = radiusPlus1 * pb,
- rSum = sumFactor * pr,
- gSum = sumFactor * pg,
- bSum = sumFactor * pb;
- stack = stackStart;
-
- for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {
- stack.r = pr;
- stack.g = pg;
- stack.b = pb;
- stack = stack.next;
- }
-
- var rInSum = 0,
- gInSum = 0,
- bInSum = 0;
-
- for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {
- p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);
- rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);
- gSum += (stack.g = pg = pixels[p + 1]) * rbs;
- bSum += (stack.b = pb = pixels[p + 2]) * rbs;
- rInSum += pr;
- gInSum += pg;
- bInSum += pb;
- stack = stack.next;
- }
-
- stackIn = stackStart;
- stackOut = stackEnd;
-
- for (var x = 0; x < width; x++) {
- pixels[yi] = rSum * mulSum >> shgSum;
- pixels[yi + 1] = gSum * mulSum >> shgSum;
- pixels[yi + 2] = bSum * mulSum >> shgSum;
- rSum -= rOutSum;
- gSum -= gOutSum;
- bSum -= bOutSum;
- rOutSum -= stackIn.r;
- gOutSum -= stackIn.g;
- bOutSum -= stackIn.b;
- p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;
- rInSum += stackIn.r = pixels[p];
- gInSum += stackIn.g = pixels[p + 1];
- bInSum += stackIn.b = pixels[p + 2];
- rSum += rInSum;
- gSum += gInSum;
- bSum += bInSum;
- stackIn = stackIn.next;
- rOutSum += pr = stackOut.r;
- gOutSum += pg = stackOut.g;
- bOutSum += pb = stackOut.b;
- rInSum -= pr;
- gInSum -= pg;
- bInSum -= pb;
- stackOut = stackOut.next;
- yi += 4;
- }
-
- yw += width;
- }
-
- for (var _x2 = 0; _x2 < width; _x2++) {
- yi = _x2 << 2;
-
- var _pr2 = pixels[yi],
- _pg2 = pixels[yi + 1],
- _pb2 = pixels[yi + 2],
- _rOutSum2 = radiusPlus1 * _pr2,
- _gOutSum2 = radiusPlus1 * _pg2,
- _bOutSum2 = radiusPlus1 * _pb2,
- _rSum2 = sumFactor * _pr2,
- _gSum2 = sumFactor * _pg2,
- _bSum2 = sumFactor * _pb2;
-
- stack = stackStart;
-
- for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {
- stack.r = _pr2;
- stack.g = _pg2;
- stack.b = _pb2;
- stack = stack.next;
- }
-
- var _rInSum2 = 0,
- _gInSum2 = 0,
- _bInSum2 = 0;
-
- for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {
- yi = yp + _x2 << 2;
- _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);
- _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;
- _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;
- _rInSum2 += _pr2;
- _gInSum2 += _pg2;
- _bInSum2 += _pb2;
- stack = stack.next;
-
- if (_i8 < heightMinus1) {
- yp += width;
- }
- }
-
- yi = _x2;
- stackIn = stackStart;
- stackOut = stackEnd;
-
- for (var _y2 = 0; _y2 < height; _y2++) {
- p = yi << 2;
- pixels[p] = _rSum2 * mulSum >> shgSum;
- pixels[p + 1] = _gSum2 * mulSum >> shgSum;
- pixels[p + 2] = _bSum2 * mulSum >> shgSum;
- _rSum2 -= _rOutSum2;
- _gSum2 -= _gOutSum2;
- _bSum2 -= _bOutSum2;
- _rOutSum2 -= stackIn.r;
- _gOutSum2 -= stackIn.g;
- _bOutSum2 -= stackIn.b;
- p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;
- _rSum2 += _rInSum2 += stackIn.r = pixels[p];
- _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];
- _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];
- stackIn = stackIn.next;
- _rOutSum2 += _pr2 = stackOut.r;
- _gOutSum2 += _pg2 = stackOut.g;
- _bOutSum2 += _pb2 = stackOut.b;
- _rInSum2 -= _pr2;
- _gInSum2 -= _pg2;
- _bInSum2 -= _pb2;
- stackOut = stackOut.next;
- yi += width;
- }
- }
-
- return imageData;
- }
- /**
- *
- */
-
-
- var BlurStack =
- /**
- * Set properties.
- */
- function BlurStack() {
- _classCallCheck(this, BlurStack);
-
- this.r = 0;
- this.g = 0;
- this.b = 0;
- this.a = 0;
- this.next = null;
- };
-
-
-
-
- /***/ })
-
- }]);
- //# sourceMapp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V4dC5kZWxlZ2F0ZTtcblxuICAgICAgICAgIGlmIChkZWxlZ2F0ZSkge1xuICAgICAgICAgICAgdmFyIGRlbGVnYXRlUmVzdWx0ID0gbWF5YmVJbnZva2VEZWxlZ2F0ZShkZWxlZ2F0ZSwgY29udGV4dCk7XG5cbiAgICAgICAgICAgIGlmIChkZWxlZ2F0ZVJlc3VsdCkge1xuICAgICAgICAgICAgICBpZiAoZGVsZWdhdGVSZXN1bHQgPT09IENvbnRpbnVlU2VudGluZWwpIGNvbnRpbnVlO1xuICAgICAgICAgICAgICByZXR1cm4gZGVsZWdhdGVSZXN1bHQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgICAgLy8gU2V0dGluZyBjb250ZXh0Ll9zZW50IGZvciBsZWdhY3kgc3VwcG9ydCBvZiBCYWJlbCdzXG4gICAgICAgICAgICAvLyBmdW5jdGlvbi5zZW50IGltcGxlbWVudGF0aW9uLlxuICAgICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgaWYgKHN0YXRlID09PSBHZW5TdGF0ZVN1c3BlbmRlZFN0YXJ0KSB7XG4gICAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh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iAgICAgICAgICBpZiAoZGVsZWdhdGUuaXRlcmF0b3JbXCJyZXR1cm5cIl0pIHtcbiAgICAgICAgICAgIC8vIElmIHRoZSBkZWxlZ2F0ZSBpdGVyYXRvciBoYXMgYSByZXR1cm4gbWV0aG9kLCBnaXZlIGl0IGFcbiAgICAgICAgICAgIC8vIGNoYW5jZSB0byBjbGVhbiB1cC5cbiAgICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJyZXR1cm5cIjtcbiAgICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkJDE7XG4gICAgICAgICAgICBtYXliZUludm9rZURlbGVnYXRlKGRlbGVnYXRlLCBjb250ZXh0KTtcblxuICAgICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgICAgLy8gSWYgbWF5YmVJbnZva2VEZWxlZ2F0ZShjb250ZXh0KSBjaGFuZ2VkIGNvbnRleHQubWV0aG9kIGZyb21cbiAgICAgICAgICAgICAgLy8gXCJyZXR1cm5cIiB0byBcInRocm93XCIsIGxldCB0aGF0IG92ZXJyaWRlIHRoZSBUeXBlRXJyb3IgYmVsb3cuXG4gICAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKG1ldGhvZCwgZGVsZWdhdGUuaXRlcmF0b3IsIGNvbnRleHQuYXJnKTtcblxuICAgICAgaWYgKHJlY29yZC50e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XRvck1ldGhvZCkge1xuICAgICAgICAgIHJldHVybiBpdGVyYXRvck1ldGhvZC5jYWxsKGl0ZXJhYmxlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2YgaXRlcmFibGUubmV4dCA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgcmV0dXJuIGl0ZXJhYmxlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFpc05hTihpdGVyYWJsZS5sZW5ndGgpKSB7XG4gICAgICAgICAgdmFyIGkgPSAtMSxcbiAgICAgICAgICAgICAgbmV4dCA9IGZ1bmN0aW9uIG5leHQoKSB7XG4gICAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgIGlmIChoYXNPd24uY2FsbChpdGVyYWJsZSwgaSkpIHtcbiAgICAgICAgICAgICAgICBuZXh0LnZhbHVlID0gaXRlcmFibGVbaV07XG4gICAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5leHQ7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbmV4dC52YWx1ZSA9IHVuZGVmaW5lZCQxO1xuICAgICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcbiAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgIH07XG5cbiAgICAgICAgICByZXR1cm4gbmV4dC5uZXh0ID0gbmV4dDtcbiAgICAgICAgfVxuICAgICAgfSAvLyBSZXR1cm4gYW4gaXRlcmF0b3Igd2l0aCBubyB2YWx1ZXMuXG5cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgbmV4dDogZG9uZVJlc3VsdFxuICAgICAgfTtcbiAgICB9XG5cbiAgICBleHBvcnRzLnZhbHVlcyA9IHZhbHVlcztcblxuICAgIGZ1bmN0aW9uIGRvbmVSZXN1bHQoKSB7XG4gICAgICByZXR1cm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1cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIHN0b3A6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5kb25lID0gdHJ1ZTtcbiAgICAgICAgdmFyIHJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgICAgdmFyIHJvb3RSZWNvcmQgPSByb290RW50cnkuY29tcGxldGlvbjtcblxuICAgICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICB0aHJvdyByb290UmVjb3JkLmFyZztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgICB9LFxuICAgICAgZGlzcGF0Y2hFeGNlcHRpb246IGZ1bmN0aW9uIChleGNlcHRpb24pIHtcbiAgICAgICAgaWYgKHRoaXMuZG9uZSkge1xuICAgICAgICAgIHRocm93IGV4Y2VwdGlvbjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcblxuICAgICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgICByZWNvcmQudHlwZSA9IFwidGhyb3dcIjtcbiAgICAgICAgICByZWNvcmQuYXJnID0gZXhjZXB0aW9uO1xuICAgICAgICAgIGNvbnRleHQubmV4dCA9IGxvYztcblxuICAgICAgICAgIGlmIChjYXVnaHQpIHtcbiAgICAgICAgICAgIC8vIElmIHRoZSBkaXNwYXRjaGVkIGV4Y2VwdGlvbiB3YXMgY2F1Z2h0IGJ5IGEgY2F0Y2ggYmxvY2ssXG4gICAgICAgICAgICAvLyB0aGVuIGxldCB0aGF0IGNhdGNoIGJsb2NrIGhhbmRsZSB0aGUgZXhjZXB0aW9uIG5vcm1hbGx5LlxuICAgICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkJDE7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuICEhY2F1Z2h0O1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcblxuICAgICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgICAvLyBFeGNlcHRpb24gdGhyb3duIG91dHNpZGUgb2YgYW55IHRyeSBibG9jayB0aGF0IGNvdWxkIGhhbmRsZVxuICAgICAgICAgICAgLy8gaXQsIHNvIHNldCB0aGUgY29tcGxldGlvbiB2YWx1ZSBvZiB0aGUgZW50aXJlIGZ1bmN0aW9uIHRvXG4gICAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShcImVuZFwiKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgICAgdmFyIGhhc0NhdGNoID0gaGFzT3duLmNhbGwoZW50cnksIFwiY2F0Y2hMb2NcIik7XG4gICAgICAgICAgICB2YXIgaGFzRmluYWxseSA9IGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIik7XG5cbiAgICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBhYnJ1cHQ6IGZ1bmN0aW9uICh0eXBlLCBhcmcpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcblxuICAgICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiYgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJiAodHlwZSA9PT0gXCJicmVha1wiIHx8IHR5cGUgPT09IFwiY29udGludWVcIikgJiYgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiYgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgICBpZiAoZmluYWxseUVudHJ5KSB7XG4gICAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgICB9LFxuICAgICAgY29tcGxldGU6IGZ1bmN0aW9uIChyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJicmVha1wiIHx8IHJlY29yZC50eXBlID09PSBcImNvbnRpbnVlXCIpIHtcbiAgICAgICAgICB0aGlzLm5leHQgPSByZWNvcmQuYXJnO1xuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgdGhpcy5ydmFsID0gdGhpcy5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICAgIHRoaXMubWV0aG9kID0gXCJyZXR1cm5cIjtcbiAgICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gYWZ0ZXJMb2M7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH0sXG4gICAgICBmaW5pc2g6IGZ1bmN0aW9uIChmaW5hbGx5TG9jKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG5cbiAgICAgICAgICBpZiAoZW50cnkuZmluYWxseUxvYyA9PT0gZmluYWxseUxvYykge1xuICAgICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFwiY2F0Y2hcIjogZnVuY3Rpb24gKHRyeUxvYykge1xuICAgICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgdmFyI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4gICAgdmFsdWU6IGZ1bmN0aW9uIHJ1bkV2ZW50cygpIHtcbiAgICAgIGlmICghdGhpcy53b3JraW5nKSB7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgdmFyIGRvY3VtZW50ID0gdGhpcy5zY3JlZW4sXG4gICAgICAgICAgZXZlbnRzID0gdGhpcy5ldmVudHMsXG4gICAgICAgICAgZXZlbnRFbGVtZW50cyA9IHRoaXMuZXZlbnRFbGVtZW50cztcbiAgICAgIHZhciBzdHlsZSA9IGRvY3VtZW50LmN0eC5jYW52YXMuc3R5bGU7XG5cbiAgICAgIGlmIChzdHlsZSkge1xuICAgICAgICBzdHlsZS5jdXJzb3IgPSAnJztcbiAgICAgIH1cblxuICAgICAgZXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKF9yZWYsIGkpIHtcbiAgICAgICAgdmFyIHJ1biA9IF9yZWYucnVuO1xuICAgICAgICB2YXIgZWxlbWVudCA9IGV2ZW50RWxlbWVudHNbaV07XG5cbiAgICAgICAgd2hpbGUgKGVsZW1lbnQpIHtcbiAgICAgICAgICBydW4oZWxlbWVudCk7XG4gICAgICAgICAgZWxlbWVudCA9IGVsZW1lbnQucGFyZW50O1xuICAgICAgICB9XG4gICAgICB9KTsgLy8gZG9uZSBydW5uaW5nLCBjbGVhclxuXG4gICAgICB0aGlzLmV2ZW50cyA9IFtdO1xuICAgICAgdGhpcy5ldmVudEVsZW1lbnRzID0gW107XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImNoZWNrUGF0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBjaGVja1BhdGgoZWxlbWVudCwgY3R4KSB7XG4gICAgICBpZiAoIXRoaXMud29ya2luZyB8fCAhY3R4KSB7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgdmFyIGV2ZW50cyA9IHRoaXMuZXZlbnRzLFxuICAgICAgICAgIGV2ZW50RWxlbWVudHMgPSB0aGlzLmV2ZW50RWxlbWVudHM7XG4gICAgICBldmVudHMuZm9yRWFjaChmdW5jdGlvbiAoX3JlZjIsIGkpIHtcbiAgICAgICAgdmFyIHggPSBfcmVmMi54LFxuICAgICAgICAgICAgeSA9IF9yZWYyLnk7XG5cbiAgICAgICAgaWYgKCFldmVudEVsZW1lbnRzW2ldICYmIGN0eC5pc1BvaW50SW5QYXRoICYmIGN0eC5pc1BvaW50SW5QYXRoKHgsIHkpKSB7XG4gICAgICAgICAgZXZlbnRFbGVtZW50c1tpXSA9IGVsZW1lbnQ7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJjaGVja0JvdW5kaW5nQm94XCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGNoZWNrQm91bmRpbmdCb3goZWxlbWVudCwgYm91bmRpbmdCb3gpIHtcbiAgICAgIGlmICghdGhpcy53b3JraW5nIHx8ICFib3VuZGluZ0JveCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciBldmVudHMgPSB0aGlzLmV2ZW50cyxcbiAgICAgICAgICBldmVudEVsZW1lbnRzID0gdGhpcy5ldmVudEVsZW1lbnRzO1xuICAgICAgZXZlbnRzLmZvckVhY2goZnVuY3Rpb24gKF9yZWYzLCBpKSB7XG4gICAgICAgIHZhciB4ID0gX3JlZjMueCxcbiAgICAgICAgICAgIHkgPSBfcmVmMy55O1xuXG4gICAgICAgIGlmICghZXZlbnRFbGVtZW50c1tpXSAmJiBib3VuZGluZ0JveC5pc1BvaW50SW5Cb3goeCwgeSkpIHtcbiAgICAgICAgICBldmVudEVsZW1lbnRzW2ldID0gZWxlbWVudDtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcIm1hcFhZXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIG1hcFhZKHgsIHkpIHtcbiAgICAgIHZhciBfdGhpcyRzY3JlZW4gPSB0aGlzLnNjcmVlbixcb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oaXMsIFBhcnNlcik7XG5cbiAgICB0aGlzLmZldGNoID0gZmV0Y2g7XG4gICAgdGhpcy5ET01QYXJzZXIgPSBET01QYXJzZXI7XG4gIH1cblxuICBfY3JlYXRlQ2xhc3MoUGFyc2VyLCBbe1xuICAgIGtleTogXCJwYXJzZVwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiAoKSB7XG4gICAgICB2YXIgX3BhcnNlID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZShyZXNvdXJjZSkge1xuICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUkKF9jb250ZXh0KSB7XG4gICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoX2NvbnRleHQucHJldiA9IF9jb250ZXh0Lm5leHQpIHtcbiAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgIGlmICghL148Ly50ZXN0KHJlc291cmNlKSkge1xuICAgICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDI7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIHRoaXMucGFyc2VGcm9tU3RyaW5nKHJlc291cmNlKSk7XG5cbiAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgdGhpcy5sb2FkKHJlc291cmNlKSk7XG5cbiAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LnN0b3AoKTtcbiAgICAgICAgICAgIH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ge1xuICAgICAgdmFyIF9sb2FkID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZTIodXJsKSB7XG4gICAgICAgIHZhciByZXNwb25zZSwgeG1sO1xuICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUyJChfY29udGV4dDIpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dDIucHJldiA9IF9jb250ZXh0Mi5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDI7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmV0Y2godXJsKTtcblxuICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBfY29udGV4dDIuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnRleHQoKTtcblxuICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgeG1sID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5hYnJ1cHQoXCJyZXR1cm5cIiwgdGhpcy5wYXJzZUZyb21TdHJpbmcoeG1sKSk7XG5cbiAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlMiwgdGhpcyk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uI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gIH1cblxuICAgICAgICAgICAgc2V0LmZvbnRTdHlsZSA9IHRydWU7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgIXNldC5mb250VmFyaWFudCAmJiBGb250LnZhcmlhbnRzLmluY2x1ZGVzKHBhcnQpOlxuICAgICAgICAgICAgaWYgKHBhcnQgIT09ICdpbmhlcml0Jykge1xuICAgICAgICAgICAgICBmb250VmFyaWFudCA9IHBhcnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldC5mb250U3R5bGUgPSB0cnVlO1xuICAgICAgICAgICAgc2V0LmZvbnRWYXJpYW50ID0gdHJ1ZTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAhc2V0LmZvbnRXZWlnaHQgJiYgRm9udC53ZWlnaHRzLmluY2x1ZGVzKHBhcnQpOlxuICAgICAgICAgICAgaWYgKHBhcnQgIT09ICdpbmhlcml0Jykge1xuICAgICAgICAgICAgICBmb250V2VpZ2h0ID0gcGFydDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2V0LmZvbnRTdHlsZSA9IHRydWU7XG4gICAgICAgICAgICBzZXQuZm9udFZhcmlhbnQgPSB0cnVlO1xuICAgICAgICAgICAgc2V0LmZvbnRXZWlnaHQgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICFzZXQuZm9udFNpemU6XG4gICAgICAgICAgICBpZiAocGFydCAhPT0gJ2luaGVyaXQnKSB7XG4gICAgICAgICAgICAgIHZhciBfcGFydCRzcGxpdCA9IHBhcnQuc3BsaXQoJy8nKTtcblxuICAgICAgICAgICAgICB2YXIgX3BhcnQkc3BsaXQyID0gX3NsaWNlZFRvQXJyYXkoX3BhcnQkc3BsaXQsIDEpO1xuXG4gICAgICAgICAgICAgIGZvbnRTaXplID0gX3BhcnQkc3BsaXQyWzBdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzZXQuZm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DogTnVtYmVyLk5hTjtcbiAgICB2YXIgeDIgPSBhcmd1bWVudHMubGVuZ3RoID4gMiAmJiBhcmd1bWVudHNbMl0gIT09IHVuZGVmaW5lZCA/IGFyZ3VtZW50c1syXSA6IE51bWJlci5OYU47XG4gICAgdmFyIHkyID0gYXJndW1lbnRzLmxlbmd0aCA+IDMgJiYgYXJndW1lbnRzWzNdICE9PSB1bmRlZmluZWQgPyBhcmd1bWVudHNbM10gOiBOdW1iZXIuTmFOO1xuXG4gICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIEJvdW5kaW5nQm94KTtcblxuICAgIHRoaXMueDEgPSB4MTtcbiAgICB0aGlzLnkxID0geTE7XG4gICAgdGhpcy54MiA9IHgyO1xuICAgIHRoaXMueTIgPSB5MjtcbiAgICB0aGlzLmFkZFBvaW50KHgxLCB5MSk7XG4gICAgdGhpcy5hZGRQb2ludCh4MiwgeTIpO1xuICB9XG5cbiAgX2NyZWF0ZUNsYXNzKEJvdW5kaW5nQm94LCBbe1xuICAgIGtleTogXCJhZGRQb2ludFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRQb2ludCh4LCB5KSB7XG4gICAgICBpZiAodHlwZW9mIHggIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIGlmIChpc05hTih0aGlzLngxKSB8fCBpc05hTih0aGlzLngyKSkge1xuICAgICAgICAgIHRoaXMueDEgPSB4O1xuICAgICAgICAgIHRoaXMueDIgPSB4O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHggPCB0aGlzLngxKSB7XG4gICAgICAgICAgdGhpcy54MSA9IHg7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoeCA+IHRoaXMueDIpIHtcbiAgICAgICAgICB0aGlzLngyID0geDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIHkgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIGlmIChpc05hTih0aGlzLnkxKSB8fCBpc05hTih0aGlzLnkyKSkge1xuICAgICAgICAgIHRoaXMueTEgPSB5O1xuICAgICAgICAgIHRoaXMueTIgPSB5O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHkgPCB0aGlzLnkxKSB7XG4gICAgICAgICAgdGhpcy55MSA9IHk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoeSA+IHRoaXMueTIpIHtcbiAgICAgICAgICB0aGlzLnkyID0geTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJhZGRYXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGFkZFgoeCkge1xuICAgICAgdGhpcy5hZGRQb2ludCh4LCBudWxsKTtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiYWRkWVwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRZKHkpIHtcbiAgICAgIHRoaXMuYWRkUG9pbnQobnVsbCwgeSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImFkZEJvdW5kaW5nQm94XCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGFkZEJvdW5kaW5nQm94KGJvdW5kaW5nQm94KSB7XG4gICAgICBpZiAoIWJvdW5kaW5nQm94KSB7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgdmFyIHgxID0gYm91bmRpbmdCb3gueDEsXG4gICAgICAgICAgeTEgPSBib3VuZGluZ0JveC55MSxcbiAgICAgICAgICB4MiA9IGJvdW5kaW5nQm94LngyLFxuICAgICAgICAgIHkyID0gYm91bmRpbmdCb3gueTI7XG4gICAgICB0aGlzLmFkZFBvaW50KHgxLCB5MSk7XG4gICAgICB0aGlzLmFkZFBvaW50KHgyLCB5Mik7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInN1bUN1YmljXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHN1bUN1YmljKHQsIHAwLCBwMSwgcDIsIHAzKSB7XG4gICAgICByZXR1cm4gTW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BzKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBjdHgud2Via2l0TGluZURhc2ggIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBjdHgud2Via2l0TGluZURhc2ggPSBnYXBzO1xuICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGN0eC5tb3pEYXNoICE9PSAndW5kZWZpbmVkJyAmJiAhKGdhcHMubGVuZ3RoID09PSAxICYmIGdhcHNbMF0gPT09IDApKSB7XG4gICAgICAgICAgICBjdHgubW96RGFzaCA9IGdhcHM7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIG9mZnNldCA9IHN0cm9rZURhc2hvZmZzZXRQcm9wLmdldFBpeGVscygpO1xuXG4gICAgICAgICAgaWYgKHR5cGVvZiBjdHgubGluZURhc2hPZmZzZXQgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBjdHgubGluZURhc2hPZmZzZXQgPSBvZmZzZXQ7XG4gICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgY3R4LndlYmtpdExpbmVEYXNoT2Zmc2V0ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY3R4LndlYmtpdExpbmVEYXNoT2Zmc2V0ID0gb2Zmc2V0O1xuICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGN0eC5tb3pEYXNoT2Zmc2V0ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY3R4Lm1vekRhc2hPZmZzZXQgPSBvZmZzZXQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IC8vIGZvbnRcblxuXG4gICAgICB0aGlzLm1vZGlmaWVkRW1TaXplU3RhY2sgPSBmYWxzZTtcblxuICAgICAgaWYgKHR5cGVvZiBjdHguZm9udCAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgdmFyIGZvbnRTdHlsZVByb3AgPSB0aGlzLmdldFN0eWxlKCdmb250Jyk7XG4gICAgICAgI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W50O1xuICAgICAgcmV0dXJuIHBvaW50O1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJnZXRSZWZsZWN0ZWRDb250cm9sUG9pbnRcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0UmVmbGVjdGVkQ29udHJvbFBvaW50KCkge1xuICAgICAgdmFyIHByZXZpb3VzQ29tbWFuZCA9IHRoaXMucHJldmlvdXNDb21tYW5kLnRvTG93ZXJDYXNlKCk7XG5cbiAgICAgIGlmIChwcmV2aW91c0NvbW1hbmQgIT09ICdjJyAmJiBwcmV2aW91c0NvbW1hbmQgIT09ICdzJyAmJiBwcmV2aW91c0NvbW1hbmQgIT09ICdxJyAmJiBwcmV2aW91c0NvbW1hbmQgIT09ICd0Jykge1xuICAgICAgICByZXR1cm4gdGhpcy5jdXJyZW50O1xuICAgICAgfSAvLyByZWZsZWN0IHBvaW50XG5cblxuICAgICAgdmFyIF90aGlzJGN1cnJlbnQgPSB0aGlzLmN1cnJlbnQsXG4gICAgICAgICAgY3ggPSBfdGhpcyRjdXJyZW50LngsXG4gICAgICAgICAgY3kgPSBfdGhpcyRjdXJyZW50LnksXG4gICAgICAgICAgX3RoaXMkY29udHJvbCA9IHRoaXMuY29udHJvbCxcbiAgICAgICAgICBveCA9IF90aGlzJGNvbnRyb2wueCxcbiAgICAgICAgICBveSA9IF90aGlzJGNvbnRyb2wueTtcbiAgICAgIHZhciBwb2ludCA9IG5ldyBQb2ludCgyICogY3ggLSBveCwgMiAqIGN5IC0gb3kpO1xuICAgICAgcmV0dXJuIHBvaW50O1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJtYWtlQWJzb2x1dGVcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gbWFrZUFic29sdXRlKHBvaW50KSB7XG4gICAgICBpZiAodGhpcy5pc1JlbGF0aXZlQ29tbWFuZCgpKSB7XG4gICAgICAgIHZhciBfdGhpcyRjdXJyZW50MiA9IHRoaXMuY3VycmVudCxcbiAgICAgICAgIC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3YnOlxuICAgICAgICAgICAgdGhpcy5wYXRoVihjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQyc6XG4gICAgICAgICAgY2FzZSAnYyc6XG4gICAgICAgICAgICB0aGlzLnBhdGhDKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdTJzpcbiAgICAgICAgICBjYXNlICdzJzpcbiAgICAgICAgICAgIHRoaXMucGF0aFMoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1EnOlxuICAgICAgICAgIGNhc2UgJ3EnOlxuICAgICAgICAgICAgdGhpcy5wYXRoUShjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnVCc6XG4gICAgICAgICAgY2FzZSAndCc6XG4gICAgICAgICAgICB0aGlzLnBhdGhUKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICBjYXNlICdhJzpcbiAgICAgICAgICAgIHRoaXMucGF0aEEoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1onOlxuICAgICAgICAgIGNhc2UgJ3onOlxuICAgICAgICAgICAgdGhpcy5wYXRoWihjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBib3VuZGluZ0JveDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiZ2V0Qm91bmRpbmdCb3hcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0Qm91bmRpbmdCb3goXykge1xuICAgICAgcmV0dXJuIHRoaXM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tcbiAgICAgICAgICAgIHZhciBfbWFya2VycyRpID0gX3NsaWNlZFRvQXJyYXkobWFya2Vyc1tpXSwgMiksXG4gICAgICAgICAgICAgICAgX3BvaW50ID0gX21hcmtlcnMkaVswXSxcbiAgICAgICAgICAgICAgICBfYW5nbGUgPSBfbWFya2VycyRpWzFdO1xuXG4gICAgICAgICAgICBfbWFya2VyLnJlbmRlcihjdHgsIF9wb2ludCwgX2FuZ2xlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobWFya2VyRW5kU3R5bGVQcm9wLmlzVXJsRGVmaW5pdGlvbigpKSB7XG4gICAgICAgICAgdmFyIF9tYXJrZXIyID0gbWFya2VyRW5kU3R5bGVQcm9wLmdldERlZmluaXRpb24oKTtcblxuICAgICAgICAgIHZhciBfbWFya2VycyRtYXJrZXJzTGFzdEkgPSBfc2xpY2VkVG9BcnJheShtYXJrZXJzW21hcmtlcnNMYXN0SW5kZXhdLCAyKSxcbiAgICAgICAgICAgICAgX3BvaW50MiA9IF9tYXJrZXJzJG1hcmtlcnNMYXN0SVswXSxcbiAgICAgICAgICAgICAgX2FuZ2xlMiA9IF9tYXJrZXJzJG1hcmtlcnNMYXN0SVsxXTtcblxuICAgICAgICAgIF9tYXJrZXIyLnJlbmRlcihjdHgsIF9wb2ludDIsIF9hbmdsZTIpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInBhdGhNXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHBhdGhNKGN0eCwgYm91bmRpbmdCb3gpIHtcbiAgICAgIHZhciBwYXRoUGFyc2VyID0gdGhpcy5wYXRoUGFyc2VyO1xuICAgICAgdmFyIHBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0N1cnJlbnRQb2ludCgpO1xuICAgICAgdmFyIHggPSBwb2ludC54LFxuICAgICAgICAgIHkgPSBwb2ludC55O1xuICAgICAgcGF0aFBhcnNlci5hZGRNYXJrZX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GRCZXppZXJDdXJ2ZShjdXJyZW50LngsIGN1cnJlbnQueSwgcG9pbnQueCwgcG9pbnQueSwgY29udHJvbFBvaW50LngsIGNvbnRyb2xQb2ludC55LCBjdXJyZW50UG9pbnQueCwgY3VycmVudFBvaW50LnkpO1xuXG4gICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICBjdHguYmV6aWVyQ3VydmVUbyhwb2ludC54LCBwb2ludC55LCBjb250cm9sUG9pbnQueCwgY29udHJvbFBvaW50LnksIGN1cnJlbnRQb2ludC54LCBjdXJyZW50UG9pbnQueSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwicGF0aFNcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gcGF0aFMoY3R4LCBib3VuZGluZ0JveCkge1xuICAgICAgdmFyIHBhdGhQYXJzZXIgPSB0aGlzLnBhdGhQYXJzZXI7XG5cbiAgICAgIHdoaWxlICghcGF0aFBhcnNlci5pc0NvbW1hbmRPckVuZCgpKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gcGF0aFBhcnNlci5jdXJyZW50O1xuICAgICAgICB2YXIgcG9pbnQgPSBwYXRoUGFyc2VyLmdldFJlZmxlY3RlZENvbnRyb2xQb2ludCgpO1xuICAgICAgICB2YXIgY29udHJvbFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0NvbnRyb2xQb2ludCgpO1xuICAgICAgICB2YXIgY3VycmVudFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0N1cnJlbnRQb2ludCgpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihjdXJyZW50UG9pbnQsIGNvbnRyb2xQb2ludCwgcG9pbnQpO1xuICAgICAgICBib3VuZGluZ0JveC5hZGRCZXppZXJDdXJ2ZShjdXJyZW50LngsIGN1cnJlbnQueSwgcG9pbnQueCwgcG9pbnQueSwgY29udHJvbFBvaW50LngsIGNvbnRyb2xQb2ludC55LCBjdXJyZW50UG9pbnQueCwgY3VycmVudFBvaW50LnkpO1xuXG4gICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICBjdHguYmV6aWVyQ3VydmVUbyhwb2ludC54LCBwb2ludC55LCBjb250cm9sUG9pbnQueCwgY29udHJvbFBvaW50LnksIGN1cnJlbnRQb2ludC54LCBjdXJyZW50UG9pbnQueSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwicGF0aFFcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gcGF0aFEoY3R4LCBib3VuZGluZ0JveCkge1xuICAgICAgdmFyIHBhdGhQYXJzZXIgPSB0aGlzLnBhdGhQYXJzZXI7XG5cbiAgICAgIHdoaWxlICghcGF0aFBhcnNlci5pc0NvbW1hbmRPckVuZCgpKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gcGF0aFBhcnNlci5jdXJyZW50O1xuICAgICAgICB2YXIgY29udHJvbFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0NvbnRyb2xQb2ludCgpO1xuICAgICAgICB2YXIgY3VycmVudFBvaW50ID0gcGF0aFBhcnNlci5nZXRBc0N1cnJlbnRQb2ludCgpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihjdXJyZW50UG9pbnQsIGNvbnRyb2xQb2ludCwgY29udHJvbFBvaW50KTtcbiAgICAgICAgYm91bmRpbmdCb3guYWRkUXVhZHJhdGljQ3VydmUoY3VycmVudC54LCBjdXJyZW50LnksIGNvbnRyb2xQb2ludC54LCBjb250cm9sUG9pbnQueSwgY3VycmVudFBvaW50LngsIGN1cnJlbnRQb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LnF1YWRyYXRpY0N1cnZlVG8oY29udHJvbFBvaW50LngsIGNvbnRyb2xQb2ludC55LCBjdXJyZW50UG9pbnQueCwgY3VycmVudFBvaW50LnkpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAg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55IC0gY3VycmVudFBvaW50LnkpIC8gMi4wKTsgLy8gYWRqdXN0IHJhZGlpXG5cbiAgICAgICAgdmFyIGwgPSBNYXRoLnBvdyhjdXJycC54LCAyKSAvIE1hdGgucG93KHJ4LCAyKSArIE1hdGgucG93KGN1cnJwLnksIDIpIC8gTWF0aC5wb3cocnksIDIpO1xuXG4gICAgICAgIGlmIChsID4gMSkge1xuICAgICAgICAgIHJ4ICo9IE1hdGguc3FydChsKTtcbiAgICAgICAgICByeSAqPSBNYXRoLnNxcnQobCk7XG4gICAgICAgIH0gLy8gY3gnLCBjeSdcblxuXG4gICAgICAgIHZhciBzID0gKGxhcmdlQXJjRmxhZyA9PT0gc3dlZXBGbGFnID8gLTEgOiAxKSAqIE1hdGguc3FydCgoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3cocnksIDIpIC0gTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgLSBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkgLyAoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgKyBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkpO1xuXG4gICAgICAgIGlmIChpc05hTihzKSkge1xuICAgICAgICAgIHMgPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNwcCA9IG5ldyBQb2ludChzICogcnggKiBjdXJycC55IC8gcnksIHMgKiAtcnkgKiBjdXJycC54IC8gcngpOyAvLyBjeCwgY3lcblxuICAgICAgICB2YXIgY2VudHAgPSBuZXcgUG9pbnQoKGN1cnJlbnQueCArIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnggLSBNYXRoLnNpbih4QXhpc1JvdGF0aW9uKSAqIGNwcC55LCAoY3VycmVudC55ICsgY3VycmVudFBvaW50LnkpIC8gMi4wICsgTWF0aC5zaW4oe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b3ZlVG8oeDAsIHkwKTtcbiAgICAgIH1cblxuICAgICAgcG9pbnRzLmZvckVhY2goZnVuY3Rpb24gKF9yZWYpIHtcbiAgICAgICAgdmFyIHggPSBfcmVmLngsXG4gICAgICAgICAgICB5ID0gX3JlZi55O1xuICAgICAgICBib3VuZGluZ0JveC5hZGRQb2ludCh4LCB5KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LmxpbmVUbyh4LCB5KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gYm91bmRpbmdCb3g7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImdldE1hcmtlcnNcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0TWFya2VycygpIHtcbiAgICAgIHZhciBwb2ludHMgPSB0aGlzLnBvaW50cztcbiAgICAgIHZhciBsYXN0SW5kZXggPSBwb2ludHMubGVuZ3RoIC0gMTtcbiAgICAgIHZhciBtYXJrZXJzID0gW107XG4gICAgICBwb2ludHMuZm9yRWFjaChmdW5jdGlvbiAocG9pbnQsIGkpIHtcbiAgICAgICAgaWYgKGkgPT09IGxhc3RJbmRleCkge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIG1hcmtlcnMucHVzaChbcG9pbnQsIHBvaW50LmFuZ2xlVG8ocG9pbnRzW2kgKyAxXSldKTtcbiAgICAgIH0pO1xuXG4gICAgICBpZiAobWFya2Vycy5sZW5ndGggPiAwKSB7XG4gICAgICAgIG1hcmtlcnMucHVzaChbcG9pbnRzW3BvaW50cy5sZW5ndGggLSAxXSwgbWFya2Vyc1ttYXJrZXJzLmxlbmd0aCAtIDFdWzFdXSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBtYXJrZXJzO1xuICAgIH1cbiAgfV0pO1xuXG4gIHJldHVybiBQb2x5bGluZUVsZW1lbnQ7XG59KFBhdGhFbGVtZW50KTtcblxuZnVuY3Rpb24gX2NyZWF0ZVN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AgICAgICAgIHZhciBmb250RmFtaWx5U3R5bGUgPSBjaGlsZC5nZXRTdHlsZSgnZm9udC1mYW1pbHknKTtcblxuICAgICAgICAgICAgICBpZiAoZm9udEZhbWlseVN0eWxlLmhhc1ZhbHVlKCkpIHtcbiAgICAgICAgICAgICAgICBkZWZpbml0aW9uc1tmb250RmFtaWx5U3R5bGUuZ2V0U3RyaW5nKCldID0gX2Fzc2VydFRoaXNJbml0aWFsaXplZChfdGhpcyk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGNhc2UgJ21pc3NpbmctZ2x5cGgnOlxuICAgICAgICAgICAgX3RoaXMubWlzc2luZ0dseXBoID0gY2hpbGQ7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ2dseXBoJzpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdmFyIGdseXBoID0gY2hpbGQ7XG5cbiAgICAgICAgICAgICAgaWYgKGdseXBoLmFyYWJpY0Zvcm0pIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5pc1JUTCA9IHRydWU7XG4gICAgICAgICAgICAgICAgX3RoaXMuaXNBcmFiaWMgPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBfdGhpcy5nbHlwaHNbZ2x5cGgudW5pY29kZV0gPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICBfdGhpcy5nbHlwaHNbZ2x5cGgudW5pY29kZV0gPSB7fTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBfdGhpcy5nbHlwaHNbZ2x5cGgudW5pY29kZV1bZ2x5cGguYXJhYmljRm9ybV0gPSBnbHlwaDtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5nbHlwaHNbZ2x5cGgudW5pY29kZV0gPSBnbHlwaDtcbiAgICAgICAgIC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9pbnRzWzJdLCBwb2ludHNbM10sIHBvaW50c1s0XSwgcG9pbnRzWzVdKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICAgICAgY3R4LnF1YWRyYXRpY0N1cnZlVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0sIHBvaW50c1syXSwgcG9pbnRzWzNdKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdmFyIGN4ID0gcG9pbnRzWzBdO1xuICAgICAgICAgICAgICB2YXIgY3kgPSBwb2ludHNbMV07XG4gICAgICAgICAgICAgIHZhciByeCA9IHBvaW50c1syXTtcbiAgICAgICAgICAgICAgdmFyIHJ5ID0gcG9pbnRzWzNdO1xuICAgICAgICAgICAgICB2YXIgdGhldGEgPSBwb2ludHNbNF07XG4gICAgICAgICAgICAgIHZhciBkVGhldGEgPSBwb2ludHNbNV07XG4gICAgICAgICAgICAgIHZhciBwc2kgPSBwb2ludHNbNl07XG4gICAgICAgICAgICAgIHZhciBmcyA9IHBvaW50c1s3XTtcbiAgICAgICAgICAgICAgdmFyIHIgPSByeCA+IHJ5ID8gcnggOiByeTtcbiAgICAgICAgICAgICAgdmFyIHNjYWxlWCA9IHJ4ID4gcnkgPyAxIDogcnggLyByeTtcbiAgICAgICAgICAgICAgdmFyIHNjYWxlWSA9IHJ4ID4gcnkgPyByeSAvIHJ4IDogMTtcblxuICAgICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgICAgY3R4LnRyYW5zbGF0ZShjeCwgY3kpO1xuICAgICAgICAgICAgICAgIGN0eC5yb3RhdGUocHNpKTtcbiAgICAgICAgICAgICAgICBjdHguc2NhbGUoc2NhbGVYLCBzY2FsZVkpO1xuICAgICAgICAgICAgICAgIGN0eC5hcmMoMCwgMCwgciwgdGhldGEsIHRoZXRhICsgZFRoZXRhLCBCb29sZWFuKDEgLSBmcykpO1xuICAgICAgICAgICAgICAgIGN0eC5zY2FsZSgxIC8gc2NhbGVYLCAxIC8gc2NhbGVZKTtcbiAgICAgICAgICAgICAgICBjdHgucm90YXRlKC1wc2kpO1xuICAgICAgICAgICAgICAgIGN0eC50cmFuc2xhdGUoLWN4LCAtY3kpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICd6JzpcbiAgICAgICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICAgICAgY3R4LmNsb3NlUGF0aCgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInJlbmRlckNoaWxkcmVuXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHJlbmRlckNoaWxkcmVuKGN0eCkge1xuICAgICAgdGhpcy5zZXRUZXh0RGF0YShjdHgpO1xuICAgICAgY3R4LnNhdmUoKTtcbiAgICAgIHZhciB0ZXh0RGVjb3JhdGlvbiA9IHRoaXMucGFyZW50LmdldFN0eWxlKCd0ZXh0LWRlY29yYXRpb24nKS5nZXRTdHJpbmcoKTtcbiAgICAgIHZhciBmb250U2l6ZSA9IHRoaXMuZ2V0Rm9udFNpemUoKTtcbiAgICAgIHZhciBnbHlwaEluZm8gPSB0aGlzLmdseXBoSW5mbztcbiAgICAgIHZhciBmaWxsID0gY3R4LmZpbGxTdHlsZTtcblxuICAgICAgaWYgKHRleHREZWNvcmF0aW9uID09PSAndW5kZXJsaW5lJykge1xuICAgICAgICBjdHguYmVnaW5QYXRoKCk7XG4gICAgICB9XG5cbiAgICAgIGdseXBoSW5mby5mb3JFYWNoKGZ1bmN0aW9uIChnbHlwaCwgaSkge1xuICAgICAgICB2YXIgcDAgPSBnbHlwaC5wMCxcbiAgICAgICAgICAgIHAxID0gZ2x5cGgucDEsXG4gICAgICAgICAgICBwYXJ0aWFsVGV4dCA9IGdseXBoLnRleHQ7XG4gICAgICAgIGN0eC5zYXZlKCk7XG4gICAgICAgIGN0eC50cmFuc2xhdGUocDAueCwgcDAueSk7XG4gICAgICAgIGN0eC5yb3RhdGUoZ2x5cGhJbmZvW2ldLnJvdGF0aW9uKTtcblxuICAgICAgICBpZiAoY3R4LmZpbGxTdHlsZSkge1xuICAgICAgICAgIGN0eC5maWxsVGV4dChwYXJ0aWFsVGV4dCwgMCwgMCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY3R4LnN0cm9rZVN0eWxlKSB7XG4gICAgICAgICAgY3R4LnN0cm9rZVRleHQocGFydGlhbFRleHQsIDAsIDApO1xuICAgICAgICB9XG5cbiAgICAgICAgY3R4LnJlc3RvcmUoKTtcblxuICAgICAgICBpZiAodGV4dERlY29yYXRpb24gPT09ICd1bmRlcmxpbmUnKSB7XG4gICAgICAgICAgaWYgKGkgPT09IDApIHtcbiAgICAgICAgICAgIGN0eC5tb3ZlVG8ocDAueCwgcDAueSArIGZvbnRTaXplIC8gOCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY3R4LmxpbmVUbyhwMS54LCBwMS55ICsgZm9udFNpemUgLyA1KTtcbiAgICAgICAgfSAvLy8vIFRvIGFzc2lzdCB3aXRoIGRlYnVnZ2luZyB2aXN1YWxseSwgdW5jb21tZW50IGZvbGxvd2luZ1xuICAgICAgICAvL1xuICAgICAgICAvLyBjdHguYmVnaW5QYXRoKCk7XG4gICAgICAgIC8vIGlmIChpICUgMilcbiAgICAgICAgLy8gXHRjdHguc3Ryb2tlU3R5bGUgPSAncmVkJztcbiAgICAgICAgLy8gZWxzZVxuICAgICAgICAvLyBcdGN0eC5zdHJva2VTdHlsZSA9ICdncmVlbic7XG4gICAgICAgIC8vIGN0eC5tb3ZlVG8oc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AgICAgdmFyIGN1cnJlbnQgPSBwYXRoUGFyc2VyLmN1cnJlbnQ7XG4gICAgICAgIHZhciBzdGFydFggPSBjdXJyZW50ID8gY3VycmVudC54IDogMDtcbiAgICAgICAgdmFyIHN0YXJ0WSA9IGN1cnJlbnQgPyBjdXJyZW50LnkgOiAwO1xuICAgICAgICB2YXIgY21kID0gJyc7XG4gICAgICAgIHZhciBwb2ludHMgPSBbXTtcbiAgICAgICAgcGF0aFBhcnNlci5uZXh0Q29tbWFuZCgpO1xuICAgICAgICB2YXIgdXBwZXJDb21tYW5kID0gcGF0aFBhcnNlci5jb21tYW5kLnRvVXBwZXJDYXNlKCk7XG5cbiAgICAgICAgc3dpdGNoIChwYXRoUGFyc2VyLmNvbW1hbmQpIHtcbiAgICAgICAgICBjYXNlICdNJzpcbiAgICAgICAgICBjYXNlICdtJzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aE0ocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnTCc6XG4gICAgICAgICAgY2FzZSAnbCc6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhMKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0gnOlxuICAgICAgICAgIGNhc2UgJ2gnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoSChwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdWJzpcbiAgICAgICAgICBjYXNlICd2JzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aFYocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQyc6XG4gICAgICAgICAgY2FzZSAnYyc6XG4gICAgICAgICAgICB0aGlzLnBhdGhDKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1MnOlxuICAgICAgICAgIGNhc2UgJ3MnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoUyhwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICBjYXNlICdxJzpcbiAgICAgICAgICAgIHRoaXMucGF0aFEocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnVCc6XG4gICAgICAgICAgY2FzZSAndCc6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhUKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0EnOlxuICAgICAgICAgIGNhc2UgJ2EnOlxuICAgICAgICAgICAgcG9pbnRzID0gdGhpcy5wYXRoQShwYXRoUGFyc2VyKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnWic6XG4gICAgICAgICAgY2FzZSAneic6XG4gICAgICAgICAgICBwYXRoUGFyc2VyLmN1cnJlbnQgPSBwYXRoUGFyc2VyLnN0YXJ0O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXBwZXJDb21tYW5kICE9PSAnWicpIHtcbiAgICAgICAgICBwYXRoQ29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICBjb21tYW5kOiBjbWQgfHwgdXBwZXJDb21tYW5kLFxuICAgICAgICAgICAgcG9pbnRzOiBwb2ludHMsXG4gICAgICAgICAgICBzdGFydDoge1xuICAgICAgICAgICAgICB4OiBzdGFydFgsXG4gICAgICAgICAgICAgIHk6IHN0YXJ0WVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhdGhMZW5ndGg6IHRo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IueSk7XG4gICAgICAgICAgICBwMSA9IHAyO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBsZW47XG5cbiAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgLy8gQXBwcm94aW1hdGVzIGJ5IGJyZWFraW5nIGN1cnZlIGludG8gMTAwIGxpbmUgc2VnbWVudHNcbiAgICAgICAgICBsZW4gPSAwLjA7XG4gICAgICAgICAgcDEgPSB0aGlzLmdldFBvaW50T25RdWFkcmF0aWNCZXppZXIoMCwgeCwgeSwgcG9pbnRzWzBdLCBwb2ludHNbMV0sIHBvaW50c1syXSwgcG9pbnRzWzNdKTtcblxuICAgICAgICAgIGZvciAodCA9IDAuMDE7IHQgPD0gMTsgdCArPSAwLjAxKSB7XG4gICAgICAgICAgICBwMiA9IHRoaXMuZ2V0UG9pbnRPblF1YWRyYXRpY0Jlemllcih0LCB4LCB5LCBwb2ludHNbMF0sIHBvaW50c1sxXSwgcG9pbnRzWzJdLCBwb2ludHNbM10pO1xuICAgICAgICAgICAgbGVuICs9IHRoaXMuZ2V0TGluZUxlbmd0aChwMS54LCBwMS55LCBwMi54LCBwMi55KTtcbiAgICAgICAgICAgIHAxID0gcDI7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGxlbjtcblxuICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICAvLyBBcHByb3hpbWF0ZXMgYnkgYnJlYWtpbmcgY3VydmUgaW50byBsaW5lIHNlZ21lbnRzXG4gICAgICAgICAgbGVuID0gMC4wO1xuICAgICAgICAgIHZhciBzdGFydCA9IHBvaW50c1s0XTsgLy8gNCA9IHRoZXRhXG5cbiAgICAgICAgICB2YXIgZFRoZXRhID0gcG9pbnRzWzVdOyAvLyA1ID0gZFRoZXRhXG5cbiAgICAgICAgICB2YXIgZW5kID0gcG9pbnRzWzRdICsgZFRoZXRhO1xuICAgICAgICAgIHZhciBpbmMgPSBNYXRoLlBJIC8gMTgwLjA7IC8vIDEgZGVncmV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MC4wMDAwNSA8IGRpc3RhbmNlKSkge1xuICAgICAgICAgICAgY3VtdWxhdGl2ZVBhdGhMZW5ndGggKz0gcGF0aENtZC5wYXRoTGVuZ3RoO1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIGRlbHRhID0gZGlzdGFuY2UgLSBjdW11bGF0aXZlUGF0aExlbmd0aDtcbiAgICAgICAgICB2YXIgY3VycmVudFQgPSAwO1xuXG4gICAgICAgICAgc3dpdGNoIChwYXRoQ21kLmNvbW1hbmQpIHtcbiAgICAgICAgICAgIGNhc2UgJ0wnOlxuICAgICAgICAgICAgICBwID0gdGhpcy5nZXRQb2ludE9uTGluZShkZWx0YSwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnksIHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnkpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnQSc6XG4gICAgICAgICAgICAgIHZhciBzdGFydCA9IHBhdGhDbWQucG9pbnRzWzRdOyAvLyA0ID0gdGhldGFcblxuICAgICAgICAgICAgICB2YXIgZFRoZXRhID0gcGF0aENtZC5wb2ludHNbNV07IC8vIDUgPSBkVGhldGFcblxuICAgICAgICAgICAgICB2YXIgZW5kID0gcGF0aENtZC5wb2ludHNbNF0gKyBkVGhldGE7XG4gICAgICAgICAgICAgIGN1cnJlbnRUID0gc3RhcnQgKyBkZWx0YSAvIHBhdGhDbWQucGF0aExlbmd0aCAqIGRUaGV0YTtcblxuICAgICAgICAgICAgICBpZiAoZFRoZXRhIDwgMCAmJiBjdXJyZW50VCA8IGVuZCB8fCBkVGhldGEgPj0gMCAmJiBjdXJyZW50VCA+IGVuZCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcCA9IHRoaXMuZ2V0UG9pbnRPbkVsbGlwdGljYWxBcmMocGF0aENtZC5wb2ludHNbMF0sIHBhdGhDbWQucG9pbnRzWzFdLCBwYXRoQ21kLnBvaW50c1syXSwgcGF0aENtZC5wb2ludHNbM10sIGN1cnJlbnRULCBwYXRoQ21kLnBvaW50c1s2XSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdDJzpcbiAgICAgICAgICAgICAgY3VycmVudFQgPSBkZWx0YSAvIHBhdGhDbWQucGF0aExlbmd0aDtcblxuICAgICAgICAgICAgICBpZiAoY3VycmVudFQgPiAxKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudFQgPSAxO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcCA9IHRoaXMuZ2V0UG9pbnRPbkN1YmljQmV6aWVyKGN1cnJlbnRULCBwYXRoQ21kLnN0YXJ0LngsIHBhdGhDbWQuc3RhcnQueSwgcGF0aENtZC5wb2ludHNbMF0sIHBhdGhDbWQucG9pbnRzWzFdLCBwYXRoQ21kLnBvaW50c1syXSwgcGF0aENtZC5wb2ludHNbM10sIHBhdGhDbWQucG9pbnRzWzRdLCBwYXRoQ21kLnBvaW50c1s1XSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICAgICAgY3VycmVudFQgPSBkZWx0YSAvIHBhdGhDbWQucGF0aExlbmd0aDtcblxuICAgICAgICAgICAgICBpZiAoY3VycmVudFQgPiAxKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudFQgPSAxO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcCA9IHRoaXMuZ2V0UG9pbnRPblF1YWRyYXRpY0JlemllcihjdXJyZW50VCwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnksIHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF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BzdGVwOiBzdGVwLFxuICAgICAgICAgIHByZWNpc2lvbjogcHJlY2lzaW9uLFxuICAgICAgICAgIHBvaW50czogW11cbiAgICAgICAgfTsgLy8gQ2FsY3VsYXRlIHBvaW50c1xuXG4gICAgICAgIHZhciBzID0gMDtcblxuICAgICAgICBmb3IgKHZhciBsID0gMDsgbCA8PSBmdWxsTGVuOyBsICs9IHByZWNpc2lvbikge1xuICAgICAgICAgIHZhciBwMCA9IHRoaXMuZ2V0UG9pbnRPblBhdGgobCk7XG4gICAgICAgICAgdmFyIHAxID0gdGhpcy5nZXRQb2ludE9uUGF0aChsICsgcHJlY2lzaW9uKTtcblxuICAgICAgICAgIGlmICghcDAgfHwgIXAxKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBzICs9IHRoaXMuZ2V0TGluZUxlbmd0aChwMC54LCBwMC55LCBwMS54LCBwMS55KTtcblxuICAgICAgICAgIGlmIChzID49IHN0ZXApIHtcbiAgICAgICAgICAgIHRoaXMuZXF1aWRpc3RhbnRDYWNoZS5wb2ludHMucHVzaCh7XG4gICAgICAgICAgICAgIHg6IHAwLngsXG4gICAgICAgICAgICAgIHk6IHAwLnksXG4gICAgICAgICAgICAgIGRpc3RhbmNlOiBsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHMgLT0gc3RlcDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiZ2V0RXF1aWRpc3RhbnRQb2ludE9uUGF0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRFcXVpZGlzdGFudFBvaW50T25QYXRoKHRhcmdldERpc3RhbmNlLCBzdGVwLCBwcmVjaXNpb24pIHtcbiAgICAgIHRoaXMuYnVpbGRFcXVpZGlzdGFudENhY2hlKHN0ZXAsIHByZWNpc2lvbik7XG5cbiAgICAgIGlmICh0YXJnZXREaXN0YW5jZSA8I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2VzLnB1c2goX2Fzc2VydFRoaXNJbml0aWFsaXplZChfdGhpcykpO1xuXG4gICAgaWYgKCFpc1N2Zykge1xuICAgICAgX3RoaXMubG9hZEltYWdlKGhyZWYpO1xuICAgIH0gZWxzZSB7XG4gICAgICBfdGhpcy5sb2FkU3ZnKGhyZWYpO1xuICAgIH1cblxuICAgIF90aGlzLmlzU3ZnID0gaXNTdmc7XG4gICAgcmV0dXJuIF90aGlzO1xuICB9XG5cbiAgX2NyZWF0ZUNsYXNzKEltYWdlRWxlbWVudCwgW3tcbiAgICBrZXk6IFwibG9hZEltYWdlXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uICgpIHtcbiAgICAgIHZhciBfbG9hZEltYWdlID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZShocmVmKSB7XG4gICAgICAgIHZhciBpbWFnZTtcbiAgICAgICAgcmV0dXJuIF9yZWdlbmVyYXRvclJ1bnRpbWUud3JhcChmdW5jdGlvbiBfY2FsbGVlJChfY29udGV4dCkge1xuICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKF9jb250ZXh0LnByZXYgPSBfY29udGV4dC5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBfY29udGV4dC5wcmV2ID0gMDtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMztcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kb2N1bWVudC5jcmVhdGVJbWFnZShocmVmKTtcblxuICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgaW1hZ2UgPSBfY29udGV4dC5zZW50O1xuICAgICAgICAgICAgICAgIHRoaXMuaW1hZ2UgPSBpbWFnZTtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTA7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgIF9jb250ZXh0LnByZXYgPSA3O1xuICAgICAgICAgICAgICAgIF9jb250ZXh0LnQwID0gX2NvbnRleHRbXCJjYXRjaFwiXSgwKTtcbiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6IG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyb3Igd2hpbGUgbG9hZGluZyBpbWFnZSBcXFwiXCIuY29uY2F0KGhyZWYsIFwiXFxcIjpcIiksIF9jb250ZXh0LnQwKTtcblxuICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICAgIHRoaXMubG9hZGVkID0gdHJ1ZTtcblxuICAgICAgICAgICAgICBjYXNlIDExOlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LnN0b3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sIF9jYWxsZWUsIHRoaXMsIFtbMCwgN11dKTtcbiAgICAgIH0pKTtcblxuICAgICAgZnVuY3Rpb24gbG9hZEltYWdlKF94KSB7XG4gICAgICAgIHJldHVybiBfbG9hZEltYWdlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBsb2FkSW1hZ2U7XG4gICAgfSgpXG4gIH0sIHtcbiAgICBrZXk6IFwibG9hZFN2Z1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiAoKSB7XG4gICAgICB2YXIgX2xvYWRTdmcgPSBfYXN5bmNUb0dlbmVyYXRvciggLyojX19QVVJFX18qL19yZWdlbmVyYXRvclJ1bnRpbWUubWFyayhmdW5jdGlvbiBfY2FsbGVlMihocmVmKSB7XG4gICAgICAgIHZhciByZXNwb25zZSwgc3ZnO1xuICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUyJChfY29udGV4dDIpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dDIucHJldiA9IF9jb250ZXh0Mi5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBfY29udGV4dDIucHJldiA9IDA7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLm5leHQgPSAzO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmRvY3VtZW50LmZldGNoKGhyZWYpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICByZXNwb25zZSA9IF9jb250ZXh0Mi5zZW50O1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gNjtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UudGV4dCgpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICBzdmcgPSBfY29udGV4dDIuc2VudDtcbiAgICAgICAgICAgICAgICB0aGlzLmltYWdlID0gc3ZnO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gMTM7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICBfY29udGV4dDIucHJldiA9IDEwO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi50MCA9IF9jb250ZXh0MltcImNhdGNoXCJdKDApO1xuICAgICAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTogbm8tY29uc29sZVxuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJFcnJvciB3aGlsZSBsb2FkaW5nIGltYWdlIFxcXCJcIi5jb25jYXQoaHJlZiwgXCJcXFwiOl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iA9IDA7XG4gICAgICAgICAgICAgICAgZG9jdW1lbnQgPSB0aGlzLmRvY3VtZW50O1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSA0O1xuICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5jYW52Zy5wYXJzZXIubG9hZCh1cmwpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBzdmdEb2N1bWVudCA9IF9jb250ZXh0LnNlbnQ7XG4gICAgICAgICAgICAgICAgZm9udHMgPSBzdmdEb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnZm9udCcpO1xuICAgICAgICAgICAgICAgIEFycmF5LmZyb20oZm9udHMpLmZvckVhY2goZnVuY3Rpb24gKGZvbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgZm9udCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoZm9udE5vZGUpO1xuICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZGVmaW5pdGlvbnNbZm9udEZhbWlseV0gPSBmb250O1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAxMjtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQucHJldiA9IDk7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQudDAgPSBfY29udGV4dFtcImNhdGNoXCJdKDApO1xuICAgICAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTogbm8tY29uc29sZVxuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJFcnJvciB3aGlsZSBsb2FkaW5nIGZvbnQgXFxcIlwiLmNvbmNhdCh1cmwsIFwiXFxcIjpcIiksIF9jb250ZXh0LnQwKTtcblxuICAgICAgICAgICAgICBjYXNlIDEyOlxuICAgICAgICAgICAgICAgIHRoaXMub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xzZTtcbiAgICAgICAgICAgIGltYWdlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaW1nJyk7XG5cbiAgICAgICAgICAgIGlmIChhbm9ueW1vdXNDcm9zc09yaWdpbikge1xuICAgICAgICAgICAgICBpbWFnZS5jcm9zc09yaWdpbiA9ICdBbm9ueW1vdXMnO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIG5ldyBQcm9taXNlKGZ1bmN0aW9uIChyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgICAgICAgaW1hZ2Uub25sb2FkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHJlc29sdmUoaW1hZ2UpO1xuICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgIGltYWdlLm9uZXJyb3IgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgcmVqZWN0KCk7XG4gICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgaW1hZ2Uuc3JjID0gc3JjO1xuICAgICAgICAgICAgfSkpO1xuXG4gICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgIGNhc2UgXCJlbmRcIjpcbiAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LCBfY2FsbGVlKTtcbiAgfSkpO1xuICByZXR1cm4gX2NyZWF0ZUltYWdlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG59XG5cbnZhciBEb2N1bWVudCA9IC8qI19fUFVSRV9fKi9mdW5jdGlvbiAoKSB7XG4gIGZ1bmN0aW9uIERvY3VtZW50KGNhbnZnKSB7XG4gICAgdmFyIF9yZWYgPSBhcmd1bWVudHMubGVuZ3RoID4gMSAmJiBhcmd1bWVudHNbMV0gIT09IHVuZGVmaW5lZCA/IGFyZ3VtZW50c1sxXSA6IHt9LFxuICAgICAgICBfcm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VlJChfY29udGV4dCkge1xuICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKF9jb250ZXh0LnByZXYgPSBfY29udGV4dC5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBvcHRpb25zID0gX2FyZ3MubGVuZ3RoID4gMCAmJiBfYXJnc1swXSAhPT0gdW5kZWZpbmVkID8gX2FyZ3NbMF0gOiB7fTtcbiAgICAgICAgICAgICAgICB0aGlzLnN0YXJ0KF9vYmplY3RTcHJlYWQkMSh7XG4gICAgICAgICAgICAgICAgICBlbmFibGVSZWRyYXc6IHRydWUsXG4gICAgICAgICAgICAgICAgICBpZ25vcmVBbmltYXRpb246IHRydWUsXG4gICAgICAgICAgICAgICAgICBpZ25vcmVNb3VzZTogdHJ1ZVxuICAgICAgICAgICAgICAgIH0sIG9wdGlvbnMpKTtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gNDtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZWFkeSgpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICB0aGlzLnN0b3AoKTtcblxuICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgIGNhc2UgXCJlbmRcIjpcbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuc3RvcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgX2NhbGxlZSwgdGhpcyk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIF9yZW5kZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHJlbmRlcjtcbiAgICB9KClcbiAgICAvKipcbiAgICAgKiBTdGFydCByZW5kZXJpbmcuXG4gICAgICogQHBhcmFtIG9wdGlvbnMg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lSW1hZ2UodXJsKSB7XG4gICAgICByZXR1cm4gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZSgpIHtcbiAgICAgICAgdmFyIHJlc3BvbnNlLCBibG9iLCBpbWc7XG4gICAgICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDI7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZldGNoKHVybCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gX2NvbnRleHQuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gNTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuYmxvYigpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICBibG9iID0gX2NvbnRleHQuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gODtcbiAgICAgICAgICAgICAgICByZXR1cm4gY3JlYXRlSW1hZ2VCaXRtYXAoYmxvYik7XG5cbiAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgIGltZyA9IF9jb250ZXh0LnNlbnQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdChcInJldHVyblwiLCBpbWcpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgIGNhc2UgXCJlbmRcIjpcbiAgICAgICAgICAgICAgIC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dSVHRCUVVka1F5eFZRVUZCUVN4UFFVRlBMRVZCUVVWQk8wRkJTRXNzVTBGQmFFSTdPMEZCVFVFc1dVRkJTU3hMUVVGTE1VTXNUVUZCVEN4TFFVRm5RaXhOUVVGd1FpeEZRVUUwUWpzN08wRkJSekZDTEdWQlFVdHlRaXhIUVVGTUxFZEJRVmQ2UWl4WFFVRllPMEZCUTBRN08wRkJSVVFzWlVGQlQybERMR2RDUVVGUU8wRkJRMFE3UVVGeVRXbENMRXRCUVhCQ0xFTkJPV1ZuUXpzN096czdRVUV3Y2tKb1F5eFhRVUZQZGtNc1QwRkJVRHRCUVVWRUxFZEJOWEpDWXpzN096dEJRV2x6UW1Jc1IwRkJOa0o1U1N4TlFVRk5MRU5CUVVONlNTeFBRVUZ3UXl4RFFXcHpRbUVzUTBGQlpqczdRVUZ2YzBKQkxFMUJRVWs3UVVGRFJqQkpMRWxCUVVGQkxHdENRVUZyUWl4SFFVRkhNMGtzVDBGQmNrSTdRVUZEUkN4SFFVWkVMRU5CUlVVc1QwRkJUelJKTEc5Q1FVRlFMRVZCUVRaQ096czdPenM3T3pzN08wRkJWVGRDUXl4SlFVRkJRU3hSUVVGUkxFTkJRVU1zUjBGQlJDeEZRVUZOTEhkQ1FVRk9MRU5CUVZJc1EwRkJkME0zU1N4UFFVRjRRenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN095SjlcbiIsImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIF9hcnJheUxpa2VUb0FycmF5KGFyciwgbGVuKSB7XG4gIGlmIChsZW4gPT0gbnVsbCB8fCBsZW4gPiBhcnIubGVuZ3RoKSBsZW4gPSBhcnIubGVuZ3RoO1xuXG4gIGZvciAodmFyIGkgPSAwLCBhcnIyID0gbmV3IEFycmF5KGxlbik7IGkgPCBsZW47IGkrKykge1xuICAgIGFycjJbaV0gPSBhcnJbaV07XG4gIH1cblxuICByZXR1cm4gYXJyMjtcbn0iLCJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBfYXJyYXlXaXRoSG9sZXMoYXJyKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFycikpIHJldHVybiBhcnI7XG59IiwiaW1wb3J0IGFycmF5TGlrZVRvQXJyYXkgZnJvbSBcIi4vYXJyYXlMaWtlVG9BcnJheS5qc1wiO1xuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gX2FycmF5V2l0aG91dEhvbGVzKGFycikge1xuICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSByZXR1cm4gYXJyYXlMaWtlVG9BcnJheShhcnIpO1xufSIsImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIF9hc3NlcnRUaGlzSW5pdGlhbGl6ZWQoc2VsZikge1xuICBpZ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VwdGlvbiBub3JtYWxseS5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuICEhIGNhdWdodDtcbiAgICAgIH1cblxuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW5jdGlvbihyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByZWNvcmQu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NvbG9yX3N0cmluZztcbiAgICAvLyBlbWQgb2Ygc2ltcGxlIHR5cGUtaW4gY29sb3JzXG5cbiAgICAvLyBhcnJheSBvZiBjb2xvciBkZWZpbml0aW9uIG9iamVjdHNcbiAgICB2YXIgY29sb3JfZGVmcyA9IFtcbiAgICAgICAge1xuICAgICAgICAgICAgcmU6IC9ecmdiYVxcKChcXGR7MSwzfSksXFxzKihcXGR7MSwzfSksXFxzKihcXGR7MSwzfSksXFxzKigoPzpcXGQ/XFwuKT9cXGQpXFwpJC8sXG4gICAgICAgICAgICBleGFtcGxlOiBbJ3JnYmEoMTIzLCAyMzQsIDQ1LCAwLjgpJywgJ3JnYmEoMjU1LDIzNCwyNDUsMS4wKSddLFxuICAgICAgICAgICAgcHJvY2VzczogZnVuY3Rpb24gKGJpdHMpe1xuICAgICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMV0pLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzJdKSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1szXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlRmxvYXQoYml0c1s0XSlcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICByZTogL15yZ2JcXCgoXFxkezEsM30pLFxccyooXFxkezEsM30pLFxccyooXFxkezEsM30pXFwpJC8sXG4gICAgICAgICAgICBleGFtcGxlOiBbJ3JnYigxMjMsIDIzNCwgNDUpJywgJ3JnYigyNTUsMjM0LDI0NSknXSxcbiAgICAgICAgICAgIHByb2Nlc3M6IGZ1bmN0aW9uIChiaXRzKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzFdKSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1syXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10pXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgcmU6IC9eKFswLTlhLWZBLUZdezJ9KShbMC05YS1mQS1GXXsyfSkoWzAtOWEtZkEtRl17Mn0pJC8sXG4gICAgICAgICAgICBleGFtcGxlOiBbJyMwMGZmMDAnLCAnMzM2Njk5J10sXG4gICAgICAgICAgICBwcm9jZXNzOiBmdW5jdGlvbiAoYml0cyl7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1sxXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzJdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10sIDE2KVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJlOiAvXihbMC05YS1mQS1GXXsxfSkoWzAtOWEtZkEtRl17MX0pKFswLTlhLWZBLUZdezF9KSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWycjZmIwJywgJ2YwZiddLFxuICAgICAgICAgICAgcHJvY2VzczogZnVuY3Rpb24gKGJpdHMpe1xuICAgICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMV0gKyBiaXRzWzFdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMl0gKyBiaXRzWzJdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10gKyBiaXRzWzNdLCAxNilcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgXTtcblxuICAgIC8vIHNlYXJjaCB0aHJvdWdoIHRoZSBkZ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YSA8IDApID8gMCA6ICgodGhpcy5hbHBoYSA+IDEuMCB8fCBpc05hTih0aGlzLmFscGhhKSkgPyAxLjAgOiB0aGlzLmFscGhhKTtcblxuICAgIC8vIHNvbWUgZ2V0dGVyc1xuICAgIHRoaXMudG9SR0IgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiAncmdiKCcgKyB0aGlzLnIgKyAnLCAnICsgdGhpcy5nICsgJywgJyArIHRoaXMuYiArICcpJztcbiAgICB9XG4gICAgdGhpcy50b1JHQkEgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiAncmdiYSgnICsgdGhpcy5yICsgJywgJyArIHRoaXMuZyArICcsICcgKyB0aGlzLmIgKyAnLCAnICsgdGhpcy5hbHBoYSArICcpJztcbiAgICB9XG4gICAgdGhpcy50b0hleCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIHIgPSB0aGlzLnIudG9TdHJpbmcoMTYpO1xuICAgICAgICB2YXIgZyA9IHRoaXMuZy50b1N0cmluZygxNik7XG4gICAgICAgIHZhciBiID0gdGhpcy5iLnRvU3RyaW5nKDE2KTtcbiAgICAgICAgaWYgKHIubGVuZ3RoID09IDEpIHIgPSAnMCcgKyByO1xuICAgICAgICBpZiAoZy5sZW5ndGggPT0gMSkgZyA9ICcwJyArIGc7XG4gICAgICAgIGlmIChiLmxlbmd0aCA9PSAxKSBiID0gJzAnICsgYjtcbiAgICAgICAgcmV0dXJuICcjJyArIHIgKyBnICsgYjtcbiAgICB9XG5cbiAgICAvLyBoZWxwXG4gICAgdGhpcy5nZXRIZWxwWE1MID0gZnVuY3Rpb24gKCkge1xuXG4gICAgICAgIHZhciBleGFtcGxlcyA9IG5ldyBBcnJheSgpO1xuICAgICAgICAvLyBhZGQgcmVnZXhwc1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbG9yX2RlZnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBleGFtcGxlID0gY29sb3JfZGVmc1tpXS5leGFtcGxlO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBleGFtcGxlLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgZXhhbXBsZXNbZXhhbXBsZXMubGVuZ3RoXSA9IGV4YW1wbGVbal07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gYWRkIHR5cGUtaW4gY29sb3JzXG4gICAgICAgIGZvciAodmFyIHNjIGluIHNpbXBsZV9jb2xvcnMpIHtcbiAgICAgICAgICAgIGV4YW1wbGVzW2V4YW1wbGVzLmxlbmd0aF0gPSBzYztcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB4bWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCd1bCcpO1xuICAgICAgICB4bWwuc2V0QXR0cmlidXRlKCdpZCcsICdyZ2Jjb2xvci1leGFtcGxlcycpO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGV4YW1wbGVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciBsaXN0X2l0ZW0gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaScpO1xuICAgICAgICAgICAgICAgIHZhciBsaXN0X2NvbG9yID0gbmV3IFJHQkNvbG9yKGV4YW1wbGVzW2ldKTtcbiAgICAgICAgICAgICAgICB2YXIgZXhhbXBsZV9kaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICAgICAgICAgICAgICBleGFtcGxlX2Rpdi5zdHlsZS5jc3NUZXh0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICdtYXJnaW46IDNweDsgJ1xuICAgICAgICAgICAgICAgICAgICAgICAgKyAnYm9yZGVyOiAxcHggc29saWQgYmxhY2s7ICdcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJ2JhY2tncm91bmQ6JyArIGxpc3RfY29sb3IudG9IZXgoKSArICc7ICdcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJ2NvbG9yOicgKyBsaXN0X2NvbG9yLnRvSGV4KClcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgZXhhbXBsZV9kaXYuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoJ3Rlc3QnKSk7XG4gICAgICAgICAgICAgICAgdmFyIGxpc3RfaXRlbV92YWx1ZSA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKFxuICAgICAgICAgICAgICAgICAgICAnICcgKyBleGFtcGxlc1tpXSArICcgLT4gJyArIGxpc3RfY29sb3IudG9SR0IoKSArICcgLT4gJyArIGxpc3RfY29sb3IudG9IZXgoKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgbGlzdF9pdGVtLmFwcGVuZENoaWxkKGV4YW1wbGVfZGl2KTtcbiAgICAgICAgICAgICAgICBsaXN0X2l0ZW0uYXBwZW5kQ2hpbGQobGlzdF9pdGVtX3ZhbHVlKTtcbiAgICAgICAgICAgICAgICB4bWwuYXBwZW5kQ2hpbGQobGlzdF9pdGVtKTtcblxuICAgICAgICAgICAgfSBjYXRjaChlKXt9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHhtbDtcblxuICAgIH1cblxufVxuIiwiZnVuY3Rpb24gX3R5cGVvZihvYmopIHtcbiAgXCJAYmFiZWwvaGVscGVycyAtIHR5cGVvZlwiO1xuXG4gIGlmICh0eXBlb2YgU3ltYm9sID09PSBcImZ1bmN0aW9uXCIgJiYgdHlwZW9mIFN5bWJvbC5pdGVyYXRvciA9PT0gXCJzeW1ib2xcIikge1xuICAgIF90eXBlb2YgPSBmdW5jdGlvbiAob2JqKSB7XG4gICAgICByZXR1cm4gdHlwZW9mIG9iajtcbiAgICB9O1xuICB9IGVsc2Uge1xuICAgIF90eXBlb2YgPSBmdW5jdGlvbiAob2JqKSB7XG4gICAgICByZXR1cm4gb2J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nLFxuICAgICAgICBfYlN1bSA9IHN1bUZhY3RvciAqIF9wYixcbiAgICAgICAgX2FTdW0gPSBzdW1GYWN0b3IgKiBfcGE7XG5cbiAgICBzdGFjayA9IHN0YWNrU3RhcnQ7XG5cbiAgICBmb3IgKHZhciBfaTMgPSAwOyBfaTMgPCByYWRpdXNQbHVzMTsgX2kzKyspIHtcbiAgICAgIHN0YWNrLnIgPSBfcHI7XG4gICAgICBzdGFjay5nID0gX3BnO1xuICAgICAgc3RhY2suYiA9IF9wYjtcbiAgICAgIHN0YWNrLmEgPSBfcGE7XG4gICAgICBzdGFjayA9IHN0YWNrLm5leHQ7XG4gICAgfVxuXG4gICAgdmFyIHlwID0gd2lkdGg7XG4gICAgdmFyIF9nSW5TdW0gPSAwLFxuICAgICAgICBfYkluU3VtID0gMCxcbiAgICAgICAgX2FJblN1bSA9IDAsXG4gICAgICAgIF9ySW5TdW0gPSAwO1xuXG4gICAgZm9yICh2YXIgX2k0ID0gMTsgX2k0IDw9IHJhZGl1czsgX2k0KyspIHtcbiAgICAgIHlpID0geXAgKyBfeCA8PCAyO1xuXG4gICAgICB2YXIgX3JicyA9IHJhZGl1c1BsdXMxIC0gX2k0O1xuXG4gICAgICBfclN1bSArPSAoc3RhY2suciA9IF9wciA9IHBpeGVsc1t5aV0pICogX3JicztcbiAgICAgIF9nU3VtICs9IChzdGFjay5nID0gX3BnID0gcGl4ZWxzW3lpICsgMV0pICogX3JicztcbiAgICAgIF9iU3VtICs9IChzdGFjay5iID0gX3BiID0gcGl4ZWxzW3lpICsgMl0pICogX3JicztcbiAgICAgIF9hU3VtICs9IChzdGFjay5hID0gX3BhID0gcGl4ZWxzW3lpICsgM10pICogX3JicztcbiAgICAgIF9ySW5TdW0gKz0gX3ByO1xuICAgICAgX2dJblN1bSArPSBfcGc7XG4gICAgICBfYkluU3VtICs9IF9wYjtcbiAgICAgIF9hSW5TdW0gKz0gX3BhO1xuICAgICAgc3RhY2sgPSBzdGFjay5uZXh0O1xuXG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3VtRmFjdG9yICogcHIsXG4gICAgICAgIGdTdW0gPSBzdW1GYWN0b3IgKiBwZyxcbiAgICAgICAgYlN1bSA9IHN1bUZhY3RvciAqIHBiO1xuICAgIHN0YWNrID0gc3RhY2tTdGFydDtcblxuICAgIGZvciAodmFyIF9pNSA9IDA7IF9pNSA8IHJhZGl1c1BsdXMxOyBfaTUrKykge1xuICAgICAgc3RhY2suciA9IHByO1xuICAgICAgc3RhY2suZyA9IHBnO1xuICAgICAgc3RhY2suYiA9IHBiO1xuICAgICAgc3RhY2sgPSBzdGFjay5uZXh0O1xuICAgIH1cblxuICAgIHZhciBySW5TdW0gPSAwLFxuICAgICAgICBnSW5TdW0gPSAwLFxuICAgICAgICBiSW5TdW0gPSAwO1xuXG4gICAgZm9yICh2YXIgX2k2ID0gMTsgX2k2IDwgcmFkaXVzUGx1czE7IF9pNisrKSB7XG4gICAgICBwID0geWkgKyAoKHdpZHRoTWludXMxIDwgX2k2ID8gd2lkdGhNaW51czEgOiBfaTYpIDw8IDIpO1xuICAgICAgclN1bSArPSAoc3RhY2suciA9IHByID0gcGl4ZWxzW3BdKSAqIChyYnMgPSByYWRpdXNQbHVzMSAtIF9pNik7XG4gICAgICBnU3VtICs9IChzdGFjay5nID0gcGcgPSBwaXhlbHNbcCArIDFdKSAqIHJicztcbiAgICAgIGJTdW0gKz0gKHN0YWNrLmIgPSBwYiA9IHBpeGVsc1twICsgMl0pICogcmJzO1xuICAgICAgckluU3VtICs9IHByO1xuICAgICAgZ0luU3VtICs9IHBnO1xuICAgICAgYkluU3VtICs9IHBiO1xuICAgICAgc3RhY2sgPSBzdGFjay5uZXh0O1xuICAgIH1cblxuICAgIHN0YWNrSW4gPSBzdGFja1N0YXJ0O1xuICAgIHN0YWNrT3V0ID0gc3RhY2tFbmQ7XG5cbiAgICBmb3IgKHZhciB4ID0gMDsgeCA8IHdpZHRoOyB4KyspIHtcbiAgICAgIHBpeGVsc1t5aV0gPSByU3VtICogbXVsU3VtID4+IHNoZ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