@antv/g-svg 1.8.16 → 1.8.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1919,183 +1919,10 @@
1919
1919
  $el.setAttribute('d', d);
1920
1920
  }
1921
1921
 
1922
- function numberToLongString(x) {
1923
- return x.toFixed(6).replace('.000000', '');
1924
- }
1925
-
1926
- function convertHTML(str) {
1927
- var regex = /[&|<|>|"|']/g;
1928
- return str.replace(regex, function (match) {
1929
- if (match === '&') {
1930
- return '&amp;';
1931
- } else if (match === '<') {
1932
- return '&lt;';
1933
- } else if (match === '>') {
1934
- return '&gt;';
1935
- } else if (match === '"') {
1936
- return '&quot;';
1937
- } else {
1938
- return '&apos;';
1939
- }
1940
- });
1941
- }
1942
-
1943
- var BASELINE_MAP = {
1944
- top: 'before-edge',
1945
- middle: 'central',
1946
- bottom: 'after-edge',
1947
- alphabetic: 'alphabetic',
1948
- ideographic: 'ideographic',
1949
- hanging: 'hanging'
1950
- }; // for FireFox
1951
- // @see https://github.com/plouc/nivo/issues/164
1952
-
1953
- var BASELINE_MAP_FOR_FIREFOX = {
1954
- top: 'text-before-edge',
1955
- middle: 'central',
1956
- bottom: 'text-after-edge',
1957
- alphabetic: 'alphabetic',
1958
- ideographic: 'ideographic',
1959
- hanging: 'hanging'
1960
- };
1961
-
1962
- function updateTextElementAttribute($el, parsedStyle) {
1963
- var textBaseline = parsedStyle.textBaseline,
1964
- lineWidth = parsedStyle.lineWidth,
1965
- metrics = parsedStyle.metrics,
1966
- dx = parsedStyle.dx,
1967
- dy = parsedStyle.dy;
1968
- var browser = detect();
1969
-
1970
- if (browser && browser.name === 'firefox') {
1971
- // compatible with FireFox browser, ref: https://github.com/antvis/g/issues/119
1972
- $el.setAttribute('dominant-baseline', BASELINE_MAP_FOR_FIREFOX[textBaseline] || 'alphabetic');
1973
- } else {
1974
- $el.setAttribute('dominant-baseline', BASELINE_MAP_FOR_FIREFOX[textBaseline]);
1975
- $el.setAttribute('alignment-baseline', BASELINE_MAP[textBaseline]);
1976
- }
1977
-
1978
- $el.setAttribute('paint-order', 'stroke');
1979
- var lines = metrics.lines,
1980
- lineHeight = metrics.lineHeight,
1981
- height = metrics.height;
1982
- var lineNum = lines.length;
1983
- $el.setAttribute('style', "transform:translate(" + dx + "px, " + dy + "px);");
1984
-
1985
- if (lineNum === 1) {
1986
- $el.innerHTML = convertHTML(lines[0]);
1987
- $el.setAttribute('dx', "" + lineWidth / 2);
1988
- } else {
1989
- $el.innerHTML = lines.map(function (line, i) {
1990
- var dx = lineWidth / 2;
1991
- var dy = 0;
1992
-
1993
- if (i === 0) {
1994
- // TODO: handle other textBaseline values
1995
- if (textBaseline === 'middle') {
1996
- dy = lineHeight / 2 - height / 2;
1997
- } else if (textBaseline === 'top' || textBaseline === 'hanging') {
1998
- dy = 0;
1999
- } else if (textBaseline === 'bottom' || textBaseline === 'alphabetic' || textBaseline === 'ideographic') {
2000
- dy = -lineHeight * (lineNum - 1);
2001
- }
2002
- } else {
2003
- dy = lineHeight;
2004
- }
2005
-
2006
- return "<tspan x=\"0\" dx=\"" + dx + "\" dy=\"" + dy + "\">" + convertHTML(line) + "</tspan>";
2007
- }).join('');
2008
- }
2009
- }
2010
-
2011
- var ElementLifeCycleContribution = gLite.Syringe.defineToken('', {
2012
- multiple: false
2013
- });
2014
- var SVGRendererPluginOptions = gLite.Syringe.defineToken('');
2015
-
2016
1922
  function createSVGElement(type, doc) {
2017
1923
  return (doc || document).createElementNS('http://www.w3.org/2000/svg', type);
2018
1924
  }
2019
1925
 
2020
- var _SHAPE2TAGS, _SHAPE_UPDATE_DEPS;
2021
-
2022
- var SHAPE2TAGS = (_SHAPE2TAGS = {}, _SHAPE2TAGS[gLite.Shape.RECT] = 'path', _SHAPE2TAGS[gLite.Shape.CIRCLE] = 'circle', _SHAPE2TAGS[gLite.Shape.ELLIPSE] = 'ellipse', _SHAPE2TAGS[gLite.Shape.IMAGE] = 'image', _SHAPE2TAGS[gLite.Shape.GROUP] = 'g', _SHAPE2TAGS[gLite.Shape.LINE] = 'line', _SHAPE2TAGS[gLite.Shape.POLYLINE] = 'polyline', _SHAPE2TAGS[gLite.Shape.POLYGON] = 'polygon', _SHAPE2TAGS[gLite.Shape.TEXT] = 'text', _SHAPE2TAGS[gLite.Shape.PATH] = 'path', _SHAPE2TAGS[gLite.Shape.HTML] = 'foreignObject', _SHAPE2TAGS);
2023
- var SHAPE_UPDATE_DEPS = (_SHAPE_UPDATE_DEPS = {}, _SHAPE_UPDATE_DEPS[gLite.Shape.CIRCLE] = ['r'], _SHAPE_UPDATE_DEPS[gLite.Shape.ELLIPSE] = ['rx', 'ry'], _SHAPE_UPDATE_DEPS[gLite.Shape.RECT] = ['width', 'height', 'radius'], _SHAPE_UPDATE_DEPS[gLite.Shape.IMAGE] = ['img', 'width', 'height'], _SHAPE_UPDATE_DEPS[gLite.Shape.LINE] = ['x1', 'y1', 'x2', 'y2', 'markerStart', 'markerEnd', 'markerStartOffset', 'markerEndOffset'], _SHAPE_UPDATE_DEPS[gLite.Shape.POLYLINE] = ['points', 'markerStart', 'markerEnd', 'markerMid', 'markerStartOffset', 'markerEndOffset'], _SHAPE_UPDATE_DEPS[gLite.Shape.POLYGON] = ['points', 'markerStart', 'markerEnd', 'markerMid', 'markerStartOffset', 'markerEndOffset'], _SHAPE_UPDATE_DEPS[gLite.Shape.PATH] = ['path', 'markerStart', 'markerEnd', 'markerMid', 'markerStartOffset', 'markerEndOffset'], _SHAPE_UPDATE_DEPS[gLite.Shape.TEXT] = ['text', 'font', 'fontSize', 'fontFamily', 'fontStyle', 'fontWeight', 'fontVariant', 'lineHeight', 'letterSpacing', 'wordWrap', 'wordWrapWidth', 'maxLines', 'leading', 'textBaseline', 'textAlign', 'textTransform', 'textOverflow', // 'whiteSpace',
2024
- 'dx', 'dy'], _SHAPE_UPDATE_DEPS);
2025
-
2026
- var DefaultElementLifeCycleContribution = /*#__PURE__*/function () {
2027
- function DefaultElementLifeCycleContribution(canvasConfig) {
2028
- this.canvasConfig = void 0;
2029
- this.canvasConfig = canvasConfig;
2030
- }
2031
-
2032
- var _proto = DefaultElementLifeCycleContribution.prototype;
2033
-
2034
- _proto.createElement = function createElement(object) {
2035
- var doc = this.canvasConfig.document;
2036
- var type = SHAPE2TAGS[object.nodeName] || 'g';
2037
- return createSVGElement(type, doc || document);
2038
- };
2039
-
2040
- _proto.destroyElement = function destroyElement(object, $el) {};
2041
-
2042
- _proto.shouldUpdateElementAttribute = function shouldUpdateElementAttribute(object, attributeName) {
2043
- var nodeName = object.nodeName;
2044
- return (SHAPE_UPDATE_DEPS[nodeName] || []).indexOf(attributeName) > -1;
2045
- };
2046
-
2047
- _proto.updateElementAttribute = function updateElementAttribute(object) {
2048
- // @ts-ignore
2049
- var $el = object.elementSVG.$el;
2050
- var nodeName = object.nodeName,
2051
- parsedStyle = object.parsedStyle;
2052
-
2053
- switch (nodeName) {
2054
- case gLite.Shape.IMAGE:
2055
- {
2056
- updateImageElementAttribute($el, parsedStyle);
2057
- break;
2058
- }
2059
-
2060
- case gLite.Shape.RECT:
2061
- {
2062
- updateRectElementAttribute($el, parsedStyle);
2063
- break;
2064
- }
2065
-
2066
- case gLite.Shape.LINE:
2067
- {
2068
- updateLineElementAttribute($el, parsedStyle);
2069
- break;
2070
- }
2071
-
2072
- case gLite.Shape.POLYGON:
2073
- case gLite.Shape.POLYLINE:
2074
- {
2075
- updatePolylineElementAttribute($el, parsedStyle);
2076
- break;
2077
- }
2078
-
2079
- case gLite.Shape.PATH:
2080
- {
2081
- updatePathElementAttribute($el, parsedStyle);
2082
- break;
2083
- }
2084
-
2085
- case gLite.Shape.TEXT:
2086
- {
2087
- updateTextElementAttribute($el, parsedStyle);
2088
- break;
2089
- }
2090
- }
2091
- };
2092
-
2093
- return DefaultElementLifeCycleContribution;
2094
- }();
2095
-
2096
- DefaultElementLifeCycleContribution = __decorate([gLite.singleton({
2097
- token: ElementLifeCycleContribution
2098
- }), __param(0, gLite.inject(gLite.CanvasConfig))], DefaultElementLifeCycleContribution);
2099
1926
  var FILTER_PREFIX = 'g-filter-';
2100
1927
  /**
2101
1928
  * use SVG filters, eg. blur, brightness, contrast...
@@ -2807,6 +2634,31 @@
2807
2634
  }();
2808
2635
 
2809
2636
  DefElementManager = __decorate([gLite.singleton(), __param(0, gLite.inject(gLite.CanvasConfig)), __param(1, gLite.inject(gLite.ContextService))], DefElementManager);
2637
+ var ElementLifeCycleContribution = gLite.Syringe.defineToken('', {
2638
+ multiple: false
2639
+ });
2640
+ var SVGRendererPluginOptions = gLite.Syringe.defineToken('');
2641
+
2642
+ function numberToLongString(x) {
2643
+ return x.toFixed(6).replace('.000000', '');
2644
+ }
2645
+
2646
+ function convertHTML(str) {
2647
+ var regex = /[&|<|>|"|']/g;
2648
+ return str.replace(regex, function (match) {
2649
+ if (match === '&') {
2650
+ return '&amp;';
2651
+ } else if (match === '<') {
2652
+ return '&lt;';
2653
+ } else if (match === '>') {
2654
+ return '&gt;';
2655
+ } else if (match === '"') {
2656
+ return '&quot;';
2657
+ } else {
2658
+ return '&apos;';
2659
+ }
2660
+ });
2661
+ }
2810
2662
 
2811
2663
  var _class$1;
2812
2664
 
@@ -2815,11 +2667,13 @@
2815
2667
  opacity: 'opacity',
2816
2668
  fillStyle: 'fill',
2817
2669
  fill: 'fill',
2670
+ fillRule: 'fill-rule',
2818
2671
  fillOpacity: 'fill-opacity',
2819
2672
  strokeStyle: 'stroke',
2820
2673
  strokeOpacity: 'stroke-opacity',
2821
2674
  stroke: 'stroke',
2822
2675
  clipPath: 'clip-path',
2676
+ textPath: 'text-path',
2823
2677
  r: 'r',
2824
2678
  rx: 'rx',
2825
2679
  ry: 'ry',
@@ -2876,6 +2730,7 @@
2876
2730
  lineWidth: '1px',
2877
2731
  opacity: '1',
2878
2732
  fillOpacity: '1',
2733
+ fillRule: 'nonzero',
2879
2734
  strokeOpacity: '1',
2880
2735
  strokeWidth: '0',
2881
2736
  strokeMiterLimit: '4',
@@ -2892,6 +2747,7 @@
2892
2747
 
2893
2748
  var G_SVG_PREFIX = 'g_svg';
2894
2749
  var CLIP_PATH_PREFIX = 'clip-path-';
2750
+ var TEXT_PATH_PREFIX = 'text-path-';
2895
2751
  var SVGRendererPlugin = SVGRendererPlugin_1 = (_class$1 = /*#__PURE__*/function () {
2896
2752
  function SVGRendererPlugin(canvasConfig, camera, contextService, renderingContext, styleValueRegistry, createElementContribution, defElementManager, pluginOptions) {
2897
2753
  this.canvasConfig = void 0;
@@ -3231,7 +3087,9 @@
3231
3087
  $groupEl === null || $groupEl === void 0 ? void 0 : $groupEl.removeAttribute(usedName);
3232
3088
  }
3233
3089
  } else if (name === 'clipPath') {
3234
- _this2.createOrUpdateClipPath(document, usedValue, $groupEl);
3090
+ _this2.createOrUpdateClipOrTextPath(document, usedValue, $groupEl);
3091
+ } else if (name === 'textPath') {
3092
+ _this2.createOrUpdateClipOrTextPath(document, usedValue, $groupEl, true);
3235
3093
  } else if (name === 'shadowType' || name === 'shadowColor' || name === 'shadowBlur' || name === 'shadowOffsetX' || name === 'shadowOffsetY') {
3236
3094
  _this2.defElementManager.createOrUpdateShadow(object, $el, name);
3237
3095
  } else if (name === 'filter') {
@@ -3287,6 +3145,10 @@
3287
3145
  $el.id = G_SVG_PREFIX + "_" + object.nodeName + "_" + object.entity;
3288
3146
  }
3289
3147
 
3148
+ if (this.pluginOptions.outputSVGElementName && object.name) {
3149
+ $el.setAttribute('name', object.name);
3150
+ }
3151
+
3290
3152
  if (($el.hasAttribute('data-wrapgroup') || $el.nodeName !== 'g') && !noWrapWithGroup) {
3291
3153
  $groupEl = createSVGElement('g', document);
3292
3154
  $groupEl.appendChild($el);
@@ -3373,23 +3235,42 @@
3373
3235
  $el.appendChild($div);
3374
3236
  };
3375
3237
 
3376
- _proto.createOrUpdateClipPath = function createOrUpdateClipPath(document, clipPath, $groupEl) {
3238
+ _proto.createOrUpdateClipOrTextPath = function createOrUpdateClipOrTextPath(document, clipPath, $groupEl, isTextPath) {
3239
+ if (isTextPath === void 0) {
3240
+ isTextPath = false;
3241
+ }
3242
+
3243
+ var PREFIX = isTextPath ? TEXT_PATH_PREFIX : CLIP_PATH_PREFIX;
3244
+ var attributeNameCamel = isTextPath ? 'g' : 'clipPath';
3245
+ var attributeNameHyphen = isTextPath ? 'text-path' : 'clip-path';
3246
+
3377
3247
  if (clipPath) {
3378
3248
  var _clipPath$elementSVG;
3379
3249
 
3380
- var clipPathId = CLIP_PATH_PREFIX + clipPath.entity;
3250
+ var clipPathId = PREFIX + clipPath.entity;
3381
3251
  var $def = this.defElementManager.getDefElement();
3382
3252
  var existed = $def.querySelector("#" + clipPathId);
3383
3253
 
3384
3254
  if (!existed) {
3385
- // create <clipPath> dom node, append it to <defs>
3386
- var $clipPath = createSVGElement('clipPath', document);
3387
- $clipPath.id = clipPathId;
3388
- $def.appendChild($clipPath); // <clipPath><circle /></clipPath>
3255
+ var $clipPath;
3256
+
3257
+ if (isTextPath) {
3258
+ // use <path> directly instead of wrapping with <g>
3259
+ this.createSVGDom(document, clipPath, null, true); // @ts-ignore
3389
3260
 
3390
- this.createSVGDom(document, clipPath, $clipPath, true); // @ts-ignore
3261
+ $clipPath = clipPath.elementSVG.$el;
3262
+ } else {
3263
+ // create <clipPath> dom node
3264
+ $clipPath = createSVGElement(attributeNameCamel, document); // <clipPath><circle /></clipPath>
3391
3265
 
3392
- clipPath.elementSVG.$groupEl = $clipPath;
3266
+ this.createSVGDom(document, clipPath, $clipPath, true); // @ts-ignore
3267
+
3268
+ clipPath.elementSVG.$groupEl = $clipPath;
3269
+ }
3270
+
3271
+ $clipPath.id = clipPathId; // append it to <defs>
3272
+
3273
+ $def.appendChild($clipPath);
3393
3274
  } // @ts-ignore
3394
3275
 
3395
3276
 
@@ -3401,13 +3282,18 @@
3401
3282
  } // apply attributes
3402
3283
 
3403
3284
 
3404
- this.applyAttributes(clipPath); // apply clipPath to $group
3405
- // @see https://github.com/antvis/g/issues/961
3285
+ this.applyAttributes(clipPath);
3406
3286
 
3407
- $groupEl.setAttribute('clip-path', "url(#" + clipPathId + ")");
3287
+ if (!isTextPath) {
3288
+ // apply clipPath to $group
3289
+ // @see https://github.com/antvis/g/issues/961
3290
+ $groupEl.setAttribute(attributeNameHyphen, "url(#" + clipPathId + ")");
3291
+ }
3408
3292
  } else {
3409
- // remove clip path
3410
- $groupEl.removeAttribute('clip-path');
3293
+ if (!isTextPath) {
3294
+ // remove clip path
3295
+ $groupEl.removeAttribute(attributeNameHyphen);
3296
+ }
3411
3297
  }
3412
3298
  }
3413
3299
  /**
@@ -3451,6 +3337,199 @@
3451
3337
  SVGRendererPlugin = SVGRendererPlugin_1 = __decorate([gLite.singleton({
3452
3338
  contrib: gLite.RenderingPluginContribution
3453
3339
  }), __param(0, gLite.inject(gLite.CanvasConfig)), __param(1, gLite.inject(gLite.DefaultCamera)), __param(2, gLite.inject(gLite.ContextService)), __param(3, gLite.inject(gLite.RenderingContext)), __param(4, gLite.inject(gLite.StyleValueRegistry)), __param(5, gLite.inject(ElementLifeCycleContribution)), __param(6, gLite.inject(DefElementManager)), __param(7, gLite.inject(SVGRendererPluginOptions))], SVGRendererPlugin);
3340
+ var BASELINE_MAP = {
3341
+ top: 'before-edge',
3342
+ middle: 'central',
3343
+ bottom: 'after-edge',
3344
+ alphabetic: 'alphabetic',
3345
+ ideographic: 'ideographic',
3346
+ hanging: 'hanging'
3347
+ }; // for FireFox
3348
+ // @see https://github.com/plouc/nivo/issues/164
3349
+
3350
+ var BASELINE_MAP_FOR_FIREFOX = {
3351
+ top: 'text-before-edge',
3352
+ middle: 'central',
3353
+ bottom: 'text-after-edge',
3354
+ alphabetic: 'alphabetic',
3355
+ ideographic: 'ideographic',
3356
+ hanging: 'hanging'
3357
+ };
3358
+
3359
+ function updateTextElementAttribute($el, parsedStyle) {
3360
+ var textBaseline = parsedStyle.textBaseline,
3361
+ lineWidth = parsedStyle.lineWidth,
3362
+ metrics = parsedStyle.metrics,
3363
+ dx = parsedStyle.dx,
3364
+ dy = parsedStyle.dy,
3365
+ textPath = parsedStyle.textPath,
3366
+ _parsedStyle$textPath = parsedStyle.textPathSide,
3367
+ textPathSide = _parsedStyle$textPath === void 0 ? 'left' : _parsedStyle$textPath,
3368
+ _parsedStyle$textPath2 = parsedStyle.textPathStartOffset,
3369
+ textPathStartOffset = _parsedStyle$textPath2 === void 0 ? 0 : _parsedStyle$textPath2,
3370
+ _parsedStyle$textDeco = parsedStyle.textDecorationLine,
3371
+ textDecorationLine = _parsedStyle$textDeco === void 0 ? '' : _parsedStyle$textDeco,
3372
+ _parsedStyle$textDeco2 = parsedStyle.textDecorationColor,
3373
+ textDecorationColor = _parsedStyle$textDeco2 === void 0 ? '' : _parsedStyle$textDeco2,
3374
+ _parsedStyle$textDeco3 = parsedStyle.textDecorationStyle,
3375
+ textDecorationStyle = _parsedStyle$textDeco3 === void 0 ? '' : _parsedStyle$textDeco3;
3376
+ var browser = detect();
3377
+
3378
+ if (browser && browser.name === 'firefox') {
3379
+ // compatible with FireFox browser, ref: https://github.com/antvis/g/issues/119
3380
+ $el.setAttribute('dominant-baseline', BASELINE_MAP_FOR_FIREFOX[textBaseline] || 'alphabetic');
3381
+ } else {
3382
+ $el.setAttribute('dominant-baseline', BASELINE_MAP_FOR_FIREFOX[textBaseline]);
3383
+ $el.setAttribute('alignment-baseline', BASELINE_MAP[textBaseline]);
3384
+ }
3385
+
3386
+ $el.setAttribute('paint-order', 'stroke');
3387
+ var lines = metrics.lines,
3388
+ lineHeight = metrics.lineHeight,
3389
+ height = metrics.height;
3390
+ var lineNum = lines.length;
3391
+ var styleCSSText = '';
3392
+
3393
+ if (dx !== 0 || dy !== 0) {
3394
+ styleCSSText += "transform:translate(" + dx + "px, " + dy + "px);";
3395
+ }
3396
+
3397
+ if (textDecorationLine && textDecorationLine !== 'none') {
3398
+ // use CSS text-decoration since the implementation in SVG is not good enough
3399
+ styleCSSText += "text-decoration:" + textDecorationLine + " " + textDecorationStyle + " " + textDecorationColor + ";";
3400
+ }
3401
+
3402
+ if (styleCSSText) {
3403
+ $el.setAttribute('style', styleCSSText);
3404
+ }
3405
+
3406
+ if (lineNum === 1) {
3407
+ var textContent = convertHTML(lines[0]);
3408
+ $el.setAttribute('dx', "" + lineWidth / 2); // <textPath> only support one line
3409
+ // @see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/textPath
3410
+
3411
+ if (textPath) {
3412
+ // clear existed text content first
3413
+ $el.innerHTML = ''; // append <textPath href="#MyPath">text</textPath>
3414
+
3415
+ var $textPath = createSVGElement('textPath', $el.ownerDocument);
3416
+ $textPath.setAttribute('href', "#" + (TEXT_PATH_PREFIX + textPath.entity));
3417
+
3418
+ if (textPathSide !== 'left') {
3419
+ $textPath.setAttribute('side', textPathSide);
3420
+ }
3421
+
3422
+ if (textPathStartOffset !== 0) {
3423
+ $textPath.setAttribute('startOffset', "" + textPathStartOffset);
3424
+ }
3425
+
3426
+ $textPath.innerHTML = textContent;
3427
+ $el.appendChild($textPath);
3428
+ } else {
3429
+ $el.innerHTML = textContent;
3430
+ }
3431
+ } else {
3432
+ $el.innerHTML = lines.map(function (line, i) {
3433
+ var dx = lineWidth / 2;
3434
+ var dy = 0;
3435
+
3436
+ if (i === 0) {
3437
+ // TODO: handle other textBaseline values
3438
+ if (textBaseline === 'middle') {
3439
+ dy = lineHeight / 2 - height / 2;
3440
+ } else if (textBaseline === 'top' || textBaseline === 'hanging') {
3441
+ dy = 0;
3442
+ } else if (textBaseline === 'bottom' || textBaseline === 'alphabetic' || textBaseline === 'ideographic') {
3443
+ dy = -lineHeight * (lineNum - 1);
3444
+ }
3445
+ } else {
3446
+ dy = lineHeight;
3447
+ }
3448
+
3449
+ return "<tspan x=\"0\" dx=\"" + dx + "\" dy=\"" + dy + "\">" + convertHTML(line) + "</tspan>";
3450
+ }).join('');
3451
+ }
3452
+ }
3453
+
3454
+ var _SHAPE2TAGS, _SHAPE_UPDATE_DEPS;
3455
+
3456
+ var SHAPE2TAGS = (_SHAPE2TAGS = {}, _SHAPE2TAGS[gLite.Shape.RECT] = 'path', _SHAPE2TAGS[gLite.Shape.CIRCLE] = 'circle', _SHAPE2TAGS[gLite.Shape.ELLIPSE] = 'ellipse', _SHAPE2TAGS[gLite.Shape.IMAGE] = 'image', _SHAPE2TAGS[gLite.Shape.GROUP] = 'g', _SHAPE2TAGS[gLite.Shape.LINE] = 'line', _SHAPE2TAGS[gLite.Shape.POLYLINE] = 'polyline', _SHAPE2TAGS[gLite.Shape.POLYGON] = 'polygon', _SHAPE2TAGS[gLite.Shape.TEXT] = 'text', _SHAPE2TAGS[gLite.Shape.PATH] = 'path', _SHAPE2TAGS[gLite.Shape.HTML] = 'foreignObject', _SHAPE2TAGS);
3457
+ var SHAPE_UPDATE_DEPS = (_SHAPE_UPDATE_DEPS = {}, _SHAPE_UPDATE_DEPS[gLite.Shape.CIRCLE] = ['r'], _SHAPE_UPDATE_DEPS[gLite.Shape.ELLIPSE] = ['rx', 'ry'], _SHAPE_UPDATE_DEPS[gLite.Shape.RECT] = ['width', 'height', 'radius'], _SHAPE_UPDATE_DEPS[gLite.Shape.IMAGE] = ['img', 'width', 'height'], _SHAPE_UPDATE_DEPS[gLite.Shape.LINE] = ['x1', 'y1', 'x2', 'y2', 'markerStart', 'markerEnd', 'markerStartOffset', 'markerEndOffset'], _SHAPE_UPDATE_DEPS[gLite.Shape.POLYLINE] = ['points', 'markerStart', 'markerEnd', 'markerMid', 'markerStartOffset', 'markerEndOffset'], _SHAPE_UPDATE_DEPS[gLite.Shape.POLYGON] = ['points', 'markerStart', 'markerEnd', 'markerMid', 'markerStartOffset', 'markerEndOffset'], _SHAPE_UPDATE_DEPS[gLite.Shape.PATH] = ['path', 'markerStart', 'markerEnd', 'markerMid', 'markerStartOffset', 'markerEndOffset'], _SHAPE_UPDATE_DEPS[gLite.Shape.TEXT] = ['text', 'font', 'fontSize', 'fontFamily', 'fontStyle', 'fontWeight', 'fontVariant', 'lineHeight', 'letterSpacing', 'wordWrap', 'wordWrapWidth', 'maxLines', 'leading', 'textBaseline', 'textAlign', 'textTransform', 'textOverflow', 'textPath', 'textPathSide', 'textPathStartOffset', 'textDecorationLine', 'textDecorationColor', 'textDecorationStyle', // 'whiteSpace',
3458
+ 'dx', 'dy'], _SHAPE_UPDATE_DEPS);
3459
+
3460
+ var DefaultElementLifeCycleContribution = /*#__PURE__*/function () {
3461
+ function DefaultElementLifeCycleContribution(canvasConfig) {
3462
+ this.canvasConfig = void 0;
3463
+ this.canvasConfig = canvasConfig;
3464
+ }
3465
+
3466
+ var _proto = DefaultElementLifeCycleContribution.prototype;
3467
+
3468
+ _proto.createElement = function createElement(object) {
3469
+ var doc = this.canvasConfig.document;
3470
+ var type = SHAPE2TAGS[object.nodeName] || 'g';
3471
+ return createSVGElement(type, doc || document);
3472
+ };
3473
+
3474
+ _proto.destroyElement = function destroyElement(object, $el) {};
3475
+
3476
+ _proto.shouldUpdateElementAttribute = function shouldUpdateElementAttribute(object, attributeName) {
3477
+ var nodeName = object.nodeName;
3478
+ return (SHAPE_UPDATE_DEPS[nodeName] || []).indexOf(attributeName) > -1;
3479
+ };
3480
+
3481
+ _proto.updateElementAttribute = function updateElementAttribute(object) {
3482
+ // @ts-ignore
3483
+ var $el = object.elementSVG.$el;
3484
+ var nodeName = object.nodeName,
3485
+ parsedStyle = object.parsedStyle;
3486
+
3487
+ switch (nodeName) {
3488
+ case gLite.Shape.IMAGE:
3489
+ {
3490
+ updateImageElementAttribute($el, parsedStyle);
3491
+ break;
3492
+ }
3493
+
3494
+ case gLite.Shape.RECT:
3495
+ {
3496
+ updateRectElementAttribute($el, parsedStyle);
3497
+ break;
3498
+ }
3499
+
3500
+ case gLite.Shape.LINE:
3501
+ {
3502
+ updateLineElementAttribute($el, parsedStyle);
3503
+ break;
3504
+ }
3505
+
3506
+ case gLite.Shape.POLYGON:
3507
+ case gLite.Shape.POLYLINE:
3508
+ {
3509
+ updatePolylineElementAttribute($el, parsedStyle);
3510
+ break;
3511
+ }
3512
+
3513
+ case gLite.Shape.PATH:
3514
+ {
3515
+ updatePathElementAttribute($el, parsedStyle);
3516
+ break;
3517
+ }
3518
+
3519
+ case gLite.Shape.TEXT:
3520
+ {
3521
+ updateTextElementAttribute($el, parsedStyle);
3522
+ break;
3523
+ }
3524
+ }
3525
+ };
3526
+
3527
+ return DefaultElementLifeCycleContribution;
3528
+ }();
3529
+
3530
+ DefaultElementLifeCycleContribution = __decorate([gLite.singleton({
3531
+ token: ElementLifeCycleContribution
3532
+ }), __param(0, gLite.inject(gLite.CanvasConfig))], DefaultElementLifeCycleContribution);
3454
3533
  var containerModule$1 = gLite.Module(function (register) {
3455
3534
  register(DefElementManager);
3456
3535
  register(DefaultElementLifeCycleContribution);
@@ -3477,10 +3556,13 @@
3477
3556
  var _proto = Plugin.prototype;
3478
3557
 
3479
3558
  _proto.init = function init() {
3480
- var outputSVGElementId = this.options.outputSVGElementId;
3559
+ var _this$options = this.options,
3560
+ outputSVGElementId = _this$options.outputSVGElementId,
3561
+ outputSVGElementName = _this$options.outputSVGElementName;
3481
3562
  this.container.register(SVGRendererPluginOptions, {
3482
3563
  useValue: {
3483
- outputSVGElementId: !isNil(outputSVGElementId) ? !!outputSVGElementId : true
3564
+ outputSVGElementId: !isNil(outputSVGElementId) ? !!outputSVGElementId : true,
3565
+ outputSVGElementName: !isNil(outputSVGElementName) ? !!outputSVGElementName : true
3484
3566
  }
3485
3567
  });
3486
3568
  this.container.load(containerModule$1, true);
@@ -3496,6 +3578,7 @@
3496
3578
 
3497
3579
  var index_esm$1 = /*#__PURE__*/Object.freeze({
3498
3580
  __proto__: null,
3581
+ CLIP_PATH_PREFIX: CLIP_PATH_PREFIX,
3499
3582
  DEFAULT_VALUE_MAP: DEFAULT_VALUE_MAP,
3500
3583
  get DefaultElementLifeCycleContribution () { return DefaultElementLifeCycleContribution; },
3501
3584
  ElementLifeCycleContribution: ElementLifeCycleContribution,
@@ -3507,6 +3590,7 @@
3507
3590
  get SVGRendererPlugin () { return SVGRendererPlugin; },
3508
3591
  SVGRendererPluginOptions: SVGRendererPluginOptions,
3509
3592
  SVG_ATTR_MAP: SVG_ATTR_MAP,
3593
+ TEXT_PATH_PREFIX: TEXT_PATH_PREFIX,
3510
3594
  containerModule: containerModule$1,
3511
3595
  createSVGElement: createSVGElement,
3512
3596
  updateImageElementAttribute: updateImageElementAttribute,
@@ -1,9 +1,9 @@
1
1
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.SVG={}),t.window.G)}(this,(function(t,e){"use strict";function r(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),o=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function f(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(L([])));m&&m!==e&&n.call(m,o)&&(v=m);var y=p.prototype=f.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,u(y,"constructor",p),u(p,"constructor",d),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,u,"next",t)}function u(t){n(a,i,o,s,u,"throw",t)}s(void 0)}))}}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e,r,n){var i,o=arguments.length,a=3>o?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function u(t,e){return function(r,n){e(r,n,t)}}function c(){
3
+ r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),o=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function f(){}function d(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(L([])));g&&g!==e&&n.call(g,o)&&(v=g);var y=p.prototype=f.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,u(y,"constructor",p),u(p,"constructor",d),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,u,"next",t)}function u(t){n(a,i,o,s,u,"throw",t)}s(void 0)}))}}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e,r,n){var i,o=arguments.length,a=3>o?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(3>o?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function u(t,e){return function(r,n){e(r,n,t)}}function c(){
4
4
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
5
- c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),o=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};s(v,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(L([])));m&&m!==e&&r.call(m,i)&&(v=m);var y=p.prototype=f.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,s(y,"constructor",p),s(p,"constructor",d),d.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),s(w.prototype,o,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function l(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}var d,p,v=(d=function(){function t(t,e){this.contextService=void 0,this.renderingContext=void 0,this.contextService=t,this.renderingContext=e}return t.prototype.apply=function(t){var e=this,r=this.renderingContext.root.ownerDocument.defaultView,n=function(e){t.hooks.pointerMove.call(e)},i=function(e){t.hooks.pointerUp.call(e)},o=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},s=function(e){t.hooks.pointerOut.call(e)},u=function(e){t.hooks.pointerCancel.call(e)},l=function(e){t.hooks.pointerWheel.call(e)},f=function(t){globalThis.document.addEventListener("pointermove",n,!0),t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerleave",s,!0),t.addEventListener("pointerover",a,!0),globalThis.addEventListener("pointerup",i,!0)},d=function(t){t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",i,!0),t.addEventListener("touchmove",n,!0),t.addEventListener("touchcancel",u,!0)},v=function(t){globalThis.document.addEventListener("mousemove",n,!0),t.addEventListener("mousedown",o,!0),t.addEventListener("mouseout",s,!0),t.addEventListener("mouseover",a,!0),globalThis.addEventListener("mouseup",i,!0)};t.hooks.init.tapPromise(p.tag,h(c().mark((function t(){var n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="none",n.style.msTouchAction="none"):r.supportsPointerEvents&&(n.style.touchAction="none"),r.supportsPointerEvents?f(n):v(n),r.supportsTouchEvents&&d(n),n.addEventListener("wheel",l,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(p.tag,(function(){var t=e.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):r.supportsPointerEvents&&(t.style.touchAction=""),r.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",n,!0),t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerleave",s,!0),t.removeEventListener("pointerover",a,!0),globalThis.removeEventListener("pointerup",i,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",n,!0),t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseout",s,!0),t.removeEventListener("mouseover",a,!0),globalThis.removeEventListener("mouseup",i,!0)}(t),r.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",i,!0),t.removeEventListener("touchmove",n,!0),t.removeEventListener("touchcancel",u,!0)}(t),t.removeEventListener("wheel",l,!0)}))},t}(),d.tag="DOMInteraction",p=d);v=p=s([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.ContextService)),u(1,e.inject(e.RenderingContext))],v);var g=e.Module((function(t){t(v)})),m=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,f(e,r);var i=n.prototype;return i.init=function(){this.container.load(g,!0)},i.destroy=function(){this.container.unload(g)},n}(e.AbstractRendererPlugin),y=Object.freeze({__proto__:null,Plugin:m}),b={}.toString,w=function(t){return null==t},E=function(t){return e="String",b.call(t)==="[object "+e+"]";var e},A=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;o>i;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},S=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},x=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},L=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},O=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},C=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},k=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,T=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],G=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function P(t){return t?_(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new C:"undefined"!=typeof navigator?_(navigator.userAgent):"undefined"!=typeof process&&process.version?new x(process.version.slice(1)):null}function _(t){var e=function(t){return""!==t&&T.reduce((function(e,r){var n=r[0];if(e)return e;var i=r[1].exec(t);return!!i&&[n,i]}),!1)}(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new O;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?3>i.length&&(i=A(A([],i,!0),function(t){for(var e=[],r=0;t>r;r++)e.push("0");return e}(3-i.length),!0)):i=[];var o=i.join("."),a=function(t){for(var e=0,r=G.length;r>e;e++){var n=G[e],i=n[0];if(n[1].exec(t))return i}return null}(t),s=k.exec(t);return s&&s[1]?new L(r,o,a,s[1]):new S(r,o,a)}function M(){
5
+ c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),o=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};s(v,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(L([])));g&&g!==e&&r.call(g,i)&&(v=g);var y=p.prototype=f.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,s(y,"constructor",p),s(p,"constructor",d),d.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),s(w.prototype,o,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function l(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}var d,p,v=(d=function(){function t(t,e){this.contextService=void 0,this.renderingContext=void 0,this.contextService=t,this.renderingContext=e}return t.prototype.apply=function(t){var e=this,r=this.renderingContext.root.ownerDocument.defaultView,n=function(e){t.hooks.pointerMove.call(e)},i=function(e){t.hooks.pointerUp.call(e)},o=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},s=function(e){t.hooks.pointerOut.call(e)},u=function(e){t.hooks.pointerCancel.call(e)},l=function(e){t.hooks.pointerWheel.call(e)},f=function(t){globalThis.document.addEventListener("pointermove",n,!0),t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerleave",s,!0),t.addEventListener("pointerover",a,!0),globalThis.addEventListener("pointerup",i,!0)},d=function(t){t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",i,!0),t.addEventListener("touchmove",n,!0),t.addEventListener("touchcancel",u,!0)},v=function(t){globalThis.document.addEventListener("mousemove",n,!0),t.addEventListener("mousedown",o,!0),t.addEventListener("mouseout",s,!0),t.addEventListener("mouseover",a,!0),globalThis.addEventListener("mouseup",i,!0)};t.hooks.init.tapPromise(p.tag,h(c().mark((function t(){var n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="none",n.style.msTouchAction="none"):r.supportsPointerEvents&&(n.style.touchAction="none"),r.supportsPointerEvents?f(n):v(n),r.supportsTouchEvents&&d(n),n.addEventListener("wheel",l,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(p.tag,(function(){var t=e.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):r.supportsPointerEvents&&(t.style.touchAction=""),r.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",n,!0),t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerleave",s,!0),t.removeEventListener("pointerover",a,!0),globalThis.removeEventListener("pointerup",i,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",n,!0),t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseout",s,!0),t.removeEventListener("mouseover",a,!0),globalThis.removeEventListener("mouseup",i,!0)}(t),r.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",i,!0),t.removeEventListener("touchmove",n,!0),t.removeEventListener("touchcancel",u,!0)}(t),t.removeEventListener("wheel",l,!0)}))},t}(),d.tag="DOMInteraction",p=d);v=p=s([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.ContextService)),u(1,e.inject(e.RenderingContext))],v);var m=e.Module((function(t){t(v)})),g=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,f(e,r);var i=n.prototype;return i.init=function(){this.container.load(m,!0)},i.destroy=function(){this.container.unload(m)},n}(e.AbstractRendererPlugin),y=Object.freeze({__proto__:null,Plugin:g}),b={}.toString,w=function(t){return null==t},E=function(t){return e="String",b.call(t)==="[object "+e+"]";var e},A=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;o>i;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},S=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},x=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},L=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},O=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},C=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},k=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,T=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],P=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function G(t){return t?_(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new C:"undefined"!=typeof navigator?_(navigator.userAgent):"undefined"!=typeof process&&process.version?new x(process.version.slice(1)):null}function _(t){var e=function(t){return""!==t&&T.reduce((function(e,r){var n=r[0];if(e)return e;var i=r[1].exec(t);return!!i&&[n,i]}),!1)}(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new O;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?3>i.length&&(i=A(A([],i,!0),function(t){for(var e=[],r=0;t>r;r++)e.push("0");return e}(3-i.length),!0)):i=[];var o=i.join("."),a=function(t){for(var e=0,r=P.length;r>e;e++){var n=P[e],i=n[0];if(n[1].exec(t))return i}return null}(t),s=k.exec(t);return s&&s[1]?new L(r,o,a,s[1]):new S(r,o,a)}function M(){
6
6
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
7
- M=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(x([])));g&&g!==e&&r.call(g,i)&&(p=g);var m=d.prototype=h.prototype=Object.create(p);function y(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=d,s(m,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},y(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(m),s(m,a,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function j(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function N(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){j(o,n,i,a,s,"next",t)}function s(t){j(o,n,i,a,s,"throw",t)}a(void 0)}))}}function $(){return $=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$.apply(this,arguments)}function D(t,e){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},D(t,e)}var I=function(){this.$el=void 0,this.$groupEl=void 0,this.$hitTestingEl=void 0};function R(t,e){var r=e.img,n=void 0===r?"":r,i=e.width,o=e.height;if(t.setAttribute("x","0"),t.setAttribute("y","0"),E(n))t.setAttribute("href",n);else if(n instanceof Image)i||t.setAttribute("width",""+n.width),o||t.setAttribute("height",""+n.height),t.setAttribute("href",n.src);else if(n instanceof HTMLElement&&E(n.nodeName)&&"CANVAS"===n.nodeName.toUpperCase())t.setAttribute("href",n.toDataURL());else if(n instanceof ImageData){var a=document.createElement("canvas");a.setAttribute("width",""+n.width),a.setAttribute("height",""+n.height);var s=a.getContext("2d");s&&(s.putImageData(n,0,0),i||t.setAttribute("width",""+n.width),o||t.setAttribute("height",""+n.height),t.setAttribute("href",a.toDataURL()))}}function V(t,r){var n,i,o=r.x1,a=r.y1,s=r.x2,u=r.y2,c=r.defX,l=void 0===c?0:c,h=r.defY,f=void 0===h?0:h,d=r.markerStart,p=r.markerEnd,v=r.markerStartOffset,g=r.markerEndOffset,m=0,y=0,b=0,w=0,E=0;d&&d instanceof e.DisplayObject&&v&&(n=s-o,i=u-a,E=Math.atan2(i,n),m=Math.cos(E)*(v||0),y=Math.sin(E)*(v||0)),p&&p instanceof e.DisplayObject&&g&&(n=o-s,i=a-u,E=Math.atan2(i,n),b=Math.cos(E)*(g||0),w=Math.sin(E)*(g||0)),t.setAttribute("x1",""+(o-l+m)),t.setAttribute("y1",""+(a-f+y)),t.setAttribute("x2",""+(s-l+b)),t.setAttribute("y2",""+(u-f+w))}function W(t,r){var n,i,o=r.path,a=r.defX,s=void 0===a?0:a,u=r.defY,c=void 0===u?0:u,l=r.markerStart,h=r.markerEnd,f=r.markerStartOffset,d=r.markerEndOffset,p=0,v=0,g=0,m=0,y=0;if(l&&l instanceof e.DisplayObject&&f){var b=l.parentNode.getStartTangent(),w=b[0],E=b[1];n=w[0]-E[0],i=w[1]-E[1],y=Math.atan2(i,n),p=Math.cos(y)*(f||0),v=Math.sin(y)*(f||0)}if(h&&h instanceof e.DisplayObject&&d){var A=h.parentNode.getEndTangent(),S=A[0],x=A[1];n=S[0]-x[0],i=S[1]-x[1],y=Math.atan2(i,n),g=Math.cos(y)*(d||0),m=Math.sin(y)*(d||0)}t.setAttribute("d",e.translatePathToString(o.absolutePath,s,c,p,v,g,m))}function U(t,r){var n=r.points.points,i=r.defX,o=void 0===i?0:i,a=r.defY,s=void 0===a?0:a,u=r.markerStart,c=r.markerStartOffset,l=r.markerEnd,h=r.markerEndOffset,f=n.length;if(n&&f>=2){var d,p,v=0,g=0,m=0,y=0,b=0;u&&u instanceof e.DisplayObject&&c&&(d=n[1][0]-n[0][0],p=n[1][1]-n[0][1],b=Math.atan2(p,d),v=Math.cos(b)*(c||0),g=Math.sin(b)*(c||0)),l&&l instanceof e.DisplayObject&&h&&(d=n[f-2][0]-n[f-1][0],p=n[f-2][1]-n[f-1][1],b=Math.atan2(p,d),m=Math.cos(b)*(h||0),y=Math.sin(b)*(h||0)),t.setAttribute("points",n.map((function(t,e){var r=0,n=0;return 0===e?(r=v,n=g):e===f-1&&(r=m,n=y),t[0]-o+r+","+(t[1]-s+n)})).join(" "))}}function F(t,e){var r=e.radius,n=e.width,i=e.height;if(isFinite(n)&&isFinite(i)){var o="";if(r&&r.some((function(t){return 0!==t}))){var a=r.map((function(t){return e=t,r=0,o=Math.min(Math.abs(n)/2,Math.abs(i)/2),r>e?r:e>o?o:e;var e,r,o})),s=a[0],u=a[1],c=a[2],l=a[3],h=n>0?1:-1,f=i>0?1:-1,d=h+f!==0?1:0;o=[["M "+h*s+",0"],["l "+(n-h*(s+u))+",0"],["a "+u+","+u+",0,0,"+d+","+h*u+","+f*u],["l 0,"+(i-f*(u+c))],["a "+c+","+c+",0,0,"+d+","+-h*c+","+f*c],["l "+(h*(c+l)-n)+",0"],["a "+l+","+l+",0,0,"+d+","+-h*l+","+-f*l],["l 0,"+(f*(l+s)-i)],["a "+s+","+s+",0,0,"+d+","+h*s+","+-f*s],["z"]].join(" ")}else o="M 0,0 l "+n+",0 l 0,"+i+" l"+-n+" 0 z";t.setAttribute("d",o)}}function B(t){return t.toFixed(6).replace(".000000","")}function H(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&amp;":"<"===t?"&lt;":">"===t?"&gt;":'"'===t?"&quot;":"&apos;"}))}I.tag="c-svg-element";var Y={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},X={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"};function z(t,e){var r=e.textBaseline,n=e.lineWidth,i=e.metrics,o=e.dx,a=e.dy,s=P();s&&"firefox"===s.name?t.setAttribute("dominant-baseline",X[r]||"alphabetic"):(t.setAttribute("dominant-baseline",X[r]),t.setAttribute("alignment-baseline",Y[r])),t.setAttribute("paint-order","stroke");var u=i.lines,c=i.lineHeight,l=i.height,h=u.length;t.setAttribute("style","transform:translate("+o+"px, "+a+"px);"),1===h?(t.innerHTML=H(u[0]),t.setAttribute("dx",""+n/2)):t.innerHTML=u.map((function(t,e){var i=0;return 0===e?"middle"===r?i=c/2-l/2:"top"===r||"hanging"===r?i=0:"bottom"!==r&&"alphabetic"!==r&&"ideographic"!==r||(i=-c*(h-1)):i=c,'<tspan x="0" dx="'+n/2+'" dy="'+i+'">'+H(t)+"</tspan>"})).join("")}var Q,q,K=e.Syringe.defineToken("",{multiple:!1}),J=e.Syringe.defineToken("");function Z(t,e){return(e||document).createElementNS("http://www.w3.org/2000/svg",t)}var tt=((Q={})[e.Shape.RECT]="path",Q[e.Shape.CIRCLE]="circle",Q[e.Shape.ELLIPSE]="ellipse",Q[e.Shape.IMAGE]="image",Q[e.Shape.GROUP]="g",Q[e.Shape.LINE]="line",Q[e.Shape.POLYLINE]="polyline",Q[e.Shape.POLYGON]="polygon",Q[e.Shape.TEXT]="text",Q[e.Shape.PATH]="path",Q[e.Shape.HTML]="foreignObject",Q),et=((q={})[e.Shape.CIRCLE]=["r"],q[e.Shape.ELLIPSE]=["rx","ry"],q[e.Shape.RECT]=["width","height","radius"],q[e.Shape.IMAGE]=["img","width","height"],q[e.Shape.LINE]=["x1","y1","x2","y2","markerStart","markerEnd","markerStartOffset","markerEndOffset"],q[e.Shape.POLYLINE]=["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],q[e.Shape.POLYGON]=["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],q[e.Shape.PATH]=["path","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],q[e.Shape.TEXT]=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","maxLines","leading","textBaseline","textAlign","textTransform","textOverflow","dx","dy"],q),rt=function(){function t(t){this.canvasConfig=void 0,this.canvasConfig=t}var r=t.prototype;return r.createElement=function(t){return Z(tt[t.nodeName]||"g",this.canvasConfig.document||document)},r.destroyElement=function(t,e){},r.shouldUpdateElementAttribute=function(t,e){return(et[t.nodeName]||[]).indexOf(e)>-1},r.updateElementAttribute=function(t){var r=t.elementSVG.$el,n=t.parsedStyle;switch(t.nodeName){case e.Shape.IMAGE:R(r,n);break;case e.Shape.RECT:F(r,n);break;case e.Shape.LINE:V(r,n);break;case e.Shape.POLYGON:case e.Shape.POLYLINE:U(r,n);break;case e.Shape.PATH:W(r,n);break;case e.Shape.TEXT:z(r,n)}},t}();rt=s([e.singleton({token:K}),u(0,e.inject(e.CanvasConfig))],rt);var nt="g-filter-";function it(t,r,n,i,o){var a=nt+n.entity,s=r.querySelectorAll("[name="+a+"]");if(s.length&&s.forEach((function(t){r.removeChild(t)})),0===o.length)null==i||i.removeAttribute("filter");else{var u=o.map((function(n,i){var o=n.name,s=n.params,u=Z("filter",t);return u.setAttribute("filterUnits","userSpaceOnUse"),"blur"===o?function(t,e,r){var n=Z("feGaussianBlur",t);n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation",""+r[0].value),e.appendChild(n)}(t,u,s):"brightness"===o?function(t,e,r){var n=ot(r[0]);at(t,e,{type:"linear",slope:n,intercept:0})}(t,u,s):"drop-shadow"===o?function(t,e,r){var n=r[0].value,i=r[1].value,o=r[2].value,a=r[3].formatted,s=Z("feGaussianBlur",t);s.setAttribute("in","SourceAlpha"),s.setAttribute("stdDeviation",""+o),e.appendChild(s);var u=Z("feOffset",t);u.setAttribute("dx",""+n),u.setAttribute("dy",""+i),u.setAttribute("result","offsetblur"),e.appendChild(u);var c=Z("feFlood",t);c.setAttribute("flood-color",a),e.appendChild(c);var l=Z("feComposite",t);l.setAttribute("in2","offsetblur"),l.setAttribute("operator","in"),e.appendChild(l);var h=Z("feMerge",t);e.appendChild(h);var f=Z("feMergeNode",t),d=Z("feMergeNode",t);d.setAttribute("in","SourceGraphic"),h.appendChild(f),h.appendChild(d)}(t,u,s):"contrast"===o?function(t,e,r){var n=ot(r[0]);at(t,e,{type:"linear",slope:n,intercept:-.5*n+.5})}(t,u,s):"grayscale"===o?function(t,e,r){var n=ot(r[0]);st(t,e,[.2126+.7874*(1-n),.7152-.7152*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152+.2848*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152-.7152*(1-n),.0722+.9278*(1-n),0,0,0,0,0,1,0])}(t,u,s):"sepia"===o?function(t,e,r){var n=ot(r[0]);st(t,e,[.393+.607*(1-n),.769-.769*(1-n),.189-.189*(1-n),0,0,.349-.349*(1-n),.686+.314*(1-n),.168-.168*(1-n),0,0,.272-.272*(1-n),.534-.534*(1-n),.131+.869*(1-n),0,0,0,0,0,1,0])}(t,u,s):"saturate"===o?function(t,e,r){var n=ot(r[0]),i=Z("feColorMatrix",t);i.setAttribute("type","saturate"),i.setAttribute("values",""+n),e.appendChild(i)}(t,u,s):"hue-rotate"===o?function(t,r,n){var i=Z("feColorMatrix",t);i.setAttribute("type","hueRotate"),i.setAttribute("values",""+n[0].to(e.UnitType.kDegrees).value),r.appendChild(i)}(t,u,s):"invert"===o&&function(t,e,r){var n=ot(r[0]);at(t,e,{type:"table",tableValues:n+" "+(1-n)})}(t,u,s),u.id=a+"-"+i,u.setAttribute("name",a),r.appendChild(u),u.id}));setTimeout((function(){null==i||i.setAttribute("filter",u.map((function(t){return"url(#"+t+")"})).join(" "))}))}}function ot(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function at(t,e,r){var n=r.type,i=r.slope,o=r.intercept,a=r.tableValues,s=Z("feComponentTransfer",t);[Z("feFuncR",t),Z("feFuncG",t),Z("feFuncB",t)].forEach((function(t){t.setAttribute("type",n),"table"===n?t.setAttribute("tableValues",""+a):(t.setAttribute("slope",""+i),t.setAttribute("intercept",""+o)),s.appendChild(t)})),e.appendChild(s)}function st(t,e,r){var n=Z("feColorMatrix",t);n.setAttribute("type","matrix"),n.setAttribute("values",r.join(" ")),e.appendChild(n)}var ut={},ct=0;function lt(t,r,n,i,o,a,s){if(!o)return"";if(!(o instanceof e.CSSRGB)){if(e.isPattern(o)){var u=function(t,r,n,i,o){var a=ht(i);if(!r.querySelector("#"+a)){var s=i.image,u=i.repetition,c="";if(E(s)?c=s:e.isBrowser&&(s instanceof HTMLImageElement?c=s.src:s instanceof HTMLCanvasElement&&(c=s.toDataURL())),c){var l=Z("pattern",t);l.setAttribute("patternUnits","userSpaceOnUse");var h,f=Z("image",t);l.appendChild(f),l.id=a,r.appendChild(l),f.setAttribute("href",c),o?h=o(c):e.isBrowser&&(h=new window.Image),c.match(/^data:/i)||(h.crossOrigin="Anonymous",f.setAttribute("crossorigin","anonymous")),h.src=c;var d=function(){l.setAttribute("x","0"),l.setAttribute("y","0");var t=n.getGeometryBounds().halfExtents,e=h.width,r=h.height;"repeat-x"===u?r=2*t[1]:"repeat-y"===u?e=2*t[0]:"no-repeat"===u&&(e=2*t[0],r=2*t[1]),l.setAttribute("width",""+e),l.setAttribute("height",""+r),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("width",""+h.width),f.setAttribute("height",""+h.height)};h.complete?d():(h.onload=d,h.src=h.src)}}return a}(t,r,n,o,s);return i.style[a]="url(#"+u+")",u}if(1===o.length){var c=ft(t,n,r,i,o[0]);return null==i||i.setAttribute(a,"url(#"+c+")"),c}var l=function(t,e,r,n,i){var o=nt+e.entity+"-gradient",a=r.querySelector("#"+o);a||((a=Z("filter",t)).setAttribute("filterUnits","userSpaceOnUse"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.id=o,r.appendChild(a));var s=0;i.forEach((function(i,u){var c=ft(t,e,r,n,i),l=c+"_rect",h=Z("rect",t);h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width","100%"),h.setAttribute("height","100%"),h.setAttribute("fill","url(#"+c+")"),h.id=l,r.appendChild(h);var f=Z("feImage",t);if(f.setAttribute("href","#"+l),f.setAttribute("result",o+"-"+u),a.appendChild(f),u>0){var d=Z("feBlend",t);d.setAttribute("in",1===u?o+"-"+(u-1):o+"-blended-"+(s-1)),d.setAttribute("in2",o+"-"+u),d.setAttribute("result",o+"-blended-"+s++),d.setAttribute("mode","multiply"),a.appendChild(d)}}));var u=Z("feComposite",t);return u.setAttribute("in",o+"-blended-"+s),u.setAttribute("in2","SourceGraphic"),u.setAttribute("operator","in"),a.appendChild(u),o}(t,n,r,i,o);return null==i||i.setAttribute("filter","url(#"+l+")"),null==i||i.setAttribute("fill","black"),l}return"currentColor"===n.style[a]?null==i||i.setAttribute(a,"currentColor"):null==i||i.setAttribute(a,o.isNone?"none":o.toString()),""}function ht(t,r){void 0===r&&(r={});var n="";if(t instanceof e.CSSGradientValue){var i=t.type;if(i===e.GradientType.LinearGradient||i===e.GradientType.RadialGradient){var o=$({},t.value,r),a=o.width,s=o.height,u=o.steps,c=o.angle,l=o.cx,h=o.cy,f=o.size;n="gradient-"+o.type+"-"+((null==c?void 0:c.toString())||0)+"-"+((null==l?void 0:l.toString())||0)+"-"+((null==h?void 0:h.toString())||0)+"-"+((null==f?void 0:f.toString())||0)+"-"+a+"-"+s+"-"+u.map((function(t){return""+t.offset+t.color})).join("-")}}else e.isPattern(t)&&(n=E(t.image)?"pattern-"+t.image+"-"+t.repetition:"pattern-"+ct);return n&&(ut[n]||(ut[n]="g-pattern-"+ct++)),ut[n]}function ft(t,r,n,i,o){var a=r.getGeometryBounds(),s=a&&2*a.halfExtents[0]||0,u=a&&2*a.halfExtents[1]||0,c=ht(o,{width:s,height:u}),l=n.querySelector("#"+c);if(!l){(l=Z(o.type===e.GradientType.LinearGradient?"linearGradient":"radialGradient",t)).setAttribute("gradientUnits","userSpaceOnUse");var h="";o.value.steps.sort((function(t,e){return t.offset.value-e.offset.value})).forEach((function(t){h+='<stop offset="'+t.offset.value/100+'" stop-color="'+t.color+'"></stop>'})),l.innerHTML=h,l.id=c,n.appendChild(l)}if(o.type===e.GradientType.LinearGradient){var f=e.computeLinearGradient(s,u,o.value.angle),d=f.y1,p=f.x2,v=f.y2;l.setAttribute("x1",""+f.x1),l.setAttribute("y1",""+d),l.setAttribute("x2",""+p),l.setAttribute("y2",""+v)}else{var g=o.value,m=e.computeRadialGradient(s,u,g.cx,g.cy,g.size),y=m.y,b=m.r;l.setAttribute("cx",""+m.x),l.setAttribute("cy",""+y),l.setAttribute("r",""+b)}return c}var dt,pt,vt=/url\(#(.*)\)/,gt=function(){function t(t,e){this.canvasConfig=void 0,this.contextService=void 0,this.$def=void 0,this.gradientCache={},this.canvasConfig=t,this.contextService=e}var e=t.prototype;return e.getDefElement=function(){return this.$def},e.init=function(){var t=this.canvasConfig.document,e=this.contextService.getContext();this.$def=Z("defs",t),e.appendChild(this.$def)},e.clear=function(t){var e=this;Object.keys(this.gradientCache).forEach((function(r){e.clearUnusedDefElement(e.gradientCache,r,t)}))},e.clearUnusedDefElement=function(t,e,r){if(t[e]&&1===t[e].size&&t[e].has(r)){var n=this.$def.querySelector("#"+e);n&&this.$def.removeChild(n)}},e.createOrUpdateGradientAndPattern=function(t,e,r,n){var i=this.canvasConfig,o=i.document,a=i.createImage;if(e){var s,u=null===(s=e.getAttribute(n))||void 0===s?void 0:s.match(vt);u&&u.length>1&&this.clearUnusedDefElement(this.gradientCache,u[1],t.entity);var c=lt(o||document,this.$def,t,e,r,n,a);this.gradientCache[c]||(this.gradientCache[c]=new Set),this.gradientCache[c].add(t.entity)}},e.createOrUpdateShadow=function(t,e,r){!function(t,e,r,n,i){var o=r.parsedStyle,a=o.shadowType,s=o.shadowBlur,u=o.shadowColor,c=o.shadowOffsetX,l=o.shadowOffsetY,h=!w(u)&&s>0,f="g-filter-dropshadow-"+r.entity,d=e.querySelector("#"+f);if(d&&(d.getAttribute("data-type")===a&&h||(d.remove(),d=null)),h){if(null==n||n.setAttribute("filter","url(#"+f+")"),!d){if((d=Z("filter",t)).setAttribute("data-type",a),"outer"===a){var p=Z("feDropShadow",t);p.setAttribute("dx",""+(c||0)/2),p.setAttribute("dy",""+(l||0)/2),p.setAttribute("stdDeviation",""+(s||0)/4),p.setAttribute("flood-color",u.toString()),d.appendChild(p)}else if("inner"===a){var v=Z("feComponentTransfer",t);v.setAttribute("in","SourceAlpha");var g=Z("feFuncA",t);g.setAttribute("type","table"),g.setAttribute("tableValues","1 0"),v.appendChild(g),d.appendChild(v);var m=Z("feGaussianBlur",t);m.setAttribute("stdDeviation",""+(s||0)/4),d.appendChild(m);var y=Z("feOffset",t);y.setAttribute("dx",""+(c||0)/2),y.setAttribute("dy",""+(l||0)/2),y.setAttribute("result","offsetblur"),d.appendChild(y);var b=Z("feFlood",t);b.setAttribute("flood-color",u.toString()),b.setAttribute("result","color"),d.appendChild(b);var E=Z("feComposite",t);E.setAttribute("in2","offsetblur"),E.setAttribute("operator","in"),d.appendChild(E);var A=Z("feComposite",t);A.setAttribute("in2","SourceAlpha"),A.setAttribute("operator","in"),d.appendChild(A);var S=Z("feMerge",t);d.appendChild(S);var x=Z("feMergeNode",t);x.setAttribute("in","SourceGraphic");var L=Z("feMergeNode",t);S.appendChild(x),S.appendChild(L)}return d.id=f,d.setAttribute("filterUnits","userSpaceOnUse"),void e.appendChild(d)}if("inner"===a){var O=d.children[1],C=d.children[2];"shadowColor"===i?d.children[3].setAttribute("flood-color",u.toString()):"shadowBlur"===i?O.setAttribute("stdDeviation",""+(s||0)/4):"shadowOffsetX"===i?C.setAttribute("dx",""+(c||0)/2):"shadowOffsetY"===i&&C.setAttribute("dy",""+(l||0)/2)}else if("outer"===a){var k=d.children[0];"shadowColor"===i?k.setAttribute("flood-color",u.toString()):"shadowBlur"===i?k.setAttribute("stdDeviation",""+(s||0)/4):"shadowOffsetX"===i?k.setAttribute("dx",""+(c||0)/2):"shadowOffsetY"===i&&k.setAttribute("dy",""+(l||0)/2)}}else null==n||n.removeAttribute("filter")}(this.canvasConfig.document||document,this.$def,t,e,r)},e.createOrUpdateFilter=function(t,e,r){it(this.canvasConfig.document||document,this.$def,t,e,r)},t}();gt=s([e.singleton(),u(0,e.inject(e.CanvasConfig)),u(1,e.inject(e.ContextService))],gt);var mt={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",anchor:"anchor",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML",textAlign:"text-anchor",pointerEvents:"pointer-events"},yt={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},bt={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit",pointerEvents:"auto"},wt="g_svg",Et=(dt=function(){function t(t,e,r,n,i,o,a,s){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.styleValueRegistry=void 0,this.createElementContribution=void 0,this.defElementManager=void 0,this.pluginOptions=void 0,this.$camera=void 0,this.renderQueue=[],this.dirtyAttributes=new WeakMap,this.pendingReorderQueue=new Set,this.canvasConfig=t,this.camera=e,this.contextService=r,this.renderingContext=n,this.styleValueRegistry=i,this.createElementContribution=o,this.defElementManager=a,this.pluginOptions=s}var r=t.prototype;return r.apply=function(t){var r=this,n=this.canvasConfig.document,i=function(t){r.createSVGDom(n,t.target,r.$camera)},o=function(t){var e=t.target;r.defElementManager.clear(e.entity),r.removeSVGDom(e)},a=function(t){var e=t.target;if(e.elementSVG){var n=t.attrName,i=r.dirtyAttributes.get(e);i||(r.dirtyAttributes.set(e,[]),i=r.dirtyAttributes.get(e)),i.push(n)}},s=function(t){var n,i=t.target,o=null===(n=i.elementSVG)||void 0===n?void 0:n.$el,a=i.parsedStyle,s=a.fill,u=a.stroke;!s||s instanceof e.CSSRGB||r.defElementManager.createOrUpdateGradientAndPattern(i,o,s,"fill"),!u||u instanceof e.CSSRGB||r.defElementManager.createOrUpdateGradientAndPattern(i,o,u,"stroke")};t.hooks.init.tapPromise(pt.tag,N(M().mark((function t(){var n,u,c,l;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u=(n=r.canvasConfig).background,c=n.document,r.defElementManager.init(),l=r.contextService.getContext(),u&&(l.style.background=u),l.setAttribute("color-interpolation-filters","sRGB"),r.$camera=Z("g",c),r.$camera.id="g_svg_camera",r.applyTransform(r.$camera,r.camera.getOrthoMatrix()),l.appendChild(r.$camera),r.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,i),r.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.addEventListener(e.ElementEvent.BOUNDS_CHANGED,s);case 13:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(pt.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,i),r.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,s)})),t.hooks.render.tap(pt.tag,(function(t){r.renderQueue.push(t)})),t.hooks.beginFrame.tap(pt.tag,(function(){var t=r.canvasConfig.document;r.pendingReorderQueue.size&&(r.pendingReorderQueue.forEach((function(e){var i,o=((null==e?void 0:e.children)||[]).slice(),a=null==e||null===(i=e.elementSVG)||void 0===i?void 0:i.$groupEl;a&&r.reorderChildren(t||n,a,o||[])})),r.pendingReorderQueue.clear())})),t.hooks.endFrame.tap(pt.tag,(function(){r.renderingContext.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&r.applyTransform(r.$camera,r.camera.getOrthoMatrix()),r.renderQueue.forEach((function(t){var e,i,o=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,a=null===(i=t.elementSVG)||void 0===i?void 0:i.$groupEl;o&&a&&(r.applyTransform(a,t.getLocalTransform()),t.renderable.dirty=!1);var s=r.dirtyAttributes.get(t);s&&(s.forEach((function(e){if("zIndex"===e){var i,s,u=t.parentNode,c=null===(i=t.parentNode)||void 0===i||null===(s=i.elementSVG)||void 0===s?void 0:s.$groupEl,l=((null==u?void 0:u.children)||[]).slice();c&&r.reorderChildren(n,c,l)}else"increasedLineWidthForHitTesting"===e&&r.createOrUpdateHitArea(t,o,a);r.updateAttribute(t,[e])})),r.dirtyAttributes.delete(t))})),r.renderQueue=[]}))},r.reorderChildren=function(t,e,r){if(r.sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})),r.length){var n=(t||document).createDocumentFragment();r.forEach((function(t){if(t.isConnected){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)}})),e.appendChild(n)}},r.applyTransform=function(t,e){t.setAttribute("transform","matrix("+B(e[0])+","+B(e[1])+","+B(e[4])+","+B(e[5])+","+B(e[12])+","+B(e[13])+")")},r.applyAttributes=function(t){var r=t.elementSVG,n=null==r?void 0:r.$el;if(n&&(null==r?void 0:r.$groupEl)){var i=t.nodeName,o=t.attributes;n.setAttribute("fill","none"),i===e.Shape.IMAGE&&n.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(o))}},r.updateAttribute=function(t,r){var n=this,i=this.canvasConfig.document,o=t.elementSVG,a=o.$el,s=o.$groupEl,u=o.$hitTestingEl,c=t.parsedStyle,l=t.computedStyle;r.some((function(e){return n.createElementContribution.shouldUpdateElementAttribute(t,e)}))&&a&&[a,u].forEach((function(r){r&&(n.createElementContribution.updateElementAttribute(t,r),t.nodeName!==e.Shape.TEXT&&n.updateAnchorWithTransform(t))})),r.forEach((function(r){var o,h,f=mt[r],d=l[r],p=d&&d.toString(),v=(null===(o=yt[r])||void 0===o?void 0:o[p])||p,g=c[r],m=!!(null===(h=e.propertyMetadataCache[r])||void 0===h?void 0:h.inh);f&&(t.nodeName===e.Shape.HTML&&("lineWidth"===r?a.style["border-width"]=(g||0)+"px":"lineDash"===r&&(a.style["border-style"]="dashed")),"fill"===r?t.nodeName===e.Shape.HTML?a.style.background=g.toString():n.defElementManager.createOrUpdateGradientAndPattern(t,a,g,f):"stroke"===r?t.nodeName===e.Shape.HTML?(a.style["border-color"]=g.toString(),a.style["border-style"]="solid"):n.defElementManager.createOrUpdateGradientAndPattern(t,a,g,f):m&&f?"unset"!==p&&p!==bt[r]?null==s||s.setAttribute(f,v):null==s||s.removeAttribute(f):"clipPath"===r?n.createOrUpdateClipPath(i,g,s):"shadowType"===r||"shadowColor"===r||"shadowBlur"===r||"shadowOffsetX"===r||"shadowOffsetY"===r?n.defElementManager.createOrUpdateShadow(t,a,r):"filter"===r?n.defElementManager.createOrUpdateFilter(t,a,g):"innerHTML"===r?n.createOrUpdateInnerHTML(i,a,g):"anchor"===r?t.nodeName!==e.Shape.TEXT&&n.updateAnchorWithTransform(t):d&&[a,u].forEach((function(t){t&&f&&("unset"!==p&&p!==bt[r]?t.setAttribute(f,v):t.removeAttribute(f))})))}))},r.createSVGDom=function(t,r,n,i){void 0===i&&(i=!1),r.elementSVG=new I;var o=r.elementSVG,a=this.createElementContribution.createElement(r);if(a){var s,u;r.nodeName===e.Shape.HTML&&(r.parsedStyle.$el=a),this.pluginOptions.outputSVGElementId&&(a.id="g_svg_"+r.nodeName+"_"+r.entity),!a.hasAttribute("data-wrapgroup")&&"g"===a.nodeName||i?u=a:(u=Z("g",t)).appendChild(a),o.$el=a,o.$groupEl=u,this.applyAttributes(r),this.createOrUpdateHitArea(r,a,u);var c=r.parentNode&&(null===(s=r.parentNode.elementSVG)||void 0===s?void 0:s.$groupEl)||n;c&&(c.appendChild(u),this.pendingReorderQueue.add(r.parentNode))}},r.removeSVGDom=function(t){var e,r=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;r&&r.parentNode&&(r.parentNode.removeChild(r),this.createElementContribution.destroyElement(t,r))},r.createOrUpdateHitArea=function(t,e,r){var n=t.elementSVG,i=n.$hitTestingEl,o=t.parsedStyle.increasedLineWidthForHitTesting;if(o){if(!i){i=e.cloneNode(),this.pluginOptions.outputSVGElementId&&(i.id="g_svg_"+t.nodeName+"_hittesting_"+t.entity),["filter"].forEach((function(t){i.removeAttribute(t)}));var a="none"!==e.getAttribute("fill");i.setAttribute("fill",a?"transparent":"none"),i.setAttribute("stroke","transparent"),r.appendChild(i),n.$hitTestingEl=i}i.setAttribute("stroke-width",""+(o+t.parsedStyle.lineWidth))}else i&&(r.removeChild(i),n.$hitTestingEl=null)},r.createOrUpdateInnerHTML=function(t,e,r){var n=(t||document).createElement("div");"string"==typeof r?n.innerHTML=r:n.appendChild(r),e.innerHTML="",e.appendChild(n)},r.createOrUpdateClipPath=function(t,e,r){if(e){var n,i="clip-path-"+e.entity,o=this.defElementManager.getDefElement();if(!o.querySelector("#"+i)){var a=Z("clipPath",t);a.id=i,o.appendChild(a),this.createSVGDom(t,e,a,!0),e.elementSVG.$groupEl=a}var s=null===(n=e.elementSVG)||void 0===n?void 0:n.$groupEl;s&&this.applyTransform(s,e.getLocalTransform()),this.applyAttributes(e),r.setAttribute("clip-path","url(#"+i+")")}else r.removeAttribute("clip-path")},r.updateAnchorWithTransform=function(t){var r,n,i=t.getGeometryBounds(),o=i&&2*i.halfExtents[0]||0,a=i&&2*i.halfExtents[1]||0,s=(t.parsedStyle||{}).anchor;[null===(r=t.elementSVG)||void 0===r?void 0:r.$el,null===(n=t.elementSVG)||void 0===n?void 0:n.$hitTestingEl].forEach((function(r){if(r){var n=-s[0]*o,i=-s[1]*a;0===n&&0===i||r.setAttribute("transform","translate("+n+","+i+")"),t.nodeName!==e.Shape.CIRCLE&&t.nodeName!==e.Shape.ELLIPSE||(r.setAttribute("cx",""+o/2),r.setAttribute("cy",""+a/2))}}))},t}(),dt.tag="SVGRenderer",pt=dt);Et=pt=s([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.CanvasConfig)),u(1,e.inject(e.DefaultCamera)),u(2,e.inject(e.ContextService)),u(3,e.inject(e.RenderingContext)),u(4,e.inject(e.StyleValueRegistry)),u(5,e.inject(K)),u(6,e.inject(gt)),u(7,e.inject(J))],Et);var At,St,xt=e.Module((function(t){t(gt),t(rt),t(Et)})),Lt=function(t){var e,r;function n(e){var r;return void 0===e&&(e={}),(r=t.call(this)||this).options=void 0,r.name="svg-renderer",r.options=e,r}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,D(e,r);var i=n.prototype;return i.init=function(){var t=this.options.outputSVGElementId;this.container.register(J,{useValue:{outputSVGElementId:!!w(t)||!!t}}),this.container.load(xt,!0)},i.destroy=function(){this.container.remove(J),this.container.unload(xt)},n}(e.AbstractRendererPlugin),Ot=Object.freeze({__proto__:null,DEFAULT_VALUE_MAP:bt,get DefaultElementLifeCycleContribution(){return rt},ElementLifeCycleContribution:K,ElementSVG:I,G_SVG_PREFIX:wt,Plugin:Lt,SHAPE2TAGS:tt,SHAPE_UPDATE_DEPS:et,get SVGRendererPlugin(){return Et},SVGRendererPluginOptions:J,SVG_ATTR_MAP:mt,containerModule:xt,createSVGElement:Z,updateImageElementAttribute:R,updateLineElementAttribute:V,updatePathElementAttribute:W,updatePolylineElementAttribute:U,updateRectElementAttribute:F,updateTextElementAttribute:z});function Ct(){
7
+ M=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(x([])));m&&m!==e&&r.call(m,i)&&(p=m);var g=d.prototype=h.prototype=Object.create(p);function y(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=d,s(g,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},y(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function j(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function N(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){j(o,n,i,a,s,"next",t)}function s(t){j(o,n,i,a,s,"throw",t)}a(void 0)}))}}function $(){return $=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$.apply(this,arguments)}function D(t,e){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},D(t,e)}var R=function(){this.$el=void 0,this.$groupEl=void 0,this.$hitTestingEl=void 0};function I(t,e){var r=e.img,n=void 0===r?"":r,i=e.width,o=e.height;if(t.setAttribute("x","0"),t.setAttribute("y","0"),E(n))t.setAttribute("href",n);else if(n instanceof Image)i||t.setAttribute("width",""+n.width),o||t.setAttribute("height",""+n.height),t.setAttribute("href",n.src);else if(n instanceof HTMLElement&&E(n.nodeName)&&"CANVAS"===n.nodeName.toUpperCase())t.setAttribute("href",n.toDataURL());else if(n instanceof ImageData){var a=document.createElement("canvas");a.setAttribute("width",""+n.width),a.setAttribute("height",""+n.height);var s=a.getContext("2d");s&&(s.putImageData(n,0,0),i||t.setAttribute("width",""+n.width),o||t.setAttribute("height",""+n.height),t.setAttribute("href",a.toDataURL()))}}function V(t,r){var n,i,o=r.x1,a=r.y1,s=r.x2,u=r.y2,c=r.defX,l=void 0===c?0:c,h=r.defY,f=void 0===h?0:h,d=r.markerStart,p=r.markerEnd,v=r.markerStartOffset,m=r.markerEndOffset,g=0,y=0,b=0,w=0,E=0;d&&d instanceof e.DisplayObject&&v&&(n=s-o,i=u-a,E=Math.atan2(i,n),g=Math.cos(E)*(v||0),y=Math.sin(E)*(v||0)),p&&p instanceof e.DisplayObject&&m&&(n=o-s,i=a-u,E=Math.atan2(i,n),b=Math.cos(E)*(m||0),w=Math.sin(E)*(m||0)),t.setAttribute("x1",""+(o-l+g)),t.setAttribute("y1",""+(a-f+y)),t.setAttribute("x2",""+(s-l+b)),t.setAttribute("y2",""+(u-f+w))}function W(t,r){var n,i,o=r.path,a=r.defX,s=void 0===a?0:a,u=r.defY,c=void 0===u?0:u,l=r.markerStart,h=r.markerEnd,f=r.markerStartOffset,d=r.markerEndOffset,p=0,v=0,m=0,g=0,y=0;if(l&&l instanceof e.DisplayObject&&f){var b=l.parentNode.getStartTangent(),w=b[0],E=b[1];n=w[0]-E[0],i=w[1]-E[1],y=Math.atan2(i,n),p=Math.cos(y)*(f||0),v=Math.sin(y)*(f||0)}if(h&&h instanceof e.DisplayObject&&d){var A=h.parentNode.getEndTangent(),S=A[0],x=A[1];n=S[0]-x[0],i=S[1]-x[1],y=Math.atan2(i,n),m=Math.cos(y)*(d||0),g=Math.sin(y)*(d||0)}t.setAttribute("d",e.translatePathToString(o.absolutePath,s,c,p,v,m,g))}function U(t,r){var n=r.points.points,i=r.defX,o=void 0===i?0:i,a=r.defY,s=void 0===a?0:a,u=r.markerStart,c=r.markerStartOffset,l=r.markerEnd,h=r.markerEndOffset,f=n.length;if(n&&f>=2){var d,p,v=0,m=0,g=0,y=0,b=0;u&&u instanceof e.DisplayObject&&c&&(d=n[1][0]-n[0][0],p=n[1][1]-n[0][1],b=Math.atan2(p,d),v=Math.cos(b)*(c||0),m=Math.sin(b)*(c||0)),l&&l instanceof e.DisplayObject&&h&&(d=n[f-2][0]-n[f-1][0],p=n[f-2][1]-n[f-1][1],b=Math.atan2(p,d),g=Math.cos(b)*(h||0),y=Math.sin(b)*(h||0)),t.setAttribute("points",n.map((function(t,e){var r=0,n=0;return 0===e?(r=v,n=m):e===f-1&&(r=g,n=y),t[0]-o+r+","+(t[1]-s+n)})).join(" "))}}function F(t,e){var r=e.radius,n=e.width,i=e.height;if(isFinite(n)&&isFinite(i)){var o="";if(r&&r.some((function(t){return 0!==t}))){var a=r.map((function(t){return e=t,r=0,o=Math.min(Math.abs(n)/2,Math.abs(i)/2),r>e?r:e>o?o:e;var e,r,o})),s=a[0],u=a[1],c=a[2],l=a[3],h=n>0?1:-1,f=i>0?1:-1,d=h+f!==0?1:0;o=[["M "+h*s+",0"],["l "+(n-h*(s+u))+",0"],["a "+u+","+u+",0,0,"+d+","+h*u+","+f*u],["l 0,"+(i-f*(u+c))],["a "+c+","+c+",0,0,"+d+","+-h*c+","+f*c],["l "+(h*(c+l)-n)+",0"],["a "+l+","+l+",0,0,"+d+","+-h*l+","+-f*l],["l 0,"+(f*(l+s)-i)],["a "+s+","+s+",0,0,"+d+","+h*s+","+-f*s],["z"]].join(" ")}else o="M 0,0 l "+n+",0 l 0,"+i+" l"+-n+" 0 z";t.setAttribute("d",o)}}function B(t,e){return(e||document).createElementNS("http://www.w3.org/2000/svg",t)}R.tag="c-svg-element";var H="g-filter-";function Y(t,r,n,i,o){var a=H+n.entity,s=r.querySelectorAll("[name="+a+"]");if(s.length&&s.forEach((function(t){r.removeChild(t)})),0===o.length)null==i||i.removeAttribute("filter");else{var u=o.map((function(n,i){var o=n.name,s=n.params,u=B("filter",t);return u.setAttribute("filterUnits","userSpaceOnUse"),"blur"===o?function(t,e,r){var n=B("feGaussianBlur",t);n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation",""+r[0].value),e.appendChild(n)}(t,u,s):"brightness"===o?function(t,e,r){var n=X(r[0]);z(t,e,{type:"linear",slope:n,intercept:0})}(t,u,s):"drop-shadow"===o?function(t,e,r){var n=r[0].value,i=r[1].value,o=r[2].value,a=r[3].formatted,s=B("feGaussianBlur",t);s.setAttribute("in","SourceAlpha"),s.setAttribute("stdDeviation",""+o),e.appendChild(s);var u=B("feOffset",t);u.setAttribute("dx",""+n),u.setAttribute("dy",""+i),u.setAttribute("result","offsetblur"),e.appendChild(u);var c=B("feFlood",t);c.setAttribute("flood-color",a),e.appendChild(c);var l=B("feComposite",t);l.setAttribute("in2","offsetblur"),l.setAttribute("operator","in"),e.appendChild(l);var h=B("feMerge",t);e.appendChild(h);var f=B("feMergeNode",t),d=B("feMergeNode",t);d.setAttribute("in","SourceGraphic"),h.appendChild(f),h.appendChild(d)}(t,u,s):"contrast"===o?function(t,e,r){var n=X(r[0]);z(t,e,{type:"linear",slope:n,intercept:-.5*n+.5})}(t,u,s):"grayscale"===o?function(t,e,r){var n=X(r[0]);Q(t,e,[.2126+.7874*(1-n),.7152-.7152*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152+.2848*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152-.7152*(1-n),.0722+.9278*(1-n),0,0,0,0,0,1,0])}(t,u,s):"sepia"===o?function(t,e,r){var n=X(r[0]);Q(t,e,[.393+.607*(1-n),.769-.769*(1-n),.189-.189*(1-n),0,0,.349-.349*(1-n),.686+.314*(1-n),.168-.168*(1-n),0,0,.272-.272*(1-n),.534-.534*(1-n),.131+.869*(1-n),0,0,0,0,0,1,0])}(t,u,s):"saturate"===o?function(t,e,r){var n=X(r[0]),i=B("feColorMatrix",t);i.setAttribute("type","saturate"),i.setAttribute("values",""+n),e.appendChild(i)}(t,u,s):"hue-rotate"===o?function(t,r,n){var i=B("feColorMatrix",t);i.setAttribute("type","hueRotate"),i.setAttribute("values",""+n[0].to(e.UnitType.kDegrees).value),r.appendChild(i)}(t,u,s):"invert"===o&&function(t,e,r){var n=X(r[0]);z(t,e,{type:"table",tableValues:n+" "+(1-n)})}(t,u,s),u.id=a+"-"+i,u.setAttribute("name",a),r.appendChild(u),u.id}));setTimeout((function(){null==i||i.setAttribute("filter",u.map((function(t){return"url(#"+t+")"})).join(" "))}))}}function X(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function z(t,e,r){var n=r.type,i=r.slope,o=r.intercept,a=r.tableValues,s=B("feComponentTransfer",t);[B("feFuncR",t),B("feFuncG",t),B("feFuncB",t)].forEach((function(t){t.setAttribute("type",n),"table"===n?t.setAttribute("tableValues",""+a):(t.setAttribute("slope",""+i),t.setAttribute("intercept",""+o)),s.appendChild(t)})),e.appendChild(s)}function Q(t,e,r){var n=B("feColorMatrix",t);n.setAttribute("type","matrix"),n.setAttribute("values",r.join(" ")),e.appendChild(n)}var q={},K=0;function J(t,r,n,i,o,a,s){if(!o)return"";if(!(o instanceof e.CSSRGB)){if(e.isPattern(o)){var u=function(t,r,n,i,o){var a=Z(i);if(!r.querySelector("#"+a)){var s=i.image,u=i.repetition,c="";if(E(s)?c=s:e.isBrowser&&(s instanceof HTMLImageElement?c=s.src:s instanceof HTMLCanvasElement&&(c=s.toDataURL())),c){var l=B("pattern",t);l.setAttribute("patternUnits","userSpaceOnUse");var h,f=B("image",t);l.appendChild(f),l.id=a,r.appendChild(l),f.setAttribute("href",c),o?h=o(c):e.isBrowser&&(h=new window.Image),c.match(/^data:/i)||(h.crossOrigin="Anonymous",f.setAttribute("crossorigin","anonymous")),h.src=c;var d=function(){l.setAttribute("x","0"),l.setAttribute("y","0");var t=n.getGeometryBounds().halfExtents,e=h.width,r=h.height;"repeat-x"===u?r=2*t[1]:"repeat-y"===u?e=2*t[0]:"no-repeat"===u&&(e=2*t[0],r=2*t[1]),l.setAttribute("width",""+e),l.setAttribute("height",""+r),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("width",""+h.width),f.setAttribute("height",""+h.height)};h.complete?d():(h.onload=d,h.src=h.src)}}return a}(t,r,n,o,s);return i.style[a]="url(#"+u+")",u}if(1===o.length){var c=tt(t,n,r,i,o[0]);return null==i||i.setAttribute(a,"url(#"+c+")"),c}var l=function(t,e,r,n,i){var o=H+e.entity+"-gradient",a=r.querySelector("#"+o);a||((a=B("filter",t)).setAttribute("filterUnits","userSpaceOnUse"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.id=o,r.appendChild(a));var s=0;i.forEach((function(i,u){var c=tt(t,e,r,n,i),l=c+"_rect",h=B("rect",t);h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width","100%"),h.setAttribute("height","100%"),h.setAttribute("fill","url(#"+c+")"),h.id=l,r.appendChild(h);var f=B("feImage",t);if(f.setAttribute("href","#"+l),f.setAttribute("result",o+"-"+u),a.appendChild(f),u>0){var d=B("feBlend",t);d.setAttribute("in",1===u?o+"-"+(u-1):o+"-blended-"+(s-1)),d.setAttribute("in2",o+"-"+u),d.setAttribute("result",o+"-blended-"+s++),d.setAttribute("mode","multiply"),a.appendChild(d)}}));var u=B("feComposite",t);return u.setAttribute("in",o+"-blended-"+s),u.setAttribute("in2","SourceGraphic"),u.setAttribute("operator","in"),a.appendChild(u),o}(t,n,r,i,o);return null==i||i.setAttribute("filter","url(#"+l+")"),null==i||i.setAttribute("fill","black"),l}return"currentColor"===n.style[a]?null==i||i.setAttribute(a,"currentColor"):null==i||i.setAttribute(a,o.isNone?"none":o.toString()),""}function Z(t,r){void 0===r&&(r={});var n="";if(t instanceof e.CSSGradientValue){var i=t.type;if(i===e.GradientType.LinearGradient||i===e.GradientType.RadialGradient){var o=$({},t.value,r),a=o.width,s=o.height,u=o.steps,c=o.angle,l=o.cx,h=o.cy,f=o.size;n="gradient-"+o.type+"-"+((null==c?void 0:c.toString())||0)+"-"+((null==l?void 0:l.toString())||0)+"-"+((null==h?void 0:h.toString())||0)+"-"+((null==f?void 0:f.toString())||0)+"-"+a+"-"+s+"-"+u.map((function(t){return""+t.offset+t.color})).join("-")}}else e.isPattern(t)&&(n=E(t.image)?"pattern-"+t.image+"-"+t.repetition:"pattern-"+K);return n&&(q[n]||(q[n]="g-pattern-"+K++)),q[n]}function tt(t,r,n,i,o){var a=r.getGeometryBounds(),s=a&&2*a.halfExtents[0]||0,u=a&&2*a.halfExtents[1]||0,c=Z(o,{width:s,height:u}),l=n.querySelector("#"+c);if(!l){(l=B(o.type===e.GradientType.LinearGradient?"linearGradient":"radialGradient",t)).setAttribute("gradientUnits","userSpaceOnUse");var h="";o.value.steps.sort((function(t,e){return t.offset.value-e.offset.value})).forEach((function(t){h+='<stop offset="'+t.offset.value/100+'" stop-color="'+t.color+'"></stop>'})),l.innerHTML=h,l.id=c,n.appendChild(l)}if(o.type===e.GradientType.LinearGradient){var f=e.computeLinearGradient(s,u,o.value.angle),d=f.y1,p=f.x2,v=f.y2;l.setAttribute("x1",""+f.x1),l.setAttribute("y1",""+d),l.setAttribute("x2",""+p),l.setAttribute("y2",""+v)}else{var m=o.value,g=e.computeRadialGradient(s,u,m.cx,m.cy,m.size),y=g.y,b=g.r;l.setAttribute("cx",""+g.x),l.setAttribute("cy",""+y),l.setAttribute("r",""+b)}return c}var et=/url\(#(.*)\)/,rt=function(){function t(t,e){this.canvasConfig=void 0,this.contextService=void 0,this.$def=void 0,this.gradientCache={},this.canvasConfig=t,this.contextService=e}var e=t.prototype;return e.getDefElement=function(){return this.$def},e.init=function(){var t=this.canvasConfig.document,e=this.contextService.getContext();this.$def=B("defs",t),e.appendChild(this.$def)},e.clear=function(t){var e=this;Object.keys(this.gradientCache).forEach((function(r){e.clearUnusedDefElement(e.gradientCache,r,t)}))},e.clearUnusedDefElement=function(t,e,r){if(t[e]&&1===t[e].size&&t[e].has(r)){var n=this.$def.querySelector("#"+e);n&&this.$def.removeChild(n)}},e.createOrUpdateGradientAndPattern=function(t,e,r,n){var i=this.canvasConfig,o=i.document,a=i.createImage;if(e){var s,u=null===(s=e.getAttribute(n))||void 0===s?void 0:s.match(et);u&&u.length>1&&this.clearUnusedDefElement(this.gradientCache,u[1],t.entity);var c=J(o||document,this.$def,t,e,r,n,a);this.gradientCache[c]||(this.gradientCache[c]=new Set),this.gradientCache[c].add(t.entity)}},e.createOrUpdateShadow=function(t,e,r){!function(t,e,r,n,i){var o=r.parsedStyle,a=o.shadowType,s=o.shadowBlur,u=o.shadowColor,c=o.shadowOffsetX,l=o.shadowOffsetY,h=!w(u)&&s>0,f="g-filter-dropshadow-"+r.entity,d=e.querySelector("#"+f);if(d&&(d.getAttribute("data-type")===a&&h||(d.remove(),d=null)),h){if(null==n||n.setAttribute("filter","url(#"+f+")"),!d){if((d=B("filter",t)).setAttribute("data-type",a),"outer"===a){var p=B("feDropShadow",t);p.setAttribute("dx",""+(c||0)/2),p.setAttribute("dy",""+(l||0)/2),p.setAttribute("stdDeviation",""+(s||0)/4),p.setAttribute("flood-color",u.toString()),d.appendChild(p)}else if("inner"===a){var v=B("feComponentTransfer",t);v.setAttribute("in","SourceAlpha");var m=B("feFuncA",t);m.setAttribute("type","table"),m.setAttribute("tableValues","1 0"),v.appendChild(m),d.appendChild(v);var g=B("feGaussianBlur",t);g.setAttribute("stdDeviation",""+(s||0)/4),d.appendChild(g);var y=B("feOffset",t);y.setAttribute("dx",""+(c||0)/2),y.setAttribute("dy",""+(l||0)/2),y.setAttribute("result","offsetblur"),d.appendChild(y);var b=B("feFlood",t);b.setAttribute("flood-color",u.toString()),b.setAttribute("result","color"),d.appendChild(b);var E=B("feComposite",t);E.setAttribute("in2","offsetblur"),E.setAttribute("operator","in"),d.appendChild(E);var A=B("feComposite",t);A.setAttribute("in2","SourceAlpha"),A.setAttribute("operator","in"),d.appendChild(A);var S=B("feMerge",t);d.appendChild(S);var x=B("feMergeNode",t);x.setAttribute("in","SourceGraphic");var L=B("feMergeNode",t);S.appendChild(x),S.appendChild(L)}return d.id=f,d.setAttribute("filterUnits","userSpaceOnUse"),void e.appendChild(d)}if("inner"===a){var O=d.children[1],C=d.children[2];"shadowColor"===i?d.children[3].setAttribute("flood-color",u.toString()):"shadowBlur"===i?O.setAttribute("stdDeviation",""+(s||0)/4):"shadowOffsetX"===i?C.setAttribute("dx",""+(c||0)/2):"shadowOffsetY"===i&&C.setAttribute("dy",""+(l||0)/2)}else if("outer"===a){var k=d.children[0];"shadowColor"===i?k.setAttribute("flood-color",u.toString()):"shadowBlur"===i?k.setAttribute("stdDeviation",""+(s||0)/4):"shadowOffsetX"===i?k.setAttribute("dx",""+(c||0)/2):"shadowOffsetY"===i&&k.setAttribute("dy",""+(l||0)/2)}}else null==n||n.removeAttribute("filter")}(this.canvasConfig.document||document,this.$def,t,e,r)},e.createOrUpdateFilter=function(t,e,r){Y(this.canvasConfig.document||document,this.$def,t,e,r)},t}();rt=s([e.singleton(),u(0,e.inject(e.CanvasConfig)),u(1,e.inject(e.ContextService))],rt);var nt,it,ot=e.Syringe.defineToken("",{multiple:!1}),at=e.Syringe.defineToken("");function st(t){return t.toFixed(6).replace(".000000","")}function ut(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&amp;":"<"===t?"&lt;":">"===t?"&gt;":'"'===t?"&quot;":"&apos;"}))}var ct={opacity:"opacity",fillStyle:"fill",fill:"fill",fillRule:"fill-rule",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",textPath:"text-path",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",anchor:"anchor",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML",textAlign:"text-anchor",pointerEvents:"pointer-events"},lt={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},ht={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",fillRule:"nonzero",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit",pointerEvents:"auto"},ft="g_svg",dt="clip-path-",pt="text-path-",vt=(nt=function(){function t(t,e,r,n,i,o,a,s){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.styleValueRegistry=void 0,this.createElementContribution=void 0,this.defElementManager=void 0,this.pluginOptions=void 0,this.$camera=void 0,this.renderQueue=[],this.dirtyAttributes=new WeakMap,this.pendingReorderQueue=new Set,this.canvasConfig=t,this.camera=e,this.contextService=r,this.renderingContext=n,this.styleValueRegistry=i,this.createElementContribution=o,this.defElementManager=a,this.pluginOptions=s}var r=t.prototype;return r.apply=function(t){var r=this,n=this.canvasConfig.document,i=function(t){r.createSVGDom(n,t.target,r.$camera)},o=function(t){var e=t.target;r.defElementManager.clear(e.entity),r.removeSVGDom(e)},a=function(t){var e=t.target;if(e.elementSVG){var n=t.attrName,i=r.dirtyAttributes.get(e);i||(r.dirtyAttributes.set(e,[]),i=r.dirtyAttributes.get(e)),i.push(n)}},s=function(t){var n,i=t.target,o=null===(n=i.elementSVG)||void 0===n?void 0:n.$el,a=i.parsedStyle,s=a.fill,u=a.stroke;!s||s instanceof e.CSSRGB||r.defElementManager.createOrUpdateGradientAndPattern(i,o,s,"fill"),!u||u instanceof e.CSSRGB||r.defElementManager.createOrUpdateGradientAndPattern(i,o,u,"stroke")};t.hooks.init.tapPromise(it.tag,N(M().mark((function t(){var n,u,c,l;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u=(n=r.canvasConfig).background,c=n.document,r.defElementManager.init(),l=r.contextService.getContext(),u&&(l.style.background=u),l.setAttribute("color-interpolation-filters","sRGB"),r.$camera=B("g",c),r.$camera.id="g_svg_camera",r.applyTransform(r.$camera,r.camera.getOrthoMatrix()),l.appendChild(r.$camera),r.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,i),r.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.addEventListener(e.ElementEvent.BOUNDS_CHANGED,s);case 13:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(it.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,i),r.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,o),r.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,a),r.renderingContext.root.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,s)})),t.hooks.render.tap(it.tag,(function(t){r.renderQueue.push(t)})),t.hooks.beginFrame.tap(it.tag,(function(){var t=r.canvasConfig.document;r.pendingReorderQueue.size&&(r.pendingReorderQueue.forEach((function(e){var i,o=((null==e?void 0:e.children)||[]).slice(),a=null==e||null===(i=e.elementSVG)||void 0===i?void 0:i.$groupEl;a&&r.reorderChildren(t||n,a,o||[])})),r.pendingReorderQueue.clear())})),t.hooks.endFrame.tap(it.tag,(function(){r.renderingContext.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&r.applyTransform(r.$camera,r.camera.getOrthoMatrix()),r.renderQueue.forEach((function(t){var e,i,o=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,a=null===(i=t.elementSVG)||void 0===i?void 0:i.$groupEl;o&&a&&(r.applyTransform(a,t.getLocalTransform()),t.renderable.dirty=!1);var s=r.dirtyAttributes.get(t);s&&(s.forEach((function(e){if("zIndex"===e){var i,s,u=t.parentNode,c=null===(i=t.parentNode)||void 0===i||null===(s=i.elementSVG)||void 0===s?void 0:s.$groupEl,l=((null==u?void 0:u.children)||[]).slice();c&&r.reorderChildren(n,c,l)}else"increasedLineWidthForHitTesting"===e&&r.createOrUpdateHitArea(t,o,a);r.updateAttribute(t,[e])})),r.dirtyAttributes.delete(t))})),r.renderQueue=[]}))},r.reorderChildren=function(t,e,r){if(r.sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})),r.length){var n=(t||document).createDocumentFragment();r.forEach((function(t){if(t.isConnected){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)}})),e.appendChild(n)}},r.applyTransform=function(t,e){t.setAttribute("transform","matrix("+st(e[0])+","+st(e[1])+","+st(e[4])+","+st(e[5])+","+st(e[12])+","+st(e[13])+")")},r.applyAttributes=function(t){var r=t.elementSVG,n=null==r?void 0:r.$el;if(n&&(null==r?void 0:r.$groupEl)){var i=t.nodeName,o=t.attributes;n.setAttribute("fill","none"),i===e.Shape.IMAGE&&n.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(o))}},r.updateAttribute=function(t,r){var n=this,i=this.canvasConfig.document,o=t.elementSVG,a=o.$el,s=o.$groupEl,u=o.$hitTestingEl,c=t.parsedStyle,l=t.computedStyle;r.some((function(e){return n.createElementContribution.shouldUpdateElementAttribute(t,e)}))&&a&&[a,u].forEach((function(r){r&&(n.createElementContribution.updateElementAttribute(t,r),t.nodeName!==e.Shape.TEXT&&n.updateAnchorWithTransform(t))})),r.forEach((function(r){var o,h,f=ct[r],d=l[r],p=d&&d.toString(),v=(null===(o=lt[r])||void 0===o?void 0:o[p])||p,m=c[r],g=!!(null===(h=e.propertyMetadataCache[r])||void 0===h?void 0:h.inh);f&&(t.nodeName===e.Shape.HTML&&("lineWidth"===r?a.style["border-width"]=(m||0)+"px":"lineDash"===r&&(a.style["border-style"]="dashed")),"fill"===r?t.nodeName===e.Shape.HTML?a.style.background=m.toString():n.defElementManager.createOrUpdateGradientAndPattern(t,a,m,f):"stroke"===r?t.nodeName===e.Shape.HTML?(a.style["border-color"]=m.toString(),a.style["border-style"]="solid"):n.defElementManager.createOrUpdateGradientAndPattern(t,a,m,f):g&&f?"unset"!==p&&p!==ht[r]?null==s||s.setAttribute(f,v):null==s||s.removeAttribute(f):"clipPath"===r?n.createOrUpdateClipOrTextPath(i,m,s):"textPath"===r?n.createOrUpdateClipOrTextPath(i,m,s,!0):"shadowType"===r||"shadowColor"===r||"shadowBlur"===r||"shadowOffsetX"===r||"shadowOffsetY"===r?n.defElementManager.createOrUpdateShadow(t,a,r):"filter"===r?n.defElementManager.createOrUpdateFilter(t,a,m):"innerHTML"===r?n.createOrUpdateInnerHTML(i,a,m):"anchor"===r?t.nodeName!==e.Shape.TEXT&&n.updateAnchorWithTransform(t):d&&[a,u].forEach((function(t){t&&f&&("unset"!==p&&p!==ht[r]?t.setAttribute(f,v):t.removeAttribute(f))})))}))},r.createSVGDom=function(t,r,n,i){void 0===i&&(i=!1),r.elementSVG=new R;var o=r.elementSVG,a=this.createElementContribution.createElement(r);if(a){var s,u;r.nodeName===e.Shape.HTML&&(r.parsedStyle.$el=a),this.pluginOptions.outputSVGElementId&&(a.id="g_svg_"+r.nodeName+"_"+r.entity),this.pluginOptions.outputSVGElementName&&r.name&&a.setAttribute("name",r.name),!a.hasAttribute("data-wrapgroup")&&"g"===a.nodeName||i?u=a:(u=B("g",t)).appendChild(a),o.$el=a,o.$groupEl=u,this.applyAttributes(r),this.createOrUpdateHitArea(r,a,u);var c=r.parentNode&&(null===(s=r.parentNode.elementSVG)||void 0===s?void 0:s.$groupEl)||n;c&&(c.appendChild(u),this.pendingReorderQueue.add(r.parentNode))}},r.removeSVGDom=function(t){var e,r=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;r&&r.parentNode&&(r.parentNode.removeChild(r),this.createElementContribution.destroyElement(t,r))},r.createOrUpdateHitArea=function(t,e,r){var n=t.elementSVG,i=n.$hitTestingEl,o=t.parsedStyle.increasedLineWidthForHitTesting;if(o){if(!i){i=e.cloneNode(),this.pluginOptions.outputSVGElementId&&(i.id="g_svg_"+t.nodeName+"_hittesting_"+t.entity),["filter"].forEach((function(t){i.removeAttribute(t)}));var a="none"!==e.getAttribute("fill");i.setAttribute("fill",a?"transparent":"none"),i.setAttribute("stroke","transparent"),r.appendChild(i),n.$hitTestingEl=i}i.setAttribute("stroke-width",""+(o+t.parsedStyle.lineWidth))}else i&&(r.removeChild(i),n.$hitTestingEl=null)},r.createOrUpdateInnerHTML=function(t,e,r){var n=(t||document).createElement("div");"string"==typeof r?n.innerHTML=r:n.appendChild(r),e.innerHTML="",e.appendChild(n)},r.createOrUpdateClipOrTextPath=function(t,e,r,n){void 0===n&&(n=!1);var i=n?"g":"clipPath",o=n?"text-path":"clip-path";if(e){var a,s,u=(n?pt:dt)+e.entity,c=this.defElementManager.getDefElement();if(!c.querySelector("#"+u))n?(this.createSVGDom(t,e,null,!0),s=e.elementSVG.$el):(s=B(i,t),this.createSVGDom(t,e,s,!0),e.elementSVG.$groupEl=s),s.id=u,c.appendChild(s);var l=null===(a=e.elementSVG)||void 0===a?void 0:a.$groupEl;l&&this.applyTransform(l,e.getLocalTransform()),this.applyAttributes(e),n||r.setAttribute(o,"url(#"+u+")")}else n||r.removeAttribute(o)},r.updateAnchorWithTransform=function(t){var r,n,i=t.getGeometryBounds(),o=i&&2*i.halfExtents[0]||0,a=i&&2*i.halfExtents[1]||0,s=(t.parsedStyle||{}).anchor;[null===(r=t.elementSVG)||void 0===r?void 0:r.$el,null===(n=t.elementSVG)||void 0===n?void 0:n.$hitTestingEl].forEach((function(r){if(r){var n=-s[0]*o,i=-s[1]*a;0===n&&0===i||r.setAttribute("transform","translate("+n+","+i+")"),t.nodeName!==e.Shape.CIRCLE&&t.nodeName!==e.Shape.ELLIPSE||(r.setAttribute("cx",""+o/2),r.setAttribute("cy",""+a/2))}}))},t}(),nt.tag="SVGRenderer",it=nt);vt=it=s([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.CanvasConfig)),u(1,e.inject(e.DefaultCamera)),u(2,e.inject(e.ContextService)),u(3,e.inject(e.RenderingContext)),u(4,e.inject(e.StyleValueRegistry)),u(5,e.inject(ot)),u(6,e.inject(rt)),u(7,e.inject(at))],vt);var mt,gt,yt={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},bt={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"};function wt(t,e){var r=e.textBaseline,n=e.lineWidth,i=e.metrics,o=e.dx,a=e.dy,s=e.textPath,u=e.textPathSide,c=void 0===u?"left":u,l=e.textPathStartOffset,h=void 0===l?0:l,f=e.textDecorationLine,d=void 0===f?"":f,p=e.textDecorationColor,v=void 0===p?"":p,m=e.textDecorationStyle,g=void 0===m?"":m,y=G();y&&"firefox"===y.name?t.setAttribute("dominant-baseline",bt[r]||"alphabetic"):(t.setAttribute("dominant-baseline",bt[r]),t.setAttribute("alignment-baseline",yt[r])),t.setAttribute("paint-order","stroke");var b=i.lines,w=i.lineHeight,E=i.height,A=b.length,S="";if(0===o&&0===a||(S+="transform:translate("+o+"px, "+a+"px);"),d&&"none"!==d&&(S+="text-decoration:"+d+" "+g+" "+v+";"),S&&t.setAttribute("style",S),1===A){var x=ut(b[0]);if(t.setAttribute("dx",""+n/2),s){t.innerHTML="";var L=B("textPath",t.ownerDocument);L.setAttribute("href","#"+(pt+s.entity)),"left"!==c&&L.setAttribute("side",c),0!==h&&L.setAttribute("startOffset",""+h),L.innerHTML=x,t.appendChild(L)}else t.innerHTML=x}else t.innerHTML=b.map((function(t,e){var i=0;return 0===e?"middle"===r?i=w/2-E/2:"top"===r||"hanging"===r?i=0:"bottom"!==r&&"alphabetic"!==r&&"ideographic"!==r||(i=-w*(A-1)):i=w,'<tspan x="0" dx="'+n/2+'" dy="'+i+'">'+ut(t)+"</tspan>"})).join("")}var Et=((mt={})[e.Shape.RECT]="path",mt[e.Shape.CIRCLE]="circle",mt[e.Shape.ELLIPSE]="ellipse",mt[e.Shape.IMAGE]="image",mt[e.Shape.GROUP]="g",mt[e.Shape.LINE]="line",mt[e.Shape.POLYLINE]="polyline",mt[e.Shape.POLYGON]="polygon",mt[e.Shape.TEXT]="text",mt[e.Shape.PATH]="path",mt[e.Shape.HTML]="foreignObject",mt),At=((gt={})[e.Shape.CIRCLE]=["r"],gt[e.Shape.ELLIPSE]=["rx","ry"],gt[e.Shape.RECT]=["width","height","radius"],gt[e.Shape.IMAGE]=["img","width","height"],gt[e.Shape.LINE]=["x1","y1","x2","y2","markerStart","markerEnd","markerStartOffset","markerEndOffset"],gt[e.Shape.POLYLINE]=["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],gt[e.Shape.POLYGON]=["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],gt[e.Shape.PATH]=["path","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"],gt[e.Shape.TEXT]=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","maxLines","leading","textBaseline","textAlign","textTransform","textOverflow","textPath","textPathSide","textPathStartOffset","textDecorationLine","textDecorationColor","textDecorationStyle","dx","dy"],gt),St=function(){function t(t){this.canvasConfig=void 0,this.canvasConfig=t}var r=t.prototype;return r.createElement=function(t){return B(Et[t.nodeName]||"g",this.canvasConfig.document||document)},r.destroyElement=function(t,e){},r.shouldUpdateElementAttribute=function(t,e){return(At[t.nodeName]||[]).indexOf(e)>-1},r.updateElementAttribute=function(t){var r=t.elementSVG.$el,n=t.parsedStyle;switch(t.nodeName){case e.Shape.IMAGE:I(r,n);break;case e.Shape.RECT:F(r,n);break;case e.Shape.LINE:V(r,n);break;case e.Shape.POLYGON:case e.Shape.POLYLINE:U(r,n);break;case e.Shape.PATH:W(r,n);break;case e.Shape.TEXT:wt(r,n)}},t}();St=s([e.singleton({token:ot}),u(0,e.inject(e.CanvasConfig))],St);var xt,Lt,Ot=e.Module((function(t){t(rt),t(St),t(vt)})),Ct=function(t){var e,r;function n(e){var r;return void 0===e&&(e={}),(r=t.call(this)||this).options=void 0,r.name="svg-renderer",r.options=e,r}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,D(e,r);var i=n.prototype;return i.init=function(){var t=this.options,e=t.outputSVGElementId,r=t.outputSVGElementName;this.container.register(at,{useValue:{outputSVGElementId:!!w(e)||!!e,outputSVGElementName:!!w(r)||!!r}}),this.container.load(Ot,!0)},i.destroy=function(){this.container.remove(at),this.container.unload(Ot)},n}(e.AbstractRendererPlugin),kt=Object.freeze({__proto__:null,CLIP_PATH_PREFIX:dt,DEFAULT_VALUE_MAP:ht,get DefaultElementLifeCycleContribution(){return St},ElementLifeCycleContribution:ot,ElementSVG:R,G_SVG_PREFIX:ft,Plugin:Ct,SHAPE2TAGS:Et,SHAPE_UPDATE_DEPS:At,get SVGRendererPlugin(){return vt},SVGRendererPluginOptions:at,SVG_ATTR_MAP:ct,TEXT_PATH_PREFIX:pt,containerModule:Ot,createSVGElement:B,updateImageElementAttribute:I,updateLineElementAttribute:V,updatePathElementAttribute:W,updatePolylineElementAttribute:U,updateRectElementAttribute:F,updateTextElementAttribute:wt});function Tt(){
8
8
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
9
- Ct=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(x([])));g&&g!==e&&r.call(g,i)&&(p=g);var m=d.prototype=h.prototype=Object.create(p);function y(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=d,s(m,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},y(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(m),s(m,a,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function kt(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Tt(t,e){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Tt(t,e)}function Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);e>r;r++)n[r]=t[r];return n}function Pt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}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 _t=(At=function(){function t(t,e){this.canvasConfig=void 0,this.displayObjectPool=void 0,this.canvasConfig=t,this.displayObjectPool=e}var e=t.prototype;return e.apply=function(t){var e=this,r=this.canvasConfig.document;t.hooks.pick.tapPromise(St.tag,function(){var t,n=(t=Ct().mark((function t(n){return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.pick(r,n));case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){kt(o,n,i,a,s,"next",t)}function s(t){kt(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}()),t.hooks.pickSync.tap(St.tag,(function(t){return e.pick(r,t)}))},e.pick=function(t,e){var r=e.topmost,n=e.position,i=n.clientX,o=n.clientY;try{for(var a,s=[],u=Pt((t||document).elementsFromPoint(i,o));!(a=u()).done;){var c=a.value,l=c&&c.getAttribute("id");if(l&&l.startsWith(wt)){var h=l.lastIndexOf("_"),f=this.displayObjectPool.getByEntity(Number(l.substring(h+1)));if(f&&f.isInteractive()&&(s.push(f),r))return e.picked=s,e}}e.picked=s}catch(t){e.picked=[]}return e},t}(),At.tag="SVGPicker",St=At);_t=St=s([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.CanvasConfig)),u(1,e.inject(e.DisplayObjectPool))],_t);var Mt=e.Module((function(t){t(_t)})),jt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="svg-picker",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Tt(e,r);var i=n.prototype;return i.init=function(){this.container.load(Mt,!0)},i.destroy=function(){this.container.unload(Mt)},n}(e.AbstractRendererPlugin),Nt=Object.freeze({__proto__:null,Plugin:jt}),$t=function(){function t(t){this.canvasConfig=void 0,this.$container=void 0,this.$namespace=void 0,this.dpr=void 0,this.canvasConfig=t}var n=t.prototype;return n.init=function(){var t=i(r().mark((function t(){var n,i,o,a,s,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=(n=this.canvasConfig).document,a=n.devicePixelRatio,this.$container=E(i=n.container)?(o||document).getElementById(i):i,this.$container&&(this.$container.style.position||(this.$container.style.position="relative"),(s=Z("svg",o)).setAttribute("width",""+this.canvasConfig.width),s.setAttribute("height",""+this.canvasConfig.height),this.$container.appendChild(s),this.$namespace=s),u=1>(u=a||e.isBrowser&&window.devicePixelRatio||1)?1:Math.ceil(u),this.dpr=u;case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getDomElement=function(){return this.$namespace},n.getContext=function(){return this.$namespace},n.getDPR=function(){return this.dpr},n.getBoundingClientRect=function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()},n.destroy=function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)},n.resize=function(t,e){this.$namespace&&(this.$namespace.setAttribute("width",""+t),this.$namespace.setAttribute("height",""+e))},n.applyCursorStyle=function(t){this.$container&&(this.$container.style.cursor=t)},n.toDataURL=function(){var t=i(r().mark((function t(e){var n,i,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.$namespace.cloneNode(!0),i=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),(o=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",i)).replaceChild(n,o.documentElement),t.abrupt("return","data:image/svg+xml;charset=utf8,"+encodeURIComponent((new XMLSerializer).serializeToString(o)));case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}();$t=s([e.singleton({token:e.ContextService}),u(0,e.inject(e.CanvasConfig))],$t);var Dt=e.Module((function(t){t($t)})),It=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="svg-context-register",e}o(e,t);var r=e.prototype;return r.init=function(){this.container.load(Dt,!0)},r.destroy=function(){this.container.unload(Dt)},e}(e.AbstractRendererPlugin),Rt=function(t){function e(e){var r;return void 0===e&&(e={}),(r=t.call(this,e)||this).registerPlugin(new It),r.registerPlugin(new Lt({outputSVGElementId:e.outputSVGElementId})),r.registerPlugin(new m),r.registerPlugin(new jt),r}return o(e,t),e}(e.AbstractRenderer);t.DomInteraction=y,t.Renderer=Rt,t.SVGPicker=Nt,t.SVGRenderer=Ot,Object.defineProperty(t,"__esModule",{value:!0})}));
9
+ Tt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function f(){}function d(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(x([])));m&&m!==e&&r.call(m,i)&&(p=m);var g=d.prototype=h.prototype=Object.create(p);function y(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=d,s(g,"constructor",d),s(d,"constructor",f),f.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},y(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(g),s(g,a,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=x,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Pt(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Gt(t,e){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gt(t,e)}function _t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);e>r;r++)n[r]=t[r];return n}function Mt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return _t(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_t(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}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 jt=(xt=function(){function t(t,e){this.canvasConfig=void 0,this.displayObjectPool=void 0,this.canvasConfig=t,this.displayObjectPool=e}var e=t.prototype;return e.apply=function(t){var e=this,r=this.canvasConfig.document;t.hooks.pick.tapPromise(Lt.tag,function(){var t,n=(t=Tt().mark((function t(n){return Tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.pick(r,n));case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Pt(o,n,i,a,s,"next",t)}function s(t){Pt(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}()),t.hooks.pickSync.tap(Lt.tag,(function(t){return e.pick(r,t)}))},e.pick=function(t,e){var r=e.topmost,n=e.position,i=n.clientX,o=n.clientY;try{for(var a,s=[],u=Mt((t||document).elementsFromPoint(i,o));!(a=u()).done;){var c=a.value,l=c&&c.getAttribute("id");if(l&&l.startsWith(ft)){var h=l.lastIndexOf("_"),f=this.displayObjectPool.getByEntity(Number(l.substring(h+1)));if(f&&f.isInteractive()&&(s.push(f),r))return e.picked=s,e}}e.picked=s}catch(t){e.picked=[]}return e},t}(),xt.tag="SVGPicker",Lt=xt);jt=Lt=s([e.singleton({contrib:e.RenderingPluginContribution}),u(0,e.inject(e.CanvasConfig)),u(1,e.inject(e.DisplayObjectPool))],jt);var Nt=e.Module((function(t){t(jt)})),$t=function(t){var e,r;function n(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="svg-picker",e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Gt(e,r);var i=n.prototype;return i.init=function(){this.container.load(Nt,!0)},i.destroy=function(){this.container.unload(Nt)},n}(e.AbstractRendererPlugin),Dt=Object.freeze({__proto__:null,Plugin:$t}),Rt=function(){function t(t){this.canvasConfig=void 0,this.$container=void 0,this.$namespace=void 0,this.dpr=void 0,this.canvasConfig=t}var n=t.prototype;return n.init=function(){var t=i(r().mark((function t(){var n,i,o,a,s,u;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=(n=this.canvasConfig).document,a=n.devicePixelRatio,this.$container=E(i=n.container)?(o||document).getElementById(i):i,this.$container&&(this.$container.style.position||(this.$container.style.position="relative"),(s=B("svg",o)).setAttribute("width",""+this.canvasConfig.width),s.setAttribute("height",""+this.canvasConfig.height),this.$container.appendChild(s),this.$namespace=s),u=1>(u=a||e.isBrowser&&window.devicePixelRatio||1)?1:Math.ceil(u),this.dpr=u;case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getDomElement=function(){return this.$namespace},n.getContext=function(){return this.$namespace},n.getDPR=function(){return this.dpr},n.getBoundingClientRect=function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()},n.destroy=function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)},n.resize=function(t,e){this.$namespace&&(this.$namespace.setAttribute("width",""+t),this.$namespace.setAttribute("height",""+e))},n.applyCursorStyle=function(t){this.$container&&(this.$container.style.cursor=t)},n.toDataURL=function(){var t=i(r().mark((function t(e){var n,i,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.$namespace.cloneNode(!0),i=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),(o=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",i)).replaceChild(n,o.documentElement),t.abrupt("return","data:image/svg+xml;charset=utf8,"+encodeURIComponent((new XMLSerializer).serializeToString(o)));case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}();Rt=s([e.singleton({token:e.ContextService}),u(0,e.inject(e.CanvasConfig))],Rt);var It=e.Module((function(t){t(Rt)})),Vt=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="svg-context-register",e}o(e,t);var r=e.prototype;return r.init=function(){this.container.load(It,!0)},r.destroy=function(){this.container.unload(It)},e}(e.AbstractRendererPlugin),Wt=function(t){function e(e){var r;return void 0===e&&(e={}),(r=t.call(this,e)||this).registerPlugin(new Vt),r.registerPlugin(new Ct({outputSVGElementId:e.outputSVGElementId})),r.registerPlugin(new g),r.registerPlugin(new $t),r}return o(e,t),e}(e.AbstractRenderer);t.DomInteraction=y,t.Renderer=Wt,t.SVGPicker=Dt,t.SVGRenderer=kt,Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g-svg",
3
- "version": "1.8.16",
3
+ "version": "1.8.18",
4
4
  "description": "A renderer implemented by SVG",
5
5
  "keywords": [
6
6
  "antv",
@@ -27,9 +27,9 @@
27
27
  "README.md"
28
28
  ],
29
29
  "dependencies": {
30
- "@antv/g-plugin-dom-interaction": "^1.7.19",
31
- "@antv/g-plugin-svg-picker": "^1.7.19",
32
- "@antv/g-plugin-svg-renderer": "^1.8.16",
30
+ "@antv/g-plugin-dom-interaction": "^1.7.21",
31
+ "@antv/g-plugin-svg-picker": "^1.7.21",
32
+ "@antv/g-plugin-svg-renderer": "^1.8.18",
33
33
  "@antv/util": "^3.2.4",
34
34
  "tslib": "^2.3.1"
35
35
  },
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "635b292339f6f545b604576cfc42e8e9061c1a41"
46
+ "gitHead": "f544c40d7f0c7ef712e81bd5311fc70530dc43e7"
47
47
  }