No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

15008 líneas
1.4MB

  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["canvg"],{
  2. /***/ "./node_modules/@amcharts/amcharts4/.internal/canvg/index.js":
  3. /*!*******************************************************************!*\
  4. !*** ./node_modules/@amcharts/amcharts4/.internal/canvg/index.js ***!
  5. \*******************************************************************/
  6. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7. "use strict";
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
  11. /* harmony export */ "AElement": () => (/* binding */ AElement),
  12. /* harmony export */ "AnimateColorElement": () => (/* binding */ AnimateColorElement),
  13. /* harmony export */ "AnimateElement": () => (/* binding */ AnimateElement),
  14. /* harmony export */ "AnimateTransformElement": () => (/* binding */ AnimateTransformElement),
  15. /* harmony export */ "BoundingBox": () => (/* binding */ BoundingBox),
  16. /* harmony export */ "CB1": () => (/* binding */ CB1),
  17. /* harmony export */ "CB2": () => (/* binding */ CB2),
  18. /* harmony export */ "CB3": () => (/* binding */ CB3),
  19. /* harmony export */ "CB4": () => (/* binding */ CB4),
  20. /* harmony export */ "Canvg": () => (/* binding */ Canvg),
  21. /* harmony export */ "CircleElement": () => (/* binding */ CircleElement),
  22. /* harmony export */ "ClipPathElement": () => (/* binding */ ClipPathElement),
  23. /* harmony export */ "DefsElement": () => (/* binding */ DefsElement),
  24. /* harmony export */ "DescElement": () => (/* binding */ DescElement),
  25. /* harmony export */ "Document": () => (/* binding */ Document),
  26. /* harmony export */ "Element": () => (/* binding */ Element),
  27. /* harmony export */ "EllipseElement": () => (/* binding */ EllipseElement),
  28. /* harmony export */ "FeColorMatrixElement": () => (/* binding */ FeColorMatrixElement),
  29. /* harmony export */ "FeCompositeElement": () => (/* binding */ FeCompositeElement),
  30. /* harmony export */ "FeDropShadowElement": () => (/* binding */ FeDropShadowElement),
  31. /* harmony export */ "FeGaussianBlurElement": () => (/* binding */ FeGaussianBlurElement),
  32. /* harmony export */ "FeMorphologyElement": () => (/* binding */ FeMorphologyElement),
  33. /* harmony export */ "FilterElement": () => (/* binding */ FilterElement),
  34. /* harmony export */ "Font": () => (/* binding */ Font),
  35. /* harmony export */ "FontElement": () => (/* binding */ FontElement),
  36. /* harmony export */ "FontFaceElement": () => (/* binding */ FontFaceElement),
  37. /* harmony export */ "GElement": () => (/* binding */ GElement),
  38. /* harmony export */ "GlyphElement": () => (/* binding */ GlyphElement),
  39. /* harmony export */ "GradientElement": () => (/* binding */ GradientElement),
  40. /* harmony export */ "ImageElement": () => (/* binding */ ImageElement),
  41. /* harmony export */ "LineElement": () => (/* binding */ LineElement),
  42. /* harmony export */ "LinearGradientElement": () => (/* binding */ LinearGradientElement),
  43. /* harmony export */ "MarkerElement": () => (/* binding */ MarkerElement),
  44. /* harmony export */ "MaskElement": () => (/* binding */ MaskElement),
  45. /* harmony export */ "Matrix": () => (/* binding */ Matrix),
  46. /* harmony export */ "MissingGlyphElement": () => (/* binding */ MissingGlyphElement),
  47. /* harmony export */ "Mouse": () => (/* binding */ Mouse),
  48. /* harmony export */ "PSEUDO_ZERO": () => (/* binding */ PSEUDO_ZERO),
  49. /* harmony export */ "Parser": () => (/* binding */ Parser),
  50. /* harmony export */ "PathElement": () => (/* binding */ PathElement),
  51. /* harmony export */ "PathParser": () => (/* binding */ PathParser),
  52. /* harmony export */ "PatternElement": () => (/* binding */ PatternElement),
  53. /* harmony export */ "Point": () => (/* binding */ Point),
  54. /* harmony export */ "PolygonElement": () => (/* binding */ PolygonElement),
  55. /* harmony export */ "PolylineElement": () => (/* binding */ PolylineElement),
  56. /* harmony export */ "Property": () => (/* binding */ Property),
  57. /* harmony export */ "QB1": () => (/* binding */ QB1),
  58. /* harmony export */ "QB2": () => (/* binding */ QB2),
  59. /* harmony export */ "QB3": () => (/* binding */ QB3),
  60. /* harmony export */ "RadialGradientElement": () => (/* binding */ RadialGradientElement),
  61. /* harmony export */ "RectElement": () => (/* binding */ RectElement),
  62. /* harmony export */ "RenderedElement": () => (/* binding */ RenderedElement),
  63. /* harmony export */ "Rotate": () => (/* binding */ Rotate),
  64. /* harmony export */ "SVGElement": () => (/* binding */ SVGElement),
  65. /* harmony export */ "SVGFontLoader": () => (/* binding */ SVGFontLoader),
  66. /* harmony export */ "Scale": () => (/* binding */ Scale),
  67. /* harmony export */ "Screen": () => (/* binding */ Screen),
  68. /* harmony export */ "Skew": () => (/* binding */ Skew),
  69. /* harmony export */ "SkewX": () => (/* binding */ SkewX),
  70. /* harmony export */ "SkewY": () => (/* binding */ SkewY),
  71. /* harmony export */ "StopElement": () => (/* binding */ StopElement),
  72. /* harmony export */ "StyleElement": () => (/* binding */ StyleElement),
  73. /* harmony export */ "SymbolElement": () => (/* binding */ SymbolElement),
  74. /* harmony export */ "TRefElement": () => (/* binding */ TRefElement),
  75. /* harmony export */ "TSpanElement": () => (/* binding */ TSpanElement),
  76. /* harmony export */ "TextElement": () => (/* binding */ TextElement),
  77. /* harmony export */ "TextPathElement": () => (/* binding */ TextPathElement),
  78. /* harmony export */ "TitleElement": () => (/* binding */ TitleElement),
  79. /* harmony export */ "Transform": () => (/* binding */ Transform),
  80. /* harmony export */ "Translate": () => (/* binding */ Translate),
  81. /* harmony export */ "UnknownElement": () => (/* binding */ UnknownElement),
  82. /* harmony export */ "UseElement": () => (/* binding */ UseElement),
  83. /* harmony export */ "ViewPort": () => (/* binding */ ViewPort),
  84. /* harmony export */ "compressSpaces": () => (/* binding */ compressSpaces),
  85. /* harmony export */ "getSelectorSpecificity": () => (/* binding */ getSelectorSpecificity),
  86. /* harmony export */ "normalizeAttributeName": () => (/* binding */ normalizeAttributeName),
  87. /* harmony export */ "normalizeColor": () => (/* binding */ normalizeColor),
  88. /* harmony export */ "parseExternalUrl": () => (/* binding */ parseExternalUrl),
  89. /* harmony export */ "presets": () => (/* binding */ index),
  90. /* harmony export */ "toNumbers": () => (/* binding */ toNumbers),
  91. /* harmony export */ "trimLeft": () => (/* binding */ trimLeft),
  92. /* harmony export */ "trimRight": () => (/* binding */ trimRight),
  93. /* harmony export */ "vectorMagnitude": () => (/* binding */ vectorMagnitude),
  94. /* harmony export */ "vectorsAngle": () => (/* binding */ vectorsAngle),
  95. /* harmony export */ "vectorsRatio": () => (/* binding */ vectorsRatio)
  96. /* harmony export */ });
  97. /* 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");
  98. /* 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__);
  99. /* 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");
  100. /* 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__);
  101. /* 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");
  102. /* 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__);
  103. /* 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");
  104. /* 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__);
  105. /* 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");
  106. /* 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__);
  107. /* 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");
  108. /* 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__);
  109. /* 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");
  110. /* 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");
  111. /* 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__);
  112. /* 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");
  113. /* 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__);
  114. /* 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");
  115. /* 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__);
  116. /* 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");
  117. /* 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__);
  118. /* 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");
  119. /* 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__);
  120. /* 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");
  121. /* 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__);
  122. /* 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");
  123. /* 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__);
  124. /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
  125. /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14__);
  126. /* 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");
  127. /* 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");
  128. /* 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");
  129. /* 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");
  130. /* 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");
  131. /* 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__);
  132. /* 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");
  133. /* 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__);
  134. /* 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");
  135. /* 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__);
  136. /* 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");
  137. /* 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__);
  138. /* 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");
  139. /* 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__);
  140. /* 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");
  141. /* 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__);
  142. /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! raf */ "./node_modules/raf/index.js");
  143. /* harmony import */ var raf__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(raf__WEBPACK_IMPORTED_MODULE_25__);
  144. /* 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");
  145. /* 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__);
  146. /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! rgbcolor */ "./node_modules/rgbcolor/index.js");
  147. /* harmony import */ var rgbcolor__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(rgbcolor__WEBPACK_IMPORTED_MODULE_27__);
  148. /* 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");
  149. /* 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__);
  150. /* 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");
  151. /* 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__);
  152. /* 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");
  153. /* 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");
  154. /* 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");
  155. /* 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");
  156. /* 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__);
  157. /* 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");
  158. /* 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__);
  159. /* 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");
  160. /* 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__);
  161. /* 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");
  162. /* 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__);
  163. /* 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");
  164. /* 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__);
  165. /* 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");
  166. /* 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__);
  167. /* 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");
  168. /* 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");
  169. /* 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__);
  170. /* 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");
  171. /* 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__);
  172. /* 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");
  173. /* 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");
  174. /* 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__);
  175. /* 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");
  176. /* 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__);
  177. /* 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");
  178. /* 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__);
  179. /* 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");
  180. /* 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");
  181. /* 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__);
  182. /* 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");
  183. /* 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__);
  184. /* 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");
  185. /* 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__);
  186. /* 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");
  187. /* 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__);
  188. /* 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");
  189. /* 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__);
  190. /* 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");
  191. /* 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__);
  192. /* 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");
  193. /* 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__);
  194. /* 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");
  195. /* 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__);
  196. /* harmony import */ var stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! stackblur-canvas */ "./node_modules/stackblur-canvas/dist/stackblur-es.js");
  197. /**
  198. * HTML-safe compress white-spaces.
  199. * @param str - String to compress.
  200. */
  201. function compressSpaces(str) {
  202. return str.replace(/(?!\u3000)\s+/gm, ' ');
  203. }
  204. /**
  205. * HTML-safe left trim.
  206. * @param str - String to trim.
  207. */
  208. function trimLeft(str) {
  209. return str.replace(/^[\n \t]+/, '');
  210. }
  211. /**
  212. * HTML-safe right trim.
  213. * @param str - String to trim.
  214. */
  215. function trimRight(str) {
  216. return str.replace(/[\n \t]+$/, '');
  217. }
  218. /**
  219. * String to numbers array.
  220. * @param str - Numbers string.
  221. */
  222. function toNumbers(str) {
  223. var matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
  224. return matches.map(parseFloat);
  225. } // Microsoft Edge fix
  226. var allUppercase = /^[A-Z-]+$/;
  227. /**
  228. * Normalize attribute name.
  229. * @param name - Attribute name.
  230. */
  231. function normalizeAttributeName(name) {
  232. if (allUppercase.test(name)) {
  233. return name.toLowerCase();
  234. }
  235. return name;
  236. }
  237. /**
  238. * Parse external URL.
  239. * @param url - CSS url string.
  240. */
  241. function parseExternalUrl(url) {
  242. // single quotes [2]
  243. // v double quotes [3]
  244. // v v no quotes [4]
  245. // v v v
  246. var urlMatch = url.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/) || [];
  247. return urlMatch[2] || urlMatch[3] || urlMatch[4];
  248. }
  249. /**
  250. * Transform floats to integers in rgb colors.
  251. * @param color - Color to normalize.
  252. */
  253. function normalizeColor(color) {
  254. if (!color.startsWith('rgb')) {
  255. return color;
  256. }
  257. var rgbParts = 3;
  258. var normalizedColor = color.replace(/\d+(\.\d+)?/g, function (num, isFloat) {
  259. return rgbParts-- && isFloat ? String(Math.round(parseFloat(num))) : num;
  260. });
  261. return normalizedColor;
  262. }
  263. // slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
  264. var attributeRegex = /(\[[^\]]+\])/g;
  265. var idRegex = /(#[^\s\+>~\.\[:]+)/g;
  266. var classRegex = /(\.[^\s\+>~\.\[:]+)/g;
  267. var pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi;
  268. var pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi;
  269. var pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g;
  270. var elementRegex = /([^\s\+>~\.\[:]+)/g;
  271. function findSelectorMatch(selector, regex) {
  272. var matches = selector.match(regex);
  273. if (!matches) {
  274. return [selector, 0];
  275. }
  276. return [selector.replace(regex, ' '), matches.length];
  277. }
  278. /**
  279. * Measure selector specificity.
  280. * @param selector - Selector to measure.
  281. */
  282. function getSelectorSpecificity(selector) {
  283. var specificity = [0, 0, 0];
  284. var currentSelector = selector.replace(/:not\(([^\)]*)\)/g, ' $1 ').replace(/{[\s\S]*/gm, ' ');
  285. var delta = 0;
  286. var _findSelectorMatch = findSelectorMatch(currentSelector, attributeRegex);
  287. var _findSelectorMatch2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch, 2);
  288. currentSelector = _findSelectorMatch2[0];
  289. delta = _findSelectorMatch2[1];
  290. specificity[1] += delta;
  291. var _findSelectorMatch3 = findSelectorMatch(currentSelector, idRegex);
  292. var _findSelectorMatch4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch3, 2);
  293. currentSelector = _findSelectorMatch4[0];
  294. delta = _findSelectorMatch4[1];
  295. specificity[0] += delta;
  296. var _findSelectorMatch5 = findSelectorMatch(currentSelector, classRegex);
  297. var _findSelectorMatch6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch5, 2);
  298. currentSelector = _findSelectorMatch6[0];
  299. delta = _findSelectorMatch6[1];
  300. specificity[1] += delta;
  301. var _findSelectorMatch7 = findSelectorMatch(currentSelector, pseudoElementRegex);
  302. var _findSelectorMatch8 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch7, 2);
  303. currentSelector = _findSelectorMatch8[0];
  304. delta = _findSelectorMatch8[1];
  305. specificity[2] += delta;
  306. var _findSelectorMatch9 = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
  307. var _findSelectorMatch10 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch9, 2);
  308. currentSelector = _findSelectorMatch10[0];
  309. delta = _findSelectorMatch10[1];
  310. specificity[1] += delta;
  311. var _findSelectorMatch11 = findSelectorMatch(currentSelector, pseudoClassRegex);
  312. var _findSelectorMatch12 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch11, 2);
  313. currentSelector = _findSelectorMatch12[0];
  314. delta = _findSelectorMatch12[1];
  315. specificity[1] += delta;
  316. currentSelector = currentSelector.replace(/[\*\s\+>~]/g, ' ').replace(/[#\.]/g, ' ');
  317. var _findSelectorMatch13 = findSelectorMatch(currentSelector, elementRegex);
  318. var _findSelectorMatch14 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_findSelectorMatch13, 2);
  319. currentSelector = _findSelectorMatch14[0];
  320. delta = _findSelectorMatch14[1];
  321. // lgtm [js/useless-assignment-to-local]
  322. specificity[2] += delta;
  323. return specificity.join('');
  324. }
  325. var PSEUDO_ZERO = .00000001;
  326. /**
  327. * Vector magnitude.
  328. */
  329. function vectorMagnitude(v) {
  330. return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
  331. }
  332. /**
  333. * Ratio between two vectors.
  334. */
  335. function vectorsRatio(u, v) {
  336. return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
  337. }
  338. /**
  339. * Angle between two vectors.
  340. */
  341. function vectorsAngle(u, v) {
  342. return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
  343. }
  344. function CB1(t) {
  345. return t * t * t;
  346. }
  347. function CB2(t) {
  348. return 3 * t * t * (1 - t);
  349. }
  350. function CB3(t) {
  351. return 3 * t * (1 - t) * (1 - t);
  352. }
  353. function CB4(t) {
  354. return (1 - t) * (1 - t) * (1 - t);
  355. }
  356. function QB1(t) {
  357. return t * t;
  358. }
  359. function QB2(t) {
  360. return 2 * t * (1 - t);
  361. }
  362. function QB3(t) {
  363. return (1 - t) * (1 - t);
  364. }
  365. function createCommonjsModule(fn, module) {
  366. return module = { exports: {} }, fn(module, module.exports), module.exports;
  367. }
  368. var runtime_1 = createCommonjsModule(function (module) {
  369. /**
  370. * Copyright (c) 2014-present, Facebook, Inc.
  371. *
  372. * This source code is licensed under the MIT license found in the
  373. * LICENSE file in the root directory of this source tree.
  374. */
  375. var runtime = function (exports) {
  376. var Op = Object.prototype;
  377. var hasOwn = Op.hasOwnProperty;
  378. var undefined$1; // More compressible than void 0.
  379. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  380. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  381. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  382. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  383. function wrap(innerFn, outerFn, self, tryLocsList) {
  384. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  385. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  386. var generator = Object.create(protoGenerator.prototype);
  387. var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
  388. // .throw, and .return methods.
  389. generator._invoke = makeInvokeMethod(innerFn, self, context);
  390. return generator;
  391. }
  392. exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
  393. // record like context.tryEntries[i].completion. This interface could
  394. // have been (and was previously) designed to take a closure to be
  395. // invoked without arguments, but in all the cases we care about we
  396. // already have an existing method we want to call, so there's no need
  397. // to create a new function object. We can even get away with assuming
  398. // the method takes exactly one argument, since that happens to be true
  399. // in every case, so we don't have to touch the arguments object. The
  400. // only additional allocation required is the completion record, which
  401. // has a stable shape and so hopefully should be cheap to allocate.
  402. function tryCatch(fn, obj, arg) {
  403. try {
  404. return {
  405. type: "normal",
  406. arg: fn.call(obj, arg)
  407. };
  408. } catch (err) {
  409. return {
  410. type: "throw",
  411. arg: err
  412. };
  413. }
  414. }
  415. var GenStateSuspendedStart = "suspendedStart";
  416. var GenStateSuspendedYield = "suspendedYield";
  417. var GenStateExecuting = "executing";
  418. var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
  419. // breaking out of the dispatch switch statement.
  420. var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
  421. // .constructor.prototype properties for functions that return Generator
  422. // objects. For full spec compliance, you may wish to configure your
  423. // minifier not to mangle the names of these two functions.
  424. function Generator() {}
  425. function GeneratorFunction() {}
  426. function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
  427. // don't natively support it.
  428. var IteratorPrototype = {};
  429. IteratorPrototype[iteratorSymbol] = function () {
  430. return this;
  431. };
  432. var getProto = Object.getPrototypeOf;
  433. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  434. if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  435. // This environment has a native %IteratorPrototype%; use it instead
  436. // of the polyfill.
  437. IteratorPrototype = NativeIteratorPrototype;
  438. }
  439. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  440. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  441. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  442. GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the
  443. // Iterator interface in terms of a single ._invoke method.
  444. function defineIteratorMethods(prototype) {
  445. ["next", "throw", "return"].forEach(function (method) {
  446. prototype[method] = function (arg) {
  447. return this._invoke(method, arg);
  448. };
  449. });
  450. }
  451. exports.isGeneratorFunction = function (genFun) {
  452. var ctor = typeof genFun === "function" && genFun.constructor;
  453. return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
  454. // do is to check its .name property.
  455. (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
  456. };
  457. exports.mark = function (genFun) {
  458. if (Object.setPrototypeOf) {
  459. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  460. } else {
  461. genFun.__proto__ = GeneratorFunctionPrototype;
  462. if (!(toStringTagSymbol in genFun)) {
  463. genFun[toStringTagSymbol] = "GeneratorFunction";
  464. }
  465. }
  466. genFun.prototype = Object.create(Gp);
  467. return genFun;
  468. }; // Within the body of any async function, `await x` is transformed to
  469. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  470. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  471. // meant to be awaited.
  472. exports.awrap = function (arg) {
  473. return {
  474. __await: arg
  475. };
  476. };
  477. function AsyncIterator(generator, PromiseImpl) {
  478. function invoke(method, arg, resolve, reject) {
  479. var record = tryCatch(generator[method], generator, arg);
  480. if (record.type === "throw") {
  481. reject(record.arg);
  482. } else {
  483. var result = record.arg;
  484. var value = result.value;
  485. if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
  486. return PromiseImpl.resolve(value.__await).then(function (value) {
  487. invoke("next", value, resolve, reject);
  488. }, function (err) {
  489. invoke("throw", err, resolve, reject);
  490. });
  491. }
  492. return PromiseImpl.resolve(value).then(function (unwrapped) {
  493. // When a yielded Promise is resolved, its final value becomes
  494. // the .value of the Promise<{value,done}> result for the
  495. // current iteration.
  496. result.value = unwrapped;
  497. resolve(result);
  498. }, function (error) {
  499. // If a rejected Promise was yielded, throw the rejection back
  500. // into the async generator function so it can be handled there.
  501. return invoke("throw", error, resolve, reject);
  502. });
  503. }
  504. }
  505. var previousPromise;
  506. function enqueue(method, arg) {
  507. function callInvokeWithMethodAndArg() {
  508. return new PromiseImpl(function (resolve, reject) {
  509. invoke(method, arg, resolve, reject);
  510. });
  511. }
  512. return previousPromise = // If enqueue has been called before, then we want to wait until
  513. // all previous Promises have been resolved before calling invoke,
  514. // so that results are always delivered in the correct order. If
  515. // enqueue has not been called before, then it is important to
  516. // call invoke immediately, without waiting on a callback to fire,
  517. // so that the async generator function has the opportunity to do
  518. // any necessary setup in a predictable way. This predictability
  519. // is why the Promise constructor synchronously invokes its
  520. // executor callback, and why async functions synchronously
  521. // execute code before the first await. Since we implement simple
  522. // async functions in terms of async generators, it is especially
  523. // important to get this right, even though it requires care.
  524. previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
  525. // invocations of the iterator.
  526. callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  527. } // Define the unified helper method that is used to implement .next,
  528. // .throw, and .return (see defineIteratorMethods).
  529. this._invoke = enqueue;
  530. }
  531. defineIteratorMethods(AsyncIterator.prototype);
  532. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  533. return this;
  534. };
  535. exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
  536. // AsyncIterator objects; they just return a Promise for the value of
  537. // the final result produced by the iterator.
  538. exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  539. if (PromiseImpl === void 0) PromiseImpl = Promise;
  540. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  541. return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
  542. : iter.next().then(function (result) {
  543. return result.done ? result.value : iter.next();
  544. });
  545. };
  546. function makeInvokeMethod(innerFn, self, context) {
  547. var state = GenStateSuspendedStart;
  548. return function invoke(method, arg) {
  549. if (state === GenStateExecuting) {
  550. throw new Error("Generator is already running");
  551. }
  552. if (state === GenStateCompleted) {
  553. if (method === "throw") {
  554. throw arg;
  555. } // Be forgiving, per 25.3.3.3.3 of the spec:
  556. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  557. return doneResult();
  558. }
  559. context.method = method;
  560. context.arg = arg;
  561. while (true) {
  562. var delegate = context.delegate;
  563. if (delegate) {
  564. var delegateResult = maybeInvokeDelegate(delegate, context);
  565. if (delegateResult) {
  566. if (delegateResult === ContinueSentinel) continue;
  567. return delegateResult;
  568. }
  569. }
  570. if (context.method === "next") {
  571. // Setting context._sent for legacy support of Babel's
  572. // function.sent implementation.
  573. context.sent = context._sent = context.arg;
  574. } else if (context.method === "throw") {
  575. if (state === GenStateSuspendedStart) {
  576. state = GenStateCompleted;
  577. throw context.arg;
  578. }
  579. context.dispatchException(context.arg);
  580. } else if (context.method === "return") {
  581. context.abrupt("return", context.arg);
  582. }
  583. state = GenStateExecuting;
  584. var record = tryCatch(innerFn, self, context);
  585. if (record.type === "normal") {
  586. // If an exception is thrown from innerFn, we leave state ===
  587. // GenStateExecuting and loop back for another invocation.
  588. state = context.done ? GenStateCompleted : GenStateSuspendedYield;
  589. if (record.arg === ContinueSentinel) {
  590. continue;
  591. }
  592. return {
  593. value: record.arg,
  594. done: context.done
  595. };
  596. } else if (record.type === "throw") {
  597. state = GenStateCompleted; // Dispatch the exception by looping back around to the
  598. // context.dispatchException(context.arg) call above.
  599. context.method = "throw";
  600. context.arg = record.arg;
  601. }
  602. }
  603. };
  604. } // Call delegate.iterator[context.method](context.arg) and handle the
  605. // result, either by returning a { value, done } result from the
  606. // delegate iterator, or by modifying context.method and context.arg,
  607. // setting context.delegate to null, and returning the ContinueSentinel.
  608. function maybeInvokeDelegate(delegate, context) {
  609. var method = delegate.iterator[context.method];
  610. if (method === undefined$1) {
  611. // A .throw or .return when the delegate iterator has no .throw
  612. // method always terminates the yield* loop.
  613. context.delegate = null;
  614. if (context.method === "throw") {
  615. // Note: ["return"] must be used for ES3 parsing compatibility.
  616. if (delegate.iterator["return"]) {
  617. // If the delegate iterator has a return method, give it a
  618. // chance to clean up.
  619. context.method = "return";
  620. context.arg = undefined$1;
  621. maybeInvokeDelegate(delegate, context);
  622. if (context.method === "throw") {
  623. // If maybeInvokeDelegate(context) changed context.method from
  624. // "return" to "throw", let that override the TypeError below.
  625. return ContinueSentinel;
  626. }
  627. }
  628. context.method = "throw";
  629. context.arg = new TypeError("The iterator does not provide a 'throw' method");
  630. }
  631. return ContinueSentinel;
  632. }
  633. var record = tryCatch(method, delegate.iterator, context.arg);
  634. if (record.type === "throw") {
  635. context.method = "throw";
  636. context.arg = record.arg;
  637. context.delegate = null;
  638. return ContinueSentinel;
  639. }
  640. var info = record.arg;
  641. if (!info) {
  642. context.method = "throw";
  643. context.arg = new TypeError("iterator result is not an object");
  644. context.delegate = null;
  645. return ContinueSentinel;
  646. }
  647. if (info.done) {
  648. // Assign the result of the finished delegate to the temporary
  649. // variable specified by delegate.resultName (see delegateYield).
  650. context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
  651. context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
  652. // exception, let the outer generator proceed normally. If
  653. // context.method was "next", forget context.arg since it has been
  654. // "consumed" by the delegate iterator. If context.method was
  655. // "return", allow the original .return call to continue in the
  656. // outer generator.
  657. if (context.method !== "return") {
  658. context.method = "next";
  659. context.arg = undefined$1;
  660. }
  661. } else {
  662. // Re-yield the result returned by the delegate method.
  663. return info;
  664. } // The delegate iterator is finished, so forget it and continue with
  665. // the outer generator.
  666. context.delegate = null;
  667. return ContinueSentinel;
  668. } // Define Generator.prototype.{next,throw,return} in terms of the
  669. // unified ._invoke helper method.
  670. defineIteratorMethods(Gp);
  671. Gp[toStringTagSymbol] = "Generator"; // A Generator should always return itself as the iterator object when the
  672. // @@iterator function is called on it. Some browsers' implementations of the
  673. // iterator prototype chain incorrectly implement this, causing the Generator
  674. // object to not be returned from this call. This ensures that doesn't happen.
  675. // See https://github.com/facebook/regenerator/issues/274 for more details.
  676. Gp[iteratorSymbol] = function () {
  677. return this;
  678. };
  679. Gp.toString = function () {
  680. return "[object Generator]";
  681. };
  682. function pushTryEntry(locs) {
  683. var entry = {
  684. tryLoc: locs[0]
  685. };
  686. if (1 in locs) {
  687. entry.catchLoc = locs[1];
  688. }
  689. if (2 in locs) {
  690. entry.finallyLoc = locs[2];
  691. entry.afterLoc = locs[3];
  692. }
  693. this.tryEntries.push(entry);
  694. }
  695. function resetTryEntry(entry) {
  696. var record = entry.completion || {};
  697. record.type = "normal";
  698. delete record.arg;
  699. entry.completion = record;
  700. }
  701. function Context(tryLocsList) {
  702. // The root entry object (effectively a try statement without a catch
  703. // or a finally block) gives us a place to store values thrown from
  704. // locations where there is no enclosing try statement.
  705. this.tryEntries = [{
  706. tryLoc: "root"
  707. }];
  708. tryLocsList.forEach(pushTryEntry, this);
  709. this.reset(true);
  710. }
  711. exports.keys = function (object) {
  712. var keys = [];
  713. for (var key in object) {
  714. keys.push(key);
  715. }
  716. keys.reverse(); // Rather than returning an object with a next method, we keep
  717. // things simple and return the next function itself.
  718. return function next() {
  719. while (keys.length) {
  720. var key = keys.pop();
  721. if (key in object) {
  722. next.value = key;
  723. next.done = false;
  724. return next;
  725. }
  726. } // To avoid creating an additional object, we just hang the .value
  727. // and .done properties off the next function object itself. This
  728. // also ensures that the minifier will not anonymize the function.
  729. next.done = true;
  730. return next;
  731. };
  732. };
  733. function values(iterable) {
  734. if (iterable) {
  735. var iteratorMethod = iterable[iteratorSymbol];
  736. if (iteratorMethod) {
  737. return iteratorMethod.call(iterable);
  738. }
  739. if (typeof iterable.next === "function") {
  740. return iterable;
  741. }
  742. if (!isNaN(iterable.length)) {
  743. var i = -1,
  744. next = function next() {
  745. while (++i < iterable.length) {
  746. if (hasOwn.call(iterable, i)) {
  747. next.value = iterable[i];
  748. next.done = false;
  749. return next;
  750. }
  751. }
  752. next.value = undefined$1;
  753. next.done = true;
  754. return next;
  755. };
  756. return next.next = next;
  757. }
  758. } // Return an iterator with no values.
  759. return {
  760. next: doneResult
  761. };
  762. }
  763. exports.values = values;
  764. function doneResult() {
  765. return {
  766. value: undefined$1,
  767. done: true
  768. };
  769. }
  770. Context.prototype = {
  771. constructor: Context,
  772. reset: function (skipTempReset) {
  773. this.prev = 0;
  774. this.next = 0; // Resetting context._sent for legacy support of Babel's
  775. // function.sent implementation.
  776. this.sent = this._sent = undefined$1;
  777. this.done = false;
  778. this.delegate = null;
  779. this.method = "next";
  780. this.arg = undefined$1;
  781. this.tryEntries.forEach(resetTryEntry);
  782. if (!skipTempReset) {
  783. for (var name in this) {
  784. // Not sure about the optimal order of these conditions:
  785. if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
  786. this[name] = undefined$1;
  787. }
  788. }
  789. }
  790. },
  791. stop: function () {
  792. this.done = true;
  793. var rootEntry = this.tryEntries[0];
  794. var rootRecord = rootEntry.completion;
  795. if (rootRecord.type === "throw") {
  796. throw rootRecord.arg;
  797. }
  798. return this.rval;
  799. },
  800. dispatchException: function (exception) {
  801. if (this.done) {
  802. throw exception;
  803. }
  804. var context = this;
  805. function handle(loc, caught) {
  806. record.type = "throw";
  807. record.arg = exception;
  808. context.next = loc;
  809. if (caught) {
  810. // If the dispatched exception was caught by a catch block,
  811. // then let that catch block handle the exception normally.
  812. context.method = "next";
  813. context.arg = undefined$1;
  814. }
  815. return !!caught;
  816. }
  817. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  818. var entry = this.tryEntries[i];
  819. var record = entry.completion;
  820. if (entry.tryLoc === "root") {
  821. // Exception thrown outside of any try block that could handle
  822. // it, so set the completion value of the entire function to
  823. // throw the exception.
  824. return handle("end");
  825. }
  826. if (entry.tryLoc <= this.prev) {
  827. var hasCatch = hasOwn.call(entry, "catchLoc");
  828. var hasFinally = hasOwn.call(entry, "finallyLoc");
  829. if (hasCatch && hasFinally) {
  830. if (this.prev < entry.catchLoc) {
  831. return handle(entry.catchLoc, true);
  832. } else if (this.prev < entry.finallyLoc) {
  833. return handle(entry.finallyLoc);
  834. }
  835. } else if (hasCatch) {
  836. if (this.prev < entry.catchLoc) {
  837. return handle(entry.catchLoc, true);
  838. }
  839. } else if (hasFinally) {
  840. if (this.prev < entry.finallyLoc) {
  841. return handle(entry.finallyLoc);
  842. }
  843. } else {
  844. throw new Error("try statement without catch or finally");
  845. }
  846. }
  847. }
  848. },
  849. abrupt: function (type, arg) {
  850. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  851. var entry = this.tryEntries[i];
  852. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  853. var finallyEntry = entry;
  854. break;
  855. }
  856. }
  857. if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
  858. // Ignore the finally entry if control is not jumping to a
  859. // location outside the try/catch block.
  860. finallyEntry = null;
  861. }
  862. var record = finallyEntry ? finallyEntry.completion : {};
  863. record.type = type;
  864. record.arg = arg;
  865. if (finallyEntry) {
  866. this.method = "next";
  867. this.next = finallyEntry.finallyLoc;
  868. return ContinueSentinel;
  869. }
  870. return this.complete(record);
  871. },
  872. complete: function (record, afterLoc) {
  873. if (record.type === "throw") {
  874. throw record.arg;
  875. }
  876. if (record.type === "break" || record.type === "continue") {
  877. this.next = record.arg;
  878. } else if (record.type === "return") {
  879. this.rval = this.arg = record.arg;
  880. this.method = "return";
  881. this.next = "end";
  882. } else if (record.type === "normal" && afterLoc) {
  883. this.next = afterLoc;
  884. }
  885. return ContinueSentinel;
  886. },
  887. finish: function (finallyLoc) {
  888. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  889. var entry = this.tryEntries[i];
  890. if (entry.finallyLoc === finallyLoc) {
  891. this.complete(entry.completion, entry.afterLoc);
  892. resetTryEntry(entry);
  893. return ContinueSentinel;
  894. }
  895. }
  896. },
  897. "catch": function (tryLoc) {
  898. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  899. var entry = this.tryEntries[i];
  900. if (entry.tryLoc === tryLoc) {
  901. var record = entry.completion;
  902. if (record.type === "throw") {
  903. var thrown = record.arg;
  904. resetTryEntry(entry);
  905. }
  906. return thrown;
  907. }
  908. } // The context.catch method must only be called with a location
  909. // argument that corresponds to a known catch block.
  910. throw new Error("illegal catch attempt");
  911. },
  912. delegateYield: function (iterable, resultName, nextLoc) {
  913. this.delegate = {
  914. iterator: values(iterable),
  915. resultName: resultName,
  916. nextLoc: nextLoc
  917. };
  918. if (this.method === "next") {
  919. // Deliberately forget the last sent value so that we don't
  920. // accidentally pass it on to the delegate.
  921. this.arg = undefined$1;
  922. }
  923. return ContinueSentinel;
  924. }
  925. }; // Regardless of whether this script is executing as a CommonJS module
  926. // or not, return the runtime object so that we can declare the variable
  927. // regeneratorRuntime in the outer scope, which allows this module to be
  928. // injected easily by `bin/regenerator --include-runtime script.js`.
  929. return exports;
  930. }( // If this script is executing as a CommonJS module, use module.exports
  931. // as the regeneratorRuntime namespace. Otherwise create a new empty
  932. // object. Either way, the resulting object will be used to initialize
  933. // the regeneratorRuntime variable at the top of this file.
  934. module.exports );
  935. try {
  936. regeneratorRuntime = runtime;
  937. } catch (accidentalStrictMode) {
  938. // This module should not be running in strict mode, so the above
  939. // assignment should always work unless something is misconfigured. Just
  940. // in case runtime.js accidentally runs in strict mode, we can escape
  941. // strict mode using a global Function call. This could conceivably fail
  942. // if a Content Security Policy forbids using Function, but in that case
  943. // the proper solution is to fix the accidental strict mode problem. If
  944. // you've misconfigured your bundler to force strict mode and applied a
  945. // CSP to forbid Function, and you're not willing to fix either of those
  946. // problems, please detail your unique predicament in a GitHub issue.
  947. Function("r", "regeneratorRuntime = r")(runtime);
  948. }
  949. });
  950. var Property = /*#__PURE__*/function () {
  951. function Property(document, name, value) {
  952. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Property);
  953. this.document = document;
  954. this.name = name;
  955. this.value = value;
  956. this.isNormalizedColor = false;
  957. }
  958. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Property, [{
  959. key: "hasValue",
  960. value: function hasValue() {
  961. var value = this.value;
  962. return value !== null && value !== '' && value !== 0 && typeof value !== 'undefined';
  963. }
  964. }, {
  965. key: "isString",
  966. value: function isString(regexp) {
  967. var value = this.value;
  968. var result = typeof value === 'string';
  969. if (!result || !regexp) {
  970. return result;
  971. }
  972. return regexp.test(value);
  973. }
  974. }, {
  975. key: "isUrlDefinition",
  976. value: function isUrlDefinition() {
  977. return this.isString(/^url\(/);
  978. }
  979. }, {
  980. key: "isPixels",
  981. value: function isPixels() {
  982. if (!this.hasValue()) {
  983. return false;
  984. }
  985. var asString = this.getString();
  986. switch (true) {
  987. case /px$/.test(asString):
  988. case /^[0-9]+$/.test(asString):
  989. return true;
  990. default:
  991. return false;
  992. }
  993. }
  994. }, {
  995. key: "setValue",
  996. value: function setValue(value) {
  997. this.value = value;
  998. return this;
  999. }
  1000. }, {
  1001. key: "getValue",
  1002. value: function getValue(def) {
  1003. if (typeof def === 'undefined' || this.hasValue()) {
  1004. return this.value;
  1005. }
  1006. return def;
  1007. }
  1008. }, {
  1009. key: "getNumber",
  1010. value: function getNumber(def) {
  1011. if (!this.hasValue()) {
  1012. if (typeof def === 'undefined') {
  1013. return 0;
  1014. }
  1015. return parseFloat(def);
  1016. }
  1017. var value = this.value;
  1018. var n = parseFloat(value);
  1019. if (this.isString(/%$/)) {
  1020. n = n / 100.0;
  1021. }
  1022. return n;
  1023. }
  1024. }, {
  1025. key: "getString",
  1026. value: function getString(def) {
  1027. if (typeof def === 'undefined' || this.hasValue()) {
  1028. return typeof this.value === 'undefined' ? '' : String(this.value);
  1029. }
  1030. return String(def);
  1031. }
  1032. }, {
  1033. key: "getColor",
  1034. value: function getColor(def) {
  1035. var color = this.getString(def);
  1036. if (this.isNormalizedColor) {
  1037. return color;
  1038. }
  1039. this.isNormalizedColor = true;
  1040. color = normalizeColor(color);
  1041. this.value = color;
  1042. return color;
  1043. }
  1044. }, {
  1045. key: "getDpi",
  1046. value: function getDpi() {
  1047. return 96.0; // TODO: compute?
  1048. }
  1049. }, {
  1050. key: "getRem",
  1051. value: function getRem() {
  1052. return this.document.rootEmSize;
  1053. }
  1054. }, {
  1055. key: "getEm",
  1056. value: function getEm() {
  1057. return this.document.emSize;
  1058. }
  1059. }, {
  1060. key: "getUnits",
  1061. value: function getUnits() {
  1062. return this.getString().replace(/[0-9\.\-]/g, '');
  1063. }
  1064. }, {
  1065. key: "getPixels",
  1066. value: function getPixels(axisOrIsFontSize) {
  1067. var processPercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1068. if (!this.hasValue()) {
  1069. return 0;
  1070. }
  1071. var _ref = typeof axisOrIsFontSize === 'boolean' ? [undefined, axisOrIsFontSize] : [axisOrIsFontSize],
  1072. _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
  1073. axis = _ref2[0],
  1074. isFontSize = _ref2[1];
  1075. var viewPort = this.document.screen.viewPort;
  1076. switch (true) {
  1077. case this.isString(/vmin$/):
  1078. return this.getNumber() / 100.0 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
  1079. case this.isString(/vmax$/):
  1080. return this.getNumber() / 100.0 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
  1081. case this.isString(/vw$/):
  1082. return this.getNumber() / 100.0 * viewPort.computeSize('x');
  1083. case this.isString(/vh$/):
  1084. return this.getNumber() / 100.0 * viewPort.computeSize('y');
  1085. case this.isString(/rem$/):
  1086. return this.getNumber() * this.getRem();
  1087. case this.isString(/em$/):
  1088. return this.getNumber() * this.getEm();
  1089. case this.isString(/ex$/):
  1090. return this.getNumber() * this.getEm() / 2.0;
  1091. case this.isString(/px$/):
  1092. return this.getNumber();
  1093. case this.isString(/pt$/):
  1094. return this.getNumber() * this.getDpi() * (1.0 / 72.0);
  1095. case this.isString(/pc$/):
  1096. return this.getNumber() * 15;
  1097. case this.isString(/cm$/):
  1098. return this.getNumber() * this.getDpi() / 2.54;
  1099. case this.isString(/mm$/):
  1100. return this.getNumber() * this.getDpi() / 25.4;
  1101. case this.isString(/in$/):
  1102. return this.getNumber() * this.getDpi();
  1103. case this.isString(/%$/) && isFontSize:
  1104. return this.getNumber() * this.getEm();
  1105. case this.isString(/%$/):
  1106. return this.getNumber() * viewPort.computeSize(axis);
  1107. default:
  1108. {
  1109. var n = this.getNumber();
  1110. if (processPercent && n < 1.0) {
  1111. return n * viewPort.computeSize(axis);
  1112. }
  1113. return n;
  1114. }
  1115. }
  1116. }
  1117. }, {
  1118. key: "getMilliseconds",
  1119. value: function getMilliseconds() {
  1120. if (!this.hasValue()) {
  1121. return 0;
  1122. }
  1123. if (this.isString(/ms$/)) {
  1124. return this.getNumber();
  1125. }
  1126. return this.getNumber() * 1000;
  1127. }
  1128. }, {
  1129. key: "getRadians",
  1130. value: function getRadians() {
  1131. if (!this.hasValue()) {
  1132. return 0;
  1133. }
  1134. switch (true) {
  1135. case this.isString(/deg$/):
  1136. return this.getNumber() * (Math.PI / 180.0);
  1137. case this.isString(/grad$/):
  1138. return this.getNumber() * (Math.PI / 200.0);
  1139. case this.isString(/rad$/):
  1140. return this.getNumber();
  1141. default:
  1142. return this.getNumber() * (Math.PI / 180.0);
  1143. }
  1144. }
  1145. }, {
  1146. key: "getDefinition",
  1147. value: function getDefinition() {
  1148. var asString = this.getString();
  1149. var name = asString.match(/#([^\)'"]+)/);
  1150. if (name) {
  1151. name = name[1];
  1152. }
  1153. if (!name) {
  1154. name = asString;
  1155. }
  1156. return this.document.definitions[name];
  1157. }
  1158. }, {
  1159. key: "getFillStyleDefinition",
  1160. value: function getFillStyleDefinition(element, opacity) {
  1161. var def = this.getDefinition();
  1162. if (!def) {
  1163. return null;
  1164. } // gradient
  1165. if (typeof def.createGradient === 'function') {
  1166. return def.createGradient(this.document.ctx, element, opacity);
  1167. } // pattern
  1168. if (typeof def.createPattern === 'function') {
  1169. if (def.getHrefAttribute().hasValue()) {
  1170. var patternTransform = def.getAttribute('patternTransform');
  1171. def = def.getHrefAttribute().getDefinition();
  1172. if (patternTransform.hasValue()) {
  1173. def.getAttribute('patternTransform', true).setValue(patternTransform.value);
  1174. }
  1175. }
  1176. return def.createPattern(this.document.ctx, element, opacity);
  1177. }
  1178. return null;
  1179. }
  1180. }, {
  1181. key: "getTextBaseline",
  1182. value: function getTextBaseline() {
  1183. if (!this.hasValue()) {
  1184. return null;
  1185. }
  1186. return Property.textBaselineMapping[this.getString()];
  1187. }
  1188. }, {
  1189. key: "addOpacity",
  1190. value: function addOpacity(opacity) {
  1191. var value = this.getColor();
  1192. var len = value.length;
  1193. var commas = 0; // Simulate old RGBColor version, which can't parse rgba.
  1194. for (var i = 0; i < len; i++) {
  1195. if (value[i] === ',') {
  1196. commas++;
  1197. }
  1198. if (commas === 3) {
  1199. break;
  1200. }
  1201. }
  1202. if (opacity.hasValue() && this.isString() && commas !== 3) {
  1203. var color = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(value);
  1204. if (color.ok) {
  1205. color.alpha = opacity.getNumber();
  1206. value = color.toRGBA();
  1207. }
  1208. }
  1209. return new Property(this.document, this.name, value);
  1210. }
  1211. }], [{
  1212. key: "empty",
  1213. value: function empty(document) {
  1214. return new Property(document, 'EMPTY', '');
  1215. }
  1216. }]);
  1217. return Property;
  1218. }();
  1219. Property.textBaselineMapping = {
  1220. 'baseline': 'alphabetic',
  1221. 'before-edge': 'top',
  1222. 'text-before-edge': 'top',
  1223. 'middle': 'middle',
  1224. 'central': 'middle',
  1225. 'after-edge': 'bottom',
  1226. 'text-after-edge': 'bottom',
  1227. 'ideographic': 'ideographic',
  1228. 'alphabetic': 'alphabetic',
  1229. 'hanging': 'hanging',
  1230. 'mathematical': 'alphabetic'
  1231. };
  1232. var ViewPort = /*#__PURE__*/function () {
  1233. function ViewPort() {
  1234. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ViewPort);
  1235. this.viewPorts = [];
  1236. }
  1237. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ViewPort, [{
  1238. key: "clear",
  1239. value: function clear() {
  1240. this.viewPorts = [];
  1241. }
  1242. }, {
  1243. key: "setCurrent",
  1244. value: function setCurrent(width, height) {
  1245. this.viewPorts.push({
  1246. width: width,
  1247. height: height
  1248. });
  1249. }
  1250. }, {
  1251. key: "removeCurrent",
  1252. value: function removeCurrent() {
  1253. this.viewPorts.pop();
  1254. }
  1255. }, {
  1256. key: "getCurrent",
  1257. value: function getCurrent() {
  1258. var viewPorts = this.viewPorts;
  1259. return viewPorts[viewPorts.length - 1];
  1260. }
  1261. }, {
  1262. key: "computeSize",
  1263. value: function computeSize(d) {
  1264. if (typeof d === 'number') {
  1265. return d;
  1266. }
  1267. if (d === 'x') {
  1268. return this.width;
  1269. }
  1270. if (d === 'y') {
  1271. return this.height;
  1272. }
  1273. return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
  1274. }
  1275. }, {
  1276. key: "width",
  1277. get: function get() {
  1278. return this.getCurrent().width;
  1279. }
  1280. }, {
  1281. key: "height",
  1282. get: function get() {
  1283. return this.getCurrent().height;
  1284. }
  1285. }]);
  1286. return ViewPort;
  1287. }();
  1288. var Point = /*#__PURE__*/function () {
  1289. function Point(x, y) {
  1290. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Point);
  1291. this.x = x;
  1292. this.y = y;
  1293. }
  1294. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Point, [{
  1295. key: "angleTo",
  1296. value: function angleTo(point) {
  1297. return Math.atan2(point.y - this.y, point.x - this.x);
  1298. }
  1299. }, {
  1300. key: "applyTransform",
  1301. value: function applyTransform(transform) {
  1302. var x = this.x,
  1303. y = this.y;
  1304. var xp = x * transform[0] + y * transform[2] + transform[4];
  1305. var yp = x * transform[1] + y * transform[3] + transform[5];
  1306. this.x = xp;
  1307. this.y = yp;
  1308. }
  1309. }], [{
  1310. key: "parse",
  1311. value: function parse(point) {
  1312. var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  1313. var _toNumbers = toNumbers(point),
  1314. _toNumbers2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers, 2),
  1315. _toNumbers2$ = _toNumbers2[0],
  1316. x = _toNumbers2$ === void 0 ? defaultValue : _toNumbers2$,
  1317. _toNumbers2$2 = _toNumbers2[1],
  1318. y = _toNumbers2$2 === void 0 ? defaultValue : _toNumbers2$2;
  1319. return new Point(x, y);
  1320. }
  1321. }, {
  1322. key: "parseScale",
  1323. value: function parseScale(scale) {
  1324. var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  1325. var _toNumbers3 = toNumbers(scale),
  1326. _toNumbers4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_toNumbers3, 2),
  1327. _toNumbers4$ = _toNumbers4[0],
  1328. x = _toNumbers4$ === void 0 ? defaultValue : _toNumbers4$,
  1329. _toNumbers4$2 = _toNumbers4[1],
  1330. y = _toNumbers4$2 === void 0 ? x : _toNumbers4$2;
  1331. return new Point(x, y);
  1332. }
  1333. }, {
  1334. key: "parsePath",
  1335. value: function parsePath(path) {
  1336. var points = toNumbers(path);
  1337. var len = points.length;
  1338. var pathPoints = [];
  1339. for (var i = 0; i < len; i += 2) {
  1340. pathPoints.push(new Point(points[i], points[i + 1]));
  1341. }
  1342. return pathPoints;
  1343. }
  1344. }]);
  1345. return Point;
  1346. }();
  1347. var Mouse = /*#__PURE__*/function () {
  1348. function Mouse(screen) {
  1349. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Mouse);
  1350. this.screen = screen;
  1351. this.working = false;
  1352. this.events = [];
  1353. this.eventElements = [];
  1354. this.onClick = this.onClick.bind(this);
  1355. this.onMouseMove = this.onMouseMove.bind(this);
  1356. }
  1357. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Mouse, [{
  1358. key: "isWorking",
  1359. value: function isWorking() {
  1360. return this.working;
  1361. }
  1362. }, {
  1363. key: "start",
  1364. value: function start() {
  1365. if (this.working) {
  1366. return;
  1367. }
  1368. var screen = this.screen,
  1369. onClick = this.onClick,
  1370. onMouseMove = this.onMouseMove;
  1371. var canvas = screen.ctx.canvas;
  1372. canvas.onclick = onClick;
  1373. canvas.onmousemove = onMouseMove;
  1374. this.working = true;
  1375. }
  1376. }, {
  1377. key: "stop",
  1378. value: function stop() {
  1379. if (!this.working) {
  1380. return;
  1381. }
  1382. var canvas = this.screen.ctx.canvas;
  1383. this.working = false;
  1384. canvas.onclick = null;
  1385. canvas.onmousemove = null;
  1386. }
  1387. }, {
  1388. key: "hasEvents",
  1389. value: function hasEvents() {
  1390. return this.working && this.events.length > 0;
  1391. }
  1392. }, {
  1393. key: "runEvents",
  1394. value: function runEvents() {
  1395. if (!this.working) {
  1396. return;
  1397. }
  1398. var document = this.screen,
  1399. events = this.events,
  1400. eventElements = this.eventElements;
  1401. var style = document.ctx.canvas.style;
  1402. if (style) {
  1403. style.cursor = '';
  1404. }
  1405. events.forEach(function (_ref, i) {
  1406. var run = _ref.run;
  1407. var element = eventElements[i];
  1408. while (element) {
  1409. run(element);
  1410. element = element.parent;
  1411. }
  1412. }); // done running, clear
  1413. this.events = [];
  1414. this.eventElements = [];
  1415. }
  1416. }, {
  1417. key: "checkPath",
  1418. value: function checkPath(element, ctx) {
  1419. if (!this.working || !ctx) {
  1420. return;
  1421. }
  1422. var events = this.events,
  1423. eventElements = this.eventElements;
  1424. events.forEach(function (_ref2, i) {
  1425. var x = _ref2.x,
  1426. y = _ref2.y;
  1427. if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
  1428. eventElements[i] = element;
  1429. }
  1430. });
  1431. }
  1432. }, {
  1433. key: "checkBoundingBox",
  1434. value: function checkBoundingBox(element, boundingBox) {
  1435. if (!this.working || !boundingBox) {
  1436. return;
  1437. }
  1438. var events = this.events,
  1439. eventElements = this.eventElements;
  1440. events.forEach(function (_ref3, i) {
  1441. var x = _ref3.x,
  1442. y = _ref3.y;
  1443. if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
  1444. eventElements[i] = element;
  1445. }
  1446. });
  1447. }
  1448. }, {
  1449. key: "mapXY",
  1450. value: function mapXY(x, y) {
  1451. var _this$screen = this.screen,
  1452. window = _this$screen.window,
  1453. ctx = _this$screen.ctx;
  1454. var point = new Point(x, y);
  1455. var element = ctx.canvas;
  1456. while (element) {
  1457. point.x -= element.offsetLeft;
  1458. point.y -= element.offsetTop;
  1459. element = element.offsetParent;
  1460. }
  1461. if (window.scrollX) {
  1462. point.x += window.scrollX;
  1463. }
  1464. if (window.scrollY) {
  1465. point.y += window.scrollY;
  1466. }
  1467. return point;
  1468. }
  1469. }, {
  1470. key: "onClick",
  1471. value: function onClick(evt) {
  1472. var _this$mapXY = this.mapXY((evt || event).clientX, (evt || event).clientY),
  1473. x = _this$mapXY.x,
  1474. y = _this$mapXY.y;
  1475. this.events.push({
  1476. type: 'onclick',
  1477. x: x,
  1478. y: y,
  1479. run: function run(event) {
  1480. if (event.onClick) {
  1481. event.onClick();
  1482. }
  1483. }
  1484. });
  1485. }
  1486. }, {
  1487. key: "onMouseMove",
  1488. value: function onMouseMove(evt) {
  1489. var _this$mapXY2 = this.mapXY((evt || event).clientX, (evt || event).clientY),
  1490. x = _this$mapXY2.x,
  1491. y = _this$mapXY2.y;
  1492. this.events.push({
  1493. type: 'onmousemove',
  1494. x: x,
  1495. y: y,
  1496. run: function run(event) {
  1497. if (event.onMouseMove) {
  1498. event.onMouseMove();
  1499. }
  1500. }
  1501. });
  1502. }
  1503. }]);
  1504. return Mouse;
  1505. }();
  1506. var defaultWindow = typeof window !== 'undefined' ? window : null;
  1507. var defaultFetch = typeof fetch !== 'undefined' ? fetch.bind(void 0) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
  1508. : null;
  1509. var Screen = /*#__PURE__*/function () {
  1510. function Screen(ctx) {
  1511. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  1512. _ref$fetch = _ref.fetch,
  1513. fetch = _ref$fetch === void 0 ? defaultFetch : _ref$fetch,
  1514. _ref$window = _ref.window,
  1515. window = _ref$window === void 0 ? defaultWindow : _ref$window;
  1516. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Screen);
  1517. this.ctx = ctx;
  1518. this.FRAMERATE = 30;
  1519. this.MAX_VIRTUAL_PIXELS = 30000;
  1520. this.CLIENT_WIDTH = 800;
  1521. this.CLIENT_HEIGHT = 600;
  1522. this.viewPort = new ViewPort();
  1523. this.mouse = new Mouse(this);
  1524. this.animations = [];
  1525. this.waits = [];
  1526. this.frameDuration = 0;
  1527. this.isReadyLock = false;
  1528. this.isFirstRender = true;
  1529. this.intervalId = null;
  1530. this.window = window;
  1531. this.fetch = fetch;
  1532. }
  1533. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Screen, [{
  1534. key: "wait",
  1535. value: function wait(checker) {
  1536. this.waits.push(checker);
  1537. }
  1538. }, {
  1539. key: "ready",
  1540. value: function ready() {
  1541. if (!this.readyPromise) {
  1542. return Promise.resolve();
  1543. }
  1544. return this.readyPromise;
  1545. }
  1546. }, {
  1547. key: "isReady",
  1548. value: function isReady() {
  1549. if (this.isReadyLock) {
  1550. return true;
  1551. }
  1552. var isReadyLock = this.waits.every(function (_) {
  1553. return _();
  1554. });
  1555. if (isReadyLock) {
  1556. this.waits = [];
  1557. if (this.resolveReady) {
  1558. this.resolveReady();
  1559. }
  1560. }
  1561. this.isReadyLock = isReadyLock;
  1562. return isReadyLock;
  1563. }
  1564. }, {
  1565. key: "setDefaults",
  1566. value: function setDefaults(ctx) {
  1567. // initial values and defaults
  1568. ctx.strokeStyle = 'rgba(0,0,0,0)';
  1569. ctx.lineCap = 'butt';
  1570. ctx.lineJoin = 'miter';
  1571. ctx.miterLimit = 4;
  1572. }
  1573. }, {
  1574. key: "setViewBox",
  1575. value: function setViewBox(_ref2) {
  1576. var document = _ref2.document,
  1577. ctx = _ref2.ctx,
  1578. aspectRatio = _ref2.aspectRatio,
  1579. width = _ref2.width,
  1580. desiredWidth = _ref2.desiredWidth,
  1581. height = _ref2.height,
  1582. desiredHeight = _ref2.desiredHeight,
  1583. _ref2$minX = _ref2.minX,
  1584. minX = _ref2$minX === void 0 ? 0 : _ref2$minX,
  1585. _ref2$minY = _ref2.minY,
  1586. minY = _ref2$minY === void 0 ? 0 : _ref2$minY,
  1587. refX = _ref2.refX,
  1588. refY = _ref2.refY,
  1589. _ref2$clip = _ref2.clip,
  1590. clip = _ref2$clip === void 0 ? false : _ref2$clip,
  1591. _ref2$clipX = _ref2.clipX,
  1592. clipX = _ref2$clipX === void 0 ? 0 : _ref2$clipX,
  1593. _ref2$clipY = _ref2.clipY,
  1594. clipY = _ref2$clipY === void 0 ? 0 : _ref2$clipY;
  1595. // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
  1596. var cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
  1597. var _cleanAspectRatio$spl = cleanAspectRatio.split(' '),
  1598. _cleanAspectRatio$spl2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_cleanAspectRatio$spl, 2),
  1599. aspectRatioAlign = _cleanAspectRatio$spl2[0],
  1600. aspectRatioMeetOrSlice = _cleanAspectRatio$spl2[1];
  1601. var align = aspectRatioAlign || 'xMidYMid';
  1602. var meetOrSlice = aspectRatioMeetOrSlice || 'meet'; // calculate scale
  1603. var scaleX = width / desiredWidth;
  1604. var scaleY = height / desiredHeight;
  1605. var scaleMin = Math.min(scaleX, scaleY);
  1606. var scaleMax = Math.max(scaleX, scaleY);
  1607. var finalDesiredWidth = desiredWidth;
  1608. var finalDesiredHeight = desiredHeight;
  1609. if (meetOrSlice === 'meet') {
  1610. finalDesiredWidth *= scaleMin;
  1611. finalDesiredHeight *= scaleMin;
  1612. }
  1613. if (meetOrSlice === 'slice') {
  1614. finalDesiredWidth *= scaleMax;
  1615. finalDesiredHeight *= scaleMax;
  1616. }
  1617. var refXProp = new Property(document, 'refX', refX);
  1618. var refYProp = new Property(document, 'refY', refY);
  1619. var hasRefs = refXProp.hasValue() && refYProp.hasValue();
  1620. if (hasRefs) {
  1621. ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
  1622. }
  1623. if (clip) {
  1624. var scaledClipX = scaleMin * clipX;
  1625. var scaledClipY = scaleMin * clipY;
  1626. ctx.beginPath();
  1627. ctx.moveTo(scaledClipX, scaledClipY);
  1628. ctx.lineTo(width, scaledClipY);
  1629. ctx.lineTo(width, height);
  1630. ctx.lineTo(scaledClipX, height);
  1631. ctx.closePath();
  1632. ctx.clip();
  1633. }
  1634. if (!hasRefs) {
  1635. var isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
  1636. var isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
  1637. var isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
  1638. var isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
  1639. if (/^xMid/.test(align) && (isMeetMinY || isSliceMaxY)) {
  1640. ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
  1641. }
  1642. if (/YMid$/.test(align) && (isMeetMinX || isSliceMaxX)) {
  1643. ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
  1644. }
  1645. if (/^xMax/.test(align) && (isMeetMinY || isSliceMaxY)) {
  1646. ctx.translate(width - finalDesiredWidth, 0);
  1647. }
  1648. if (/YMax$/.test(align) && (isMeetMinX || isSliceMaxX)) {
  1649. ctx.translate(0, height - finalDesiredHeight);
  1650. }
  1651. } // scale
  1652. switch (true) {
  1653. case align === 'none':
  1654. ctx.scale(scaleX, scaleY);
  1655. break;
  1656. case meetOrSlice === 'meet':
  1657. ctx.scale(scaleMin, scaleMin);
  1658. break;
  1659. case meetOrSlice === 'slice':
  1660. ctx.scale(scaleMax, scaleMax);
  1661. break;
  1662. } // translate
  1663. ctx.translate(-minX, -minY);
  1664. }
  1665. }, {
  1666. key: "start",
  1667. value: function start(element) {
  1668. var _this = this;
  1669. var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  1670. _ref3$enableRedraw = _ref3.enableRedraw,
  1671. enableRedraw = _ref3$enableRedraw === void 0 ? false : _ref3$enableRedraw,
  1672. _ref3$ignoreMouse = _ref3.ignoreMouse,
  1673. ignoreMouse = _ref3$ignoreMouse === void 0 ? false : _ref3$ignoreMouse,
  1674. _ref3$ignoreAnimation = _ref3.ignoreAnimation,
  1675. ignoreAnimation = _ref3$ignoreAnimation === void 0 ? false : _ref3$ignoreAnimation,
  1676. _ref3$ignoreDimension = _ref3.ignoreDimensions,
  1677. ignoreDimensions = _ref3$ignoreDimension === void 0 ? false : _ref3$ignoreDimension,
  1678. _ref3$ignoreClear = _ref3.ignoreClear,
  1679. ignoreClear = _ref3$ignoreClear === void 0 ? false : _ref3$ignoreClear,
  1680. forceRedraw = _ref3.forceRedraw,
  1681. scaleWidth = _ref3.scaleWidth,
  1682. scaleHeight = _ref3.scaleHeight,
  1683. offsetX = _ref3.offsetX,
  1684. offsetY = _ref3.offsetY;
  1685. var FRAMERATE = this.FRAMERATE,
  1686. mouse = this.mouse;
  1687. var frameDuration = 1000 / FRAMERATE;
  1688. this.frameDuration = frameDuration;
  1689. this.readyPromise = new Promise(function (resolve) {
  1690. _this.resolveReady = resolve;
  1691. });
  1692. if (this.isReady()) {
  1693. this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
  1694. }
  1695. if (!enableRedraw) {
  1696. return;
  1697. }
  1698. var now = Date.now();
  1699. var then = now;
  1700. var delta = 0;
  1701. var tick = function tick() {
  1702. now = Date.now();
  1703. delta = now - then;
  1704. if (delta >= frameDuration) {
  1705. then = now - delta % frameDuration;
  1706. if (_this.shouldUpdate(ignoreAnimation, forceRedraw)) {
  1707. _this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
  1708. mouse.runEvents();
  1709. }
  1710. }
  1711. _this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
  1712. };
  1713. if (!ignoreMouse) {
  1714. mouse.start();
  1715. }
  1716. this.intervalId = raf__WEBPACK_IMPORTED_MODULE_25___default()(tick);
  1717. }
  1718. }, {
  1719. key: "stop",
  1720. value: function stop() {
  1721. if (this.intervalId) {
  1722. raf__WEBPACK_IMPORTED_MODULE_25___default().cancel(this.intervalId);
  1723. this.intervalId = null;
  1724. }
  1725. this.mouse.stop();
  1726. }
  1727. }, {
  1728. key: "shouldUpdate",
  1729. value: function shouldUpdate(ignoreAnimation, forceRedraw) {
  1730. // need update from animations?
  1731. if (!ignoreAnimation) {
  1732. var frameDuration = this.frameDuration;
  1733. var shouldUpdate = this.animations.reduce(function (shouldUpdate, animation) {
  1734. return animation.update(frameDuration) || shouldUpdate;
  1735. }, false);
  1736. if (shouldUpdate) {
  1737. return true;
  1738. }
  1739. } // need update from redraw?
  1740. if (typeof forceRedraw === 'function' && forceRedraw()) {
  1741. return true;
  1742. }
  1743. if (!this.isReadyLock && this.isReady()) {
  1744. return true;
  1745. } // need update from mouse events?
  1746. if (this.mouse.hasEvents()) {
  1747. return true;
  1748. }
  1749. return false;
  1750. }
  1751. }, {
  1752. key: "render",
  1753. value: function render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
  1754. var CLIENT_WIDTH = this.CLIENT_WIDTH,
  1755. CLIENT_HEIGHT = this.CLIENT_HEIGHT,
  1756. viewPort = this.viewPort,
  1757. ctx = this.ctx,
  1758. isFirstRender = this.isFirstRender;
  1759. var canvas = ctx.canvas;
  1760. viewPort.clear();
  1761. if (canvas.width && canvas.height) {
  1762. viewPort.setCurrent(canvas.width, canvas.height);
  1763. } else {
  1764. viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
  1765. }
  1766. var widthStyle = element.getStyle('width');
  1767. var heightStyle = element.getStyle('height');
  1768. if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
  1769. // set canvas size
  1770. if (widthStyle.hasValue()) {
  1771. canvas.width = widthStyle.getPixels('x');
  1772. if (canvas.style) {
  1773. canvas.style.width = "".concat(canvas.width, "px");
  1774. }
  1775. }
  1776. if (heightStyle.hasValue()) {
  1777. canvas.height = heightStyle.getPixels('y');
  1778. if (canvas.style) {
  1779. canvas.style.height = "".concat(canvas.height, "px");
  1780. }
  1781. }
  1782. }
  1783. var cWidth = canvas.clientWidth || canvas.width;
  1784. var cHeight = canvas.clientHeight || canvas.height;
  1785. if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
  1786. cWidth = widthStyle.getPixels('x');
  1787. cHeight = heightStyle.getPixels('y');
  1788. }
  1789. viewPort.setCurrent(cWidth, cHeight);
  1790. if (typeof offsetX === 'number') {
  1791. element.getAttribute('x', true).setValue(offsetX);
  1792. }
  1793. if (typeof offsetY === 'number') {
  1794. element.getAttribute('y', true).setValue(offsetY);
  1795. }
  1796. if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {
  1797. var viewBox = toNumbers(element.getAttribute('viewBox').getString());
  1798. var xRatio = 0;
  1799. var yRatio = 0;
  1800. if (typeof scaleWidth === 'number') {
  1801. var _widthStyle = element.getStyle('width');
  1802. if (_widthStyle.hasValue()) {
  1803. xRatio = _widthStyle.getPixels('x') / scaleWidth;
  1804. } else if (!isNaN(viewBox[2])) {
  1805. xRatio = viewBox[2] / scaleWidth;
  1806. }
  1807. }
  1808. if (typeof scaleHeight === 'number') {
  1809. var _heightStyle = element.getStyle('height');
  1810. if (_heightStyle.hasValue()) {
  1811. yRatio = _heightStyle.getPixels('y') / scaleHeight;
  1812. } else if (!isNaN(viewBox[3])) {
  1813. yRatio = viewBox[3] / scaleHeight;
  1814. }
  1815. }
  1816. if (!xRatio) {
  1817. xRatio = yRatio;
  1818. }
  1819. if (!yRatio) {
  1820. yRatio = xRatio;
  1821. }
  1822. element.getAttribute('width', true).setValue(scaleWidth);
  1823. element.getAttribute('height', true).setValue(scaleHeight);
  1824. var transformStyle = element.getStyle('transform', true, true);
  1825. transformStyle.setValue("".concat(transformStyle.getString(), " scale(").concat(1.0 / xRatio, ", ").concat(1.0 / yRatio, ")"));
  1826. } // clear and render
  1827. if (!ignoreClear) {
  1828. ctx.clearRect(0, 0, cWidth, cHeight);
  1829. }
  1830. element.render(ctx);
  1831. if (isFirstRender) {
  1832. this.isFirstRender = false;
  1833. }
  1834. }
  1835. }]);
  1836. return Screen;
  1837. }();
  1838. Screen.defaultWindow = defaultWindow;
  1839. Screen.defaultFetch = defaultFetch;
  1840. var defaultFetch$1 = Screen.defaultFetch;
  1841. var DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : null;
  1842. var Parser = /*#__PURE__*/function () {
  1843. function Parser() {
  1844. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  1845. _ref$fetch = _ref.fetch,
  1846. fetch = _ref$fetch === void 0 ? defaultFetch$1 : _ref$fetch,
  1847. _ref$DOMParser = _ref.DOMParser,
  1848. DOMParser = _ref$DOMParser === void 0 ? DefaultDOMParser : _ref$DOMParser;
  1849. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Parser);
  1850. this.fetch = fetch;
  1851. this.DOMParser = DOMParser;
  1852. }
  1853. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Parser, [{
  1854. key: "parse",
  1855. value: function () {
  1856. 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) {
  1857. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  1858. while (1) {
  1859. switch (_context.prev = _context.next) {
  1860. case 0:
  1861. if (!/^</.test(resource)) {
  1862. _context.next = 2;
  1863. break;
  1864. }
  1865. return _context.abrupt("return", this.parseFromString(resource));
  1866. case 2:
  1867. return _context.abrupt("return", this.load(resource));
  1868. case 3:
  1869. case "end":
  1870. return _context.stop();
  1871. }
  1872. }
  1873. }, _callee, this);
  1874. }));
  1875. function parse(_x) {
  1876. return _parse.apply(this, arguments);
  1877. }
  1878. return parse;
  1879. }()
  1880. }, {
  1881. key: "parseFromString",
  1882. value: function parseFromString(xml) {
  1883. var parser = new this.DOMParser();
  1884. try {
  1885. return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
  1886. } catch (err) {
  1887. return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
  1888. }
  1889. }
  1890. }, {
  1891. key: "checkDocument",
  1892. value: function checkDocument(document) {
  1893. var parserError = document.getElementsByTagName('parsererror')[0];
  1894. if (parserError) {
  1895. throw new Error(parserError.textContent);
  1896. }
  1897. return document;
  1898. }
  1899. }, {
  1900. key: "load",
  1901. value: function () {
  1902. 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) {
  1903. var response, xml;
  1904. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  1905. while (1) {
  1906. switch (_context2.prev = _context2.next) {
  1907. case 0:
  1908. _context2.next = 2;
  1909. return this.fetch(url);
  1910. case 2:
  1911. response = _context2.sent;
  1912. _context2.next = 5;
  1913. return response.text();
  1914. case 5:
  1915. xml = _context2.sent;
  1916. return _context2.abrupt("return", this.parseFromString(xml));
  1917. case 7:
  1918. case "end":
  1919. return _context2.stop();
  1920. }
  1921. }
  1922. }, _callee2, this);
  1923. }));
  1924. function load(_x2) {
  1925. return _load.apply(this, arguments);
  1926. }
  1927. return load;
  1928. }()
  1929. }]);
  1930. return Parser;
  1931. }();
  1932. var Translate = /*#__PURE__*/function () {
  1933. function Translate(_, point) {
  1934. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Translate);
  1935. this.type = 'translate';
  1936. this.point = null;
  1937. this.point = Point.parse(point);
  1938. }
  1939. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Translate, [{
  1940. key: "apply",
  1941. value: function apply(ctx) {
  1942. var _this$point = this.point,
  1943. x = _this$point.x,
  1944. y = _this$point.y;
  1945. ctx.translate(x || 0.0, y || 0.0);
  1946. }
  1947. }, {
  1948. key: "unapply",
  1949. value: function unapply(ctx) {
  1950. var _this$point2 = this.point,
  1951. x = _this$point2.x,
  1952. y = _this$point2.y;
  1953. ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
  1954. }
  1955. }, {
  1956. key: "applyToPoint",
  1957. value: function applyToPoint(point) {
  1958. var _this$point3 = this.point,
  1959. x = _this$point3.x,
  1960. y = _this$point3.y;
  1961. point.applyTransform([1, 0, 0, 1, x || 0.0, y || 0.0]);
  1962. }
  1963. }]);
  1964. return Translate;
  1965. }();
  1966. var Rotate = /*#__PURE__*/function () {
  1967. function Rotate(document, rotate) {
  1968. var transformOrigin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1969. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Rotate);
  1970. this.type = 'rotate';
  1971. this.angle = null;
  1972. this.cx = 0;
  1973. this.cy = 0;
  1974. var numbers = toNumbers(rotate);
  1975. this.angle = new Property(document, 'angle', numbers[0]);
  1976. this.cx = (numbers[1] || 0) + (transformOrigin[0] || 0);
  1977. this.cy = (numbers[2] || 0) + (transformOrigin[1] || 0);
  1978. }
  1979. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Rotate, [{
  1980. key: "apply",
  1981. value: function apply(ctx) {
  1982. var cx = this.cx,
  1983. cy = this.cy,
  1984. angle = this.angle;
  1985. ctx.translate(cx, cy);
  1986. ctx.rotate(angle.getRadians());
  1987. ctx.translate(-cx, -cy);
  1988. }
  1989. }, {
  1990. key: "unapply",
  1991. value: function unapply(ctx) {
  1992. var cx = this.cx,
  1993. cy = this.cy,
  1994. angle = this.angle;
  1995. ctx.translate(cx, cy);
  1996. ctx.rotate(-1.0 * angle.getRadians());
  1997. ctx.translate(-cx, -cy);
  1998. }
  1999. }, {
  2000. key: "applyToPoint",
  2001. value: function applyToPoint(point) {
  2002. var cx = this.cx,
  2003. cy = this.cy,
  2004. angle = this.angle;
  2005. var rad = angle.getRadians();
  2006. point.applyTransform([1, 0, 0, 1, cx || 0.0, cy || 0.0 // this.p.y
  2007. ]);
  2008. point.applyTransform([Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0]);
  2009. point.applyTransform([1, 0, 0, 1, -cx || 0.0, -cy || 0.0 // -this.p.y
  2010. ]);
  2011. }
  2012. }]);
  2013. return Rotate;
  2014. }();
  2015. var Scale = /*#__PURE__*/function () {
  2016. function Scale(_, scale) {
  2017. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Scale);
  2018. this.type = 'scale';
  2019. this.scale = null;
  2020. var scaleSize = Point.parseScale(scale); // Workaround for node-canvas
  2021. if (scaleSize.x === 0 || scaleSize.y === 0) {
  2022. scaleSize.x = PSEUDO_ZERO;
  2023. scaleSize.y = PSEUDO_ZERO;
  2024. }
  2025. this.scale = scaleSize;
  2026. }
  2027. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Scale, [{
  2028. key: "apply",
  2029. value: function apply(ctx) {
  2030. var _this$scale = this.scale,
  2031. x = _this$scale.x,
  2032. y = _this$scale.y;
  2033. ctx.scale(x, y || x);
  2034. }
  2035. }, {
  2036. key: "unapply",
  2037. value: function unapply(ctx) {
  2038. var _this$scale2 = this.scale,
  2039. x = _this$scale2.x,
  2040. y = _this$scale2.y;
  2041. ctx.scale(1.0 / x, 1.0 / y || x);
  2042. }
  2043. }, {
  2044. key: "applyToPoint",
  2045. value: function applyToPoint(point) {
  2046. var _this$scale3 = this.scale,
  2047. x = _this$scale3.x,
  2048. y = _this$scale3.y;
  2049. point.applyTransform([x || 0.0, 0, 0, y || 0.0, 0, 0]);
  2050. }
  2051. }]);
  2052. return Scale;
  2053. }();
  2054. var Matrix = /*#__PURE__*/function () {
  2055. function Matrix(_, matrix) {
  2056. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Matrix);
  2057. this.type = 'matrix';
  2058. this.matrix = [];
  2059. this.matrix = toNumbers(matrix);
  2060. }
  2061. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Matrix, [{
  2062. key: "apply",
  2063. value: function apply(ctx) {
  2064. var matrix = this.matrix;
  2065. ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
  2066. }
  2067. }, {
  2068. key: "unapply",
  2069. value: function unapply(ctx) {
  2070. var matrix = this.matrix;
  2071. var a = matrix[0];
  2072. var b = matrix[2];
  2073. var c = matrix[4];
  2074. var d = matrix[1];
  2075. var e = matrix[3];
  2076. var f = matrix[5];
  2077. var g = 0.0;
  2078. var h = 0.0;
  2079. var i = 1.0;
  2080. var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
  2081. 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));
  2082. }
  2083. }, {
  2084. key: "applyToPoint",
  2085. value: function applyToPoint(point) {
  2086. point.applyTransform(this.matrix);
  2087. }
  2088. }]);
  2089. return Matrix;
  2090. }();
  2091. 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); }; }
  2092. 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; } }
  2093. var Skew = /*#__PURE__*/function (_Matrix) {
  2094. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(Skew, _Matrix);
  2095. var _super = _createSuper(Skew);
  2096. function Skew(document, skew) {
  2097. var _this;
  2098. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Skew);
  2099. _this = _super.call(this, document, skew);
  2100. _this.type = 'skew';
  2101. _this.angle = null;
  2102. _this.angle = new Property(document, 'angle', skew);
  2103. return _this;
  2104. }
  2105. return Skew;
  2106. }(Matrix);
  2107. 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); }; }
  2108. 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; } }
  2109. var SkewX = /*#__PURE__*/function (_Skew) {
  2110. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewX, _Skew);
  2111. var _super = _createSuper$1(SkewX);
  2112. function SkewX(document, skew) {
  2113. var _this;
  2114. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewX);
  2115. _this = _super.call(this, document, skew);
  2116. _this.type = 'skewX';
  2117. _this.matrix = [1, 0, Math.tan(_this.angle.getRadians()), 1, 0, 0];
  2118. return _this;
  2119. }
  2120. return SkewX;
  2121. }(Skew);
  2122. 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); }; }
  2123. 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; } }
  2124. var SkewY = /*#__PURE__*/function (_Skew) {
  2125. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SkewY, _Skew);
  2126. var _super = _createSuper$2(SkewY);
  2127. function SkewY(document, skew) {
  2128. var _this;
  2129. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SkewY);
  2130. _this = _super.call(this, document, skew);
  2131. _this.type = 'skewY';
  2132. _this.matrix = [1, Math.tan(_this.angle.getRadians()), 0, 1, 0, 0];
  2133. return _this;
  2134. }
  2135. return SkewY;
  2136. }(Skew);
  2137. function parseTransforms(transform) {
  2138. return compressSpaces(transform).trim().replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g, ') ').split(/\s(?=[a-z])/);
  2139. }
  2140. function parseTransform(transform) {
  2141. var _transform$split = transform.split('('),
  2142. _transform$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_transform$split, 2),
  2143. type = _transform$split2[0],
  2144. value = _transform$split2[1];
  2145. return [type.trim(), value.trim().replace(')', '')];
  2146. }
  2147. var Transform = /*#__PURE__*/function () {
  2148. function Transform(document, transform, transformOrigin) {
  2149. var _this = this;
  2150. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Transform);
  2151. this.document = document;
  2152. this.transforms = [];
  2153. var data = parseTransforms(transform);
  2154. var originCoords = transformOrigin ? toNumbers(transformOrigin) : [];
  2155. data.forEach(function (transform) {
  2156. if (transform === 'none') {
  2157. return;
  2158. }
  2159. var _parseTransform = parseTransform(transform),
  2160. _parseTransform2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_parseTransform, 2),
  2161. type = _parseTransform2[0],
  2162. value = _parseTransform2[1];
  2163. var TransformType = Transform.transformTypes[type];
  2164. if (typeof TransformType !== 'undefined') {
  2165. _this.transforms.push(new TransformType(_this.document, value, originCoords));
  2166. }
  2167. });
  2168. }
  2169. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Transform, [{
  2170. key: "apply",
  2171. value: function apply(ctx) {
  2172. var transforms = this.transforms;
  2173. var len = transforms.length;
  2174. for (var i = 0; i < len; i++) {
  2175. transforms[i].apply(ctx);
  2176. }
  2177. }
  2178. }, {
  2179. key: "unapply",
  2180. value: function unapply(ctx) {
  2181. var transforms = this.transforms;
  2182. var len = transforms.length;
  2183. for (var i = len - 1; i >= 0; i--) {
  2184. transforms[i].unapply(ctx);
  2185. }
  2186. } // TODO: applyToPoint unused ... remove?
  2187. }, {
  2188. key: "applyToPoint",
  2189. value: function applyToPoint(point) {
  2190. var transforms = this.transforms;
  2191. var len = transforms.length;
  2192. for (var i = 0; i < len; i++) {
  2193. transforms[i].applyToPoint(point);
  2194. }
  2195. }
  2196. }], [{
  2197. key: "fromElement",
  2198. value: function fromElement(document, element) {
  2199. var transformStyle = element.getStyle('transform', false, true);
  2200. var transformOriginStyle = element.getStyle('transform-origin', false, true);
  2201. if (transformStyle.hasValue()) {
  2202. return new Transform(document, transformStyle.getString(), transformOriginStyle.getString());
  2203. }
  2204. return null;
  2205. }
  2206. }]);
  2207. return Transform;
  2208. }();
  2209. Transform.transformTypes = {
  2210. translate: Translate,
  2211. rotate: Rotate,
  2212. scale: Scale,
  2213. matrix: Matrix,
  2214. skewX: SkewX,
  2215. skewY: SkewY
  2216. };
  2217. var Element = /*#__PURE__*/function () {
  2218. function Element(document, node) {
  2219. var _this = this;
  2220. var captureTextNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  2221. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Element);
  2222. this.document = document;
  2223. this.node = node;
  2224. this.captureTextNodes = captureTextNodes;
  2225. this.attributes = {};
  2226. this.styles = {};
  2227. this.stylesSpecificity = {};
  2228. this.animationFrozen = false;
  2229. this.animationFrozenValue = '';
  2230. this.parent = null;
  2231. this.children = [];
  2232. if (!node || node.nodeType !== 1) {
  2233. // ELEMENT_NODE
  2234. return;
  2235. } // add attributes
  2236. Array.from(node.attributes).forEach(function (attribute) {
  2237. var nodeName = normalizeAttributeName(attribute.nodeName);
  2238. _this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
  2239. });
  2240. this.addStylesFromStyleDefinition(); // add inline styles
  2241. if (this.getAttribute('style').hasValue()) {
  2242. var styles = this.getAttribute('style').getString().split(';').map(function (_) {
  2243. return _.trim();
  2244. });
  2245. styles.forEach(function (style) {
  2246. if (!style) {
  2247. return;
  2248. }
  2249. var _style$split$map = style.split(':').map(function (_) {
  2250. return _.trim();
  2251. }),
  2252. _style$split$map2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_style$split$map, 2),
  2253. name = _style$split$map2[0],
  2254. value = _style$split$map2[1];
  2255. _this.styles[name] = new Property(document, name, value);
  2256. });
  2257. }
  2258. var definitions = document.definitions;
  2259. var id = this.getAttribute('id'); // add id
  2260. if (id.hasValue()) {
  2261. if (!definitions[id.getValue()]) {
  2262. definitions[id.getValue()] = this;
  2263. }
  2264. }
  2265. Array.from(node.childNodes).forEach(function (childNode) {
  2266. if (childNode.nodeType === 1) {
  2267. _this.addChild(childNode); // ELEMENT_NODE
  2268. } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {
  2269. var textNode = document.createTextNode(childNode);
  2270. if (textNode.getText().length > 0) {
  2271. _this.addChild(textNode); // TEXT_NODE
  2272. }
  2273. }
  2274. });
  2275. }
  2276. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Element, [{
  2277. key: "getAttribute",
  2278. value: function getAttribute(name) {
  2279. var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2280. var attr = this.attributes[name];
  2281. if (!attr && createIfNotExists) {
  2282. var _attr = new Property(this.document, name, '');
  2283. this.attributes[name] = _attr;
  2284. return _attr;
  2285. }
  2286. return attr || Property.empty(this.document);
  2287. }
  2288. }, {
  2289. key: "getHrefAttribute",
  2290. value: function getHrefAttribute() {
  2291. for (var key in this.attributes) {
  2292. if (key === 'href' || /:href$/.test(key)) {
  2293. return this.attributes[key];
  2294. }
  2295. }
  2296. return Property.empty(this.document);
  2297. }
  2298. }, {
  2299. key: "getStyle",
  2300. value: function getStyle(name) {
  2301. var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2302. var skipAncestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  2303. var style = this.styles[name];
  2304. if (style) {
  2305. return style;
  2306. }
  2307. var attr = this.getAttribute(name);
  2308. if (attr && attr.hasValue()) {
  2309. this.styles[name] = attr; // move up to me to cache
  2310. return attr;
  2311. }
  2312. if (!skipAncestors) {
  2313. var parent = this.parent;
  2314. if (parent) {
  2315. var parentStyle = parent.getStyle(name);
  2316. if (parentStyle && parentStyle.hasValue()) {
  2317. return parentStyle;
  2318. }
  2319. }
  2320. }
  2321. if (createIfNotExists) {
  2322. var _style = new Property(this.document, name, '');
  2323. this.styles[name] = _style;
  2324. return _style;
  2325. }
  2326. return style || Property.empty(this.document);
  2327. }
  2328. }, {
  2329. key: "render",
  2330. value: function render(ctx) {
  2331. // don't render display=none
  2332. // don't render visibility=hidden
  2333. if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {
  2334. return;
  2335. }
  2336. ctx.save();
  2337. if (this.getStyle('mask').hasValue()) {
  2338. // mask
  2339. var mask = this.getStyle('mask').getDefinition();
  2340. if (mask) {
  2341. this.applyEffects(ctx);
  2342. mask.apply(ctx, this);
  2343. }
  2344. } else if (this.getStyle('filter').getValue('none') !== 'none') {
  2345. // filter
  2346. var filter = this.getStyle('filter').getDefinition();
  2347. if (filter) {
  2348. this.applyEffects(ctx);
  2349. filter.apply(ctx, this);
  2350. }
  2351. } else {
  2352. this.setContext(ctx);
  2353. this.renderChildren(ctx);
  2354. this.clearContext(ctx);
  2355. }
  2356. ctx.restore();
  2357. }
  2358. }, {
  2359. key: "setContext",
  2360. value: function setContext(_) {}
  2361. }, {
  2362. key: "applyEffects",
  2363. value: function applyEffects(ctx) {
  2364. // transform
  2365. var transform = Transform.fromElement(this.document, this);
  2366. if (transform) {
  2367. transform.apply(ctx);
  2368. } // clip
  2369. var clipPathStyleProp = this.getStyle('clip-path', false, true);
  2370. if (clipPathStyleProp.hasValue()) {
  2371. var clip = clipPathStyleProp.getDefinition();
  2372. if (clip) {
  2373. clip.apply(ctx);
  2374. }
  2375. }
  2376. }
  2377. }, {
  2378. key: "clearContext",
  2379. value: function clearContext(_) {}
  2380. }, {
  2381. key: "renderChildren",
  2382. value: function renderChildren(ctx) {
  2383. this.children.forEach(function (child) {
  2384. child.render(ctx);
  2385. });
  2386. }
  2387. }, {
  2388. key: "addChild",
  2389. value: function addChild(childNode) {
  2390. var child = childNode instanceof Element ? childNode : this.document.createElement(childNode);
  2391. child.parent = this;
  2392. if (!Element.ignoreChildTypes.includes(child.type)) {
  2393. this.children.push(child);
  2394. }
  2395. }
  2396. }, {
  2397. key: "matchesSelector",
  2398. value: function matchesSelector(selector) {
  2399. var node = this.node;
  2400. if (typeof node.matches === 'function') {
  2401. return node.matches(selector);
  2402. }
  2403. var styleClasses = node.getAttribute('class');
  2404. if (!styleClasses || styleClasses === '') {
  2405. return false;
  2406. }
  2407. return styleClasses.split(' ').some(function (styleClass) {
  2408. if (".".concat(styleClass) === selector) {
  2409. return true;
  2410. }
  2411. });
  2412. }
  2413. }, {
  2414. key: "addStylesFromStyleDefinition",
  2415. value: function addStylesFromStyleDefinition() {
  2416. var _this$document = this.document,
  2417. styles = _this$document.styles,
  2418. stylesSpecificity = _this$document.stylesSpecificity;
  2419. for (var selector in styles) {
  2420. if (selector[0] !== '@' && this.matchesSelector(selector)) {
  2421. var style = styles[selector];
  2422. var specificity = stylesSpecificity[selector];
  2423. if (style) {
  2424. for (var name in style) {
  2425. var existingSpecificity = this.stylesSpecificity[name];
  2426. if (typeof existingSpecificity === 'undefined') {
  2427. existingSpecificity = '000';
  2428. }
  2429. if (specificity >= existingSpecificity) {
  2430. this.styles[name] = style[name];
  2431. this.stylesSpecificity[name] = specificity;
  2432. }
  2433. }
  2434. }
  2435. }
  2436. }
  2437. }
  2438. }, {
  2439. key: "removeStyles",
  2440. value: function removeStyles(element, ignoreStyles) {
  2441. var toRestore = ignoreStyles.reduce(function (toRestore, name) {
  2442. var styleProp = element.getStyle(name);
  2443. if (!styleProp.hasValue()) {
  2444. return toRestore;
  2445. }
  2446. var value = styleProp.getString();
  2447. styleProp.setValue('');
  2448. return [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_39__.default)(toRestore), [[name, value]]);
  2449. }, []);
  2450. return toRestore;
  2451. }
  2452. }, {
  2453. key: "restoreStyles",
  2454. value: function restoreStyles(element, styles) {
  2455. styles.forEach(function (_ref) {
  2456. var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_ref, 2),
  2457. name = _ref2[0],
  2458. value = _ref2[1];
  2459. element.getStyle(name, true).setValue(value);
  2460. });
  2461. }
  2462. }]);
  2463. return Element;
  2464. }();
  2465. Element.ignoreChildTypes = ['title'];
  2466. 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); }; }
  2467. 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; } }
  2468. var UnknownElement = /*#__PURE__*/function (_Element) {
  2469. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UnknownElement, _Element);
  2470. var _super = _createSuper$3(UnknownElement);
  2471. function UnknownElement(document, node, captureTextNodes) {
  2472. var _this;
  2473. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UnknownElement);
  2474. _this = _super.call(this, document, node, captureTextNodes);
  2475. return _this;
  2476. }
  2477. return UnknownElement;
  2478. }(Element);
  2479. function wrapFontFamily(fontFamily) {
  2480. var trimmed = fontFamily.trim();
  2481. return /^('|")/.test(trimmed) ? trimmed : "\"".concat(trimmed, "\"");
  2482. }
  2483. function prepareFontFamily(fontFamily) {
  2484. return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
  2485. }
  2486. /**
  2487. * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
  2488. */
  2489. function prepareFontStyle(fontStyle) {
  2490. if (!fontStyle) {
  2491. return '';
  2492. }
  2493. var targetFontStyle = fontStyle.trim().toLowerCase();
  2494. switch (targetFontStyle) {
  2495. case 'normal':
  2496. case 'italic':
  2497. case 'oblique':
  2498. case 'inherit':
  2499. case 'initial':
  2500. case 'unset':
  2501. return targetFontStyle;
  2502. default:
  2503. if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
  2504. return targetFontStyle;
  2505. }
  2506. return '';
  2507. }
  2508. }
  2509. /**
  2510. * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
  2511. */
  2512. function prepareFontWeight(fontWeight) {
  2513. if (!fontWeight) {
  2514. return '';
  2515. }
  2516. var targetFontWeight = fontWeight.trim().toLowerCase();
  2517. switch (targetFontWeight) {
  2518. case 'normal':
  2519. case 'bold':
  2520. case 'lighter':
  2521. case 'bolder':
  2522. case 'inherit':
  2523. case 'initial':
  2524. case 'unset':
  2525. return targetFontWeight;
  2526. default:
  2527. if (/^[\d.]+$/.test(targetFontWeight)) {
  2528. return targetFontWeight;
  2529. }
  2530. return '';
  2531. }
  2532. }
  2533. var Font = /*#__PURE__*/function () {
  2534. function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
  2535. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Font);
  2536. var inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};
  2537. this.fontFamily = fontFamily || inheritFont.fontFamily;
  2538. this.fontSize = fontSize || inheritFont.fontSize;
  2539. this.fontStyle = fontStyle || inheritFont.fontStyle;
  2540. this.fontWeight = fontWeight || inheritFont.fontWeight;
  2541. this.fontVariant = fontVariant || inheritFont.fontVariant;
  2542. }
  2543. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Font, [{
  2544. key: "toString",
  2545. value: function toString() {
  2546. return [prepareFontStyle(this.fontStyle), this.fontVariant, prepareFontWeight(this.fontWeight), this.fontSize, // Wrap fontFamily only on nodejs and only for canvas.ctx
  2547. prepareFontFamily(this.fontFamily)].join(' ').trim();
  2548. }
  2549. }], [{
  2550. key: "parse",
  2551. value: function parse() {
  2552. var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  2553. var inherit = arguments.length > 1 ? arguments[1] : undefined;
  2554. var fontStyle = '';
  2555. var fontVariant = '';
  2556. var fontWeight = '';
  2557. var fontSize = '';
  2558. var fontFamily = '';
  2559. var parts = compressSpaces(font).trim().split(' ');
  2560. var set = {
  2561. fontSize: false,
  2562. fontStyle: false,
  2563. fontWeight: false,
  2564. fontVariant: false
  2565. };
  2566. parts.forEach(function (part) {
  2567. switch (true) {
  2568. case !set.fontStyle && Font.styles.includes(part):
  2569. if (part !== 'inherit') {
  2570. fontStyle = part;
  2571. }
  2572. set.fontStyle = true;
  2573. break;
  2574. case !set.fontVariant && Font.variants.includes(part):
  2575. if (part !== 'inherit') {
  2576. fontVariant = part;
  2577. }
  2578. set.fontStyle = true;
  2579. set.fontVariant = true;
  2580. break;
  2581. case !set.fontWeight && Font.weights.includes(part):
  2582. if (part !== 'inherit') {
  2583. fontWeight = part;
  2584. }
  2585. set.fontStyle = true;
  2586. set.fontVariant = true;
  2587. set.fontWeight = true;
  2588. break;
  2589. case !set.fontSize:
  2590. if (part !== 'inherit') {
  2591. var _part$split = part.split('/');
  2592. var _part$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_part$split, 1);
  2593. fontSize = _part$split2[0];
  2594. }
  2595. set.fontStyle = true;
  2596. set.fontVariant = true;
  2597. set.fontWeight = true;
  2598. set.fontSize = true;
  2599. break;
  2600. default:
  2601. if (part !== 'inherit') {
  2602. fontFamily += part;
  2603. }
  2604. }
  2605. });
  2606. return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
  2607. }
  2608. }]);
  2609. return Font;
  2610. }();
  2611. Font.styles = 'normal|italic|oblique|inherit';
  2612. Font.variants = 'normal|small-caps|inherit';
  2613. Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
  2614. var BoundingBox = /*#__PURE__*/function () {
  2615. function BoundingBox() {
  2616. var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.NaN;
  2617. var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.NaN;
  2618. var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.NaN;
  2619. var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Number.NaN;
  2620. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, BoundingBox);
  2621. this.x1 = x1;
  2622. this.y1 = y1;
  2623. this.x2 = x2;
  2624. this.y2 = y2;
  2625. this.addPoint(x1, y1);
  2626. this.addPoint(x2, y2);
  2627. }
  2628. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(BoundingBox, [{
  2629. key: "addPoint",
  2630. value: function addPoint(x, y) {
  2631. if (typeof x !== 'undefined') {
  2632. if (isNaN(this.x1) || isNaN(this.x2)) {
  2633. this.x1 = x;
  2634. this.x2 = x;
  2635. }
  2636. if (x < this.x1) {
  2637. this.x1 = x;
  2638. }
  2639. if (x > this.x2) {
  2640. this.x2 = x;
  2641. }
  2642. }
  2643. if (typeof y !== 'undefined') {
  2644. if (isNaN(this.y1) || isNaN(this.y2)) {
  2645. this.y1 = y;
  2646. this.y2 = y;
  2647. }
  2648. if (y < this.y1) {
  2649. this.y1 = y;
  2650. }
  2651. if (y > this.y2) {
  2652. this.y2 = y;
  2653. }
  2654. }
  2655. }
  2656. }, {
  2657. key: "addX",
  2658. value: function addX(x) {
  2659. this.addPoint(x, null);
  2660. }
  2661. }, {
  2662. key: "addY",
  2663. value: function addY(y) {
  2664. this.addPoint(null, y);
  2665. }
  2666. }, {
  2667. key: "addBoundingBox",
  2668. value: function addBoundingBox(boundingBox) {
  2669. if (!boundingBox) {
  2670. return;
  2671. }
  2672. var x1 = boundingBox.x1,
  2673. y1 = boundingBox.y1,
  2674. x2 = boundingBox.x2,
  2675. y2 = boundingBox.y2;
  2676. this.addPoint(x1, y1);
  2677. this.addPoint(x2, y2);
  2678. }
  2679. }, {
  2680. key: "sumCubic",
  2681. value: function sumCubic(t, p0, p1, p2, p3) {
  2682. 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;
  2683. }
  2684. }, {
  2685. key: "bezierCurveAdd",
  2686. value: function bezierCurveAdd(forX, p0, p1, p2, p3) {
  2687. var b = 6 * p0 - 12 * p1 + 6 * p2;
  2688. var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
  2689. var c = 3 * p1 - 3 * p0;
  2690. if (a === 0) {
  2691. if (b === 0) {
  2692. return;
  2693. }
  2694. var t = -c / b;
  2695. if (0 < t && t < 1) {
  2696. if (forX) {
  2697. this.addX(this.sumCubic(t, p0, p1, p2, p3));
  2698. } else {
  2699. this.addY(this.sumCubic(t, p0, p1, p2, p3));
  2700. }
  2701. }
  2702. return;
  2703. }
  2704. var b2ac = Math.pow(b, 2) - 4 * c * a;
  2705. if (b2ac < 0) {
  2706. return;
  2707. }
  2708. var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
  2709. if (0 < t1 && t1 < 1) {
  2710. if (forX) {
  2711. this.addX(this.sumCubic(t1, p0, p1, p2, p3));
  2712. } else {
  2713. this.addY(this.sumCubic(t1, p0, p1, p2, p3));
  2714. }
  2715. }
  2716. var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
  2717. if (0 < t2 && t2 < 1) {
  2718. if (forX) {
  2719. this.addX(this.sumCubic(t2, p0, p1, p2, p3));
  2720. } else {
  2721. this.addY(this.sumCubic(t2, p0, p1, p2, p3));
  2722. }
  2723. }
  2724. } // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
  2725. }, {
  2726. key: "addBezierCurve",
  2727. value: function addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
  2728. this.addPoint(p0x, p0y);
  2729. this.addPoint(p3x, p3y);
  2730. this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
  2731. this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
  2732. }
  2733. }, {
  2734. key: "addQuadraticCurve",
  2735. value: function addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
  2736. var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
  2737. var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
  2738. var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
  2739. var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
  2740. this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
  2741. }
  2742. }, {
  2743. key: "isPointInBox",
  2744. value: function isPointInBox(x, y) {
  2745. var x1 = this.x1,
  2746. y1 = this.y1,
  2747. x2 = this.x2,
  2748. y2 = this.y2;
  2749. return x1 <= x && x <= x2 && y1 <= y && y <= y2;
  2750. }
  2751. }, {
  2752. key: "x",
  2753. get: function get() {
  2754. return this.x1;
  2755. }
  2756. }, {
  2757. key: "y",
  2758. get: function get() {
  2759. return this.y1;
  2760. }
  2761. }, {
  2762. key: "width",
  2763. get: function get() {
  2764. return this.x2 - this.x1;
  2765. }
  2766. }, {
  2767. key: "height",
  2768. get: function get() {
  2769. return this.y2 - this.y1;
  2770. }
  2771. }]);
  2772. return BoundingBox;
  2773. }();
  2774. 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); }; }
  2775. 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; } }
  2776. var RenderedElement = /*#__PURE__*/function (_Element) {
  2777. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RenderedElement, _Element);
  2778. var _super = _createSuper$4(RenderedElement);
  2779. function RenderedElement() {
  2780. var _this;
  2781. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RenderedElement);
  2782. _this = _super.apply(this, arguments);
  2783. _this.modifiedEmSizeStack = false;
  2784. return _this;
  2785. }
  2786. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RenderedElement, [{
  2787. key: "calculateOpacity",
  2788. value: function calculateOpacity() {
  2789. var opacity = 1.0; // tslint:disable-next-line: no-this-assignment
  2790. var element = this;
  2791. while (element) {
  2792. var opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
  2793. if (opacityStyle.hasValue()) {
  2794. opacity *= opacityStyle.getNumber();
  2795. }
  2796. element = element.parent;
  2797. }
  2798. return opacity;
  2799. }
  2800. }, {
  2801. key: "setContext",
  2802. value: function setContext(ctx) {
  2803. var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2804. if (!fromMeasure) {
  2805. // causes stack overflow when measuring text with gradients
  2806. // fill
  2807. var fillStyleProp = this.getStyle('fill');
  2808. var fillOpacityStyleProp = this.getStyle('fill-opacity');
  2809. var strokeStyleProp = this.getStyle('stroke');
  2810. var strokeOpacityProp = this.getStyle('stroke-opacity');
  2811. if (fillStyleProp.isUrlDefinition()) {
  2812. var fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
  2813. if (fillStyle) {
  2814. ctx.fillStyle = fillStyle;
  2815. }
  2816. } else if (fillStyleProp.hasValue()) {
  2817. if (fillStyleProp.getString() === 'currentColor') {
  2818. fillStyleProp.setValue(this.getStyle('color').getColor());
  2819. }
  2820. var _fillStyle = fillStyleProp.getColor();
  2821. if (_fillStyle !== 'inherit') {
  2822. ctx.fillStyle = _fillStyle === 'none' ? 'rgba(0,0,0,0)' : _fillStyle;
  2823. }
  2824. }
  2825. if (fillOpacityStyleProp.hasValue()) {
  2826. var _fillStyle2 = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();
  2827. ctx.fillStyle = _fillStyle2;
  2828. } // stroke
  2829. if (strokeStyleProp.isUrlDefinition()) {
  2830. var strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
  2831. if (strokeStyle) {
  2832. ctx.strokeStyle = strokeStyle;
  2833. }
  2834. } else if (strokeStyleProp.hasValue()) {
  2835. if (strokeStyleProp.getString() === 'currentColor') {
  2836. strokeStyleProp.setValue(this.getStyle('color').getColor());
  2837. }
  2838. var _strokeStyle = strokeStyleProp.getString();
  2839. if (_strokeStyle !== 'inherit') {
  2840. ctx.strokeStyle = _strokeStyle === 'none' ? 'rgba(0,0,0,0)' : _strokeStyle;
  2841. }
  2842. }
  2843. if (strokeOpacityProp.hasValue()) {
  2844. var _strokeStyle2 = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();
  2845. ctx.strokeStyle = _strokeStyle2;
  2846. }
  2847. var strokeWidthStyleProp = this.getStyle('stroke-width');
  2848. if (strokeWidthStyleProp.hasValue()) {
  2849. var newLineWidth = strokeWidthStyleProp.getPixels();
  2850. ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
  2851. : newLineWidth;
  2852. }
  2853. var strokeLinecapStyleProp = this.getStyle('stroke-linecap');
  2854. var strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
  2855. var strokeMiterlimitProp = this.getStyle('stroke-miterlimit');
  2856. var pointOrderStyleProp = this.getStyle('paint-order');
  2857. var strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
  2858. var strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
  2859. if (strokeLinecapStyleProp.hasValue()) {
  2860. ctx.lineCap = strokeLinecapStyleProp.getString();
  2861. }
  2862. if (strokeLinejoinStyleProp.hasValue()) {
  2863. ctx.lineJoin = strokeLinejoinStyleProp.getString();
  2864. }
  2865. if (strokeMiterlimitProp.hasValue()) {
  2866. ctx.miterLimit = strokeMiterlimitProp.getNumber();
  2867. }
  2868. if (pointOrderStyleProp.hasValue()) {
  2869. // ?
  2870. ctx.paintOrder = pointOrderStyleProp.getValue();
  2871. }
  2872. if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
  2873. var gaps = toNumbers(strokeDasharrayStyleProp.getString());
  2874. if (typeof ctx.setLineDash !== 'undefined') {
  2875. ctx.setLineDash(gaps);
  2876. } else if (typeof ctx.webkitLineDash !== 'undefined') {
  2877. ctx.webkitLineDash = gaps;
  2878. } else if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
  2879. ctx.mozDash = gaps;
  2880. }
  2881. var offset = strokeDashoffsetProp.getPixels();
  2882. if (typeof ctx.lineDashOffset !== 'undefined') {
  2883. ctx.lineDashOffset = offset;
  2884. } else if (typeof ctx.webkitLineDashOffset !== 'undefined') {
  2885. ctx.webkitLineDashOffset = offset;
  2886. } else if (typeof ctx.mozDashOffset !== 'undefined') {
  2887. ctx.mozDashOffset = offset;
  2888. }
  2889. }
  2890. } // font
  2891. this.modifiedEmSizeStack = false;
  2892. if (typeof ctx.font !== 'undefined') {
  2893. var fontStyleProp = this.getStyle('font');
  2894. var fontStyleStyleProp = this.getStyle('font-style');
  2895. var fontVariantStyleProp = this.getStyle('font-variant');
  2896. var fontWeightStyleProp = this.getStyle('font-weight');
  2897. var fontSizeStyleProp = this.getStyle('font-size');
  2898. var fontFamilyStyleProp = this.getStyle('font-family');
  2899. 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));
  2900. fontStyleStyleProp.setValue(font.fontStyle);
  2901. fontVariantStyleProp.setValue(font.fontVariant);
  2902. fontWeightStyleProp.setValue(font.fontWeight);
  2903. fontSizeStyleProp.setValue(font.fontSize);
  2904. fontFamilyStyleProp.setValue(font.fontFamily);
  2905. ctx.font = font.toString();
  2906. if (fontSizeStyleProp.isPixels()) {
  2907. this.document.emSize = fontSizeStyleProp.getPixels();
  2908. this.modifiedEmSizeStack = true;
  2909. }
  2910. }
  2911. if (!fromMeasure) {
  2912. // effects
  2913. this.applyEffects(ctx); // opacity
  2914. ctx.globalAlpha = this.calculateOpacity();
  2915. }
  2916. }
  2917. }, {
  2918. key: "clearContext",
  2919. value: function clearContext(ctx) {
  2920. (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);
  2921. if (this.modifiedEmSizeStack) {
  2922. this.document.popEmSize();
  2923. }
  2924. }
  2925. }]);
  2926. return RenderedElement;
  2927. }(Element);
  2928. 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); }; }
  2929. 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; } }
  2930. var TextElement = /*#__PURE__*/function (_RenderedElement) {
  2931. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextElement, _RenderedElement);
  2932. var _super = _createSuper$5(TextElement);
  2933. function TextElement(document, node, captureTextNodes) {
  2934. var _this;
  2935. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextElement);
  2936. _this = _super.call(this, document, node, (this instanceof TextElement ? this.constructor : void 0) === TextElement ? true : captureTextNodes);
  2937. _this.type = 'text';
  2938. _this.x = 0;
  2939. _this.y = 0;
  2940. _this.measureCache = -1;
  2941. return _this;
  2942. }
  2943. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextElement, [{
  2944. key: "setContext",
  2945. value: function setContext(ctx) {
  2946. var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2947. (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);
  2948. var textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();
  2949. if (textBaseline) {
  2950. ctx.textBaseline = textBaseline;
  2951. }
  2952. }
  2953. }, {
  2954. key: "initializeCoordinates",
  2955. value: function initializeCoordinates(ctx) {
  2956. this.x = this.getAttribute('x').getPixels('x');
  2957. this.y = this.getAttribute('y').getPixels('y');
  2958. var dxAttr = this.getAttribute('dx');
  2959. var dyAttr = this.getAttribute('dy');
  2960. if (dxAttr.hasValue()) {
  2961. this.x += dxAttr.getPixels('x');
  2962. }
  2963. if (dyAttr.hasValue()) {
  2964. this.y += dyAttr.getPixels('y');
  2965. }
  2966. this.x += this.getAnchorDelta(ctx, this, 0);
  2967. }
  2968. }, {
  2969. key: "getBoundingBox",
  2970. value: function getBoundingBox(ctx) {
  2971. var _this2 = this;
  2972. if (this.type !== 'text') {
  2973. return this.getTElementBoundingBox(ctx);
  2974. }
  2975. this.initializeCoordinates(ctx);
  2976. var boundingBox = null;
  2977. this.children.forEach(function (_, i) {
  2978. var childBoundingBox = _this2.getChildBoundingBox(ctx, _this2, _this2, i);
  2979. if (!boundingBox) {
  2980. boundingBox = childBoundingBox;
  2981. } else {
  2982. boundingBox.addBoundingBox(childBoundingBox);
  2983. }
  2984. });
  2985. return boundingBox;
  2986. }
  2987. }, {
  2988. key: "getFontSize",
  2989. value: function getFontSize() {
  2990. var document = this.document,
  2991. parent = this.parent;
  2992. var inheritFontSize = Font.parse(document.ctx.font).fontSize;
  2993. var fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
  2994. return fontSize;
  2995. }
  2996. }, {
  2997. key: "getTElementBoundingBox",
  2998. value: function getTElementBoundingBox(ctx) {
  2999. var fontSize = this.getFontSize();
  3000. return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
  3001. }
  3002. }, {
  3003. key: "getGlyph",
  3004. value: function getGlyph(font, text, i) {
  3005. var char = text[i];
  3006. var glyph = null;
  3007. if (font.isArabic) {
  3008. var len = text.length;
  3009. var prevChar = text[i - 1];
  3010. var nextChar = text[i + 1];
  3011. var arabicForm = 'isolated';
  3012. if ((i === 0 || prevChar === ' ') && i < len - 2 && nextChar !== ' ') {
  3013. arabicForm = 'terminal';
  3014. }
  3015. if (i > 0 && prevChar !== ' ' && i < len - 2 && nextChar !== ' ') {
  3016. arabicForm = 'medial';
  3017. }
  3018. if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
  3019. arabicForm = 'initial';
  3020. }
  3021. if (typeof font.glyphs[char] !== 'undefined') {
  3022. glyph = font.glyphs[char][arabicForm];
  3023. if (!glyph && font.glyphs[char].type === 'glyph') {
  3024. glyph = font.glyphs[char];
  3025. }
  3026. }
  3027. } else {
  3028. glyph = font.glyphs[char];
  3029. }
  3030. if (!glyph) {
  3031. glyph = font.missingGlyph;
  3032. }
  3033. return glyph;
  3034. }
  3035. }, {
  3036. key: "getText",
  3037. value: function getText() {
  3038. return '';
  3039. }
  3040. }, {
  3041. key: "getTextFromNode",
  3042. value: function getTextFromNode(node) {
  3043. var textNode = node || this.node;
  3044. var childNodes = Array.from(textNode.parentNode.childNodes);
  3045. var index = childNodes.indexOf(textNode);
  3046. var lastIndex = childNodes.length - 1;
  3047. var text = compressSpaces(textNode.value || textNode.text || textNode.textContent || '');
  3048. if (index === 0) {
  3049. text = trimLeft(text);
  3050. }
  3051. if (index === lastIndex) {
  3052. text = trimRight(text);
  3053. }
  3054. return text;
  3055. }
  3056. }, {
  3057. key: "renderChildren",
  3058. value: function renderChildren(ctx) {
  3059. var _this3 = this;
  3060. if (this.type !== 'text') {
  3061. this.renderTElementChildren(ctx);
  3062. return;
  3063. }
  3064. this.initializeCoordinates(ctx);
  3065. this.children.forEach(function (_, i) {
  3066. _this3.renderChild(ctx, _this3, _this3, i);
  3067. });
  3068. var mouse = this.document.screen.mouse; // Do not calc bounding box if mouse is not working.
  3069. if (mouse.isWorking()) {
  3070. mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
  3071. }
  3072. }
  3073. }, {
  3074. key: "renderTElementChildren",
  3075. value: function renderTElementChildren(ctx) {
  3076. var document = this.document,
  3077. parent = this.parent;
  3078. var renderText = this.getText();
  3079. var customFont = parent.getStyle('font-family').getDefinition();
  3080. if (customFont) {
  3081. var unitsPerEm = customFont.fontFace.unitsPerEm;
  3082. var ctxFont = Font.parse(document.ctx.font);
  3083. var fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
  3084. var fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
  3085. var scale = fontSize / unitsPerEm;
  3086. var text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;
  3087. var dx = toNumbers(parent.getAttribute('dx').getString());
  3088. var len = text.length;
  3089. for (var i = 0; i < len; i++) {
  3090. var glyph = this.getGlyph(customFont, text, i);
  3091. ctx.translate(this.x, this.y);
  3092. ctx.scale(scale, -scale);
  3093. var lw = ctx.lineWidth;
  3094. ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
  3095. if (fontStyle === 'italic') {
  3096. ctx.transform(1, 0, .4, 1, 0, 0);
  3097. }
  3098. glyph.render(ctx);
  3099. if (fontStyle === 'italic') {
  3100. ctx.transform(1, 0, -.4, 1, 0, 0);
  3101. }
  3102. ctx.lineWidth = lw;
  3103. ctx.scale(1 / scale, -1 / scale);
  3104. ctx.translate(-this.x, -this.y);
  3105. this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
  3106. if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
  3107. this.x += dx[i];
  3108. }
  3109. }
  3110. return;
  3111. }
  3112. var x = this.x,
  3113. y = this.y;
  3114. if (ctx.paintOrder === 'stroke') {
  3115. if (ctx.strokeStyle) {
  3116. ctx.strokeText(renderText, x, y);
  3117. }
  3118. if (ctx.fillStyle) {
  3119. ctx.fillText(renderText, x, y);
  3120. }
  3121. } else {
  3122. if (ctx.fillStyle) {
  3123. ctx.fillText(renderText, x, y);
  3124. }
  3125. if (ctx.strokeStyle) {
  3126. ctx.strokeText(renderText, x, y);
  3127. }
  3128. }
  3129. }
  3130. }, {
  3131. key: "getAnchorDelta",
  3132. value: function getAnchorDelta(ctx, parent, startI) {
  3133. var textAnchor = this.getStyle('text-anchor').getString('start');
  3134. if (textAnchor !== 'start') {
  3135. var children = parent.children;
  3136. var len = children.length;
  3137. var child = null;
  3138. var width = 0;
  3139. for (var i = startI; i < len; i++) {
  3140. child = children[i];
  3141. if (i > startI && child.getAttribute('x').hasValue() || child.getAttribute('text-anchor').hasValue()) {
  3142. break; // new group
  3143. }
  3144. width += child.measureTextRecursive(ctx);
  3145. }
  3146. return -1 * (textAnchor === 'end' ? width : width / 2.0);
  3147. }
  3148. return 0;
  3149. }
  3150. }, {
  3151. key: "adjustChildCoordinates",
  3152. value: function adjustChildCoordinates(ctx, textParent, parent, i) {
  3153. var child = parent.children[i];
  3154. if (typeof child.measureText !== 'function') {
  3155. return child;
  3156. }
  3157. ctx.save();
  3158. child.setContext(ctx, true);
  3159. var xAttr = child.getAttribute('x');
  3160. var yAttr = child.getAttribute('y');
  3161. var dxAttr = child.getAttribute('dx');
  3162. var dyAttr = child.getAttribute('dy');
  3163. var textAnchor = child.getAttribute('text-anchor').getString('start');
  3164. if (i === 0 && child.type !== 'textNode') {
  3165. if (!xAttr.hasValue()) {
  3166. xAttr.setValue(textParent.getAttribute('x').getValue('0'));
  3167. }
  3168. if (!yAttr.hasValue()) {
  3169. yAttr.setValue(textParent.getAttribute('y').getValue('0'));
  3170. }
  3171. if (!dxAttr.hasValue()) {
  3172. dxAttr.setValue(textParent.getAttribute('dx').getValue('0'));
  3173. }
  3174. if (!dyAttr.hasValue()) {
  3175. dyAttr.setValue(textParent.getAttribute('dy').getValue('0'));
  3176. }
  3177. }
  3178. if (xAttr.hasValue()) {
  3179. child.x = xAttr.getPixels('x') + textParent.getAnchorDelta(ctx, parent, i);
  3180. if (textAnchor !== 'start') {
  3181. var width = child.measureTextRecursive(ctx);
  3182. child.x += -1 * (textAnchor === 'end' ? width : width / 2.0);
  3183. }
  3184. if (dxAttr.hasValue()) {
  3185. child.x += dxAttr.getPixels('x');
  3186. }
  3187. } else {
  3188. if (textAnchor !== 'start') {
  3189. var _width = child.measureTextRecursive(ctx);
  3190. textParent.x += -1 * (textAnchor === 'end' ? _width : _width / 2.0);
  3191. }
  3192. if (dxAttr.hasValue()) {
  3193. textParent.x += dxAttr.getPixels('x');
  3194. }
  3195. child.x = textParent.x;
  3196. }
  3197. textParent.x = child.x + child.measureText(ctx);
  3198. if (yAttr.hasValue()) {
  3199. child.y = yAttr.getPixels('y');
  3200. if (dyAttr.hasValue()) {
  3201. child.y += dyAttr.getPixels('y');
  3202. }
  3203. } else {
  3204. if (dyAttr.hasValue()) {
  3205. textParent.y += dyAttr.getPixels('y');
  3206. }
  3207. child.y = textParent.y;
  3208. }
  3209. textParent.y = child.y;
  3210. child.clearContext(ctx);
  3211. ctx.restore();
  3212. return child;
  3213. }
  3214. }, {
  3215. key: "getChildBoundingBox",
  3216. value: function getChildBoundingBox(ctx, textParent, parent, i) {
  3217. var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
  3218. var boundingBox = child.getBoundingBox(ctx);
  3219. if (!boundingBox) {
  3220. return null;
  3221. }
  3222. child.children.forEach(function (_, i) {
  3223. var childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
  3224. boundingBox.addBoundingBox(childBoundingBox);
  3225. });
  3226. return boundingBox;
  3227. }
  3228. }, {
  3229. key: "renderChild",
  3230. value: function renderChild(ctx, textParent, parent, i) {
  3231. var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
  3232. child.render(ctx);
  3233. child.children.forEach(function (_, i) {
  3234. textParent.renderChild(ctx, textParent, child, i);
  3235. });
  3236. }
  3237. }, {
  3238. key: "measureTextRecursive",
  3239. value: function measureTextRecursive(ctx) {
  3240. var width = this.children.reduce(function (width, child) {
  3241. return width + child.measureTextRecursive(ctx);
  3242. }, this.measureText(ctx));
  3243. return width;
  3244. }
  3245. }, {
  3246. key: "measureText",
  3247. value: function measureText(ctx) {
  3248. var measureCache = this.measureCache;
  3249. if (~measureCache) {
  3250. return measureCache;
  3251. }
  3252. var renderText = this.getText();
  3253. var measure = this.measureTargetText(ctx, renderText);
  3254. this.measureCache = measure;
  3255. return measure;
  3256. }
  3257. }, {
  3258. key: "measureTargetText",
  3259. value: function measureTargetText(ctx, targetText) {
  3260. if (!targetText.length) {
  3261. return 0;
  3262. }
  3263. var parent = this.parent;
  3264. var customFont = parent.getStyle('font-family').getDefinition();
  3265. if (customFont) {
  3266. var fontSize = this.getFontSize();
  3267. var text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;
  3268. var dx = toNumbers(parent.getAttribute('dx').getString());
  3269. var len = text.length;
  3270. var _measure = 0;
  3271. for (var i = 0; i < len; i++) {
  3272. var glyph = this.getGlyph(customFont, text, i);
  3273. _measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
  3274. if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
  3275. _measure += dx[i];
  3276. }
  3277. }
  3278. return _measure;
  3279. }
  3280. if (!ctx.measureText) {
  3281. return targetText.length * 10;
  3282. }
  3283. ctx.save();
  3284. this.setContext(ctx, true);
  3285. var _ctx$measureText = ctx.measureText(targetText),
  3286. measure = _ctx$measureText.width;
  3287. this.clearContext(ctx);
  3288. ctx.restore();
  3289. return measure;
  3290. }
  3291. }]);
  3292. return TextElement;
  3293. }(RenderedElement);
  3294. 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); }; }
  3295. 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; } }
  3296. var TSpanElement = /*#__PURE__*/function (_TextElement) {
  3297. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TSpanElement, _TextElement);
  3298. var _super = _createSuper$6(TSpanElement);
  3299. function TSpanElement(document, node, captureTextNodes) {
  3300. var _this;
  3301. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TSpanElement);
  3302. _this = _super.call(this, document, node, (this instanceof TSpanElement ? this.constructor : void 0) === TSpanElement ? true : captureTextNodes);
  3303. _this.type = 'tspan'; // if this node has children, then they own the text
  3304. _this.text = _this.children.length > 0 ? '' : _this.getTextFromNode();
  3305. return _this;
  3306. }
  3307. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TSpanElement, [{
  3308. key: "getText",
  3309. value: function getText() {
  3310. return this.text;
  3311. }
  3312. }]);
  3313. return TSpanElement;
  3314. }(TextElement);
  3315. 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); }; }
  3316. 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; } }
  3317. var TextNode = /*#__PURE__*/function (_TSpanElement) {
  3318. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextNode, _TSpanElement);
  3319. var _super = _createSuper$7(TextNode);
  3320. function TextNode() {
  3321. var _this;
  3322. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextNode);
  3323. _this = _super.apply(this, arguments);
  3324. _this.type = 'textNode';
  3325. return _this;
  3326. }
  3327. return TextNode;
  3328. }(TSpanElement);
  3329. function preparePath(path) {
  3330. var d = path.replace(/,/gm, ' ') // get rid of all commas
  3331. // As the end of a match can also be the start of the next match, we need to run this replace twice.
  3332. .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
  3333. .replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2') // suffix commands with spaces
  3334. .replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2') // prefix commands with spaces
  3335. .replace(/([0-9])([+\-])/gm, '$1 $2') // separate digits on +- signs
  3336. // Again, we need to run this twice to find all occurances
  3337. .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
  3338. .replace(/(\.[0-9]*)(\.)/gm, '$1 $2') // separate digits when they start with a comma
  3339. .replace(/([Aa](?:\s+(?:[0-9]*\.)?[0-9]+){3})\s+([01])\s*([01])/gm, '$1 $2 $3 '); // shorthand elliptical arc path syntax
  3340. return compressSpaces(d).trim();
  3341. }
  3342. var PathParser = /*#__PURE__*/function () {
  3343. function PathParser(path) {
  3344. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathParser);
  3345. this.control = null;
  3346. this.start = null;
  3347. this.current = null;
  3348. this.command = '';
  3349. this.tokens = [];
  3350. this.i = -1;
  3351. this.previousCommand = '';
  3352. this.points = [];
  3353. this.angles = [];
  3354. this.tokens = preparePath(path).split(' ');
  3355. }
  3356. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathParser, [{
  3357. key: "reset",
  3358. value: function reset() {
  3359. this.i = -1;
  3360. this.command = '';
  3361. this.previousCommand = '';
  3362. this.start = new Point(0, 0);
  3363. this.control = new Point(0, 0);
  3364. this.current = new Point(0, 0);
  3365. this.points = [];
  3366. this.angles = [];
  3367. }
  3368. }, {
  3369. key: "isEnd",
  3370. value: function isEnd() {
  3371. var i = this.i,
  3372. tokens = this.tokens;
  3373. return i >= tokens.length - 1;
  3374. }
  3375. }, {
  3376. key: "isCommandOrEnd",
  3377. value: function isCommandOrEnd() {
  3378. if (this.isEnd()) {
  3379. return true;
  3380. }
  3381. var i = this.i,
  3382. tokens = this.tokens;
  3383. return /^[A-Za-z]$/.test(tokens[i + 1]);
  3384. }
  3385. }, {
  3386. key: "isRelativeCommand",
  3387. value: function isRelativeCommand() {
  3388. switch (this.command) {
  3389. case 'm':
  3390. case 'l':
  3391. case 'h':
  3392. case 'v':
  3393. case 'c':
  3394. case 's':
  3395. case 'q':
  3396. case 't':
  3397. case 'a':
  3398. case 'z':
  3399. return true;
  3400. default:
  3401. return false;
  3402. }
  3403. }
  3404. }, {
  3405. key: "getToken",
  3406. value: function getToken() {
  3407. this.i++;
  3408. return this.tokens[this.i];
  3409. }
  3410. }, {
  3411. key: "getScalar",
  3412. value: function getScalar() {
  3413. return parseFloat(this.getToken());
  3414. }
  3415. }, {
  3416. key: "nextCommand",
  3417. value: function nextCommand() {
  3418. this.previousCommand = this.command;
  3419. this.command = this.getToken();
  3420. }
  3421. }, {
  3422. key: "getPoint",
  3423. value: function getPoint() {
  3424. var point = new Point(this.getScalar(), this.getScalar());
  3425. return this.makeAbsolute(point);
  3426. }
  3427. }, {
  3428. key: "getAsControlPoint",
  3429. value: function getAsControlPoint() {
  3430. var point = this.getPoint();
  3431. this.control = point;
  3432. return point;
  3433. }
  3434. }, {
  3435. key: "getAsCurrentPoint",
  3436. value: function getAsCurrentPoint() {
  3437. var point = this.getPoint();
  3438. this.current = point;
  3439. return point;
  3440. }
  3441. }, {
  3442. key: "getReflectedControlPoint",
  3443. value: function getReflectedControlPoint() {
  3444. var previousCommand = this.previousCommand.toLowerCase();
  3445. if (previousCommand !== 'c' && previousCommand !== 's' && previousCommand !== 'q' && previousCommand !== 't') {
  3446. return this.current;
  3447. } // reflect point
  3448. var _this$current = this.current,
  3449. cx = _this$current.x,
  3450. cy = _this$current.y,
  3451. _this$control = this.control,
  3452. ox = _this$control.x,
  3453. oy = _this$control.y;
  3454. var point = new Point(2 * cx - ox, 2 * cy - oy);
  3455. return point;
  3456. }
  3457. }, {
  3458. key: "makeAbsolute",
  3459. value: function makeAbsolute(point) {
  3460. if (this.isRelativeCommand()) {
  3461. var _this$current2 = this.current,
  3462. x = _this$current2.x,
  3463. y = _this$current2.y;
  3464. point.x += x;
  3465. point.y += y;
  3466. }
  3467. return point;
  3468. }
  3469. }, {
  3470. key: "addMarker",
  3471. value: function addMarker(point, from, priorTo) {
  3472. var points = this.points,
  3473. angles = this.angles; // if the last angle isn't filled in because we didn't have this point yet ...
  3474. if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
  3475. angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
  3476. }
  3477. this.addMarkerAngle(point, from ? from.angleTo(point) : null);
  3478. }
  3479. }, {
  3480. key: "addMarkerAngle",
  3481. value: function addMarkerAngle(point, angle) {
  3482. this.points.push(point);
  3483. this.angles.push(angle);
  3484. }
  3485. }, {
  3486. key: "getMarkerPoints",
  3487. value: function getMarkerPoints() {
  3488. return this.points;
  3489. }
  3490. }, {
  3491. key: "getMarkerAngles",
  3492. value: function getMarkerAngles() {
  3493. var angles = this.angles;
  3494. var len = angles.length;
  3495. for (var i = 0; i < len; i++) {
  3496. if (!angles[i]) {
  3497. for (var j = i + 1; j < len; j++) {
  3498. if (angles[j]) {
  3499. angles[i] = angles[j];
  3500. break;
  3501. }
  3502. }
  3503. }
  3504. }
  3505. return angles;
  3506. }
  3507. }]);
  3508. return PathParser;
  3509. }();
  3510. 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); }; }
  3511. 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; } }
  3512. var PathElement = /*#__PURE__*/function (_RenderedElement) {
  3513. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PathElement, _RenderedElement);
  3514. var _super = _createSuper$8(PathElement);
  3515. function PathElement(document, node, captureTextNodes) {
  3516. var _this;
  3517. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PathElement);
  3518. _this = _super.call(this, document, node, captureTextNodes);
  3519. _this.type = 'path';
  3520. _this.pathParser = null;
  3521. _this.pathParser = new PathParser(_this.getAttribute('d').getString());
  3522. return _this;
  3523. }
  3524. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PathElement, [{
  3525. key: "path",
  3526. value: function path(ctx) {
  3527. var pathParser = this.pathParser;
  3528. var boundingBox = new BoundingBox();
  3529. pathParser.reset();
  3530. if (ctx) {
  3531. ctx.beginPath();
  3532. }
  3533. while (!pathParser.isEnd()) {
  3534. pathParser.nextCommand();
  3535. switch (pathParser.command) {
  3536. case 'M':
  3537. case 'm':
  3538. this.pathM(ctx, boundingBox);
  3539. break;
  3540. case 'L':
  3541. case 'l':
  3542. this.pathL(ctx, boundingBox);
  3543. break;
  3544. case 'H':
  3545. case 'h':
  3546. this.pathH(ctx, boundingBox);
  3547. break;
  3548. case 'V':
  3549. case 'v':
  3550. this.pathV(ctx, boundingBox);
  3551. break;
  3552. case 'C':
  3553. case 'c':
  3554. this.pathC(ctx, boundingBox);
  3555. break;
  3556. case 'S':
  3557. case 's':
  3558. this.pathS(ctx, boundingBox);
  3559. break;
  3560. case 'Q':
  3561. case 'q':
  3562. this.pathQ(ctx, boundingBox);
  3563. break;
  3564. case 'T':
  3565. case 't':
  3566. this.pathT(ctx, boundingBox);
  3567. break;
  3568. case 'A':
  3569. case 'a':
  3570. this.pathA(ctx, boundingBox);
  3571. break;
  3572. case 'Z':
  3573. case 'z':
  3574. this.pathZ(ctx, boundingBox);
  3575. break;
  3576. }
  3577. }
  3578. return boundingBox;
  3579. }
  3580. }, {
  3581. key: "getBoundingBox",
  3582. value: function getBoundingBox(_) {
  3583. return this.path();
  3584. }
  3585. }, {
  3586. key: "getMarkers",
  3587. value: function getMarkers() {
  3588. var pathParser = this.pathParser;
  3589. var points = pathParser.getMarkerPoints();
  3590. var angles = pathParser.getMarkerAngles();
  3591. var markers = points.map(function (point, i) {
  3592. return [point, angles[i]];
  3593. });
  3594. return markers;
  3595. }
  3596. }, {
  3597. key: "renderChildren",
  3598. value: function renderChildren(ctx) {
  3599. this.path(ctx);
  3600. this.document.screen.mouse.checkPath(this, ctx);
  3601. var fillRuleStyleProp = this.getStyle('fill-rule');
  3602. if (ctx.fillStyle !== '') {
  3603. if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
  3604. ctx.fill(fillRuleStyleProp.getString());
  3605. } else {
  3606. ctx.fill();
  3607. }
  3608. }
  3609. if (ctx.strokeStyle !== '') {
  3610. ctx.stroke();
  3611. }
  3612. var markers = this.getMarkers();
  3613. if (markers) {
  3614. var markersLastIndex = markers.length - 1;
  3615. var markerStartStyleProp = this.getStyle('marker-start');
  3616. var markerMidStyleProp = this.getStyle('marker-mid');
  3617. var markerEndStyleProp = this.getStyle('marker-end');
  3618. if (markerStartStyleProp.isUrlDefinition()) {
  3619. var marker = markerStartStyleProp.getDefinition();
  3620. var _markers$ = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[0], 2),
  3621. point = _markers$[0],
  3622. angle = _markers$[1];
  3623. marker.render(ctx, point, angle);
  3624. }
  3625. if (markerMidStyleProp.isUrlDefinition()) {
  3626. var _marker = markerMidStyleProp.getDefinition();
  3627. for (var i = 1; i < markersLastIndex; i++) {
  3628. var _markers$i = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[i], 2),
  3629. _point = _markers$i[0],
  3630. _angle = _markers$i[1];
  3631. _marker.render(ctx, _point, _angle);
  3632. }
  3633. }
  3634. if (markerEndStyleProp.isUrlDefinition()) {
  3635. var _marker2 = markerEndStyleProp.getDefinition();
  3636. var _markers$markersLastI = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(markers[markersLastIndex], 2),
  3637. _point2 = _markers$markersLastI[0],
  3638. _angle2 = _markers$markersLastI[1];
  3639. _marker2.render(ctx, _point2, _angle2);
  3640. }
  3641. }
  3642. }
  3643. }, {
  3644. key: "pathM",
  3645. value: function pathM(ctx, boundingBox) {
  3646. var pathParser = this.pathParser;
  3647. var point = pathParser.getAsCurrentPoint();
  3648. var x = point.x,
  3649. y = point.y;
  3650. pathParser.addMarker(point);
  3651. boundingBox.addPoint(x, y);
  3652. if (ctx) {
  3653. ctx.moveTo(x, y);
  3654. }
  3655. pathParser.start = pathParser.current;
  3656. while (!pathParser.isCommandOrEnd()) {
  3657. var _point3 = pathParser.getAsCurrentPoint();
  3658. var _x = _point3.x,
  3659. _y = _point3.y;
  3660. pathParser.addMarker(_point3, pathParser.start);
  3661. boundingBox.addPoint(_x, _y);
  3662. if (ctx) {
  3663. ctx.lineTo(_x, _y);
  3664. }
  3665. }
  3666. }
  3667. }, {
  3668. key: "pathL",
  3669. value: function pathL(ctx, boundingBox) {
  3670. var pathParser = this.pathParser;
  3671. while (!pathParser.isCommandOrEnd()) {
  3672. var current = pathParser.current;
  3673. var point = pathParser.getAsCurrentPoint();
  3674. var x = point.x,
  3675. y = point.y;
  3676. pathParser.addMarker(point, current);
  3677. boundingBox.addPoint(x, y);
  3678. if (ctx) {
  3679. ctx.lineTo(x, y);
  3680. }
  3681. }
  3682. }
  3683. }, {
  3684. key: "pathH",
  3685. value: function pathH(ctx, boundingBox) {
  3686. var pathParser = this.pathParser;
  3687. while (!pathParser.isCommandOrEnd()) {
  3688. var current = pathParser.current;
  3689. var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
  3690. pathParser.addMarker(point, current);
  3691. pathParser.current = point;
  3692. boundingBox.addPoint(point.x, point.y);
  3693. if (ctx) {
  3694. ctx.lineTo(point.x, point.y);
  3695. }
  3696. }
  3697. }
  3698. }, {
  3699. key: "pathV",
  3700. value: function pathV(ctx, boundingBox) {
  3701. var pathParser = this.pathParser;
  3702. while (!pathParser.isCommandOrEnd()) {
  3703. var current = pathParser.current;
  3704. var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
  3705. pathParser.addMarker(point, current);
  3706. pathParser.current = point;
  3707. boundingBox.addPoint(point.x, point.y);
  3708. if (ctx) {
  3709. ctx.lineTo(point.x, point.y);
  3710. }
  3711. }
  3712. }
  3713. }, {
  3714. key: "pathC",
  3715. value: function pathC(ctx, boundingBox) {
  3716. var pathParser = this.pathParser;
  3717. while (!pathParser.isCommandOrEnd()) {
  3718. var current = pathParser.current;
  3719. var point = pathParser.getPoint();
  3720. var controlPoint = pathParser.getAsControlPoint();
  3721. var currentPoint = pathParser.getAsCurrentPoint();
  3722. pathParser.addMarker(currentPoint, controlPoint, point);
  3723. boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3724. if (ctx) {
  3725. ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3726. }
  3727. }
  3728. }
  3729. }, {
  3730. key: "pathS",
  3731. value: function pathS(ctx, boundingBox) {
  3732. var pathParser = this.pathParser;
  3733. while (!pathParser.isCommandOrEnd()) {
  3734. var current = pathParser.current;
  3735. var point = pathParser.getReflectedControlPoint();
  3736. var controlPoint = pathParser.getAsControlPoint();
  3737. var currentPoint = pathParser.getAsCurrentPoint();
  3738. pathParser.addMarker(currentPoint, controlPoint, point);
  3739. boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3740. if (ctx) {
  3741. ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3742. }
  3743. }
  3744. }
  3745. }, {
  3746. key: "pathQ",
  3747. value: function pathQ(ctx, boundingBox) {
  3748. var pathParser = this.pathParser;
  3749. while (!pathParser.isCommandOrEnd()) {
  3750. var current = pathParser.current;
  3751. var controlPoint = pathParser.getAsControlPoint();
  3752. var currentPoint = pathParser.getAsCurrentPoint();
  3753. pathParser.addMarker(currentPoint, controlPoint, controlPoint);
  3754. boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3755. if (ctx) {
  3756. ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3757. }
  3758. }
  3759. }
  3760. }, {
  3761. key: "pathT",
  3762. value: function pathT(ctx, boundingBox) {
  3763. var pathParser = this.pathParser;
  3764. while (!pathParser.isCommandOrEnd()) {
  3765. var current = pathParser.current;
  3766. var controlPoint = pathParser.getReflectedControlPoint();
  3767. pathParser.control = controlPoint;
  3768. var currentPoint = pathParser.getAsCurrentPoint();
  3769. pathParser.addMarker(currentPoint, controlPoint, controlPoint);
  3770. boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3771. if (ctx) {
  3772. ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  3773. }
  3774. }
  3775. }
  3776. }, {
  3777. key: "pathA",
  3778. value: function pathA(ctx, boundingBox) {
  3779. var pathParser = this.pathParser;
  3780. while (!pathParser.isCommandOrEnd()) {
  3781. var current = pathParser.current;
  3782. var rx = pathParser.getScalar();
  3783. var ry = pathParser.getScalar();
  3784. var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0);
  3785. var largeArcFlag = pathParser.getScalar();
  3786. var sweepFlag = pathParser.getScalar();
  3787. var currentPoint = pathParser.getAsCurrentPoint(); // Conversion from endpoint to center parameterization
  3788. // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
  3789. // x1', y1'
  3790. 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
  3791. var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
  3792. if (l > 1) {
  3793. rx *= Math.sqrt(l);
  3794. ry *= Math.sqrt(l);
  3795. } // cx', cy'
  3796. 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)));
  3797. if (isNaN(s)) {
  3798. s = 0;
  3799. }
  3800. var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
  3801. 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
  3802. var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // angle delta
  3803. var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
  3804. var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
  3805. var ad = vectorsAngle(u, v);
  3806. if (vectorsRatio(u, v) <= -1) {
  3807. ad = Math.PI;
  3808. }
  3809. if (vectorsRatio(u, v) >= 1) {
  3810. ad = 0;
  3811. } // for markers
  3812. var dir = 1 - sweepFlag ? 1.0 : -1.0;
  3813. var ah = a1 + dir * (ad / 2.0);
  3814. var halfWay = new Point(centp.x + rx * Math.cos(ah), centp.y + ry * Math.sin(ah));
  3815. pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
  3816. pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
  3817. boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
  3818. if (ctx && !isNaN(a1) && !isNaN(ad)) {
  3819. var r = rx > ry ? rx : ry;
  3820. var sx = rx > ry ? 1 : rx / ry;
  3821. var sy = rx > ry ? ry / rx : 1;
  3822. ctx.translate(centp.x, centp.y);
  3823. ctx.rotate(xAxisRotation);
  3824. ctx.scale(sx, sy);
  3825. ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
  3826. ctx.scale(1 / sx, 1 / sy);
  3827. ctx.rotate(-xAxisRotation);
  3828. ctx.translate(-centp.x, -centp.y);
  3829. }
  3830. }
  3831. }
  3832. }, {
  3833. key: "pathZ",
  3834. value: function pathZ(ctx, boundingBox) {
  3835. var pathParser = this.pathParser;
  3836. if (ctx) {
  3837. // only close path if it is not a straight line
  3838. if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {
  3839. ctx.closePath();
  3840. }
  3841. }
  3842. pathParser.current = pathParser.start;
  3843. }
  3844. }]);
  3845. return PathElement;
  3846. }(RenderedElement);
  3847. 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); }; }
  3848. 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; } }
  3849. var SVGElement = /*#__PURE__*/function (_RenderedElement) {
  3850. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SVGElement, _RenderedElement);
  3851. var _super = _createSuper$9(SVGElement);
  3852. function SVGElement() {
  3853. var _this;
  3854. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGElement);
  3855. _this = _super.apply(this, arguments);
  3856. _this.type = 'svg';
  3857. _this.root = false;
  3858. return _this;
  3859. }
  3860. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGElement, [{
  3861. key: "clearContext",
  3862. value: function clearContext(ctx) {
  3863. (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);
  3864. this.document.screen.viewPort.removeCurrent();
  3865. }
  3866. }, {
  3867. key: "setContext",
  3868. value: function setContext(ctx) {
  3869. var document = this.document;
  3870. var screen = document.screen,
  3871. window = document.window;
  3872. var canvas = ctx.canvas;
  3873. screen.setDefaults(ctx);
  3874. if (canvas.style && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {
  3875. ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
  3876. var fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
  3877. if (fontSizeProp.hasValue()) {
  3878. document.rootEmSize = fontSizeProp.getPixels('y');
  3879. document.emSize = document.rootEmSize;
  3880. }
  3881. }
  3882. (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
  3883. if (!this.getAttribute('x').hasValue()) {
  3884. this.getAttribute('x', true).setValue(0);
  3885. }
  3886. if (!this.getAttribute('y').hasValue()) {
  3887. this.getAttribute('y', true).setValue(0);
  3888. }
  3889. ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
  3890. var _screen$viewPort = screen.viewPort,
  3891. width = _screen$viewPort.width,
  3892. height = _screen$viewPort.height;
  3893. if (!this.getStyle('width').hasValue()) {
  3894. this.getStyle('width', true).setValue('100%');
  3895. }
  3896. if (!this.getStyle('height').hasValue()) {
  3897. this.getStyle('height', true).setValue('100%');
  3898. }
  3899. if (!this.getStyle('color').hasValue()) {
  3900. this.getStyle('color', true).setValue('black');
  3901. }
  3902. var refXAttr = this.getAttribute('refX');
  3903. var refYAttr = this.getAttribute('refY');
  3904. var viewBoxAttr = this.getAttribute('viewBox');
  3905. var viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;
  3906. var clip = !this.root && this.getAttribute('overflow').getValue('hidden') !== 'visible';
  3907. var minX = 0;
  3908. var minY = 0;
  3909. var clipX = 0;
  3910. var clipY = 0;
  3911. if (viewBox) {
  3912. minX = viewBox[0];
  3913. minY = viewBox[1];
  3914. }
  3915. if (!this.root) {
  3916. width = this.getStyle('width').getPixels('x');
  3917. height = this.getStyle('height').getPixels('y');
  3918. if (this.type === 'marker') {
  3919. clipX = minX;
  3920. clipY = minY;
  3921. minX = 0;
  3922. minY = 0;
  3923. }
  3924. }
  3925. screen.viewPort.setCurrent(width, height);
  3926. if (viewBox) {
  3927. width = viewBox[2];
  3928. height = viewBox[3];
  3929. }
  3930. document.setViewBox({
  3931. ctx: ctx,
  3932. aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
  3933. width: screen.viewPort.width,
  3934. desiredWidth: width,
  3935. height: screen.viewPort.height,
  3936. desiredHeight: height,
  3937. minX: minX,
  3938. minY: minY,
  3939. refX: refXAttr.getValue(),
  3940. refY: refYAttr.getValue(),
  3941. clip: clip,
  3942. clipX: clipX,
  3943. clipY: clipY
  3944. });
  3945. if (viewBox) {
  3946. screen.viewPort.removeCurrent();
  3947. screen.viewPort.setCurrent(width, height);
  3948. }
  3949. }
  3950. /**
  3951. * Resize SVG to fit in given size.
  3952. * @param width
  3953. * @param height
  3954. * @param preserveAspectRatio
  3955. */
  3956. }, {
  3957. key: "resize",
  3958. value: function resize(width) {
  3959. var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
  3960. var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  3961. var widthAttr = this.getAttribute('width', true);
  3962. var heightAttr = this.getAttribute('height', true);
  3963. var viewBoxAttr = this.getAttribute('viewBox');
  3964. var styleAttr = this.getAttribute('style');
  3965. var originWidth = widthAttr.getNumber(0);
  3966. var originHeight = heightAttr.getNumber(0);
  3967. if (preserveAspectRatio) {
  3968. if (typeof preserveAspectRatio === 'string') {
  3969. this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
  3970. } else {
  3971. var preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
  3972. if (preserveAspectRatioAttr.hasValue()) {
  3973. preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
  3974. }
  3975. }
  3976. }
  3977. widthAttr.setValue(width);
  3978. heightAttr.setValue(height);
  3979. if (!viewBoxAttr.hasValue()) {
  3980. viewBoxAttr.setValue("0 0 ".concat(originWidth || width, " ").concat(originHeight || height));
  3981. }
  3982. if (styleAttr.hasValue()) {
  3983. var widthStyle = this.getStyle('width');
  3984. var heightStyle = this.getStyle('height');
  3985. if (widthStyle.hasValue()) {
  3986. widthStyle.setValue("".concat(width, "px"));
  3987. }
  3988. if (heightStyle.hasValue()) {
  3989. heightStyle.setValue("".concat(height, "px"));
  3990. }
  3991. }
  3992. }
  3993. }]);
  3994. return SVGElement;
  3995. }(RenderedElement);
  3996. 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); }; }
  3997. 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; } }
  3998. var RectElement = /*#__PURE__*/function (_PathElement) {
  3999. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RectElement, _PathElement);
  4000. var _super = _createSuper$a(RectElement);
  4001. function RectElement() {
  4002. var _this;
  4003. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RectElement);
  4004. _this = _super.apply(this, arguments);
  4005. _this.type = 'rect';
  4006. return _this;
  4007. }
  4008. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RectElement, [{
  4009. key: "path",
  4010. value: function path(ctx) {
  4011. var x = this.getAttribute('x').getPixels('x');
  4012. var y = this.getAttribute('y').getPixels('y');
  4013. var width = this.getStyle('width').getPixels('x');
  4014. var height = this.getStyle('height').getPixels('y');
  4015. var rxAttr = this.getAttribute('rx');
  4016. var ryAttr = this.getAttribute('ry');
  4017. var rx = rxAttr.getPixels('x');
  4018. var ry = ryAttr.getPixels('y');
  4019. if (rxAttr.hasValue() && !ryAttr.hasValue()) {
  4020. ry = rx;
  4021. }
  4022. if (ryAttr.hasValue() && !rxAttr.hasValue()) {
  4023. rx = ry;
  4024. }
  4025. rx = Math.min(rx, width / 2.0);
  4026. ry = Math.min(ry, height / 2.0);
  4027. if (ctx) {
  4028. var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
  4029. ctx.beginPath(); // always start the path so we don't fill prior paths
  4030. if (height > 0 && width > 0) {
  4031. ctx.moveTo(x + rx, y);
  4032. ctx.lineTo(x + width - rx, y);
  4033. ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);
  4034. ctx.lineTo(x + width, y + height - ry);
  4035. ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);
  4036. ctx.lineTo(x + rx, y + height);
  4037. ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);
  4038. ctx.lineTo(x, y + ry);
  4039. ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);
  4040. ctx.closePath();
  4041. }
  4042. }
  4043. return new BoundingBox(x, y, x + width, y + height);
  4044. }
  4045. }, {
  4046. key: "getMarkers",
  4047. value: function getMarkers() {
  4048. return null;
  4049. }
  4050. }]);
  4051. return RectElement;
  4052. }(PathElement);
  4053. 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); }; }
  4054. 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; } }
  4055. var CircleElement = /*#__PURE__*/function (_PathElement) {
  4056. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(CircleElement, _PathElement);
  4057. var _super = _createSuper$b(CircleElement);
  4058. function CircleElement() {
  4059. var _this;
  4060. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, CircleElement);
  4061. _this = _super.apply(this, arguments);
  4062. _this.type = 'circle';
  4063. return _this;
  4064. }
  4065. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(CircleElement, [{
  4066. key: "path",
  4067. value: function path(ctx) {
  4068. var cx = this.getAttribute('cx').getPixels('x');
  4069. var cy = this.getAttribute('cy').getPixels('y');
  4070. var r = this.getAttribute('r').getPixels();
  4071. if (ctx && r > 0) {
  4072. ctx.beginPath();
  4073. ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
  4074. ctx.closePath();
  4075. }
  4076. return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
  4077. }
  4078. }, {
  4079. key: "getMarkers",
  4080. value: function getMarkers() {
  4081. return null;
  4082. }
  4083. }]);
  4084. return CircleElement;
  4085. }(PathElement);
  4086. 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); }; }
  4087. 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; } }
  4088. var EllipseElement = /*#__PURE__*/function (_PathElement) {
  4089. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(EllipseElement, _PathElement);
  4090. var _super = _createSuper$c(EllipseElement);
  4091. function EllipseElement() {
  4092. var _this;
  4093. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, EllipseElement);
  4094. _this = _super.apply(this, arguments);
  4095. _this.type = 'ellipse';
  4096. return _this;
  4097. }
  4098. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(EllipseElement, [{
  4099. key: "path",
  4100. value: function path(ctx) {
  4101. var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
  4102. var rx = this.getAttribute('rx').getPixels('x');
  4103. var ry = this.getAttribute('ry').getPixels('y');
  4104. var cx = this.getAttribute('cx').getPixels('x');
  4105. var cy = this.getAttribute('cy').getPixels('y');
  4106. if (ctx && rx > 0 && ry > 0) {
  4107. ctx.beginPath();
  4108. ctx.moveTo(cx + rx, cy);
  4109. ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);
  4110. ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);
  4111. ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);
  4112. ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);
  4113. ctx.closePath();
  4114. }
  4115. return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
  4116. }
  4117. }, {
  4118. key: "getMarkers",
  4119. value: function getMarkers() {
  4120. return null;
  4121. }
  4122. }]);
  4123. return EllipseElement;
  4124. }(PathElement);
  4125. 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); }; }
  4126. 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; } }
  4127. var LineElement = /*#__PURE__*/function (_PathElement) {
  4128. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LineElement, _PathElement);
  4129. var _super = _createSuper$d(LineElement);
  4130. function LineElement() {
  4131. var _this;
  4132. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LineElement);
  4133. _this = _super.apply(this, arguments);
  4134. _this.type = 'line';
  4135. return _this;
  4136. }
  4137. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LineElement, [{
  4138. key: "getPoints",
  4139. value: function getPoints() {
  4140. 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'))];
  4141. }
  4142. }, {
  4143. key: "path",
  4144. value: function path(ctx) {
  4145. var _this$getPoints = this.getPoints(),
  4146. _this$getPoints2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints, 2),
  4147. _this$getPoints2$ = _this$getPoints2[0],
  4148. x0 = _this$getPoints2$.x,
  4149. y0 = _this$getPoints2$.y,
  4150. _this$getPoints2$2 = _this$getPoints2[1],
  4151. x1 = _this$getPoints2$2.x,
  4152. y1 = _this$getPoints2$2.y;
  4153. if (ctx) {
  4154. ctx.beginPath();
  4155. ctx.moveTo(x0, y0);
  4156. ctx.lineTo(x1, y1);
  4157. }
  4158. return new BoundingBox(x0, y0, x1, y1);
  4159. }
  4160. }, {
  4161. key: "getMarkers",
  4162. value: function getMarkers() {
  4163. var _this$getPoints3 = this.getPoints(),
  4164. _this$getPoints4 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(_this$getPoints3, 2),
  4165. p0 = _this$getPoints4[0],
  4166. p1 = _this$getPoints4[1];
  4167. var a = p0.angleTo(p1);
  4168. return [[p0, a], [p1, a]];
  4169. }
  4170. }]);
  4171. return LineElement;
  4172. }(PathElement);
  4173. 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); }; }
  4174. 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; } }
  4175. var PolylineElement = /*#__PURE__*/function (_PathElement) {
  4176. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolylineElement, _PathElement);
  4177. var _super = _createSuper$e(PolylineElement);
  4178. function PolylineElement(document, node, captureTextNodes) {
  4179. var _this;
  4180. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolylineElement);
  4181. _this = _super.call(this, document, node, captureTextNodes);
  4182. _this.type = 'polyline';
  4183. _this.points = [];
  4184. _this.points = Point.parsePath(_this.getAttribute('points').getString());
  4185. return _this;
  4186. }
  4187. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolylineElement, [{
  4188. key: "path",
  4189. value: function path(ctx) {
  4190. var points = this.points;
  4191. var _points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(points, 1),
  4192. _points$ = _points[0],
  4193. x0 = _points$.x,
  4194. y0 = _points$.y;
  4195. var boundingBox = new BoundingBox(x0, y0);
  4196. if (ctx) {
  4197. ctx.beginPath();
  4198. ctx.moveTo(x0, y0);
  4199. }
  4200. points.forEach(function (_ref) {
  4201. var x = _ref.x,
  4202. y = _ref.y;
  4203. boundingBox.addPoint(x, y);
  4204. if (ctx) {
  4205. ctx.lineTo(x, y);
  4206. }
  4207. });
  4208. return boundingBox;
  4209. }
  4210. }, {
  4211. key: "getMarkers",
  4212. value: function getMarkers() {
  4213. var points = this.points;
  4214. var lastIndex = points.length - 1;
  4215. var markers = [];
  4216. points.forEach(function (point, i) {
  4217. if (i === lastIndex) {
  4218. return;
  4219. }
  4220. markers.push([point, point.angleTo(points[i + 1])]);
  4221. });
  4222. if (markers.length > 0) {
  4223. markers.push([points[points.length - 1], markers[markers.length - 1][1]]);
  4224. }
  4225. return markers;
  4226. }
  4227. }]);
  4228. return PolylineElement;
  4229. }(PathElement);
  4230. 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); }; }
  4231. 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; } }
  4232. var PolygonElement = /*#__PURE__*/function (_PolylineElement) {
  4233. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PolygonElement, _PolylineElement);
  4234. var _super = _createSuper$f(PolygonElement);
  4235. function PolygonElement() {
  4236. var _this;
  4237. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PolygonElement);
  4238. _this = _super.apply(this, arguments);
  4239. _this.type = 'polygon';
  4240. return _this;
  4241. }
  4242. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PolygonElement, [{
  4243. key: "path",
  4244. value: function path(ctx) {
  4245. 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);
  4246. var _this$points = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(this.points, 1),
  4247. _this$points$ = _this$points[0],
  4248. x = _this$points$.x,
  4249. y = _this$points$.y;
  4250. if (ctx) {
  4251. ctx.lineTo(x, y);
  4252. ctx.closePath();
  4253. }
  4254. return boundingBox;
  4255. }
  4256. }]);
  4257. return PolygonElement;
  4258. }(PolylineElement);
  4259. 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); }; }
  4260. 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; } }
  4261. var PatternElement = /*#__PURE__*/function (_Element) {
  4262. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(PatternElement, _Element);
  4263. var _super = _createSuper$g(PatternElement);
  4264. function PatternElement() {
  4265. var _this;
  4266. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, PatternElement);
  4267. _this = _super.apply(this, arguments);
  4268. _this.type = 'pattern';
  4269. return _this;
  4270. }
  4271. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(PatternElement, [{
  4272. key: "createPattern",
  4273. value: function createPattern(ctx, _, parentOpacityProp) {
  4274. var width = this.getStyle('width').getPixels('x', true);
  4275. var height = this.getStyle('height').getPixels('y', true); // render me using a temporary svg element
  4276. var patternSvg = new SVGElement(this.document, null);
  4277. patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
  4278. patternSvg.attributes.width = new Property(this.document, 'width', "".concat(width, "px"));
  4279. patternSvg.attributes.height = new Property(this.document, 'height', "".concat(height, "px"));
  4280. patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
  4281. patternSvg.children = this.children;
  4282. var patternCanvas = this.document.createCanvas(width, height);
  4283. var patternCtx = patternCanvas.getContext('2d');
  4284. var xAttr = this.getAttribute('x');
  4285. var yAttr = this.getAttribute('y');
  4286. if (xAttr.hasValue() && yAttr.hasValue()) {
  4287. patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
  4288. }
  4289. if (parentOpacityProp.hasValue()) {
  4290. this.styles['fill-opacity'] = parentOpacityProp;
  4291. } else {
  4292. Reflect.deleteProperty(this.styles, 'fill-opacity');
  4293. } // render 3x3 grid so when we transform there's no white space on edges
  4294. for (var x = -1; x <= 1; x++) {
  4295. for (var y = -1; y <= 1; y++) {
  4296. patternCtx.save();
  4297. patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
  4298. patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
  4299. patternSvg.render(patternCtx);
  4300. patternCtx.restore();
  4301. }
  4302. }
  4303. var pattern = ctx.createPattern(patternCanvas, 'repeat');
  4304. return pattern;
  4305. }
  4306. }]);
  4307. return PatternElement;
  4308. }(Element);
  4309. 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); }; }
  4310. 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; } }
  4311. var MarkerElement = /*#__PURE__*/function (_Element) {
  4312. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MarkerElement, _Element);
  4313. var _super = _createSuper$h(MarkerElement);
  4314. function MarkerElement() {
  4315. var _this;
  4316. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MarkerElement);
  4317. _this = _super.apply(this, arguments);
  4318. _this.type = 'marker';
  4319. return _this;
  4320. }
  4321. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MarkerElement, [{
  4322. key: "render",
  4323. value: function render(ctx, point, angle) {
  4324. if (!point) {
  4325. return;
  4326. }
  4327. var x = point.x,
  4328. y = point.y;
  4329. var orient = this.getAttribute('orient').getValue('auto');
  4330. var markerUnits = this.getAttribute('markerUnits').getValue('strokeWidth');
  4331. ctx.translate(x, y);
  4332. if (orient === 'auto') {
  4333. ctx.rotate(angle);
  4334. }
  4335. if (markerUnits === 'strokeWidth') {
  4336. ctx.scale(ctx.lineWidth, ctx.lineWidth);
  4337. }
  4338. ctx.save(); // render me using a temporary svg element
  4339. var markerSvg = new SVGElement(this.document, null);
  4340. markerSvg.type = this.type;
  4341. markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
  4342. markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
  4343. markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
  4344. markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
  4345. markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
  4346. markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
  4347. markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
  4348. markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
  4349. markerSvg.children = this.children;
  4350. markerSvg.render(ctx);
  4351. ctx.restore();
  4352. if (markerUnits === 'strokeWidth') {
  4353. ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
  4354. }
  4355. if (orient === 'auto') {
  4356. ctx.rotate(-angle);
  4357. }
  4358. ctx.translate(-x, -y);
  4359. }
  4360. }]);
  4361. return MarkerElement;
  4362. }(Element);
  4363. 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); }; }
  4364. 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; } }
  4365. var DefsElement = /*#__PURE__*/function (_Element) {
  4366. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DefsElement, _Element);
  4367. var _super = _createSuper$i(DefsElement);
  4368. function DefsElement() {
  4369. var _this;
  4370. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DefsElement);
  4371. _this = _super.apply(this, arguments);
  4372. _this.type = 'defs';
  4373. return _this;
  4374. }
  4375. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(DefsElement, [{
  4376. key: "render",
  4377. value: function render() {// NOOP
  4378. }
  4379. }]);
  4380. return DefsElement;
  4381. }(Element);
  4382. 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); }; }
  4383. 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; } }
  4384. var GElement = /*#__PURE__*/function (_RenderedElement) {
  4385. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GElement, _RenderedElement);
  4386. var _super = _createSuper$j(GElement);
  4387. function GElement() {
  4388. var _this;
  4389. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GElement);
  4390. _this = _super.apply(this, arguments);
  4391. _this.type = 'g';
  4392. return _this;
  4393. }
  4394. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GElement, [{
  4395. key: "getBoundingBox",
  4396. value: function getBoundingBox(ctx) {
  4397. var boundingBox = new BoundingBox();
  4398. this.children.forEach(function (child) {
  4399. boundingBox.addBoundingBox(child.getBoundingBox(ctx));
  4400. });
  4401. return boundingBox;
  4402. }
  4403. }]);
  4404. return GElement;
  4405. }(RenderedElement);
  4406. 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); }; }
  4407. 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; } }
  4408. var GradientElement = /*#__PURE__*/function (_Element) {
  4409. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GradientElement, _Element);
  4410. var _super = _createSuper$k(GradientElement);
  4411. function GradientElement(document, node, captureTextNodes) {
  4412. var _this;
  4413. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GradientElement);
  4414. _this = _super.call(this, document, node, captureTextNodes);
  4415. _this.attributesToInherit = ['gradientUnits'];
  4416. _this.stops = [];
  4417. var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
  4418. stops = _assertThisInitialize.stops,
  4419. children = _assertThisInitialize.children;
  4420. children.forEach(function (child) {
  4421. if (child.type === 'stop') {
  4422. stops.push(child);
  4423. }
  4424. });
  4425. return _this;
  4426. }
  4427. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(GradientElement, [{
  4428. key: "getGradientUnits",
  4429. value: function getGradientUnits() {
  4430. return this.getAttribute('gradientUnits').getString('objectBoundingBox');
  4431. }
  4432. }, {
  4433. key: "createGradient",
  4434. value: function createGradient(ctx, element, parentOpacityProp) {
  4435. var _this2 = this;
  4436. // tslint:disable-next-line: no-this-assignment
  4437. var stopsContainer = this;
  4438. if (this.getHrefAttribute().hasValue()) {
  4439. stopsContainer = this.getHrefAttribute().getDefinition();
  4440. this.inheritStopContainer(stopsContainer);
  4441. }
  4442. var _stopsContainer = stopsContainer,
  4443. stops = _stopsContainer.stops;
  4444. var gradient = this.getGradient(ctx, element);
  4445. if (!gradient) {
  4446. return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
  4447. }
  4448. stops.forEach(function (stop) {
  4449. gradient.addColorStop(stop.offset, _this2.addParentOpacity(parentOpacityProp, stop.color));
  4450. });
  4451. if (this.getAttribute('gradientTransform').hasValue()) {
  4452. // render as transformed pattern on temporary canvas
  4453. var document = this.document;
  4454. var _document$screen = document.screen,
  4455. MAX_VIRTUAL_PIXELS = _document$screen.MAX_VIRTUAL_PIXELS,
  4456. viewPort = _document$screen.viewPort;
  4457. var _viewPort$viewPorts = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__.default)(viewPort.viewPorts, 1),
  4458. rootView = _viewPort$viewPorts[0];
  4459. var rect = new RectElement(document, null);
  4460. rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
  4461. rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
  4462. rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
  4463. rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
  4464. var group = new GElement(document, null);
  4465. group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
  4466. group.children = [rect];
  4467. var patternSvg = new SVGElement(document, null);
  4468. patternSvg.attributes.x = new Property(document, 'x', 0);
  4469. patternSvg.attributes.y = new Property(document, 'y', 0);
  4470. patternSvg.attributes.width = new Property(document, 'width', rootView.width);
  4471. patternSvg.attributes.height = new Property(document, 'height', rootView.height);
  4472. patternSvg.children = [group];
  4473. var patternCanvas = document.createCanvas(rootView.width, rootView.height);
  4474. var patternCtx = patternCanvas.getContext('2d');
  4475. patternCtx.fillStyle = gradient;
  4476. patternSvg.render(patternCtx);
  4477. return patternCtx.createPattern(patternCanvas, 'no-repeat');
  4478. }
  4479. return gradient;
  4480. }
  4481. }, {
  4482. key: "inheritStopContainer",
  4483. value: function inheritStopContainer(stopsContainer) {
  4484. var _this3 = this;
  4485. this.attributesToInherit.forEach(function (attributeToInherit) {
  4486. if (!_this3.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
  4487. _this3.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
  4488. }
  4489. });
  4490. }
  4491. }, {
  4492. key: "addParentOpacity",
  4493. value: function addParentOpacity(parentOpacityProp, color) {
  4494. if (parentOpacityProp.hasValue()) {
  4495. var colorProp = new Property(this.document, 'color', color);
  4496. return colorProp.addOpacity(parentOpacityProp).getColor();
  4497. }
  4498. return color;
  4499. }
  4500. }]);
  4501. return GradientElement;
  4502. }(Element);
  4503. 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); }; }
  4504. 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; } }
  4505. var LinearGradientElement = /*#__PURE__*/function (_GradientElement) {
  4506. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(LinearGradientElement, _GradientElement);
  4507. var _super = _createSuper$l(LinearGradientElement);
  4508. function LinearGradientElement(document, node, captureTextNodes) {
  4509. var _this;
  4510. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, LinearGradientElement);
  4511. _this = _super.call(this, document, node, captureTextNodes);
  4512. _this.type = 'linearGradient';
  4513. _this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
  4514. return _this;
  4515. }
  4516. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(LinearGradientElement, [{
  4517. key: "getGradient",
  4518. value: function getGradient(ctx, element) {
  4519. var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
  4520. var boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;
  4521. if (isBoundingBoxUnits && !boundingBox) {
  4522. return null;
  4523. }
  4524. if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {
  4525. this.getAttribute('x1', true).setValue(0);
  4526. this.getAttribute('y1', true).setValue(0);
  4527. this.getAttribute('x2', true).setValue(1);
  4528. this.getAttribute('y2', true).setValue(0);
  4529. }
  4530. var x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');
  4531. var y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');
  4532. var x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');
  4533. var y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');
  4534. if (x1 === x2 && y1 === y2) {
  4535. return null;
  4536. }
  4537. return ctx.createLinearGradient(x1, y1, x2, y2);
  4538. }
  4539. }]);
  4540. return LinearGradientElement;
  4541. }(GradientElement);
  4542. 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); }; }
  4543. 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; } }
  4544. var RadialGradientElement = /*#__PURE__*/function (_GradientElement) {
  4545. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(RadialGradientElement, _GradientElement);
  4546. var _super = _createSuper$m(RadialGradientElement);
  4547. function RadialGradientElement(document, node, captureTextNodes) {
  4548. var _this;
  4549. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, RadialGradientElement);
  4550. _this = _super.call(this, document, node, captureTextNodes);
  4551. _this.type = 'radialGradient';
  4552. _this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
  4553. return _this;
  4554. }
  4555. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(RadialGradientElement, [{
  4556. key: "getGradient",
  4557. value: function getGradient(ctx, element) {
  4558. var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
  4559. var boundingBox = element.getBoundingBox(ctx);
  4560. if (isBoundingBoxUnits && !boundingBox) {
  4561. return null;
  4562. }
  4563. if (!this.getAttribute('cx').hasValue()) {
  4564. this.getAttribute('cx', true).setValue('50%');
  4565. }
  4566. if (!this.getAttribute('cy').hasValue()) {
  4567. this.getAttribute('cy', true).setValue('50%');
  4568. }
  4569. if (!this.getAttribute('r').hasValue()) {
  4570. this.getAttribute('r', true).setValue('50%');
  4571. }
  4572. var cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');
  4573. var cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');
  4574. var fx = cx;
  4575. var fy = cy;
  4576. if (this.getAttribute('fx').hasValue()) {
  4577. fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');
  4578. }
  4579. if (this.getAttribute('fy').hasValue()) {
  4580. fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');
  4581. }
  4582. var r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();
  4583. var fr = this.getAttribute('fr').getPixels();
  4584. return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
  4585. }
  4586. }]);
  4587. return RadialGradientElement;
  4588. }(GradientElement);
  4589. 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); }; }
  4590. 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; } }
  4591. var StopElement = /*#__PURE__*/function (_Element) {
  4592. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StopElement, _Element);
  4593. var _super = _createSuper$n(StopElement);
  4594. function StopElement(document, node, captureTextNodes) {
  4595. var _this;
  4596. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StopElement);
  4597. _this = _super.call(this, document, node, captureTextNodes);
  4598. _this.type = 'stop';
  4599. var offset = Math.max(0, Math.min(1, _this.getAttribute('offset').getNumber()));
  4600. var stopOpacity = _this.getStyle('stop-opacity');
  4601. var stopColor = _this.getStyle('stop-color', true);
  4602. if (stopColor.getString() === '') {
  4603. stopColor.setValue('#000');
  4604. }
  4605. if (stopOpacity.hasValue()) {
  4606. stopColor = stopColor.addOpacity(stopOpacity);
  4607. }
  4608. _this.offset = offset;
  4609. _this.color = stopColor.getColor();
  4610. return _this;
  4611. }
  4612. return StopElement;
  4613. }(Element);
  4614. 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); }; }
  4615. 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; } }
  4616. var AnimateElement = /*#__PURE__*/function (_Element) {
  4617. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateElement, _Element);
  4618. var _super = _createSuper$o(AnimateElement);
  4619. function AnimateElement(document, node, captureTextNodes) {
  4620. var _this;
  4621. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateElement);
  4622. _this = _super.call(this, document, node, captureTextNodes);
  4623. _this.type = 'animate';
  4624. _this.duration = 0;
  4625. _this.initialValue = null;
  4626. _this.initialUnits = '';
  4627. _this.removed = false;
  4628. _this.frozen = false;
  4629. document.screen.animations.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
  4630. _this.begin = _this.getAttribute('begin').getMilliseconds();
  4631. _this.maxDuration = _this.begin + _this.getAttribute('dur').getMilliseconds();
  4632. _this.from = _this.getAttribute('from');
  4633. _this.to = _this.getAttribute('to');
  4634. _this.values = _this.getAttribute('values');
  4635. if (_this.values.hasValue()) {
  4636. _this.values.setValue(_this.values.getString().split(';'));
  4637. }
  4638. return _this;
  4639. }
  4640. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateElement, [{
  4641. key: "getProperty",
  4642. value: function getProperty() {
  4643. var attributeType = this.getAttribute('attributeType').getString();
  4644. var attributeName = this.getAttribute('attributeName').getString();
  4645. if (attributeType === 'CSS') {
  4646. return this.parent.getStyle(attributeName, true);
  4647. }
  4648. return this.parent.getAttribute(attributeName, true);
  4649. }
  4650. }, {
  4651. key: "calcValue",
  4652. value: function calcValue() {
  4653. var initialUnits = this.initialUnits;
  4654. var _this$getProgress = this.getProgress(),
  4655. progress = _this$getProgress.progress,
  4656. from = _this$getProgress.from,
  4657. to = _this$getProgress.to; // tween value linearly
  4658. var newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
  4659. if (initialUnits === '%') {
  4660. newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
  4661. }
  4662. return "".concat(newValue).concat(initialUnits);
  4663. }
  4664. }, {
  4665. key: "update",
  4666. value: function update(delta) {
  4667. var parent = this.parent;
  4668. var prop = this.getProperty(); // set initial value
  4669. if (!this.initialValue) {
  4670. this.initialValue = prop.getString();
  4671. this.initialUnits = prop.getUnits();
  4672. } // if we're past the end time
  4673. if (this.duration > this.maxDuration) {
  4674. var fill = this.getAttribute('fill').getString('remove'); // loop for indefinitely repeating animations
  4675. if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {
  4676. this.duration = 0;
  4677. } else if (fill === 'freeze' && !this.frozen) {
  4678. this.frozen = true;
  4679. parent.animationFrozen = true;
  4680. parent.animationFrozenValue = prop.getString();
  4681. } else if (fill === 'remove' && !this.removed) {
  4682. this.removed = true;
  4683. prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);
  4684. return true;
  4685. }
  4686. return false;
  4687. }
  4688. this.duration += delta; // if we're past the begin time
  4689. var updated = false;
  4690. if (this.begin < this.duration) {
  4691. var newValue = this.calcValue(); // tween
  4692. var typeAttr = this.getAttribute('type');
  4693. if (typeAttr.hasValue()) {
  4694. // for transform, etc.
  4695. var type = typeAttr.getString();
  4696. newValue = "".concat(type, "(").concat(newValue, ")");
  4697. }
  4698. prop.setValue(newValue);
  4699. updated = true;
  4700. }
  4701. return updated;
  4702. }
  4703. }, {
  4704. key: "getProgress",
  4705. value: function getProgress() {
  4706. var document = this.document,
  4707. values = this.values;
  4708. var result = {
  4709. progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
  4710. };
  4711. if (values.hasValue()) {
  4712. var p = result.progress * (values.getValue().length - 1);
  4713. var lb = Math.floor(p);
  4714. var ub = Math.ceil(p);
  4715. result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
  4716. result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
  4717. result.progress = (p - lb) / (ub - lb);
  4718. } else {
  4719. result.from = this.from;
  4720. result.to = this.to;
  4721. }
  4722. return result;
  4723. }
  4724. }]);
  4725. return AnimateElement;
  4726. }(Element);
  4727. 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); }; }
  4728. 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; } }
  4729. var AnimateColorElement = /*#__PURE__*/function (_AnimateElement) {
  4730. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateColorElement, _AnimateElement);
  4731. var _super = _createSuper$p(AnimateColorElement);
  4732. function AnimateColorElement() {
  4733. var _this;
  4734. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateColorElement);
  4735. _this = _super.apply(this, arguments);
  4736. _this.type = 'animateColor';
  4737. return _this;
  4738. }
  4739. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateColorElement, [{
  4740. key: "calcValue",
  4741. value: function calcValue() {
  4742. var _this$getProgress = this.getProgress(),
  4743. progress = _this$getProgress.progress,
  4744. from = _this$getProgress.from,
  4745. to = _this$getProgress.to;
  4746. var colorFrom = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(from.getColor());
  4747. var colorTo = new (rgbcolor__WEBPACK_IMPORTED_MODULE_27___default())(to.getColor());
  4748. if (colorFrom.ok && colorTo.ok) {
  4749. // tween color linearly
  4750. var r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
  4751. var g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
  4752. var b = colorFrom.b + (colorTo.b - colorFrom.b) * progress; // ? alpha
  4753. return "rgb(".concat(parseInt(r, 10), ", ").concat(parseInt(g, 10), ", ").concat(parseInt(b, 10), ")");
  4754. }
  4755. return this.getAttribute('from').getColor();
  4756. }
  4757. }]);
  4758. return AnimateColorElement;
  4759. }(AnimateElement);
  4760. 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); }; }
  4761. 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; } }
  4762. var AnimateTransformElement = /*#__PURE__*/function (_AnimateElement) {
  4763. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AnimateTransformElement, _AnimateElement);
  4764. var _super = _createSuper$q(AnimateTransformElement);
  4765. function AnimateTransformElement() {
  4766. var _this;
  4767. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AnimateTransformElement);
  4768. _this = _super.apply(this, arguments);
  4769. _this.type = 'animateTransform';
  4770. return _this;
  4771. }
  4772. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AnimateTransformElement, [{
  4773. key: "calcValue",
  4774. value: function calcValue() {
  4775. var _this$getProgress = this.getProgress(),
  4776. progress = _this$getProgress.progress,
  4777. from = _this$getProgress.from,
  4778. to = _this$getProgress.to; // tween value linearly
  4779. var transformFrom = toNumbers(from.getString());
  4780. var transformTo = toNumbers(to.getString());
  4781. var newValue = transformFrom.map(function (from, i) {
  4782. var to = transformTo[i];
  4783. return from + (to - from) * progress;
  4784. }).join(' ');
  4785. return newValue;
  4786. }
  4787. }]);
  4788. return AnimateTransformElement;
  4789. }(AnimateElement);
  4790. 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; } } }; }
  4791. 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); }
  4792. 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; }
  4793. 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); }; }
  4794. 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; } }
  4795. var FontElement = /*#__PURE__*/function (_Element) {
  4796. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontElement, _Element);
  4797. var _super = _createSuper$r(FontElement);
  4798. function FontElement(document, node, captureTextNodes) {
  4799. var _this;
  4800. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontElement);
  4801. _this = _super.call(this, document, node, captureTextNodes);
  4802. _this.type = 'font';
  4803. _this.glyphs = {};
  4804. _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
  4805. var definitions = document.definitions;
  4806. var _assertThisInitialize = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this),
  4807. children = _assertThisInitialize.children;
  4808. var _iterator = _createForOfIteratorHelper(children),
  4809. _step;
  4810. try {
  4811. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  4812. var child = _step.value;
  4813. switch (child.type) {
  4814. case 'font-face':
  4815. {
  4816. _this.fontFace = child;
  4817. var fontFamilyStyle = child.getStyle('font-family');
  4818. if (fontFamilyStyle.hasValue()) {
  4819. definitions[fontFamilyStyle.getString()] = (0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this);
  4820. }
  4821. break;
  4822. }
  4823. case 'missing-glyph':
  4824. _this.missingGlyph = child;
  4825. break;
  4826. case 'glyph':
  4827. {
  4828. var glyph = child;
  4829. if (glyph.arabicForm) {
  4830. _this.isRTL = true;
  4831. _this.isArabic = true;
  4832. if (typeof _this.glyphs[glyph.unicode] === 'undefined') {
  4833. _this.glyphs[glyph.unicode] = {};
  4834. }
  4835. _this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
  4836. } else {
  4837. _this.glyphs[glyph.unicode] = glyph;
  4838. }
  4839. break;
  4840. }
  4841. default:
  4842. }
  4843. }
  4844. } catch (err) {
  4845. _iterator.e(err);
  4846. } finally {
  4847. _iterator.f();
  4848. }
  4849. return _this;
  4850. }
  4851. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FontElement, [{
  4852. key: "render",
  4853. value: function render() {// NO RENDER
  4854. }
  4855. }]);
  4856. return FontElement;
  4857. }(Element);
  4858. 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); }; }
  4859. 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; } }
  4860. var FontFaceElement = /*#__PURE__*/function (_Element) {
  4861. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FontFaceElement, _Element);
  4862. var _super = _createSuper$s(FontFaceElement);
  4863. function FontFaceElement(document, node, captureTextNodes) {
  4864. var _this;
  4865. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FontFaceElement);
  4866. _this = _super.call(this, document, node, captureTextNodes);
  4867. _this.type = 'font-face';
  4868. _this.ascent = _this.getAttribute('ascent').getNumber();
  4869. _this.descent = _this.getAttribute('descent').getNumber();
  4870. _this.unitsPerEm = _this.getAttribute('units-per-em').getNumber();
  4871. return _this;
  4872. }
  4873. return FontFaceElement;
  4874. }(Element);
  4875. 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); }; }
  4876. 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; } }
  4877. var MissingGlyphElement = /*#__PURE__*/function (_PathElement) {
  4878. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MissingGlyphElement, _PathElement);
  4879. var _super = _createSuper$t(MissingGlyphElement);
  4880. function MissingGlyphElement() {
  4881. var _this;
  4882. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MissingGlyphElement);
  4883. _this = _super.apply(this, arguments);
  4884. _this.type = 'missing-glyph';
  4885. _this.horizAdvX = 0;
  4886. return _this;
  4887. }
  4888. return MissingGlyphElement;
  4889. }(PathElement);
  4890. 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); }; }
  4891. 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; } }
  4892. var GlyphElement = /*#__PURE__*/function (_PathElement) {
  4893. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(GlyphElement, _PathElement);
  4894. var _super = _createSuper$u(GlyphElement);
  4895. function GlyphElement(document, node, captureTextNodes) {
  4896. var _this;
  4897. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, GlyphElement);
  4898. _this = _super.call(this, document, node, captureTextNodes);
  4899. _this.type = 'glyph';
  4900. _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
  4901. _this.unicode = _this.getAttribute('unicode').getString();
  4902. _this.arabicForm = _this.getAttribute('arabic-form').getString();
  4903. return _this;
  4904. }
  4905. return GlyphElement;
  4906. }(PathElement);
  4907. 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); }; }
  4908. 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; } }
  4909. var TRefElement = /*#__PURE__*/function (_TextElement) {
  4910. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TRefElement, _TextElement);
  4911. var _super = _createSuper$v(TRefElement);
  4912. function TRefElement() {
  4913. var _this;
  4914. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TRefElement);
  4915. _this = _super.apply(this, arguments);
  4916. _this.type = 'tref';
  4917. return _this;
  4918. }
  4919. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TRefElement, [{
  4920. key: "getText",
  4921. value: function getText() {
  4922. var element = this.getHrefAttribute().getDefinition();
  4923. if (element) {
  4924. var firstChild = element.children[0];
  4925. if (firstChild) {
  4926. return firstChild.getText();
  4927. }
  4928. }
  4929. return '';
  4930. }
  4931. }]);
  4932. return TRefElement;
  4933. }(TextElement);
  4934. 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); }; }
  4935. 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; } }
  4936. var AElement = /*#__PURE__*/function (_TextElement) {
  4937. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(AElement, _TextElement);
  4938. var _super = _createSuper$w(AElement);
  4939. function AElement(document, node, captureTextNodes) {
  4940. var _this;
  4941. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, AElement);
  4942. _this = _super.call(this, document, node, captureTextNodes);
  4943. _this.type = 'a';
  4944. var childNodes = node.childNodes;
  4945. var firstChild = childNodes[0];
  4946. var hasText = childNodes.length > 0 && Array.from(childNodes).every(function (node) {
  4947. return node.nodeType === 3;
  4948. });
  4949. _this.hasText = hasText;
  4950. _this.text = hasText ? _this.getTextFromNode(firstChild) : '';
  4951. return _this;
  4952. }
  4953. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(AElement, [{
  4954. key: "getText",
  4955. value: function getText() {
  4956. return this.text;
  4957. }
  4958. }, {
  4959. key: "renderChildren",
  4960. value: function renderChildren(ctx) {
  4961. if (this.hasText) {
  4962. // render as text element
  4963. (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);
  4964. var document = this.document,
  4965. x = this.x,
  4966. y = this.y;
  4967. var mouse = document.screen.mouse;
  4968. var fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize); // Do not calc bounding box if mouse is not working.
  4969. if (mouse.isWorking()) {
  4970. mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
  4971. }
  4972. } else if (this.children.length > 0) {
  4973. // render as temporary group
  4974. var g = new GElement(this.document, null);
  4975. g.children = this.children;
  4976. g.parent = this;
  4977. g.render(ctx);
  4978. }
  4979. }
  4980. }, {
  4981. key: "onClick",
  4982. value: function onClick() {
  4983. var window = this.document.window;
  4984. if (window) {
  4985. window.open(this.getHrefAttribute().getString());
  4986. }
  4987. }
  4988. }, {
  4989. key: "onMouseMove",
  4990. value: function onMouseMove() {
  4991. var ctx = this.document.ctx;
  4992. ctx.canvas.style.cursor = 'pointer';
  4993. }
  4994. }]);
  4995. return AElement;
  4996. }(TextElement);
  4997. 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; } } }; }
  4998. 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); }
  4999. 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; }
  5000. 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); }; }
  5001. 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; } }
  5002. var TextPathElement = /*#__PURE__*/function (_TextElement) {
  5003. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TextPathElement, _TextElement);
  5004. var _super = _createSuper$x(TextPathElement);
  5005. function TextPathElement(document, node, captureTextNodes) {
  5006. var _this;
  5007. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TextPathElement);
  5008. _this = _super.call(this, document, node, captureTextNodes);
  5009. _this.type = 'textPath';
  5010. _this.textWidth = 0;
  5011. _this.textHeight = 0;
  5012. _this.pathLength = -1;
  5013. _this.glyphInfo = null;
  5014. _this.letterSpacingCache = [];
  5015. _this.measuresCache = new Map([['', 0]]);
  5016. var pathElement = _this.getHrefAttribute().getDefinition();
  5017. _this.text = _this.getTextFromNode();
  5018. _this.dataArray = _this.parsePathData(pathElement);
  5019. return _this;
  5020. }
  5021. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(TextPathElement, [{
  5022. key: "getText",
  5023. value: function getText() {
  5024. return this.text;
  5025. }
  5026. }, {
  5027. key: "path",
  5028. value: function path(ctx) {
  5029. var dataArray = this.dataArray;
  5030. if (ctx) {
  5031. ctx.beginPath();
  5032. }
  5033. dataArray.forEach(function (_ref) {
  5034. var command = _ref.command,
  5035. points = _ref.points;
  5036. switch (command) {
  5037. case 'L':
  5038. if (ctx) {
  5039. ctx.lineTo(points[0], points[1]);
  5040. }
  5041. break;
  5042. case 'M':
  5043. if (ctx) {
  5044. ctx.moveTo(points[0], points[1]);
  5045. }
  5046. break;
  5047. case 'C':
  5048. if (ctx) {
  5049. ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
  5050. }
  5051. break;
  5052. case 'Q':
  5053. if (ctx) {
  5054. ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
  5055. }
  5056. break;
  5057. case 'A':
  5058. {
  5059. var cx = points[0];
  5060. var cy = points[1];
  5061. var rx = points[2];
  5062. var ry = points[3];
  5063. var theta = points[4];
  5064. var dTheta = points[5];
  5065. var psi = points[6];
  5066. var fs = points[7];
  5067. var r = rx > ry ? rx : ry;
  5068. var scaleX = rx > ry ? 1 : rx / ry;
  5069. var scaleY = rx > ry ? ry / rx : 1;
  5070. if (ctx) {
  5071. ctx.translate(cx, cy);
  5072. ctx.rotate(psi);
  5073. ctx.scale(scaleX, scaleY);
  5074. ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
  5075. ctx.scale(1 / scaleX, 1 / scaleY);
  5076. ctx.rotate(-psi);
  5077. ctx.translate(-cx, -cy);
  5078. }
  5079. break;
  5080. }
  5081. case 'z':
  5082. if (ctx) {
  5083. ctx.closePath();
  5084. }
  5085. break;
  5086. }
  5087. });
  5088. }
  5089. }, {
  5090. key: "renderChildren",
  5091. value: function renderChildren(ctx) {
  5092. this.setTextData(ctx);
  5093. ctx.save();
  5094. var textDecoration = this.parent.getStyle('text-decoration').getString();
  5095. var fontSize = this.getFontSize();
  5096. var glyphInfo = this.glyphInfo;
  5097. var fill = ctx.fillStyle;
  5098. if (textDecoration === 'underline') {
  5099. ctx.beginPath();
  5100. }
  5101. glyphInfo.forEach(function (glyph, i) {
  5102. var p0 = glyph.p0,
  5103. p1 = glyph.p1,
  5104. partialText = glyph.text;
  5105. ctx.save();
  5106. ctx.translate(p0.x, p0.y);
  5107. ctx.rotate(glyphInfo[i].rotation);
  5108. if (ctx.fillStyle) {
  5109. ctx.fillText(partialText, 0, 0);
  5110. }
  5111. if (ctx.strokeStyle) {
  5112. ctx.strokeText(partialText, 0, 0);
  5113. }
  5114. ctx.restore();
  5115. if (textDecoration === 'underline') {
  5116. if (i === 0) {
  5117. ctx.moveTo(p0.x, p0.y + fontSize / 8);
  5118. }
  5119. ctx.lineTo(p1.x, p1.y + fontSize / 5);
  5120. } //// To assist with debugging visually, uncomment following
  5121. //
  5122. // ctx.beginPath();
  5123. // if (i % 2)
  5124. // ctx.strokeStyle = 'red';
  5125. // else
  5126. // ctx.strokeStyle = 'green';
  5127. // ctx.moveTo(p0.x, p0.y);
  5128. // ctx.lineTo(p1.x, p1.y);
  5129. // ctx.stroke();
  5130. // ctx.closePath();
  5131. });
  5132. if (textDecoration === 'underline') {
  5133. ctx.lineWidth = fontSize / 20;
  5134. ctx.strokeStyle = fill;
  5135. ctx.stroke();
  5136. ctx.closePath();
  5137. }
  5138. ctx.restore();
  5139. }
  5140. }, {
  5141. key: "getLetterSpacingAt",
  5142. value: function getLetterSpacingAt() {
  5143. var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  5144. return this.letterSpacingCache[idx] || 0;
  5145. }
  5146. }, {
  5147. key: "findSegmentToFitChar",
  5148. value: function findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, c, charI) {
  5149. var offset = inputOffset;
  5150. var glyphWidth = this.measureText(ctx, c);
  5151. if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {
  5152. glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
  5153. }
  5154. if (charI > -1) {
  5155. offset += this.getLetterSpacingAt(charI);
  5156. }
  5157. var splineStep = this.textHeight / 20;
  5158. var segment = {
  5159. p0: this.getEquidistantPointOnPath(offset, splineStep),
  5160. p1: this.getEquidistantPointOnPath(offset + glyphWidth, splineStep)
  5161. };
  5162. offset += glyphWidth;
  5163. return {
  5164. offset: offset,
  5165. segment: segment
  5166. };
  5167. }
  5168. }, {
  5169. key: "measureText",
  5170. value: function measureText(ctx, text) {
  5171. var measuresCache = this.measuresCache;
  5172. var targetText = text || this.getText();
  5173. if (measuresCache.has(targetText)) {
  5174. return measuresCache.get(targetText);
  5175. }
  5176. var measure = this.measureTargetText(ctx, targetText);
  5177. measuresCache.set(targetText, measure);
  5178. return measure;
  5179. } // This method supposes what all custom fonts already loaded.
  5180. // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
  5181. // You need to call this method manually to update glyphs cache.
  5182. }, {
  5183. key: "setTextData",
  5184. value: function setTextData(ctx) {
  5185. var _this2 = this;
  5186. if (this.glyphInfo) {
  5187. return;
  5188. }
  5189. var renderText = this.getText();
  5190. var chars = renderText.split('');
  5191. var spacesNumber = renderText.split(' ').length - 1;
  5192. var dx = toNumbers(this.parent.getAttribute('dx').getString('0'));
  5193. var anchor = this.parent.getStyle('text-anchor').getString('start');
  5194. var thisSpacing = this.getStyle('letter-spacing');
  5195. var parentSpacing = this.parent.getStyle('letter-spacing');
  5196. var letterSpacing = 0;
  5197. if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {
  5198. letterSpacing = parentSpacing.getPixels();
  5199. } else if (thisSpacing.hasValue()) {
  5200. if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {
  5201. letterSpacing = thisSpacing.getPixels();
  5202. }
  5203. } // fill letter-spacing cache
  5204. var letterSpacingCache = [];
  5205. var textLen = renderText.length;
  5206. this.letterSpacingCache = letterSpacingCache;
  5207. for (var i = 0; i < textLen; i++) {
  5208. letterSpacingCache.push(typeof dx[i] !== 'undefined' ? dx[i] : letterSpacing);
  5209. }
  5210. var dxSum = letterSpacingCache.reduce(function (acc, cur) {
  5211. return acc + cur || 0;
  5212. }, 0);
  5213. this.textWidth = this.measureText(ctx);
  5214. this.textHeight = this.getFontSize();
  5215. var textFullWidth = Math.max(this.textWidth + dxSum, 0);
  5216. this.glyphInfo = [];
  5217. var fullPathWidth = this.getPathLength();
  5218. var startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
  5219. var offset = 0;
  5220. if (anchor === 'middle' || anchor === 'center') {
  5221. offset = -textFullWidth / 2;
  5222. }
  5223. if (anchor === 'end' || anchor === 'right') {
  5224. offset = -textFullWidth;
  5225. }
  5226. offset += startOffset;
  5227. chars.forEach(function (char, i) {
  5228. // Find such segment what distance between p0 and p1 is approx. width of glyph
  5229. var _this2$findSegmentToF = _this2.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, char, i),
  5230. nextOffset = _this2$findSegmentToF.offset,
  5231. segment = _this2$findSegmentToF.segment;
  5232. offset = nextOffset;
  5233. if (!segment.p0 || !segment.p1) {
  5234. return;
  5235. }
  5236. 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.
  5237. // Can foresee having a rough pair table built in that the developer can override as needed.
  5238. // Or use "dx" attribute of the <text> node as a naive replacement
  5239. var kern = 0; // placeholder for future implementation
  5240. var midpoint = _this2.getPointOnLine(kern + width / 2.0, segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y);
  5241. var rotation = Math.atan2(segment.p1.y - segment.p0.y, segment.p1.x - segment.p0.x);
  5242. _this2.glyphInfo.push({
  5243. transposeX: midpoint.x,
  5244. transposeY: midpoint.y,
  5245. text: chars[i],
  5246. p0: segment.p0,
  5247. p1: segment.p1,
  5248. rotation: rotation
  5249. });
  5250. });
  5251. }
  5252. }, {
  5253. key: "parsePathData",
  5254. value: function parsePathData(path) {
  5255. this.pathLength = -1; // reset path length
  5256. if (!path) {
  5257. return [];
  5258. }
  5259. var pathCommands = [];
  5260. var pathParser = path.pathParser;
  5261. pathParser.reset(); // convert l, H, h, V, and v to L
  5262. while (!pathParser.isEnd()) {
  5263. var current = pathParser.current;
  5264. var startX = current ? current.x : 0;
  5265. var startY = current ? current.y : 0;
  5266. var cmd = '';
  5267. var points = [];
  5268. pathParser.nextCommand();
  5269. var upperCommand = pathParser.command.toUpperCase();
  5270. switch (pathParser.command) {
  5271. case 'M':
  5272. case 'm':
  5273. cmd = this.pathM(pathParser, points);
  5274. break;
  5275. case 'L':
  5276. case 'l':
  5277. cmd = this.pathL(pathParser, points);
  5278. break;
  5279. case 'H':
  5280. case 'h':
  5281. cmd = this.pathH(pathParser, points);
  5282. break;
  5283. case 'V':
  5284. case 'v':
  5285. cmd = this.pathV(pathParser, points);
  5286. break;
  5287. case 'C':
  5288. case 'c':
  5289. this.pathC(pathParser, points);
  5290. break;
  5291. case 'S':
  5292. case 's':
  5293. cmd = this.pathS(pathParser, points);
  5294. break;
  5295. case 'Q':
  5296. case 'q':
  5297. this.pathQ(pathParser, points);
  5298. break;
  5299. case 'T':
  5300. case 't':
  5301. cmd = this.pathT(pathParser, points);
  5302. break;
  5303. case 'A':
  5304. case 'a':
  5305. points = this.pathA(pathParser);
  5306. break;
  5307. case 'Z':
  5308. case 'z':
  5309. pathParser.current = pathParser.start;
  5310. break;
  5311. }
  5312. if (upperCommand !== 'Z') {
  5313. pathCommands.push({
  5314. command: cmd || upperCommand,
  5315. points: points,
  5316. start: {
  5317. x: startX,
  5318. y: startY
  5319. },
  5320. pathLength: this.calcLength(startX, startY, cmd || upperCommand, points)
  5321. });
  5322. } else {
  5323. pathCommands.push({
  5324. command: 'z',
  5325. points: [],
  5326. pathLength: 0
  5327. });
  5328. }
  5329. }
  5330. return pathCommands;
  5331. }
  5332. }, {
  5333. key: "pathM",
  5334. value: function pathM(pathParser, points) {
  5335. var p = pathParser.getAsCurrentPoint(); // pathParser.addMarker(p);
  5336. points.push(p.x, p.y);
  5337. pathParser.start = pathParser.current;
  5338. while (!pathParser.isCommandOrEnd()) {
  5339. var _p = pathParser.getAsCurrentPoint();
  5340. points.push(_p.x, _p.y);
  5341. return 'L';
  5342. }
  5343. }
  5344. }, {
  5345. key: "pathL",
  5346. value: function pathL(pathParser, points) {
  5347. while (!pathParser.isCommandOrEnd()) {
  5348. var p = pathParser.getAsCurrentPoint();
  5349. points.push(p.x, p.y);
  5350. }
  5351. return 'L';
  5352. }
  5353. }, {
  5354. key: "pathH",
  5355. value: function pathH(pathParser, points) {
  5356. while (!pathParser.isCommandOrEnd()) {
  5357. var current = pathParser.current;
  5358. var point = new Point((pathParser.isRelativeCommand() ? current.x : 0) + pathParser.getScalar(), current.y);
  5359. points.push(point.x, point.y);
  5360. pathParser.current = point;
  5361. }
  5362. return 'L';
  5363. }
  5364. }, {
  5365. key: "pathV",
  5366. value: function pathV(pathParser, points) {
  5367. while (!pathParser.isCommandOrEnd()) {
  5368. var current = pathParser.current;
  5369. var point = new Point(current.x, (pathParser.isRelativeCommand() ? current.y : 0) + pathParser.getScalar());
  5370. points.push(point.x, point.y);
  5371. pathParser.current = point;
  5372. }
  5373. return 'L';
  5374. }
  5375. }, {
  5376. key: "pathC",
  5377. value: function pathC(pathParser, points) {
  5378. while (!pathParser.isCommandOrEnd()) {
  5379. var point = pathParser.getPoint();
  5380. var controlPoint = pathParser.getAsControlPoint();
  5381. var currentPoint = pathParser.getAsCurrentPoint();
  5382. points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5383. }
  5384. }
  5385. }, {
  5386. key: "pathS",
  5387. value: function pathS(pathParser, points) {
  5388. while (!pathParser.isCommandOrEnd()) {
  5389. var point = pathParser.getReflectedControlPoint();
  5390. var controlPoint = pathParser.getAsControlPoint();
  5391. var currentPoint = pathParser.getAsCurrentPoint();
  5392. points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5393. }
  5394. return 'C';
  5395. }
  5396. }, {
  5397. key: "pathQ",
  5398. value: function pathQ(pathParser, points) {
  5399. while (!pathParser.isCommandOrEnd()) {
  5400. var controlPoint = pathParser.getAsControlPoint();
  5401. var currentPoint = pathParser.getAsCurrentPoint();
  5402. points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5403. }
  5404. }
  5405. }, {
  5406. key: "pathT",
  5407. value: function pathT(pathParser, points) {
  5408. while (!pathParser.isCommandOrEnd()) {
  5409. var controlPoint = pathParser.getReflectedControlPoint();
  5410. pathParser.control = controlPoint;
  5411. var currentPoint = pathParser.getAsCurrentPoint();
  5412. points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
  5413. }
  5414. return 'Q';
  5415. }
  5416. }, {
  5417. key: "pathA",
  5418. value: function pathA(pathParser) {
  5419. while (!pathParser.isCommandOrEnd()) {
  5420. var current = pathParser.current; // x1, y1
  5421. var rx = pathParser.getScalar();
  5422. var ry = pathParser.getScalar();
  5423. var xAxisRotation = pathParser.getScalar() * (Math.PI / 180.0); // φ
  5424. var largeArcFlag = pathParser.getScalar(); // fA
  5425. var sweepFlag = pathParser.getScalar(); // fS
  5426. var currentPoint = pathParser.getAsCurrentPoint(); // x2, y2
  5427. // Conversion from endpoint to center parameterization
  5428. // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
  5429. // x1', y1'
  5430. 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
  5431. var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
  5432. if (l > 1) {
  5433. rx *= Math.sqrt(l);
  5434. ry *= Math.sqrt(l);
  5435. } // cx', cy'
  5436. 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)));
  5437. if (isNaN(s)) {
  5438. s = 0;
  5439. }
  5440. var cpp = new Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); // cx, cy
  5441. 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
  5442. var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]); // θ1
  5443. // angle delta
  5444. var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
  5445. var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
  5446. var ad = vectorsAngle(u, v); // Δθ
  5447. if (vectorsRatio(u, v) <= -1) {
  5448. ad = Math.PI;
  5449. }
  5450. if (vectorsRatio(u, v) >= 1) {
  5451. ad = 0;
  5452. }
  5453. if (sweepFlag === 0 && ad > 0) {
  5454. ad = ad - 2 * Math.PI;
  5455. }
  5456. if (sweepFlag === 1 && ad < 0) {
  5457. ad = ad + 2 * Math.PI;
  5458. }
  5459. return [centp.x, centp.y, rx, ry, a1, ad, xAxisRotation, sweepFlag];
  5460. }
  5461. }
  5462. }, {
  5463. key: "calcLength",
  5464. value: function calcLength(x, y, cmd, points) {
  5465. var len = 0;
  5466. var p1 = null;
  5467. var p2 = null;
  5468. var t = 0;
  5469. switch (cmd) {
  5470. case 'L':
  5471. return this.getLineLength(x, y, points[0], points[1]);
  5472. case 'C':
  5473. // Approximates by breaking curve into 100 line segments
  5474. len = 0.0;
  5475. p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
  5476. for (t = 0.01; t <= 1; t += 0.01) {
  5477. p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
  5478. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5479. p1 = p2;
  5480. }
  5481. return len;
  5482. case 'Q':
  5483. // Approximates by breaking curve into 100 line segments
  5484. len = 0.0;
  5485. p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
  5486. for (t = 0.01; t <= 1; t += 0.01) {
  5487. p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
  5488. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5489. p1 = p2;
  5490. }
  5491. return len;
  5492. case 'A':
  5493. // Approximates by breaking curve into line segments
  5494. len = 0.0;
  5495. var start = points[4]; // 4 = theta
  5496. var dTheta = points[5]; // 5 = dTheta
  5497. var end = points[4] + dTheta;
  5498. var inc = Math.PI / 180.0; // 1 degree resolution
  5499. if (Math.abs(start - end) < inc) {
  5500. inc = Math.abs(start - end);
  5501. } // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
  5502. p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
  5503. if (dTheta < 0) {
  5504. // clockwise
  5505. for (t = start - inc; t > end; t -= inc) {
  5506. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
  5507. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5508. p1 = p2;
  5509. }
  5510. } else {
  5511. // counter-clockwise
  5512. for (t = start + inc; t < end; t += inc) {
  5513. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
  5514. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5515. p1 = p2;
  5516. }
  5517. }
  5518. p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
  5519. len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
  5520. return len;
  5521. }
  5522. return 0;
  5523. }
  5524. }, {
  5525. key: "getPointOnLine",
  5526. value: function getPointOnLine(dist, P1x, P1y, P2x, P2y) {
  5527. var fromX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : P1x;
  5528. var fromY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : P1y;
  5529. var m = (P2y - P1y) / (P2x - P1x + PSEUDO_ZERO);
  5530. var run = Math.sqrt(dist * dist / (1 + m * m));
  5531. if (P2x < P1x) {
  5532. run *= -1;
  5533. }
  5534. var rise = m * run;
  5535. var pt = null;
  5536. if (P2x === P1x) {
  5537. // vertical line
  5538. pt = {
  5539. x: fromX,
  5540. y: fromY + rise
  5541. };
  5542. } else if ((fromY - P1y) / (fromX - P1x + PSEUDO_ZERO) === m) {
  5543. pt = {
  5544. x: fromX + run,
  5545. y: fromY + rise
  5546. };
  5547. } else {
  5548. var ix = 0;
  5549. var iy = 0;
  5550. var len = this.getLineLength(P1x, P1y, P2x, P2y);
  5551. if (len < PSEUDO_ZERO) {
  5552. return null;
  5553. }
  5554. var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);
  5555. u = u / (len * len);
  5556. ix = P1x + u * (P2x - P1x);
  5557. iy = P1y + u * (P2y - P1y);
  5558. var pRise = this.getLineLength(fromX, fromY, ix, iy);
  5559. var pRun = Math.sqrt(dist * dist - pRise * pRise);
  5560. run = Math.sqrt(pRun * pRun / (1 + m * m));
  5561. if (P2x < P1x) {
  5562. run *= -1;
  5563. }
  5564. rise = m * run;
  5565. pt = {
  5566. x: ix + run,
  5567. y: iy + rise
  5568. };
  5569. }
  5570. return pt;
  5571. }
  5572. }, {
  5573. key: "getPointOnPath",
  5574. value: function getPointOnPath(distance) {
  5575. var fullLen = this.getPathLength();
  5576. var cumulativePathLength = 0;
  5577. var p = null;
  5578. if (distance < -0.00005 || distance - 0.00005 > fullLen) {
  5579. return null;
  5580. }
  5581. var dataArray = this.dataArray;
  5582. var _iterator = _createForOfIteratorHelper$1(dataArray),
  5583. _step;
  5584. try {
  5585. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  5586. var pathCmd = _step.value;
  5587. if (pathCmd && (pathCmd.pathLength < 0.00005 || cumulativePathLength + pathCmd.pathLength + 0.00005 < distance)) {
  5588. cumulativePathLength += pathCmd.pathLength;
  5589. continue;
  5590. }
  5591. var delta = distance - cumulativePathLength;
  5592. var currentT = 0;
  5593. switch (pathCmd.command) {
  5594. case 'L':
  5595. p = this.getPointOnLine(delta, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.start.x, pathCmd.start.y);
  5596. break;
  5597. case 'A':
  5598. var start = pathCmd.points[4]; // 4 = theta
  5599. var dTheta = pathCmd.points[5]; // 5 = dTheta
  5600. var end = pathCmd.points[4] + dTheta;
  5601. currentT = start + delta / pathCmd.pathLength * dTheta;
  5602. if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {
  5603. break;
  5604. }
  5605. p = this.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);
  5606. break;
  5607. case 'C':
  5608. currentT = delta / pathCmd.pathLength;
  5609. if (currentT > 1) {
  5610. currentT = 1;
  5611. }
  5612. 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]);
  5613. break;
  5614. case 'Q':
  5615. currentT = delta / pathCmd.pathLength;
  5616. if (currentT > 1) {
  5617. currentT = 1;
  5618. }
  5619. p = this.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);
  5620. break;
  5621. default:
  5622. }
  5623. if (p) {
  5624. return p;
  5625. }
  5626. break;
  5627. }
  5628. } catch (err) {
  5629. _iterator.e(err);
  5630. } finally {
  5631. _iterator.f();
  5632. }
  5633. return null;
  5634. }
  5635. }, {
  5636. key: "getLineLength",
  5637. value: function getLineLength(x1, y1, x2, y2) {
  5638. return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  5639. }
  5640. }, {
  5641. key: "getPathLength",
  5642. value: function getPathLength() {
  5643. if (this.pathLength === -1) {
  5644. this.pathLength = this.dataArray.reduce(function (length, command) {
  5645. return command.pathLength > 0 ? length + command.pathLength : length;
  5646. }, 0);
  5647. }
  5648. return this.pathLength;
  5649. }
  5650. }, {
  5651. key: "getPointOnCubicBezier",
  5652. value: function getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {
  5653. var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);
  5654. var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);
  5655. return {
  5656. x: x,
  5657. y: y
  5658. };
  5659. }
  5660. }, {
  5661. key: "getPointOnQuadraticBezier",
  5662. value: function getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {
  5663. var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);
  5664. var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);
  5665. return {
  5666. x: x,
  5667. y: y
  5668. };
  5669. }
  5670. }, {
  5671. key: "getPointOnEllipticalArc",
  5672. value: function getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
  5673. var cosPsi = Math.cos(psi);
  5674. var sinPsi = Math.sin(psi);
  5675. var pt = {
  5676. x: rx * Math.cos(theta),
  5677. y: ry * Math.sin(theta)
  5678. };
  5679. return {
  5680. x: cx + (pt.x * cosPsi - pt.y * sinPsi),
  5681. y: cy + (pt.x * sinPsi + pt.y * cosPsi)
  5682. };
  5683. } // TODO need some optimisations. possibly build cache only for curved segments?
  5684. }, {
  5685. key: "buildEquidistantCache",
  5686. value: function buildEquidistantCache(inputStep, inputPrecision) {
  5687. var fullLen = this.getPathLength();
  5688. var precision = inputPrecision || 0.25; // accuracy vs performance
  5689. var step = inputStep || fullLen / 100;
  5690. if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {
  5691. // Prepare cache
  5692. this.equidistantCache = {
  5693. step: step,
  5694. precision: precision,
  5695. points: []
  5696. }; // Calculate points
  5697. var s = 0;
  5698. for (var l = 0; l <= fullLen; l += precision) {
  5699. var p0 = this.getPointOnPath(l);
  5700. var p1 = this.getPointOnPath(l + precision);
  5701. if (!p0 || !p1) {
  5702. continue;
  5703. }
  5704. s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
  5705. if (s >= step) {
  5706. this.equidistantCache.points.push({
  5707. x: p0.x,
  5708. y: p0.y,
  5709. distance: l
  5710. });
  5711. s -= step;
  5712. }
  5713. }
  5714. }
  5715. }
  5716. }, {
  5717. key: "getEquidistantPointOnPath",
  5718. value: function getEquidistantPointOnPath(targetDistance, step, precision) {
  5719. this.buildEquidistantCache(step, precision);
  5720. if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {
  5721. return null;
  5722. }
  5723. var idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));
  5724. return this.equidistantCache.points[idx] || null;
  5725. }
  5726. }]);
  5727. return TextPathElement;
  5728. }(TextElement);
  5729. 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); }; }
  5730. 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; } }
  5731. var ImageElement = /*#__PURE__*/function (_RenderedElement) {
  5732. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ImageElement, _RenderedElement);
  5733. var _super = _createSuper$y(ImageElement);
  5734. function ImageElement(document, node, captureTextNodes) {
  5735. var _this;
  5736. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ImageElement);
  5737. _this = _super.call(this, document, node, captureTextNodes);
  5738. _this.type = 'image';
  5739. _this.loaded = false;
  5740. var href = _this.getHrefAttribute().getString();
  5741. if (!href) {
  5742. return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_30__.default)(_this);
  5743. }
  5744. var isSvg = /\.svg$/.test(href);
  5745. document.images.push((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_46__.default)(_this));
  5746. if (!isSvg) {
  5747. _this.loadImage(href);
  5748. } else {
  5749. _this.loadSvg(href);
  5750. }
  5751. _this.isSvg = isSvg;
  5752. return _this;
  5753. }
  5754. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ImageElement, [{
  5755. key: "loadImage",
  5756. value: function () {
  5757. 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) {
  5758. var image;
  5759. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  5760. while (1) {
  5761. switch (_context.prev = _context.next) {
  5762. case 0:
  5763. _context.prev = 0;
  5764. _context.next = 3;
  5765. return this.document.createImage(href);
  5766. case 3:
  5767. image = _context.sent;
  5768. this.image = image;
  5769. _context.next = 10;
  5770. break;
  5771. case 7:
  5772. _context.prev = 7;
  5773. _context.t0 = _context["catch"](0);
  5774. // tslint:disable-next-line: no-console
  5775. console.error("Error while loading image \"".concat(href, "\":"), _context.t0);
  5776. case 10:
  5777. this.loaded = true;
  5778. case 11:
  5779. case "end":
  5780. return _context.stop();
  5781. }
  5782. }
  5783. }, _callee, this, [[0, 7]]);
  5784. }));
  5785. function loadImage(_x) {
  5786. return _loadImage.apply(this, arguments);
  5787. }
  5788. return loadImage;
  5789. }()
  5790. }, {
  5791. key: "loadSvg",
  5792. value: function () {
  5793. 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) {
  5794. var response, svg;
  5795. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  5796. while (1) {
  5797. switch (_context2.prev = _context2.next) {
  5798. case 0:
  5799. _context2.prev = 0;
  5800. _context2.next = 3;
  5801. return this.document.fetch(href);
  5802. case 3:
  5803. response = _context2.sent;
  5804. _context2.next = 6;
  5805. return response.text();
  5806. case 6:
  5807. svg = _context2.sent;
  5808. this.image = svg;
  5809. _context2.next = 13;
  5810. break;
  5811. case 10:
  5812. _context2.prev = 10;
  5813. _context2.t0 = _context2["catch"](0);
  5814. // tslint:disable-next-line: no-console
  5815. console.error("Error while loading image \"".concat(href, "\":"), _context2.t0);
  5816. case 13:
  5817. this.loaded = true;
  5818. case 14:
  5819. case "end":
  5820. return _context2.stop();
  5821. }
  5822. }
  5823. }, _callee2, this, [[0, 10]]);
  5824. }));
  5825. function loadSvg(_x2) {
  5826. return _loadSvg.apply(this, arguments);
  5827. }
  5828. return loadSvg;
  5829. }()
  5830. }, {
  5831. key: "renderChildren",
  5832. value: function renderChildren(ctx) {
  5833. var document = this.document,
  5834. image = this.image,
  5835. loaded = this.loaded;
  5836. var x = this.getAttribute('x').getPixels('x');
  5837. var y = this.getAttribute('y').getPixels('y');
  5838. var width = this.getStyle('width').getPixels('x');
  5839. var height = this.getStyle('height').getPixels('y');
  5840. if (!loaded || !image || !width || !height) {
  5841. return;
  5842. }
  5843. ctx.save();
  5844. if (this.isSvg) {
  5845. document.canvg.forkString(ctx, this.image, {
  5846. ignoreMouse: true,
  5847. ignoreAnimation: true,
  5848. ignoreDimensions: true,
  5849. ignoreClear: true,
  5850. offsetX: x,
  5851. offsetY: y,
  5852. scaleWidth: width,
  5853. scaleHeight: height
  5854. }).render();
  5855. } else {
  5856. var _image = this.image;
  5857. ctx.translate(x, y);
  5858. document.setViewBox({
  5859. ctx: ctx,
  5860. aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
  5861. width: width,
  5862. desiredWidth: _image.width,
  5863. height: height,
  5864. desiredHeight: _image.height
  5865. });
  5866. if (this.loaded) {
  5867. if (typeof _image.complete === 'undefined' || _image.complete) {
  5868. ctx.drawImage(_image, 0, 0);
  5869. }
  5870. }
  5871. }
  5872. ctx.restore();
  5873. }
  5874. }, {
  5875. key: "getBoundingBox",
  5876. value: function getBoundingBox() {
  5877. var x = this.getAttribute('x').getPixels('x');
  5878. var y = this.getAttribute('y').getPixels('y');
  5879. var width = this.getStyle('width').getPixels('x');
  5880. var height = this.getStyle('height').getPixels('y');
  5881. return new BoundingBox(x, y, x + width, y + height);
  5882. }
  5883. }]);
  5884. return ImageElement;
  5885. }(RenderedElement);
  5886. 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); }; }
  5887. 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; } }
  5888. var SymbolElement = /*#__PURE__*/function (_RenderedElement) {
  5889. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(SymbolElement, _RenderedElement);
  5890. var _super = _createSuper$z(SymbolElement);
  5891. function SymbolElement() {
  5892. var _this;
  5893. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SymbolElement);
  5894. _this = _super.apply(this, arguments);
  5895. _this.type = 'symbol';
  5896. return _this;
  5897. }
  5898. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SymbolElement, [{
  5899. key: "render",
  5900. value: function render(_) {// NO RENDER
  5901. }
  5902. }]);
  5903. return SymbolElement;
  5904. }(RenderedElement);
  5905. var SVGFontLoader = /*#__PURE__*/function () {
  5906. function SVGFontLoader(document) {
  5907. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, SVGFontLoader);
  5908. this.document = document;
  5909. this.loaded = false;
  5910. document.fonts.push(this);
  5911. }
  5912. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(SVGFontLoader, [{
  5913. key: "load",
  5914. value: function () {
  5915. 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) {
  5916. var document, svgDocument, fonts;
  5917. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  5918. while (1) {
  5919. switch (_context.prev = _context.next) {
  5920. case 0:
  5921. _context.prev = 0;
  5922. document = this.document;
  5923. _context.next = 4;
  5924. return document.canvg.parser.load(url);
  5925. case 4:
  5926. svgDocument = _context.sent;
  5927. fonts = svgDocument.getElementsByTagName('font');
  5928. Array.from(fonts).forEach(function (fontNode) {
  5929. var font = document.createElement(fontNode);
  5930. document.definitions[fontFamily] = font;
  5931. });
  5932. _context.next = 12;
  5933. break;
  5934. case 9:
  5935. _context.prev = 9;
  5936. _context.t0 = _context["catch"](0);
  5937. // tslint:disable-next-line: no-console
  5938. console.error("Error while loading font \"".concat(url, "\":"), _context.t0);
  5939. case 12:
  5940. this.loaded = true;
  5941. case 13:
  5942. case "end":
  5943. return _context.stop();
  5944. }
  5945. }
  5946. }, _callee, this, [[0, 9]]);
  5947. }));
  5948. function load(_x, _x2) {
  5949. return _load.apply(this, arguments);
  5950. }
  5951. return load;
  5952. }()
  5953. }]);
  5954. return SVGFontLoader;
  5955. }();
  5956. 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); }; }
  5957. 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; } }
  5958. var StyleElement = /*#__PURE__*/function (_Element) {
  5959. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(StyleElement, _Element);
  5960. var _super = _createSuper$A(StyleElement);
  5961. function StyleElement(document, node, captureTextNodes) {
  5962. var _this;
  5963. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, StyleElement);
  5964. _this = _super.call(this, document, node, captureTextNodes);
  5965. _this.type = 'style';
  5966. var css = compressSpaces(Array.from(node.childNodes).map(function (_) {
  5967. return _.data;
  5968. }).join('').replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
  5969. .replace(/@import.*;/g, '') // remove imports
  5970. );
  5971. var cssDefs = css.split('}');
  5972. cssDefs.forEach(function (_) {
  5973. var def = _.trim();
  5974. if (!def) {
  5975. return;
  5976. }
  5977. var cssParts = def.split('{');
  5978. var cssClasses = cssParts[0].split(',');
  5979. var cssProps = cssParts[1].split(';');
  5980. cssClasses.forEach(function (_) {
  5981. var cssClass = _.trim();
  5982. if (!cssClass) {
  5983. return;
  5984. }
  5985. var props = document.styles[cssClass] || {};
  5986. cssProps.forEach(function (cssProp) {
  5987. var prop = cssProp.indexOf(':');
  5988. var name = cssProp.substr(0, prop).trim();
  5989. var value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
  5990. if (name && value) {
  5991. props[name] = new Property(document, name, value);
  5992. }
  5993. });
  5994. document.styles[cssClass] = props;
  5995. document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
  5996. if (cssClass === '@font-face') {
  5997. // && !nodeEnv
  5998. var fontFamily = props['font-family'].getString().replace(/"|'/g, '');
  5999. var srcs = props.src.getString().split(',');
  6000. srcs.forEach(function (src) {
  6001. if (src.indexOf('format("svg")') > 0) {
  6002. var url = parseExternalUrl(src);
  6003. if (url) {
  6004. new SVGFontLoader(document).load(fontFamily, url);
  6005. }
  6006. }
  6007. });
  6008. }
  6009. });
  6010. });
  6011. return _this;
  6012. }
  6013. return StyleElement;
  6014. }(Element);
  6015. StyleElement.parseExternalUrl = parseExternalUrl;
  6016. 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); }; }
  6017. 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; } }
  6018. var UseElement = /*#__PURE__*/function (_RenderedElement) {
  6019. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(UseElement, _RenderedElement);
  6020. var _super = _createSuper$B(UseElement);
  6021. function UseElement() {
  6022. var _this;
  6023. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, UseElement);
  6024. _this = _super.apply(this, arguments);
  6025. _this.type = 'use';
  6026. return _this;
  6027. }
  6028. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(UseElement, [{
  6029. key: "setContext",
  6030. value: function setContext(ctx) {
  6031. (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);
  6032. var xAttr = this.getAttribute('x');
  6033. var yAttr = this.getAttribute('y');
  6034. if (xAttr.hasValue()) {
  6035. ctx.translate(xAttr.getPixels('x'), 0);
  6036. }
  6037. if (yAttr.hasValue()) {
  6038. ctx.translate(0, yAttr.getPixels('y'));
  6039. }
  6040. }
  6041. }, {
  6042. key: "path",
  6043. value: function path(ctx) {
  6044. var element = this.element;
  6045. if (element) {
  6046. element.path(ctx);
  6047. }
  6048. }
  6049. }, {
  6050. key: "renderChildren",
  6051. value: function renderChildren(ctx) {
  6052. var document = this.document,
  6053. element = this.element;
  6054. if (element) {
  6055. var tempSvg = element;
  6056. if (element.type === 'symbol') {
  6057. // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
  6058. tempSvg = new SVGElement(document, null);
  6059. tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
  6060. tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
  6061. tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
  6062. tempSvg.children = element.children;
  6063. }
  6064. if (tempSvg.type === 'svg') {
  6065. var widthStyle = this.getStyle('width', false, true);
  6066. var heightStyle = this.getStyle('height', false, true); // if symbol or svg, inherit width/height from me
  6067. if (widthStyle.hasValue()) {
  6068. tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
  6069. }
  6070. if (heightStyle.hasValue()) {
  6071. tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
  6072. }
  6073. }
  6074. var oldParent = tempSvg.parent;
  6075. tempSvg.parent = this;
  6076. tempSvg.render(ctx);
  6077. tempSvg.parent = oldParent;
  6078. }
  6079. }
  6080. }, {
  6081. key: "getBoundingBox",
  6082. value: function getBoundingBox(ctx) {
  6083. var element = this.element;
  6084. if (element) {
  6085. return element.getBoundingBox(ctx);
  6086. }
  6087. return null;
  6088. }
  6089. }, {
  6090. key: "elementTransform",
  6091. value: function elementTransform() {
  6092. var document = this.document,
  6093. element = this.element;
  6094. return Transform.fromElement(document, element);
  6095. }
  6096. }, {
  6097. key: "element",
  6098. get: function get() {
  6099. if (!this._element) {
  6100. this._element = this.getHrefAttribute().getDefinition();
  6101. }
  6102. return this._element;
  6103. }
  6104. }]);
  6105. return UseElement;
  6106. }(RenderedElement);
  6107. 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); }; }
  6108. 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; } }
  6109. function imGet(img, x, y, width, _, rgba) {
  6110. return img[y * width * 4 + x * 4 + rgba];
  6111. }
  6112. function imSet(img, x, y, width, _, rgba, val) {
  6113. img[y * width * 4 + x * 4 + rgba] = val;
  6114. }
  6115. function m(matrix, i, v) {
  6116. var mi = matrix[i];
  6117. return mi * (mi < 0 ? v - 255 : v);
  6118. }
  6119. function c(a, m1, m2, m3) {
  6120. return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
  6121. }
  6122. var FeColorMatrixElement = /*#__PURE__*/function (_Element) {
  6123. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeColorMatrixElement, _Element);
  6124. var _super = _createSuper$C(FeColorMatrixElement);
  6125. function FeColorMatrixElement(document, node, captureTextNodes) {
  6126. var _this;
  6127. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeColorMatrixElement);
  6128. _this = _super.call(this, document, node, captureTextNodes);
  6129. _this.type = 'feColorMatrix';
  6130. var matrix = toNumbers(_this.getAttribute('values').getString());
  6131. switch (_this.getAttribute('type').getString('matrix')) {
  6132. // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
  6133. case 'saturate':
  6134. {
  6135. var s = matrix[0];
  6136. 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];
  6137. break;
  6138. }
  6139. case 'hueRotate':
  6140. {
  6141. var a = matrix[0] * Math.PI / 180.0;
  6142. 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];
  6143. break;
  6144. }
  6145. case 'luminanceToAlpha':
  6146. 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];
  6147. break;
  6148. }
  6149. _this.matrix = matrix;
  6150. _this.includeOpacity = _this.getAttribute('includeOpacity').hasValue();
  6151. return _this;
  6152. }
  6153. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeColorMatrixElement, [{
  6154. key: "apply",
  6155. value: function apply(ctx, _, __, width, height) {
  6156. // assuming x==0 && y==0 for now
  6157. var includeOpacity = this.includeOpacity,
  6158. matrix = this.matrix;
  6159. var srcData = ctx.getImageData(0, 0, width, height);
  6160. for (var y = 0; y < height; y++) {
  6161. for (var x = 0; x < width; x++) {
  6162. var r = imGet(srcData.data, x, y, width, height, 0);
  6163. var g = imGet(srcData.data, x, y, width, height, 1);
  6164. var b = imGet(srcData.data, x, y, width, height, 2);
  6165. var a = imGet(srcData.data, x, y, width, height, 3);
  6166. var nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
  6167. var ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
  6168. var nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
  6169. var na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
  6170. if (includeOpacity) {
  6171. nr = ng = nb = 0;
  6172. na *= a / 255;
  6173. }
  6174. imSet(srcData.data, x, y, width, height, 0, nr);
  6175. imSet(srcData.data, x, y, width, height, 1, ng);
  6176. imSet(srcData.data, x, y, width, height, 2, nb);
  6177. imSet(srcData.data, x, y, width, height, 3, na);
  6178. }
  6179. }
  6180. ctx.clearRect(0, 0, width, height);
  6181. ctx.putImageData(srcData, 0, 0);
  6182. }
  6183. }]);
  6184. return FeColorMatrixElement;
  6185. }(Element);
  6186. 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); }; }
  6187. 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; } }
  6188. var MaskElement = /*#__PURE__*/function (_Element) {
  6189. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(MaskElement, _Element);
  6190. var _super = _createSuper$D(MaskElement);
  6191. function MaskElement() {
  6192. var _this;
  6193. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, MaskElement);
  6194. _this = _super.apply(this, arguments);
  6195. _this.type = 'mask';
  6196. return _this;
  6197. }
  6198. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(MaskElement, [{
  6199. key: "apply",
  6200. value: function apply(ctx, element) {
  6201. var document = this.document; // render as temp svg
  6202. var x = this.getAttribute('x').getPixels('x');
  6203. var y = this.getAttribute('y').getPixels('y');
  6204. var width = this.getStyle('width').getPixels('x');
  6205. var height = this.getStyle('height').getPixels('y');
  6206. if (!width && !height) {
  6207. var boundingBox = new BoundingBox();
  6208. this.children.forEach(function (child) {
  6209. boundingBox.addBoundingBox(child.getBoundingBox(ctx));
  6210. });
  6211. x = Math.floor(boundingBox.x1);
  6212. y = Math.floor(boundingBox.y1);
  6213. width = Math.floor(boundingBox.width);
  6214. height = Math.floor(boundingBox.height);
  6215. }
  6216. var ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
  6217. var maskCanvas = document.createCanvas(x + width, y + height);
  6218. var maskCtx = maskCanvas.getContext('2d');
  6219. document.screen.setDefaults(maskCtx);
  6220. this.renderChildren(maskCtx); // convert mask to alpha with a fake node
  6221. // TODO: refactor out apply from feColorMatrix
  6222. new FeColorMatrixElement(document, {
  6223. nodeType: 1,
  6224. childNodes: [],
  6225. attributes: [{
  6226. nodeName: 'type',
  6227. value: 'luminanceToAlpha'
  6228. }, {
  6229. nodeName: 'includeOpacity',
  6230. value: 'true'
  6231. }]
  6232. }).apply(maskCtx, 0, 0, x + width, y + height);
  6233. var tmpCanvas = document.createCanvas(x + width, y + height);
  6234. var tmpCtx = tmpCanvas.getContext('2d');
  6235. document.screen.setDefaults(tmpCtx);
  6236. element.render(tmpCtx);
  6237. tmpCtx.globalCompositeOperation = 'destination-in';
  6238. tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
  6239. tmpCtx.fillRect(0, 0, x + width, y + height);
  6240. ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
  6241. ctx.fillRect(0, 0, x + width, y + height); // reassign mask
  6242. this.restoreStyles(element, ignoredStyles);
  6243. }
  6244. }, {
  6245. key: "render",
  6246. value: function render(_) {// NO RENDER
  6247. }
  6248. }]);
  6249. return MaskElement;
  6250. }(Element);
  6251. MaskElement.ignoreStyles = ['mask', 'transform', 'clip-path'];
  6252. 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); }; }
  6253. 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; } }
  6254. var noop = function noop() {};
  6255. var ClipPathElement = /*#__PURE__*/function (_Element) {
  6256. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(ClipPathElement, _Element);
  6257. var _super = _createSuper$E(ClipPathElement);
  6258. function ClipPathElement() {
  6259. var _this;
  6260. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, ClipPathElement);
  6261. _this = _super.apply(this, arguments);
  6262. _this.type = 'clipPath';
  6263. return _this;
  6264. }
  6265. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(ClipPathElement, [{
  6266. key: "apply",
  6267. value: function apply(ctx) {
  6268. var document = this.document;
  6269. var contextProto = Reflect.getPrototypeOf(ctx);
  6270. var beginPath = ctx.beginPath,
  6271. closePath = ctx.closePath;
  6272. if (contextProto) {
  6273. contextProto.beginPath = noop;
  6274. contextProto.closePath = noop;
  6275. }
  6276. Reflect.apply(beginPath, ctx, []);
  6277. this.children.forEach(function (child) {
  6278. if (typeof child.path === 'undefined') {
  6279. return;
  6280. }
  6281. var transform = typeof child.elementTransform !== 'undefined' ? child.elementTransform() : null; // handle <use />
  6282. if (!transform) {
  6283. transform = Transform.fromElement(document, child);
  6284. }
  6285. if (transform) {
  6286. transform.apply(ctx);
  6287. }
  6288. child.path(ctx);
  6289. if (contextProto) {
  6290. contextProto.closePath = closePath;
  6291. }
  6292. if (transform) {
  6293. transform.unapply(ctx);
  6294. }
  6295. });
  6296. Reflect.apply(closePath, ctx, []);
  6297. ctx.clip();
  6298. if (contextProto) {
  6299. contextProto.beginPath = beginPath;
  6300. contextProto.closePath = closePath;
  6301. }
  6302. }
  6303. }, {
  6304. key: "render",
  6305. value: function render(_) {// NO RENDER
  6306. }
  6307. }]);
  6308. return ClipPathElement;
  6309. }(Element);
  6310. 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); }; }
  6311. 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; } }
  6312. var FilterElement = /*#__PURE__*/function (_Element) {
  6313. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FilterElement, _Element);
  6314. var _super = _createSuper$F(FilterElement);
  6315. function FilterElement() {
  6316. var _this;
  6317. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FilterElement);
  6318. _this = _super.apply(this, arguments);
  6319. _this.type = 'filter';
  6320. return _this;
  6321. }
  6322. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FilterElement, [{
  6323. key: "apply",
  6324. value: function apply(ctx, element) {
  6325. // render as temp svg
  6326. var document = this.document,
  6327. children = this.children;
  6328. var boundingBox = element.getBoundingBox(ctx);
  6329. if (!boundingBox) {
  6330. return;
  6331. }
  6332. var px = 0;
  6333. var py = 0;
  6334. children.forEach(function (child) {
  6335. var efd = child.extraFilterDistance || 0;
  6336. px = Math.max(px, efd);
  6337. py = Math.max(py, efd);
  6338. });
  6339. var width = Math.floor(boundingBox.width);
  6340. var height = Math.floor(boundingBox.height);
  6341. var tmpCanvasWidth = width + 2 * px;
  6342. var tmpCanvasHeight = height + 2 * py;
  6343. if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
  6344. return;
  6345. }
  6346. var x = Math.floor(boundingBox.x);
  6347. var y = Math.floor(boundingBox.y);
  6348. var ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
  6349. var tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
  6350. var tmpCtx = tmpCanvas.getContext('2d');
  6351. document.screen.setDefaults(tmpCtx);
  6352. tmpCtx.translate(-x + px, -y + py);
  6353. element.render(tmpCtx); // apply filters
  6354. children.forEach(function (child) {
  6355. if (typeof child.apply === 'function') {
  6356. child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
  6357. }
  6358. }); // render on me
  6359. ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
  6360. this.restoreStyles(element, ignoredStyles);
  6361. }
  6362. }, {
  6363. key: "render",
  6364. value: function render(_) {// NO RENDER
  6365. }
  6366. }]);
  6367. return FilterElement;
  6368. }(Element);
  6369. FilterElement.ignoreStyles = ['filter', 'transform', 'clip-path'];
  6370. 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); }; }
  6371. 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; } }
  6372. var FeDropShadowElement = /*#__PURE__*/function (_Element) {
  6373. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeDropShadowElement, _Element);
  6374. var _super = _createSuper$G(FeDropShadowElement);
  6375. function FeDropShadowElement(document, node, captureTextNodes) {
  6376. var _this;
  6377. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeDropShadowElement);
  6378. _this = _super.call(this, document, node, captureTextNodes);
  6379. _this.type = 'feDropShadow';
  6380. _this.addStylesFromStyleDefinition();
  6381. return _this;
  6382. }
  6383. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeDropShadowElement, [{
  6384. key: "apply",
  6385. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6386. }
  6387. }]);
  6388. return FeDropShadowElement;
  6389. }(Element);
  6390. 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); }; }
  6391. 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; } }
  6392. var FeMorphologyElement = /*#__PURE__*/function (_Element) {
  6393. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeMorphologyElement, _Element);
  6394. var _super = _createSuper$H(FeMorphologyElement);
  6395. function FeMorphologyElement() {
  6396. var _this;
  6397. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeMorphologyElement);
  6398. _this = _super.apply(this, arguments);
  6399. _this.type = 'feMorphology';
  6400. return _this;
  6401. }
  6402. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeMorphologyElement, [{
  6403. key: "apply",
  6404. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6405. }
  6406. }]);
  6407. return FeMorphologyElement;
  6408. }(Element);
  6409. 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); }; }
  6410. 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; } }
  6411. var FeCompositeElement = /*#__PURE__*/function (_Element) {
  6412. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeCompositeElement, _Element);
  6413. var _super = _createSuper$I(FeCompositeElement);
  6414. function FeCompositeElement() {
  6415. var _this;
  6416. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeCompositeElement);
  6417. _this = _super.apply(this, arguments);
  6418. _this.type = 'feComposite';
  6419. return _this;
  6420. }
  6421. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeCompositeElement, [{
  6422. key: "apply",
  6423. value: function apply(_, __, ___, ____, _____) {// TODO: implement
  6424. }
  6425. }]);
  6426. return FeCompositeElement;
  6427. }(Element);
  6428. 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); }; }
  6429. 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; } }
  6430. var FeGaussianBlurElement = /*#__PURE__*/function (_Element) {
  6431. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(FeGaussianBlurElement, _Element);
  6432. var _super = _createSuper$J(FeGaussianBlurElement);
  6433. function FeGaussianBlurElement(document, node, captureTextNodes) {
  6434. var _this;
  6435. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, FeGaussianBlurElement);
  6436. _this = _super.call(this, document, node, captureTextNodes);
  6437. _this.type = 'feGaussianBlur';
  6438. _this.blurRadius = Math.floor(_this.getAttribute('stdDeviation').getNumber());
  6439. _this.extraFilterDistance = _this.blurRadius;
  6440. return _this;
  6441. }
  6442. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(FeGaussianBlurElement, [{
  6443. key: "apply",
  6444. value: function apply(ctx, x, y, width, height) {
  6445. var document = this.document,
  6446. blurRadius = this.blurRadius;
  6447. var body = document.window ? document.window.document.body : null;
  6448. var canvas = ctx.canvas; // StackBlur requires canvas be on document
  6449. canvas.id = document.getUniqueId();
  6450. if (body) {
  6451. canvas.style.display = 'none';
  6452. body.appendChild(canvas);
  6453. }
  6454. (0,stackblur_canvas__WEBPACK_IMPORTED_MODULE_55__.canvasRGBA)(canvas, x, y, width, height, blurRadius);
  6455. if (body) {
  6456. body.removeChild(canvas);
  6457. }
  6458. }
  6459. }]);
  6460. return FeGaussianBlurElement;
  6461. }(Element);
  6462. 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); }; }
  6463. 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; } }
  6464. var TitleElement = /*#__PURE__*/function (_Element) {
  6465. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(TitleElement, _Element);
  6466. var _super = _createSuper$K(TitleElement);
  6467. function TitleElement() {
  6468. var _this;
  6469. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, TitleElement);
  6470. _this = _super.apply(this, arguments);
  6471. _this.type = 'title';
  6472. return _this;
  6473. }
  6474. return TitleElement;
  6475. }(Element);
  6476. 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); }; }
  6477. 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; } }
  6478. var DescElement = /*#__PURE__*/function (_Element) {
  6479. (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_32__.default)(DescElement, _Element);
  6480. var _super = _createSuper$L(DescElement);
  6481. function DescElement() {
  6482. var _this;
  6483. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, DescElement);
  6484. _this = _super.apply(this, arguments);
  6485. _this.type = 'desc';
  6486. return _this;
  6487. }
  6488. return DescElement;
  6489. }(Element);
  6490. var elementTypes = {
  6491. 'svg': SVGElement,
  6492. 'rect': RectElement,
  6493. 'circle': CircleElement,
  6494. 'ellipse': EllipseElement,
  6495. 'line': LineElement,
  6496. 'polyline': PolylineElement,
  6497. 'polygon': PolygonElement,
  6498. 'path': PathElement,
  6499. 'pattern': PatternElement,
  6500. 'marker': MarkerElement,
  6501. 'defs': DefsElement,
  6502. 'linearGradient': LinearGradientElement,
  6503. 'radialGradient': RadialGradientElement,
  6504. 'stop': StopElement,
  6505. 'animate': AnimateElement,
  6506. 'animateColor': AnimateColorElement,
  6507. 'animateTransform': AnimateTransformElement,
  6508. 'font': FontElement,
  6509. 'font-face': FontFaceElement,
  6510. 'missing-glyph': MissingGlyphElement,
  6511. 'glyph': GlyphElement,
  6512. 'text': TextElement,
  6513. 'tspan': TSpanElement,
  6514. 'tref': TRefElement,
  6515. 'a': AElement,
  6516. 'textPath': TextPathElement,
  6517. 'image': ImageElement,
  6518. 'g': GElement,
  6519. 'symbol': SymbolElement,
  6520. 'style': StyleElement,
  6521. 'use': UseElement,
  6522. 'mask': MaskElement,
  6523. 'clipPath': ClipPathElement,
  6524. 'filter': FilterElement,
  6525. 'feDropShadow': FeDropShadowElement,
  6526. 'feMorphology': FeMorphologyElement,
  6527. 'feComposite': FeCompositeElement,
  6528. 'feColorMatrix': FeColorMatrixElement,
  6529. 'feGaussianBlur': FeGaussianBlurElement,
  6530. 'title': TitleElement,
  6531. 'desc': DescElement
  6532. };
  6533. 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; }
  6534. 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; }
  6535. function createCanvas(width, height) {
  6536. var canvas = document.createElement('canvas');
  6537. canvas.width = width;
  6538. canvas.height = height;
  6539. return canvas;
  6540. }
  6541. function createImage(_x) {
  6542. return _createImage.apply(this, arguments);
  6543. }
  6544. function _createImage() {
  6545. _createImage = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee(src) {
  6546. var anonymousCrossOrigin,
  6547. image,
  6548. _args = arguments;
  6549. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6550. while (1) {
  6551. switch (_context.prev = _context.next) {
  6552. case 0:
  6553. anonymousCrossOrigin = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
  6554. image = document.createElement('img');
  6555. if (anonymousCrossOrigin) {
  6556. image.crossOrigin = 'Anonymous';
  6557. }
  6558. return _context.abrupt("return", new Promise(function (resolve, reject) {
  6559. image.onload = function () {
  6560. resolve(image);
  6561. };
  6562. image.onerror = function () {
  6563. reject();
  6564. };
  6565. image.src = src;
  6566. }));
  6567. case 4:
  6568. case "end":
  6569. return _context.stop();
  6570. }
  6571. }
  6572. }, _callee);
  6573. }));
  6574. return _createImage.apply(this, arguments);
  6575. }
  6576. var Document = /*#__PURE__*/function () {
  6577. function Document(canvg) {
  6578. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  6579. _ref$rootEmSize = _ref.rootEmSize,
  6580. rootEmSize = _ref$rootEmSize === void 0 ? 12 : _ref$rootEmSize,
  6581. _ref$emSize = _ref.emSize,
  6582. emSize = _ref$emSize === void 0 ? 12 : _ref$emSize,
  6583. _ref$createCanvas = _ref.createCanvas,
  6584. createCanvas = _ref$createCanvas === void 0 ? Document.createCanvas : _ref$createCanvas,
  6585. _ref$createImage = _ref.createImage,
  6586. createImage = _ref$createImage === void 0 ? Document.createImage : _ref$createImage,
  6587. anonymousCrossOrigin = _ref.anonymousCrossOrigin;
  6588. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Document);
  6589. this.canvg = canvg;
  6590. this.definitions = {};
  6591. this.styles = {};
  6592. this.stylesSpecificity = {};
  6593. this.images = [];
  6594. this.fonts = [];
  6595. this.emSizeStack = [];
  6596. this.uniqueId = 0;
  6597. this.screen = canvg.screen;
  6598. this.rootEmSize = rootEmSize;
  6599. this.emSize = emSize;
  6600. this.createCanvas = createCanvas;
  6601. this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
  6602. this.screen.wait(this.isImagesLoaded.bind(this));
  6603. this.screen.wait(this.isFontsLoaded.bind(this));
  6604. }
  6605. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Document, [{
  6606. key: "bindCreateImage",
  6607. value: function bindCreateImage(createImage, anonymousCrossOrigin) {
  6608. if (typeof anonymousCrossOrigin === 'boolean') {
  6609. return function (source, forceAnonymousCrossOrigin) {
  6610. return createImage(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin);
  6611. };
  6612. }
  6613. return createImage;
  6614. }
  6615. }, {
  6616. key: "popEmSize",
  6617. value: function popEmSize() {
  6618. var emSizeStack = this.emSizeStack;
  6619. emSizeStack.pop();
  6620. }
  6621. }, {
  6622. key: "getUniqueId",
  6623. value: function getUniqueId() {
  6624. return "canvg".concat(++this.uniqueId);
  6625. }
  6626. }, {
  6627. key: "isImagesLoaded",
  6628. value: function isImagesLoaded() {
  6629. return this.images.every(function (_) {
  6630. return _.loaded;
  6631. });
  6632. }
  6633. }, {
  6634. key: "isFontsLoaded",
  6635. value: function isFontsLoaded() {
  6636. return this.fonts.every(function (_) {
  6637. return _.loaded;
  6638. });
  6639. }
  6640. }, {
  6641. key: "createDocumentElement",
  6642. value: function createDocumentElement(document) {
  6643. var documentElement = this.createElement(document.documentElement);
  6644. documentElement.root = true;
  6645. documentElement.addStylesFromStyleDefinition();
  6646. this.documentElement = documentElement;
  6647. return documentElement;
  6648. }
  6649. }, {
  6650. key: "createElement",
  6651. value: function createElement(node) {
  6652. var elementType = node.nodeName.replace(/^[^:]+:/, '');
  6653. var ElementType = Document.elementTypes[elementType];
  6654. if (typeof ElementType !== 'undefined') {
  6655. return new ElementType(this, node);
  6656. }
  6657. return new UnknownElement(this, node);
  6658. }
  6659. }, {
  6660. key: "createTextNode",
  6661. value: function createTextNode(node) {
  6662. return new TextNode(this, node);
  6663. }
  6664. }, {
  6665. key: "setViewBox",
  6666. value: function setViewBox(config) {
  6667. this.screen.setViewBox(_objectSpread({
  6668. document: this
  6669. }, config));
  6670. }
  6671. }, {
  6672. key: "window",
  6673. get: function get() {
  6674. return this.screen.window;
  6675. }
  6676. }, {
  6677. key: "fetch",
  6678. get: function get() {
  6679. return this.screen.fetch;
  6680. }
  6681. }, {
  6682. key: "ctx",
  6683. get: function get() {
  6684. return this.screen.ctx;
  6685. }
  6686. }, {
  6687. key: "emSize",
  6688. get: function get() {
  6689. var emSizeStack = this.emSizeStack;
  6690. return emSizeStack[emSizeStack.length - 1];
  6691. },
  6692. set: function set(value) {
  6693. var emSizeStack = this.emSizeStack;
  6694. emSizeStack.push(value);
  6695. }
  6696. }]);
  6697. return Document;
  6698. }();
  6699. Document.createCanvas = createCanvas;
  6700. Document.createImage = createImage;
  6701. Document.elementTypes = elementTypes;
  6702. 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; }
  6703. 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; }
  6704. /**
  6705. * SVG renderer on canvas.
  6706. */
  6707. var Canvg = /*#__PURE__*/function () {
  6708. /**
  6709. * Main constructor.
  6710. * @param ctx - Rendering context.
  6711. * @param svg - SVG Document.
  6712. * @param options - Rendering options.
  6713. */
  6714. function Canvg(ctx, svg) {
  6715. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6716. (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_17__.default)(this, Canvg);
  6717. this.parser = new Parser(options);
  6718. this.screen = new Screen(ctx, options);
  6719. this.options = options;
  6720. var document = new Document(this, options);
  6721. var documentElement = document.createDocumentElement(svg);
  6722. this.document = document;
  6723. this.documentElement = documentElement;
  6724. }
  6725. /**
  6726. * Create Canvg isntance from SVG source string or URL.
  6727. * @param ctx - Rendering context.
  6728. * @param svg - SVG source string or URL.
  6729. * @param options - Rendering options.
  6730. */
  6731. (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_18__.default)(Canvg, [{
  6732. key: "fork",
  6733. /**
  6734. * Create new Canvg instance with inherited options.
  6735. * @param ctx - Rendering context.
  6736. * @param svg - SVG source string or URL.
  6737. * @param options - Rendering options.
  6738. */
  6739. value: function fork(ctx, svg) {
  6740. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6741. return Canvg.from(ctx, svg, _objectSpread$1({}, this.options, {}, options));
  6742. }
  6743. /**
  6744. * Create new Canvg instance with inherited options.
  6745. * @param ctx - Rendering context.
  6746. * @param svg - SVG source string.
  6747. * @param options - Rendering options.
  6748. */
  6749. }, {
  6750. key: "forkString",
  6751. value: function forkString(ctx, svg) {
  6752. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6753. return Canvg.fromString(ctx, svg, _objectSpread$1({}, this.options, {}, options));
  6754. }
  6755. /**
  6756. * Document is ready promise.
  6757. */
  6758. }, {
  6759. key: "ready",
  6760. value: function ready() {
  6761. return this.screen.ready();
  6762. }
  6763. /**
  6764. * Document is ready value.
  6765. */
  6766. }, {
  6767. key: "isReady",
  6768. value: function isReady() {
  6769. return this.screen.isReady();
  6770. }
  6771. /**
  6772. * Render only first frame, ignoring animations and mouse.
  6773. * @param options - Rendering options.
  6774. */
  6775. }, {
  6776. key: "render",
  6777. value: function () {
  6778. var _render = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
  6779. var options,
  6780. _args = arguments;
  6781. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6782. while (1) {
  6783. switch (_context.prev = _context.next) {
  6784. case 0:
  6785. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  6786. this.start(_objectSpread$1({
  6787. enableRedraw: true,
  6788. ignoreAnimation: true,
  6789. ignoreMouse: true
  6790. }, options));
  6791. _context.next = 4;
  6792. return this.ready();
  6793. case 4:
  6794. this.stop();
  6795. case 5:
  6796. case "end":
  6797. return _context.stop();
  6798. }
  6799. }
  6800. }, _callee, this);
  6801. }));
  6802. function render() {
  6803. return _render.apply(this, arguments);
  6804. }
  6805. return render;
  6806. }()
  6807. /**
  6808. * Start rendering.
  6809. * @param options - Render options.
  6810. */
  6811. }, {
  6812. key: "start",
  6813. value: function start() {
  6814. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  6815. var documentElement = this.documentElement,
  6816. screen = this.screen,
  6817. baseOptions = this.options;
  6818. screen.start(documentElement, _objectSpread$1({
  6819. enableRedraw: true
  6820. }, baseOptions, {}, options));
  6821. }
  6822. /**
  6823. * Stop rendering.
  6824. */
  6825. }, {
  6826. key: "stop",
  6827. value: function stop() {
  6828. this.screen.stop();
  6829. }
  6830. /**
  6831. * Resize SVG to fit in given size.
  6832. * @param width
  6833. * @param height
  6834. * @param preserveAspectRatio
  6835. */
  6836. }, {
  6837. key: "resize",
  6838. value: function resize(width) {
  6839. var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
  6840. var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  6841. this.documentElement.resize(width, height, preserveAspectRatio);
  6842. }
  6843. }], [{
  6844. key: "from",
  6845. value: function () {
  6846. 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) {
  6847. var options,
  6848. parser,
  6849. svgDocument,
  6850. _args2 = arguments;
  6851. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee2$(_context2) {
  6852. while (1) {
  6853. switch (_context2.prev = _context2.next) {
  6854. case 0:
  6855. options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
  6856. parser = new Parser(options);
  6857. _context2.next = 4;
  6858. return parser.parse(svg);
  6859. case 4:
  6860. svgDocument = _context2.sent;
  6861. return _context2.abrupt("return", new Canvg(ctx, svgDocument, options));
  6862. case 6:
  6863. case "end":
  6864. return _context2.stop();
  6865. }
  6866. }
  6867. }, _callee2);
  6868. }));
  6869. function from(_x, _x2) {
  6870. return _from.apply(this, arguments);
  6871. }
  6872. return from;
  6873. }()
  6874. /**
  6875. * Create Canvg isntance from SVG source string.
  6876. * @param ctx - Rendering context.
  6877. * @param svg - SVG source string.
  6878. * @param options - Rendering options.
  6879. */
  6880. }, {
  6881. key: "fromString",
  6882. value: function fromString(ctx, svg) {
  6883. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6884. var parser = new Parser(options);
  6885. var svgDocument = parser.parseFromString(svg);
  6886. return new Canvg(ctx, svgDocument, options);
  6887. }
  6888. }]);
  6889. return Canvg;
  6890. }();
  6891. /**
  6892. * Options preset for `OffscreenCanvas`.
  6893. * @param config - Preset requirements.
  6894. * @param config.DOMParser - XML/HTML parser from string into DOM Document.
  6895. */
  6896. function offscreen() {
  6897. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  6898. DOMParserFallback = _ref.DOMParser;
  6899. var preset = {
  6900. window: null,
  6901. ignoreAnimation: true,
  6902. ignoreMouse: true,
  6903. DOMParser: DOMParserFallback,
  6904. createCanvas: function createCanvas(width, height) {
  6905. return new OffscreenCanvas(width, height);
  6906. },
  6907. createImage: function createImage(url) {
  6908. return (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_15__.default)( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().mark(function _callee() {
  6909. var response, blob, img;
  6910. return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_14___default().wrap(function _callee$(_context) {
  6911. while (1) {
  6912. switch (_context.prev = _context.next) {
  6913. case 0:
  6914. _context.next = 2;
  6915. return fetch(url);
  6916. case 2:
  6917. response = _context.sent;
  6918. _context.next = 5;
  6919. return response.blob();
  6920. case 5:
  6921. blob = _context.sent;
  6922. _context.next = 8;
  6923. return createImageBitmap(blob);
  6924. case 8:
  6925. img = _context.sent;
  6926. return _context.abrupt("return", img);
  6927. case 10:
  6928. case "end":
  6929. return _context.stop();
  6930. }
  6931. }
  6932. }, _callee);
  6933. }))();
  6934. }
  6935. };
  6936. if (typeof DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {
  6937. Reflect.deleteProperty(preset, 'DOMParser');
  6938. }
  6939. return preset;
  6940. }
  6941. /**
  6942. * Options preset for `node-canvas`.
  6943. * @param config - Preset requirements.
  6944. * @param config.DOMParser - XML/HTML parser from string into DOM Document.
  6945. * @param config.canvas - `node-canvas` exports.
  6946. * @param config.fetch - WHATWG-compatible `fetch` function.
  6947. */
  6948. function node(_ref) {
  6949. var DOMParser = _ref.DOMParser,
  6950. canvas = _ref.canvas,
  6951. fetch = _ref.fetch;
  6952. return {
  6953. window: null,
  6954. ignoreAnimation: true,
  6955. ignoreMouse: true,
  6956. DOMParser: DOMParser,
  6957. fetch: fetch,
  6958. createCanvas: canvas.createCanvas,
  6959. createImage: canvas.loadImage
  6960. };
  6961. }
  6962. var index = /*#__PURE__*/Object.freeze({
  6963. __proto__: null,
  6964. offscreen: offscreen,
  6965. node: node
  6966. });
  6967. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Canvg);
  6968. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy9yZWdlbmVyYXRvci1ydW50aW1lL3J1bnRpbWUuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTQtcHJlc2VudCwgRmFjZWJvb2ssIEluYy5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBNSVQgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS5cbiAqL1xuXG52YXIgcnVudGltZSA9IChmdW5jdGlvbiAoZXhwb3J0cykge1xuICBcInVzZSBzdHJpY3RcIjtcblxuICB2YXIgT3AgPSBPYmplY3QucHJvdG90eXBlO1xuICB2YXIgaGFzT3duID0gT3AuaGFzT3duUHJvcGVydHk7XG4gIHZhciB1bmRlZmluZWQ7IC8vIE1vcmUgY29tcHJlc3NpYmxlIHRoYW4gdm9pZCAwLlxuICB2YXIgJFN5bWJvbCA9IHR5cGVvZiBTeW1ib2wgPT09IFwiZnVuY3Rpb25cIiA/IFN5bWJvbCA6IHt9O1xuICB2YXIgaXRlcmF0b3JTeW1ib2wgPSAkU3ltYm9sLml0ZXJhdG9yIHx8IFwiQEBpdGVyYXRvclwiO1xuICB2YXIgYXN5bmNJdGVyYXRvclN5bWJvbCA9ICRTeW1ib2wuYXN5bmNJdGVyYXRvciB8fCBcIkBAYXN5bmNJdGVyYXRvclwiO1xuICB2YXIgdG9TdHJpbmdUYWdTeW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lbmVyYXRvciwgUHJvbWlzZUltcGwpIHtcbiAgICBmdW5jdGlvbiBpbnZva2UobWV0aG9kLCBhcmcsIHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGdlbmVyYXRvclttZXRob2RdLCBnZW5lcmF0b3IsIGFyZyk7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICByZWplY3QocmVjb3JkLmFyZyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgcmVzdWx0ID0gcmVjb3JkLmFyZztcbiAgICAgICAgdmFyIHZhbHVlID0gcmVzdWx0LnZhbHVlO1xuICAgICAgICBpZiAodmFsdWUgJiZcbiAgICAgICAgICAgIHR5cGVvZiB2YWx1ZSA9PT0gXCJvYmplY3RcIiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwodmFsdWUsIFwiX19hd2FpdFwiKSkge1xuICAgICAgICAgIHJldHVybiBQcm9taXNlSW1wbC5yZXNvbHZlKHZhbHVlLl9fYXdhaXQpLnRoZW4oZnVuY3Rpb24odmFsdWUpIHtcbiAgICAgICAgICAgIGludm9rZShcIm5leHRcIiwgdmFsdWUsIHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgfSwgZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICBpbnZva2UoXCJ0aHJvd1wiLCBlcnIsIHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gUHJvbWlzZUltcGwucmVzb2x2ZSh2YWx1ZSkudGhlbihmdW5jdGlvbih1bndyYXBwZWQpIHtcbiAgICAgICAgICAvLyBXaGVuIGEgeWllbGRlZCBQcm9taXNlIGlzIHJlc29sdmVkLCBpdHMgZmluYWwgdmFsdWUgYmVjb21lc1xuICAgICAgICAgIC8vIHRoZSAudmFsdWUgb2YgdGhlIFByb21pc2U8e3ZhbHVlLG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HtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O1xuXG4gICAgICAgIH0gZWxzZSB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XG4gICAgICBpZiAoaXRlcmF0b3JNZXRob2QpIHtcbiAgICAgICAgcmV0dXJuIGl0ZXJhdG9yTWV0aG9kLmNhbGwoaXRlcmFibGUpO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIGl0ZXJhYmxlLm5leHQgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICByZXR1cm4gaXRlcmFibGU7XG4gICAgICB9XG5cbiAgICAgIGlmICghaXNOYU4oaXRlcmFibGUubGVuZ3RoKSkge1xuICAgICAgICB2YXIgaSA9IC0xLCBuZXh0ID0gZnVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgIG5leHQudmFsdWUgPSBpdGVyYWJsZVtpXTtcbiAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcblxuICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBuZXh0Lm5leHQgPSBuZXh0O1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJldHVybiBhbiBpdGVyYXRvciB3aXRoIG5vIHZhbHVlcy5cbiAgICByZXR1cm4geyBuZXh0OiBkb25lUmVzdWx0IH07XG4gIH1cbiAgZXhwb3J0cy52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgZnVuY3Rpb24gZG9uZVJlc3VsdCgpIHtcbiAgICByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIH1cblxuICBDb250ZXh0LnByb3RvdHl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IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA9IHJlY29yZC5hcm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webpack_exports__, __webpack_require__) => {
  6975. "use strict";
  6976. __webpack_require__.r(__webpack_exports__);
  6977. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6978. /* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
  6979. /* harmony export */ });
  6980. function _arrayLikeToArray(arr, len) {
  6981. if (len == null || len > arr.length) len = arr.length;
  6982. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  6983. arr2[i] = arr[i];
  6984. }
  6985. return arr2;
  6986. }
  6987. /***/ }),
  6988. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
  6989. /*!*******************************************************************!*\
  6990. !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
  6991. \*******************************************************************/
  6992. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  6993. "use strict";
  6994. __webpack_require__.r(__webpack_exports__);
  6995. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6996. /* harmony export */ "default": () => (/* binding */ _arrayWithHoles)
  6997. /* harmony export */ });
  6998. function _arrayWithHoles(arr) {
  6999. if (Array.isArray(arr)) return arr;
  7000. }
  7001. /***/ }),
  7002. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js":
  7003. /*!**********************************************************************!*\
  7004. !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***!
  7005. \**********************************************************************/
  7006. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7007. "use strict";
  7008. __webpack_require__.r(__webpack_exports__);
  7009. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7010. /* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles)
  7011. /* harmony export */ });
  7012. /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  7013. function _arrayWithoutHoles(arr) {
  7014. if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(arr);
  7015. }
  7016. /***/ }),
  7017. /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
  7018. /*!**************************************************************************!*\
  7019. !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
  7020. \**************************************************************************/
  7021. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7022. "use strict";
  7023. __webpack_require__.r(__webpack_exports__);
  7024. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7025. /* harmony export */ "default": () => (/* binding */ _assertThisInitialized)
  7026. /* harmony export */ });
  7027. function _assertThisInitialized(self) {
  7028. if (self === void 0) {
  7029. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  7030. }
  7031. return self;
  7032. }
  7033. /***/ }),
  7034. /***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":
  7035. /*!*********************************************************************!*\
  7036. !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
  7037. \*********************************************************************/
  7038. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7039. "use strict";
  7040. __webpack_require__.r(__webpack_exports__);
  7041. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7042. /* harmony export */ "default": () => (/* binding */ _asyncToGenerator)
  7043. /* harmony export */ });
  7044. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  7045. try {
  7046. var info = gen[key](arg);
  7047. var value = info.value;
  7048. } catch (error) {
  7049. reject(error);
  7050. return;
  7051. }
  7052. if (info.done) {
  7053. resolve(value);
  7054. } else {
  7055. Promise.resolve(value).then(_next, _throw);
  7056. }
  7057. }
  7058. function _asyncToGenerator(fn) {
  7059. return function () {
  7060. var self = this,
  7061. args = arguments;
  7062. return new Promise(function (resolve, reject) {
  7063. var gen = fn.apply(self, args);
  7064. function _next(value) {
  7065. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  7066. }
  7067. function _throw(err) {
  7068. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  7069. }
  7070. _next(undefined);
  7071. });
  7072. };
  7073. }
  7074. /***/ }),
  7075. /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
  7076. /*!*******************************************************************!*\
  7077. !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
  7078. \*******************************************************************/
  7079. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7080. "use strict";
  7081. __webpack_require__.r(__webpack_exports__);
  7082. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7083. /* harmony export */ "default": () => (/* binding */ _classCallCheck)
  7084. /* harmony export */ });
  7085. function _classCallCheck(instance, Constructor) {
  7086. if (!(instance instanceof Constructor)) {
  7087. throw new TypeError("Cannot call a class as a function");
  7088. }
  7089. }
  7090. /***/ }),
  7091. /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js":
  7092. /*!****************************************************************!*\
  7093. !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
  7094. \****************************************************************/
  7095. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7096. "use strict";
  7097. __webpack_require__.r(__webpack_exports__);
  7098. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7099. /* harmony export */ "default": () => (/* binding */ _createClass)
  7100. /* harmony export */ });
  7101. function _defineProperties(target, props) {
  7102. for (var i = 0; i < props.length; i++) {
  7103. var descriptor = props[i];
  7104. descriptor.enumerable = descriptor.enumerable || false;
  7105. descriptor.configurable = true;
  7106. if ("value" in descriptor) descriptor.writable = true;
  7107. Object.defineProperty(target, descriptor.key, descriptor);
  7108. }
  7109. }
  7110. function _createClass(Constructor, protoProps, staticProps) {
  7111. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  7112. if (staticProps) _defineProperties(Constructor, staticProps);
  7113. return Constructor;
  7114. }
  7115. /***/ }),
  7116. /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
  7117. /*!*******************************************************************!*\
  7118. !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
  7119. \*******************************************************************/
  7120. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7121. "use strict";
  7122. __webpack_require__.r(__webpack_exports__);
  7123. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7124. /* harmony export */ "default": () => (/* binding */ _defineProperty)
  7125. /* harmony export */ });
  7126. function _defineProperty(obj, key, value) {
  7127. if (key in obj) {
  7128. Object.defineProperty(obj, key, {
  7129. value: value,
  7130. enumerable: true,
  7131. configurable: true,
  7132. writable: true
  7133. });
  7134. } else {
  7135. obj[key] = value;
  7136. }
  7137. return obj;
  7138. }
  7139. /***/ }),
  7140. /***/ "./node_modules/@babel/runtime/helpers/esm/get.js":
  7141. /*!********************************************************!*\
  7142. !*** ./node_modules/@babel/runtime/helpers/esm/get.js ***!
  7143. \********************************************************/
  7144. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7145. "use strict";
  7146. __webpack_require__.r(__webpack_exports__);
  7147. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7148. /* harmony export */ "default": () => (/* binding */ _get)
  7149. /* harmony export */ });
  7150. /* harmony import */ var _superPropBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superPropBase.js */ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js");
  7151. function _get(target, property, receiver) {
  7152. if (typeof Reflect !== "undefined" && Reflect.get) {
  7153. _get = Reflect.get;
  7154. } else {
  7155. _get = function _get(target, property, receiver) {
  7156. var base = (0,_superPropBase_js__WEBPACK_IMPORTED_MODULE_0__.default)(target, property);
  7157. if (!base) return;
  7158. var desc = Object.getOwnPropertyDescriptor(base, property);
  7159. if (desc.get) {
  7160. return desc.get.call(receiver);
  7161. }
  7162. return desc.value;
  7163. };
  7164. }
  7165. return _get(target, property, receiver || target);
  7166. }
  7167. /***/ }),
  7168. /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
  7169. /*!*******************************************************************!*\
  7170. !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
  7171. \*******************************************************************/
  7172. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7173. "use strict";
  7174. __webpack_require__.r(__webpack_exports__);
  7175. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7176. /* harmony export */ "default": () => (/* binding */ _getPrototypeOf)
  7177. /* harmony export */ });
  7178. function _getPrototypeOf(o) {
  7179. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  7180. return o.__proto__ || Object.getPrototypeOf(o);
  7181. };
  7182. return _getPrototypeOf(o);
  7183. }
  7184. /***/ }),
  7185. /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js":
  7186. /*!*************************************************************!*\
  7187. !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
  7188. \*************************************************************/
  7189. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7190. "use strict";
  7191. __webpack_require__.r(__webpack_exports__);
  7192. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7193. /* harmony export */ "default": () => (/* binding */ _inherits)
  7194. /* harmony export */ });
  7195. /* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
  7196. function _inherits(subClass, superClass) {
  7197. if (typeof superClass !== "function" && superClass !== null) {
  7198. throw new TypeError("Super expression must either be null or a function");
  7199. }
  7200. subClass.prototype = Object.create(superClass && superClass.prototype, {
  7201. constructor: {
  7202. value: subClass,
  7203. writable: true,
  7204. configurable: true
  7205. }
  7206. });
  7207. if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(subClass, superClass);
  7208. }
  7209. /***/ }),
  7210. /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":
  7211. /*!********************************************************************!*\
  7212. !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
  7213. \********************************************************************/
  7214. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7215. "use strict";
  7216. __webpack_require__.r(__webpack_exports__);
  7217. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7218. /* harmony export */ "default": () => (/* binding */ _iterableToArray)
  7219. /* harmony export */ });
  7220. function _iterableToArray(iter) {
  7221. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  7222. }
  7223. /***/ }),
  7224. /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
  7225. /*!*************************************************************************!*\
  7226. !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
  7227. \*************************************************************************/
  7228. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7229. "use strict";
  7230. __webpack_require__.r(__webpack_exports__);
  7231. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7232. /* harmony export */ "default": () => (/* binding */ _iterableToArrayLimit)
  7233. /* harmony export */ });
  7234. function _iterableToArrayLimit(arr, i) {
  7235. var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
  7236. if (_i == null) return;
  7237. var _arr = [];
  7238. var _n = true;
  7239. var _d = false;
  7240. var _s, _e;
  7241. try {
  7242. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  7243. _arr.push(_s.value);
  7244. if (i && _arr.length === i) break;
  7245. }
  7246. } catch (err) {
  7247. _d = true;
  7248. _e = err;
  7249. } finally {
  7250. try {
  7251. if (!_n && _i["return"] != null) _i["return"]();
  7252. } finally {
  7253. if (_d) throw _e;
  7254. }
  7255. }
  7256. return _arr;
  7257. }
  7258. /***/ }),
  7259. /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
  7260. /*!********************************************************************!*\
  7261. !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
  7262. \********************************************************************/
  7263. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7264. "use strict";
  7265. __webpack_require__.r(__webpack_exports__);
  7266. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7267. /* harmony export */ "default": () => (/* binding */ _nonIterableRest)
  7268. /* harmony export */ });
  7269. function _nonIterableRest() {
  7270. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  7271. }
  7272. /***/ }),
  7273. /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js":
  7274. /*!**********************************************************************!*\
  7275. !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***!
  7276. \**********************************************************************/
  7277. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7278. "use strict";
  7279. __webpack_require__.r(__webpack_exports__);
  7280. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7281. /* harmony export */ "default": () => (/* binding */ _nonIterableSpread)
  7282. /* harmony export */ });
  7283. function _nonIterableSpread() {
  7284. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  7285. }
  7286. /***/ }),
  7287. /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
  7288. /*!******************************************************************************!*\
  7289. !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
  7290. \******************************************************************************/
  7291. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7292. "use strict";
  7293. __webpack_require__.r(__webpack_exports__);
  7294. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7295. /* harmony export */ "default": () => (/* binding */ _possibleConstructorReturn)
  7296. /* harmony export */ });
  7297. /* 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");
  7298. /* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
  7299. function _possibleConstructorReturn(self, call) {
  7300. if (call && ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__.default)(call) === "object" || typeof call === "function")) {
  7301. return call;
  7302. }
  7303. return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__.default)(self);
  7304. }
  7305. /***/ }),
  7306. /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
  7307. /*!*******************************************************************!*\
  7308. !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
  7309. \*******************************************************************/
  7310. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7311. "use strict";
  7312. __webpack_require__.r(__webpack_exports__);
  7313. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7314. /* harmony export */ "default": () => (/* binding */ _setPrototypeOf)
  7315. /* harmony export */ });
  7316. function _setPrototypeOf(o, p) {
  7317. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  7318. o.__proto__ = p;
  7319. return o;
  7320. };
  7321. return _setPrototypeOf(o, p);
  7322. }
  7323. /***/ }),
  7324. /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
  7325. /*!******************************************************************!*\
  7326. !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
  7327. \******************************************************************/
  7328. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7329. "use strict";
  7330. __webpack_require__.r(__webpack_exports__);
  7331. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7332. /* harmony export */ "default": () => (/* binding */ _slicedToArray)
  7333. /* harmony export */ });
  7334. /* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
  7335. /* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js");
  7336. /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  7337. /* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
  7338. function _slicedToArray(arr, i) {
  7339. 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)();
  7340. }
  7341. /***/ }),
  7342. /***/ "./node_modules/@babel/runtime/helpers/esm/superPropBase.js":
  7343. /*!******************************************************************!*\
  7344. !*** ./node_modules/@babel/runtime/helpers/esm/superPropBase.js ***!
  7345. \******************************************************************/
  7346. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7347. "use strict";
  7348. __webpack_require__.r(__webpack_exports__);
  7349. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7350. /* harmony export */ "default": () => (/* binding */ _superPropBase)
  7351. /* harmony export */ });
  7352. /* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
  7353. function _superPropBase(object, property) {
  7354. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  7355. object = (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(object);
  7356. if (object === null) break;
  7357. }
  7358. return object;
  7359. }
  7360. /***/ }),
  7361. /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":
  7362. /*!**********************************************************************!*\
  7363. !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***!
  7364. \**********************************************************************/
  7365. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7366. "use strict";
  7367. __webpack_require__.r(__webpack_exports__);
  7368. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7369. /* harmony export */ "default": () => (/* binding */ _toConsumableArray)
  7370. /* harmony export */ });
  7371. /* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js");
  7372. /* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js");
  7373. /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  7374. /* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js");
  7375. function _toConsumableArray(arr) {
  7376. 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)();
  7377. }
  7378. /***/ }),
  7379. /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
  7380. /*!***********************************************************!*\
  7381. !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
  7382. \***********************************************************/
  7383. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7384. "use strict";
  7385. __webpack_require__.r(__webpack_exports__);
  7386. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7387. /* harmony export */ "default": () => (/* binding */ _typeof)
  7388. /* harmony export */ });
  7389. function _typeof(obj) {
  7390. "@babel/helpers - typeof";
  7391. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  7392. _typeof = function _typeof(obj) {
  7393. return typeof obj;
  7394. };
  7395. } else {
  7396. _typeof = function _typeof(obj) {
  7397. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  7398. };
  7399. }
  7400. return _typeof(obj);
  7401. }
  7402. /***/ }),
  7403. /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
  7404. /*!*******************************************************************************!*\
  7405. !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
  7406. \*******************************************************************************/
  7407. /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
  7408. "use strict";
  7409. __webpack_require__.r(__webpack_exports__);
  7410. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7411. /* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
  7412. /* harmony export */ });
  7413. /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  7414. function _unsupportedIterableToArray(o, minLen) {
  7415. if (!o) return;
  7416. if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
  7417. var n = Object.prototype.toString.call(o).slice(8, -1);
  7418. if (n === "Object" && o.constructor) n = o.constructor.name;
  7419. if (n === "Map" || n === "Set") return Array.from(o);
  7420. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(o, minLen);
  7421. }
  7422. /***/ }),
  7423. /***/ "./node_modules/@babel/runtime/regenerator/index.js":
  7424. /*!**********************************************************!*\
  7425. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  7426. \**********************************************************/
  7427. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7428. module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");
  7429. /***/ }),
  7430. /***/ "./node_modules/core-js/internals/a-function.js":
  7431. /*!******************************************************!*\
  7432. !*** ./node_modules/core-js/internals/a-function.js ***!
  7433. \******************************************************/
  7434. /***/ ((module) => {
  7435. module.exports = function (it) {
  7436. if (typeof it != 'function') {
  7437. throw TypeError(String(it) + ' is not a function');
  7438. } return it;
  7439. };
  7440. /***/ }),
  7441. /***/ "./node_modules/core-js/internals/a-possible-prototype.js":
  7442. /*!****************************************************************!*\
  7443. !*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
  7444. \****************************************************************/
  7445. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7446. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  7447. module.exports = function (it) {
  7448. if (!isObject(it) && it !== null) {
  7449. throw TypeError("Can't set " + String(it) + ' as a prototype');
  7450. } return it;
  7451. };
  7452. /***/ }),
  7453. /***/ "./node_modules/core-js/internals/add-to-unscopables.js":
  7454. /*!**************************************************************!*\
  7455. !*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
  7456. \**************************************************************/
  7457. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7458. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  7459. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  7460. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  7461. var UNSCOPABLES = wellKnownSymbol('unscopables');
  7462. var ArrayPrototype = Array.prototype;
  7463. // Array.prototype[@@unscopables]
  7464. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  7465. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  7466. definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
  7467. configurable: true,
  7468. value: create(null)
  7469. });
  7470. }
  7471. // add a key to Array.prototype[@@unscopables]
  7472. module.exports = function (key) {
  7473. ArrayPrototype[UNSCOPABLES][key] = true;
  7474. };
  7475. /***/ }),
  7476. /***/ "./node_modules/core-js/internals/an-instance.js":
  7477. /*!*******************************************************!*\
  7478. !*** ./node_modules/core-js/internals/an-instance.js ***!
  7479. \*******************************************************/
  7480. /***/ ((module) => {
  7481. module.exports = function (it, Constructor, name) {
  7482. if (!(it instanceof Constructor)) {
  7483. throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
  7484. } return it;
  7485. };
  7486. /***/ }),
  7487. /***/ "./node_modules/core-js/internals/array-fill.js":
  7488. /*!******************************************************!*\
  7489. !*** ./node_modules/core-js/internals/array-fill.js ***!
  7490. \******************************************************/
  7491. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7492. "use strict";
  7493. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7494. var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
  7495. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7496. // `Array.prototype.fill` method implementation
  7497. // https://tc39.es/ecma262/#sec-array.prototype.fill
  7498. module.exports = function fill(value /* , start = 0, end = @length */) {
  7499. var O = toObject(this);
  7500. var length = toLength(O.length);
  7501. var argumentsLength = arguments.length;
  7502. var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  7503. var end = argumentsLength > 2 ? arguments[2] : undefined;
  7504. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  7505. while (endPos > index) O[index++] = value;
  7506. return O;
  7507. };
  7508. /***/ }),
  7509. /***/ "./node_modules/core-js/internals/array-for-each.js":
  7510. /*!**********************************************************!*\
  7511. !*** ./node_modules/core-js/internals/array-for-each.js ***!
  7512. \**********************************************************/
  7513. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7514. "use strict";
  7515. var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;
  7516. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  7517. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  7518. // `Array.prototype.forEach` method implementation
  7519. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  7520. module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  7521. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  7522. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  7523. } : [].forEach;
  7524. /***/ }),
  7525. /***/ "./node_modules/core-js/internals/array-from.js":
  7526. /*!******************************************************!*\
  7527. !*** ./node_modules/core-js/internals/array-from.js ***!
  7528. \******************************************************/
  7529. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7530. "use strict";
  7531. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  7532. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7533. var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js");
  7534. var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
  7535. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7536. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  7537. var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
  7538. // `Array.from` method implementation
  7539. // https://tc39.es/ecma262/#sec-array.from
  7540. module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  7541. var O = toObject(arrayLike);
  7542. var C = typeof this == 'function' ? this : Array;
  7543. var argumentsLength = arguments.length;
  7544. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  7545. var mapping = mapfn !== undefined;
  7546. var iteratorMethod = getIteratorMethod(O);
  7547. var index = 0;
  7548. var length, result, step, iterator, next, value;
  7549. if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
  7550. // if the target is not iterable or it's an array with the default iterator - use a simple case
  7551. if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
  7552. iterator = iteratorMethod.call(O);
  7553. next = iterator.next;
  7554. result = new C();
  7555. for (;!(step = next.call(iterator)).done; index++) {
  7556. value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
  7557. createProperty(result, index, value);
  7558. }
  7559. } else {
  7560. length = toLength(O.length);
  7561. result = new C(length);
  7562. for (;length > index; index++) {
  7563. value = mapping ? mapfn(O[index], index) : O[index];
  7564. createProperty(result, index, value);
  7565. }
  7566. }
  7567. result.length = index;
  7568. return result;
  7569. };
  7570. /***/ }),
  7571. /***/ "./node_modules/core-js/internals/array-iteration.js":
  7572. /*!***********************************************************!*\
  7573. !*** ./node_modules/core-js/internals/array-iteration.js ***!
  7574. \***********************************************************/
  7575. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7576. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  7577. var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
  7578. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7579. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7580. var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
  7581. var push = [].push;
  7582. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  7583. var createMethod = function (TYPE) {
  7584. var IS_MAP = TYPE == 1;
  7585. var IS_FILTER = TYPE == 2;
  7586. var IS_SOME = TYPE == 3;
  7587. var IS_EVERY = TYPE == 4;
  7588. var IS_FIND_INDEX = TYPE == 6;
  7589. var IS_FILTER_OUT = TYPE == 7;
  7590. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  7591. return function ($this, callbackfn, that, specificCreate) {
  7592. var O = toObject($this);
  7593. var self = IndexedObject(O);
  7594. var boundFunction = bind(callbackfn, that, 3);
  7595. var length = toLength(self.length);
  7596. var index = 0;
  7597. var create = specificCreate || arraySpeciesCreate;
  7598. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  7599. var value, result;
  7600. for (;length > index; index++) if (NO_HOLES || index in self) {
  7601. value = self[index];
  7602. result = boundFunction(value, index, O);
  7603. if (TYPE) {
  7604. if (IS_MAP) target[index] = result; // map
  7605. else if (result) switch (TYPE) {
  7606. case 3: return true; // some
  7607. case 5: return value; // find
  7608. case 6: return index; // findIndex
  7609. case 2: push.call(target, value); // filter
  7610. } else switch (TYPE) {
  7611. case 4: return false; // every
  7612. case 7: push.call(target, value); // filterOut
  7613. }
  7614. }
  7615. }
  7616. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  7617. };
  7618. };
  7619. module.exports = {
  7620. // `Array.prototype.forEach` method
  7621. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  7622. forEach: createMethod(0),
  7623. // `Array.prototype.map` method
  7624. // https://tc39.es/ecma262/#sec-array.prototype.map
  7625. map: createMethod(1),
  7626. // `Array.prototype.filter` method
  7627. // https://tc39.es/ecma262/#sec-array.prototype.filter
  7628. filter: createMethod(2),
  7629. // `Array.prototype.some` method
  7630. // https://tc39.es/ecma262/#sec-array.prototype.some
  7631. some: createMethod(3),
  7632. // `Array.prototype.every` method
  7633. // https://tc39.es/ecma262/#sec-array.prototype.every
  7634. every: createMethod(4),
  7635. // `Array.prototype.find` method
  7636. // https://tc39.es/ecma262/#sec-array.prototype.find
  7637. find: createMethod(5),
  7638. // `Array.prototype.findIndex` method
  7639. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  7640. findIndex: createMethod(6),
  7641. // `Array.prototype.filterOut` method
  7642. // https://github.com/tc39/proposal-array-filtering
  7643. filterOut: createMethod(7)
  7644. };
  7645. /***/ }),
  7646. /***/ "./node_modules/core-js/internals/array-reduce.js":
  7647. /*!********************************************************!*\
  7648. !*** ./node_modules/core-js/internals/array-reduce.js ***!
  7649. \********************************************************/
  7650. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7651. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  7652. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  7653. var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "./node_modules/core-js/internals/indexed-object.js");
  7654. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  7655. // `Array.prototype.{ reduce, reduceRight }` methods implementation
  7656. var createMethod = function (IS_RIGHT) {
  7657. return function (that, callbackfn, argumentsLength, memo) {
  7658. aFunction(callbackfn);
  7659. var O = toObject(that);
  7660. var self = IndexedObject(O);
  7661. var length = toLength(O.length);
  7662. var index = IS_RIGHT ? length - 1 : 0;
  7663. var i = IS_RIGHT ? -1 : 1;
  7664. if (argumentsLength < 2) while (true) {
  7665. if (index in self) {
  7666. memo = self[index];
  7667. index += i;
  7668. break;
  7669. }
  7670. index += i;
  7671. if (IS_RIGHT ? index < 0 : length <= index) {
  7672. throw TypeError('Reduce of empty array with no initial value');
  7673. }
  7674. }
  7675. for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
  7676. memo = callbackfn(memo, self[index], index, O);
  7677. }
  7678. return memo;
  7679. };
  7680. };
  7681. module.exports = {
  7682. // `Array.prototype.reduce` method
  7683. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  7684. left: createMethod(false),
  7685. // `Array.prototype.reduceRight` method
  7686. // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  7687. right: createMethod(true)
  7688. };
  7689. /***/ }),
  7690. /***/ "./node_modules/core-js/internals/array-species-create.js":
  7691. /*!****************************************************************!*\
  7692. !*** ./node_modules/core-js/internals/array-species-create.js ***!
  7693. \****************************************************************/
  7694. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7695. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  7696. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  7697. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  7698. var SPECIES = wellKnownSymbol('species');
  7699. // `ArraySpeciesCreate` abstract operation
  7700. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  7701. module.exports = function (originalArray, length) {
  7702. var C;
  7703. if (isArray(originalArray)) {
  7704. C = originalArray.constructor;
  7705. // cross-realm fallback
  7706. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  7707. else if (isObject(C)) {
  7708. C = C[SPECIES];
  7709. if (C === null) C = undefined;
  7710. }
  7711. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  7712. };
  7713. /***/ }),
  7714. /***/ "./node_modules/core-js/internals/call-with-safe-iteration-closing.js":
  7715. /*!****************************************************************************!*\
  7716. !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
  7717. \****************************************************************************/
  7718. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7719. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  7720. var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
  7721. // call something on iterator step with safe closing on error
  7722. module.exports = function (iterator, fn, value, ENTRIES) {
  7723. try {
  7724. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  7725. } catch (error) {
  7726. iteratorClose(iterator);
  7727. throw error;
  7728. }
  7729. };
  7730. /***/ }),
  7731. /***/ "./node_modules/core-js/internals/check-correctness-of-iteration.js":
  7732. /*!**************************************************************************!*\
  7733. !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
  7734. \**************************************************************************/
  7735. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7736. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  7737. var ITERATOR = wellKnownSymbol('iterator');
  7738. var SAFE_CLOSING = false;
  7739. try {
  7740. var called = 0;
  7741. var iteratorWithReturn = {
  7742. next: function () {
  7743. return { done: !!called++ };
  7744. },
  7745. 'return': function () {
  7746. SAFE_CLOSING = true;
  7747. }
  7748. };
  7749. iteratorWithReturn[ITERATOR] = function () {
  7750. return this;
  7751. };
  7752. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  7753. Array.from(iteratorWithReturn, function () { throw 2; });
  7754. } catch (error) { /* empty */ }
  7755. module.exports = function (exec, SKIP_CLOSING) {
  7756. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  7757. var ITERATION_SUPPORT = false;
  7758. try {
  7759. var object = {};
  7760. object[ITERATOR] = function () {
  7761. return {
  7762. next: function () {
  7763. return { done: ITERATION_SUPPORT = true };
  7764. }
  7765. };
  7766. };
  7767. exec(object);
  7768. } catch (error) { /* empty */ }
  7769. return ITERATION_SUPPORT;
  7770. };
  7771. /***/ }),
  7772. /***/ "./node_modules/core-js/internals/collection-strong.js":
  7773. /*!*************************************************************!*\
  7774. !*** ./node_modules/core-js/internals/collection-strong.js ***!
  7775. \*************************************************************/
  7776. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7777. "use strict";
  7778. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  7779. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  7780. var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
  7781. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  7782. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  7783. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  7784. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  7785. var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
  7786. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  7787. var fastKey = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js").fastKey;
  7788. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  7789. var setInternalState = InternalStateModule.set;
  7790. var internalStateGetterFor = InternalStateModule.getterFor;
  7791. module.exports = {
  7792. getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
  7793. var C = wrapper(function (that, iterable) {
  7794. anInstance(that, C, CONSTRUCTOR_NAME);
  7795. setInternalState(that, {
  7796. type: CONSTRUCTOR_NAME,
  7797. index: create(null),
  7798. first: undefined,
  7799. last: undefined,
  7800. size: 0
  7801. });
  7802. if (!DESCRIPTORS) that.size = 0;
  7803. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  7804. });
  7805. var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
  7806. var define = function (that, key, value) {
  7807. var state = getInternalState(that);
  7808. var entry = getEntry(that, key);
  7809. var previous, index;
  7810. // change existing entry
  7811. if (entry) {
  7812. entry.value = value;
  7813. // create new entry
  7814. } else {
  7815. state.last = entry = {
  7816. index: index = fastKey(key, true),
  7817. key: key,
  7818. value: value,
  7819. previous: previous = state.last,
  7820. next: undefined,
  7821. removed: false
  7822. };
  7823. if (!state.first) state.first = entry;
  7824. if (previous) previous.next = entry;
  7825. if (DESCRIPTORS) state.size++;
  7826. else that.size++;
  7827. // add to index
  7828. if (index !== 'F') state.index[index] = entry;
  7829. } return that;
  7830. };
  7831. var getEntry = function (that, key) {
  7832. var state = getInternalState(that);
  7833. // fast case
  7834. var index = fastKey(key);
  7835. var entry;
  7836. if (index !== 'F') return state.index[index];
  7837. // frozen object case
  7838. for (entry = state.first; entry; entry = entry.next) {
  7839. if (entry.key == key) return entry;
  7840. }
  7841. };
  7842. redefineAll(C.prototype, {
  7843. // `{ Map, Set }.prototype.clear()` methods
  7844. // https://tc39.es/ecma262/#sec-map.prototype.clear
  7845. // https://tc39.es/ecma262/#sec-set.prototype.clear
  7846. clear: function clear() {
  7847. var that = this;
  7848. var state = getInternalState(that);
  7849. var data = state.index;
  7850. var entry = state.first;
  7851. while (entry) {
  7852. entry.removed = true;
  7853. if (entry.previous) entry.previous = entry.previous.next = undefined;
  7854. delete data[entry.index];
  7855. entry = entry.next;
  7856. }
  7857. state.first = state.last = undefined;
  7858. if (DESCRIPTORS) state.size = 0;
  7859. else that.size = 0;
  7860. },
  7861. // `{ Map, Set }.prototype.delete(key)` methods
  7862. // https://tc39.es/ecma262/#sec-map.prototype.delete
  7863. // https://tc39.es/ecma262/#sec-set.prototype.delete
  7864. 'delete': function (key) {
  7865. var that = this;
  7866. var state = getInternalState(that);
  7867. var entry = getEntry(that, key);
  7868. if (entry) {
  7869. var next = entry.next;
  7870. var prev = entry.previous;
  7871. delete state.index[entry.index];
  7872. entry.removed = true;
  7873. if (prev) prev.next = next;
  7874. if (next) next.previous = prev;
  7875. if (state.first == entry) state.first = next;
  7876. if (state.last == entry) state.last = prev;
  7877. if (DESCRIPTORS) state.size--;
  7878. else that.size--;
  7879. } return !!entry;
  7880. },
  7881. // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
  7882. // https://tc39.es/ecma262/#sec-map.prototype.foreach
  7883. // https://tc39.es/ecma262/#sec-set.prototype.foreach
  7884. forEach: function forEach(callbackfn /* , that = undefined */) {
  7885. var state = getInternalState(this);
  7886. var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  7887. var entry;
  7888. while (entry = entry ? entry.next : state.first) {
  7889. boundFunction(entry.value, entry.key, this);
  7890. // revert to the last existing entry
  7891. while (entry && entry.removed) entry = entry.previous;
  7892. }
  7893. },
  7894. // `{ Map, Set}.prototype.has(key)` methods
  7895. // https://tc39.es/ecma262/#sec-map.prototype.has
  7896. // https://tc39.es/ecma262/#sec-set.prototype.has
  7897. has: function has(key) {
  7898. return !!getEntry(this, key);
  7899. }
  7900. });
  7901. redefineAll(C.prototype, IS_MAP ? {
  7902. // `Map.prototype.get(key)` method
  7903. // https://tc39.es/ecma262/#sec-map.prototype.get
  7904. get: function get(key) {
  7905. var entry = getEntry(this, key);
  7906. return entry && entry.value;
  7907. },
  7908. // `Map.prototype.set(key, value)` method
  7909. // https://tc39.es/ecma262/#sec-map.prototype.set
  7910. set: function set(key, value) {
  7911. return define(this, key === 0 ? 0 : key, value);
  7912. }
  7913. } : {
  7914. // `Set.prototype.add(value)` method
  7915. // https://tc39.es/ecma262/#sec-set.prototype.add
  7916. add: function add(value) {
  7917. return define(this, value = value === 0 ? 0 : value, value);
  7918. }
  7919. });
  7920. if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
  7921. get: function () {
  7922. return getInternalState(this).size;
  7923. }
  7924. });
  7925. return C;
  7926. },
  7927. setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
  7928. var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
  7929. var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
  7930. var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
  7931. // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
  7932. // https://tc39.es/ecma262/#sec-map.prototype.entries
  7933. // https://tc39.es/ecma262/#sec-map.prototype.keys
  7934. // https://tc39.es/ecma262/#sec-map.prototype.values
  7935. // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
  7936. // https://tc39.es/ecma262/#sec-set.prototype.entries
  7937. // https://tc39.es/ecma262/#sec-set.prototype.keys
  7938. // https://tc39.es/ecma262/#sec-set.prototype.values
  7939. // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
  7940. defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
  7941. setInternalState(this, {
  7942. type: ITERATOR_NAME,
  7943. target: iterated,
  7944. state: getInternalCollectionState(iterated),
  7945. kind: kind,
  7946. last: undefined
  7947. });
  7948. }, function () {
  7949. var state = getInternalIteratorState(this);
  7950. var kind = state.kind;
  7951. var entry = state.last;
  7952. // revert to the last existing entry
  7953. while (entry && entry.removed) entry = entry.previous;
  7954. // get next entry
  7955. if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
  7956. // or finish the iteration
  7957. state.target = undefined;
  7958. return { value: undefined, done: true };
  7959. }
  7960. // return step by kind
  7961. if (kind == 'keys') return { value: entry.key, done: false };
  7962. if (kind == 'values') return { value: entry.value, done: false };
  7963. return { value: [entry.key, entry.value], done: false };
  7964. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  7965. // `{ Map, Set }.prototype[@@species]` accessors
  7966. // https://tc39.es/ecma262/#sec-get-map-@@species
  7967. // https://tc39.es/ecma262/#sec-get-set-@@species
  7968. setSpecies(CONSTRUCTOR_NAME);
  7969. }
  7970. };
  7971. /***/ }),
  7972. /***/ "./node_modules/core-js/internals/collection.js":
  7973. /*!******************************************************!*\
  7974. !*** ./node_modules/core-js/internals/collection.js ***!
  7975. \******************************************************/
  7976. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  7977. "use strict";
  7978. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  7979. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  7980. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
  7981. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  7982. var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "./node_modules/core-js/internals/internal-metadata.js");
  7983. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  7984. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  7985. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  7986. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  7987. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  7988. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  7989. var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
  7990. module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
  7991. var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
  7992. var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
  7993. var ADDER = IS_MAP ? 'set' : 'add';
  7994. var NativeConstructor = global[CONSTRUCTOR_NAME];
  7995. var NativePrototype = NativeConstructor && NativeConstructor.prototype;
  7996. var Constructor = NativeConstructor;
  7997. var exported = {};
  7998. var fixMethod = function (KEY) {
  7999. var nativeMethod = NativePrototype[KEY];
  8000. redefine(NativePrototype, KEY,
  8001. KEY == 'add' ? function add(value) {
  8002. nativeMethod.call(this, value === 0 ? 0 : value);
  8003. return this;
  8004. } : KEY == 'delete' ? function (key) {
  8005. return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
  8006. } : KEY == 'get' ? function get(key) {
  8007. return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
  8008. } : KEY == 'has' ? function has(key) {
  8009. return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
  8010. } : function set(key, value) {
  8011. nativeMethod.call(this, key === 0 ? 0 : key, value);
  8012. return this;
  8013. }
  8014. );
  8015. };
  8016. var REPLACE = isForced(
  8017. CONSTRUCTOR_NAME,
  8018. typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
  8019. new NativeConstructor().entries().next();
  8020. }))
  8021. );
  8022. if (REPLACE) {
  8023. // create collection constructor
  8024. Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
  8025. InternalMetadataModule.REQUIRED = true;
  8026. } else if (isForced(CONSTRUCTOR_NAME, true)) {
  8027. var instance = new Constructor();
  8028. // early implementations not supports chaining
  8029. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  8030. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  8031. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  8032. // most early implementations doesn't supports iterables, most modern - not close it correctly
  8033. // eslint-disable-next-line no-new -- required for testing
  8034. var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
  8035. // for early implementations -0 and +0 not the same
  8036. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  8037. // V8 ~ Chromium 42- fails only with 5+ elements
  8038. var $instance = new NativeConstructor();
  8039. var index = 5;
  8040. while (index--) $instance[ADDER](index, index);
  8041. return !$instance.has(-0);
  8042. });
  8043. if (!ACCEPT_ITERABLES) {
  8044. Constructor = wrapper(function (dummy, iterable) {
  8045. anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
  8046. var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
  8047. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  8048. return that;
  8049. });
  8050. Constructor.prototype = NativePrototype;
  8051. NativePrototype.constructor = Constructor;
  8052. }
  8053. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  8054. fixMethod('delete');
  8055. fixMethod('has');
  8056. IS_MAP && fixMethod('get');
  8057. }
  8058. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  8059. // weak collections should not contains .clear method
  8060. if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
  8061. }
  8062. exported[CONSTRUCTOR_NAME] = Constructor;
  8063. $({ global: true, forced: Constructor != NativeConstructor }, exported);
  8064. setToStringTag(Constructor, CONSTRUCTOR_NAME);
  8065. if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
  8066. return Constructor;
  8067. };
  8068. /***/ }),
  8069. /***/ "./node_modules/core-js/internals/correct-is-regexp-logic.js":
  8070. /*!*******************************************************************!*\
  8071. !*** ./node_modules/core-js/internals/correct-is-regexp-logic.js ***!
  8072. \*******************************************************************/
  8073. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8074. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8075. var MATCH = wellKnownSymbol('match');
  8076. module.exports = function (METHOD_NAME) {
  8077. var regexp = /./;
  8078. try {
  8079. '/./'[METHOD_NAME](regexp);
  8080. } catch (error1) {
  8081. try {
  8082. regexp[MATCH] = false;
  8083. return '/./'[METHOD_NAME](regexp);
  8084. } catch (error2) { /* empty */ }
  8085. } return false;
  8086. };
  8087. /***/ }),
  8088. /***/ "./node_modules/core-js/internals/correct-prototype-getter.js":
  8089. /*!********************************************************************!*\
  8090. !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
  8091. \********************************************************************/
  8092. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8093. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8094. module.exports = !fails(function () {
  8095. function F() { /* empty */ }
  8096. F.prototype.constructor = null;
  8097. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  8098. return Object.getPrototypeOf(new F()) !== F.prototype;
  8099. });
  8100. /***/ }),
  8101. /***/ "./node_modules/core-js/internals/create-iterator-constructor.js":
  8102. /*!***********************************************************************!*\
  8103. !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
  8104. \***********************************************************************/
  8105. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8106. "use strict";
  8107. var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js").IteratorPrototype;
  8108. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  8109. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  8110. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  8111. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8112. var returnThis = function () { return this; };
  8113. module.exports = function (IteratorConstructor, NAME, next) {
  8114. var TO_STRING_TAG = NAME + ' Iterator';
  8115. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  8116. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  8117. Iterators[TO_STRING_TAG] = returnThis;
  8118. return IteratorConstructor;
  8119. };
  8120. /***/ }),
  8121. /***/ "./node_modules/core-js/internals/create-property.js":
  8122. /*!***********************************************************!*\
  8123. !*** ./node_modules/core-js/internals/create-property.js ***!
  8124. \***********************************************************/
  8125. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8126. "use strict";
  8127. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
  8128. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  8129. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  8130. module.exports = function (object, key, value) {
  8131. var propertyKey = toPrimitive(key);
  8132. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  8133. else object[propertyKey] = value;
  8134. };
  8135. /***/ }),
  8136. /***/ "./node_modules/core-js/internals/define-iterator.js":
  8137. /*!***********************************************************!*\
  8138. !*** ./node_modules/core-js/internals/define-iterator.js ***!
  8139. \***********************************************************/
  8140. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8141. "use strict";
  8142. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  8143. var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "./node_modules/core-js/internals/create-iterator-constructor.js");
  8144. var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  8145. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
  8146. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  8147. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  8148. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  8149. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8150. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  8151. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8152. var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "./node_modules/core-js/internals/iterators-core.js");
  8153. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  8154. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  8155. var ITERATOR = wellKnownSymbol('iterator');
  8156. var KEYS = 'keys';
  8157. var VALUES = 'values';
  8158. var ENTRIES = 'entries';
  8159. var returnThis = function () { return this; };
  8160. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  8161. createIteratorConstructor(IteratorConstructor, NAME, next);
  8162. var getIterationMethod = function (KIND) {
  8163. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  8164. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  8165. switch (KIND) {
  8166. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  8167. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  8168. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  8169. } return function () { return new IteratorConstructor(this); };
  8170. };
  8171. var TO_STRING_TAG = NAME + ' Iterator';
  8172. var INCORRECT_VALUES_NAME = false;
  8173. var IterablePrototype = Iterable.prototype;
  8174. var nativeIterator = IterablePrototype[ITERATOR]
  8175. || IterablePrototype['@@iterator']
  8176. || DEFAULT && IterablePrototype[DEFAULT];
  8177. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  8178. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  8179. var CurrentIteratorPrototype, methods, KEY;
  8180. // fix native
  8181. if (anyNativeIterator) {
  8182. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  8183. if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  8184. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  8185. if (setPrototypeOf) {
  8186. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  8187. } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
  8188. createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
  8189. }
  8190. }
  8191. // Set @@toStringTag to native iterators
  8192. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  8193. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  8194. }
  8195. }
  8196. // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
  8197. if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  8198. INCORRECT_VALUES_NAME = true;
  8199. defaultIterator = function values() { return nativeIterator.call(this); };
  8200. }
  8201. // define iterator
  8202. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  8203. createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
  8204. }
  8205. Iterators[NAME] = defaultIterator;
  8206. // export additional methods
  8207. if (DEFAULT) {
  8208. methods = {
  8209. values: getIterationMethod(VALUES),
  8210. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  8211. entries: getIterationMethod(ENTRIES)
  8212. };
  8213. if (FORCED) for (KEY in methods) {
  8214. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  8215. redefine(IterablePrototype, KEY, methods[KEY]);
  8216. }
  8217. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  8218. }
  8219. return methods;
  8220. };
  8221. /***/ }),
  8222. /***/ "./node_modules/core-js/internals/define-well-known-symbol.js":
  8223. /*!********************************************************************!*\
  8224. !*** ./node_modules/core-js/internals/define-well-known-symbol.js ***!
  8225. \********************************************************************/
  8226. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8227. var path = __webpack_require__(/*! ../internals/path */ "./node_modules/core-js/internals/path.js");
  8228. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8229. var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
  8230. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  8231. module.exports = function (NAME) {
  8232. var Symbol = path.Symbol || (path.Symbol = {});
  8233. if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
  8234. value: wrappedWellKnownSymbolModule.f(NAME)
  8235. });
  8236. };
  8237. /***/ }),
  8238. /***/ "./node_modules/core-js/internals/dom-iterables.js":
  8239. /*!*********************************************************!*\
  8240. !*** ./node_modules/core-js/internals/dom-iterables.js ***!
  8241. \*********************************************************/
  8242. /***/ ((module) => {
  8243. // iterable DOM collections
  8244. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  8245. module.exports = {
  8246. CSSRuleList: 0,
  8247. CSSStyleDeclaration: 0,
  8248. CSSValueList: 0,
  8249. ClientRectList: 0,
  8250. DOMRectList: 0,
  8251. DOMStringList: 0,
  8252. DOMTokenList: 1,
  8253. DataTransferItemList: 0,
  8254. FileList: 0,
  8255. HTMLAllCollection: 0,
  8256. HTMLCollection: 0,
  8257. HTMLFormElement: 0,
  8258. HTMLSelectElement: 0,
  8259. MediaList: 0,
  8260. MimeTypeArray: 0,
  8261. NamedNodeMap: 0,
  8262. NodeList: 1,
  8263. PaintRequestList: 0,
  8264. Plugin: 0,
  8265. PluginArray: 0,
  8266. SVGLengthList: 0,
  8267. SVGNumberList: 0,
  8268. SVGPathSegList: 0,
  8269. SVGPointList: 0,
  8270. SVGStringList: 0,
  8271. SVGTransformList: 0,
  8272. SourceBufferList: 0,
  8273. StyleSheetList: 0,
  8274. TextTrackCueList: 0,
  8275. TextTrackList: 0,
  8276. TouchList: 0
  8277. };
  8278. /***/ }),
  8279. /***/ "./node_modules/core-js/internals/engine-is-browser.js":
  8280. /*!*************************************************************!*\
  8281. !*** ./node_modules/core-js/internals/engine-is-browser.js ***!
  8282. \*************************************************************/
  8283. /***/ ((module) => {
  8284. module.exports = typeof window == 'object';
  8285. /***/ }),
  8286. /***/ "./node_modules/core-js/internals/engine-is-ios.js":
  8287. /*!*********************************************************!*\
  8288. !*** ./node_modules/core-js/internals/engine-is-ios.js ***!
  8289. \*********************************************************/
  8290. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8291. var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
  8292. module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);
  8293. /***/ }),
  8294. /***/ "./node_modules/core-js/internals/engine-is-node.js":
  8295. /*!**********************************************************!*\
  8296. !*** ./node_modules/core-js/internals/engine-is-node.js ***!
  8297. \**********************************************************/
  8298. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8299. var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
  8300. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8301. module.exports = classof(global.process) == 'process';
  8302. /***/ }),
  8303. /***/ "./node_modules/core-js/internals/engine-is-webos-webkit.js":
  8304. /*!******************************************************************!*\
  8305. !*** ./node_modules/core-js/internals/engine-is-webos-webkit.js ***!
  8306. \******************************************************************/
  8307. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8308. var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
  8309. module.exports = /web0s(?!.*chrome)/i.test(userAgent);
  8310. /***/ }),
  8311. /***/ "./node_modules/core-js/internals/freezing.js":
  8312. /*!****************************************************!*\
  8313. !*** ./node_modules/core-js/internals/freezing.js ***!
  8314. \****************************************************/
  8315. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8316. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8317. module.exports = !fails(function () {
  8318. // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
  8319. return Object.isExtensible(Object.preventExtensions({}));
  8320. });
  8321. /***/ }),
  8322. /***/ "./node_modules/core-js/internals/function-bind-context.js":
  8323. /*!*****************************************************************!*\
  8324. !*** ./node_modules/core-js/internals/function-bind-context.js ***!
  8325. \*****************************************************************/
  8326. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8327. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  8328. // optional / simple context binding
  8329. module.exports = function (fn, that, length) {
  8330. aFunction(fn);
  8331. if (that === undefined) return fn;
  8332. switch (length) {
  8333. case 0: return function () {
  8334. return fn.call(that);
  8335. };
  8336. case 1: return function (a) {
  8337. return fn.call(that, a);
  8338. };
  8339. case 2: return function (a, b) {
  8340. return fn.call(that, a, b);
  8341. };
  8342. case 3: return function (a, b, c) {
  8343. return fn.call(that, a, b, c);
  8344. };
  8345. }
  8346. return function (/* ...args */) {
  8347. return fn.apply(that, arguments);
  8348. };
  8349. };
  8350. /***/ }),
  8351. /***/ "./node_modules/core-js/internals/function-bind.js":
  8352. /*!*********************************************************!*\
  8353. !*** ./node_modules/core-js/internals/function-bind.js ***!
  8354. \*********************************************************/
  8355. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8356. "use strict";
  8357. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  8358. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8359. var slice = [].slice;
  8360. var factories = {};
  8361. var construct = function (C, argsLength, args) {
  8362. if (!(argsLength in factories)) {
  8363. for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
  8364. // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
  8365. factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
  8366. } return factories[argsLength](C, args);
  8367. };
  8368. // `Function.prototype.bind` method implementation
  8369. // https://tc39.es/ecma262/#sec-function.prototype.bind
  8370. module.exports = Function.bind || function bind(that /* , ...args */) {
  8371. var fn = aFunction(this);
  8372. var partArgs = slice.call(arguments, 1);
  8373. var boundFunction = function bound(/* args... */) {
  8374. var args = partArgs.concat(slice.call(arguments));
  8375. return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
  8376. };
  8377. if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
  8378. return boundFunction;
  8379. };
  8380. /***/ }),
  8381. /***/ "./node_modules/core-js/internals/get-iterator-method.js":
  8382. /*!***************************************************************!*\
  8383. !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
  8384. \***************************************************************/
  8385. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8386. var classof = __webpack_require__(/*! ../internals/classof */ "./node_modules/core-js/internals/classof.js");
  8387. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8388. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8389. var ITERATOR = wellKnownSymbol('iterator');
  8390. module.exports = function (it) {
  8391. if (it != undefined) return it[ITERATOR]
  8392. || it['@@iterator']
  8393. || Iterators[classof(it)];
  8394. };
  8395. /***/ }),
  8396. /***/ "./node_modules/core-js/internals/host-report-errors.js":
  8397. /*!**************************************************************!*\
  8398. !*** ./node_modules/core-js/internals/host-report-errors.js ***!
  8399. \**************************************************************/
  8400. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8401. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8402. module.exports = function (a, b) {
  8403. var console = global.console;
  8404. if (console && console.error) {
  8405. arguments.length === 1 ? console.error(a) : console.error(a, b);
  8406. }
  8407. };
  8408. /***/ }),
  8409. /***/ "./node_modules/core-js/internals/html.js":
  8410. /*!************************************************!*\
  8411. !*** ./node_modules/core-js/internals/html.js ***!
  8412. \************************************************/
  8413. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8414. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  8415. module.exports = getBuiltIn('document', 'documentElement');
  8416. /***/ }),
  8417. /***/ "./node_modules/core-js/internals/inherit-if-required.js":
  8418. /*!***************************************************************!*\
  8419. !*** ./node_modules/core-js/internals/inherit-if-required.js ***!
  8420. \***************************************************************/
  8421. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8422. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8423. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
  8424. // makes subclassing work correct for wrapped built-ins
  8425. module.exports = function ($this, dummy, Wrapper) {
  8426. var NewTarget, NewTargetPrototype;
  8427. if (
  8428. // it can work only with native `setPrototypeOf`
  8429. setPrototypeOf &&
  8430. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  8431. typeof (NewTarget = dummy.constructor) == 'function' &&
  8432. NewTarget !== Wrapper &&
  8433. isObject(NewTargetPrototype = NewTarget.prototype) &&
  8434. NewTargetPrototype !== Wrapper.prototype
  8435. ) setPrototypeOf($this, NewTargetPrototype);
  8436. return $this;
  8437. };
  8438. /***/ }),
  8439. /***/ "./node_modules/core-js/internals/internal-metadata.js":
  8440. /*!*************************************************************!*\
  8441. !*** ./node_modules/core-js/internals/internal-metadata.js ***!
  8442. \*************************************************************/
  8443. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8444. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
  8445. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8446. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8447. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  8448. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
  8449. var FREEZING = __webpack_require__(/*! ../internals/freezing */ "./node_modules/core-js/internals/freezing.js");
  8450. var METADATA = uid('meta');
  8451. var id = 0;
  8452. // eslint-disable-next-line es/no-object-isextensible -- safe
  8453. var isExtensible = Object.isExtensible || function () {
  8454. return true;
  8455. };
  8456. var setMetadata = function (it) {
  8457. defineProperty(it, METADATA, { value: {
  8458. objectID: 'O' + ++id, // object ID
  8459. weakData: {} // weak collections IDs
  8460. } });
  8461. };
  8462. var fastKey = function (it, create) {
  8463. // return a primitive with prefix
  8464. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  8465. if (!has(it, METADATA)) {
  8466. // can't set metadata to uncaught frozen object
  8467. if (!isExtensible(it)) return 'F';
  8468. // not necessary to add metadata
  8469. if (!create) return 'E';
  8470. // add missing metadata
  8471. setMetadata(it);
  8472. // return object ID
  8473. } return it[METADATA].objectID;
  8474. };
  8475. var getWeakData = function (it, create) {
  8476. if (!has(it, METADATA)) {
  8477. // can't set metadata to uncaught frozen object
  8478. if (!isExtensible(it)) return true;
  8479. // not necessary to add metadata
  8480. if (!create) return false;
  8481. // add missing metadata
  8482. setMetadata(it);
  8483. // return the store of weak collections IDs
  8484. } return it[METADATA].weakData;
  8485. };
  8486. // add metadata on freeze-family methods calling
  8487. var onFreeze = function (it) {
  8488. if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
  8489. return it;
  8490. };
  8491. var meta = module.exports = {
  8492. REQUIRED: false,
  8493. fastKey: fastKey,
  8494. getWeakData: getWeakData,
  8495. onFreeze: onFreeze
  8496. };
  8497. hiddenKeys[METADATA] = true;
  8498. /***/ }),
  8499. /***/ "./node_modules/core-js/internals/is-array-iterator-method.js":
  8500. /*!********************************************************************!*\
  8501. !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
  8502. \********************************************************************/
  8503. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8504. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8505. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  8506. var ITERATOR = wellKnownSymbol('iterator');
  8507. var ArrayPrototype = Array.prototype;
  8508. // check on default Array iterator
  8509. module.exports = function (it) {
  8510. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  8511. };
  8512. /***/ }),
  8513. /***/ "./node_modules/core-js/internals/is-array.js":
  8514. /*!****************************************************!*\
  8515. !*** ./node_modules/core-js/internals/is-array.js ***!
  8516. \****************************************************/
  8517. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8518. var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
  8519. // `IsArray` abstract operation
  8520. // https://tc39.es/ecma262/#sec-isarray
  8521. // eslint-disable-next-line es/no-array-isarray -- safe
  8522. module.exports = Array.isArray || function isArray(arg) {
  8523. return classof(arg) == 'Array';
  8524. };
  8525. /***/ }),
  8526. /***/ "./node_modules/core-js/internals/iterate.js":
  8527. /*!***************************************************!*\
  8528. !*** ./node_modules/core-js/internals/iterate.js ***!
  8529. \***************************************************/
  8530. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8531. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8532. var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
  8533. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  8534. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  8535. var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
  8536. var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
  8537. var Result = function (stopped, result) {
  8538. this.stopped = stopped;
  8539. this.result = result;
  8540. };
  8541. module.exports = function (iterable, unboundFunction, options) {
  8542. var that = options && options.that;
  8543. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  8544. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  8545. var INTERRUPTED = !!(options && options.INTERRUPTED);
  8546. var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
  8547. var iterator, iterFn, index, length, result, next, step;
  8548. var stop = function (condition) {
  8549. if (iterator) iteratorClose(iterator);
  8550. return new Result(true, condition);
  8551. };
  8552. var callFn = function (value) {
  8553. if (AS_ENTRIES) {
  8554. anObject(value);
  8555. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  8556. } return INTERRUPTED ? fn(value, stop) : fn(value);
  8557. };
  8558. if (IS_ITERATOR) {
  8559. iterator = iterable;
  8560. } else {
  8561. iterFn = getIteratorMethod(iterable);
  8562. if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
  8563. // optimisation for array iterators
  8564. if (isArrayIteratorMethod(iterFn)) {
  8565. for (index = 0, length = toLength(iterable.length); length > index; index++) {
  8566. result = callFn(iterable[index]);
  8567. if (result && result instanceof Result) return result;
  8568. } return new Result(false);
  8569. }
  8570. iterator = iterFn.call(iterable);
  8571. }
  8572. next = iterator.next;
  8573. while (!(step = next.call(iterator)).done) {
  8574. try {
  8575. result = callFn(step.value);
  8576. } catch (error) {
  8577. iteratorClose(iterator);
  8578. throw error;
  8579. }
  8580. if (typeof result == 'object' && result && result instanceof Result) return result;
  8581. } return new Result(false);
  8582. };
  8583. /***/ }),
  8584. /***/ "./node_modules/core-js/internals/iterator-close.js":
  8585. /*!**********************************************************!*\
  8586. !*** ./node_modules/core-js/internals/iterator-close.js ***!
  8587. \**********************************************************/
  8588. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8589. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8590. module.exports = function (iterator) {
  8591. var returnMethod = iterator['return'];
  8592. if (returnMethod !== undefined) {
  8593. return anObject(returnMethod.call(iterator)).value;
  8594. }
  8595. };
  8596. /***/ }),
  8597. /***/ "./node_modules/core-js/internals/iterators-core.js":
  8598. /*!**********************************************************!*\
  8599. !*** ./node_modules/core-js/internals/iterators-core.js ***!
  8600. \**********************************************************/
  8601. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8602. "use strict";
  8603. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  8604. var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  8605. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  8606. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8607. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  8608. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  8609. var ITERATOR = wellKnownSymbol('iterator');
  8610. var BUGGY_SAFARI_ITERATORS = false;
  8611. var returnThis = function () { return this; };
  8612. // `%IteratorPrototype%` object
  8613. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  8614. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  8615. /* eslint-disable es/no-array-prototype-keys -- safe */
  8616. if ([].keys) {
  8617. arrayIterator = [].keys();
  8618. // Safari 8 has buggy iterators w/o `next`
  8619. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  8620. else {
  8621. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  8622. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  8623. }
  8624. }
  8625. var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  8626. var test = {};
  8627. // FF44- legacy iterators case
  8628. return IteratorPrototype[ITERATOR].call(test) !== test;
  8629. });
  8630. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  8631. // `%IteratorPrototype%[@@iterator]()` method
  8632. // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
  8633. if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {
  8634. createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
  8635. }
  8636. module.exports = {
  8637. IteratorPrototype: IteratorPrototype,
  8638. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  8639. };
  8640. /***/ }),
  8641. /***/ "./node_modules/core-js/internals/iterators.js":
  8642. /*!*****************************************************!*\
  8643. !*** ./node_modules/core-js/internals/iterators.js ***!
  8644. \*****************************************************/
  8645. /***/ ((module) => {
  8646. module.exports = {};
  8647. /***/ }),
  8648. /***/ "./node_modules/core-js/internals/microtask.js":
  8649. /*!*****************************************************!*\
  8650. !*** ./node_modules/core-js/internals/microtask.js ***!
  8651. \*****************************************************/
  8652. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8653. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8654. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  8655. var macrotask = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
  8656. var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
  8657. var IS_WEBOS_WEBKIT = __webpack_require__(/*! ../internals/engine-is-webos-webkit */ "./node_modules/core-js/internals/engine-is-webos-webkit.js");
  8658. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  8659. var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
  8660. var document = global.document;
  8661. var process = global.process;
  8662. var Promise = global.Promise;
  8663. // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
  8664. var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
  8665. var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
  8666. var flush, head, last, notify, toggle, node, promise, then;
  8667. // modern engines have queueMicrotask method
  8668. if (!queueMicrotask) {
  8669. flush = function () {
  8670. var parent, fn;
  8671. if (IS_NODE && (parent = process.domain)) parent.exit();
  8672. while (head) {
  8673. fn = head.fn;
  8674. head = head.next;
  8675. try {
  8676. fn();
  8677. } catch (error) {
  8678. if (head) notify();
  8679. else last = undefined;
  8680. throw error;
  8681. }
  8682. } last = undefined;
  8683. if (parent) parent.enter();
  8684. };
  8685. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  8686. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  8687. if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
  8688. toggle = true;
  8689. node = document.createTextNode('');
  8690. new MutationObserver(flush).observe(node, { characterData: true });
  8691. notify = function () {
  8692. node.data = toggle = !toggle;
  8693. };
  8694. // environments with maybe non-completely correct, but existent Promise
  8695. } else if (Promise && Promise.resolve) {
  8696. // Promise.resolve without an argument throws an error in LG WebOS 2
  8697. promise = Promise.resolve(undefined);
  8698. // workaround of WebKit ~ iOS Safari 10.1 bug
  8699. promise.constructor = Promise;
  8700. then = promise.then;
  8701. notify = function () {
  8702. then.call(promise, flush);
  8703. };
  8704. // Node.js without promises
  8705. } else if (IS_NODE) {
  8706. notify = function () {
  8707. process.nextTick(flush);
  8708. };
  8709. // for other environments - macrotask based on:
  8710. // - setImmediate
  8711. // - MessageChannel
  8712. // - window.postMessag
  8713. // - onreadystatechange
  8714. // - setTimeout
  8715. } else {
  8716. notify = function () {
  8717. // strange IE + webpack dev server bug - use .call(global)
  8718. macrotask.call(global, flush);
  8719. };
  8720. }
  8721. }
  8722. module.exports = queueMicrotask || function (fn) {
  8723. var task = { fn: fn, next: undefined };
  8724. if (last) last.next = task;
  8725. if (!head) {
  8726. head = task;
  8727. notify();
  8728. } last = task;
  8729. };
  8730. /***/ }),
  8731. /***/ "./node_modules/core-js/internals/native-promise-constructor.js":
  8732. /*!**********************************************************************!*\
  8733. !*** ./node_modules/core-js/internals/native-promise-constructor.js ***!
  8734. \**********************************************************************/
  8735. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8736. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  8737. module.exports = global.Promise;
  8738. /***/ }),
  8739. /***/ "./node_modules/core-js/internals/new-promise-capability.js":
  8740. /*!******************************************************************!*\
  8741. !*** ./node_modules/core-js/internals/new-promise-capability.js ***!
  8742. \******************************************************************/
  8743. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8744. "use strict";
  8745. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  8746. var PromiseCapability = function (C) {
  8747. var resolve, reject;
  8748. this.promise = new C(function ($$resolve, $$reject) {
  8749. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  8750. resolve = $$resolve;
  8751. reject = $$reject;
  8752. });
  8753. this.resolve = aFunction(resolve);
  8754. this.reject = aFunction(reject);
  8755. };
  8756. // `NewPromiseCapability` abstract operation
  8757. // https://tc39.es/ecma262/#sec-newpromisecapability
  8758. module.exports.f = function (C) {
  8759. return new PromiseCapability(C);
  8760. };
  8761. /***/ }),
  8762. /***/ "./node_modules/core-js/internals/not-a-regexp.js":
  8763. /*!********************************************************!*\
  8764. !*** ./node_modules/core-js/internals/not-a-regexp.js ***!
  8765. \********************************************************/
  8766. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8767. var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "./node_modules/core-js/internals/is-regexp.js");
  8768. module.exports = function (it) {
  8769. if (isRegExp(it)) {
  8770. throw TypeError("The method doesn't accept regular expressions");
  8771. } return it;
  8772. };
  8773. /***/ }),
  8774. /***/ "./node_modules/core-js/internals/object-create.js":
  8775. /*!*********************************************************!*\
  8776. !*** ./node_modules/core-js/internals/object-create.js ***!
  8777. \*********************************************************/
  8778. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8779. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8780. var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "./node_modules/core-js/internals/object-define-properties.js");
  8781. var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
  8782. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
  8783. var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
  8784. var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
  8785. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
  8786. var GT = '>';
  8787. var LT = '<';
  8788. var PROTOTYPE = 'prototype';
  8789. var SCRIPT = 'script';
  8790. var IE_PROTO = sharedKey('IE_PROTO');
  8791. var EmptyConstructor = function () { /* empty */ };
  8792. var scriptTag = function (content) {
  8793. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  8794. };
  8795. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  8796. var NullProtoObjectViaActiveX = function (activeXDocument) {
  8797. activeXDocument.write(scriptTag(''));
  8798. activeXDocument.close();
  8799. var temp = activeXDocument.parentWindow.Object;
  8800. activeXDocument = null; // avoid memory leak
  8801. return temp;
  8802. };
  8803. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  8804. var NullProtoObjectViaIFrame = function () {
  8805. // Thrash, waste and sodomy: IE GC bug
  8806. var iframe = documentCreateElement('iframe');
  8807. var JS = 'java' + SCRIPT + ':';
  8808. var iframeDocument;
  8809. iframe.style.display = 'none';
  8810. html.appendChild(iframe);
  8811. // https://github.com/zloirock/core-js/issues/475
  8812. iframe.src = String(JS);
  8813. iframeDocument = iframe.contentWindow.document;
  8814. iframeDocument.open();
  8815. iframeDocument.write(scriptTag('document.F=Object'));
  8816. iframeDocument.close();
  8817. return iframeDocument.F;
  8818. };
  8819. // Check for document.domain and active x support
  8820. // No need to use active x approach when document.domain is not set
  8821. // see https://github.com/es-shims/es5-shim/issues/150
  8822. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  8823. // avoid IE GC bug
  8824. var activeXDocument;
  8825. var NullProtoObject = function () {
  8826. try {
  8827. /* global ActiveXObject -- old IE */
  8828. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  8829. } catch (error) { /* ignore */ }
  8830. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  8831. var length = enumBugKeys.length;
  8832. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  8833. return NullProtoObject();
  8834. };
  8835. hiddenKeys[IE_PROTO] = true;
  8836. // `Object.create` method
  8837. // https://tc39.es/ecma262/#sec-object.create
  8838. module.exports = Object.create || function create(O, Properties) {
  8839. var result;
  8840. if (O !== null) {
  8841. EmptyConstructor[PROTOTYPE] = anObject(O);
  8842. result = new EmptyConstructor();
  8843. EmptyConstructor[PROTOTYPE] = null;
  8844. // add "__proto__" for Object.getPrototypeOf polyfill
  8845. result[IE_PROTO] = O;
  8846. } else result = NullProtoObject();
  8847. return Properties === undefined ? result : defineProperties(result, Properties);
  8848. };
  8849. /***/ }),
  8850. /***/ "./node_modules/core-js/internals/object-define-properties.js":
  8851. /*!********************************************************************!*\
  8852. !*** ./node_modules/core-js/internals/object-define-properties.js ***!
  8853. \********************************************************************/
  8854. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8855. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  8856. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  8857. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8858. var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
  8859. // `Object.defineProperties` method
  8860. // https://tc39.es/ecma262/#sec-object.defineproperties
  8861. // eslint-disable-next-line es/no-object-defineproperties -- safe
  8862. module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  8863. anObject(O);
  8864. var keys = objectKeys(Properties);
  8865. var length = keys.length;
  8866. var index = 0;
  8867. var key;
  8868. while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
  8869. return O;
  8870. };
  8871. /***/ }),
  8872. /***/ "./node_modules/core-js/internals/object-get-own-property-names-external.js":
  8873. /*!**********************************************************************************!*\
  8874. !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***!
  8875. \**********************************************************************************/
  8876. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8877. /* eslint-disable es/no-object-getownpropertynames -- safe */
  8878. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  8879. var $getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
  8880. var toString = {}.toString;
  8881. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  8882. ? Object.getOwnPropertyNames(window) : [];
  8883. var getWindowNames = function (it) {
  8884. try {
  8885. return $getOwnPropertyNames(it);
  8886. } catch (error) {
  8887. return windowNames.slice();
  8888. }
  8889. };
  8890. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  8891. module.exports.f = function getOwnPropertyNames(it) {
  8892. return windowNames && toString.call(it) == '[object Window]'
  8893. ? getWindowNames(it)
  8894. : $getOwnPropertyNames(toIndexedObject(it));
  8895. };
  8896. /***/ }),
  8897. /***/ "./node_modules/core-js/internals/object-get-prototype-of.js":
  8898. /*!*******************************************************************!*\
  8899. !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
  8900. \*******************************************************************/
  8901. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8902. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  8903. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  8904. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
  8905. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
  8906. var IE_PROTO = sharedKey('IE_PROTO');
  8907. var ObjectPrototype = Object.prototype;
  8908. // `Object.getPrototypeOf` method
  8909. // https://tc39.es/ecma262/#sec-object.getprototypeof
  8910. // eslint-disable-next-line es/no-object-getprototypeof -- safe
  8911. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  8912. O = toObject(O);
  8913. if (has(O, IE_PROTO)) return O[IE_PROTO];
  8914. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  8915. return O.constructor.prototype;
  8916. } return O instanceof Object ? ObjectPrototype : null;
  8917. };
  8918. /***/ }),
  8919. /***/ "./node_modules/core-js/internals/object-keys.js":
  8920. /*!*******************************************************!*\
  8921. !*** ./node_modules/core-js/internals/object-keys.js ***!
  8922. \*******************************************************/
  8923. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8924. var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "./node_modules/core-js/internals/object-keys-internal.js");
  8925. var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "./node_modules/core-js/internals/enum-bug-keys.js");
  8926. // `Object.keys` method
  8927. // https://tc39.es/ecma262/#sec-object.keys
  8928. // eslint-disable-next-line es/no-object-keys -- safe
  8929. module.exports = Object.keys || function keys(O) {
  8930. return internalObjectKeys(O, enumBugKeys);
  8931. };
  8932. /***/ }),
  8933. /***/ "./node_modules/core-js/internals/object-set-prototype-of.js":
  8934. /*!*******************************************************************!*\
  8935. !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
  8936. \*******************************************************************/
  8937. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8938. /* eslint-disable no-proto -- safe */
  8939. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8940. var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "./node_modules/core-js/internals/a-possible-prototype.js");
  8941. // `Object.setPrototypeOf` method
  8942. // https://tc39.es/ecma262/#sec-object.setprototypeof
  8943. // Works with __proto__ only. Old v8 can't work with null proto objects.
  8944. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  8945. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  8946. var CORRECT_SETTER = false;
  8947. var test = {};
  8948. var setter;
  8949. try {
  8950. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  8951. setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
  8952. setter.call(test, []);
  8953. CORRECT_SETTER = test instanceof Array;
  8954. } catch (error) { /* empty */ }
  8955. return function setPrototypeOf(O, proto) {
  8956. anObject(O);
  8957. aPossiblePrototype(proto);
  8958. if (CORRECT_SETTER) setter.call(O, proto);
  8959. else O.__proto__ = proto;
  8960. return O;
  8961. };
  8962. }() : undefined);
  8963. /***/ }),
  8964. /***/ "./node_modules/core-js/internals/perform.js":
  8965. /*!***************************************************!*\
  8966. !*** ./node_modules/core-js/internals/perform.js ***!
  8967. \***************************************************/
  8968. /***/ ((module) => {
  8969. module.exports = function (exec) {
  8970. try {
  8971. return { error: false, value: exec() };
  8972. } catch (error) {
  8973. return { error: true, value: error };
  8974. }
  8975. };
  8976. /***/ }),
  8977. /***/ "./node_modules/core-js/internals/promise-resolve.js":
  8978. /*!***********************************************************!*\
  8979. !*** ./node_modules/core-js/internals/promise-resolve.js ***!
  8980. \***********************************************************/
  8981. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8982. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  8983. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  8984. var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
  8985. module.exports = function (C, x) {
  8986. anObject(C);
  8987. if (isObject(x) && x.constructor === C) return x;
  8988. var promiseCapability = newPromiseCapability.f(C);
  8989. var resolve = promiseCapability.resolve;
  8990. resolve(x);
  8991. return promiseCapability.promise;
  8992. };
  8993. /***/ }),
  8994. /***/ "./node_modules/core-js/internals/redefine-all.js":
  8995. /*!********************************************************!*\
  8996. !*** ./node_modules/core-js/internals/redefine-all.js ***!
  8997. \********************************************************/
  8998. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8999. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9000. module.exports = function (target, src, options) {
  9001. for (var key in src) redefine(target, key, src[key], options);
  9002. return target;
  9003. };
  9004. /***/ }),
  9005. /***/ "./node_modules/core-js/internals/set-species.js":
  9006. /*!*******************************************************!*\
  9007. !*** ./node_modules/core-js/internals/set-species.js ***!
  9008. \*******************************************************/
  9009. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9010. "use strict";
  9011. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  9012. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  9013. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9014. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9015. var SPECIES = wellKnownSymbol('species');
  9016. module.exports = function (CONSTRUCTOR_NAME) {
  9017. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  9018. var defineProperty = definePropertyModule.f;
  9019. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  9020. defineProperty(Constructor, SPECIES, {
  9021. configurable: true,
  9022. get: function () { return this; }
  9023. });
  9024. }
  9025. };
  9026. /***/ }),
  9027. /***/ "./node_modules/core-js/internals/set-to-string-tag.js":
  9028. /*!*************************************************************!*\
  9029. !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
  9030. \*************************************************************/
  9031. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9032. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  9033. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  9034. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9035. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  9036. module.exports = function (it, TAG, STATIC) {
  9037. if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  9038. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  9039. }
  9040. };
  9041. /***/ }),
  9042. /***/ "./node_modules/core-js/internals/string-trim-forced.js":
  9043. /*!**************************************************************!*\
  9044. !*** ./node_modules/core-js/internals/string-trim-forced.js ***!
  9045. \**************************************************************/
  9046. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9047. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9048. var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");
  9049. var non = '\u200B\u0085\u180E';
  9050. // check that a method works with the correct list
  9051. // of whitespaces and has a correct name
  9052. module.exports = function (METHOD_NAME) {
  9053. return fails(function () {
  9054. return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  9055. });
  9056. };
  9057. /***/ }),
  9058. /***/ "./node_modules/core-js/internals/string-trim.js":
  9059. /*!*******************************************************!*\
  9060. !*** ./node_modules/core-js/internals/string-trim.js ***!
  9061. \*******************************************************/
  9062. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9063. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  9064. var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "./node_modules/core-js/internals/whitespaces.js");
  9065. var whitespace = '[' + whitespaces + ']';
  9066. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  9067. var rtrim = RegExp(whitespace + whitespace + '*$');
  9068. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  9069. var createMethod = function (TYPE) {
  9070. return function ($this) {
  9071. var string = String(requireObjectCoercible($this));
  9072. if (TYPE & 1) string = string.replace(ltrim, '');
  9073. if (TYPE & 2) string = string.replace(rtrim, '');
  9074. return string;
  9075. };
  9076. };
  9077. module.exports = {
  9078. // `String.prototype.{ trimLeft, trimStart }` methods
  9079. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  9080. start: createMethod(1),
  9081. // `String.prototype.{ trimRight, trimEnd }` methods
  9082. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  9083. end: createMethod(2),
  9084. // `String.prototype.trim` method
  9085. // https://tc39.es/ecma262/#sec-string.prototype.trim
  9086. trim: createMethod(3)
  9087. };
  9088. /***/ }),
  9089. /***/ "./node_modules/core-js/internals/task.js":
  9090. /*!************************************************!*\
  9091. !*** ./node_modules/core-js/internals/task.js ***!
  9092. \************************************************/
  9093. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9094. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9095. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9096. var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
  9097. var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
  9098. var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
  9099. var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
  9100. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  9101. var location = global.location;
  9102. var set = global.setImmediate;
  9103. var clear = global.clearImmediate;
  9104. var process = global.process;
  9105. var MessageChannel = global.MessageChannel;
  9106. var Dispatch = global.Dispatch;
  9107. var counter = 0;
  9108. var queue = {};
  9109. var ONREADYSTATECHANGE = 'onreadystatechange';
  9110. var defer, channel, port;
  9111. var run = function (id) {
  9112. // eslint-disable-next-line no-prototype-builtins -- safe
  9113. if (queue.hasOwnProperty(id)) {
  9114. var fn = queue[id];
  9115. delete queue[id];
  9116. fn();
  9117. }
  9118. };
  9119. var runner = function (id) {
  9120. return function () {
  9121. run(id);
  9122. };
  9123. };
  9124. var listener = function (event) {
  9125. run(event.data);
  9126. };
  9127. var post = function (id) {
  9128. // old engines have not location.origin
  9129. global.postMessage(id + '', location.protocol + '//' + location.host);
  9130. };
  9131. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  9132. if (!set || !clear) {
  9133. set = function setImmediate(fn) {
  9134. var args = [];
  9135. var i = 1;
  9136. while (arguments.length > i) args.push(arguments[i++]);
  9137. queue[++counter] = function () {
  9138. // eslint-disable-next-line no-new-func -- spec requirement
  9139. (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
  9140. };
  9141. defer(counter);
  9142. return counter;
  9143. };
  9144. clear = function clearImmediate(id) {
  9145. delete queue[id];
  9146. };
  9147. // Node.js 0.8-
  9148. if (IS_NODE) {
  9149. defer = function (id) {
  9150. process.nextTick(runner(id));
  9151. };
  9152. // Sphere (JS game engine) Dispatch API
  9153. } else if (Dispatch && Dispatch.now) {
  9154. defer = function (id) {
  9155. Dispatch.now(runner(id));
  9156. };
  9157. // Browsers with MessageChannel, includes WebWorkers
  9158. // except iOS - https://github.com/zloirock/core-js/issues/624
  9159. } else if (MessageChannel && !IS_IOS) {
  9160. channel = new MessageChannel();
  9161. port = channel.port2;
  9162. channel.port1.onmessage = listener;
  9163. defer = bind(port.postMessage, port, 1);
  9164. // Browsers with postMessage, skip WebWorkers
  9165. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  9166. } else if (
  9167. global.addEventListener &&
  9168. typeof postMessage == 'function' &&
  9169. !global.importScripts &&
  9170. location && location.protocol !== 'file:' &&
  9171. !fails(post)
  9172. ) {
  9173. defer = post;
  9174. global.addEventListener('message', listener, false);
  9175. // IE8-
  9176. } else if (ONREADYSTATECHANGE in createElement('script')) {
  9177. defer = function (id) {
  9178. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  9179. html.removeChild(this);
  9180. run(id);
  9181. };
  9182. };
  9183. // Rest old browsers
  9184. } else {
  9185. defer = function (id) {
  9186. setTimeout(runner(id), 0);
  9187. };
  9188. }
  9189. }
  9190. module.exports = {
  9191. set: set,
  9192. clear: clear
  9193. };
  9194. /***/ }),
  9195. /***/ "./node_modules/core-js/internals/well-known-symbol-wrapped.js":
  9196. /*!*********************************************************************!*\
  9197. !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
  9198. \*********************************************************************/
  9199. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  9200. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9201. exports.f = wellKnownSymbol;
  9202. /***/ }),
  9203. /***/ "./node_modules/core-js/internals/whitespaces.js":
  9204. /*!*******************************************************!*\
  9205. !*** ./node_modules/core-js/internals/whitespaces.js ***!
  9206. \*******************************************************/
  9207. /***/ ((module) => {
  9208. // a string of all valid unicode whitespaces
  9209. module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  9210. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  9211. /***/ }),
  9212. /***/ "./node_modules/core-js/modules/es.array.concat.js":
  9213. /*!*********************************************************!*\
  9214. !*** ./node_modules/core-js/modules/es.array.concat.js ***!
  9215. \*********************************************************/
  9216. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9217. "use strict";
  9218. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9219. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9220. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9221. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9222. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  9223. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  9224. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  9225. var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "./node_modules/core-js/internals/array-species-create.js");
  9226. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  9227. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9228. var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  9229. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  9230. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  9231. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  9232. // We can't use this feature detection in V8 since it causes
  9233. // deoptimization and serious performance degradation
  9234. // https://github.com/zloirock/core-js/issues/679
  9235. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  9236. var array = [];
  9237. array[IS_CONCAT_SPREADABLE] = false;
  9238. return array.concat()[0] !== array;
  9239. });
  9240. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  9241. var isConcatSpreadable = function (O) {
  9242. if (!isObject(O)) return false;
  9243. var spreadable = O[IS_CONCAT_SPREADABLE];
  9244. return spreadable !== undefined ? !!spreadable : isArray(O);
  9245. };
  9246. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  9247. // `Array.prototype.concat` method
  9248. // https://tc39.es/ecma262/#sec-array.prototype.concat
  9249. // with adding support of @@isConcatSpreadable and @@species
  9250. $({ target: 'Array', proto: true, forced: FORCED }, {
  9251. // eslint-disable-next-line no-unused-vars -- required for `.length`
  9252. concat: function concat(arg) {
  9253. var O = toObject(this);
  9254. var A = arraySpeciesCreate(O, 0);
  9255. var n = 0;
  9256. var i, k, length, len, E;
  9257. for (i = -1, length = arguments.length; i < length; i++) {
  9258. E = i === -1 ? O : arguments[i];
  9259. if (isConcatSpreadable(E)) {
  9260. len = toLength(E.length);
  9261. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  9262. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  9263. } else {
  9264. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  9265. createProperty(A, n++, E);
  9266. }
  9267. }
  9268. A.length = n;
  9269. return A;
  9270. }
  9271. });
  9272. /***/ }),
  9273. /***/ "./node_modules/core-js/modules/es.array.every.js":
  9274. /*!********************************************************!*\
  9275. !*** ./node_modules/core-js/modules/es.array.every.js ***!
  9276. \********************************************************/
  9277. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9278. "use strict";
  9279. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9280. var $every = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").every;
  9281. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  9282. var STRICT_METHOD = arrayMethodIsStrict('every');
  9283. // `Array.prototype.every` method
  9284. // https://tc39.es/ecma262/#sec-array.prototype.every
  9285. $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
  9286. every: function every(callbackfn /* , thisArg */) {
  9287. return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  9288. }
  9289. });
  9290. /***/ }),
  9291. /***/ "./node_modules/core-js/modules/es.array.fill.js":
  9292. /*!*******************************************************!*\
  9293. !*** ./node_modules/core-js/modules/es.array.fill.js ***!
  9294. \*******************************************************/
  9295. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9296. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9297. var fill = __webpack_require__(/*! ../internals/array-fill */ "./node_modules/core-js/internals/array-fill.js");
  9298. var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
  9299. // `Array.prototype.fill` method
  9300. // https://tc39.es/ecma262/#sec-array.prototype.fill
  9301. $({ target: 'Array', proto: true }, {
  9302. fill: fill
  9303. });
  9304. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  9305. addToUnscopables('fill');
  9306. /***/ }),
  9307. /***/ "./node_modules/core-js/modules/es.array.for-each.js":
  9308. /*!***********************************************************!*\
  9309. !*** ./node_modules/core-js/modules/es.array.for-each.js ***!
  9310. \***********************************************************/
  9311. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9312. "use strict";
  9313. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9314. var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js");
  9315. // `Array.prototype.forEach` method
  9316. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  9317. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  9318. $({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
  9319. forEach: forEach
  9320. });
  9321. /***/ }),
  9322. /***/ "./node_modules/core-js/modules/es.array.from.js":
  9323. /*!*******************************************************!*\
  9324. !*** ./node_modules/core-js/modules/es.array.from.js ***!
  9325. \*******************************************************/
  9326. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9327. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9328. var from = __webpack_require__(/*! ../internals/array-from */ "./node_modules/core-js/internals/array-from.js");
  9329. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  9330. var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  9331. // eslint-disable-next-line es/no-array-from -- required for testing
  9332. Array.from(iterable);
  9333. });
  9334. // `Array.from` method
  9335. // https://tc39.es/ecma262/#sec-array.from
  9336. $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  9337. from: from
  9338. });
  9339. /***/ }),
  9340. /***/ "./node_modules/core-js/modules/es.array.includes.js":
  9341. /*!***********************************************************!*\
  9342. !*** ./node_modules/core-js/modules/es.array.includes.js ***!
  9343. \***********************************************************/
  9344. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9345. "use strict";
  9346. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9347. var $includes = __webpack_require__(/*! ../internals/array-includes */ "./node_modules/core-js/internals/array-includes.js").includes;
  9348. var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
  9349. // `Array.prototype.includes` method
  9350. // https://tc39.es/ecma262/#sec-array.prototype.includes
  9351. $({ target: 'Array', proto: true }, {
  9352. includes: function includes(el /* , fromIndex = 0 */) {
  9353. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  9354. }
  9355. });
  9356. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  9357. addToUnscopables('includes');
  9358. /***/ }),
  9359. /***/ "./node_modules/core-js/modules/es.array.iterator.js":
  9360. /*!***********************************************************!*\
  9361. !*** ./node_modules/core-js/modules/es.array.iterator.js ***!
  9362. \***********************************************************/
  9363. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9364. "use strict";
  9365. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9366. var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "./node_modules/core-js/internals/add-to-unscopables.js");
  9367. var Iterators = __webpack_require__(/*! ../internals/iterators */ "./node_modules/core-js/internals/iterators.js");
  9368. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  9369. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  9370. var ARRAY_ITERATOR = 'Array Iterator';
  9371. var setInternalState = InternalStateModule.set;
  9372. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  9373. // `Array.prototype.entries` method
  9374. // https://tc39.es/ecma262/#sec-array.prototype.entries
  9375. // `Array.prototype.keys` method
  9376. // https://tc39.es/ecma262/#sec-array.prototype.keys
  9377. // `Array.prototype.values` method
  9378. // https://tc39.es/ecma262/#sec-array.prototype.values
  9379. // `Array.prototype[@@iterator]` method
  9380. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  9381. // `CreateArrayIterator` internal method
  9382. // https://tc39.es/ecma262/#sec-createarrayiterator
  9383. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  9384. setInternalState(this, {
  9385. type: ARRAY_ITERATOR,
  9386. target: toIndexedObject(iterated), // target
  9387. index: 0, // next index
  9388. kind: kind // kind
  9389. });
  9390. // `%ArrayIteratorPrototype%.next` method
  9391. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  9392. }, function () {
  9393. var state = getInternalState(this);
  9394. var target = state.target;
  9395. var kind = state.kind;
  9396. var index = state.index++;
  9397. if (!target || index >= target.length) {
  9398. state.target = undefined;
  9399. return { value: undefined, done: true };
  9400. }
  9401. if (kind == 'keys') return { value: index, done: false };
  9402. if (kind == 'values') return { value: target[index], done: false };
  9403. return { value: [index, target[index]], done: false };
  9404. }, 'values');
  9405. // argumentsList[@@iterator] is %ArrayProto_values%
  9406. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  9407. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  9408. Iterators.Arguments = Iterators.Array;
  9409. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  9410. addToUnscopables('keys');
  9411. addToUnscopables('values');
  9412. addToUnscopables('entries');
  9413. /***/ }),
  9414. /***/ "./node_modules/core-js/modules/es.array.map.js":
  9415. /*!******************************************************!*\
  9416. !*** ./node_modules/core-js/modules/es.array.map.js ***!
  9417. \******************************************************/
  9418. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9419. "use strict";
  9420. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9421. var $map = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").map;
  9422. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  9423. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  9424. // `Array.prototype.map` method
  9425. // https://tc39.es/ecma262/#sec-array.prototype.map
  9426. // with adding support of @@species
  9427. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  9428. map: function map(callbackfn /* , thisArg */) {
  9429. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  9430. }
  9431. });
  9432. /***/ }),
  9433. /***/ "./node_modules/core-js/modules/es.array.reduce.js":
  9434. /*!*********************************************************!*\
  9435. !*** ./node_modules/core-js/modules/es.array.reduce.js ***!
  9436. \*********************************************************/
  9437. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9438. "use strict";
  9439. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9440. var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "./node_modules/core-js/internals/array-reduce.js").left;
  9441. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  9442. var CHROME_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  9443. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  9444. var STRICT_METHOD = arrayMethodIsStrict('reduce');
  9445. // Chrome 80-82 has a critical bug
  9446. // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
  9447. var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
  9448. // `Array.prototype.reduce` method
  9449. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  9450. $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
  9451. reduce: function reduce(callbackfn /* , initialValue */) {
  9452. return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
  9453. }
  9454. });
  9455. /***/ }),
  9456. /***/ "./node_modules/core-js/modules/es.array.reverse.js":
  9457. /*!**********************************************************!*\
  9458. !*** ./node_modules/core-js/modules/es.array.reverse.js ***!
  9459. \**********************************************************/
  9460. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9461. "use strict";
  9462. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9463. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9464. var nativeReverse = [].reverse;
  9465. var test = [1, 2];
  9466. // `Array.prototype.reverse` method
  9467. // https://tc39.es/ecma262/#sec-array.prototype.reverse
  9468. // fix for Safari 12.0 bug
  9469. // https://bugs.webkit.org/show_bug.cgi?id=188794
  9470. $({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
  9471. reverse: function reverse() {
  9472. // eslint-disable-next-line no-self-assign -- dirty hack
  9473. if (isArray(this)) this.length = this.length;
  9474. return nativeReverse.call(this);
  9475. }
  9476. });
  9477. /***/ }),
  9478. /***/ "./node_modules/core-js/modules/es.array.slice.js":
  9479. /*!********************************************************!*\
  9480. !*** ./node_modules/core-js/modules/es.array.slice.js ***!
  9481. \********************************************************/
  9482. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9483. "use strict";
  9484. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9485. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9486. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  9487. var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "./node_modules/core-js/internals/to-absolute-index.js");
  9488. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  9489. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9490. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  9491. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9492. var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "./node_modules/core-js/internals/array-method-has-species-support.js");
  9493. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  9494. var SPECIES = wellKnownSymbol('species');
  9495. var nativeSlice = [].slice;
  9496. var max = Math.max;
  9497. // `Array.prototype.slice` method
  9498. // https://tc39.es/ecma262/#sec-array.prototype.slice
  9499. // fallback for not array-like ES3 strings and DOM objects
  9500. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  9501. slice: function slice(start, end) {
  9502. var O = toIndexedObject(this);
  9503. var length = toLength(O.length);
  9504. var k = toAbsoluteIndex(start, length);
  9505. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  9506. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  9507. var Constructor, result, n;
  9508. if (isArray(O)) {
  9509. Constructor = O.constructor;
  9510. // cross-realm fallback
  9511. if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
  9512. Constructor = undefined;
  9513. } else if (isObject(Constructor)) {
  9514. Constructor = Constructor[SPECIES];
  9515. if (Constructor === null) Constructor = undefined;
  9516. }
  9517. if (Constructor === Array || Constructor === undefined) {
  9518. return nativeSlice.call(O, k, fin);
  9519. }
  9520. }
  9521. result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
  9522. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  9523. result.length = n;
  9524. return result;
  9525. }
  9526. });
  9527. /***/ }),
  9528. /***/ "./node_modules/core-js/modules/es.array.some.js":
  9529. /*!*******************************************************!*\
  9530. !*** ./node_modules/core-js/modules/es.array.some.js ***!
  9531. \*******************************************************/
  9532. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9533. "use strict";
  9534. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9535. var $some = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").some;
  9536. var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "./node_modules/core-js/internals/array-method-is-strict.js");
  9537. var STRICT_METHOD = arrayMethodIsStrict('some');
  9538. // `Array.prototype.some` method
  9539. // https://tc39.es/ecma262/#sec-array.prototype.some
  9540. $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
  9541. some: function some(callbackfn /* , thisArg */) {
  9542. return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  9543. }
  9544. });
  9545. /***/ }),
  9546. /***/ "./node_modules/core-js/modules/es.map.js":
  9547. /*!************************************************!*\
  9548. !*** ./node_modules/core-js/modules/es.map.js ***!
  9549. \************************************************/
  9550. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9551. "use strict";
  9552. var collection = __webpack_require__(/*! ../internals/collection */ "./node_modules/core-js/internals/collection.js");
  9553. var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "./node_modules/core-js/internals/collection-strong.js");
  9554. // `Map` constructor
  9555. // https://tc39.es/ecma262/#sec-map-objects
  9556. module.exports = collection('Map', function (init) {
  9557. return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
  9558. }, collectionStrong);
  9559. /***/ }),
  9560. /***/ "./node_modules/core-js/modules/es.number.constructor.js":
  9561. /*!***************************************************************!*\
  9562. !*** ./node_modules/core-js/modules/es.number.constructor.js ***!
  9563. \***************************************************************/
  9564. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9565. "use strict";
  9566. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9567. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9568. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
  9569. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9570. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  9571. var classof = __webpack_require__(/*! ../internals/classof-raw */ "./node_modules/core-js/internals/classof-raw.js");
  9572. var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "./node_modules/core-js/internals/inherit-if-required.js");
  9573. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
  9574. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9575. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  9576. var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js").f;
  9577. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  9578. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  9579. var trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
  9580. var NUMBER = 'Number';
  9581. var NativeNumber = global[NUMBER];
  9582. var NumberPrototype = NativeNumber.prototype;
  9583. // Opera ~12 has broken Object#toString
  9584. var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;
  9585. // `ToNumber` abstract operation
  9586. // https://tc39.es/ecma262/#sec-tonumber
  9587. var toNumber = function (argument) {
  9588. var it = toPrimitive(argument, false);
  9589. var first, third, radix, maxCode, digits, length, index, code;
  9590. if (typeof it == 'string' && it.length > 2) {
  9591. it = trim(it);
  9592. first = it.charCodeAt(0);
  9593. if (first === 43 || first === 45) {
  9594. third = it.charCodeAt(2);
  9595. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  9596. } else if (first === 48) {
  9597. switch (it.charCodeAt(1)) {
  9598. case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
  9599. case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
  9600. default: return +it;
  9601. }
  9602. digits = it.slice(2);
  9603. length = digits.length;
  9604. for (index = 0; index < length; index++) {
  9605. code = digits.charCodeAt(index);
  9606. // parseInt parses a string to a first unavailable symbol
  9607. // but ToNumber should return NaN if a string contains unavailable symbols
  9608. if (code < 48 || code > maxCode) return NaN;
  9609. } return parseInt(digits, radix);
  9610. }
  9611. } return +it;
  9612. };
  9613. // `Number` constructor
  9614. // https://tc39.es/ecma262/#sec-number-constructor
  9615. if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
  9616. var NumberWrapper = function Number(value) {
  9617. var it = arguments.length < 1 ? 0 : value;
  9618. var dummy = this;
  9619. return dummy instanceof NumberWrapper
  9620. // check on 1..constructor(foo) case
  9621. && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
  9622. ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
  9623. };
  9624. for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
  9625. // ES3:
  9626. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  9627. // ES2015 (in case, if modules with ES2015 Number statics required before):
  9628. 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
  9629. 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
  9630. // ESNext
  9631. 'fromString,range'
  9632. ).split(','), j = 0, key; keys.length > j; j++) {
  9633. if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
  9634. defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
  9635. }
  9636. }
  9637. NumberWrapper.prototype = NumberPrototype;
  9638. NumberPrototype.constructor = NumberWrapper;
  9639. redefine(global, NUMBER, NumberWrapper);
  9640. }
  9641. /***/ }),
  9642. /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js":
  9643. /*!*******************************************************************************!*\
  9644. !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***!
  9645. \*******************************************************************************/
  9646. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9647. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9648. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9649. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9650. var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  9651. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9652. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
  9653. var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
  9654. // `Object.getOwnPropertyDescriptor` method
  9655. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  9656. $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  9657. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
  9658. return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  9659. }
  9660. });
  9661. /***/ }),
  9662. /***/ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js":
  9663. /*!********************************************************************************!*\
  9664. !*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***!
  9665. \********************************************************************************/
  9666. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9667. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9668. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  9669. var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "./node_modules/core-js/internals/own-keys.js");
  9670. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  9671. var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
  9672. var createProperty = __webpack_require__(/*! ../internals/create-property */ "./node_modules/core-js/internals/create-property.js");
  9673. // `Object.getOwnPropertyDescriptors` method
  9674. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  9675. $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  9676. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  9677. var O = toIndexedObject(object);
  9678. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  9679. var keys = ownKeys(O);
  9680. var result = {};
  9681. var index = 0;
  9682. var key, descriptor;
  9683. while (keys.length > index) {
  9684. descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
  9685. if (descriptor !== undefined) createProperty(result, key, descriptor);
  9686. }
  9687. return result;
  9688. }
  9689. });
  9690. /***/ }),
  9691. /***/ "./node_modules/core-js/modules/es.object.keys.js":
  9692. /*!********************************************************!*\
  9693. !*** ./node_modules/core-js/modules/es.object.keys.js ***!
  9694. \********************************************************/
  9695. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9696. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9697. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  9698. var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
  9699. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  9700. var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
  9701. // `Object.keys` method
  9702. // https://tc39.es/ecma262/#sec-object.keys
  9703. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  9704. keys: function keys(it) {
  9705. return nativeKeys(toObject(it));
  9706. }
  9707. });
  9708. /***/ }),
  9709. /***/ "./node_modules/core-js/modules/es.promise.js":
  9710. /*!****************************************************!*\
  9711. !*** ./node_modules/core-js/modules/es.promise.js ***!
  9712. \****************************************************/
  9713. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  9714. "use strict";
  9715. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  9716. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  9717. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  9718. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  9719. var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "./node_modules/core-js/internals/native-promise-constructor.js");
  9720. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  9721. var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
  9722. var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
  9723. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  9724. var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
  9725. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  9726. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  9727. var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
  9728. var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
  9729. var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
  9730. var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
  9731. var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "./node_modules/core-js/internals/species-constructor.js");
  9732. var task = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
  9733. var microtask = __webpack_require__(/*! ../internals/microtask */ "./node_modules/core-js/internals/microtask.js");
  9734. var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "./node_modules/core-js/internals/promise-resolve.js");
  9735. var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "./node_modules/core-js/internals/host-report-errors.js");
  9736. var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
  9737. var perform = __webpack_require__(/*! ../internals/perform */ "./node_modules/core-js/internals/perform.js");
  9738. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  9739. var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
  9740. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  9741. var IS_BROWSER = __webpack_require__(/*! ../internals/engine-is-browser */ "./node_modules/core-js/internals/engine-is-browser.js");
  9742. var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
  9743. var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
  9744. var SPECIES = wellKnownSymbol('species');
  9745. var PROMISE = 'Promise';
  9746. var getInternalState = InternalStateModule.get;
  9747. var setInternalState = InternalStateModule.set;
  9748. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  9749. var NativePromisePrototype = NativePromise && NativePromise.prototype;
  9750. var PromiseConstructor = NativePromise;
  9751. var PromiseConstructorPrototype = NativePromisePrototype;
  9752. var TypeError = global.TypeError;
  9753. var document = global.document;
  9754. var process = global.process;
  9755. var newPromiseCapability = newPromiseCapabilityModule.f;
  9756. var newGenericPromiseCapability = newPromiseCapability;
  9757. var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
  9758. var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
  9759. var UNHANDLED_REJECTION = 'unhandledrejection';
  9760. var REJECTION_HANDLED = 'rejectionhandled';
  9761. var PENDING = 0;
  9762. var FULFILLED = 1;
  9763. var REJECTED = 2;
  9764. var HANDLED = 1;
  9765. var UNHANDLED = 2;
  9766. var SUBCLASSING = false;
  9767. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  9768. var FORCED = isForced(PROMISE, function () {
  9769. var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
  9770. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  9771. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  9772. // We can't detect it synchronously, so just check versions
  9773. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  9774. // We need Promise#finally in the pure version for preventing prototype pollution
  9775. if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;
  9776. // We can't use @@species feature detection in V8 since it causes
  9777. // deoptimization and performance degradation
  9778. // https://github.com/zloirock/core-js/issues/679
  9779. if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
  9780. // Detect correctness of subclassing with @@species support
  9781. var promise = new PromiseConstructor(function (resolve) { resolve(1); });
  9782. var FakePromise = function (exec) {
  9783. exec(function () { /* empty */ }, function () { /* empty */ });
  9784. };
  9785. var constructor = promise.constructor = {};
  9786. constructor[SPECIES] = FakePromise;
  9787. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  9788. if (!SUBCLASSING) return true;
  9789. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  9790. return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
  9791. });
  9792. var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
  9793. PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
  9794. });
  9795. // helpers
  9796. var isThenable = function (it) {
  9797. var then;
  9798. return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  9799. };
  9800. var notify = function (state, isReject) {
  9801. if (state.notified) return;
  9802. state.notified = true;
  9803. var chain = state.reactions;
  9804. microtask(function () {
  9805. var value = state.value;
  9806. var ok = state.state == FULFILLED;
  9807. var index = 0;
  9808. // variable length - can't use forEach
  9809. while (chain.length > index) {
  9810. var reaction = chain[index++];
  9811. var handler = ok ? reaction.ok : reaction.fail;
  9812. var resolve = reaction.resolve;
  9813. var reject = reaction.reject;
  9814. var domain = reaction.domain;
  9815. var result, then, exited;
  9816. try {
  9817. if (handler) {
  9818. if (!ok) {
  9819. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  9820. state.rejection = HANDLED;
  9821. }
  9822. if (handler === true) result = value;
  9823. else {
  9824. if (domain) domain.enter();
  9825. result = handler(value); // can throw
  9826. if (domain) {
  9827. domain.exit();
  9828. exited = true;
  9829. }
  9830. }
  9831. if (result === reaction.promise) {
  9832. reject(TypeError('Promise-chain cycle'));
  9833. } else if (then = isThenable(result)) {
  9834. then.call(result, resolve, reject);
  9835. } else resolve(result);
  9836. } else reject(value);
  9837. } catch (error) {
  9838. if (domain && !exited) domain.exit();
  9839. reject(error);
  9840. }
  9841. }
  9842. state.reactions = [];
  9843. state.notified = false;
  9844. if (isReject && !state.rejection) onUnhandled(state);
  9845. });
  9846. };
  9847. var dispatchEvent = function (name, promise, reason) {
  9848. var event, handler;
  9849. if (DISPATCH_EVENT) {
  9850. event = document.createEvent('Event');
  9851. event.promise = promise;
  9852. event.reason = reason;
  9853. event.initEvent(name, false, true);
  9854. global.dispatchEvent(event);
  9855. } else event = { promise: promise, reason: reason };
  9856. if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
  9857. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  9858. };
  9859. var onUnhandled = function (state) {
  9860. task.call(global, function () {
  9861. var promise = state.facade;
  9862. var value = state.value;
  9863. var IS_UNHANDLED = isUnhandled(state);
  9864. var result;
  9865. if (IS_UNHANDLED) {
  9866. result = perform(function () {
  9867. if (IS_NODE) {
  9868. process.emit('unhandledRejection', value, promise);
  9869. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  9870. });
  9871. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  9872. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  9873. if (result.error) throw result.value;
  9874. }
  9875. });
  9876. };
  9877. var isUnhandled = function (state) {
  9878. return state.rejection !== HANDLED && !state.parent;
  9879. };
  9880. var onHandleUnhandled = function (state) {
  9881. task.call(global, function () {
  9882. var promise = state.facade;
  9883. if (IS_NODE) {
  9884. process.emit('rejectionHandled', promise);
  9885. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  9886. });
  9887. };
  9888. var bind = function (fn, state, unwrap) {
  9889. return function (value) {
  9890. fn(state, value, unwrap);
  9891. };
  9892. };
  9893. var internalReject = function (state, value, unwrap) {
  9894. if (state.done) return;
  9895. state.done = true;
  9896. if (unwrap) state = unwrap;
  9897. state.value = value;
  9898. state.state = REJECTED;
  9899. notify(state, true);
  9900. };
  9901. var internalResolve = function (state, value, unwrap) {
  9902. if (state.done) return;
  9903. state.done = true;
  9904. if (unwrap) state = unwrap;
  9905. try {
  9906. if (state.facade === value) throw TypeError("Promise can't be resolved itself");
  9907. var then = isThenable(value);
  9908. if (then) {
  9909. microtask(function () {
  9910. var wrapper = { done: false };
  9911. try {
  9912. then.call(value,
  9913. bind(internalResolve, wrapper, state),
  9914. bind(internalReject, wrapper, state)
  9915. );
  9916. } catch (error) {
  9917. internalReject(wrapper, error, state);
  9918. }
  9919. });
  9920. } else {
  9921. state.value = value;
  9922. state.state = FULFILLED;
  9923. notify(state, false);
  9924. }
  9925. } catch (error) {
  9926. internalReject({ done: false }, error, state);
  9927. }
  9928. };
  9929. // constructor polyfill
  9930. if (FORCED) {
  9931. // 25.4.3.1 Promise(executor)
  9932. PromiseConstructor = function Promise(executor) {
  9933. anInstance(this, PromiseConstructor, PROMISE);
  9934. aFunction(executor);
  9935. Internal.call(this);
  9936. var state = getInternalState(this);
  9937. try {
  9938. executor(bind(internalResolve, state), bind(internalReject, state));
  9939. } catch (error) {
  9940. internalReject(state, error);
  9941. }
  9942. };
  9943. PromiseConstructorPrototype = PromiseConstructor.prototype;
  9944. // eslint-disable-next-line no-unused-vars -- required for `.length`
  9945. Internal = function Promise(executor) {
  9946. setInternalState(this, {
  9947. type: PROMISE,
  9948. done: false,
  9949. notified: false,
  9950. parent: false,
  9951. reactions: [],
  9952. rejection: false,
  9953. state: PENDING,
  9954. value: undefined
  9955. });
  9956. };
  9957. Internal.prototype = redefineAll(PromiseConstructorPrototype, {
  9958. // `Promise.prototype.then` method
  9959. // https://tc39.es/ecma262/#sec-promise.prototype.then
  9960. then: function then(onFulfilled, onRejected) {
  9961. var state = getInternalPromiseState(this);
  9962. var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
  9963. reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
  9964. reaction.fail = typeof onRejected == 'function' && onRejected;
  9965. reaction.domain = IS_NODE ? process.domain : undefined;
  9966. state.parent = true;
  9967. state.reactions.push(reaction);
  9968. if (state.state != PENDING) notify(state, false);
  9969. return reaction.promise;
  9970. },
  9971. // `Promise.prototype.catch` method
  9972. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  9973. 'catch': function (onRejected) {
  9974. return this.then(undefined, onRejected);
  9975. }
  9976. });
  9977. OwnPromiseCapability = function () {
  9978. var promise = new Internal();
  9979. var state = getInternalState(promise);
  9980. this.promise = promise;
  9981. this.resolve = bind(internalResolve, state);
  9982. this.reject = bind(internalReject, state);
  9983. };
  9984. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  9985. return C === PromiseConstructor || C === PromiseWrapper
  9986. ? new OwnPromiseCapability(C)
  9987. : newGenericPromiseCapability(C);
  9988. };
  9989. if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) {
  9990. nativeThen = NativePromisePrototype.then;
  9991. if (!SUBCLASSING) {
  9992. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  9993. redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
  9994. var that = this;
  9995. return new PromiseConstructor(function (resolve, reject) {
  9996. nativeThen.call(that, resolve, reject);
  9997. }).then(onFulfilled, onRejected);
  9998. // https://github.com/zloirock/core-js/issues/640
  9999. }, { unsafe: true });
  10000. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  10001. redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });
  10002. }
  10003. // make `.constructor === Promise` work for native promise-based APIs
  10004. try {
  10005. delete NativePromisePrototype.constructor;
  10006. } catch (error) { /* empty */ }
  10007. // make `instanceof Promise` work for native promise-based APIs
  10008. if (setPrototypeOf) {
  10009. setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);
  10010. }
  10011. }
  10012. }
  10013. $({ global: true, wrap: true, forced: FORCED }, {
  10014. Promise: PromiseConstructor
  10015. });
  10016. setToStringTag(PromiseConstructor, PROMISE, false, true);
  10017. setSpecies(PROMISE);
  10018. PromiseWrapper = getBuiltIn(PROMISE);
  10019. // statics
  10020. $({ target: PROMISE, stat: true, forced: FORCED }, {
  10021. // `Promise.reject` method
  10022. // https://tc39.es/ecma262/#sec-promise.reject
  10023. reject: function reject(r) {
  10024. var capability = newPromiseCapability(this);
  10025. capability.reject.call(undefined, r);
  10026. return capability.promise;
  10027. }
  10028. });
  10029. $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
  10030. // `Promise.resolve` method
  10031. // https://tc39.es/ecma262/#sec-promise.resolve
  10032. resolve: function resolve(x) {
  10033. return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
  10034. }
  10035. });
  10036. $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
  10037. // `Promise.all` method
  10038. // https://tc39.es/ecma262/#sec-promise.all
  10039. all: function all(iterable) {
  10040. var C = this;
  10041. var capability = newPromiseCapability(C);
  10042. var resolve = capability.resolve;
  10043. var reject = capability.reject;
  10044. var result = perform(function () {
  10045. var $promiseResolve = aFunction(C.resolve);
  10046. var values = [];
  10047. var counter = 0;
  10048. var remaining = 1;
  10049. iterate(iterable, function (promise) {
  10050. var index = counter++;
  10051. var alreadyCalled = false;
  10052. values.push(undefined);
  10053. remaining++;
  10054. $promiseResolve.call(C, promise).then(function (value) {
  10055. if (alreadyCalled) return;
  10056. alreadyCalled = true;
  10057. values[index] = value;
  10058. --remaining || resolve(values);
  10059. }, reject);
  10060. });
  10061. --remaining || resolve(values);
  10062. });
  10063. if (result.error) reject(result.value);
  10064. return capability.promise;
  10065. },
  10066. // `Promise.race` method
  10067. // https://tc39.es/ecma262/#sec-promise.race
  10068. race: function race(iterable) {
  10069. var C = this;
  10070. var capability = newPromiseCapability(C);
  10071. var reject = capability.reject;
  10072. var result = perform(function () {
  10073. var $promiseResolve = aFunction(C.resolve);
  10074. iterate(iterable, function (promise) {
  10075. $promiseResolve.call(C, promise).then(capability.resolve, reject);
  10076. });
  10077. });
  10078. if (result.error) reject(result.value);
  10079. return capability.promise;
  10080. }
  10081. });
  10082. /***/ }),
  10083. /***/ "./node_modules/core-js/modules/es.reflect.apply.js":
  10084. /*!**********************************************************!*\
  10085. !*** ./node_modules/core-js/modules/es.reflect.apply.js ***!
  10086. \**********************************************************/
  10087. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10088. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10089. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  10090. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  10091. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10092. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  10093. var nativeApply = getBuiltIn('Reflect', 'apply');
  10094. var functionApply = Function.apply;
  10095. // MS Edge argumentsList argument is optional
  10096. var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
  10097. nativeApply(function () { /* empty */ });
  10098. });
  10099. // `Reflect.apply` method
  10100. // https://tc39.es/ecma262/#sec-reflect.apply
  10101. $({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
  10102. apply: function apply(target, thisArgument, argumentsList) {
  10103. aFunction(target);
  10104. anObject(argumentsList);
  10105. return nativeApply
  10106. ? nativeApply(target, thisArgument, argumentsList)
  10107. : functionApply.call(target, thisArgument, argumentsList);
  10108. }
  10109. });
  10110. /***/ }),
  10111. /***/ "./node_modules/core-js/modules/es.reflect.construct.js":
  10112. /*!**************************************************************!*\
  10113. !*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
  10114. \**************************************************************/
  10115. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10116. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10117. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  10118. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  10119. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10120. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  10121. var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  10122. var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
  10123. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  10124. var nativeConstruct = getBuiltIn('Reflect', 'construct');
  10125. // `Reflect.construct` method
  10126. // https://tc39.es/ecma262/#sec-reflect.construct
  10127. // MS Edge supports only 2 arguments and argumentsList argument is optional
  10128. // FF Nightly sets third argument as `new.target`, but does not create `this` from it
  10129. var NEW_TARGET_BUG = fails(function () {
  10130. function F() { /* empty */ }
  10131. return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
  10132. });
  10133. var ARGS_BUG = !fails(function () {
  10134. nativeConstruct(function () { /* empty */ });
  10135. });
  10136. var FORCED = NEW_TARGET_BUG || ARGS_BUG;
  10137. $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
  10138. construct: function construct(Target, args /* , newTarget */) {
  10139. aFunction(Target);
  10140. anObject(args);
  10141. var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
  10142. if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
  10143. if (Target == newTarget) {
  10144. // w/o altered newTarget, optimization for 0-4 arguments
  10145. switch (args.length) {
  10146. case 0: return new Target();
  10147. case 1: return new Target(args[0]);
  10148. case 2: return new Target(args[0], args[1]);
  10149. case 3: return new Target(args[0], args[1], args[2]);
  10150. case 4: return new Target(args[0], args[1], args[2], args[3]);
  10151. }
  10152. // w/o altered newTarget, lot of arguments case
  10153. var $args = [null];
  10154. $args.push.apply($args, args);
  10155. return new (bind.apply(Target, $args))();
  10156. }
  10157. // with altered newTarget, not support built-in constructors
  10158. var proto = newTarget.prototype;
  10159. var instance = create(isObject(proto) ? proto : Object.prototype);
  10160. var result = Function.apply.call(Target, instance, args);
  10161. return isObject(result) ? result : instance;
  10162. }
  10163. });
  10164. /***/ }),
  10165. /***/ "./node_modules/core-js/modules/es.reflect.delete-property.js":
  10166. /*!********************************************************************!*\
  10167. !*** ./node_modules/core-js/modules/es.reflect.delete-property.js ***!
  10168. \********************************************************************/
  10169. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10170. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10171. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10172. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  10173. // `Reflect.deleteProperty` method
  10174. // https://tc39.es/ecma262/#sec-reflect.deleteproperty
  10175. $({ target: 'Reflect', stat: true }, {
  10176. deleteProperty: function deleteProperty(target, propertyKey) {
  10177. var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
  10178. return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
  10179. }
  10180. });
  10181. /***/ }),
  10182. /***/ "./node_modules/core-js/modules/es.reflect.get-prototype-of.js":
  10183. /*!*********************************************************************!*\
  10184. !*** ./node_modules/core-js/modules/es.reflect.get-prototype-of.js ***!
  10185. \*********************************************************************/
  10186. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10187. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10188. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10189. var objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "./node_modules/core-js/internals/object-get-prototype-of.js");
  10190. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "./node_modules/core-js/internals/correct-prototype-getter.js");
  10191. // `Reflect.getPrototypeOf` method
  10192. // https://tc39.es/ecma262/#sec-reflect.getprototypeof
  10193. $({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
  10194. getPrototypeOf: function getPrototypeOf(target) {
  10195. return objectGetPrototypeOf(anObject(target));
  10196. }
  10197. });
  10198. /***/ }),
  10199. /***/ "./node_modules/core-js/modules/es.string.includes.js":
  10200. /*!************************************************************!*\
  10201. !*** ./node_modules/core-js/modules/es.string.includes.js ***!
  10202. \************************************************************/
  10203. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10204. "use strict";
  10205. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10206. var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
  10207. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  10208. var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
  10209. // `String.prototype.includes` method
  10210. // https://tc39.es/ecma262/#sec-string.prototype.includes
  10211. $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  10212. includes: function includes(searchString /* , position = 0 */) {
  10213. return !!~String(requireObjectCoercible(this))
  10214. .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  10215. }
  10216. });
  10217. /***/ }),
  10218. /***/ "./node_modules/core-js/modules/es.string.iterator.js":
  10219. /*!************************************************************!*\
  10220. !*** ./node_modules/core-js/modules/es.string.iterator.js ***!
  10221. \************************************************************/
  10222. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10223. "use strict";
  10224. var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "./node_modules/core-js/internals/string-multibyte.js").charAt;
  10225. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  10226. var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "./node_modules/core-js/internals/define-iterator.js");
  10227. var STRING_ITERATOR = 'String Iterator';
  10228. var setInternalState = InternalStateModule.set;
  10229. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  10230. // `String.prototype[@@iterator]` method
  10231. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  10232. defineIterator(String, 'String', function (iterated) {
  10233. setInternalState(this, {
  10234. type: STRING_ITERATOR,
  10235. string: String(iterated),
  10236. index: 0
  10237. });
  10238. // `%StringIteratorPrototype%.next` method
  10239. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  10240. }, function next() {
  10241. var state = getInternalState(this);
  10242. var string = state.string;
  10243. var index = state.index;
  10244. var point;
  10245. if (index >= string.length) return { value: undefined, done: true };
  10246. point = charAt(string, index);
  10247. state.index += point.length;
  10248. return { value: point, done: false };
  10249. });
  10250. /***/ }),
  10251. /***/ "./node_modules/core-js/modules/es.string.match.js":
  10252. /*!*********************************************************!*\
  10253. !*** ./node_modules/core-js/modules/es.string.match.js ***!
  10254. \*********************************************************/
  10255. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10256. "use strict";
  10257. var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js");
  10258. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10259. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  10260. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  10261. var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "./node_modules/core-js/internals/advance-string-index.js");
  10262. var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "./node_modules/core-js/internals/regexp-exec-abstract.js");
  10263. // @@match logic
  10264. fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
  10265. return [
  10266. // `String.prototype.match` method
  10267. // https://tc39.es/ecma262/#sec-string.prototype.match
  10268. function match(regexp) {
  10269. var O = requireObjectCoercible(this);
  10270. var matcher = regexp == undefined ? undefined : regexp[MATCH];
  10271. return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  10272. },
  10273. // `RegExp.prototype[@@match]` method
  10274. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  10275. function (regexp) {
  10276. var res = maybeCallNative(nativeMatch, regexp, this);
  10277. if (res.done) return res.value;
  10278. var rx = anObject(regexp);
  10279. var S = String(this);
  10280. if (!rx.global) return regExpExec(rx, S);
  10281. var fullUnicode = rx.unicode;
  10282. rx.lastIndex = 0;
  10283. var A = [];
  10284. var n = 0;
  10285. var result;
  10286. while ((result = regExpExec(rx, S)) !== null) {
  10287. var matchStr = String(result[0]);
  10288. A[n] = matchStr;
  10289. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  10290. n++;
  10291. }
  10292. return n === 0 ? null : A;
  10293. }
  10294. ];
  10295. });
  10296. /***/ }),
  10297. /***/ "./node_modules/core-js/modules/es.string.starts-with.js":
  10298. /*!***************************************************************!*\
  10299. !*** ./node_modules/core-js/modules/es.string.starts-with.js ***!
  10300. \***************************************************************/
  10301. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10302. "use strict";
  10303. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10304. var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
  10305. var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
  10306. var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "./node_modules/core-js/internals/not-a-regexp.js");
  10307. var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
  10308. var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "./node_modules/core-js/internals/correct-is-regexp-logic.js");
  10309. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  10310. // eslint-disable-next-line es/no-string-prototype-startswith -- safe
  10311. var $startsWith = ''.startsWith;
  10312. var min = Math.min;
  10313. var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
  10314. // https://github.com/zloirock/core-js/pull/702
  10315. var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
  10316. var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
  10317. return descriptor && !descriptor.writable;
  10318. }();
  10319. // `String.prototype.startsWith` method
  10320. // https://tc39.es/ecma262/#sec-string.prototype.startswith
  10321. $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  10322. startsWith: function startsWith(searchString /* , position = 0 */) {
  10323. var that = String(requireObjectCoercible(this));
  10324. notARegExp(searchString);
  10325. var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  10326. var search = String(searchString);
  10327. return $startsWith
  10328. ? $startsWith.call(that, search, index)
  10329. : that.slice(index, index + search.length) === search;
  10330. }
  10331. });
  10332. /***/ }),
  10333. /***/ "./node_modules/core-js/modules/es.string.trim.js":
  10334. /*!********************************************************!*\
  10335. !*** ./node_modules/core-js/modules/es.string.trim.js ***!
  10336. \********************************************************/
  10337. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10338. "use strict";
  10339. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10340. var $trim = __webpack_require__(/*! ../internals/string-trim */ "./node_modules/core-js/internals/string-trim.js").trim;
  10341. var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "./node_modules/core-js/internals/string-trim-forced.js");
  10342. // `String.prototype.trim` method
  10343. // https://tc39.es/ecma262/#sec-string.prototype.trim
  10344. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  10345. trim: function trim() {
  10346. return $trim(this);
  10347. }
  10348. });
  10349. /***/ }),
  10350. /***/ "./node_modules/core-js/modules/es.symbol.description.js":
  10351. /*!***************************************************************!*\
  10352. !*** ./node_modules/core-js/modules/es.symbol.description.js ***!
  10353. \***************************************************************/
  10354. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10355. "use strict";
  10356. // `Symbol.prototype.description` getter
  10357. // https://tc39.es/ecma262/#sec-symbol.prototype.description
  10358. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10359. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  10360. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10361. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  10362. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  10363. var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js").f;
  10364. var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "./node_modules/core-js/internals/copy-constructor-properties.js");
  10365. var NativeSymbol = global.Symbol;
  10366. if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
  10367. // Safari 12 bug
  10368. NativeSymbol().description !== undefined
  10369. )) {
  10370. var EmptyStringDescriptionStore = {};
  10371. // wrap Symbol constructor for correct work with undefined description
  10372. var SymbolWrapper = function Symbol() {
  10373. var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
  10374. var result = this instanceof SymbolWrapper
  10375. ? new NativeSymbol(description)
  10376. // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
  10377. : description === undefined ? NativeSymbol() : NativeSymbol(description);
  10378. if (description === '') EmptyStringDescriptionStore[result] = true;
  10379. return result;
  10380. };
  10381. copyConstructorProperties(SymbolWrapper, NativeSymbol);
  10382. var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
  10383. symbolPrototype.constructor = SymbolWrapper;
  10384. var symbolToString = symbolPrototype.toString;
  10385. var native = String(NativeSymbol('test')) == 'Symbol(test)';
  10386. var regexp = /^Symbol\((.*)\)[^)]+$/;
  10387. defineProperty(symbolPrototype, 'description', {
  10388. configurable: true,
  10389. get: function description() {
  10390. var symbol = isObject(this) ? this.valueOf() : this;
  10391. var string = symbolToString.call(symbol);
  10392. if (has(EmptyStringDescriptionStore, symbol)) return '';
  10393. var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
  10394. return desc === '' ? undefined : desc;
  10395. }
  10396. });
  10397. $({ global: true, forced: true }, {
  10398. Symbol: SymbolWrapper
  10399. });
  10400. }
  10401. /***/ }),
  10402. /***/ "./node_modules/core-js/modules/es.symbol.iterator.js":
  10403. /*!************************************************************!*\
  10404. !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***!
  10405. \************************************************************/
  10406. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10407. var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
  10408. // `Symbol.iterator` well-known symbol
  10409. // https://tc39.es/ecma262/#sec-symbol.iterator
  10410. defineWellKnownSymbol('iterator');
  10411. /***/ }),
  10412. /***/ "./node_modules/core-js/modules/es.symbol.js":
  10413. /*!***************************************************!*\
  10414. !*** ./node_modules/core-js/modules/es.symbol.js ***!
  10415. \***************************************************/
  10416. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10417. "use strict";
  10418. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  10419. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10420. var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
  10421. var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
  10422. var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
  10423. var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "./node_modules/core-js/internals/native-symbol.js");
  10424. var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
  10425. var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
  10426. var has = __webpack_require__(/*! ../internals/has */ "./node_modules/core-js/internals/has.js");
  10427. var isArray = __webpack_require__(/*! ../internals/is-array */ "./node_modules/core-js/internals/is-array.js");
  10428. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  10429. var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
  10430. var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
  10431. var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "./node_modules/core-js/internals/to-indexed-object.js");
  10432. var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
  10433. var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
  10434. var nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
  10435. var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "./node_modules/core-js/internals/object-keys.js");
  10436. var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "./node_modules/core-js/internals/object-get-own-property-names.js");
  10437. var getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "./node_modules/core-js/internals/object-get-own-property-names-external.js");
  10438. var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "./node_modules/core-js/internals/object-get-own-property-symbols.js");
  10439. var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js");
  10440. var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
  10441. var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "./node_modules/core-js/internals/object-property-is-enumerable.js");
  10442. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  10443. var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
  10444. var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
  10445. var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
  10446. var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
  10447. var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
  10448. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  10449. var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "./node_modules/core-js/internals/well-known-symbol-wrapped.js");
  10450. var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "./node_modules/core-js/internals/define-well-known-symbol.js");
  10451. var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
  10452. var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
  10453. var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "./node_modules/core-js/internals/array-iteration.js").forEach;
  10454. var HIDDEN = sharedKey('hidden');
  10455. var SYMBOL = 'Symbol';
  10456. var PROTOTYPE = 'prototype';
  10457. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  10458. var setInternalState = InternalStateModule.set;
  10459. var getInternalState = InternalStateModule.getterFor(SYMBOL);
  10460. var ObjectPrototype = Object[PROTOTYPE];
  10461. var $Symbol = global.Symbol;
  10462. var $stringify = getBuiltIn('JSON', 'stringify');
  10463. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  10464. var nativeDefineProperty = definePropertyModule.f;
  10465. var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
  10466. var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
  10467. var AllSymbols = shared('symbols');
  10468. var ObjectPrototypeSymbols = shared('op-symbols');
  10469. var StringToSymbolRegistry = shared('string-to-symbol-registry');
  10470. var SymbolToStringRegistry = shared('symbol-to-string-registry');
  10471. var WellKnownSymbolsStore = shared('wks');
  10472. var QObject = global.QObject;
  10473. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  10474. var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  10475. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  10476. var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  10477. return nativeObjectCreate(nativeDefineProperty({}, 'a', {
  10478. get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  10479. })).a != 7;
  10480. }) ? function (O, P, Attributes) {
  10481. var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  10482. if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  10483. nativeDefineProperty(O, P, Attributes);
  10484. if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
  10485. nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  10486. }
  10487. } : nativeDefineProperty;
  10488. var wrap = function (tag, description) {
  10489. var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
  10490. setInternalState(symbol, {
  10491. type: SYMBOL,
  10492. tag: tag,
  10493. description: description
  10494. });
  10495. if (!DESCRIPTORS) symbol.description = description;
  10496. return symbol;
  10497. };
  10498. var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  10499. return typeof it == 'symbol';
  10500. } : function (it) {
  10501. return Object(it) instanceof $Symbol;
  10502. };
  10503. var $defineProperty = function defineProperty(O, P, Attributes) {
  10504. if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  10505. anObject(O);
  10506. var key = toPrimitive(P, true);
  10507. anObject(Attributes);
  10508. if (has(AllSymbols, key)) {
  10509. if (!Attributes.enumerable) {
  10510. if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
  10511. O[HIDDEN][key] = true;
  10512. } else {
  10513. if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
  10514. Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
  10515. } return setSymbolDescriptor(O, key, Attributes);
  10516. } return nativeDefineProperty(O, key, Attributes);
  10517. };
  10518. var $defineProperties = function defineProperties(O, Properties) {
  10519. anObject(O);
  10520. var properties = toIndexedObject(Properties);
  10521. var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  10522. $forEach(keys, function (key) {
  10523. if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
  10524. });
  10525. return O;
  10526. };
  10527. var $create = function create(O, Properties) {
  10528. return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
  10529. };
  10530. var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  10531. var P = toPrimitive(V, true);
  10532. var enumerable = nativePropertyIsEnumerable.call(this, P);
  10533. if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
  10534. return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
  10535. };
  10536. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  10537. var it = toIndexedObject(O);
  10538. var key = toPrimitive(P, true);
  10539. if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
  10540. var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  10541. if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
  10542. descriptor.enumerable = true;
  10543. }
  10544. return descriptor;
  10545. };
  10546. var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  10547. var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  10548. var result = [];
  10549. $forEach(names, function (key) {
  10550. if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
  10551. });
  10552. return result;
  10553. };
  10554. var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
  10555. var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  10556. var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  10557. var result = [];
  10558. $forEach(names, function (key) {
  10559. if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
  10560. result.push(AllSymbols[key]);
  10561. }
  10562. });
  10563. return result;
  10564. };
  10565. // `Symbol` constructor
  10566. // https://tc39.es/ecma262/#sec-symbol-constructor
  10567. if (!NATIVE_SYMBOL) {
  10568. $Symbol = function Symbol() {
  10569. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
  10570. var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
  10571. var tag = uid(description);
  10572. var setter = function (value) {
  10573. if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
  10574. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  10575. setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
  10576. };
  10577. if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
  10578. return wrap(tag, description);
  10579. };
  10580. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  10581. return getInternalState(this).tag;
  10582. });
  10583. redefine($Symbol, 'withoutSetter', function (description) {
  10584. return wrap(uid(description), description);
  10585. });
  10586. propertyIsEnumerableModule.f = $propertyIsEnumerable;
  10587. definePropertyModule.f = $defineProperty;
  10588. getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  10589. getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  10590. getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
  10591. wrappedWellKnownSymbolModule.f = function (name) {
  10592. return wrap(wellKnownSymbol(name), name);
  10593. };
  10594. if (DESCRIPTORS) {
  10595. // https://github.com/tc39/proposal-Symbol-description
  10596. nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
  10597. configurable: true,
  10598. get: function description() {
  10599. return getInternalState(this).description;
  10600. }
  10601. });
  10602. if (!IS_PURE) {
  10603. redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
  10604. }
  10605. }
  10606. }
  10607. $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  10608. Symbol: $Symbol
  10609. });
  10610. $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  10611. defineWellKnownSymbol(name);
  10612. });
  10613. $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  10614. // `Symbol.for` method
  10615. // https://tc39.es/ecma262/#sec-symbol.for
  10616. 'for': function (key) {
  10617. var string = String(key);
  10618. if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
  10619. var symbol = $Symbol(string);
  10620. StringToSymbolRegistry[string] = symbol;
  10621. SymbolToStringRegistry[symbol] = string;
  10622. return symbol;
  10623. },
  10624. // `Symbol.keyFor` method
  10625. // https://tc39.es/ecma262/#sec-symbol.keyfor
  10626. keyFor: function keyFor(sym) {
  10627. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
  10628. if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  10629. },
  10630. useSetter: function () { USE_SETTER = true; },
  10631. useSimple: function () { USE_SETTER = false; }
  10632. });
  10633. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  10634. // `Object.create` method
  10635. // https://tc39.es/ecma262/#sec-object.create
  10636. create: $create,
  10637. // `Object.defineProperty` method
  10638. // https://tc39.es/ecma262/#sec-object.defineproperty
  10639. defineProperty: $defineProperty,
  10640. // `Object.defineProperties` method
  10641. // https://tc39.es/ecma262/#sec-object.defineproperties
  10642. defineProperties: $defineProperties,
  10643. // `Object.getOwnPropertyDescriptor` method
  10644. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  10645. getOwnPropertyDescriptor: $getOwnPropertyDescriptor
  10646. });
  10647. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  10648. // `Object.getOwnPropertyNames` method
  10649. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  10650. getOwnPropertyNames: $getOwnPropertyNames,
  10651. // `Object.getOwnPropertySymbols` method
  10652. // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
  10653. getOwnPropertySymbols: $getOwnPropertySymbols
  10654. });
  10655. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  10656. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  10657. $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
  10658. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  10659. return getOwnPropertySymbolsModule.f(toObject(it));
  10660. }
  10661. });
  10662. // `JSON.stringify` method behavior with symbols
  10663. // https://tc39.es/ecma262/#sec-json.stringify
  10664. if ($stringify) {
  10665. var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
  10666. var symbol = $Symbol();
  10667. // MS Edge converts symbol values to JSON as {}
  10668. return $stringify([symbol]) != '[null]'
  10669. // WebKit converts symbol values to JSON as null
  10670. || $stringify({ a: symbol }) != '{}'
  10671. // V8 throws on boxed symbols
  10672. || $stringify(Object(symbol)) != '{}';
  10673. });
  10674. $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
  10675. // eslint-disable-next-line no-unused-vars -- required for `.length`
  10676. stringify: function stringify(it, replacer, space) {
  10677. var args = [it];
  10678. var index = 1;
  10679. var $replacer;
  10680. while (arguments.length > index) args.push(arguments[index++]);
  10681. $replacer = replacer;
  10682. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  10683. if (!isArray(replacer)) replacer = function (key, value) {
  10684. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  10685. if (!isSymbol(value)) return value;
  10686. };
  10687. args[1] = replacer;
  10688. return $stringify.apply(null, args);
  10689. }
  10690. });
  10691. }
  10692. // `Symbol.prototype[@@toPrimitive]` method
  10693. // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
  10694. if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
  10695. createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  10696. }
  10697. // `Symbol.prototype[@@toStringTag]` property
  10698. // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
  10699. setToStringTag($Symbol, SYMBOL);
  10700. hiddenKeys[HIDDEN] = true;
  10701. /***/ }),
  10702. /***/ "./node_modules/core-js/modules/web.dom-collections.for-each.js":
  10703. /*!**********************************************************************!*\
  10704. !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***!
  10705. \**********************************************************************/
  10706. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10707. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10708. var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
  10709. var forEach = __webpack_require__(/*! ../internals/array-for-each */ "./node_modules/core-js/internals/array-for-each.js");
  10710. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  10711. for (var COLLECTION_NAME in DOMIterables) {
  10712. var Collection = global[COLLECTION_NAME];
  10713. var CollectionPrototype = Collection && Collection.prototype;
  10714. // some Chrome versions have non-configurable methods on DOMTokenList
  10715. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  10716. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  10717. } catch (error) {
  10718. CollectionPrototype.forEach = forEach;
  10719. }
  10720. }
  10721. /***/ }),
  10722. /***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js":
  10723. /*!**********************************************************************!*\
  10724. !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
  10725. \**********************************************************************/
  10726. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  10727. var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
  10728. var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "./node_modules/core-js/internals/dom-iterables.js");
  10729. var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "./node_modules/core-js/modules/es.array.iterator.js");
  10730. var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
  10731. var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
  10732. var ITERATOR = wellKnownSymbol('iterator');
  10733. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  10734. var ArrayValues = ArrayIteratorMethods.values;
  10735. for (var COLLECTION_NAME in DOMIterables) {
  10736. var Collection = global[COLLECTION_NAME];
  10737. var CollectionPrototype = Collection && Collection.prototype;
  10738. if (CollectionPrototype) {
  10739. // some Chrome versions have non-configurable methods on DOMTokenList
  10740. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  10741. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  10742. } catch (error) {
  10743. CollectionPrototype[ITERATOR] = ArrayValues;
  10744. }
  10745. if (!CollectionPrototype[TO_STRING_TAG]) {
  10746. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  10747. }
  10748. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  10749. // some Chrome versions have non-configurable methods on DOMTokenList
  10750. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  10751. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  10752. } catch (error) {
  10753. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  10754. }
  10755. }
  10756. }
  10757. }
  10758. /***/ }),
  10759. /***/ "./node_modules/performance-now/lib/performance-now.js":
  10760. /*!*************************************************************!*\
  10761. !*** ./node_modules/performance-now/lib/performance-now.js ***!
  10762. \*************************************************************/
  10763. /***/ (function(module) {
  10764. // Generated by CoffeeScript 1.12.2
  10765. (function() {
  10766. var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
  10767. if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
  10768. module.exports = function() {
  10769. return performance.now();
  10770. };
  10771. } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
  10772. module.exports = function() {
  10773. return (getNanoSeconds() - nodeLoadTime) / 1e6;
  10774. };
  10775. hrtime = process.hrtime;
  10776. getNanoSeconds = function() {
  10777. var hr;
  10778. hr = hrtime();
  10779. return hr[0] * 1e9 + hr[1];
  10780. };
  10781. moduleLoadTime = getNanoSeconds();
  10782. upTime = process.uptime() * 1e9;
  10783. nodeLoadTime = moduleLoadTime - upTime;
  10784. } else if (Date.now) {
  10785. module.exports = function() {
  10786. return Date.now() - loadTime;
  10787. };
  10788. loadTime = Date.now();
  10789. } else {
  10790. module.exports = function() {
  10791. return new Date().getTime() - loadTime;
  10792. };
  10793. loadTime = new Date().getTime();
  10794. }
  10795. }).call(this);
  10796. //# sourceMappingURL=performance-now.js.map
  10797. /***/ }),
  10798. /***/ "./node_modules/raf/index.js":
  10799. /*!***********************************!*\
  10800. !*** ./node_modules/raf/index.js ***!
  10801. \***********************************/
  10802. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  10803. var now = __webpack_require__(/*! performance-now */ "./node_modules/performance-now/lib/performance-now.js")
  10804. , root = typeof window === 'undefined' ? __webpack_require__.g : window
  10805. , vendors = ['moz', 'webkit']
  10806. , suffix = 'AnimationFrame'
  10807. , raf = root['request' + suffix]
  10808. , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
  10809. for(var i = 0; !raf && i < vendors.length; i++) {
  10810. raf = root[vendors[i] + 'Request' + suffix]
  10811. caf = root[vendors[i] + 'Cancel' + suffix]
  10812. || root[vendors[i] + 'CancelRequest' + suffix]
  10813. }
  10814. // Some versions of FF have rAF but not cAF
  10815. if(!raf || !caf) {
  10816. var last = 0
  10817. , id = 0
  10818. , queue = []
  10819. , frameDuration = 1000 / 60
  10820. raf = function(callback) {
  10821. if(queue.length === 0) {
  10822. var _now = now()
  10823. , next = Math.max(0, frameDuration - (_now - last))
  10824. last = next + _now
  10825. setTimeout(function() {
  10826. var cp = queue.slice(0)
  10827. // Clear queue here to prevent
  10828. // callbacks from appending listeners
  10829. // to the current frame's queue
  10830. queue.length = 0
  10831. for(var i = 0; i < cp.length; i++) {
  10832. if(!cp[i].cancelled) {
  10833. try{
  10834. cp[i].callback(last)
  10835. } catch(e) {
  10836. setTimeout(function() { throw e }, 0)
  10837. }
  10838. }
  10839. }
  10840. }, Math.round(next))
  10841. }
  10842. queue.push({
  10843. handle: ++id,
  10844. callback: callback,
  10845. cancelled: false
  10846. })
  10847. return id
  10848. }
  10849. caf = function(handle) {
  10850. for(var i = 0; i < queue.length; i++) {
  10851. if(queue[i].handle === handle) {
  10852. queue[i].cancelled = true
  10853. }
  10854. }
  10855. }
  10856. }
  10857. module.exports = function(fn) {
  10858. // Wrap in a new function to prevent
  10859. // `cancel` potentially being assigned
  10860. // to the native rAF function
  10861. return raf.call(root, fn)
  10862. }
  10863. module.exports.cancel = function() {
  10864. caf.apply(root, arguments)
  10865. }
  10866. module.exports.polyfill = function(object) {
  10867. if (!object) {
  10868. object = root;
  10869. }
  10870. object.requestAnimationFrame = raf
  10871. object.cancelAnimationFrame = caf
  10872. }
  10873. /***/ }),
  10874. /***/ "./node_modules/regenerator-runtime/runtime.js":
  10875. /*!*****************************************************!*\
  10876. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  10877. \*****************************************************/
  10878. /***/ ((module) => {
  10879. /**
  10880. * Copyright (c) 2014-present, Facebook, Inc.
  10881. *
  10882. * This source code is licensed under the MIT license found in the
  10883. * LICENSE file in the root directory of this source tree.
  10884. */
  10885. var runtime = (function (exports) {
  10886. "use strict";
  10887. var Op = Object.prototype;
  10888. var hasOwn = Op.hasOwnProperty;
  10889. var undefined; // More compressible than void 0.
  10890. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  10891. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  10892. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  10893. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  10894. function define(obj, key, value) {
  10895. Object.defineProperty(obj, key, {
  10896. value: value,
  10897. enumerable: true,
  10898. configurable: true,
  10899. writable: true
  10900. });
  10901. return obj[key];
  10902. }
  10903. try {
  10904. // IE 8 has a broken Object.defineProperty that only works on DOM objects.
  10905. define({}, "");
  10906. } catch (err) {
  10907. define = function(obj, key, value) {
  10908. return obj[key] = value;
  10909. };
  10910. }
  10911. function wrap(innerFn, outerFn, self, tryLocsList) {
  10912. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  10913. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  10914. var generator = Object.create(protoGenerator.prototype);
  10915. var context = new Context(tryLocsList || []);
  10916. // The ._invoke method unifies the implementations of the .next,
  10917. // .throw, and .return methods.
  10918. generator._invoke = makeInvokeMethod(innerFn, self, context);
  10919. return generator;
  10920. }
  10921. exports.wrap = wrap;
  10922. // Try/catch helper to minimize deoptimizations. Returns a completion
  10923. // record like context.tryEntries[i].completion. This interface could
  10924. // have been (and was previously) designed to take a closure to be
  10925. // invoked without arguments, but in all the cases we care about we
  10926. // already have an existing method we want to call, so there's no need
  10927. // to create a new function object. We can even get away with assuming
  10928. // the method takes exactly one argument, since that happens to be true
  10929. // in every case, so we don't have to touch the arguments object. The
  10930. // only additional allocation required is the completion record, which
  10931. // has a stable shape and so hopefully should be cheap to allocate.
  10932. function tryCatch(fn, obj, arg) {
  10933. try {
  10934. return { type: "normal", arg: fn.call(obj, arg) };
  10935. } catch (err) {
  10936. return { type: "throw", arg: err };
  10937. }
  10938. }
  10939. var GenStateSuspendedStart = "suspendedStart";
  10940. var GenStateSuspendedYield = "suspendedYield";
  10941. var GenStateExecuting = "executing";
  10942. var GenStateCompleted = "completed";
  10943. // Returning this object from the innerFn has the same effect as
  10944. // breaking out of the dispatch switch statement.
  10945. var ContinueSentinel = {};
  10946. // Dummy constructor functions that we use as the .constructor and
  10947. // .constructor.prototype properties for functions that return Generator
  10948. // objects. For full spec compliance, you may wish to configure your
  10949. // minifier not to mangle the names of these two functions.
  10950. function Generator() {}
  10951. function GeneratorFunction() {}
  10952. function GeneratorFunctionPrototype() {}
  10953. // This is a polyfill for %IteratorPrototype% for environments that
  10954. // don't natively support it.
  10955. var IteratorPrototype = {};
  10956. IteratorPrototype[iteratorSymbol] = function () {
  10957. return this;
  10958. };
  10959. var getProto = Object.getPrototypeOf;
  10960. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  10961. if (NativeIteratorPrototype &&
  10962. NativeIteratorPrototype !== Op &&
  10963. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  10964. // This environment has a native %IteratorPrototype%; use it instead
  10965. // of the polyfill.
  10966. IteratorPrototype = NativeIteratorPrototype;
  10967. }
  10968. var Gp = GeneratorFunctionPrototype.prototype =
  10969. Generator.prototype = Object.create(IteratorPrototype);
  10970. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  10971. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  10972. GeneratorFunction.displayName = define(
  10973. GeneratorFunctionPrototype,
  10974. toStringTagSymbol,
  10975. "GeneratorFunction"
  10976. );
  10977. // Helper for defining the .next, .throw, and .return methods of the
  10978. // Iterator interface in terms of a single ._invoke method.
  10979. function defineIteratorMethods(prototype) {
  10980. ["next", "throw", "return"].forEach(function(method) {
  10981. define(prototype, method, function(arg) {
  10982. return this._invoke(method, arg);
  10983. });
  10984. });
  10985. }
  10986. exports.isGeneratorFunction = function(genFun) {
  10987. var ctor = typeof genFun === "function" && genFun.constructor;
  10988. return ctor
  10989. ? ctor === GeneratorFunction ||
  10990. // For the native GeneratorFunction constructor, the best we can
  10991. // do is to check its .name property.
  10992. (ctor.displayName || ctor.name) === "GeneratorFunction"
  10993. : false;
  10994. };
  10995. exports.mark = function(genFun) {
  10996. if (Object.setPrototypeOf) {
  10997. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  10998. } else {
  10999. genFun.__proto__ = GeneratorFunctionPrototype;
  11000. define(genFun, toStringTagSymbol, "GeneratorFunction");
  11001. }
  11002. genFun.prototype = Object.create(Gp);
  11003. return genFun;
  11004. };
  11005. // Within the body of any async function, `await x` is transformed to
  11006. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  11007. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  11008. // meant to be awaited.
  11009. exports.awrap = function(arg) {
  11010. return { __await: arg };
  11011. };
  11012. function AsyncIterator(generator, PromiseImpl) {
  11013. function invoke(method, arg, resolve, reject) {
  11014. var record = tryCatch(generator[method], generator, arg);
  11015. if (record.type === "throw") {
  11016. reject(record.arg);
  11017. } else {
  11018. var result = record.arg;
  11019. var value = result.value;
  11020. if (value &&
  11021. typeof value === "object" &&
  11022. hasOwn.call(value, "__await")) {
  11023. return PromiseImpl.resolve(value.__await).then(function(value) {
  11024. invoke("next", value, resolve, reject);
  11025. }, function(err) {
  11026. invoke("throw", err, resolve, reject);
  11027. });
  11028. }
  11029. return PromiseImpl.resolve(value).then(function(unwrapped) {
  11030. // When a yielded Promise is resolved, its final value becomes
  11031. // the .value of the Promise<{value,done}> result for the
  11032. // current iteration.
  11033. result.value = unwrapped;
  11034. resolve(result);
  11035. }, function(error) {
  11036. // If a rejected Promise was yielded, throw the rejection back
  11037. // into the async generator function so it can be handled there.
  11038. return invoke("throw", error, resolve, reject);
  11039. });
  11040. }
  11041. }
  11042. var previousPromise;
  11043. function enqueue(method, arg) {
  11044. function callInvokeWithMethodAndArg() {
  11045. return new PromiseImpl(function(resolve, reject) {
  11046. invoke(method, arg, resolve, reject);
  11047. });
  11048. }
  11049. return previousPromise =
  11050. // If enqueue has been called before, then we want to wait until
  11051. // all previous Promises have been resolved before calling invoke,
  11052. // so that results are always delivered in the correct order. If
  11053. // enqueue has not been called before, then it is important to
  11054. // call invoke immediately, without waiting on a callback to fire,
  11055. // so that the async generator function has the opportunity to do
  11056. // any necessary setup in a predictable way. This predictability
  11057. // is why the Promise constructor synchronously invokes its
  11058. // executor callback, and why async functions synchronously
  11059. // execute code before the first await. Since we implement simple
  11060. // async functions in terms of async generators, it is especially
  11061. // important to get this right, even though it requires care.
  11062. previousPromise ? previousPromise.then(
  11063. callInvokeWithMethodAndArg,
  11064. // Avoid propagating failures to Promises returned by later
  11065. // invocations of the iterator.
  11066. callInvokeWithMethodAndArg
  11067. ) : callInvokeWithMethodAndArg();
  11068. }
  11069. // Define the unified helper method that is used to implement .next,
  11070. // .throw, and .return (see defineIteratorMethods).
  11071. this._invoke = enqueue;
  11072. }
  11073. defineIteratorMethods(AsyncIterator.prototype);
  11074. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  11075. return this;
  11076. };
  11077. exports.AsyncIterator = AsyncIterator;
  11078. // Note that simple async functions are implemented on top of
  11079. // AsyncIterator objects; they just return a Promise for the value of
  11080. // the final result produced by the iterator.
  11081. exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  11082. if (PromiseImpl === void 0) PromiseImpl = Promise;
  11083. var iter = new AsyncIterator(
  11084. wrap(innerFn, outerFn, self, tryLocsList),
  11085. PromiseImpl
  11086. );
  11087. return exports.isGeneratorFunction(outerFn)
  11088. ? iter // If outerFn is a generator, return the full iterator.
  11089. : iter.next().then(function(result) {
  11090. return result.done ? result.value : iter.next();
  11091. });
  11092. };
  11093. function makeInvokeMethod(innerFn, self, context) {
  11094. var state = GenStateSuspendedStart;
  11095. return function invoke(method, arg) {
  11096. if (state === GenStateExecuting) {
  11097. throw new Error("Generator is already running");
  11098. }
  11099. if (state === GenStateCompleted) {
  11100. if (method === "throw") {
  11101. throw arg;
  11102. }
  11103. // Be forgiving, per 25.3.3.3.3 of the spec:
  11104. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  11105. return doneResult();
  11106. }
  11107. context.method = method;
  11108. context.arg = arg;
  11109. while (true) {
  11110. var delegate = context.delegate;
  11111. if (delegate) {
  11112. var delegateResult = maybeInvokeDelegate(delegate, context);
  11113. if (delegateResult) {
  11114. if (delegateResult === ContinueSentinel) continue;
  11115. return delegateResult;
  11116. }
  11117. }
  11118. if (context.method === "next") {
  11119. // Setting context._sent for legacy support of Babel's
  11120. // function.sent implementation.
  11121. context.sent = context._sent = context.arg;
  11122. } else if (context.method === "throw") {
  11123. if (state === GenStateSuspendedStart) {
  11124. state = GenStateCompleted;
  11125. throw context.arg;
  11126. }
  11127. context.dispatchException(context.arg);
  11128. } else if (context.method === "return") {
  11129. context.abrupt("return", context.arg);
  11130. }
  11131. state = GenStateExecuting;
  11132. var record = tryCatch(innerFn, self, context);
  11133. if (record.type === "normal") {
  11134. // If an exception is thrown from innerFn, we leave state ===
  11135. // GenStateExecuting and loop back for another invocation.
  11136. state = context.done
  11137. ? GenStateCompleted
  11138. : GenStateSuspendedYield;
  11139. if (record.arg === ContinueSentinel) {
  11140. continue;
  11141. }
  11142. return {
  11143. value: record.arg,
  11144. done: context.done
  11145. };
  11146. } else if (record.type === "throw") {
  11147. state = GenStateCompleted;
  11148. // Dispatch the exception by looping back around to the
  11149. // context.dispatchException(context.arg) call above.
  11150. context.method = "throw";
  11151. context.arg = record.arg;
  11152. }
  11153. }
  11154. };
  11155. }
  11156. // Call delegate.iterator[context.method](context.arg) and handle the
  11157. // result, either by returning a { value, done } result from the
  11158. // delegate iterator, or by modifying context.method and context.arg,
  11159. // setting context.delegate to null, and returning the ContinueSentinel.
  11160. function maybeInvokeDelegate(delegate, context) {
  11161. var method = delegate.iterator[context.method];
  11162. if (method === undefined) {
  11163. // A .throw or .return when the delegate iterator has no .throw
  11164. // method always terminates the yield* loop.
  11165. context.delegate = null;
  11166. if (context.method === "throw") {
  11167. // Note: ["return"] must be used for ES3 parsing compatibility.
  11168. if (delegate.iterator["return"]) {
  11169. // If the delegate iterator has a return method, give it a
  11170. // chance to clean up.
  11171. context.method = "return";
  11172. context.arg = undefined;
  11173. maybeInvokeDelegate(delegate, context);
  11174. if (context.method === "throw") {
  11175. // If maybeInvokeDelegate(context) changed context.method from
  11176. // "return" to "throw", let that override the TypeError below.
  11177. return ContinueSentinel;
  11178. }
  11179. }
  11180. context.method = "throw";
  11181. context.arg = new TypeError(
  11182. "The iterator does not provide a 'throw' method");
  11183. }
  11184. return ContinueSentinel;
  11185. }
  11186. var record = tryCatch(method, delegate.iterator, context.arg);
  11187. if (record.type === "throw") {
  11188. context.method = "throw";
  11189. context.arg = record.arg;
  11190. context.delegate = null;
  11191. return ContinueSentinel;
  11192. }
  11193. var info = record.arg;
  11194. if (! info) {
  11195. context.method = "throw";
  11196. context.arg = new TypeError("iterator result is not an object");
  11197. context.delegate = null;
  11198. return ContinueSentinel;
  11199. }
  11200. if (info.done) {
  11201. // Assign the result of the finished delegate to the temporary
  11202. // variable specified by delegate.resultName (see delegateYield).
  11203. context[delegate.resultName] = info.value;
  11204. // Resume execution at the desired location (see delegateYield).
  11205. context.next = delegate.nextLoc;
  11206. // If context.method was "throw" but the delegate handled the
  11207. // exception, let the outer generator proceed normally. If
  11208. // context.method was "next", forget context.arg since it has been
  11209. // "consumed" by the delegate iterator. If context.method was
  11210. // "return", allow the original .return call to continue in the
  11211. // outer generator.
  11212. if (context.method !== "return") {
  11213. context.method = "next";
  11214. context.arg = undefined;
  11215. }
  11216. } else {
  11217. // Re-yield the result returned by the delegate method.
  11218. return info;
  11219. }
  11220. // The delegate iterator is finished, so forget it and continue with
  11221. // the outer generator.
  11222. context.delegate = null;
  11223. return ContinueSentinel;
  11224. }
  11225. // Define Generator.prototype.{next,throw,return} in terms of the
  11226. // unified ._invoke helper method.
  11227. defineIteratorMethods(Gp);
  11228. define(Gp, toStringTagSymbol, "Generator");
  11229. // A Generator should always return itself as the iterator object when the
  11230. // @@iterator function is called on it. Some browsers' implementations of the
  11231. // iterator prototype chain incorrectly implement this, causing the Generator
  11232. // object to not be returned from this call. This ensures that doesn't happen.
  11233. // See https://github.com/facebook/regenerator/issues/274 for more details.
  11234. Gp[iteratorSymbol] = function() {
  11235. return this;
  11236. };
  11237. Gp.toString = function() {
  11238. return "[object Generator]";
  11239. };
  11240. function pushTryEntry(locs) {
  11241. var entry = { tryLoc: locs[0] };
  11242. if (1 in locs) {
  11243. entry.catchLoc = locs[1];
  11244. }
  11245. if (2 in locs) {
  11246. entry.finallyLoc = locs[2];
  11247. entry.afterLoc = locs[3];
  11248. }
  11249. this.tryEntries.push(entry);
  11250. }
  11251. function resetTryEntry(entry) {
  11252. var record = entry.completion || {};
  11253. record.type = "normal";
  11254. delete record.arg;
  11255. entry.completion = record;
  11256. }
  11257. function Context(tryLocsList) {
  11258. // The root entry object (effectively a try statement without a catch
  11259. // or a finally block) gives us a place to store values thrown from
  11260. // locations where there is no enclosing try statement.
  11261. this.tryEntries = [{ tryLoc: "root" }];
  11262. tryLocsList.forEach(pushTryEntry, this);
  11263. this.reset(true);
  11264. }
  11265. exports.keys = function(object) {
  11266. var keys = [];
  11267. for (var key in object) {
  11268. keys.push(key);
  11269. }
  11270. keys.reverse();
  11271. // Rather than returning an object with a next method, we keep
  11272. // things simple and return the next function itself.
  11273. return function next() {
  11274. while (keys.length) {
  11275. var key = keys.pop();
  11276. if (key in object) {
  11277. next.value = key;
  11278. next.done = false;
  11279. return next;
  11280. }
  11281. }
  11282. // To avoid creating an additional object, we just hang the .value
  11283. // and .done properties off the next function object itself. This
  11284. // also ensures that the minifier will not anonymize the function.
  11285. next.done = true;
  11286. return next;
  11287. };
  11288. };
  11289. function values(iterable) {
  11290. if (iterable) {
  11291. var iteratorMethod = iterable[iteratorSymbol];
  11292. if (iteratorMethod) {
  11293. return iteratorMethod.call(iterable);
  11294. }
  11295. if (typeof iterable.next === "function") {
  11296. return iterable;
  11297. }
  11298. if (!isNaN(iterable.length)) {
  11299. var i = -1, next = function next() {
  11300. while (++i < iterable.length) {
  11301. if (hasOwn.call(iterable, i)) {
  11302. next.value = iterable[i];
  11303. next.done = false;
  11304. return next;
  11305. }
  11306. }
  11307. next.value = undefined;
  11308. next.done = true;
  11309. return next;
  11310. };
  11311. return next.next = next;
  11312. }
  11313. }
  11314. // Return an iterator with no values.
  11315. return { next: doneResult };
  11316. }
  11317. exports.values = values;
  11318. function doneResult() {
  11319. return { value: undefined, done: true };
  11320. }
  11321. Context.prototype = {
  11322. constructor: Context,
  11323. reset: function(skipTempReset) {
  11324. this.prev = 0;
  11325. this.next = 0;
  11326. // Resetting context._sent for legacy support of Babel's
  11327. // function.sent implementation.
  11328. this.sent = this._sent = undefined;
  11329. this.done = false;
  11330. this.delegate = null;
  11331. this.method = "next";
  11332. this.arg = undefined;
  11333. this.tryEntries.forEach(resetTryEntry);
  11334. if (!skipTempReset) {
  11335. for (var name in this) {
  11336. // Not sure about the optimal order of these conditions:
  11337. if (name.charAt(0) === "t" &&
  11338. hasOwn.call(this, name) &&
  11339. !isNaN(+name.slice(1))) {
  11340. this[name] = undefined;
  11341. }
  11342. }
  11343. }
  11344. },
  11345. stop: function() {
  11346. this.done = true;
  11347. var rootEntry = this.tryEntries[0];
  11348. var rootRecord = rootEntry.completion;
  11349. if (rootRecord.type === "throw") {
  11350. throw rootRecord.arg;
  11351. }
  11352. return this.rval;
  11353. },
  11354. dispatchException: function(exception) {
  11355. if (this.done) {
  11356. throw exception;
  11357. }
  11358. var context = this;
  11359. function handle(loc, caught) {
  11360. record.type = "throw";
  11361. record.arg = exception;
  11362. context.next = loc;
  11363. if (caught) {
  11364. // If the dispatched exception was caught by a catch block,
  11365. // then let that catch block handle the exception normally.
  11366. context.method = "next";
  11367. context.arg = undefined;
  11368. }
  11369. return !! caught;
  11370. }
  11371. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11372. var entry = this.tryEntries[i];
  11373. var record = entry.completion;
  11374. if (entry.tryLoc === "root") {
  11375. // Exception thrown outside of any try block that could handle
  11376. // it, so set the completion value of the entire function to
  11377. // throw the exception.
  11378. return handle("end");
  11379. }
  11380. if (entry.tryLoc <= this.prev) {
  11381. var hasCatch = hasOwn.call(entry, "catchLoc");
  11382. var hasFinally = hasOwn.call(entry, "finallyLoc");
  11383. if (hasCatch && hasFinally) {
  11384. if (this.prev < entry.catchLoc) {
  11385. return handle(entry.catchLoc, true);
  11386. } else if (this.prev < entry.finallyLoc) {
  11387. return handle(entry.finallyLoc);
  11388. }
  11389. } else if (hasCatch) {
  11390. if (this.prev < entry.catchLoc) {
  11391. return handle(entry.catchLoc, true);
  11392. }
  11393. } else if (hasFinally) {
  11394. if (this.prev < entry.finallyLoc) {
  11395. return handle(entry.finallyLoc);
  11396. }
  11397. } else {
  11398. throw new Error("try statement without catch or finally");
  11399. }
  11400. }
  11401. }
  11402. },
  11403. abrupt: function(type, arg) {
  11404. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11405. var entry = this.tryEntries[i];
  11406. if (entry.tryLoc <= this.prev &&
  11407. hasOwn.call(entry, "finallyLoc") &&
  11408. this.prev < entry.finallyLoc) {
  11409. var finallyEntry = entry;
  11410. break;
  11411. }
  11412. }
  11413. if (finallyEntry &&
  11414. (type === "break" ||
  11415. type === "continue") &&
  11416. finallyEntry.tryLoc <= arg &&
  11417. arg <= finallyEntry.finallyLoc) {
  11418. // Ignore the finally entry if control is not jumping to a
  11419. // location outside the try/catch block.
  11420. finallyEntry = null;
  11421. }
  11422. var record = finallyEntry ? finallyEntry.completion : {};
  11423. record.type = type;
  11424. record.arg = arg;
  11425. if (finallyEntry) {
  11426. this.method = "next";
  11427. this.next = finallyEntry.finallyLoc;
  11428. return ContinueSentinel;
  11429. }
  11430. return this.complete(record);
  11431. },
  11432. complete: function(record, afterLoc) {
  11433. if (record.type === "throw") {
  11434. throw record.arg;
  11435. }
  11436. if (record.type === "break" ||
  11437. record.type === "continue") {
  11438. this.next = record.arg;
  11439. } else if (record.type === "return") {
  11440. this.rval = this.arg = record.arg;
  11441. this.method = "return";
  11442. this.next = "end";
  11443. } else if (record.type === "normal" && afterLoc) {
  11444. this.next = afterLoc;
  11445. }
  11446. return ContinueSentinel;
  11447. },
  11448. finish: function(finallyLoc) {
  11449. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11450. var entry = this.tryEntries[i];
  11451. if (entry.finallyLoc === finallyLoc) {
  11452. this.complete(entry.completion, entry.afterLoc);
  11453. resetTryEntry(entry);
  11454. return ContinueSentinel;
  11455. }
  11456. }
  11457. },
  11458. "catch": function(tryLoc) {
  11459. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  11460. var entry = this.tryEntries[i];
  11461. if (entry.tryLoc === tryLoc) {
  11462. var record = entry.completion;
  11463. if (record.type === "throw") {
  11464. var thrown = record.arg;
  11465. resetTryEntry(entry);
  11466. }
  11467. return thrown;
  11468. }
  11469. }
  11470. // The context.catch method must only be called with a location
  11471. // argument that corresponds to a known catch block.
  11472. throw new Error("illegal catch attempt");
  11473. },
  11474. delegateYield: function(iterable, resultName, nextLoc) {
  11475. this.delegate = {
  11476. iterator: values(iterable),
  11477. resultName: resultName,
  11478. nextLoc: nextLoc
  11479. };
  11480. if (this.method === "next") {
  11481. // Deliberately forget the last sent value so that we don't
  11482. // accidentally pass it on to the delegate.
  11483. this.arg = undefined;
  11484. }
  11485. return ContinueSentinel;
  11486. }
  11487. };
  11488. // Regardless of whether this script is executing as a CommonJS module
  11489. // or not, return the runtime object so that we can declare the variable
  11490. // regeneratorRuntime in the outer scope, which allows this module to be
  11491. // injected easily by `bin/regenerator --include-runtime script.js`.
  11492. return exports;
  11493. }(
  11494. // If this script is executing as a CommonJS module, use module.exports
  11495. // as the regeneratorRuntime namespace. Otherwise create a new empty
  11496. // object. Either way, the resulting object will be used to initialize
  11497. // the regeneratorRuntime variable at the top of this file.
  11498. true ? module.exports : 0
  11499. ));
  11500. try {
  11501. regeneratorRuntime = runtime;
  11502. } catch (accidentalStrictMode) {
  11503. // This module should not be running in strict mode, so the above
  11504. // assignment should always work unless something is misconfigured. Just
  11505. // in case runtime.js accidentally runs in strict mode, we can escape
  11506. // strict mode using a global Function call. This could conceivably fail
  11507. // if a Content Security Policy forbids using Function, but in that case
  11508. // the proper solution is to fix the accidental strict mode problem. If
  11509. // you've misconfigured your bundler to force strict mode and applied a
  11510. // CSP to forbid Function, and you're not willing to fix either of those
  11511. // problems, please detail your unique predicament in a GitHub issue.
  11512. Function("r", "regeneratorRuntime = r")(runtime);
  11513. }
  11514. /***/ }),
  11515. /***/ "./node_modules/rgbcolor/index.js":
  11516. /*!****************************************!*\
  11517. !*** ./node_modules/rgbcolor/index.js ***!
  11518. \****************************************/
  11519. /***/ ((module) => {
  11520. /*
  11521. Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
  11522. http://www.phpied.com/rgb-color-parser-in-javascript/
  11523. */
  11524. module.exports = function(color_string) {
  11525. this.ok = false;
  11526. this.alpha = 1.0;
  11527. // strip any leading #
  11528. if (color_string.charAt(0) == '#') { // remove # if any
  11529. color_string = color_string.substr(1,6);
  11530. }
  11531. color_string = color_string.replace(/ /g,'');
  11532. color_string = color_string.toLowerCase();
  11533. // before getting into regexps, try simple matches
  11534. // and overwrite the input
  11535. var simple_colors = {
  11536. aliceblue: 'f0f8ff',
  11537. antiquewhite: 'faebd7',
  11538. aqua: '00ffff',
  11539. aquamarine: '7fffd4',
  11540. azure: 'f0ffff',
  11541. beige: 'f5f5dc',
  11542. bisque: 'ffe4c4',
  11543. black: '000000',
  11544. blanchedalmond: 'ffebcd',
  11545. blue: '0000ff',
  11546. blueviolet: '8a2be2',
  11547. brown: 'a52a2a',
  11548. burlywood: 'deb887',
  11549. cadetblue: '5f9ea0',
  11550. chartreuse: '7fff00',
  11551. chocolate: 'd2691e',
  11552. coral: 'ff7f50',
  11553. cornflowerblue: '6495ed',
  11554. cornsilk: 'fff8dc',
  11555. crimson: 'dc143c',
  11556. cyan: '00ffff',
  11557. darkblue: '00008b',
  11558. darkcyan: '008b8b',
  11559. darkgoldenrod: 'b8860b',
  11560. darkgray: 'a9a9a9',
  11561. darkgreen: '006400',
  11562. darkkhaki: 'bdb76b',
  11563. darkmagenta: '8b008b',
  11564. darkolivegreen: '556b2f',
  11565. darkorange: 'ff8c00',
  11566. darkorchid: '9932cc',
  11567. darkred: '8b0000',
  11568. darksalmon: 'e9967a',
  11569. darkseagreen: '8fbc8f',
  11570. darkslateblue: '483d8b',
  11571. darkslategray: '2f4f4f',
  11572. darkturquoise: '00ced1',
  11573. darkviolet: '9400d3',
  11574. deeppink: 'ff1493',
  11575. deepskyblue: '00bfff',
  11576. dimgray: '696969',
  11577. dodgerblue: '1e90ff',
  11578. feldspar: 'd19275',
  11579. firebrick: 'b22222',
  11580. floralwhite: 'fffaf0',
  11581. forestgreen: '228b22',
  11582. fuchsia: 'ff00ff',
  11583. gainsboro: 'dcdcdc',
  11584. ghostwhite: 'f8f8ff',
  11585. gold: 'ffd700',
  11586. goldenrod: 'daa520',
  11587. gray: '808080',
  11588. green: '008000',
  11589. greenyellow: 'adff2f',
  11590. honeydew: 'f0fff0',
  11591. hotpink: 'ff69b4',
  11592. indianred : 'cd5c5c',
  11593. indigo : '4b0082',
  11594. ivory: 'fffff0',
  11595. khaki: 'f0e68c',
  11596. lavender: 'e6e6fa',
  11597. lavenderblush: 'fff0f5',
  11598. lawngreen: '7cfc00',
  11599. lemonchiffon: 'fffacd',
  11600. lightblue: 'add8e6',
  11601. lightcoral: 'f08080',
  11602. lightcyan: 'e0ffff',
  11603. lightgoldenrodyellow: 'fafad2',
  11604. lightgrey: 'd3d3d3',
  11605. lightgreen: '90ee90',
  11606. lightpink: 'ffb6c1',
  11607. lightsalmon: 'ffa07a',
  11608. lightseagreen: '20b2aa',
  11609. lightskyblue: '87cefa',
  11610. lightslateblue: '8470ff',
  11611. lightslategray: '778899',
  11612. lightsteelblue: 'b0c4de',
  11613. lightyellow: 'ffffe0',
  11614. lime: '00ff00',
  11615. limegreen: '32cd32',
  11616. linen: 'faf0e6',
  11617. magenta: 'ff00ff',
  11618. maroon: '800000',
  11619. mediumaquamarine: '66cdaa',
  11620. mediumblue: '0000cd',
  11621. mediumorchid: 'ba55d3',
  11622. mediumpurple: '9370d8',
  11623. mediumseagreen: '3cb371',
  11624. mediumslateblue: '7b68ee',
  11625. mediumspringgreen: '00fa9a',
  11626. mediumturquoise: '48d1cc',
  11627. mediumvioletred: 'c71585',
  11628. midnightblue: '191970',
  11629. mintcream: 'f5fffa',
  11630. mistyrose: 'ffe4e1',
  11631. moccasin: 'ffe4b5',
  11632. navajowhite: 'ffdead',
  11633. navy: '000080',
  11634. oldlace: 'fdf5e6',
  11635. olive: '808000',
  11636. olivedrab: '6b8e23',
  11637. orange: 'ffa500',
  11638. orangered: 'ff4500',
  11639. orchid: 'da70d6',
  11640. palegoldenrod: 'eee8aa',
  11641. palegreen: '98fb98',
  11642. paleturquoise: 'afeeee',
  11643. palevioletred: 'd87093',
  11644. papayawhip: 'ffefd5',
  11645. peachpuff: 'ffdab9',
  11646. peru: 'cd853f',
  11647. pink: 'ffc0cb',
  11648. plum: 'dda0dd',
  11649. powderblue: 'b0e0e6',
  11650. purple: '800080',
  11651. rebeccapurple: '663399',
  11652. red: 'ff0000',
  11653. rosybrown: 'bc8f8f',
  11654. royalblue: '4169e1',
  11655. saddlebrown: '8b4513',
  11656. salmon: 'fa8072',
  11657. sandybrown: 'f4a460',
  11658. seagreen: '2e8b57',
  11659. seashell: 'fff5ee',
  11660. sienna: 'a0522d',
  11661. silver: 'c0c0c0',
  11662. skyblue: '87ceeb',
  11663. slateblue: '6a5acd',
  11664. slategray: '708090',
  11665. snow: 'fffafa',
  11666. springgreen: '00ff7f',
  11667. steelblue: '4682b4',
  11668. tan: 'd2b48c',
  11669. teal: '008080',
  11670. thistle: 'd8bfd8',
  11671. tomato: 'ff6347',
  11672. turquoise: '40e0d0',
  11673. violet: 'ee82ee',
  11674. violetred: 'd02090',
  11675. wheat: 'f5deb3',
  11676. white: 'ffffff',
  11677. whitesmoke: 'f5f5f5',
  11678. yellow: 'ffff00',
  11679. yellowgreen: '9acd32'
  11680. };
  11681. color_string = simple_colors[color_string] || color_string;
  11682. // emd of simple type-in colors
  11683. // array of color definition objects
  11684. var color_defs = [
  11685. {
  11686. re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
  11687. example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
  11688. process: function (bits){
  11689. return [
  11690. parseInt(bits[1]),
  11691. parseInt(bits[2]),
  11692. parseInt(bits[3]),
  11693. parseFloat(bits[4])
  11694. ];
  11695. }
  11696. },
  11697. {
  11698. re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
  11699. example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
  11700. process: function (bits){
  11701. return [
  11702. parseInt(bits[1]),
  11703. parseInt(bits[2]),
  11704. parseInt(bits[3])
  11705. ];
  11706. }
  11707. },
  11708. {
  11709. re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  11710. example: ['#00ff00', '336699'],
  11711. process: function (bits){
  11712. return [
  11713. parseInt(bits[1], 16),
  11714. parseInt(bits[2], 16),
  11715. parseInt(bits[3], 16)
  11716. ];
  11717. }
  11718. },
  11719. {
  11720. re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  11721. example: ['#fb0', 'f0f'],
  11722. process: function (bits){
  11723. return [
  11724. parseInt(bits[1] + bits[1], 16),
  11725. parseInt(bits[2] + bits[2], 16),
  11726. parseInt(bits[3] + bits[3], 16)
  11727. ];
  11728. }
  11729. }
  11730. ];
  11731. // search through the definitions to find a match
  11732. for (var i = 0; i < color_defs.length; i++) {
  11733. var re = color_defs[i].re;
  11734. var processor = color_defs[i].process;
  11735. var bits = re.exec(color_string);
  11736. if (bits) {
  11737. var channels = processor(bits);
  11738. this.r = channels[0];
  11739. this.g = channels[1];
  11740. this.b = channels[2];
  11741. if (channels.length > 3) {
  11742. this.alpha = channels[3];
  11743. }
  11744. this.ok = true;
  11745. }
  11746. }
  11747. // validate/cleanup values
  11748. this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
  11749. this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
  11750. this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
  11751. this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);
  11752. // some getters
  11753. this.toRGB = function () {
  11754. return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
  11755. }
  11756. this.toRGBA = function () {
  11757. return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
  11758. }
  11759. this.toHex = function () {
  11760. var r = this.r.toString(16);
  11761. var g = this.g.toString(16);
  11762. var b = this.b.toString(16);
  11763. if (r.length == 1) r = '0' + r;
  11764. if (g.length == 1) g = '0' + g;
  11765. if (b.length == 1) b = '0' + b;
  11766. return '#' + r + g + b;
  11767. }
  11768. // help
  11769. this.getHelpXML = function () {
  11770. var examples = new Array();
  11771. // add regexps
  11772. for (var i = 0; i < color_defs.length; i++) {
  11773. var example = color_defs[i].example;
  11774. for (var j = 0; j < example.length; j++) {
  11775. examples[examples.length] = example[j];
  11776. }
  11777. }
  11778. // add type-in colors
  11779. for (var sc in simple_colors) {
  11780. examples[examples.length] = sc;
  11781. }
  11782. var xml = document.createElement('ul');
  11783. xml.setAttribute('id', 'rgbcolor-examples');
  11784. for (var i = 0; i < examples.length; i++) {
  11785. try {
  11786. var list_item = document.createElement('li');
  11787. var list_color = new RGBColor(examples[i]);
  11788. var example_div = document.createElement('div');
  11789. example_div.style.cssText =
  11790. 'margin: 3px; '
  11791. + 'border: 1px solid black; '
  11792. + 'background:' + list_color.toHex() + '; '
  11793. + 'color:' + list_color.toHex()
  11794. ;
  11795. example_div.appendChild(document.createTextNode('test'));
  11796. var list_item_value = document.createTextNode(
  11797. ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
  11798. );
  11799. list_item.appendChild(example_div);
  11800. list_item.appendChild(list_item_value);
  11801. xml.appendChild(list_item);
  11802. } catch(e){}
  11803. }
  11804. return xml;
  11805. }
  11806. }
  11807. /***/ }),
  11808. /***/ "./node_modules/stackblur-canvas/dist/stackblur-es.js":
  11809. /*!************************************************************!*\
  11810. !*** ./node_modules/stackblur-canvas/dist/stackblur-es.js ***!
  11811. \************************************************************/
  11812. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11813. "use strict";
  11814. __webpack_require__.r(__webpack_exports__);
  11815. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11816. /* harmony export */ "BlurStack": () => (/* binding */ BlurStack),
  11817. /* harmony export */ "canvasRGB": () => (/* binding */ processCanvasRGB),
  11818. /* harmony export */ "canvasRGBA": () => (/* binding */ processCanvasRGBA),
  11819. /* harmony export */ "image": () => (/* binding */ processImage),
  11820. /* harmony export */ "imageDataRGB": () => (/* binding */ processImageDataRGB),
  11821. /* harmony export */ "imageDataRGBA": () => (/* binding */ processImageDataRGBA)
  11822. /* harmony export */ });
  11823. function _typeof(obj) {
  11824. "@babel/helpers - typeof";
  11825. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  11826. _typeof = function (obj) {
  11827. return typeof obj;
  11828. };
  11829. } else {
  11830. _typeof = function (obj) {
  11831. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  11832. };
  11833. }
  11834. return _typeof(obj);
  11835. }
  11836. function _classCallCheck(instance, Constructor) {
  11837. if (!(instance instanceof Constructor)) {
  11838. throw new TypeError("Cannot call a class as a function");
  11839. }
  11840. }
  11841. /* eslint-disable no-bitwise -- used for calculations */
  11842. /* eslint-disable unicorn/prefer-query-selector -- aiming at
  11843. backward-compatibility */
  11844. /**
  11845. * StackBlur - a fast almost Gaussian Blur For Canvas
  11846. *
  11847. * In case you find this class useful - especially in commercial projects -
  11848. * I am not totally unhappy for a small donation to my PayPal account
  11849. * mario@quasimondo.de
  11850. *
  11851. * Or support me on flattr:
  11852. * {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.
  11853. *
  11854. * @module StackBlur
  11855. * @author Mario Klingemann
  11856. * Contact: mario@quasimondo.com
  11857. * Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}
  11858. * Twitter: @quasimondo
  11859. *
  11860. * @copyright (c) 2010 Mario Klingemann
  11861. *
  11862. * Permission is hereby granted, free of charge, to any person
  11863. * obtaining a copy of this software and associated documentation
  11864. * files (the "Software"), to deal in the Software without
  11865. * restriction, including without limitation the rights to use,
  11866. * copy, modify, merge, publish, distribute, sublicense, and/or sell
  11867. * copies of the Software, and to permit persons to whom the
  11868. * Software is furnished to do so, subject to the following
  11869. * conditions:
  11870. *
  11871. * The above copyright notice and this permission notice shall be
  11872. * included in all copies or substantial portions of the Software.
  11873. *
  11874. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  11875. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  11876. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  11877. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  11878. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  11879. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  11880. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  11881. * OTHER DEALINGS IN THE SOFTWARE.
  11882. */
  11883. 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];
  11884. 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];
  11885. /**
  11886. * @param {string|HTMLImageElement} img
  11887. * @param {string|HTMLCanvasElement} canvas
  11888. * @param {Float} radius
  11889. * @param {boolean} blurAlphaChannel
  11890. * @param {boolean} useOffset
  11891. * @param {boolean} skipStyles
  11892. * @returns {undefined}
  11893. */
  11894. function processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {
  11895. if (typeof img === 'string') {
  11896. img = document.getElementById(img);
  11897. }
  11898. if (!img || !('naturalWidth' in img)) {
  11899. return;
  11900. }
  11901. var dimensionType = useOffset ? 'offset' : 'natural';
  11902. var w = img[dimensionType + 'Width'];
  11903. var h = img[dimensionType + 'Height'];
  11904. if (typeof canvas === 'string') {
  11905. canvas = document.getElementById(canvas);
  11906. }
  11907. if (!canvas || !('getContext' in canvas)) {
  11908. return;
  11909. }
  11910. if (!skipStyles) {
  11911. canvas.style.width = w + 'px';
  11912. canvas.style.height = h + 'px';
  11913. }
  11914. canvas.width = w;
  11915. canvas.height = h;
  11916. var context = canvas.getContext('2d');
  11917. context.clearRect(0, 0, w, h);
  11918. context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);
  11919. if (isNaN(radius) || radius < 1) {
  11920. return;
  11921. }
  11922. if (blurAlphaChannel) {
  11923. processCanvasRGBA(canvas, 0, 0, w, h, radius);
  11924. } else {
  11925. processCanvasRGB(canvas, 0, 0, w, h, radius);
  11926. }
  11927. }
  11928. /**
  11929. * @param {string|HTMLCanvasElement} canvas
  11930. * @param {Integer} topX
  11931. * @param {Integer} topY
  11932. * @param {Integer} width
  11933. * @param {Integer} height
  11934. * @throws {Error|TypeError}
  11935. * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}
  11936. */
  11937. function getImageDataFromCanvas(canvas, topX, topY, width, height) {
  11938. if (typeof canvas === 'string') {
  11939. canvas = document.getElementById(canvas);
  11940. }
  11941. if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {
  11942. throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');
  11943. }
  11944. var context = canvas.getContext('2d');
  11945. try {
  11946. return context.getImageData(topX, topY, width, height);
  11947. } catch (e) {
  11948. throw new Error('unable to access image data: ' + e);
  11949. }
  11950. }
  11951. /**
  11952. * @param {HTMLCanvasElement} canvas
  11953. * @param {Integer} topX
  11954. * @param {Integer} topY
  11955. * @param {Integer} width
  11956. * @param {Integer} height
  11957. * @param {Float} radius
  11958. * @returns {undefined}
  11959. */
  11960. function processCanvasRGBA(canvas, topX, topY, width, height, radius) {
  11961. if (isNaN(radius) || radius < 1) {
  11962. return;
  11963. }
  11964. radius |= 0;
  11965. var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
  11966. imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);
  11967. canvas.getContext('2d').putImageData(imageData, topX, topY);
  11968. }
  11969. /**
  11970. * @param {ImageData} imageData
  11971. * @param {Integer} topX
  11972. * @param {Integer} topY
  11973. * @param {Integer} width
  11974. * @param {Integer} height
  11975. * @param {Float} radius
  11976. * @returns {ImageData}
  11977. */
  11978. function processImageDataRGBA(imageData, topX, topY, width, height, radius) {
  11979. var pixels = imageData.data;
  11980. var div = 2 * radius + 1; // const w4 = width << 2;
  11981. var widthMinus1 = width - 1;
  11982. var heightMinus1 = height - 1;
  11983. var radiusPlus1 = radius + 1;
  11984. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  11985. var stackStart = new BlurStack();
  11986. var stack = stackStart;
  11987. var stackEnd;
  11988. for (var i = 1; i < div; i++) {
  11989. stack = stack.next = new BlurStack();
  11990. if (i === radiusPlus1) {
  11991. stackEnd = stack;
  11992. }
  11993. }
  11994. stack.next = stackStart;
  11995. var stackIn = null,
  11996. stackOut = null,
  11997. yw = 0,
  11998. yi = 0;
  11999. var mulSum = mulTable[radius];
  12000. var shgSum = shgTable[radius];
  12001. for (var y = 0; y < height; y++) {
  12002. stack = stackStart;
  12003. var pr = pixels[yi],
  12004. pg = pixels[yi + 1],
  12005. pb = pixels[yi + 2],
  12006. pa = pixels[yi + 3];
  12007. for (var _i = 0; _i < radiusPlus1; _i++) {
  12008. stack.r = pr;
  12009. stack.g = pg;
  12010. stack.b = pb;
  12011. stack.a = pa;
  12012. stack = stack.next;
  12013. }
  12014. var rInSum = 0,
  12015. gInSum = 0,
  12016. bInSum = 0,
  12017. aInSum = 0,
  12018. rOutSum = radiusPlus1 * pr,
  12019. gOutSum = radiusPlus1 * pg,
  12020. bOutSum = radiusPlus1 * pb,
  12021. aOutSum = radiusPlus1 * pa,
  12022. rSum = sumFactor * pr,
  12023. gSum = sumFactor * pg,
  12024. bSum = sumFactor * pb,
  12025. aSum = sumFactor * pa;
  12026. for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {
  12027. var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);
  12028. var r = pixels[p],
  12029. g = pixels[p + 1],
  12030. b = pixels[p + 2],
  12031. a = pixels[p + 3];
  12032. var rbs = radiusPlus1 - _i2;
  12033. rSum += (stack.r = r) * rbs;
  12034. gSum += (stack.g = g) * rbs;
  12035. bSum += (stack.b = b) * rbs;
  12036. aSum += (stack.a = a) * rbs;
  12037. rInSum += r;
  12038. gInSum += g;
  12039. bInSum += b;
  12040. aInSum += a;
  12041. stack = stack.next;
  12042. }
  12043. stackIn = stackStart;
  12044. stackOut = stackEnd;
  12045. for (var x = 0; x < width; x++) {
  12046. var paInitial = aSum * mulSum >> shgSum;
  12047. pixels[yi + 3] = paInitial;
  12048. if (paInitial !== 0) {
  12049. var _a2 = 255 / paInitial;
  12050. pixels[yi] = (rSum * mulSum >> shgSum) * _a2;
  12051. pixels[yi + 1] = (gSum * mulSum >> shgSum) * _a2;
  12052. pixels[yi + 2] = (bSum * mulSum >> shgSum) * _a2;
  12053. } else {
  12054. pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;
  12055. }
  12056. rSum -= rOutSum;
  12057. gSum -= gOutSum;
  12058. bSum -= bOutSum;
  12059. aSum -= aOutSum;
  12060. rOutSum -= stackIn.r;
  12061. gOutSum -= stackIn.g;
  12062. bOutSum -= stackIn.b;
  12063. aOutSum -= stackIn.a;
  12064. var _p = x + radius + 1;
  12065. _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;
  12066. rInSum += stackIn.r = pixels[_p];
  12067. gInSum += stackIn.g = pixels[_p + 1];
  12068. bInSum += stackIn.b = pixels[_p + 2];
  12069. aInSum += stackIn.a = pixels[_p + 3];
  12070. rSum += rInSum;
  12071. gSum += gInSum;
  12072. bSum += bInSum;
  12073. aSum += aInSum;
  12074. stackIn = stackIn.next;
  12075. var _stackOut = stackOut,
  12076. _r = _stackOut.r,
  12077. _g = _stackOut.g,
  12078. _b = _stackOut.b,
  12079. _a = _stackOut.a;
  12080. rOutSum += _r;
  12081. gOutSum += _g;
  12082. bOutSum += _b;
  12083. aOutSum += _a;
  12084. rInSum -= _r;
  12085. gInSum -= _g;
  12086. bInSum -= _b;
  12087. aInSum -= _a;
  12088. stackOut = stackOut.next;
  12089. yi += 4;
  12090. }
  12091. yw += width;
  12092. }
  12093. for (var _x = 0; _x < width; _x++) {
  12094. yi = _x << 2;
  12095. var _pr = pixels[yi],
  12096. _pg = pixels[yi + 1],
  12097. _pb = pixels[yi + 2],
  12098. _pa = pixels[yi + 3],
  12099. _rOutSum = radiusPlus1 * _pr,
  12100. _gOutSum = radiusPlus1 * _pg,
  12101. _bOutSum = radiusPlus1 * _pb,
  12102. _aOutSum = radiusPlus1 * _pa,
  12103. _rSum = sumFactor * _pr,
  12104. _gSum = sumFactor * _pg,
  12105. _bSum = sumFactor * _pb,
  12106. _aSum = sumFactor * _pa;
  12107. stack = stackStart;
  12108. for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {
  12109. stack.r = _pr;
  12110. stack.g = _pg;
  12111. stack.b = _pb;
  12112. stack.a = _pa;
  12113. stack = stack.next;
  12114. }
  12115. var yp = width;
  12116. var _gInSum = 0,
  12117. _bInSum = 0,
  12118. _aInSum = 0,
  12119. _rInSum = 0;
  12120. for (var _i4 = 1; _i4 <= radius; _i4++) {
  12121. yi = yp + _x << 2;
  12122. var _rbs = radiusPlus1 - _i4;
  12123. _rSum += (stack.r = _pr = pixels[yi]) * _rbs;
  12124. _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;
  12125. _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;
  12126. _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;
  12127. _rInSum += _pr;
  12128. _gInSum += _pg;
  12129. _bInSum += _pb;
  12130. _aInSum += _pa;
  12131. stack = stack.next;
  12132. if (_i4 < heightMinus1) {
  12133. yp += width;
  12134. }
  12135. }
  12136. yi = _x;
  12137. stackIn = stackStart;
  12138. stackOut = stackEnd;
  12139. for (var _y = 0; _y < height; _y++) {
  12140. var _p2 = yi << 2;
  12141. pixels[_p2 + 3] = _pa = _aSum * mulSum >> shgSum;
  12142. if (_pa > 0) {
  12143. _pa = 255 / _pa;
  12144. pixels[_p2] = (_rSum * mulSum >> shgSum) * _pa;
  12145. pixels[_p2 + 1] = (_gSum * mulSum >> shgSum) * _pa;
  12146. pixels[_p2 + 2] = (_bSum * mulSum >> shgSum) * _pa;
  12147. } else {
  12148. pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;
  12149. }
  12150. _rSum -= _rOutSum;
  12151. _gSum -= _gOutSum;
  12152. _bSum -= _bOutSum;
  12153. _aSum -= _aOutSum;
  12154. _rOutSum -= stackIn.r;
  12155. _gOutSum -= stackIn.g;
  12156. _bOutSum -= stackIn.b;
  12157. _aOutSum -= stackIn.a;
  12158. _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;
  12159. _rSum += _rInSum += stackIn.r = pixels[_p2];
  12160. _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];
  12161. _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];
  12162. _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];
  12163. stackIn = stackIn.next;
  12164. _rOutSum += _pr = stackOut.r;
  12165. _gOutSum += _pg = stackOut.g;
  12166. _bOutSum += _pb = stackOut.b;
  12167. _aOutSum += _pa = stackOut.a;
  12168. _rInSum -= _pr;
  12169. _gInSum -= _pg;
  12170. _bInSum -= _pb;
  12171. _aInSum -= _pa;
  12172. stackOut = stackOut.next;
  12173. yi += width;
  12174. }
  12175. }
  12176. return imageData;
  12177. }
  12178. /**
  12179. * @param {HTMLCanvasElement} canvas
  12180. * @param {Integer} topX
  12181. * @param {Integer} topY
  12182. * @param {Integer} width
  12183. * @param {Integer} height
  12184. * @param {Float} radius
  12185. * @returns {undefined}
  12186. */
  12187. function processCanvasRGB(canvas, topX, topY, width, height, radius) {
  12188. if (isNaN(radius) || radius < 1) {
  12189. return;
  12190. }
  12191. radius |= 0;
  12192. var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);
  12193. imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);
  12194. canvas.getContext('2d').putImageData(imageData, topX, topY);
  12195. }
  12196. /**
  12197. * @param {ImageData} imageData
  12198. * @param {Integer} topX
  12199. * @param {Integer} topY
  12200. * @param {Integer} width
  12201. * @param {Integer} height
  12202. * @param {Float} radius
  12203. * @returns {ImageData}
  12204. */
  12205. function processImageDataRGB(imageData, topX, topY, width, height, radius) {
  12206. var pixels = imageData.data;
  12207. var div = 2 * radius + 1; // const w4 = width << 2;
  12208. var widthMinus1 = width - 1;
  12209. var heightMinus1 = height - 1;
  12210. var radiusPlus1 = radius + 1;
  12211. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  12212. var stackStart = new BlurStack();
  12213. var stack = stackStart;
  12214. var stackEnd;
  12215. for (var i = 1; i < div; i++) {
  12216. stack = stack.next = new BlurStack();
  12217. if (i === radiusPlus1) {
  12218. stackEnd = stack;
  12219. }
  12220. }
  12221. stack.next = stackStart;
  12222. var stackIn = null;
  12223. var stackOut = null;
  12224. var mulSum = mulTable[radius];
  12225. var shgSum = shgTable[radius];
  12226. var p, rbs;
  12227. var yw = 0,
  12228. yi = 0;
  12229. for (var y = 0; y < height; y++) {
  12230. var pr = pixels[yi],
  12231. pg = pixels[yi + 1],
  12232. pb = pixels[yi + 2],
  12233. rOutSum = radiusPlus1 * pr,
  12234. gOutSum = radiusPlus1 * pg,
  12235. bOutSum = radiusPlus1 * pb,
  12236. rSum = sumFactor * pr,
  12237. gSum = sumFactor * pg,
  12238. bSum = sumFactor * pb;
  12239. stack = stackStart;
  12240. for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {
  12241. stack.r = pr;
  12242. stack.g = pg;
  12243. stack.b = pb;
  12244. stack = stack.next;
  12245. }
  12246. var rInSum = 0,
  12247. gInSum = 0,
  12248. bInSum = 0;
  12249. for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {
  12250. p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);
  12251. rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);
  12252. gSum += (stack.g = pg = pixels[p + 1]) * rbs;
  12253. bSum += (stack.b = pb = pixels[p + 2]) * rbs;
  12254. rInSum += pr;
  12255. gInSum += pg;
  12256. bInSum += pb;
  12257. stack = stack.next;
  12258. }
  12259. stackIn = stackStart;
  12260. stackOut = stackEnd;
  12261. for (var x = 0; x < width; x++) {
  12262. pixels[yi] = rSum * mulSum >> shgSum;
  12263. pixels[yi + 1] = gSum * mulSum >> shgSum;
  12264. pixels[yi + 2] = bSum * mulSum >> shgSum;
  12265. rSum -= rOutSum;
  12266. gSum -= gOutSum;
  12267. bSum -= bOutSum;
  12268. rOutSum -= stackIn.r;
  12269. gOutSum -= stackIn.g;
  12270. bOutSum -= stackIn.b;
  12271. p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;
  12272. rInSum += stackIn.r = pixels[p];
  12273. gInSum += stackIn.g = pixels[p + 1];
  12274. bInSum += stackIn.b = pixels[p + 2];
  12275. rSum += rInSum;
  12276. gSum += gInSum;
  12277. bSum += bInSum;
  12278. stackIn = stackIn.next;
  12279. rOutSum += pr = stackOut.r;
  12280. gOutSum += pg = stackOut.g;
  12281. bOutSum += pb = stackOut.b;
  12282. rInSum -= pr;
  12283. gInSum -= pg;
  12284. bInSum -= pb;
  12285. stackOut = stackOut.next;
  12286. yi += 4;
  12287. }
  12288. yw += width;
  12289. }
  12290. for (var _x2 = 0; _x2 < width; _x2++) {
  12291. yi = _x2 << 2;
  12292. var _pr2 = pixels[yi],
  12293. _pg2 = pixels[yi + 1],
  12294. _pb2 = pixels[yi + 2],
  12295. _rOutSum2 = radiusPlus1 * _pr2,
  12296. _gOutSum2 = radiusPlus1 * _pg2,
  12297. _bOutSum2 = radiusPlus1 * _pb2,
  12298. _rSum2 = sumFactor * _pr2,
  12299. _gSum2 = sumFactor * _pg2,
  12300. _bSum2 = sumFactor * _pb2;
  12301. stack = stackStart;
  12302. for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {
  12303. stack.r = _pr2;
  12304. stack.g = _pg2;
  12305. stack.b = _pb2;
  12306. stack = stack.next;
  12307. }
  12308. var _rInSum2 = 0,
  12309. _gInSum2 = 0,
  12310. _bInSum2 = 0;
  12311. for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {
  12312. yi = yp + _x2 << 2;
  12313. _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);
  12314. _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;
  12315. _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;
  12316. _rInSum2 += _pr2;
  12317. _gInSum2 += _pg2;
  12318. _bInSum2 += _pb2;
  12319. stack = stack.next;
  12320. if (_i8 < heightMinus1) {
  12321. yp += width;
  12322. }
  12323. }
  12324. yi = _x2;
  12325. stackIn = stackStart;
  12326. stackOut = stackEnd;
  12327. for (var _y2 = 0; _y2 < height; _y2++) {
  12328. p = yi << 2;
  12329. pixels[p] = _rSum2 * mulSum >> shgSum;
  12330. pixels[p + 1] = _gSum2 * mulSum >> shgSum;
  12331. pixels[p + 2] = _bSum2 * mulSum >> shgSum;
  12332. _rSum2 -= _rOutSum2;
  12333. _gSum2 -= _gOutSum2;
  12334. _bSum2 -= _bOutSum2;
  12335. _rOutSum2 -= stackIn.r;
  12336. _gOutSum2 -= stackIn.g;
  12337. _bOutSum2 -= stackIn.b;
  12338. p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;
  12339. _rSum2 += _rInSum2 += stackIn.r = pixels[p];
  12340. _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];
  12341. _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];
  12342. stackIn = stackIn.next;
  12343. _rOutSum2 += _pr2 = stackOut.r;
  12344. _gOutSum2 += _pg2 = stackOut.g;
  12345. _bOutSum2 += _pb2 = stackOut.b;
  12346. _rInSum2 -= _pr2;
  12347. _gInSum2 -= _pg2;
  12348. _bInSum2 -= _pb2;
  12349. stackOut = stackOut.next;
  12350. yi += width;
  12351. }
  12352. }
  12353. return imageData;
  12354. }
  12355. /**
  12356. *
  12357. */
  12358. var BlurStack =
  12359. /**
  12360. * Set properties.
  12361. */
  12362. function BlurStack() {
  12363. _classCallCheck(this, BlurStack);
  12364. this.r = 0;
  12365. this.g = 0;
  12366. this.b = 0;
  12367. this.a = 0;
  12368. this.next = null;
  12369. };
  12370. /***/ })
  12371. }]);
  12372. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvQGFtY2hhcnRzL2FtY2hhcnRzNC8uaW50ZXJuYWwvY2FudmcvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL2FycmF5TGlrZVRvQXJyYXkuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lL2hlbHBlcnMvZXNtL2FycmF5V2l0aEhvbGVzLmpzIiwid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS9oZWxwZXJzL2VzbS9hcnJheVdpdGhvdXRIb2xlcy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUvaGVscGVycy9lc20vYXNzZXJ0VGhpc0luaXRpYWxpemVkLmpzIiwid2VicGFjazovLy8uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS9oZWxwZXJzL2Vz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uIFByb21pc2VJbXBsLnJlc29sdmUodmFsdWUpLnRoZW4oZnVuY3Rpb24gKHVud3JhcHBlZCkge1xuICAgICAgICAgICAgLy8gV2hlbiBhIHlpZWxkZWQgUHJvbWlzZSBpcyByZXNvbHZlZCwgaXRzIGZpbmFsIHZhbHVlIGJlY29tZXNcbiAgICAgICAgICAgIC8vIHRoZSAudmFsdWUgb2YgdGhlIFByb21pc2U8e3ZhbHVlLGRvbmV9PiByZXN1bHQgZm9yIHRoZVxuICAgICAgICAgICAgLy8gY3VycmVudCBpdGVyYXRpb24uXG4gICAgICAgICAgICByZXN1bHQudmFsdWUgPSB1bndyYXBwZWQ7XG4gICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgICAgfSwgZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAvLyBJZiBhIHJlamVjdGVkIFByb21pc2Ugd2FzIHlpZWxkZWQsIHRocm93IHRoZSByZWplY3Rpb24gYmFja1xuICAgICAgICAgICAgLy8gaW50byB0aGUgYXN5bmMgZ2VuZXJhdG9yIGZ1bmN0aW9uIHNvIGl0IGNhbiBiZSBoYW5kbGVkIHRoZXJlLlxuICAgICAgICAgICAgcmV0dXJuIGludm9rZShcInRocm93XCIsIGVycm9yLCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciBwcmV2aW91c1Byb21pc2U7XG5cbiAgICAgIGZ1bmN0aW9uIGVucXVldWUobWV0aG9kLCBhcmcpIHtcbiAgICAgICAgZnVuY3Rpb24gY2FsbEludm9rZVdpdGhNZXRob2RBbmRBcmcoKSB7XG4gICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlSW1wbChmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICBpbnZva2UobWV0aG9kLCBhcmcsIHJlc29sdmUsIHJlamVjdCk7XG4gICAgICAgICAgfSk7XG4gICAgIC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AgLy8gZnVuY3Rpb24uc2VudCBpbXBsZW1lbnRhdGlvbi5cbiAgICAgICAgICAgIGNvbnRleHQuc2VudCA9IGNvbnRleHQuX3NlbnQgPSBjb250ZXh0LmFyZztcbiAgICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihjb250ZXh0LmFyZyk7XG4gICAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG4gICAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgICBzdGF0ZSA9IGNvbnRleHQuZG9uZSA/IEdlblN0YXRlQ29tcGxldGVkIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAg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ldGhvZCBmcm9tXG4gICAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwidGhyb3dcIjtcbiAgICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBUeXBlRXJyb3IoXCJUaGUgaXRlcmF0b3IgZG9lcyBub3QgcHJvdmlkZSBhICd0aHJvdycgbWV0aG9kXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICAgIGNvbnRleHQuZGVsZWdhdGUgPSBudWxsO1xuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgdmFyIGluZm8gPSByZWNvcmQuYXJnO1xuXG4gICAgICBpZiAoIWluZm8pIHtcbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcIml0ZXJhdG9yIHJlc3VsdCBpcyBub3QgYW4gb2JqZWN0XCIpO1xuICAgICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG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ICAgICAgbmV4dC52YWx1ZSA9IGl0ZXJhYmxlW2ldO1xuICAgICAgICAgICAgICAgIG5leHQuZG9uZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQkMTtcbiAgICAgICAgICAgIG5leHQuZG9uZSA9IHRydWU7XG4gICAgICAgICAgICByZXR1cm4gbmV4dDtcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgcmV0dXJuIG5leHQubmV4dCA9IG5leHQ7XG4gICAgICAgIH1cbiAgICAgIH0gLy8gUmV0dXJuIGFuIGl0ZXJhdG9yIHdpdGggbm8gdmFsdWVzLlxuXG5cbiAgICAgIHJldHVybiB7XG4gICAgICAgIG5leHQ6IGRvbmVSZXN1bHRcbiAgICAgIH07XG4gICAgfVxuXG4gICAgZXhwb3J0cy52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgICBmdW5jdGlvbiBkb25lUmVzdWx0KCkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgdmFsdWU6IHVuZGVmaW5lZCQxLFxuICAgICAgICBkb25lOiB0cnVlXG4gICAgICB9O1xuICAgIH1cblxuICAgIENvbnRleHQucHJvdG90eXBlID0ge1xuICAgICAgY29uc3RydWN0b3I6IENvbnRleHQsXG4gICAgICByZXNldDogZnVuY3Rpb24gKHNraXBUZW1wUmVzZXQpIHtcbiAgICAgICAgdGhpcy5wcmV2ID0gMDtcbiAgICAgICAgdGhpcy5uZXh0ID0gMDsgLy8gUmVzZXR0aW5nIGNvbnRleHQuX3NlbnQgZm9yIGxlZ2FjeSBzdXBwb3J0IG9mIEJhYmVsJ3NcbiAgICAgICAgLy8gZnVuY3Rpb24uc2VudCBpbXBsZW1lbnRhdGlvbi5cblxuICAgICAgICB0aGlzLnNlbnQgPSB0aGlzLl9zZW50ID0gdW5kZWZpbmVkJDE7XG4gICA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mRvbmUpIHtcbiAgICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG5cbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlKGxvYywgY2F1Z2h0KSB7XG4gICAgICAgICAgcmVjb3JkLnR5cGUgPSBcInRocm93XCI7XG4gICAgICAgICAgcmVjb3JkLmFyZyA9IGV4Y2VwdGlvbjtcbiAgICAgICAgICBjb250ZXh0Lm5leHQgPSBsb2M7XG5cbiAgICAgICAgICBpZiAoY2F1Z2h0KSB7XG4gICAgICAgICAgICAvLyBJZiB0aGUgZGlzcGF0Y2hlZCBleGNlcHRpb24gd2FzIGNhdWdodCBieSBhIGNhdGNoIGJsb2NrLFxuICAgICAgICAgICAgLy8gdGhlbiBsZXQgdGhhdCBjYXRjaCBibG9jayBoYW5kbGUgdGhlIGV4Y2VwdGlvbiBub3JtYWxseS5cbiAgICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgICBjb250ZXh0LmFyZyA9IHVuZGVmaW5lZCQxO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiAhIWNhdWdodDtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgICAgdmFyIHJlY29yZCA9IGVudHJ5LmNvbXBsZXRpb247XG5cbiAgICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSBcInJvb3RcIikge1xuICAgICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAgIC8vIGl0LCBzbyBzZXQgdGhlIGNvbXBsZXRpb24gdmFsdWUgb2YgdGhlIGVudGlyZSBmdW5jdGlvbiB0b1xuICAgICAgICAgICAgLy8gdGhyb3cgdGhlIGV4Y2VwdGlvbi5cbiAgICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYpIHtcbiAgICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgICAgdmFyIGhhc0ZpbmFsbHkgPSBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpO1xuXG4gICAgICAgICAgICBpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgYWJydXB0OiBmdW5jdGlvbiAodHlwZSwgYXJnKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG5cbiAgICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJiBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmaW5hbGx5RW50cnkgJiYgKHR5cGUgPT09IFwiYnJlYWtcIiB8fCB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgICAgfSxcbiAgICAgIGNvbXBsZXRlOiBmdW5jdGlvbiAocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIHRocm93IHJlY29yZC5hcmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwiYnJlYWtcIiB8fCByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gcmVjb3JkLmFyZztcbiAgICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgICAgdGhpcy5uZXh0ID0gXCJlbmRcIjtcbiAgICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9LFxuICAgICAgZmluaXNoOiBmdW5jdGlvbiAoZmluYWxseUxvYykge1xuICAgICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuXG4gICAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgIHRoaXMuY29tcGxldGUoZW50cnkuY29tcGxldGlvbiwgZW50cnkuYWZ0ZXJMb2MpO1xuICAgICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBcImNhdGNoXCI6IGZ1bmN0aW9uICh0cnlMb2MpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcblxuICAgICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgICAgdmFyIHJlY29yZCA9IGVudHJ5LmNvbXBsZXRpb247XG5cbiAgICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICAgIHZhciB0aHJvd24gPSByZWNvcmQuYXJnO1xuICAgICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRocm93bjtcbiAgICAgICAgICB9XG4gICAgICAgIH0gLy8gVGhlIGNvbnRleHQuY2F0Y2ggbWV0aG9kIG11c3Qgb25seSBi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IHtcbiAgICAgICAgcG9pbnQueCArPSB3aW5kb3cuc2Nyb2xsWDtcbiAgICAgIH1cblxuICAgICAgaWYgKHdpbmRvdy5zY3JvbGxZKSB7XG4gICAgICAgIHBvaW50LnkgKz0gd2luZG93LnNjcm9sbFk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwb2ludDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwib25DbGlja1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBvbkNsaWNrKGV2dCkge1xuICAgICAgdmFyIF90aGlzJG1hcFhZID0gdGhpcy5tYXBYWSgoZXZ0IHx8IGV2ZW50KS5jbGllbnRYLCAoZXZ0IHx8IGV2ZW50KS5jbGllbnRZKSxcbiAgICAgICAgICB4ID0gX3RoaXMkbWFwWFkueCxcbiAgICAgICAgICB5ID0gX3RoaXMkbWFwWFkueTtcblxuICAgICAgdGhpcy5ldmVudHMucHVzaCh7XG4gICAgICAgIHR5cGU6ICdvbmNsaWNrJyxcbiAgICAgICAgeDogeCxcbiAgICAgICAgeTogeSxcbiAgICAgICAgcnVuOiBmdW5jdGlvbiBydW4oZXZlbnQpIHtcbiAgICAgICAgICBpZiAoZXZlbnQub25DbGljaykge1xuICAgICAgICAgICAgZXZlbnQub25DbGljaygpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcIm9uTW91c2VNb3ZlXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIG9uTW91c2VNb3ZlKGV2dCkge1xuICAgICAgdmFyIF90aGlzJG1hcFhZMiA9IHRoaXMubWFwWFkoKGV2dCB8fCBldmVudCkuY2xpZW50WCwgKGV2dCB8fCBldmVudCkuY2xpZW50WSksXG4gICAgICAgICAgeCA9IF90aGlzJG1hcFhZMi54LFxuICAgICAgICAgIHkgPSBfdGhpcyRtYXBYWTIueTtcblxuICAgICAgdGhpcy5ldmVudHMucHVzaCh7XG4gICAgICAg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ICAgICAgICAgICBzd2l0Y2ggKF9jb250ZXh0LnByZXYgPSBfY29udGV4dC5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBpZiAoIS9ePC8udGVzdChyZXNvdXJjZSkpIHtcbiAgICAgICAgICAgICAgICAgIF9jb250ZXh0Lm5leHQgPSAyO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdChcInJldHVyblwiLCB0aGlzLnBhcnNlRnJvbVN0cmluZyhyZXNvdXJjZSkpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIHRoaXMubG9hZChyZXNvdXJjZSkpO1xuXG4gICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlLCB0aGlzKTtcbiAgICAgIH0pKTtcblxuICAgICAgZnVuY3Rpb24gcGFyc2UoX3gpIHtcbiAgICAgICAgcmV0dXJuIF9wYXJzZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gcGFyc2U7XG4gICAgfSgpXG4gIH0sIHtcbiAgICBrZXk6IFwicGFyc2VGcm9tU3RyaW5nXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHBhcnNlRnJvbVN0cmluZyh4bWwpIHtcbiAgICAgIHZhciBwYXJzZXIgPSBuZXcgdGhpcy5ET01QYXJzZXIoKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY2hlY2tEb2N1bWVudChwYXJzZXIucGFyc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AgICAgICAgICAgIHJldHVybiB0aGlzLmZldGNoKHVybCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLm5leHQgPSA1O1xuICAgICAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCk7XG5cbiAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgIHhtbCA9IF9jb250ZXh0Mi5zZW50O1xuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dDIuYWJydXB0KFwicmV0dXJuXCIsIHRoaXMucGFyc2VGcm9tU3RyaW5nKHhtbCkpO1xuXG4gICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dDIuc3RvcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgX2NhbGxlZTIsIHRoaXMpO1xuICAgICAgfSkpO1xuXG4gICAgICBmdW5jdGlvbiBsb2FkKF94Mikge1xuICAgICAgICByZXR1cm4gX2xvYWQuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGxvYWQ7XG4gICAgfSgpXG4gIH1dKTtcblxuICByZXR1cm4gUGFyc2VyO1xufSgpO1xuXG52YXIgVHJhbnNsYXRlID0gLyojX19QVVJFX18qL2Z1bmN0aW9uICgpIHtcbiAgZnVuY3Rpb24gVHJhbnNsYXRlKF8sIHBvaW50KSB7XG4gICAgX2NsYXNzQ2FsbENoZWNrKHRoaXMsIFRyYW5zbGF0ZSk7XG5cbiAgICB0aGlzLnR5cGUgPSAndHJhbnNsYXRlJztcbiAgICB0aGlzLnBvaW50ID0gbnVsbDtcbiAgICB0aGlzLnBvaW50ID0gUG9pbnQucGFyc2UocG9pbnQpO1xu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IGZpbHRlci5hcHBseShjdHgsIHRoaXMpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnNldENvbnRleHQoY3R4KTtcbiAgICAgICAgdGhpcy5yZW5kZXJDaGlsZHJlbihjdHgpO1xuICAgICAgICB0aGlzLmNsZWFyQ29udGV4dChjdHgpO1xuICAgICAgfVxuXG4gICAgICBjdHgucmVzdG9yZSgpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJzZXRDb250ZXh0XCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHNldENvbnRleHQoXykge31cbiAgfSwge1xuICAgIGtleTogXCJhcHBseUVmZmVjdHNcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gYXBwbHlFZmZlY3RzKGN0eCkge1xuICAgICAgLy8gdHJhbnNmb3JtXG4gICAgICB2YXIgdHJhbnNmb3JtID0gVHJhbnNmb3JtLmZyb21FbGVtZW50KHRoaXMuZG9jdW1lbnQsIHRoaXMpO1xuXG4gICAgICBpZiAodHJhbnNmb3JtKSB7XG4gICAgICAgIHRyYW5zZm9ybS5hcHBseShjdHgpO1xuICAgICAgfSAvLyBjbGlwXG5cblxuICAgICAgdmFyIGNsaXBQYXRoU3R5bGVQcm9wID0gdGhpcy5nZXRTdHlsZSgnY2xpcC1wYXRoJywgZmFsc2UsIHRydWUpO1xuXG4gICAgICBpZiAoY2xpcFBhdGhTdHlsZVByb3AuaGFzVmFsdWUoKSkge1xuICAgICAgICB2YXIgY2xpcCA9IGNsaXBQYXRoU3R5bGVQcm9wLmdldERlZmluaXRpb24oKTtcblxuICAgICAgICBpZiAoY2xpcCkge1xuICAgICAgICAgIGNsaXAuYXBwbHkoY3R4KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJjbGVhckNvbnRleHRcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gY2xlYXJDb250ZXh0KF8pIHt9XG4gIH0sIHtcbiAgICB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W50ID0gJyc7XG4gICAgICB2YXIgZm9udFdlaWdodCA9ICcnO1xuICAgICAgdmFyIGZvbnRTaXplID0gJyc7XG4gICAgICB2YXIgZm9udEZhbWlseSA9ICcnO1xuICAgICAgdmFyIHBhcnRzID0gY29tcHJlc3NTcGFjZXMoZm9udCkudHJpbSgpLnNwbGl0KCcgJyk7XG4gICAgICB2YXIgc2V0ID0ge1xuICAgICAgICBmb250U2l6ZTogZmFsc2UsXG4gICAgICAgIGZvbnRTdHlsZTogZmFsc2UsXG4gICAgICAgIGZvbnRXZWlnaHQ6IGZhbHNlLFxuICAgICAgICBmb250VmFyaWFudDogZmFsc2VcbiAgICAgIH07XG4gICAgICBwYXJ0cy5mb3JFYWNoKGZ1bmN0aW9uIChwYXJ0KSB7XG4gICAgICAgIHN3aXRjaCAodHJ1ZSkge1xuICAgICAgICAgIGNhc2UgIXNldC5mb250U3R5bGUgJiYgRm9udC5zdHlsZXMuaW5jbHVkZXMocGFydCk6XG4gICAgICAgICAgICBpZiAocGFydCAhPT0gJ2luaGVyaXQnKSB7XG4gICAgICAgICAgICAgIGZvbnRTdHlsZSA9IHBhcnQ7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldC5mb250U3R5bGUgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICFzZXQuZm9udFZhcmlhbnQgJiYgRm9udC52YXJpYW50cy5pbmNsdWRlcyhwYXJ0KTpcbiAgICAgICAgICAgIGlmIChwYXJ0ICE9PSAnaW5oZXJpdCcpIHtcbiAgICAgICAgICAgICAgZm9udFZhcmlhbnQgPSBwYXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzZXQuZm9udFN0eWxlID0gdHJ1ZTtcbiAgICAgICAgICAgIHNldC5mb250VmFyaWFudCA9IHRydWU7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgIXNldC5mb250V2VpZ2h0ICYmIEZvbnQud2VpZ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biAgICB0aGlzLnkyID0geTI7XG4gICAgdGhpcy5hZGRQb2ludCh4MSwgeTEpO1xuICAgIHRoaXMuYWRkUG9pbnQoeDIsIHkyKTtcbiAgfVxuXG4gIF9jcmVhdGVDbGFzcyhCb3VuZGluZ0JveCwgW3tcbiAgICBrZXk6IFwiYWRkUG9pbnRcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gYWRkUG9pbnQoeCwgeSkge1xuICAgICAgaWYgKHR5cGVvZiB4ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICBpZiAoaXNOYU4odGhpcy54MSkgfHwgaXNOYU4odGhpcy54MikpIHtcbiAgICAgICAgICB0aGlzLngxID0geDtcbiAgICAgICAgICB0aGlzLngyID0geDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh4IDwgdGhpcy54MSkge1xuICAgICAgICAgIHRoaXMueDEgPSB4O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHggPiB0aGlzLngyKSB7XG4gICAgICAgICAgdGhpcy54MiA9IHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKHR5cGVvZiB5ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICBpZiAoaXNOYU4odGhpcy55MSkgfHwgaXNOYU4odGhpcy55MikpIHtcbiAgICAgICAgICB0aGlzLnkxID0geTtcbiAgICAgICAgICB0aGlzLnkyID0geTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh5IDwgdGhpcy55MSkge1xuICAgICAgICAgIHRoaXMueTEgPSB5O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHkgPiB0aGlzLnkyKSB7XG4gICAgICAgICAgdGhpcy55MiA9IHk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiYWRkWFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRYKHgpIHtcbiAgICAgIHRoaXMuYWRkUG9pbnQoeCwgbnVsbCk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImFkZFlcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gYWRkWSh5KSB7XG4gICAgICB0aGlzLmFkZFBvaW50KG51bGwsIHkpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJhZGRCb3VuZGluZ0JveFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBhZGRCb3VuZGluZ0JveChib3VuZGluZ0JveCkge1xuICAgICAgaWYgKCFib3VuZGluZ0JveCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciB4MSA9IGJvdW5kaW5nQm94LngxLFxuICAgICAgICAgIHkxID0gYm91bmRpbmdCb3gueTEsXG4gICAgICAgICAgeDIgPSBib3VuZGluZ0JveC54MixcbiAgICAgICAgICB5MiA9IGJvdW5kaW5nQm94LnkyO1xuICAgICAgdGhpcy5hZGRQb2ludCh4MSwgeTEpO1xuICAgICAgdGhpcy5hZGRQb2ludCh4MiwgeTIpO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJzdW1DdWJpY1wiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBzdW1DdWJpYyh0LCBwMCwgcDEsIHAyLCBwMykge1xuICAgICAgcmV0dXJuIE1hdGgucG93KDEgLSB0LCAzKSAqIHAwICsgMyAqIE1hdGgucG93KDEgLSB0LCAyKSAqIHQgKiBwMSArIDMgKiAoMSAtIHQpICogTWF0aC5wb3codCwgMikgKiBwMiArIE1hdGgucG93KHQsIDMpICogcDM7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcImJlemllckN1cnZlQWRkXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIGJlemllckN1cnZlQWRkKGZvclgsIHAwLCBwMSwgcDIsIHAzKSB7XG4gICAgICB2YXIgYiA9IDYgKiBwMCAtIDEyICogcDEgKyA2ICogcDI7XG4gICAgICB2YXIgYSA9IC0zICogcDAgKyA5ICogcDEgLSA5ICogcDIgKyAzICogcDM7XG4gICAgICB2YXIgYyA9IDMgKiBwMSAtIDMgKiBwMDtcblxuICAgICAgaWYgKGEgPT09IDApIHtcbiAgICAgICAgaWYgKGIgPT09IDApIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdCA9IC1jIC8gYjtcblxuICAgICAgICBpZiAoMCA8IHQgJiYgdCA8IDEpIHtcbiAgICAgICAgICBpZiAoZm9yWCkge1xuICAgICAgICAgICAgdGhpcy5hZGRYKHRoaXMuc3VtQ3ViaWModCwgcDAsIHAxLCBwMiwgcDMpKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5hZGRZKHRoaXMuc3VtQ3ViaWModCwgcDAsIHAxLCBwMiwgcDMpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciBiMmFjID0gTWF0aC5wb3coYiwgMikgLSA0ICogYyAqIGE7XG5cbiAgICAgIGlmIChiMmFjIDwgMCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhciB0MSA9ICgtYiArIE1hdGguc3FydChiMmFjKSkgLyAoMiAqIGEpO1xuXG4gICAgICBpZiAoMCA8IHQxICYmIHQxIDwgMSkge1xuICAgICAgICBpZiAoZm9yWCkge1xuICAgICAgICAgIHRoaXMuYWRkWCh0aGlzLnN1bUN1YmljKHQxLCBwMCwgcDEsIHAyLCBwMykpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuYWRkWSh0aGlzLnN1bUN1YmljKHQxLCBwMCwgcDEsIHAyLCBwMykpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciB0MiA9ICgtYiAtIE1hdGguc3FydChiMmFjKSkgLyAoMiAqIGEpO1xuXG4gICAgICBpZiAoMCA8IHQyICYmIHQyIDwgMSkge1xuICAgICAgICBpZiAoZm9yWCkge1xuICAgICAgICAgIHRoaXMuY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AgIHZhciBjdHhGb250ID0gRm9udC5wYXJzZShkb2N1bWVudC5jdHguZm9udCk7XG4gICAgICAgIHZhciBmb250U2l6ZSA9IHBhcmVudC5nZXRTdHlsZSgnZm9udC1zaXplJykuZ2V0TnVtYmVyKGN0eEZvbnQuZm9udFNpemUpO1xuICAgICAgICB2YXIgZm9udFN0eWxlID0gcGFyZW50LmdldFN0eWxlKCdmb250LXN0eWxlJykuZ2V0U3RyaW5nKGN0eEZvbnQuZm9udFN0eWxlKTtcbiAgICAgICAgdmFyIHNjYWxlID0gZm9udFNpemUgLyB1bml0c1BlckVtO1xuICAgICAgICB2YXIgdGV4dCA9IGN1c3RvbUZvbnQuaXNSVEwgPyByZW5kZXJUZXh0LnNwbGl0KCcnKS5yZXZlcnNlKCkuam9pbignJykgOiByZW5kZXJUZXh0O1xuICAgICAgICB2YXIgZHggPSB0b051bWJlcnMocGFyZW50LmdldEF0dHJpYnV0ZSgnZHgnKS5nZXRTdHJpbmcoKSk7XG4gICAgICAgIHZhciBsZW4gPSB0ZXh0Lmxlbmd0aDtcblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICAgICAgdmFyIGdseXBoID0gdGhpcy5nZXRHbHlwaChjdXN0b21Gb250LCB0ZXh0LCBpKTtcbiAgICAgICAgICBjdHgudHJhbnNsYXRlKHRoaXMueCwgdGhpcy55KTtcbiAgICAgICAgICBjdHguc2NhbGUoc2NhbGUsIC1zY2FsZSk7XG4gICAgICAgICAgdmFyIGx3ID0gY3R4LmxpbmVXaWR0aDtcbiAgICAgICAgICBjdHgubGluZVdpZHRoID0gY3R4LmxpbmVXaWR0aCAqIHVuaXRzUGVyRW0gLyBmb250U2l6ZTtcblxuICAgICAgICAgIGlmIChmb250U3R5bGUgPT09ICdpdGFsaWMnKSB7XG4gICAgICAgICAgICBjdHgudHJhbnNmb3JtKDEsIDAsIC40LCAxLCAwLCAwKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBnbHlwaC5yZW5kZXIoY3R4KTtcblxuICAgICAgICAgIGlmIChmb250U3R5bGUgPT09ICdpdGFsaWMnKSB7XG4gICAgICAgICAgICBjdHgudHJhbnNmb3JtKDEsIDAsIC0uNCwgMSwgMCwgMCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY3R4LmxpbmVXaWR0aCA9IGx3O1xuICAgICAgICAgIGN0eC5zY2FsZSgxIC8gc2NhbGUsIC0xIC8gc2NhbGUpO1xuICAgICAgICAgIGN0eC50cmFuc2xhdGUoLXRoaXMueCwgLXRoaXMueSk7XG4gICAgICAgICAgdGhpcy54ICs9IGZvbnRTaXplICogKGdseXBoLmhvcml6QWR2WCB8fCBjdXN0b21Gb250Lmhvcml6QWR2WCkgLyB1bml0c1BlckVtO1xuXG4gICAgICAgICAgaWYgKHR5cGVvZiBkeFtpXSAhPT0gJ3VuZGVmaW5lZCcgJiYgIWlzTmFOKGR4W2ldKSkge1xuICAgICAgICAgICAgdGhpcy54ICs9IGR4W2ldO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgdmFyIHggPSB0aGlzLngsXG4gICAgICAgICAgeSA9IHRoaXMueTtcblxuICAgICAgaWYgKGN0eC5wYWludE9yZGVyID09PSAnc3Ryb2tlJykge1xuICAgICAgICBpZiAoY3R4LnN0cm9rZVN0eWxlKSB7XG4gICAgICAgICAgY3R4LnN0cm9rZVRleHQocmVuZGVyVGV4dCwgeCwgeSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY3R4LmZpbGxTdHlsZSkge1xuICAgICAgICAgIGN0eC5maWxsVGV4dChyZW5kZXJUZXh0LCB4LCB5KTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGN0eC5maWxsU3R5bGUpIHtcbiAgICAgICAgICBjdHguZmlsbFRleHQocmVuZGVyVGV4dCwgeCwgeSk7XG4gICAgICAgIH1cblx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ge1xuICAgICAgICBwYXRoUGFyc2VyLm5leHRDb21tYW5kKCk7XG5cbiAgICAgICAgc3dpdGNoIChwYXRoUGFyc2VyLmNvbW1hbmQpIHtcbiAgICAgICAgICBjYXNlICdNJzpcbiAgICAgICAgICBjYXNlICdtJzpcbiAgICAgICAgICAgIHRoaXMucGF0aE0oY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0wnOlxuICAgICAgICAgIGNhc2UgJ2wnOlxuICAgICAgICAgICAgdGhpcy5wYXRoTChjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnSCc6XG4gICAgICAgICAgY2FzZSAnaCc6XG4gICAgICAgICAgICB0aGlzLnBhdGhIKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdWJzpcbiAgICAgICAgICBjYXNlICd2JzpcbiAgICAgICAgICAgIHRoaXMucGF0aFYoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0MnOlxuICAgICAgICAgIGNhc2UgJ2MnOlxuICAgICAgICAgICAgdGhpcy5wYXRoQyhjdHgsIGJvdW5kaW5nQm94KTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUyc6XG4gICAgICAgICAgY2FzZSAncyc6XG4gICAgICAgICAgICB0aGlzLnBhdGhTKGN0eCwgYm91bmRpbmdCb3gpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICBjYXNlICdxJzpcbiAgICAgICAgICAgIHRoaXMucGF0aFEoY3R4LCBib3VuZGluZ0JveCk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1QnOlxuICAgICAgICAgIGNhc2UgJ3Q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AgICAgIHZhciBtYXJrZXIgPSBtYXJrZXJTdGFydFN0eWxlUHJvcC5nZXREZWZpbml0aW9uKCk7XG5cbiAgICAgICAgICB2YXIgX21hcmtlcnMkID0gX3NsaWNlZFRvQXJyYXkobWFya2Vyc1swXSwgMiksXG4gICAgICAgICAgICAgIHBvaW50ID0gX21hcmtlcnMkWzBdLFxuICAgICAgICAgICAgICBhbmdsZSA9IF9tYXJrZXJzJFsxXTtcblxuICAgICAgICAgIG1hcmtlci5yZW5kZXIoY3R4LCBwb2ludCwgYW5nbGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hcmtlck1pZFN0eWxlUHJvcC5pc1VybERlZmluaXRpb24oKSkge1xuICAgICAgICAgIHZhciBfbWFya2VyID0gbWFya2VyTWlkU3R5bGVQcm9wLmdldERlZmluaXRpb24oKTtcblxuICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgbWFya2Vyc0xhc3RJbmRleDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgX21hcmtlcnMkaSA9IF9zbGljZWRUb0FycmF5KG1hcmtlcnNbaV0sIDIpLFxuICAgICAgICAgICAgICAgIF9wb2ludCA9IF9tYXJrZXJzJGlbMF0sXG4gICAgICAgICAgICAgICAgX2FuZ2xlID0gX21hcmtlcnMkaVsxXTtcblxuICAgICAgICAgICAgX21hcmtlci5yZW5kZXIoY3R4LCBfcG9pbnQsIF9hbmdsZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hcmtlckVuZFN0eWxlUHJvcC5pc1VybERlZmluaXRpb24oKSkge1xuICAgICAgICAgIHZhciBfbWFya2VyMiA9IG1hcmtlckVuZFN0eWxlUHJvcC5nZXREZWZpbml0aW9uKCk7XG5cbiAgICAgICAgICB2YXIgX21hcmtlcnMkbWFya2Vyc0xhc3RJID0gX3NsaWNlZFRvQXJyYXkobWFya2Vyc1ttYXJrZXJzTGFzdEluZGV4XSwgMiksXG4gICAgICAgICAg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GFyc2VyLmdldFNjYWxhcigpLCBjdXJyZW50LnkpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihwb2ludCwgY3VycmVudCk7XG4gICAgICAgIHBhdGhQYXJzZXIuY3VycmVudCA9IHBvaW50O1xuICAgICAgICBib3VuZGluZ0JveC5hZGRQb2ludChwb2ludC54LCBwb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LmxpbmVUbyhwb2ludC54LCBwb2ludC55KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJwYXRoVlwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXRoVihjdHgsIGJvdW5kaW5nQm94KSB7XG4gICAgICB2YXIgcGF0aFBhcnNlciA9IHRoaXMucGF0aFBhcnNlcjtcblxuICAgICAgd2hpbGUgKCFwYXRoUGFyc2VyLmlzQ29tbWFuZE9yRW5kKCkpIHtcbiAgICAgICAgdmFyIGN1cnJlbnQgPSBwYXRoUGFyc2VyLmN1cnJlbnQ7XG4gICAgICAgIHZhciBwb2ludCA9IG5ldyBQb2ludChjdXJyZW50LngsIChwYXRoUGFyc2VyLmlzUmVsYXRpdmVDb21tYW5kKCkgPyBjdXJyZW50LnkgOiAwKSArIHBhdGhQYXJzZXIuZ2V0U2NhbGFyKCkpO1xuICAgICAgICBwYXRoUGFyc2VyLmFkZE1hcmtlcihwb2ludCwgY3VycmVudCk7XG4gICAgICAgIHBhdGhQYXJzZXIuY3VycmVudCA9IHBvaW50O1xuICAgICAgICBib3VuZGluZ0JveC5hZGRQb2ludChwb2ludC54LCBwb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LmxpbmVUbyhwb2ludC54LCBwb2ludC55KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJwYXRoQ1wiLFxuICAgIHZhbHVlOiBmdW5jdGlv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uaXNDb21tYW5kT3JFbmQoKSkge1xuICAgICAgICB2YXIgY3VycmVudCA9IHBhdGhQYXJzZXIuY3VycmVudDtcbiAgICAgICAgdmFyIHBvaW50ID0gcGF0aFBhcnNlci5nZXRSZWZsZWN0ZWRDb250cm9sUG9pbnQoKTtcbiAgICAgICAgdmFyIGNvbnRyb2xQb2ludCA9IHBhdGhQYXJzZXIuZ2V0QXNDb250cm9sUG9pbnQoKTtcbiAgICAgICAgdmFyIGN1cnJlbnRQb2ludCA9IHBhdGhQYXJzZXIuZ2V0QXNDdXJyZW50UG9pbnQoKTtcbiAgICAgICAgcGF0aFBhcnNlci5hZGRNYXJrZXIoY3VycmVudFBvaW50LCBjb250cm9sUG9pbnQsIHBvaW50KTtcbiAgICAgICAgYm91bmRpbmdCb3guYWRkQmV6aWVyQ3VydmUoY3VycmVudC54LCBjdXJyZW50LnksIHBvaW50LngsIHBvaW50LnksIGNvbnRyb2xQb2ludC54LCBjb250cm9sUG9pbnQueSwgY3VycmVudFBvaW50LngsIGN1cnJlbnRQb2ludC55KTtcblxuICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgY3R4LmJlemllckN1cnZlVG8ocG9pbnQueCwgcG9pbnQueSwgY29udHJvbFBvaW50LngsIGNvbnRyb2xQb2ludC55LCBjdXJyZW50UG9pbnQueCwgY3VycmVudFBvaW50LnkpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInBhdGhRXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHBhdGhRKGN0eCwgYm91bmRpbmdCb3gpIHtcbiAgICAgIHZhciBwYXRoUGFyc2VyID0gdGhpcy5wYXRoUGFyc2VyO1xuXG4gICAgICB3aGlsZSAoIXBhdGhQYXJzZXIuaXNDb21tYW5kT3JFbmQoKSkge1xuICAgICAgICB2YXIgY3VycmVudCA9IHBhdGhQYXJzZXIuY3VycmVudDtcbiAgICAgICAgdmFyIGNvbnRyb2xQb2ludCA9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biAgICAgICAgICBjYXNlICdnbHlwaCc6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBnbHlwaCA9IGNoaWxkO1xuXG4gICAgICAgICAgICAgIGlmIChnbHlwaC5hcmFiaWNGb3JtKSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuaXNSVEwgPSB0cnVlO1xuICAgICAgICAgICAgICAgIF90aGlzLmlzQXJhYmljID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID0ge307XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdW2dseXBoLmFyYWJpY0Zvcm1dID0gZ2x5cGg7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuZ2x5cGhzW2dseXBoLnVuaWNvZGVdID0gZ2x5cGg7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIF9pdGVyYXRvci5lKGVycik7XG4gICAgfSBmaW5hbGx5IHtcbiAgICAgIF9pdGVyYXRvci5mKCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIF90aGlzO1xuICB9XG5cbiAgX2NyZWF0ZUNsYXNzKEZvbnRFbGVtZW50LCBbe1xuICAgIGtleTogXCJyZW5kZXJcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gcmVuZGVyKCkgey8vIE5PIFJFTkRFUlxuICAgIH1cbiAgfV0pO1xuXG4gIHJldHVybiBGb250RWxlbWVudDtcbn0oRWx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heS5mb3JFYWNoKGZ1bmN0aW9uIChfcmVmKSB7XG4gICAgICAgIHZhciBjb21tYW5kID0gX3JlZi5jb21tYW5kLFxuICAgICAgICAgICAgcG9pbnRzID0gX3JlZi5wb2ludHM7XG5cbiAgICAgICAgc3dpdGNoIChjb21tYW5kKSB7XG4gICAgICAgICAgY2FzZSAnTCc6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5saW5lVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgaWYgKGN0eCkge1xuICAgICAgICAgICAgICBjdHgubW92ZVRvKHBvaW50c1swXSwgcG9pbnRzWzFdKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdDJzpcbiAgICAgICAgICAgIGlmIChjdHgpIHtcbiAgICAgICAgICAgICAgY3R4LmJlemllckN1cnZlVG8ocG9pbnRzWzBdLCBwb2ludHNbMV0sIHBvaW50c1syXSwgcG9pbnRzWzNdLCBwb2ludHNbNF0sIHBvaW50c1s1XSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5xdWFkcmF0aWNDdXJ2ZVRvKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnQSc6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBjeCA9IHBvaW50c1swXTtcbiAgICAgICAgICAgICAgdmFyIGN5ID0gcG9pbnRzWzFdO1xuICAgICAgICAgICAgICB2YXIgcnggPSBwb2ludHNbMl07XG4gICAgICAgICAgICAgIHZhciByeSA9IHBvaW50c1szXTtcbiAgICAgICAgICAgICAgdmFyIHRoZXRhID0gcG9pbnRzWzRdO1xuICAgICAgICAgICAgICB2YXIgZFRoZXRhID0gcG9pbnRzWzVdO1xuICAgICAgICAgICAgICB2YXIgcHNpID0gcG9pbnRzWzZdO1xuICAgICAgICAgICAgICB2YXIgZnMgPSBwb2ludHNbN107XG4gICAgICAgICAgICAgIHZhciByID0gcnggPiByeSA/IHJ4IDogcnk7XG4gICAgICAgICAgICAgIHZhciBzY2FsZVggPSByeCA+IHJ5ID8gMSA6IHJ4IC8gcnk7XG4gICAgICAgICAgICAgIHZhciBzY2FsZVkgPSByeCA+IHJ5ID8gcnkgLyByeCA6IDE7XG5cbiAgICAgICAgICAgICAgaWYgKGN0eCkge1xuICAgICAgICAgICAgICAgIGN0eC50cmFuc2xhdGUoY3gsIGN5KTtcbiAgICAgICAgICAgICAgICBjdHgucm90YXRlKHBzaSk7XG4gICAgICAgICAgICAgICAgY3R4LnNjYWxlKHNjYWxlWCwgc2NhbGVZKTtcbiAgICAgICAgICAgICAgICBjdHguYXJjKDAsIDAsIHIsIHRoZXRhLCB0aGV0YSArIGRUaGV0YSwgQm9vbGVhbigxIC0gZnMpKTtcbiAgICAgICAgICAgICAgICBjdHguc2NhbGUoMSAvIHNjYWxlWCwgMSAvIHNjYWxlWSk7XG4gICAgICAgICAgICAgICAgY3R4LnJvdGF0ZSgtcHNpKTtcbiAgICAgICAgICAgICAgICBjdHgudHJhbnNsYXRlKC1jeCwgLWN5KTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgY2FzZSAneic6XG4gICAgICAgICAgICBpZiAoY3R4KSB7XG4gICAgICAgICAgICAgIGN0eC5jbG9zZVBhdGgoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAg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G9pbnQueSxcbiAgICAgICAgICB0ZXh0OiBjaGFyc1tpXSxcbiAgICAgICAgICBwMDogc2VnbWVudC5wMCxcbiAgICAgICAgICBwMTogc2VnbWVudC5wMSxcbiAgICAgICAgICByb3RhdGlvbjogcm90YXRpb25cbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwicGFyc2VQYXRoRGF0YVwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBwYXJzZVBhdGhEYXRhKHBhdGgpIHtcbiAgICAgIHRoaXMucGF0aExlbmd0aCA9IC0xOyAvLyByZXNldCBwYXRoIGxlbmd0aFxuXG4gICAgICBpZiAoIXBhdGgpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuXG4gICAgICB2YXIgcGF0aENvbW1hbmRzID0gW107XG4gICAgICB2YXIgcGF0aFBhcnNlciA9IHBhdGgucGF0aFBhcnNlcjtcbiAgICAgIHBhdGhQYXJzZXIucmVzZXQoKTsgLy8gY29udmVydCBsLCBILCBoLCBWLCBhbmQgdiB0byBMXG5cbiAgICAgIHdoaWxlICghcGF0aFBhcnNlci5pc0VuZCgpKSB7XG4gICAgICAgIHZhciBjdXJyZW50ID0gcGF0aFBhcnNlci5jdXJyZW50O1xuICAgICAgICB2YXIgc3RhcnRYID0gY3VycmVudCA/IGN1cnJlbnQueCA6IDA7XG4gICAgICAgIHZhciBzdGFydFkgPSBjdXJyZW50ID8gY3VycmVudC55IDogMDtcbiAgICAgICAgdmFyIGNtZCA9ICcnO1xuICAgICAgICB2YXIgcG9pbnRzID0gW107XG4gICAgICAgIHBhdGhQYXJzZXIubmV4dENvbW1hbmQoKTtcbiAgICAgICAgdmFyIHVwcGVyQ29tbWFuZCA9IHBhdGhQYXJzZXIuY29tbWFuZC50b1VwcGVyQ2FzZSgpO1xuXG4gICAgICAgIHN3aXRjaCAocGF0aFBhcnNlci5jb21tYW5kKSB7XG4gICAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgY2FzZSAnbSc6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhNKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0wnOlxuICAgICAgICAgIGNhc2UgJ2wnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoTChwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdIJzpcbiAgICAgICAgICBjYXNlICdoJzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aEgocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnVic6XG4gICAgICAgICAgY2FzZSAndic6XG4gICAgICAgICAgICBjbWQgPSB0aGlzLnBhdGhWKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ0MnOlxuICAgICAgICAgIGNhc2UgJ2MnOlxuICAgICAgICAgICAgdGhpcy5wYXRoQyhwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdTJzpcbiAgICAgICAgICBjYXNlICdzJzpcbiAgICAgICAgICAgIGNtZCA9IHRoaXMucGF0aFMocGF0aFBhcnNlciwgcG9pbnRzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgY2FzZSAncSc6XG4gICAgICAgICAgICB0aGlzLnBhdGhRKHBhdGhQYXJzZXIsIHBvaW50cyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1QnOlxuICAgICAgICAgIGNhc2UgJ3QnOlxuICAgICAgICAgICAgY21kID0gdGhpcy5wYXRoVChwYXRoUGFyc2VyLCBwb2ludHMpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdBJzpcbiAgICAgICAgICBjYXNlICdhJzpcbiAgICAgICAgICAgIHBvaW50cyA9IHRoaXMucGF0aEEocGF0aFBhcnNlcik7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ1onOlxuICAgICAgICAgIGNhc2UgJ3onOlxuICAgICAgICAgICAgcGF0aFBhcnNlci5jdXJyZW50ID0gcGF0aFBhcnNlci5zdGFydDtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHVwcGVyQ29tbWFuZCAhPT0gJ1onKSB7XG4gICAgICAgICAgcGF0aENvbW1hbmRzLnB1c2goe1xuICAgICAgICAgICAgY29tbWFuZDogY21kIHx8IHVwcGVyQ29tbWFuZCxcbiAgICAgICAgICAgIHBvaW50czogcG9pbnRzLFxuICAgICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgICAgeDogc3RhcnRYLFxuICAgICAgICAgICAgICB5OiBzdGFydFlcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBwYXRoTGVuZ3RoOiB0aGlzLmNhbGNMZW5ndGgoc3RhcnRYLCBzdGFydFksIGNtZCB8fCB1cHBlckNvbW1hbmQsIHBvaW50cylcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBwYXRoQ29tbWFuZHMucHVzaCh7XG4gICAgICAgICAgICBjb21tYW5kOiAneicsXG4gICAgICAgICAgICBwb2ludHM6IFtdLFxuICAgICAgICAgICAgcGF0aExlbmd0aDogMFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwYXRoQ29tbWFuZHM7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInBhdGhNXCIsXG4gICAgdmFsdWU6IGZ1bmN0aW9uIHBhdGhNKHBhdGhQYXJzZXIsIHBvaW50cykge1xuIC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zID0gKGxhcmdlQXJjRmxhZyA9PT0gc3dlZXBGbGFnID8gLTEgOiAxKSAqIE1hdGguc3FydCgoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3cocnksIDIpIC0gTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgLSBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkgLyAoTWF0aC5wb3cocngsIDIpICogTWF0aC5wb3coY3VycnAueSwgMikgKyBNYXRoLnBvdyhyeSwgMikgKiBNYXRoLnBvdyhjdXJycC54LCAyKSkpO1xuXG4gICAgICAgIGlmIChpc05hTihzKSkge1xuICAgICAgICAgIHMgPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNwcCA9IG5ldyBQb2ludChzICogcnggKiBjdXJycC55IC8gcnksIHMgKiAtcnkgKiBjdXJycC54IC8gcngpOyAvLyBjeCwgY3lcblxuICAgICAgICB2YXIgY2VudHAgPSBuZXcgUG9pbnQoKGN1cnJlbnQueCArIGN1cnJlbnRQb2ludC54KSAvIDIuMCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnggLSBNYXRoLnNpbih4QXhpc1JvdGF0aW9uKSAqIGNwcC55LCAoY3VycmVudC55ICsgY3VycmVudFBvaW50LnkpIC8gMi4wICsgTWF0aC5zaW4oeEF4aXNSb3RhdGlvbikgKiBjcHAueCArIE1hdGguY29zKHhBeGlzUm90YXRpb24pICogY3BwLnkpOyAvLyBpbml0aWFsIGFuZ2xlXG5cbiAgICAgICAgdmFyIGExID0gdmVjdG9yc0FuZ2xlKFsxLCAwXSwgWyhjdXJycC54IC0gY3BwLngpIC8gcngsIChjdXJycC55IC0gY3BwLnkpIC8gcnldKTsgLy8gzrgxXG4gICAgICAgIC8vIGFuZ2xlIGRlbHRhXG5cbiAgICAgICAgdmFyIHUgPSBbKGN1cnJwLnggLSBjcHAueCkgLyByeCwgKGN1cnJwLnkgLSBjcHAueSkgLyByeV07XG4gICAgICAgIHZhciB2ID0gWygtY3VycnAueCAtIGNwcC54KSAvIHJ4LCAoLWN1cnJwLnkgLSBjcHAueSkgLyByeV07XG4gICAgICAgIHZhciBhZCA9IHZlY3RvcnNBbmdsZSh1LCB2KTsgLy8gzpTOuFxuXG4gICAgICAgIGlmICh2ZWN0b3JzUmF0aW8odSwgdikgPD0gLTEpIHtcbiAgICAgICAgICBhZCA9IE1hdGguUEk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodmVjdG9yc1JhdGlvKHUsIHYpID49IDEpIHtcbiAgICAgICAgICBhZCA9IDA7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc3dlZXBGbGFnID09PSAwICYmIGFkID4gMCkge1xuICAgICAgICAgIGFkID0gYWQgLSAyICogTWF0aC5QSTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzd2VlcEZsYWcgPT09IDEgJiYgYWQgPCAwKSB7XG4gICAgICAgICAgYWQgPSBhZCArIDIgKiBNYXRoLlBJO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIFtjZW50cC54LCBjZW50cC55LCByeCwgcnksIGExLCBhZCwgeEF4aXNSb3RhdGlvbiwgc3dlZXBGbGFnXTtcbiAgICAgIH1cbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiY2FsY0xlbmd0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBjYWxjTGVuZ3RoKHgsIHksIGNtZCwgcG9pbnRzKSB7XG4gICAgICB2YXIgbGVuID0gMDtcbiAgICAgIHZhciBwMSA9IG51bGw7XG4gICAgICB2YXIgcDIgPSBudWxsO1xuICAgICAgdmFyIHQgPSAwO1xuXG4gICAgICBzd2l0Y2ggKGNtZCkge1xuICAgICAgICBjYXNlICdMJzpcbiAgICAgICAgICByZXR1cm4gdGhpcy5nZXRMaW5lTGVuZ3RoKHgsIHksIHBvaW50c1swXSwgcG9pbnRzWzFdKTtcblxuICAgICAgICBjYXNlICdDJzpcbiAgICA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Bmb3IgKHQgPSBzdGFydCAtIGluYzsgdCA+IGVuZDsgdCAtPSBpbmMpIHtcbiAgICAgICAgICAgICAgcDIgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSwgdCwgMCk7XG4gICAgICAgICAgICAgIGxlbiArPSB0aGlzLmdldExpbmVMZW5ndGgocDEueCwgcDEueSwgcDIueCwgcDIueSk7XG4gICAgICAgICAgICAgIHAxID0gcDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIGNvdW50ZXItY2xvY2t3aXNlXG4gICAgICAgICAgICBmb3IgKHQgPSBzdGFydCArIGluYzsgdCA8IGVuZDsgdCArPSBpbmMpIHtcbiAgICAgICAgICAgICAgcDIgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSwgdCwgMCk7XG4gICAgICAgICAgICAgIGxlbiArPSB0aGlzLmdldExpbmVMZW5ndGgocDEueCwgcDEueSwgcDIueCwgcDIueSk7XG4gICAgICAgICAgICAgIHAxID0gcDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcDIgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBvaW50c1swXSwgcG9pbnRzWzFdLCBwb2ludHNbMl0sIHBvaW50c1szXSwgZW5kLCAwKTtcbiAgICAgICAgICBsZW4gKz0gdGhpcy5nZXRMaW5lTGVuZ3RoKHAxLngsIHAxLnksIHAyLngsIHAyLnkpO1xuICAgICAgICAgIHJldHVybiBsZW47XG4gICAgICB9XG5cbiAgICAgIHJldHVybiAwO1xuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJnZXRQb2ludE9uTGluZVwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBnZXR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ydC55KTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0EnOlxuICAgICAgICAgICAgICB2YXIgc3RhcnQgPSBwYXRoQ21kLnBvaW50c1s0XTsgLy8gNCA9IHRoZXRhXG5cbiAgICAgICAgICAgICAgdmFyIGRUaGV0YSA9IHBhdGhDbWQucG9pbnRzWzVdOyAvLyA1ID0gZFRoZXRhXG5cbiAgICAgICAgICAgICAgdmFyIGVuZCA9IHBhdGhDbWQucG9pbnRzWzRdICsgZFRoZXRhO1xuICAgICAgICAgICAgICBjdXJyZW50VCA9IHN0YXJ0ICsgZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGggKiBkVGhldGE7XG5cbiAgICAgICAgICAgICAgaWYgKGRUaGV0YSA8IDAgJiYgY3VycmVudFQgPCBlbmQgfHwgZFRoZXRhID49IDAgJiYgY3VycmVudFQgPiBlbmQpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25FbGxpcHRpY2FsQXJjKHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5wb2ludHNbMl0sIHBhdGhDbWQucG9pbnRzWzNdLCBjdXJyZW50VCwgcGF0aENtZC5wb2ludHNbNl0pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnQyc6XG4gICAgICAgICAgICAgIGN1cnJlbnRUID0gZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGg7XG5cbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnRUID4gMSkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRUID0gMTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25DdWJpY0JlemllcihjdXJyZW50VCwgcGF0aENtZC5zdGFydC54LCBwYXRoQ21kLnN0YXJ0LnksIHBhdGhDbWQucG9pbnRzWzBdLCBwYXRoQ21kLnBvaW50c1sxXSwgcGF0aENtZC5wb2ludHNbMl0sIHBhdGhDbWQucG9pbnRzWzNdLCBwYXRoQ21kLnBvaW50c1s0XSwgcGF0aENtZC5wb2ludHNbNV0pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgICAgIGN1cnJlbnRUID0gZGVsdGEgLyBwYXRoQ21kLnBhdGhMZW5ndGg7XG5cbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnRUID4gMSkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRUID0gMTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHAgPSB0aGlzLmdldFBvaW50T25RdWFkcmF0aWNCZXppZXIoY3VycmVudFQsIHBhdGhDbWQuc3RhcnQueCwgcGF0aENtZC5zdGFydC55LCBwYXRoQ21kLnBvaW50c1swXSwgcGF0aENtZC5wb2ludHNbMV0sIHBhdGhDbWQucG9pbnRzWzJdLCBwYXRoQ21kLnBvaW50c1szXSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChwKSB7XG4gICAgICAgICAgICByZXR1cm4gcDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIF9pdGVyYXRvci5lKGVycik7XG4gICAgICB9IGZpbmFsbHkge1xuICAgICAgICBfaXRlcmF0b3IuZigpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG4gIH0sIHtcbiAgICBrZXk6IFwiZ2V0TGluZUxlbmd0aFwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRMaW5lTGVuZ3RoKHgxLCB5MSwgeDIsIHkyKSB7XG4g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Z2U7XG4gICAgICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQucHJldiA9IDA7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDM7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZG9jdW1lbnQuY3JlYXRlSW1hZ2UoaHJlZik7XG5cbiAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgIGltYWdlID0gX2NvbnRleHQuc2VudDtcbiAgICAgICAgICAgICAgICB0aGlzLmltYWdlID0gaW1hZ2U7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDEwO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICBfY29udGV4dC5wcmV2ID0gNztcbiAgICAgICAgICAgICAgICBfY29udGV4dC50MCA9IF9jb250ZXh0W1wiY2F0Y2hcIl0oMCk7XG4gICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOiBuby1jb25zb2xlXG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkVycm9yIHdoaWxlIGxvYWRpbmcgaW1hZ2UgXFxcIlwiLmNvbmNhdChocmVmLCBcIlxcXCI6XCIpLCBfY29udGV4dC50MCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlLCB0aGlzLCBbWzAsIDddXSk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWRJbWFnZShfeCkge1xuICAgICAgICByZXR1cm4gX2xvYWRJbWFnZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbG9hZEltYWdlO1xuICAgIH0oKVxuICB9LCB7XG4gICAga2V5OiBcImxvYWRTdmdcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gKCkge1xuICAgICAgdmFyIF9sb2FkU3ZnID0gX2FzeW5jVG9HZW5lcmF0b3IoIC8qI19fUFVSRV9fKi9fcmVnZW5lcmF0b3JSdW50aW1lLm1hcmsoZnVuY3Rpb24gX2NhbGxlZTIoaHJlZikge1xuICAgICAgICB2YXIgcmVzcG9uc2UsIHN2ZztcbiAgICAgICAgcmV0dXJuIF9yZWdlbmVyYXRvclJ1bnRpbWUud3JhcChmdW5jdGlvbiBfY2FsbGVlMiQoX2NvbnRleHQyKSB7XG4gICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoX2NvbnRleHQyLnByZXYgPSBfY29udGV4dDIubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLnByZXYgPSAwO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gMztcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5kb2N1bWVudC5mZXRjaChocmVmKTtcblxuICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBfY29udGV4dDIuc2VudDtcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDY7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnRleHQoKTtcblxuICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgc3ZnID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgdGhpcy5pbWFnZSA9IHN2ZztcbiAgICAgICAgICAgICAgICBfY29udGV4dDIubmV4dCA9IDEzO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgX2NvbnRleHQyLnByZXYgPSAxMDtcbiAgICAgICAgICAgICAgICBfY29udGV4dDIudDAgPSBfY29udGV4dDJbXCJjYXRjaFwiXSgwKTtcbiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6IG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyb3Igd2hpbGUgbG9hZGluZyBpbWFnZSBcXFwiXCIuY29uY2F0KGhyZWYsIFwiXFxcIjpcIiksIF9jb250ZXh0Mi50MCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dDIuc3RvcCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSwgX2NhbGxlZTIsIHRoaXMsIFtbMCwgMTBdXSk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWRTdmcoX3gyKSB7XG4gICAgICAgIHJldHVybiBfbG9hZFN2Zy5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbG9hZFN2ZztcbiAgICB9KClcbiAgfSwge1xuICAgIGtleTogXCJyZW5kZXJDaGlsZH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lZmluaXRpb25zW2ZvbnRGYW1pbHldID0gZm9udDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBfY29udGV4dC5uZXh0ID0gMTI7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgIF9jb250ZXh0LnByZXYgPSA5O1xuICAgICAgICAgICAgICAgIF9jb250ZXh0LnQwID0gX2NvbnRleHRbXCJjYXRjaFwiXSgwKTtcbiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6IG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiRXJyb3Igd2hpbGUgbG9hZGluZyBmb250IFxcXCJcIi5jb25jYXQodXJsLCBcIlxcXCI6XCIpLCBfY29udGV4dC50MCk7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICB0aGlzLmxvYWRlZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5zdG9wKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LCBfY2FsbGVlLCB0aGlzLCBbWzAsIDldXSk7XG4gICAgICB9KSk7XG5cbiAgICAgIGZ1bmN0aW9uIGxvYWQoX3gsIF94Mikge1xuICAgICAgICByZXR1cm4gX2xvYWQuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIGxvYWQ7XG4gICAgfSgpXG4gIH1dKTtcblxuICByZXR1cm4gU1ZHRm9udExvYWRlcjtcbn0oKTtcblxuZnVuY3Rpb24gX2NyZWF0ZVN1cGVyJEEoRGVyaXZlZCkgeyByZXR1cm4gZnVuY3Rpb24gKCkgeyB2YXIgU3VwZXIg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YXRvclJ1bnRpbWUubWFyayhmdW5jdGlvbiBfY2FsbGVlKHNyYykge1xuICAgIHZhciBhbm9ueW1vdXNDcm9zc09yaWdpbixcbiAgICAgICAgaW1hZ2UsXG4gICAgICAgIF9hcmdzID0gYXJndW1lbnRzO1xuICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgIHN3aXRjaCAoX2NvbnRleHQucHJldiA9IF9jb250ZXh0Lm5leHQpIHtcbiAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICBhbm9ueW1vdXNDcm9zc09yaWdpbiA9IF9hcmdzLmxlbmd0aCA+IDEgJiYgX2FyZ3NbMV0gIT09IHVuZGVmaW5lZCA/IF9hcmdzWzFdIDogZmFsc2U7XG4gICAgICAgICAgICBpbWFnZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2ltZycpO1xuXG4gICAgICAgICAgICBpZiAoYW5vbnltb3VzQ3Jvc3NPcmlnaW4pIHtcbiAgICAgICAgICAgICAgaW1hZ2UuY3Jvc3NPcmlnaW4gPSAnQW5vbnltb3VzJztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LmFicnVwdChcInJldHVyblwiLCBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgIGltYWdlLm9ubG9hZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXNvbHZlKGltYWdlKTtcbiAgICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgICBpbWFnZS5vbmVycm9yID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHJlamVjdCgpO1xuICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgIGltYWdlLnNyYyA9IHNyYztcbiAgICAgIC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BmaXJzdCBmcmFtZSwgaWdub3JpbmcgYW5pbWF0aW9ucyBhbmQgbW91c2UuXG4gICAgICogQHBhcmFtIG9wdGlvbnMgLSBSZW5kZXJpbmcgb3B0aW9ucy5cbiAgICAgKi9cblxuICB9LCB7XG4gICAga2V5OiBcInJlbmRlclwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiAoKSB7XG4gICAgICB2YXIgX3JlbmRlciA9IF9hc3luY1RvR2VuZXJhdG9yKCAvKiNfX1BVUkVfXyovX3JlZ2VuZXJhdG9yUnVudGltZS5tYXJrKGZ1bmN0aW9uIF9jYWxsZWUoKSB7XG4gICAgICAgIHZhciBvcHRpb25zLFxuICAgICAgICAgICAgX2FyZ3MgPSBhcmd1bWVudHM7XG4gICAgICAgIHJldHVybiBfcmVnZW5lcmF0b3JSdW50aW1lLndyYXAoZnVuY3Rpb24gX2NhbGxlZSQoX2NvbnRleHQpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dC5wcmV2ID0gX2NvbnRleHQubmV4dCkge1xuICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgb3B0aW9ucyA9IF9hcmdzLmxlbmd0aCA+IDAgJiYgX2FyZ3NbMF0gIT09IHVuZGVmaW5lZCA/IF9hcmdzWzBdIDoge307XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFydChfb2JqZWN0U3ByZWFkJDEoe1xuICAgICAgICAgICAgICAgICAgZW5hYmxlUmVkcmF3OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgaWdub3JlQW5pbWF0aW9uOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgaWdub3JlTW91c2U6IHRydWVcbiAgICAgICAgICAgICAgICB9LCBvcHRpb25zKSk7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucmVhZHkoKTtcblxuICAgICAgICAgICAgICB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xuICAgICAgICAgICAgX2FyZ3MyID0gYXJndW1lbnRzO1xuICAgICAgICByZXR1cm4gX3JlZ2VuZXJhdG9yUnVudGltZS53cmFwKGZ1bmN0aW9uIF9jYWxsZWUyJChfY29udGV4dDIpIHtcbiAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgc3dpdGNoIChfY29udGV4dDIucHJldiA9IF9jb250ZXh0Mi5uZXh0KSB7XG4gICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBvcHRpb25zID0gX2FyZ3MyLmxlbmd0aCA+IDIgJiYgX2FyZ3MyWzJdICE9PSB1bmRlZmluZWQgPyBfYXJnczJbMl0gOiB7fTtcbiAgICAgICAgICAgICAgICBwYXJzZXIgPSBuZXcgUGFyc2VyKG9wdGlvbnMpO1xuICAgICAgICAgICAgICAgIF9jb250ZXh0Mi5uZXh0ID0gNDtcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VyLnBhcnNlKHN2Zyk7XG5cbiAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIHN2Z0RvY3VtZW50ID0gX2NvbnRleHQyLnNlbnQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0Mi5hYnJ1cHQoXCJyZXR1cm5cIiwgbmV3IENhbnZnKGN0eCwgc3ZnRG9jdW1lbnQsIG9wdGlvbnMpKTtcblxuICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgIGNhc2UgXCJlbmRcIjpcbiAgICAgICAgICAgICAgICByZXR1cm4gX2NvbnRleHQyLnN0b3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sIF9jYWxsZWUyKTtcbiAgICAgIH0pKTtcblxuICAgICAgZnVuY3Rpb24gZnJvbShfeCwgX3gyKSB7XG4gICAgICAgIHJldHVybiBfZnJvbS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfVxuXG4gICAgICByZ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vbnRleHQubmV4dCA9IDU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmJsb2IoKTtcblxuICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgYmxvYiA9IF9jb250ZXh0LnNlbnQ7XG4gICAgICAgICAgICAgICAgX2NvbnRleHQubmV4dCA9IDg7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNyZWF0ZUltYWdlQml0bWFwKGJsb2IpO1xuXG4gICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICBpbWcgPSBfY29udGV4dC5zZW50O1xuICAgICAgICAgICAgICAgIHJldHVybiBfY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgaW1nKTtcblxuICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICBjYXNlIFwiZW5kXCI6XG4gICAgICAgICAgICAgICAgcmV0dXJuIF9jb250ZXh0LnN0b3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sIF9jYWxsZWUpO1xuICAgICAgfSkpKCk7XG4gICAgfVxuICB9O1xuXG4gIGlmICh0eXBlb2YgRE9NUGFyc2VyICE9PSAndW5kZWZpbmVkJyB8fCB0eXBlb2YgRE9NUGFyc2VyRmFsbGJhY2sgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgUmVmbGVjdC5kZWxldGVQcm9wZXJ0eShwcmVzZXQsICdET01QYXJzZXInKTtcbiAgfVxuXG4gIHJldHVybiBwcmVzZXQ7XG59XG5cbi8qKlxuICogT3B0aW9ucyBwcmVzZXQgZm9yIGBub2RlLWNhbnZhc2AuXG4gKiBAcGFyYW0gY29uZmlnIC0gUHJlc2V0IHJlcXVpcmVtZW50cy5cbiAqIEBwYXJhbSBjb25maWcuRE9NUGFyc2VyIC0gWE1ML0hUTUwgcGFyc2VyIGZyb20gc3RyaW5nIGludG8gRE9NIERvY3VtZW50LlxuICogQHBhcmFtIGNvbmZpZy5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m9jbTkzYmlJc0ltUmxiR1ZuWVhSbFdXbGxiR1FpTENKdGIyUjFiR1VpTENKeVpXZGxibVZ5WVhSdmNsSjFiblJwYldVaUxDSmhZMk5wWkdWdWRHRnNVM1J5YVdOMFRXOWtaU0lzSWtaMWJtTjBhVzl1SWwwc0ltMWhjSEJwYm1keklqb2lPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPMEZCUVVFN096czdPenRCUVU5QkxFMUJRVWxCTEU5QlFVOHNSMEZCU1N4VlFVRlZReXhQUVVGV0xFVkJRVzFDTzBGQlEyaERPMEZCUlVFc1VVRkJTVU1zUlVGQlJTeEhRVUZIUXl4TlFVRk5MRU5CUVVORExGTkJRV2hDTzBGQlEwRXNVVUZCU1VNc1RVRkJUU3hIUVVGSFNDeEZRVUZGTEVOQlFVTkpMR05CUVdoQ08wRkJRMEVzVVVGQlNVTXNWMEZCU2l4RFFVeG5RenM3UVVGTmFFTXNVVUZCU1VNc1QwRkJUeXhIUVVGSExFOUJRVTlETEUxQlFWQXNTMEZCYTBJc1ZVRkJiRUlzUjBGQkswSkJMRTFCUVM5Q0xFZEJRWGRETEVWQlFYUkVPMEZCUTBFc1VVRkJTVU1zWTBGQll5eEhRVUZIUml4UFFVRlBMRU5CUVVOSExGRkJRVklzU1VGQmIwSXNXVUZCZWtNN1FVRkRRU3hSUVVGSl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NRVUZRTEVWQlFUWkNPenM3T3pzN096czdPMEZCVlRkQ1F5eEpRVUZCUVN4UlFVRlJMRU5CUVVNc1IwRkJSQ3hGUVVGTkxIZENRVUZPTEVOQlFWSXNRMEZCZDBNM1NTeFBRVUY0UXpzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPenM3T3pzN096czdPeUo5XG4iLCJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBfYXJyYXlMaWtlVG9BcnJheShhcnIsIGxlbikge1xuICBpZiAobGVuID09IG51bGwgfHwgbGVuID4gYXJyLmxlbmd0aCkgbGVuID0gYXJyLmxlbmd0aDtcblxuICBmb3IgKHZhciBpID0gMCwgYXJyMiA9IG5ldyBBcnJheShsZW4pOyBpIDwgbGVuOy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4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICAvLyBDYWxsIGRlbGVnYXRlLml0ZXJhdG9yW2Nvb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8gY2xlYW4gdXAuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIG1heWJlSW52b2tlRGVsZWdhdGUoZGVsZWdhdGUsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAvLyBcInJldHVyblwiIHRvIFwidGhyb3dcIiwgbGV0IHRoYXQgb3ZlcnJpZGUgdGhlIFR5cGVFcnJvciBiZWxvdy5cbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgXCJUaGUgaXRlcmF0b3IgZG9lcyBub3QgcHJvdmlkZSBhICd0aHJvdycgbWV0aG9kXCIpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9XG5cbiAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2gobWV0aG9kLCBkZWxlZ2F0ZS5pdGVyYXRvciwgY29udGV4dC5hcmcpO1xuXG4gICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgY29udGV4dC5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgY29udGV4dC5kZWxlZ2F0ZSA9IG51bGw7XG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9XG5cbiAg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IHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW5jdGlvbihyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByZWNvcmQuYXJnO1xuICAgICAgfVxuXG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgIHJlY29yZC50eXBlID09PSBcImNvbnRpbnVlXCIpIHtcbiAgICAgICAgdGhpcy5uZXh0ID0gcmVjb3JkLmFyZztcbiAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgdGhpcy5ydmFsID0gdGhpcy5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgIHRoaXMubmV4dCA9IFwiZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICB2YXIgdGhyb3duID0gcmVjb3JkLmFyZztcbiAgICAgICAgICAgIHJlc2V0VHJ5RW50cnkoZW50cnkpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gdGhyb3duO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIFRoZSBjb250ZXh0LmNhdGNoIG1ldGhvZCBtdXN0IG9ubHkgYmUgY2FsbGVkIHdpdGggYSBsb2NhdGlvblxuICAgICAgLy8gYXJndW1lbnQgdGhhdCBjb3JyZXNwb25kcyB0byBhIGtub3duIGNhdGNoIGJsb2NrLlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiaWxsZWdhbCBjYXRjaCBhdHRlbXB0XCIpO1xuIC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biAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgICByZTogL15yZ2JcXCgoXFxkezEsM30pLFxccyooXFxkezEsM30pLFxccyooXFxkezEsM30pXFwpJC8sXG4gICAgICAgICAgICBleGFtcGxlOiBbJ3JnYigxMjMsIDIzNCwgNDUpJywgJ3JnYigyNTUsMjM0LDI0NSknXSxcbiAgICAgICAgICAgIHByb2Nlc3M6IGZ1bmN0aW9uIChiaXRzKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzFdKSxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1syXSksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10pXG4gICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgICAgcmU6IC9eKFswLTlhLWZBLUZdezJ9KShbMC05YS1mQS1GXXsyfSkoWzAtOWEtZkEtRl17Mn0pJC8sXG4gICAgICAgICAgICBleGFtcGxlOiBbJyMwMGZmMDAnLCAnMzM2Njk5J10sXG4gICAgICAgICAgICBwcm9jZXNzOiBmdW5jdGlvbiAoYml0cyl7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VJbnQoYml0c1sxXSwgMTYpLFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUludChiaXRzWzJdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10sIDE2KVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICAgIHJlOiAvXihbMC05YS1mQS1GXXsxfSkoWzAtOWEtZkEtRl17MX0pKFswLTlhLWZBLUZdezF9KSQvLFxuICAgICAgICAgICAgZXhhbXBsZTogWycjZmIwJywgJ2YwZiddLFxuICAgICAgICAgICAgcHJvY2VzczogZnVuY3Rpb24gKGJpdHMpe1xuICAgICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMV0gKyBiaXRzWzFdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbMl0gKyBiaXRzWzJdLCAxNiksXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlSW50KGJpdHNbM10gKyBiaXRzWzNdLCAxNilcbiAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgXTtcblxuICAgIC8vIHNlYXJjaCB0aHJvdWdoIHRoZSBkZWZpbml0aW9ucyB0byBmaW5kIGEgbWF0Y2hcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbG9yX2RlZnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgdmFyIHJlID0gY29sb3JfZGVmc1tpXS5yZTtcbiAgICAgICAgdmFyIHByb2Nlc3NvciA9IGNvbG9yX2RlZnNbaV0ucHJvY2VzcztcbiAgICAgICAgdmFyIGJpdHMgPSByZS5leGVjKGNvbG9yX3N0cmluZyk7XG4gICAgICAgIGlmIChiaXRzKSB7XG4gICAgICAgICAgICB2YXIgY2hhbm5lbHMgPSBwcm9jZXNzb3IoYml0cyk7XG4gICAgICAgICAgICB0aGlzLnIgPSBjaGFubmVsc1swXTtcbiAgICAgICAgICAgIHRoaXMuZyA9IGNoYW5uZWxzWzFdO1xuICAgICAgICAgICAgdGhpcy5iID0gY2hhbm5lbHNbMl07XG4gICAgICAgICAgICBpZiAoY2hhbm5lbHMubGVuZ3RoID4gMykge1xuICAgICAgICAgICAgICAgIHRoaXMuYWxwaGEgPSBjaGFubmVsc1szXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMub2sgPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICB9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MCcgKyByO1xuICAgICAgICBpZiAoZy5sZW5ndGggPT0gMSkgZyA9ICcwJyArIGc7XG4gICAgICAgIGlmIChiLmxlbmd0aCA9PSAxKSBiID0gJzAnICsgYjtcbiAgICAgICAgcmV0dXJuICcjJyArIHIgKyBnICsgYjtcbiAgICB9XG5cbiAgICAvLyBoZWxwXG4gICAgdGhpcy5nZXRIZWxwWE1MID0gZnVuY3Rpb24gKCkge1xuXG4gICAgICAgIHZhciBleGFtcGxlcyA9IG5ldyBBcnJheSgpO1xuICAgICAgICAvLyBhZGQgcmVnZXhwc1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbG9yX2RlZnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBleGFtcGxlID0gY29sb3JfZGVmc1tpXS5leGFtcGxlO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBleGFtcGxlLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgZXhhbXBsZXNbZXhhbXBsZXMubGVuZ3RoXSA9IGV4YW1wbGVbal07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gYWRkIHR5cGUtaW4gY29sb3JzXG4gICAgICAgIGZvciAodmFyIHNjIGluIHNpbXBsZV9jb2xvcnMpIHtcbiAgICAgICAgICAgIGV4YW1wbGVzW2V4YW1wbGVzLmxlbmd0aF0gPSBzYztcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB4bWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCd1bCcpO1xuICAgICAgICB4bWwuc2V0QXR0cmlidXRlKCdpZCcsICdyZ2Jjb2xvci1leGFtcGxlcycpO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGV4YW1wbGVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciBsaXN0X2l0ZW0gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaScpO1xuICAgICAgICAgICAgICAgIHZhciBsaXN0X2NvbG9yID0gbmV3IFJHQkNvbG9yKGV4YW1wbGVzW2ldKTtcbiAgICAgICAgICAgICAgICB2YXIgZXhhbXBsZV9kaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICAgICAgICAgICAgICBleGFtcGxlX2Rpdi5zdHlsZS5jc3NUZXh0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICdtYXJnaW46IDNweDsgJ1xuICAgICAgICAgICAgICAgICAgICAgICAgKyAnYm9yZGVyOiAxcHggc29saWQgYmxhY2s7ICdcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJ2JhY2tncm91bmQ6JyArIGxpc3RfY29sb3IudG9IZXgoKSArICc7ICdcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJ2NvbG9yOicgKyBsaXN0X2NvbG9yLnRvSGV4KClcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgZXhhbXBsZV9kaXYuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoJ3Rlc3QnKSk7XG4gICAgICAgICAgICAgICAgdmFyIGxpc3RfaXRlbV92YWx1ZSA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKFxuICAgICAgICAgICAgICAgICAgICAnICcgKyBleGFtcGxlc1tpXSArICcgLT4gJyArIGxpc3RfY29sb3IudG9SR0IoKSArICcgLT4gJyArIGxpc3RfY29sb3IudG9IZXgoKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgbGlzdF9pdGVtLmFwcGVuZENoaWxkKGV4YW1wbGVfZGl2KTtcbiAgICAgICAgICAgICAgICBsaXN0X2l0ZW0uYXBwZW5kQ2hpbGQobGlzdF9pdGVtX3ZhbHVlKTtcbiAgICAgICAgICAgICAgICB4bWwuYXBwZW5kQ2hpbGQobGlzdF9pdGVtKTtcblxuICAgICAgICAgICAgfSBjYXRjaCh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gIHN0YWNrID0gc3RhY2submV4dDtcbiAgICB9XG5cbiAgICB2YXIgckluU3VtID0gMCxcbiAgICAgICAgZ0luU3VtID0gMCxcbiAgICAgICAgYkluU3VtID0gMCxcbiAgICAgICAgYUluU3VtID0gMCxcbiAgICAgICAgck91dFN1bSA9IHJhZGl1c1BsdXMxICogcHIsXG4gICAgICAgIGdPdXRTdW0gPSByYWRpdXNQbHVzMSAqIHBnLFxuICAgICAgICBiT3V0U3VtID0gcmFkaXVzUGx1czEgKiBwYixcbiAgICAgICAgYU91dFN1bSA9IHJhZGl1c1BsdXMxICogcGEsXG4gICAgICAgIHJTdW0gPSBzdW1GYWN0b3IgKiBwcixcbiAgICAgICAgZ1N1bSA9IHN1bUZhY3RvciAqIHBnLFxuICAgICAgICBiU3VtID0gc3VtRmFjdG9yICogcGIsXG4gICAgICAgIGFTdW0gPSBzdW1GYWN0b3IgKiBwYTtcblxuICAgIGZvciAodmFyIF9pMiA9IDE7IF9pMiA8IHJhZGl1c1BsdXMxOyBfaTIrKykge1xuICAgICAgdmFyIHAgPSB5aSArICgod2lkdGhNaW51czEgPCBfaTIgPyB3aWR0aE1pbnVzMSA6IF9pMikgPDwgMik7XG4gICAgICB2YXIgciA9IHBpeGVsc1twXSxcbiAgICAgICAgICBnID0gcGl4ZWxzW3AgKyAxXSxcbiAgICAgICAgICBiID0gcGl4ZWxzW3AgKyAyXSxcbiAgICAgICAgICBhID0gcGl4ZWxzW3AgKyAzXTtcbiAgICAgIHZhciByYnMgPSByYWRpdXNQbHVzMSAtIF9pMjtcbiAgICAgIHJTdW0gKz0gKHN0YWNrLnIgPSByKSAqIHJicztcbiAgICAgIGdTdW0gKz0gKHN0YWNrLmcgPSBnKSAqIHJicztcbiAgICAgIGJTdW0gKz0gKHN0YWNrLmIgPSBiKSAqIHJicztcbiAgICAgIGFTdW0gKz0gKHN0YWNrLmEgPSBhKSAqIHJicztcbiAgICAgIHJJblN1bSArPSByO1xuICAgICAgZ0luU3VtICs9IGc7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