Index: imaps-frontend/node_modules/canvg/LICENSE
===================================================================
--- imaps-frontend/node_modules/canvg/LICENSE	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/LICENSE	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2010 - present Gabe Lerner (gabelerner@gmail.com) - https://github.com/canvg/canvg
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
Index: imaps-frontend/node_modules/canvg/README.md
===================================================================
--- imaps-frontend/node_modules/canvg/README.md	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/README.md	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,314 @@
+# canvg
+
+[![NPM version][npm]][npm-url]
+[![Dependencies status][deps]][deps-url]
+[![Build status][build]][build-url]
+[![Coverage status][coverage]][coverage-url]
+[![Dependabot badge][dependabot]][dependabot-url]
+[![Documentation badge][documentation]][documentation-url]
+
+[npm]: https://img.shields.io/npm/v/canvg.svg
+[npm-url]: https://npmjs.com/package/canvg
+
+[deps]: https://david-dm.org/canvg/canvg.svg
+[deps-url]: https://david-dm.org/canvg/canvg
+
+[build]: https://img.shields.io/github/workflow/status/canvg/canvg/CI.svg
+[build-url]: https://github.com/canvg/canvg/actions
+
+[coverage]: https://img.shields.io/coveralls/canvg/canvg.svg
+[coverage-url]: https://coveralls.io/r/canvg/canvg
+
+[dependabot]: https://api.dependabot.com/badges/status?host=github&repo=canvg/canvg
+[dependabot-url]: https://dependabot.com/
+
+[documentation]: https://img.shields.io/badge/API-Documentation-2b7489.svg
+[documentation-url]: https://canvg.github.io/canvg
+
+JavaScript SVG parser and renderer on Canvas. It takes the URL to the SVG file or the text of the SVG file, parses it in JavaScript and renders the result on Canvas.
+
+[Demo](https://canvg.github.io/canvg/demo/index.html)
+
+[Playground](https://jsfiddle.net/0q1vrjxk/)
+
+## Install
+
+```sh
+npm i canvg
+# or
+yarn add canvg
+```
+
+## Usage
+
+Basic module exports:
+
+```js
+export default Canvg;
+export {
+    presets
+};
+```
+
+[Description of all exports you can find in Documentation.](https://canvg.github.io/canvg/index.html)
+
+### Example
+
+```js
+import Canvg from 'canvg';
+
+let v = null;
+
+window.onload = async () => {
+    const canvas = document.querySelector('canvas');
+    const ctx = canvas.getContext('2d');
+    
+    v = await Canvg.from(ctx, './svgs/1.svg');
+
+    // Start SVG rendering with animations and mouse handling.
+    v.start();
+};
+
+window.onbeforeunload = () => {
+    v.stop();
+};
+```
+
+<details>
+    <summary>
+        <b>OffscreenCanvas</b>
+    </summary>
+
+```js
+import Canvg, {
+    presets
+} from 'canvg';
+
+self.onmessage = async (event) => {
+    const {
+        width,
+        height,
+        svg
+    } = event.data;
+    const canvas = new OffscreenCanvas(width, height);
+    const ctx = canvas.getContext('2d');
+    const v = await Canvg.from(ctx, svg, presets.offscreen());
+
+    // Render only first frame, ignoring animations and mouse.
+    await v.render();
+
+    const blob = await canvas.convertToBlob();
+    const pngUrl = URL.createObjectURL(blob);
+
+    self.postMessage({
+        pngUrl
+    });
+};
+```
+
+[`OffscreenCanvas` browsers compatibility.](https://caniuse.com/offscreencanvas)
+
+</details>
+
+<details>
+    <summary>
+        <b>NodeJS</b>
+    </summary>
+
+```js
+import {
+    promises as fs
+} from 'fs';
+import {
+    DOMParser
+} from 'xmldom';
+import * as canvas from 'canvas';
+import fetch from 'node-fetch';
+import Canvg, {
+    presets
+} from 'canvg';
+
+const preset = presets.node({
+    DOMParser,
+    canvas,
+    fetch
+});
+
+(async (output, input) => {
+    const svg = await fs.readFile(input, 'utf8');
+    const canvas = preset.createCanvas(800, 600);
+    const ctx = canvas.getContext('2d');
+    const v = Canvg.fromString(ctx, svg, preset);
+
+    // Render only first frame, ignoring animations.
+    await v.render();
+
+    const png = canvas.toBuffer();
+
+    await fs.writeFile(output, png);
+
+})(
+    process.argv.pop(),
+    process.argv.pop()
+);
+```
+
+</details>
+
+<details>
+    <summary>
+        <b>Resize</b>
+    </summary>
+
+```js
+import Canvg, {
+    presets
+} from 'canvg';
+
+self.onmessage = async (event) => {
+    const {
+        width,
+        height,
+        svg
+    } = event.data;
+    const canvas = new OffscreenCanvas(width, height);
+    const ctx = canvas.getContext('2d');
+    const v = await Canvg.from(ctx, svg, presets.offscreen());
+
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+    v.resize(width, height, 'xMidYMid meet');
+
+    // Render only first frame, ignoring animations and mouse.
+    await v.render();
+
+    const blob = await canvas.convertToBlob();
+    const pngUrl = URL.createObjectURL(blob);
+
+    self.postMessage({
+        pngUrl
+    });
+};
+```
+
+</details>
+
+<details>
+    <summary>
+        <b>Browser</b>
+    </summary>
+
+```html
+<script type="text/javascript" src="https://unpkg.com/canvg@3.0.4/lib/umd.js"></script>
+<script type="text/javascript">
+window.onload = () => {
+    const canvas = document.querySelector('canvas');
+    const ctx = canvas.getContext('2d');
+    
+    v = canvg.Canvg.fromString(ctx, '<svg width="600" height="600"><text x="50" y="50">Hello World!</text></svg>');
+
+    // Start SVG rendering with animations and mouse handling.
+    v.start();
+
+};
+</script>
+<canvas />
+```
+
+</details>
+
+### Options
+
+The third parameter of `new Canvg(...)`, `Canvg.from(...)` and `Canvg.fromString(...)` is options:
+
+```ts
+interface IOptions {
+    /**
+     * WHATWG-compatible `fetch` function.
+     */
+    fetch?: typeof fetch;
+    /**
+     * XML/HTML parser from string into DOM Document.
+     */
+    DOMParser?: typeof DOMParser;
+    /**
+     * Window object.
+     */
+    window?: Window;
+    /**
+     * Whether enable the redraw.
+     */
+    enableRedraw?: boolean;
+    /**
+     * Ignore mouse events.
+     */
+    ignoreMouse?: boolean;
+    /**
+     * Ignore animations.
+     */
+    ignoreAnimation?: boolean;
+    /**
+     * Does not try to resize canvas.
+     */
+    ignoreDimensions?: boolean;
+    /**
+     * Does not clear canvas.
+     */
+    ignoreClear?: boolean;
+    /**
+     * Scales horizontally to width.
+     */
+    scaleWidth?: number;
+    /**
+     * Scales vertically to height.
+     */
+    scaleHeight?: number;
+    /**
+     * Draws at a x offset.
+     */
+    offsetX?: number;
+    /**
+     * Draws at a y offset.
+     */
+    offsetY?: number;
+    /**
+     * Will call the function on every frame, if it returns true, will redraw.
+     */
+    forceRedraw?(): boolean;
+    /**
+     * Default `rem` size.
+     */
+    rootEmSize?: number;
+    /**
+     * Default `em` size.
+     */
+    emSize?: number;
+    /**
+     * Function to create new canvas.
+     */
+    createCanvas?: (width: number, height: number) => HTMLCanvasElement | OffscreenCanvas;
+    /**
+     * Function to create new image.
+     */
+    createImage?: (src: string, anonymousCrossOrigin?: boolean) => Promise<CanvasImageSource>;
+    /**
+     * Load images anonymously.
+     */
+    anonymousCrossOrigin?: boolean;
+}
+```
+
+#### Options presets
+
+There are two options presets:
+
+- `presets.offscreen()`: options for [`OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas);
+- `presets.node({ DOMParser, canvas, fetch })`: options for NodeJS with [`node-canvas`](https://github.com/Automattic/node-canvas).
+
+## What's implemented?
+
+The end goal is everything from the [SVG spec](http://www.w3.org/TR/SVG/). The majority of the rendering and animation is working. If you would like to see a feature implemented, don't hesitate to add it to the issues list, or better is to create pull request 😎
Index: imaps-frontend/node_modules/canvg/lib/BoundingBox.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/BoundingBox.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/BoundingBox.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,21 @@
+export default class BoundingBox {
+    x1: number;
+    y1: number;
+    x2: number;
+    y2: number;
+    constructor(x1?: number, y1?: number, x2?: number, y2?: number);
+    get x(): number;
+    get y(): number;
+    get width(): number;
+    get height(): number;
+    addPoint(x: number, y: number): void;
+    addX(x: number): void;
+    addY(y: number): void;
+    addBoundingBox(boundingBox: BoundingBox): void;
+    private sumCubic;
+    private bezierCurveAdd;
+    addBezierCurve(p0x: number, p0y: number, p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): void;
+    addQuadraticCurve(p0x: number, p0y: number, p1x: number, p1y: number, p2x: number, p2y: number): void;
+    isPointInBox(x: number, y: number): boolean;
+}
+//# sourceMappingURL=BoundingBox.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/BoundingBox.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/BoundingBox.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/BoundingBox.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"BoundingBox.d.ts","sourceRoot":"","sources":["../src/BoundingBox.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,OAAO,WAAW;IAEvB,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;gBAHF,EAAE,SAAa,EACf,EAAE,SAAa,EACf,EAAE,SAAa,EACf,EAAE,SAAa;IAMvB,IAAI,CAAC,WAEJ;IAED,IAAI,CAAC,WAEJ;IAED,IAAI,KAAK,WAER;IAED,IAAI,MAAM,WAET;IAED,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAgC7B,IAAI,CAAC,CAAC,EAAE,MAAM;IAId,IAAI,CAAC,CAAC,EAAE,MAAM;IAId,cAAc,CAAC,WAAW,EAAE,WAAW;IAgBvC,OAAO,CAAC,QAAQ;IAehB,OAAO,CAAC,cAAc;IA6DtB,cAAc,CACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM;IAQZ,iBAAiB,CAChB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM;IAUZ,YAAY,CACX,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM;CAgBV"}
Index: imaps-frontend/node_modules/canvg/lib/Canvg.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Canvg.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Canvg.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,98 @@
+import { RenderingContext2D } from './types';
+import Parser, { IParserOptions } from './Parser';
+import Screen, { IScreenOptions, IScreenStartOptions } from './Screen';
+import Document, { IDocumentOptions } from './Document';
+declare type DOMDocument = typeof window.document;
+export interface IOptions extends IParserOptions, IScreenOptions, IScreenStartOptions, IDocumentOptions {
+}
+/**
+ * SVG renderer on canvas.
+ */
+export default class Canvg {
+    /**
+     * Create Canvg instance from SVG source string or URL.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string or URL.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    static from(ctx: RenderingContext2D, svg: string, options?: IOptions): Promise<Canvg>;
+    /**
+     * Create Canvg instance from SVG source string.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    static fromString(ctx: RenderingContext2D, svg: string, options?: IOptions): Canvg;
+    /**
+     * XML/HTML parser instance.
+     */
+    readonly parser: Parser;
+    /**
+     * Screen instance.
+     */
+    readonly screen: Screen;
+    /**
+     * Canvg Document.
+     */
+    readonly document: Document;
+    private readonly documentElement;
+    private readonly options;
+    /**
+     * Main constructor.
+     * @param ctx - Rendering context.
+     * @param svg - SVG Document.
+     * @param options - Rendering options.
+     */
+    constructor(ctx: RenderingContext2D, svg: DOMDocument, options?: IOptions);
+    /**
+     * Create new Canvg instance with inherited options.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string or URL.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    fork(ctx: RenderingContext2D, svg: string, options?: IOptions): Promise<Canvg>;
+    /**
+     * Create new Canvg instance with inherited options.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    forkString(ctx: RenderingContext2D, svg: string, options?: IOptions): Canvg;
+    /**
+     * Document is ready promise.
+     * @returns Ready promise.
+     */
+    ready(): Promise<void>;
+    /**
+     * Document is ready value.
+     * @returns Is ready or not.
+     */
+    isReady(): boolean;
+    /**
+     * Render only first frame, ignoring animations and mouse.
+     * @param options - Rendering options.
+     */
+    render(options?: IScreenStartOptions): Promise<void>;
+    /**
+     * Start rendering.
+     * @param options - Render options.
+     */
+    start(options?: IScreenStartOptions): void;
+    /**
+     * Stop rendering.
+     */
+    stop(): void;
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+    resize(width: number, height?: number, preserveAspectRatio?: boolean | string): void;
+}
+export {};
+//# sourceMappingURL=Canvg.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Canvg.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Canvg.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Canvg.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Canvg.d.ts","sourceRoot":"","sources":["../src/Canvg.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,MAAM,EAAE,EACd,cAAc,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,MAAM,EAAE,EACd,cAAc,EACd,mBAAmB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,EAAE,EAChB,gBAAgB,EAEhB,MAAM,YAAY,CAAC;AAEpB,aAAK,WAAW,GAAG,OAAO,MAAM,CAAC,QAAQ,CAAC;AAE1C,MAAM,WAAW,QAAS,SAAQ,cAAc,EAC/C,cAAc,EACd,mBAAmB,EACnB,gBAAgB;CAAG;AAEpB;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,KAAK;IACzB;;;;;;OAMG;WACU,IAAI,CAChB,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,QAAa;IAQvB;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CAChB,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,QAAa;IAQvB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAa;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IAEnC;;;;;OAKG;gBAEF,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,WAAW,EAChB,OAAO,GAAE,QAAa;IAavB;;;;;;OAMG;IACH,IAAI,CACH,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,QAAa;IAQvB;;;;;;OAMG;IACH,UAAU,CACT,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,QAAa;IAQvB;;;OAGG;IACH,KAAK;IAIL;;;OAGG;IACH,OAAO;IAIP;;;OAGG;IACG,MAAM,CAAC,OAAO,GAAE,mBAAwB;IAa9C;;;OAGG;IACH,KAAK,CAAC,OAAO,GAAE,mBAAwB;IAcvC;;OAEG;IACH,IAAI;IAIJ;;;;;OAKG;IACH,MAAM,CACL,KAAK,EAAE,MAAM,EACb,MAAM,SAAQ,EACd,mBAAmB,GAAE,OAAO,GAAC,MAAc;CAI5C"}
Index: imaps-frontend/node_modules/canvg/lib/Document/AElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/AElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/AElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,14 @@
+import { RenderingContext2D } from '../types';
+import Document from './Document';
+import TextElement from './TextElement';
+export default class AElement extends TextElement {
+    type: string;
+    protected readonly hasText: boolean;
+    protected readonly text: string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    getText(): string;
+    renderChildren(ctx: RenderingContext2D): void;
+    onClick(): void;
+    onMouseMove(): void;
+}
+//# sourceMappingURL=AElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/AElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/AElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/AElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"AElement.d.ts","sourceRoot":"","sources":["../../src/Document/AElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAChD,IAAI,SAAO;IACX,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IACpC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAG/B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAiB3B,OAAO;IAIP,cAAc,CAAC,GAAG,EAAE,kBAAkB;IA6CtC,OAAO;IAUP,WAAW;CAKX"}
Index: imaps-frontend/node_modules/canvg/lib/Document/AnimateColorElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/AnimateColorElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/AnimateColorElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+import AnimateElement from './AnimateElement';
+export default class AnimateColorElement extends AnimateElement {
+    type: string;
+    calcValue(): string;
+}
+//# sourceMappingURL=AnimateColorElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/AnimateColorElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/AnimateColorElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/AnimateColorElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"AnimateColorElement.d.ts","sourceRoot":"","sources":["../../src/Document/AnimateColorElement.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,cAAc;IAC9D,IAAI,SAAkB;IAEtB,SAAS;CA2BT"}
Index: imaps-frontend/node_modules/canvg/lib/Document/AnimateElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/AnimateElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/AnimateElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,27 @@
+import Property from '../Property';
+import Document from './Document';
+import Element from './Element';
+export interface IProgress {
+    from?: Property;
+    to?: Property;
+    progress: number;
+}
+export default class AnimateElement extends Element {
+    type: string;
+    protected readonly begin: number;
+    protected readonly maxDuration: number;
+    protected readonly from: Property;
+    protected readonly to: Property;
+    protected readonly values: Property<string[]>;
+    protected duration: number;
+    protected initialValue: string;
+    protected initialUnits: string;
+    protected removed: boolean;
+    protected frozen: boolean;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    protected getProperty(): Property<any>;
+    calcValue(): string;
+    update(delta: number): boolean;
+    getProgress(): IProgress;
+}
+//# sourceMappingURL=AnimateElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/AnimateElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/AnimateElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/AnimateElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"AnimateElement.d.ts","sourceRoot":"","sources":["../../src/Document/AnimateElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,WAAW,SAAS;IACzB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IAClD,IAAI,SAAa;IACjB,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IACvC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAClC,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IAChC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,SAAS,CAAC,QAAQ,SAAK;IACvB,SAAS,CAAC,YAAY,EAAE,MAAM,CAAQ;IACtC,SAAS,CAAC,YAAY,SAAM;IAC5B,SAAS,CAAC,OAAO,UAAS;IAC1B,SAAS,CAAC,MAAM,UAAS;gBAGxB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAmB3B,SAAS,CAAC,WAAW;IAWrB,SAAS;IAmBT,MAAM,CAAC,KAAK,EAAE,MAAM;IA+DpB,WAAW;CAgCX"}
Index: imaps-frontend/node_modules/canvg/lib/Document/AnimateTransformElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/AnimateTransformElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/AnimateTransformElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+import AnimateElement from './AnimateElement';
+export default class AnimateTransformElement extends AnimateElement {
+    type: string;
+    calcValue(): string;
+}
+//# sourceMappingURL=AnimateTransformElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/AnimateTransformElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/AnimateTransformElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/AnimateTransformElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"AnimateTransformElement.d.ts","sourceRoot":"","sources":["../../src/Document/AnimateTransformElement.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,cAAc;IAClE,IAAI,SAAsB;IAE1B,SAAS;CAiBT"}
Index: imaps-frontend/node_modules/canvg/lib/Document/CircleElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/CircleElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/CircleElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import { RenderingContext2D } from '../types';
+import BoundingBox from '../BoundingBox';
+import PathElement from './PathElement';
+export default class CircleElement extends PathElement {
+    type: string;
+    path(ctx: RenderingContext2D): BoundingBox;
+    getMarkers(): any;
+}
+//# sourceMappingURL=CircleElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/CircleElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/CircleElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/CircleElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"CircleElement.d.ts","sourceRoot":"","sources":["../../src/Document/CircleElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACrD,IAAI,SAAY;IAEhB,IAAI,CAAC,GAAG,EAAE,kBAAkB;IAmB5B,UAAU;CAGV"}
Index: imaps-frontend/node_modules/canvg/lib/Document/ClipPathElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/ClipPathElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/ClipPathElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+import { RenderingContext2D } from '../types';
+import Element from './Element';
+export default class ClipPathElement extends Element {
+    type: string;
+    apply(ctx: RenderingContext2D): void;
+    render(_: RenderingContext2D): void;
+}
+//# sourceMappingURL=ClipPathElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/ClipPathElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/ClipPathElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/ClipPathElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"ClipPathElement.d.ts","sourceRoot":"","sources":["../../src/Document/ClipPathElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,OAAO,MAAM,WAAW,CAAC;AAOhC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IACnD,IAAI,SAAc;IAElB,KAAK,CAAC,GAAG,EAAE,kBAAkB;IAsD7B,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAG5B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/DefsElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/DefsElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/DefsElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+import Element from './Element';
+export default class DefsElement extends Element {
+    type: string;
+    render(): void;
+}
+//# sourceMappingURL=DefsElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/DefsElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/DefsElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/DefsElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"DefsElement.d.ts","sourceRoot":"","sources":["../../src/Document/DefsElement.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,IAAI,SAAU;IAEd,MAAM;CAGN"}
Index: imaps-frontend/node_modules/canvg/lib/Document/DescElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/DescElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/DescElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,5 @@
+import Element from './Element';
+export default class DescElement extends Element {
+    type: string;
+}
+//# sourceMappingURL=DescElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/DescElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/DescElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/DescElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"DescElement.d.ts","sourceRoot":"","sources":["../../src/Document/DescElement.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,IAAI,SAAU;CACd"}
Index: imaps-frontend/node_modules/canvg/lib/Document/Document.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/Document.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/Document.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,119 @@
+import Canvg from '../Canvg';
+import Screen, { IScreenViewBoxConfig } from '../Screen';
+import Property from '../Property';
+import SVGFontLoader from '../SVGFontLoader';
+import Element from './Element';
+import TextNode from './TextNode';
+import ImageElement from './ImageElement';
+import SVGElement from './SVGElement';
+/**
+ * Function to create new canvas.
+ */
+export declare type CreateCanvas = (width: number, height: number) => HTMLCanvasElement | OffscreenCanvas;
+/**
+ * Function to create new image.
+ */
+export declare type CreateImage = (src: string, anonymousCrossOrigin?: boolean) => Promise<CanvasImageSource>;
+export interface IDocumentOptions {
+    /**
+     * Default `rem` size.
+     */
+    rootEmSize?: number;
+    /**
+     * Default `em` size.
+     */
+    emSize?: number;
+    /**
+     * Function to create new canvas.
+     */
+    createCanvas?: CreateCanvas;
+    /**
+     * Function to create new image.
+     */
+    createImage?: CreateImage;
+    /**
+     * Load images anonymously.
+     */
+    anonymousCrossOrigin?: boolean;
+}
+export declare type IViewBoxConfig = Omit<IScreenViewBoxConfig, 'document'>;
+declare type DOMDocument = typeof window.document;
+declare function createCanvas(width: number, height: number): HTMLCanvasElement;
+declare function createImage(src: string, anonymousCrossOrigin?: boolean): Promise<HTMLImageElement>;
+export default class Document {
+    readonly canvg: Canvg;
+    static readonly createCanvas: typeof createCanvas;
+    static readonly createImage: typeof createImage;
+    static readonly elementTypes: {
+        svg: typeof SVGElement;
+        rect: typeof import("./RectElement").default;
+        circle: typeof import("./CircleElement").default;
+        ellipse: typeof import("./EllipseElement").default;
+        line: typeof import("./LineElement").default;
+        polyline: typeof import("./PolylineElement").default;
+        polygon: typeof import("./PolygonElement").default;
+        path: typeof import("./PathElement").default;
+        pattern: typeof import("./PatternElement").default;
+        marker: typeof import("./MarkerElement").default;
+        defs: typeof import("./DefsElement").default;
+        linearGradient: typeof import("./LinearGradientElement").default;
+        radialGradient: typeof import("./RadialGradientElement").default;
+        stop: typeof import("./StopElement").default;
+        animate: typeof import("./AnimateElement").default;
+        animateColor: typeof import("./AnimateColorElement").default;
+        animateTransform: typeof import("./AnimateTransformElement").default;
+        font: typeof import("./FontElement").default;
+        'font-face': typeof import("./FontFaceElement").default;
+        'missing-glyph': typeof import("./MissingGlyphElement").default;
+        glyph: typeof import("./GlyphElement").default;
+        text: typeof import("./TextElement").default;
+        tspan: typeof import("./TSpanElement").default;
+        tref: typeof import("./TRefElement").default;
+        a: typeof import("./AElement").default;
+        textPath: typeof import("./TextPathElement").default;
+        image: typeof ImageElement;
+        g: typeof import("./GElement").default;
+        symbol: typeof import("./SymbolElement").default;
+        style: typeof import("./StyleElement").default;
+        use: typeof import("./UseElement").default;
+        mask: typeof import("./MaskElement").default;
+        clipPath: typeof import("./ClipPathElement").default;
+        filter: typeof import("./FilterElement").default;
+        feDropShadow: typeof import("./FeDropShadowElement").default;
+        feMorphology: typeof import("./FeMorphologyElement").default;
+        feComposite: typeof import("./FeCompositeElement").default;
+        feColorMatrix: typeof import("./FeColorMatrixElement").default;
+        feGaussianBlur: typeof import("./FeGaussianBlurElement").default;
+        title: typeof import("./TitleElement").default;
+        desc: typeof import("./DescElement").default;
+    };
+    rootEmSize: number;
+    documentElement: SVGElement;
+    readonly screen: Screen;
+    readonly createCanvas: CreateCanvas;
+    readonly createImage: CreateImage;
+    readonly definitions: Record<string, Element>;
+    readonly styles: Record<string, Record<string, Property>>;
+    readonly stylesSpecificity: Record<string, string>;
+    readonly images: ImageElement[];
+    readonly fonts: SVGFontLoader[];
+    private readonly emSizeStack;
+    private uniqueId;
+    constructor(canvg: Canvg, { rootEmSize, emSize, createCanvas, createImage, anonymousCrossOrigin }?: IDocumentOptions);
+    private bindCreateImage;
+    get window(): Window;
+    get fetch(): typeof fetch;
+    get ctx(): import("..").RenderingContext2D;
+    get emSize(): number;
+    set emSize(value: number);
+    popEmSize(): void;
+    getUniqueId(): string;
+    isImagesLoaded(): boolean;
+    isFontsLoaded(): boolean;
+    createDocumentElement(document: DOMDocument): SVGElement;
+    createElement<T extends Element>(node: HTMLElement): T;
+    createTextNode(node: HTMLElement): TextNode;
+    setViewBox(config: IViewBoxConfig): void;
+}
+export {};
+//# sourceMappingURL=Document.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/Document.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/Document.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/Document.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../src/Document/Document.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,MAAM,EAAE,EACd,oBAAoB,EACpB,MAAM,WAAW,CAAC;AACnB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,UAAU,MAAM,cAAc,CAAC;AAKtC;;GAEG;AACH,oBAAY,YAAY,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,iBAAiB,GAAG,eAAe,CAAC;AAElG;;GAEG;AACH,oBAAY,WAAW,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEtG,MAAM,WAAW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MAAM,CAAC,CAAM;IACxD,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,CAAM;IACrC,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,CAAM;IACrC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgB;IAC5C,OAAO,CAAC,QAAQ,CAAK;gBAGX,KAAK,EAAE,KAAK,EACrB,EACC,UAAe,EACf,MAAW,EACX,YAAoC,EACpC,WAAkC,EAClC,oBAAoB,EACpB,GAAE,gBAAqB;IAYzB,OAAO,CAAC,eAAe;IAavB,IAAI,MAAM,WAET;IAED,IAAI,KAAK,iBAER;IAED,IAAI,GAAG,oCAEN;IAED,IAAI,MAAM,IAQQ,MAAM,CAFvB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAMvB;IAED,SAAS;IAQT,WAAW;IAIX,cAAc;IAId,aAAa;IAIb,qBAAqB,CAAC,QAAQ,EAAE,WAAW;IAW3C,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,WAAW;IAWlD,cAAc,CAAC,IAAI,EAAE,WAAW;IAIhC,UAAU,CAAC,MAAM,EAAE,cAAc;CAMjC"}
Index: imaps-frontend/node_modules/canvg/lib/Document/Element.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/Element.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/Element.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,33 @@
+import { RenderingContext2D } from '../types';
+import Property from '../Property';
+import Document from './Document';
+export default abstract class Element {
+    protected readonly document: Document;
+    protected readonly node: HTMLElement;
+    protected readonly captureTextNodes: boolean;
+    static readonly ignoreChildTypes: string[];
+    readonly type: string;
+    readonly attributes: Record<string, Property>;
+    readonly styles: Record<string, Property>;
+    readonly stylesSpecificity: Record<string, string>;
+    animationFrozen: boolean;
+    animationFrozenValue: string;
+    parent: Element;
+    children: Element[];
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    getAttribute(name: string, createIfNotExists?: boolean): Property<any>;
+    getHrefAttribute(): Property<any>;
+    getStyle(name: string, createIfNotExists?: boolean, skipAncestors?: boolean): Property;
+    render(ctx: RenderingContext2D): void;
+    setContext(_: RenderingContext2D): void;
+    protected applyEffects(ctx: RenderingContext2D): void;
+    clearContext(_: RenderingContext2D): void;
+    renderChildren(ctx: RenderingContext2D): void;
+    protected addChild(childNode: Element | HTMLElement): void;
+    protected matchesSelector(selector: string): boolean;
+    addStylesFromStyleDefinition(): void;
+    protected removeStyles(element: Element, ignoreStyles: string[]): [string, string][];
+    protected restoreStyles(element: Element, styles: [string, string][]): void;
+    isFirstChild(): boolean;
+}
+//# sourceMappingURL=Element.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/Element.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/Element.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/Element.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Element.d.ts","sourceRoot":"","sources":["../../src/Document/Element.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAMlC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,OAAO;IAenC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ;IACrC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW;IACpC,SAAS,CAAC,QAAQ,CAAC,gBAAgB;IAhBpC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,WAE9B;IAEF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAM;IACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAM;IAC/C,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IACxD,eAAe,UAAS;IACxB,oBAAoB,SAAM;IAC1B,MAAM,EAAE,OAAO,CAAQ;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAM;gBAGL,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,UAAQ;IAiE5C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,UAAQ;IAcpD,gBAAgB;IAUhB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,UAAQ,EAAE,aAAa,UAAQ,GAAG,QAAQ;IAuClF,MAAM,CAAC,GAAG,EAAE,kBAAkB;IAmC9B,UAAU,CAAC,CAAC,EAAE,kBAAkB;IAIhC,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,kBAAkB;IAoB9C,YAAY,CAAC,CAAC,EAAE,kBAAkB;IAIlC,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAMtC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAC,WAAW;IAYjD,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM;IAkB1C,4BAA4B;IA6B5B,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE;IAqB/D,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;IASpE,YAAY;CAGZ"}
Index: imaps-frontend/node_modules/canvg/lib/Document/EllipseElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/EllipseElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/EllipseElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import { RenderingContext2D } from '../types';
+import BoundingBox from '../BoundingBox';
+import PathElement from './PathElement';
+export default class EllipseElement extends PathElement {
+    type: string;
+    path(ctx: RenderingContext2D): BoundingBox;
+    getMarkers(): any;
+}
+//# sourceMappingURL=EllipseElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/EllipseElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/EllipseElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/EllipseElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"EllipseElement.d.ts","sourceRoot":"","sources":["../../src/Document/EllipseElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACtD,IAAI,SAAa;IAEjB,IAAI,CAAC,GAAG,EAAE,kBAAkB;IAqD5B,UAAU;CAGV"}
Index: imaps-frontend/node_modules/canvg/lib/Document/FeColorMatrixElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeColorMatrixElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeColorMatrixElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,11 @@
+import { RenderingContext2D } from '../types';
+import Document from './Document';
+import Element from './Element';
+export default class FeColorMatrixElement extends Element {
+    type: string;
+    protected readonly matrix: number[];
+    protected readonly includeOpacity: boolean;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    apply(ctx: RenderingContext2D, _x: number, _y: number, width: number, height: number): void;
+}
+//# sourceMappingURL=FeColorMatrixElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/FeColorMatrixElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeColorMatrixElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeColorMatrixElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"FeColorMatrixElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeColorMatrixElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AA4ChC,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,OAAO;IACxD,IAAI,SAAmB;IACvB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IACpC,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;gBAG1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAwD3B,KAAK,CACJ,GAAG,EAAE,kBAAkB,EACvB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;CAqCf"}
Index: imaps-frontend/node_modules/canvg/lib/Document/FeCompositeElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeCompositeElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeCompositeElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,7 @@
+import { RenderingContext2D } from '../types';
+import Element from './Element';
+export default class FeCompositeElement extends Element {
+    type: string;
+    apply(_: RenderingContext2D, _x: number, _y: number, _width: number, _height: number): void;
+}
+//# sourceMappingURL=FeCompositeElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/FeCompositeElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeCompositeElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeCompositeElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"FeCompositeElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeCompositeElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,OAAO;IACtD,IAAI,SAAiB;IAErB,KAAK,CACJ,CAAC,EAAE,kBAAkB,EACrB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;CAIhB"}
Index: imaps-frontend/node_modules/canvg/lib/Document/FeDropShadowElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeDropShadowElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeDropShadowElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import { RenderingContext2D } from '../types';
+import Document from './Document';
+import Element from './Element';
+export default class FeDropShadowElement extends Element {
+    type: string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    apply(_: RenderingContext2D, _x: number, _y: number, _width: number, _height: number): void;
+}
+//# sourceMappingURL=FeDropShadowElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/FeDropShadowElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeDropShadowElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeDropShadowElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"FeDropShadowElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeDropShadowElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,OAAO;IACvD,IAAI,SAAkB;gBAGrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAO3B,KAAK,CACJ,CAAC,EAAE,kBAAkB,EACrB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;CAIhB"}
Index: imaps-frontend/node_modules/canvg/lib/Document/FeGaussianBlurElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeGaussianBlurElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeGaussianBlurElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,11 @@
+import { RenderingContext2D } from '../types';
+import Document from './Document';
+import Element from './Element';
+export default class FeGaussianBlurElement extends Element {
+    type: string;
+    readonly extraFilterDistance: number;
+    protected readonly blurRadius: number;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    apply(ctx: RenderingContext2D, x: number, y: number, width: number, height: number): void;
+}
+//# sourceMappingURL=FeGaussianBlurElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/FeGaussianBlurElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeGaussianBlurElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeGaussianBlurElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"FeGaussianBlurElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeGaussianBlurElement.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,OAAO;IACzD,IAAI,SAAoB;IACxB,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAGrC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAQ3B,KAAK,CACJ,GAAG,EAAE,kBAAkB,EACvB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;CAyBf"}
Index: imaps-frontend/node_modules/canvg/lib/Document/FeMorphologyElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeMorphologyElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeMorphologyElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,7 @@
+import { RenderingContext2D } from '../types';
+import Element from './Element';
+export default class FeMorphologyElement extends Element {
+    type: string;
+    apply(_: RenderingContext2D, _x: number, _y: number, _width: number, _height: number): void;
+}
+//# sourceMappingURL=FeMorphologyElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/FeMorphologyElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FeMorphologyElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FeMorphologyElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"FeMorphologyElement.d.ts","sourceRoot":"","sources":["../../src/Document/FeMorphologyElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,OAAO;IACvD,IAAI,SAAkB;IAEtB,KAAK,CACJ,CAAC,EAAE,kBAAkB,EACrB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;CAIhB"}
Index: imaps-frontend/node_modules/canvg/lib/Document/FilterElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FilterElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FilterElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,10 @@
+import { RenderingContext2D } from '../types';
+import Element from './Element';
+import PathElement from './PathElement';
+export default class FilterElement extends Element {
+    static ignoreStyles: string[];
+    type: string;
+    apply(ctx: RenderingContext2D, element: PathElement): void;
+    render(_: RenderingContext2D): void;
+}
+//# sourceMappingURL=FilterElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/FilterElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FilterElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FilterElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"FilterElement.d.ts","sourceRoot":"","sources":["../../src/Document/FilterElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IACjD,MAAM,CAAC,YAAY,WAIjB;IAEF,IAAI,SAAY;IAEhB,KAAK,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW;IAsEnD,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAG5B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/FontElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FontElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FontElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,17 @@
+import Document from './Document';
+import Element from './Element';
+import FontFaceElement from './FontFaceElement';
+import MissingGlyphElement from './MissingGlyphElement';
+import GlyphElement from './GlyphElement';
+export default class FontElement extends Element {
+    type: string;
+    readonly isArabic: boolean;
+    readonly missingGlyph: MissingGlyphElement;
+    readonly glyphs: Record<string, GlyphElement | Record<string, GlyphElement>>;
+    readonly horizAdvX: number;
+    readonly isRTL: boolean;
+    readonly fontFace: FontFaceElement;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    render(): void;
+}
+//# sourceMappingURL=FontElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/FontElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FontElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FontElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"FontElement.d.ts","sourceRoot":"","sources":["../../src/Document/FontElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,IAAI,SAAU;IACd,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAM;IAClF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;gBAGlC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAuD3B,MAAM;CAGN"}
Index: imaps-frontend/node_modules/canvg/lib/Document/FontFaceElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FontFaceElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FontFaceElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,10 @@
+import Document from './Document';
+import Element from './Element';
+export default class FontFaceElement extends Element {
+    type: string;
+    readonly ascent: number;
+    readonly descent: number;
+    readonly unitsPerEm: number;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+}
+//# sourceMappingURL=FontFaceElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/FontFaceElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/FontFaceElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/FontFaceElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"FontFaceElement.d.ts","sourceRoot":"","sources":["../../src/Document/FontFaceElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IACnD,IAAI,SAAe;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAG3B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAQ3B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/GElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/GElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/GElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+import { RenderingContext2D } from '../types';
+import BoundingBox from '../BoundingBox';
+import RenderedElement from './RenderedElement';
+export default class GElement extends RenderedElement {
+    type: string;
+    getBoundingBox(ctx: RenderingContext2D): BoundingBox;
+}
+//# sourceMappingURL=GElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/GElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/GElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/GElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"GElement.d.ts","sourceRoot":"","sources":["../../src/Document/GElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,eAAe;IACpD,IAAI,SAAO;IAEX,cAAc,CAAC,GAAG,EAAE,kBAAkB;CAStC"}
Index: imaps-frontend/node_modules/canvg/lib/Document/GlyphElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/GlyphElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/GlyphElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,10 @@
+import Document from './Document';
+import PathElement from './PathElement';
+export default class GlyphElement extends PathElement {
+    type: string;
+    readonly horizAdvX: number;
+    readonly unicode: string;
+    readonly arabicForm: string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+}
+//# sourceMappingURL=GlyphElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/GlyphElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/GlyphElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/GlyphElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"GlyphElement.d.ts","sourceRoot":"","sources":["../../src/Document/GlyphElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACpD,IAAI,SAAW;IACf,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAG3B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAQ3B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/GradientElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/GradientElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/GradientElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,17 @@
+import { RenderingContext2D } from '../types';
+import Property from '../Property';
+import Document from './Document';
+import Element from './Element';
+import PathElement from './PathElement';
+import StopElement from './StopElement';
+export default abstract class GradientElement extends Element {
+    readonly attributesToInherit: string[];
+    protected readonly stops: StopElement[];
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    abstract getGradient(ctx: RenderingContext2D, element: PathElement): CanvasGradient;
+    getGradientUnits(): string;
+    createGradient(ctx: RenderingContext2D, element: any, parentOpacityProp: Property): string | CanvasGradient | CanvasPattern;
+    protected inheritStopContainer(stopsContainer: Element): void;
+    protected addParentOpacity(parentOpacityProp: Property, color: string): string;
+}
+//# sourceMappingURL=GradientElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/GradientElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/GradientElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/GradientElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"GradientElement.d.ts","sourceRoot":"","sources":["../../src/Document/GradientElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,eAAgB,SAAQ,OAAO;IAC5D,QAAQ,CAAC,mBAAmB,WAE1B;IAEF,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,CAAM;gBAG5C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAgB3B,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,GAAG,cAAc;IAEnF,gBAAgB;IAIhB,cAAc,CACb,GAAG,EAAE,kBAAkB,EACvB,OAAO,KAAA,EACP,iBAAiB,EAAE,QAAQ;IAuH5B,SAAS,CAAC,oBAAoB,CAAC,cAAc,EAAE,OAAO;IAWtD,SAAS,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM;CAarE"}
Index: imaps-frontend/node_modules/canvg/lib/Document/ImageElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/ImageElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/ImageElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,16 @@
+import { RenderingContext2D } from '../types';
+import BoundingBox from '../BoundingBox';
+import Document from './Document';
+import RenderedElement from './RenderedElement';
+export default class ImageElement extends RenderedElement {
+    type: string;
+    loaded: boolean;
+    protected readonly isSvg: boolean;
+    protected image: CanvasImageSource | string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    protected loadImage(href: string): Promise<void>;
+    protected loadSvg(href: string): Promise<void>;
+    renderChildren(ctx: RenderingContext2D): void;
+    getBoundingBox(): BoundingBox;
+}
+//# sourceMappingURL=ImageElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/ImageElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/ImageElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/ImageElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"ImageElement.d.ts","sourceRoot":"","sources":["../../src/Document/ImageElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAKhD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,eAAe;IACxD,IAAI,SAAW;IACf,MAAM,UAAS;IACf,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC;gBAG3C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;cAuBX,SAAS,CAAC,IAAI,EAAE,MAAM;cAYtB,OAAO,CAAC,IAAI,EAAE,MAAM;IAyBpC,cAAc,CAAC,GAAG,EAAE,kBAAkB;IA6DtC,cAAc;CAQd"}
Index: imaps-frontend/node_modules/canvg/lib/Document/LineElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/LineElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/LineElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,11 @@
+import { RenderingContext2D } from '../types';
+import Point from '../Point';
+import BoundingBox from '../BoundingBox';
+import PathElement, { Marker } from './PathElement';
+export default class LineElement extends PathElement {
+    type: string;
+    getPoints(): Point[];
+    path(ctx: RenderingContext2D): BoundingBox;
+    getMarkers(): Marker[];
+}
+//# sourceMappingURL=LineElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/LineElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/LineElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/LineElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"LineElement.d.ts","sourceRoot":"","sources":["../../src/Document/LineElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,WAAW,EAAE,EACnB,MAAM,EACN,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IACnD,IAAI,SAAU;IAEd,SAAS;IAaT,IAAI,CAAC,GAAG,EAAE,kBAAkB;IA0B5B,UAAU,IAAI,MAAM,EAAE;CAYtB"}
Index: imaps-frontend/node_modules/canvg/lib/Document/LinearGradientElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/LinearGradientElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/LinearGradientElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,10 @@
+import { RenderingContext2D } from '../types';
+import Document from './Document';
+import PathElement from './PathElement';
+import GradientElement from './GradientElement';
+export default class LinearGradientElement extends GradientElement {
+    type: string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    getGradient(ctx: RenderingContext2D, element: PathElement): CanvasGradient;
+}
+//# sourceMappingURL=LinearGradientElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/LinearGradientElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/LinearGradientElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/LinearGradientElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"LinearGradientElement.d.ts","sourceRoot":"","sources":["../../src/Document/LinearGradientElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,eAAe;IACjE,IAAI,SAAoB;gBAGvB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAY3B,WAAW,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW;CAwCzD"}
Index: imaps-frontend/node_modules/canvg/lib/Document/MarkerElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/MarkerElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/MarkerElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+import { RenderingContext2D } from '../types';
+import Point from '../Point';
+import Element from './Element';
+export default class MarkerElement extends Element {
+    type: string;
+    render(ctx: RenderingContext2D, point?: Point, angle?: number): void;
+}
+//# sourceMappingURL=MarkerElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/MarkerElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/MarkerElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/MarkerElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"MarkerElement.d.ts","sourceRoot":"","sources":["../../src/Document/MarkerElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IACjD,IAAI,SAAY;IAEhB,MAAM,CAAC,GAAG,EAAE,kBAAkB,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM;CAuF7D"}
Index: imaps-frontend/node_modules/canvg/lib/Document/MaskElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/MaskElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/MaskElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import { RenderingContext2D } from '../types';
+import Element from './Element';
+export default class MaskElement extends Element {
+    static ignoreStyles: string[];
+    type: string;
+    apply(ctx: RenderingContext2D, element: Element): void;
+    render(_: RenderingContext2D): void;
+}
+//# sourceMappingURL=MaskElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/MaskElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/MaskElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/MaskElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"MaskElement.d.ts","sourceRoot":"","sources":["../../src/Document/MaskElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,OAAO,MAAM,WAAW,CAAC;AAIhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,MAAM,CAAC,YAAY,WAIjB;IAEF,IAAI,SAAU;IAEd,KAAK,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO;IAmE/C,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAG5B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/MissingGlyphElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/MissingGlyphElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/MissingGlyphElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+import PathElement from './PathElement';
+export default class MissingGlyphElement extends PathElement {
+    type: string;
+    readonly horizAdvX = 0;
+}
+//# sourceMappingURL=MissingGlyphElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/MissingGlyphElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/MissingGlyphElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/MissingGlyphElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"MissingGlyphElement.d.ts","sourceRoot":"","sources":["../../src/Document/MissingGlyphElement.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC3D,IAAI,SAAmB;IACvB,QAAQ,CAAC,SAAS,KAAK;CACvB"}
Index: imaps-frontend/node_modules/canvg/lib/Document/PathElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/PathElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/PathElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,75 @@
+import { RenderingContext2D } from '../types';
+import Point from '../Point';
+import BoundingBox from '../BoundingBox';
+import PathParser from '../PathParser';
+import Document from './Document';
+import RenderedElement from './RenderedElement';
+export declare type Marker = [Point, number];
+export default class PathElement extends RenderedElement {
+    type: string;
+    readonly pathParser: PathParser;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    path(ctx?: RenderingContext2D): BoundingBox;
+    getBoundingBox(_?: RenderingContext2D): BoundingBox;
+    getMarkers(): Marker[];
+    renderChildren(ctx: RenderingContext2D): void;
+    static pathM(pathParser: PathParser): {
+        point: Point;
+    };
+    protected pathM(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathL(pathParser: PathParser): {
+        current: Point;
+        point: Point;
+    };
+    protected pathL(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathH(pathParser: PathParser): {
+        current: Point;
+        point: Point;
+    };
+    protected pathH(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathV(pathParser: PathParser): {
+        current: Point;
+        point: Point;
+    };
+    protected pathV(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathC(pathParser: PathParser): {
+        current: Point;
+        point: Point;
+        controlPoint: Point;
+        currentPoint: Point;
+    };
+    protected pathC(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathS(pathParser: PathParser): {
+        current: Point;
+        point: Point;
+        controlPoint: Point;
+        currentPoint: Point;
+    };
+    protected pathS(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathQ(pathParser: PathParser): {
+        current: Point;
+        controlPoint: Point;
+        currentPoint: Point;
+    };
+    protected pathQ(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathT(pathParser: PathParser): {
+        current: Point;
+        controlPoint: Point;
+        currentPoint: Point;
+    };
+    protected pathT(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathA(pathParser: PathParser): {
+        currentPoint: Point;
+        rX: number;
+        rY: number;
+        sweepFlag: 0 | 1;
+        xAxisRotation: number;
+        centp: Point;
+        a1: number;
+        ad: number;
+    };
+    protected pathA(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+    static pathZ(pathParser: PathParser): void;
+    protected pathZ(ctx: RenderingContext2D, boundingBox: BoundingBox): void;
+}
+//# sourceMappingURL=PathElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/PathElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/PathElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/PathElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"PathElement.d.ts","sourceRoot":"","sources":["../../src/Document/PathElement.ts"],"names":[],"mappings":"AACA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAKlB,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,oBAAY,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,eAAe;IACvD,IAAI,SAAU;IACd,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAQ;gBAGtC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAO3B,IAAI,CAAC,GAAG,CAAC,EAAE,kBAAkB;IA6D7B,cAAc,CAAC,CAAC,CAAC,EAAE,kBAAkB;IAIrC,UAAU,IAAI,MAAM,EAAE;IActB,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAoEtC,MAAM,CAAC,KAAK,CAA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G,EAAE,kBAAkB,EACvB,WAAW,EAAE,WAAW;CAazB"}
Index: imaps-frontend/node_modules/canvg/lib/Document/PatternElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/PatternElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/PatternElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+import { RenderingContext2D } from '../types';
+import Property from '../Property';
+import Element from './Element';
+export default class PatternElement extends Element {
+    type: string;
+    createPattern(ctx: RenderingContext2D, _: Element, parentOpacityProp: Property): CanvasPattern;
+}
+//# sourceMappingURL=PatternElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/PatternElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/PatternElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/PatternElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"PatternElement.d.ts","sourceRoot":"","sources":["../../src/Document/PatternElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IAClD,IAAI,SAAa;IAEjB,aAAa,CACZ,GAAG,EAAE,kBAAkB,EACvB,CAAC,EAAE,OAAO,EACV,iBAAiB,EAAE,QAAQ;CAyE5B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/PolygonElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/PolygonElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/PolygonElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,7 @@
+import { RenderingContext2D } from '../types';
+import PolylineElement from './PolylineElement';
+export default class PolygonElement extends PolylineElement {
+    type: string;
+    path(ctx: RenderingContext2D): import("..").BoundingBox;
+}
+//# sourceMappingURL=PolygonElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/PolygonElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/PolygonElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/PolygonElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"PolygonElement.d.ts","sourceRoot":"","sources":["../../src/Document/PolygonElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,eAAe;IAC1D,IAAI,SAAa;IAEjB,IAAI,CAAC,GAAG,EAAE,kBAAkB;CAc5B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/PolylineElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/PolylineElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/PolylineElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,13 @@
+import { RenderingContext2D } from '../types';
+import Point from '../Point';
+import BoundingBox from '../BoundingBox';
+import Document from './Document';
+import PathElement, { Marker } from './PathElement';
+export default class PolylineElement extends PathElement {
+    type: string;
+    protected readonly points: Point[];
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    path(ctx: RenderingContext2D): BoundingBox;
+    getMarkers(): Marker[];
+}
+//# sourceMappingURL=PolylineElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/PolylineElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/PolylineElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/PolylineElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"PolylineElement.d.ts","sourceRoot":"","sources":["../../src/Document/PolylineElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,EAAE,EACnB,MAAM,EACN,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IACvD,IAAI,SAAc;IAClB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,CAAM;gBAGvC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAS3B,IAAI,CAAC,GAAG,EAAE,kBAAkB;IA6B5B,UAAU;CA2BV"}
Index: imaps-frontend/node_modules/canvg/lib/Document/RadialGradientElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/RadialGradientElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/RadialGradientElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,10 @@
+import { RenderingContext2D } from '../types';
+import Document from './Document';
+import PathElement from './PathElement';
+import GradientElement from './GradientElement';
+export default class RadialGradientElement extends GradientElement {
+    type: string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    getGradient(ctx: RenderingContext2D, element: PathElement): CanvasGradient;
+}
+//# sourceMappingURL=RadialGradientElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/RadialGradientElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/RadialGradientElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/RadialGradientElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"RadialGradientElement.d.ts","sourceRoot":"","sources":["../../src/Document/RadialGradientElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,eAAe;IACjE,IAAI,SAAoB;gBAGvB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAc3B,WAAW,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW;CAgDzD"}
Index: imaps-frontend/node_modules/canvg/lib/Document/RectElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/RectElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/RectElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import { RenderingContext2D } from '../types';
+import BoundingBox from '../BoundingBox';
+import PathElement from './PathElement';
+export default class RectElement extends PathElement {
+    type: string;
+    path(ctx: RenderingContext2D): BoundingBox;
+    getMarkers(): any;
+}
+//# sourceMappingURL=RectElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/RectElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/RectElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/RectElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"RectElement.d.ts","sourceRoot":"","sources":["../../src/Document/RectElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IACnD,IAAI,SAAU;IAEd,IAAI,CAAC,GAAG,EAAE,kBAAkB;IAkD5B,UAAU;CAGV"}
Index: imaps-frontend/node_modules/canvg/lib/Document/RenderedElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/RenderedElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/RenderedElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import { RenderingContext2D } from '../types';
+import Element from './Element';
+export default abstract class RenderedElement extends Element {
+    private modifiedEmSizeStack;
+    protected calculateOpacity(): number;
+    setContext(ctx: RenderingContext2D, fromMeasure?: boolean): void;
+    clearContext(ctx: RenderingContext2D): void;
+}
+//# sourceMappingURL=RenderedElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/RenderedElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/RenderedElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/RenderedElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"RenderedElement.d.ts","sourceRoot":"","sources":["../../src/Document/RenderedElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAOlB,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,eAAgB,SAAQ,OAAO;IAC5D,OAAO,CAAC,mBAAmB,CAAS;IAEpC,SAAS,CAAC,gBAAgB;IAkB1B,UAAU,CAAC,GAAG,EAAE,kBAAkB,EAAE,WAAW,UAAQ;IAwLvD,YAAY,CAAC,GAAG,EAAE,kBAAkB;CAOpC"}
Index: imaps-frontend/node_modules/canvg/lib/Document/SVGElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/SVGElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/SVGElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,16 @@
+import { RenderingContext2D } from '../types';
+import RenderedElement from './RenderedElement';
+export default class SVGElement extends RenderedElement {
+    type: string;
+    root: boolean;
+    setContext(ctx: RenderingContext2D): void;
+    clearContext(ctx: RenderingContext2D): void;
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+    resize(width: number, height?: number, preserveAspectRatio?: boolean | string): void;
+}
+//# sourceMappingURL=SVGElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/SVGElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/SVGElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/SVGElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"SVGElement.d.ts","sourceRoot":"","sources":["../../src/Document/SVGElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAMlB,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,eAAe;IACtD,IAAI,SAAS;IACb,IAAI,UAAS;IAEb,UAAU,CAAC,GAAG,EAAE,kBAAkB;IAqIlC,YAAY,CAAC,GAAG,EAAE,kBAAkB;IAMpC;;;;;OAKG;IACH,MAAM,CACL,KAAK,EAAE,MAAM,EACb,MAAM,SAAQ,EACd,mBAAmB,GAAE,OAAO,GAAG,MAAc;CAyC9C"}
Index: imaps-frontend/node_modules/canvg/lib/Document/StopElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/StopElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/StopElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import Document from './Document';
+import Element from './Element';
+export default class StopElement extends Element {
+    type: string;
+    readonly offset: number;
+    readonly color: string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+}
+//# sourceMappingURL=StopElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/StopElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/StopElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/StopElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"StopElement.d.ts","sourceRoot":"","sources":["../../src/Document/StopElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC/C,IAAI,SAAU;IACd,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBAGtB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAmB3B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/StyleElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/StyleElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/StyleElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import { parseExternalUrl } from '../util';
+import Document from './Document';
+import Element from './Element';
+export default class StyleElement extends Element {
+    static readonly parseExternalUrl: typeof parseExternalUrl;
+    type: string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+}
+//# sourceMappingURL=StyleElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/StyleElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/StyleElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/StyleElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"StyleElement.d.ts","sourceRoot":"","sources":["../../src/Document/StyleElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAChD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,0BAAoB;IAEpD,IAAI,SAAW;gBAGd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAgE3B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/SymbolElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/SymbolElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/SymbolElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,7 @@
+import { RenderingContext2D } from '../types';
+import RenderedElement from './RenderedElement';
+export default class SymbolElement extends RenderedElement {
+    type: string;
+    render(_: RenderingContext2D): void;
+}
+//# sourceMappingURL=SymbolElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/SymbolElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/SymbolElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/SymbolElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"SymbolElement.d.ts","sourceRoot":"","sources":["../../src/Document/SymbolElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,eAAe;IACzD,IAAI,SAAY;IAEhB,MAAM,CAAC,CAAC,EAAE,kBAAkB;CAG5B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/TRefElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TRefElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TRefElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+import TextElement from './TextElement';
+export default class TRefElement extends TextElement {
+    type: string;
+    getText(): string;
+}
+//# sourceMappingURL=TRefElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/TRefElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TRefElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TRefElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"TRefElement.d.ts","sourceRoot":"","sources":["../../src/Document/TRefElement.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IACnD,IAAI,SAAU;IAEd,OAAO;CAaP"}
Index: imaps-frontend/node_modules/canvg/lib/Document/TSpanElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TSpanElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TSpanElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import Document from './Document';
+import TextElement from './TextElement';
+export default class TSpanElement extends TextElement {
+    type: string;
+    protected readonly text: string;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    getText(): string;
+}
+//# sourceMappingURL=TSpanElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/TSpanElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TSpanElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TSpanElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"TSpanElement.d.ts","sourceRoot":"","sources":["../../src/Document/TSpanElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;IACpD,IAAI,SAAW;IACf,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAG/B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAgB3B,OAAO;CAGP"}
Index: imaps-frontend/node_modules/canvg/lib/Document/TextElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TextElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TextElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,44 @@
+import { RenderingContext2D } from '../types';
+import BoundingBox from '../BoundingBox';
+import Document from './Document';
+import Element from './Element';
+import FontElement from './FontElement';
+import GlyphElement from './GlyphElement';
+import RenderedElement from './RenderedElement';
+export default class TextElement extends RenderedElement {
+    type: string;
+    protected x: number;
+    protected y: number;
+    private leafTexts;
+    private textChunkStart;
+    private minX;
+    private maxX;
+    private measureCache;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    setContext(ctx: RenderingContext2D, fromMeasure?: boolean): void;
+    protected initializeCoordinates(): void;
+    getBoundingBox(ctx: RenderingContext2D): BoundingBox;
+    protected getFontSize(): number;
+    protected getTElementBoundingBox(ctx: RenderingContext2D): BoundingBox;
+    getGlyph(font: FontElement, text: string, i: number): GlyphElement;
+    getText(): string;
+    protected getTextFromNode(node?: ChildNode): string;
+    renderChildren(ctx: RenderingContext2D): void;
+    protected renderTElementChildren(ctx: RenderingContext2D): void;
+    protected applyAnchoring(): void;
+    protected adjustChildCoordinatesRecursive(ctx: RenderingContext2D): void;
+    protected adjustChildCoordinatesRecursiveCore(ctx: RenderingContext2D, textParent: TextElement, parent: Element, i: number): void;
+    protected adjustChildCoordinates(ctx: RenderingContext2D, textParent: TextElement, parent: Element, i: number): TextElement;
+    protected getChildBoundingBox(ctx: RenderingContext2D, textParent: TextElement, parent: Element, i: number): BoundingBox;
+    protected renderChild(ctx: RenderingContext2D, textParent: TextElement, parent: Element, i: number): void;
+    protected measureText(ctx: RenderingContext2D): number;
+    protected measureTargetText(ctx: RenderingContext2D, targetText: string): number;
+    /**
+     * Inherits positional attributes from {@link TextElement} parent(s). Attributes
+     * are only inherited from a parent to its first child.
+     * @param name - The attribute name.
+     * @returns The attribute value or null.
+     */
+    protected getInheritedAttribute(name: string): string | null;
+}
+//# sourceMappingURL=TextElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/TextElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TextElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TextElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"TextElement.d.ts","sourceRoot":"","sources":["../../src/Document/TextElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAQlB,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,eAAe;IACvD,IAAI,SAAU;IACd,SAAS,CAAC,CAAC,SAAK;IAChB,SAAS,CAAC,CAAC,SAAK;IAChB,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,YAAY,CAAM;gBAGzB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;IAW3B,UAAU,CAAC,GAAG,EAAE,kBAAkB,EAAE,WAAW,UAAQ;IAWvD,SAAS,CAAC,qBAAqB;IAS/B,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAyBtC,SAAS,CAAC,WAAW;IAWrB,SAAS,CAAC,sBAAsB,CAAC,GAAG,EAAE,kBAAkB;IAWxD,QAAQ,CACP,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,MAAM;IA0CV,OAAO;IAIP,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS;IAuB1C,cAAc,CAAC,GAAG,EAAE,kBAAkB;IA4BtC,SAAS,CAAC,sBAAsB,CAAC,GAAG,EAAE,kBAAkB;IAiFxD,SAAS,CAAC,cAAc;IAgCxB,SAAS,CAAC,+BAA+B,CAAC,GAAG,EAAE,kBAAkB;IAOjE,SAAS,CAAC,mCAAmC,CAC5C,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,EACf,CAAC,EAAE,MAAM,GACP,IAAI;IAaP,SAAS,CAAC,sBAAsB,CAC/B,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,EACf,CAAC,EAAE,MAAM;IA8FV,SAAS,CAAC,mBAAmB,CAC5B,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,EACf,CAAC,EAAE,MAAM;IAwBV,SAAS,CAAC,WAAW,CACpB,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,WAAW,EACvB,MAAM,EAAE,OAAO,EACf,CAAC,EAAE,MAAM;IAUV,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,kBAAkB;IAiB7C,SAAS,CAAC,iBAAiB,CAC1B,GAAG,EAAE,kBAAkB,EACvB,UAAU,EAAE,MAAM;IAoDnB;;;;;OAKG;IACH,SAAS,CAAC,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAgB5D"}
Index: imaps-frontend/node_modules/canvg/lib/Document/TextNode.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TextNode.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TextNode.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,5 @@
+import TSpanElement from './TSpanElement';
+export default class TextNode extends TSpanElement {
+    type: string;
+}
+//# sourceMappingURL=TextNode.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/TextNode.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TextNode.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TextNode.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"TextNode.d.ts","sourceRoot":"","sources":["../../src/Document/TextNode.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,YAAY;IACjD,IAAI,SAAc;CAClB"}
Index: imaps-frontend/node_modules/canvg/lib/Document/TextPathElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TextPathElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TextPathElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,73 @@
+import { RenderingContext2D } from '../types';
+import PathParser, { CommandType } from '../PathParser';
+import Document from './Document';
+import TextElement from './TextElement';
+import PathElement from './PathElement';
+export interface IPoint {
+    x: number;
+    y: number;
+}
+export interface IPathCommand {
+    type: CommandType;
+    points: number[];
+    start?: IPoint;
+    pathLength: number;
+}
+interface ICachedPoint extends IPoint {
+    distance: number;
+}
+interface IGlyphInfo {
+    text: string;
+    rotation: number;
+    p0: ICachedPoint;
+    p1: ICachedPoint;
+}
+export default class TextPathElement extends TextElement {
+    type: string;
+    protected textWidth: number;
+    protected textHeight: number;
+    protected pathLength: number;
+    protected glyphInfo: IGlyphInfo[];
+    protected readonly text: string;
+    protected readonly dataArray: IPathCommand[];
+    private letterSpacingCache;
+    private equidistantCache;
+    private readonly measuresCache;
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+    getText(): string;
+    path(ctx: RenderingContext2D): void;
+    renderChildren(ctx: RenderingContext2D): void;
+    protected getLetterSpacingAt(idx?: number): number;
+    protected findSegmentToFitChar(ctx: RenderingContext2D, anchor: string, textFullWidth: number, fullPathWidth: number, spacesNumber: number, inputOffset: number, dy: number, c: string, charI: number): {
+        offset: number;
+        segment: {
+            p0: ICachedPoint;
+            p1: ICachedPoint;
+        };
+        rotation: number;
+    };
+    protected measureText(ctx: RenderingContext2D, text?: string): number;
+    protected setTextData(ctx: RenderingContext2D): void;
+    protected parsePathData(path: PathElement): IPathCommand[];
+    protected pathM(pathParser: PathParser, points: number[]): void;
+    protected pathL(pathParser: PathParser, points: number[]): 16;
+    protected pathH(pathParser: PathParser, points: number[]): 16;
+    protected pathV(pathParser: PathParser, points: number[]): 16;
+    protected pathC(pathParser: PathParser, points: number[]): void;
+    protected pathS(pathParser: PathParser, points: number[]): 32;
+    protected pathQ(pathParser: PathParser, points: number[]): void;
+    protected pathT(pathParser: PathParser, points: number[]): 128;
+    protected pathA(pathParser: PathParser): number[];
+    protected calcLength(x: number, y: number, commandType: CommandType, points: number[]): number;
+    protected getPointOnLine(dist: number, p1x: number, p1y: number, p2x: number, p2y: number, fromX?: number, fromY?: number): IPoint;
+    protected getPointOnPath(distance: number): IPoint;
+    protected getLineLength(x1: number, y1: number, x2: number, y2: number): number;
+    protected getPathLength(): number;
+    protected getPointOnCubicBezier(pct: number, p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number, p4x: number, p4y: number): IPoint;
+    protected getPointOnQuadraticBezier(pct: number, p1x: number, p1y: number, p2x: number, p2y: number, p3x: number, p3y: number): IPoint;
+    protected getPointOnEllipticalArc(cx: number, cy: number, rx: number, ry: number, theta: number, psi: number): IPoint;
+    protected buildEquidistantCache(inputStep: number, inputPrecision: number): void;
+    protected getEquidistantPointOnPath(targetDistance: number, step?: number, precision?: number): ICachedPoint;
+}
+export {};
+//# sourceMappingURL=TextPathElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/TextPathElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TextPathElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TextPathElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"TextPathElement.d.ts","sourceRoot":"","sources":["../../src/Document/TextPathElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAWlB,OAAO,UAAU,EAAE,EAClB,WAAW,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,MAAM,WAAW,MAAM;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,YAAa,SAAQ,MAAM;IACpC,QAAQ,EAAE,MAAM,CAAC;CACjB;AAQD,UAAU,UAAU;IAGnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,YAAY,CAAC;IACjB,EAAE,EAAE,YAAY,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IACvD,IAAI,SAAc;IAClB,SAAS,CAAC,SAAS,SAAK;IACxB,SAAS,CAAC,UAAU,SAAK;IACzB,SAAS,CAAC,UAAU,SAAM;IAC1B,SAAS,CAAC,SAAS,EA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AG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACT,MAAM;IAUT,SAAS,CAAC,uBAAuB,CAChC,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACT,MAAM;IAeT,SAAS,CAAC,qBAAqB,CAC9B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM;IA0CvB,SAAS,CAAC,yBAAyB,CAClC,cAAc,EAAE,MAAM,EACtB,IAAI,CAAC,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM;CAkBnB"}
Index: imaps-frontend/node_modules/canvg/lib/Document/TitleElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TitleElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TitleElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,5 @@
+import Element from './Element';
+export default class TitleElement extends Element {
+    type: string;
+}
+//# sourceMappingURL=TitleElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/TitleElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/TitleElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/TitleElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"TitleElement.d.ts","sourceRoot":"","sources":["../../src/Document/TitleElement.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAChD,IAAI,SAAW;CACf"}
Index: imaps-frontend/node_modules/canvg/lib/Document/UnknownElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/UnknownElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/UnknownElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+import Document from './Document';
+import Element from './Element';
+export default class UnknownElement extends Element {
+    constructor(document: Document, node: HTMLElement, captureTextNodes?: boolean);
+}
+//# sourceMappingURL=UnknownElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/UnknownElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/UnknownElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/UnknownElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"UnknownElement.d.ts","sourceRoot":"","sources":["../../src/Document/UnknownElement.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;gBAEjD,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,gBAAgB,CAAC,EAAE,OAAO;CAQ3B"}
Index: imaps-frontend/node_modules/canvg/lib/Document/UseElement.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/UseElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/UseElement.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,15 @@
+import { RenderingContext2D } from '../types';
+import Transform from '../Transform';
+import RenderedElement from './RenderedElement';
+import PathElement from './PathElement';
+export default class UseElement extends RenderedElement {
+    type: string;
+    private cachedElement;
+    setContext(ctx: RenderingContext2D): void;
+    path(ctx: RenderingContext2D): void;
+    renderChildren(ctx: RenderingContext2D): void;
+    getBoundingBox(ctx: RenderingContext2D): import("..").BoundingBox;
+    elementTransform(): Transform;
+    protected get element(): PathElement;
+}
+//# sourceMappingURL=UseElement.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/UseElement.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/UseElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/UseElement.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"UseElement.d.ts","sourceRoot":"","sources":["../../src/Document/UseElement.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,eAAe;IACtD,IAAI,SAAS;IACb,OAAO,CAAC,aAAa,CAAc;IAEnC,UAAU,CAAC,GAAG,EAAE,kBAAkB;IAelC,IAAI,CAAC,GAAG,EAAE,kBAAkB;IAU5B,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAsEtC,cAAc,CAAC,GAAG,EAAE,kBAAkB;IAYtC,gBAAgB;IAShB,SAAS,KAAK,OAAO,gBAMpB;CACD"}
Index: imaps-frontend/node_modules/canvg/lib/Document/elements.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/elements.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/elements.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,93 @@
+import Element from './Element';
+import UnknownElement from './UnknownElement';
+import RenderedElement from './RenderedElement';
+import PathElement from './PathElement';
+import SVGElement from './SVGElement';
+import RectElement from './RectElement';
+import CircleElement from './CircleElement';
+import EllipseElement from './EllipseElement';
+import LineElement from './LineElement';
+import PolylineElement from './PolylineElement';
+import PolygonElement from './PolygonElement';
+import PatternElement from './PatternElement';
+import MarkerElement from './MarkerElement';
+import DefsElement from './DefsElement';
+import GradientElement from './GradientElement';
+import LinearGradientElement from './LinearGradientElement';
+import RadialGradientElement from './RadialGradientElement';
+import StopElement from './StopElement';
+import AnimateElement from './AnimateElement';
+import AnimateColorElement from './AnimateColorElement';
+import AnimateTransformElement from './AnimateTransformElement';
+import FontElement from './FontElement';
+import FontFaceElement from './FontFaceElement';
+import MissingGlyphElement from './MissingGlyphElement';
+import GlyphElement from './GlyphElement';
+import TextElement from './TextElement';
+import TSpanElement from './TSpanElement';
+import TRefElement from './TRefElement';
+import AElement from './AElement';
+import TextPathElement from './TextPathElement';
+import ImageElement from './ImageElement';
+import GElement from './GElement';
+import SymbolElement from './SymbolElement';
+import StyleElement from './StyleElement';
+import UseElement from './UseElement';
+import MaskElement from './MaskElement';
+import ClipPathElement from './ClipPathElement';
+import FilterElement from './FilterElement';
+import FeDropShadowElement from './FeDropShadowElement';
+import FeMorphologyElement from './FeMorphologyElement';
+import FeCompositeElement from './FeCompositeElement';
+import FeColorMatrixElement from './FeColorMatrixElement';
+import FeGaussianBlurElement from './FeGaussianBlurElement';
+import TitleElement from './TitleElement';
+import DescElement from './DescElement';
+declare const elements: {
+    svg: typeof SVGElement;
+    rect: typeof RectElement;
+    circle: typeof CircleElement;
+    ellipse: typeof EllipseElement;
+    line: typeof LineElement;
+    polyline: typeof PolylineElement;
+    polygon: typeof PolygonElement;
+    path: typeof PathElement;
+    pattern: typeof PatternElement;
+    marker: typeof MarkerElement;
+    defs: typeof DefsElement;
+    linearGradient: typeof LinearGradientElement;
+    radialGradient: typeof RadialGradientElement;
+    stop: typeof StopElement;
+    animate: typeof AnimateElement;
+    animateColor: typeof AnimateColorElement;
+    animateTransform: typeof AnimateTransformElement;
+    font: typeof FontElement;
+    'font-face': typeof FontFaceElement;
+    'missing-glyph': typeof MissingGlyphElement;
+    glyph: typeof GlyphElement;
+    text: typeof TextElement;
+    tspan: typeof TSpanElement;
+    tref: typeof TRefElement;
+    a: typeof AElement;
+    textPath: typeof TextPathElement;
+    image: typeof ImageElement;
+    g: typeof GElement;
+    symbol: typeof SymbolElement;
+    style: typeof StyleElement;
+    use: typeof UseElement;
+    mask: typeof MaskElement;
+    clipPath: typeof ClipPathElement;
+    filter: typeof FilterElement;
+    feDropShadow: typeof FeDropShadowElement;
+    feMorphology: typeof FeMorphologyElement;
+    feComposite: typeof FeCompositeElement;
+    feColorMatrix: typeof FeColorMatrixElement;
+    feGaussianBlur: typeof FeGaussianBlurElement;
+    title: typeof TitleElement;
+    desc: typeof DescElement;
+};
+export default elements;
+declare type Elements = typeof elements;
+export declare type AnyElement = Elements[keyof Elements];
+export { Element, UnknownElement, RenderedElement, PathElement, SVGElement, RectElement, CircleElement, EllipseElement, LineElement, PolylineElement, PolygonElement, PatternElement, MarkerElement, DefsElement, GradientElement, LinearGradientElement, RadialGradientElement, StopElement, AnimateElement, AnimateColorElement, AnimateTransformElement, FontElement, FontFaceElement, MissingGlyphElement, GlyphElement, TextElement, TSpanElement, TRefElement, AElement, TextPathElement, ImageElement, GElement, SymbolElement, StyleElement, UseElement, MaskElement, ClipPathElement, FilterElement, FeDropShadowElement, FeMorphologyElement, FeCompositeElement, FeColorMatrixElement, FeGaussianBlurElement, TitleElement, DescElement };
+//# sourceMappingURL=elements.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/elements.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/elements.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/elements.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../src/Document/elements.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,cAAc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CAAC"}
Index: imaps-frontend/node_modules/canvg/lib/Document/index.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,4 @@
+export { default } from './Document';
+export * from './Document';
+export * from './elements';
+//# sourceMappingURL=index.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Document/index.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Document/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Document/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Document/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,OAAO,EACP,MAAM,YAAY,CAAC;AACpB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
Index: imaps-frontend/node_modules/canvg/lib/Font.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Font.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Font.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,14 @@
+export default class Font {
+    static parse(font?: string, inherit?: string | Font): Font;
+    static readonly styles = "normal|italic|oblique|inherit";
+    static readonly variants = "normal|small-caps|inherit";
+    static readonly weights = "normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";
+    readonly fontFamily: string;
+    readonly fontSize: string;
+    readonly fontStyle: string;
+    readonly fontWeight: string;
+    readonly fontVariant: string;
+    constructor(fontStyle: string, fontVariant: string, fontWeight: string, fontSize: string, fontFamily: string, inherit?: string | Font);
+    toString(): string;
+}
+//# sourceMappingURL=Font.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Font.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Font.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Font.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Font.d.ts","sourceRoot":"","sources":["../src/Font.ts"],"names":[],"mappings":"AAqFA,MAAM,CAAC,OAAO,OAAO,IAAI;IACxB,MAAM,CAAC,KAAK,CACX,IAAI,SAAK,EACT,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IA6ExB,MAAM,CAAC,QAAQ,CAAC,MAAM,mCAAmC;IACzD,MAAM,CAAC,QAAQ,CAAC,QAAQ,+BAA+B;IACvD,MAAM,CAAC,QAAQ,CAAC,OAAO,4EAA4E;IAEnG,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBAG5B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAexB,QAAQ;CAUR"}
Index: imaps-frontend/node_modules/canvg/lib/Mouse.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Mouse.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Mouse.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,33 @@
+import { RenderingContext2D } from './types';
+import BoundingBox from './BoundingBox';
+import Screen from './Screen';
+import { Element } from './Document';
+interface IEventTarget {
+    onClick?(): void;
+    onMouseMove?(): void;
+}
+export interface IEvent {
+    type: string;
+    x: number;
+    y: number;
+    run(eventTarget: IEventTarget): void;
+}
+export default class Mouse {
+    private readonly screen;
+    private working;
+    private events;
+    private eventElements;
+    constructor(screen: Screen);
+    isWorking(): boolean;
+    start(): void;
+    stop(): void;
+    hasEvents(): boolean;
+    runEvents(): void;
+    checkPath(element: Element, ctx: RenderingContext2D): void;
+    checkBoundingBox(element: Element, boundingBox: BoundingBox): void;
+    private mapXY;
+    private onClick;
+    private onMouseMove;
+}
+export {};
+//# sourceMappingURL=Mouse.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Mouse.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Mouse.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Mouse.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Mouse.d.ts","sourceRoot":"","sources":["../src/Mouse.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EACN,OAAO,EACP,MAAM,YAAY,CAAC;AAEpB,UAAU,YAAY;IACrB,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB,WAAW,CAAC,IAAI,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,MAAM;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,CAAC,OAAO,OAAO,KAAK;IAMxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,aAAa,CAAiB;gBAGpB,MAAM,EAAE,MAAM;IAQhC,SAAS;IAIT,KAAK;IAiBL,IAAI;IAYJ,SAAS;IAIT,SAAS;IAkCT,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,kBAAkB;IAmBnD,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW;IAmB3D,OAAO,CAAC,KAAK;IAyBb,OAAO,CAAC,OAAO;IAqBf,OAAO,CAAC,WAAW;CAoBnB"}
Index: imaps-frontend/node_modules/canvg/lib/Parser.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Parser.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Parser.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,20 @@
+export interface IParserOptions {
+    /**
+     * WHATWG-compatible `fetch` function.
+     */
+    fetch?: typeof fetch;
+    /**
+     * XML/HTML parser from string into DOM Document.
+     */
+    DOMParser?: typeof DOMParser;
+}
+export default class Parser {
+    private readonly fetch;
+    private readonly DOMParser;
+    constructor({ fetch, DOMParser }?: IParserOptions);
+    parse(resource: string): Promise<Document>;
+    parseFromString(xml: string): Document;
+    private checkDocument;
+    load(url: string): Promise<Document>;
+}
+//# sourceMappingURL=Parser.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Parser.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Parser.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Parser.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Parser.d.ts","sourceRoot":"","sources":["../src/Parser.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,SAAS,CAAC;CAC7B;AASD,MAAM,CAAC,OAAO,OAAO,MAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;gBAExC,EACX,KAAoB,EACpB,SAA4B,EAC5B,GAAE,cAAmB;IAKhB,KAAK,CAAC,QAAQ,EAAE,MAAM;IAQ5B,eAAe,CAAC,GAAG,EAAE,MAAM;IAc3B,OAAO,CAAC,aAAa;IAUf,IAAI,CAAC,GAAG,EAAE,MAAM;CAMtB"}
Index: imaps-frontend/node_modules/canvg/lib/PathParser.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/PathParser.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/PathParser.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,32 @@
+import { SVGCommand, CommandM, CommandL, CommandH, CommandV, CommandZ, CommandQ, CommandT, CommandC, CommandS, CommandA } from 'svg-pathdata/lib/types';
+import { SVGPathData } from 'svg-pathdata';
+import Point from './Point';
+export declare type CommandType = SVGCommand['type'];
+export declare type Command = {
+    type: CommandType;
+} & Omit<CommandM, 'type'> & Omit<CommandL, 'type'> & Omit<CommandH, 'type'> & Omit<CommandV, 'type'> & Omit<CommandZ, 'type'> & Omit<CommandQ, 'type'> & Omit<CommandT, 'type'> & Omit<CommandC, 'type'> & Omit<CommandS, 'type'> & Omit<CommandA, 'type'>;
+export default class PathParser extends SVGPathData {
+    control: Point;
+    start: Point;
+    current: Point;
+    command: Command;
+    readonly commands: Command[];
+    private i;
+    private previousCommand;
+    private points;
+    private angles;
+    constructor(path: string);
+    reset(): void;
+    isEnd(): boolean;
+    next(): Command;
+    getPoint(xProp?: string, yProp?: string): Point;
+    getAsControlPoint(xProp?: string, yProp?: string): Point;
+    getAsCurrentPoint(xProp?: string, yProp?: string): Point;
+    getReflectedControlPoint(): Point;
+    makeAbsolute(point: Point): Point;
+    addMarker(point: Point, from?: Point, priorTo?: Point): void;
+    addMarkerAngle(point: Point, angle: number): void;
+    getMarkerPoints(): Point[];
+    getMarkerAngles(): number[];
+}
+//# sourceMappingURL=PathParser.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/PathParser.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/PathParser.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/PathParser.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"PathParser.d.ts","sourceRoot":"","sources":["../src/PathParser.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,WAAW,EACX,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,oBAAY,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAC7C,oBAAY,OAAO,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACxC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GACtB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAE1B,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IAClD,OAAO,EAAE,KAAK,CAAQ;IACtB,KAAK,EAAE,KAAK,CAAQ;IACpB,OAAO,EAAE,KAAK,CAAQ;IACtB,OAAO,EAAE,OAAO,CAAQ;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAkC;IAC9D,OAAO,CAAC,CAAC,CAAM;IACf,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,MAAM,CAAgB;gBAElB,IAAI,EAAE,MAAM;IAUxB,KAAK;IAWL,KAAK;IASL,IAAI;IASJ,QAAQ,CAAC,KAAK,SAAM,EAAE,KAAK,SAAM;IASjC,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAQhD,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAQhD,wBAAwB;IA2BxB,YAAY,CAAC,KAAK,EAAE,KAAK;IAczB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,KAAK;IAcrD,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM;IAK1C,eAAe;IAIf,eAAe;CAmBf"}
Index: imaps-frontend/node_modules/canvg/lib/Point.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Point.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Point.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,11 @@
+export default class Point {
+    x: number;
+    y: number;
+    static parse(point: string, defaultValue?: number): Point;
+    static parseScale(scale: string, defaultValue?: number): Point;
+    static parsePath(path: string): Point[];
+    constructor(x: number, y: number);
+    angleTo(point: Point): number;
+    applyTransform(transform: number[]): void;
+}
+//# sourceMappingURL=Point.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Point.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Point.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Point.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../src/Point.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,OAAO,KAAK;IAgCjB,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IAhCjB,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,SAAI;IAS5C,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,SAAI;IASjD,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM;gBAarB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM;IAGjB,OAAO,CAAC,KAAK,EAAE,KAAK;IAIpB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE;CAWlC"}
Index: imaps-frontend/node_modules/canvg/lib/Property.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Property.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Property.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,46 @@
+import { Axis } from './ViewPort';
+import Document, { Element } from './Document';
+export default class Property<T = any> {
+    private readonly document;
+    private readonly name;
+    private value;
+    static empty(document: Document): Property<string>;
+    static readonly textBaselineMapping: {
+        baseline: string;
+        'before-edge': string;
+        'text-before-edge': string;
+        middle: string;
+        central: string;
+        'after-edge': string;
+        'text-after-edge': string;
+        ideographic: string;
+        alphabetic: string;
+        hanging: string;
+        mathematical: string;
+    };
+    private isNormalizedColor;
+    constructor(document: Document, name: string, value: T);
+    split(separator?: string): Property<string>[];
+    hasValue(zeroIsValue?: boolean): boolean;
+    isString(regexp?: RegExp): boolean;
+    isUrlDefinition(): boolean;
+    isPixels(): boolean;
+    setValue(value: T): this;
+    getValue(def?: T): T;
+    getNumber(def?: T): number;
+    getString(def?: T): string;
+    getColor(def?: T): string;
+    getDpi(): number;
+    getRem(): number;
+    getEm(): number;
+    getUnits(): string;
+    getPixels(axis?: Axis, processPercent?: boolean): number;
+    getPixels(isFontSize?: boolean): number;
+    getMilliseconds(): number;
+    getRadians(): number;
+    getDefinition<T extends Element>(): T;
+    getFillStyleDefinition(element: Element, opacity: Property): string | CanvasPattern | CanvasGradient;
+    getTextBaseline(): string;
+    addOpacity(opacity: Property): Property<string>;
+}
+//# sourceMappingURL=Property.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Property.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Property.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Property.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../src/Property.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,IAAI,EACJ,MAAM,YAAY,CAAC;AACpB,OAAO,QAAQ,EAAE,EAChB,OAAO,EAGP,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,OAAO,OAAO,QAAQ,CAAC,CAAC,GAAG,GAAG;IAsBnC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,KAAK;IAvBd,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,QAAQ;IAI/B,MAAM,CAAC,QAAQ,CAAC,mBAAmB;;;;;;;;;;;;MAYjC;IAEF,OAAO,CAAC,iBAAiB,CAAS;gBAGhB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACrB,KAAK,EAAE,CAAC;IAGjB,KAAK,CAAC,SAAS,SAAM;IAYrB,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO;IAW9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM;IAaxB,eAAe;IAIf,QAAQ;IAiBR,QAAQ,CAAC,KAAK,EAAE,CAAC;IAKjB,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;IAQhB,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;IAqBjB,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;IAUjB,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;IAchB,MAAM;IAIN,MAAM;IAIN,KAAK;IAIL,QAAQ;IAIR,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM;IACxD,SAAS,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM;IAwFvC,eAAe;IAYf,UAAU;IAoBV,aAAa,CAAC,CAAC,SAAS,OAAO;IAe/B,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ;IA8B1D,eAAe;IAQf,UAAU,CAAC,OAAO,EAAE,QAAQ;CA2B5B"}
Index: imaps-frontend/node_modules/canvg/lib/SVGFontLoader.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/SVGFontLoader.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/SVGFontLoader.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+import Document from './Document';
+export default class SVGFontLoader {
+    private readonly document;
+    loaded: boolean;
+    constructor(document: Document);
+    load(fontFamily: string, url: string): Promise<void>;
+}
+//# sourceMappingURL=SVGFontLoader.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/SVGFontLoader.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/SVGFontLoader.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/SVGFontLoader.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"SVGFontLoader.d.ts","sourceRoot":"","sources":["../src/SVGFontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,aAAa;IAIhC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAH1B,MAAM,UAAS;gBAGG,QAAQ,EAAE,QAAQ;IAK9B,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CAmB1C"}
Index: imaps-frontend/node_modules/canvg/lib/Screen.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Screen.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Screen.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,106 @@
+import { RenderingContext2D } from './types';
+import ViewPort from './ViewPort';
+import Mouse from './Mouse';
+import Document, { Element, AnimateElement } from './Document';
+export interface IScreenOptions {
+    /**
+     * Window object.
+     */
+    window?: Window;
+    /**
+     * WHATWG-compatible `fetch` function.
+     */
+    fetch?: typeof fetch;
+}
+export interface IScreenStartOptions {
+    /**
+     * Whether enable the redraw.
+     */
+    enableRedraw?: boolean;
+    /**
+     * Ignore mouse events.
+     */
+    ignoreMouse?: boolean;
+    /**
+     * Ignore animations.
+     */
+    ignoreAnimation?: boolean;
+    /**
+     * Does not try to resize canvas.
+     */
+    ignoreDimensions?: boolean;
+    /**
+     * Does not clear canvas.
+     */
+    ignoreClear?: boolean;
+    /**
+     * Scales horizontally to width.
+     */
+    scaleWidth?: number;
+    /**
+     * Scales vertically to height.
+     */
+    scaleHeight?: number;
+    /**
+     * Draws at a x offset.
+     */
+    offsetX?: number;
+    /**
+     * Draws at a y offset.
+     */
+    offsetY?: number;
+    /**
+     * Will call the function on every frame, if it returns true, will redraw.
+     */
+    forceRedraw?(): boolean;
+}
+export interface IScreenViewBoxConfig {
+    document: Document;
+    ctx: RenderingContext2D;
+    aspectRatio: string;
+    width: number;
+    desiredWidth: number;
+    height: number;
+    desiredHeight: number;
+    minX?: number;
+    minY?: number;
+    refX?: number;
+    refY?: number;
+    clip?: boolean;
+    clipX?: number;
+    clipY?: number;
+}
+declare const defaultFetch: typeof fetch;
+export default class Screen {
+    readonly ctx: RenderingContext2D;
+    static readonly defaultWindow: Window & typeof globalThis;
+    static readonly defaultFetch: typeof fetch;
+    FRAMERATE: number;
+    MAX_VIRTUAL_PIXELS: number;
+    CLIENT_WIDTH: number;
+    CLIENT_HEIGHT: number;
+    readonly window?: Window;
+    readonly fetch: typeof defaultFetch;
+    readonly viewPort: ViewPort;
+    readonly mouse: Mouse;
+    readonly animations: AnimateElement[];
+    private readyPromise;
+    private resolveReady;
+    private waits;
+    private frameDuration;
+    private isReadyLock;
+    private isFirstRender;
+    private intervalId;
+    constructor(ctx: RenderingContext2D, { fetch, window }?: IScreenOptions);
+    wait(checker: () => boolean): void;
+    ready(): Promise<void>;
+    isReady(): boolean;
+    setDefaults(ctx: RenderingContext2D): void;
+    setViewBox({ document, ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY, clip, clipX, clipY }: IScreenViewBoxConfig): void;
+    start(element: Element, { enableRedraw, ignoreMouse, ignoreAnimation, ignoreDimensions, ignoreClear, forceRedraw, scaleWidth, scaleHeight, offsetX, offsetY }?: IScreenStartOptions): void;
+    stop(): void;
+    private shouldUpdate;
+    private render;
+}
+export {};
+//# sourceMappingURL=Screen.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Screen.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Screen.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Screen.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 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EACZ,KAAS,EACT,KAAS,EACT,EAAE,oBAAoB;IAuGvB,KAAK,CACJ,OAAO,EAAE,OAAO,EAChB,EACC,YAAoB,EACpB,WAAmB,EACnB,eAAuB,EACvB,gBAAwB,EACxB,WAAmB,EACnB,WAAW,EACX,UAAU,EACV,WAAW,EACX,OAAO,EACP,OAAO,EACP,GAAE,mBAAwB;IAkE5B,IAAI;IASJ,OAAO,CAAC,YAAY;IAoCpB,OAAO,CAAC,MAAM;CA6Hd"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/Matrix.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Matrix.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Matrix.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,16 @@
+import { RenderingContext2D } from '../types';
+import Document from '../Document';
+import Point from '../Point';
+import Property from '../Property';
+import { ITransform } from './types';
+export default class Matrix implements ITransform {
+    type: string;
+    protected matrix: number[];
+    private readonly originX;
+    private readonly originY;
+    constructor(_: Document, matrix: string, transformOrigin: [Property<string>, Property<string>]);
+    apply(ctx: RenderingContext2D): void;
+    unapply(ctx: RenderingContext2D): void;
+    applyToPoint(point: Point): void;
+}
+//# sourceMappingURL=Matrix.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/Matrix.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Matrix.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Matrix.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Matrix.d.ts","sourceRoot":"","sources":["../../src/Transform/Matrix.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EACN,UAAU,EACV,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,OAAO,MAAO,YAAW,UAAU;IAChD,IAAI,SAAY;IAChB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,CAAM;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;gBAGzC,CAAC,EAAE,QAAQ,EACX,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAOtD,KAAK,CAAC,GAAG,EAAE,kBAAkB;IAqB7B,OAAO,CAAC,GAAG,EAAE,kBAAkB;IA+B/B,YAAY,CAAC,KAAK,EAAE,KAAK;CAGzB"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/Rotate.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Rotate.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Rotate.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,17 @@
+import { RenderingContext2D } from '../types';
+import Document from '../Document';
+import Property from '../Property';
+import Point from '../Point';
+export default class Rotate {
+    type: string;
+    private readonly angle;
+    private readonly originX;
+    private readonly originY;
+    private readonly cx;
+    private readonly cy;
+    constructor(document: Document, rotate: string, transformOrigin: [Property<string>, Property<string>]);
+    apply(ctx: RenderingContext2D): void;
+    unapply(ctx: RenderingContext2D): void;
+    applyToPoint(point: Point): void;
+}
+//# sourceMappingURL=Rotate.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/Rotate.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Rotate.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Rotate.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Rotate.d.ts","sourceRoot":"","sources":["../../src/Transform/Rotate.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,MAAM,CAAC,OAAO,OAAO,MAAM;IAC1B,IAAI,SAAY;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAa;IAChC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAa;gBAG/B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAWtD,KAAK,CAAC,GAAG,EAAE,kBAAkB;IAgB7B,OAAO,CAAC,GAAG,EAAE,kBAAkB;IAgB/B,YAAY,CAAC,KAAK,EAAE,KAAK;CAiCzB"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/Scale.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Scale.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Scale.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,15 @@
+import { RenderingContext2D } from '../types';
+import Document from '../Document';
+import Point from '../Point';
+import Property from '../Property';
+export default class Scale {
+    type: string;
+    private readonly scale;
+    private readonly originX;
+    private readonly originY;
+    constructor(_: Document, scale: string, transformOrigin: [Property<string>, Property<string>]);
+    apply(ctx: RenderingContext2D): void;
+    unapply(ctx: RenderingContext2D): void;
+    applyToPoint(point: Point): void;
+}
+//# sourceMappingURL=Scale.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/Scale.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Scale.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Scale.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Scale.d.ts","sourceRoot":"","sources":["../../src/Transform/Scale.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,KAAK;IACzB,IAAI,SAAW;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;gBAGzC,CAAC,EAAE,QAAQ,EACX,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAiBtD,KAAK,CAAC,GAAG,EAAE,kBAAkB;IAiB7B,OAAO,CAAC,GAAG,EAAE,kBAAkB;IAiB/B,YAAY,CAAC,KAAK,EAAE,KAAK;CAezB"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/Skew.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Skew.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Skew.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import Document from '../Document';
+import Property from '../Property';
+import Matrix from './Matrix';
+export default class Skew extends Matrix {
+    type: string;
+    protected readonly angle: Property;
+    constructor(document: Document, skew: string, transformOrigin: [Property<string>, Property<string>]);
+}
+//# sourceMappingURL=Skew.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/Skew.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Skew.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Skew.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Skew.d.ts","sourceRoot":"","sources":["../../src/Transform/Skew.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM;IACvC,IAAI,SAAU;IACd,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAQ;gBAGzC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAMtD"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/SkewX.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/SkewX.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/SkewX.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+import Document from '../Document';
+import Property from '../Property';
+import Skew from './Skew';
+export default class SkewX extends Skew {
+    type: string;
+    constructor(document: Document, skew: string, transformOrigin: [Property<string>, Property<string>]);
+}
+//# sourceMappingURL=SkewX.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/SkewX.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/SkewX.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/SkewX.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"SkewX.d.ts","sourceRoot":"","sources":["../../src/Transform/SkewX.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,IAAI;IACtC,IAAI,SAAW;gBAGd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAatD"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/SkewY.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/SkewY.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/SkewY.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+import Document from '../Document';
+import Property from '../Property';
+import Skew from './Skew';
+export default class SkewY extends Skew {
+    type: string;
+    constructor(document: Document, skew: string, transformOrigin: [Property<string>, Property<string>]);
+}
+//# sourceMappingURL=SkewY.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/SkewY.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/SkewY.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/SkewY.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"SkewY.d.ts","sourceRoot":"","sources":["../../src/Transform/SkewY.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,IAAI;IACtC,IAAI,SAAW;gBAGd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAatD"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/Transform.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Transform.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Transform.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,28 @@
+import { RenderingContext2D } from '../types';
+import Property from '../Property';
+import Point from '../Point';
+import Document, { Element } from '../Document';
+import { ITransform } from './types';
+import Translate from './Translate';
+import Rotate from './Rotate';
+import Scale from './Scale';
+import Matrix from './Matrix';
+import Skew from './Skew';
+import SkewX from './SkewX';
+import SkewY from './SkewY';
+export { Translate, Rotate, Scale, Matrix, Skew, SkewX, SkewY };
+interface ITransformConstructor {
+    prototype: ITransform;
+    new (document: Document, value: string, transformOrigin?: readonly [Property<string>, Property<string>]): ITransform;
+}
+export default class Transform {
+    private readonly document;
+    static fromElement(document: Document, element: Element): Transform;
+    static transformTypes: Record<string, ITransformConstructor>;
+    private readonly transforms;
+    constructor(document: Document, transform: string, transformOrigin?: readonly [Property<string>, Property<string>]);
+    apply(ctx: RenderingContext2D): void;
+    unapply(ctx: RenderingContext2D): void;
+    applyToPoint(point: Point): void;
+}
+//# sourceMappingURL=Transform.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/Transform.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Transform.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Transform.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Transform.d.ts","sourceRoot":"","sources":["../../src/Transform/Transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAIlB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,QAAQ,EAAE,EAChB,OAAO,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,UAAU,EACV,MAAM,SAAS,CAAC;AACjB,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,OAAO,EACN,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,CAAC;AAsBF,UAAU,qBAAqB;IAC9B,SAAS,EAAE,UAAU,CAAC;IACtB,KACC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,eAAe,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,GAC7D,UAAU,CAAC;CACd;AAED,MAAM,CAAC,OAAO,OAAO,SAAS;IAmC5B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAlC1B,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;IAsBvD,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAO1D;IAEF,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;gBAG7B,QAAQ,EAAE,QAAQ,EACnC,SAAS,EAAE,MAAM,EACjB,eAAe,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAqBhE,KAAK,CAAC,GAAG,EAAE,kBAAkB;IAW7B,OAAO,CAAC,GAAG,EAAE,kBAAkB;IAY/B,YAAY,CAAC,KAAK,EAAE,KAAK;CAUzB"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/Translate.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Translate.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Translate.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,12 @@
+import { RenderingContext2D } from '../types';
+import Document from '../Document';
+import Point from '../Point';
+export default class Translate {
+    type: string;
+    private readonly point;
+    constructor(_: Document, point: string);
+    apply(ctx: RenderingContext2D): void;
+    unapply(ctx: RenderingContext2D): void;
+    applyToPoint(point: Point): void;
+}
+//# sourceMappingURL=Translate.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/Translate.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/Translate.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/Translate.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"Translate.d.ts","sourceRoot":"","sources":["../../src/Transform/Translate.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,MAAM,CAAC,OAAO,OAAO,SAAS;IAC7B,IAAI,SAAe;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;gBAGpC,CAAC,EAAE,QAAQ,EACX,KAAK,EAAE,MAAM;IAKd,KAAK,CAAC,GAAG,EAAE,kBAAkB;IAY7B,OAAO,CAAC,GAAG,EAAE,kBAAkB;IAY/B,YAAY,CAAC,KAAK,EAAE,KAAK;CAezB"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/index.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,3 @@
+export { default } from './Transform';
+export * from './Transform';
+//# sourceMappingURL=index.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/index.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Transform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,OAAO,EACP,MAAM,aAAa,CAAC;AACrB,cAAc,aAAa,CAAC"}
Index: imaps-frontend/node_modules/canvg/lib/Transform/types.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/types.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/types.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,9 @@
+import { RenderingContext2D } from '../types';
+import Point from '../Point';
+export interface ITransform {
+    type: string;
+    apply(ctx: RenderingContext2D): void;
+    unapply(ctx: RenderingContext2D): void;
+    applyToPoint(point: Point): void;
+}
+//# sourceMappingURL=types.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/Transform/types.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/Transform/types.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/Transform/types.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Transform/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,MAAM,UAAU,CAAC;AAE7B,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACrC,OAAO,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACvC,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACjC"}
Index: imaps-frontend/node_modules/canvg/lib/ViewPort.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/ViewPort.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/ViewPort.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,16 @@
+export interface IViewPortSize {
+    width: number;
+    height: number;
+}
+export declare type Axis = 'x' | 'y';
+export default class ViewPort {
+    viewPorts: IViewPortSize[];
+    clear(): void;
+    setCurrent(width: number, height: number): void;
+    removeCurrent(): void;
+    getCurrent(): IViewPortSize;
+    get width(): number;
+    get height(): number;
+    computeSize(d?: number | Axis): number;
+}
+//# sourceMappingURL=ViewPort.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/ViewPort.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/ViewPort.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/ViewPort.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"ViewPort.d.ts","sourceRoot":"","sources":["../src/ViewPort.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC5B,SAAS,EAAE,aAAa,EAAE,CAAM;IAEhC,KAAK;IAIL,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAOxC,aAAa;IAIb,UAAU;IAQV,IAAI,KAAK,WAER;IAED,IAAI,MAAM,WAET;IAED,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,GAAC,IAAI;CAiB3B"}
Index: imaps-frontend/node_modules/canvg/lib/index.babel.js
===================================================================
--- imaps-frontend/node_modules/canvg/lib/index.babel.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/index.babel.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,5271 @@
+import requestAnimationFrame from 'raf';
+import RGBColor from 'rgbcolor';
+import { SVGPathData } from 'svg-pathdata';
+import { canvasRGBA } from 'stackblur-canvas';
+
+/**
+ * Options preset for `OffscreenCanvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @returns Preset object.
+ */
+function offscreen({ DOMParser: DOMParserFallback } = {}) {
+    const preset = {
+        window: null,
+        ignoreAnimation: true,
+        ignoreMouse: true,
+        DOMParser: DOMParserFallback,
+        createCanvas(width, height) {
+            return new OffscreenCanvas(width, height);
+        },
+        async createImage(url) {
+            const response = await fetch(url);
+            const blob = await response.blob();
+            const img = await createImageBitmap(blob);
+            return img;
+        }
+    };
+    if (typeof DOMParser !== 'undefined'
+        || typeof DOMParserFallback === 'undefined') {
+        Reflect.deleteProperty(preset, 'DOMParser');
+    }
+    return preset;
+}
+
+/**
+ * Options preset for `node-canvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @param config.canvas - `node-canvas` exports.
+ * @param config.fetch - WHATWG-compatible `fetch` function.
+ * @returns Preset object.
+ */
+function node({ DOMParser, canvas, fetch }) {
+    return {
+        window: null,
+        ignoreAnimation: true,
+        ignoreMouse: true,
+        DOMParser,
+        fetch,
+        createCanvas: canvas.createCanvas,
+        createImage: canvas.loadImage
+    };
+}
+
+var index = /*#__PURE__*/Object.freeze({
+	__proto__: null,
+	offscreen: offscreen,
+	node: node
+});
+
+/**
+ * HTML-safe compress white-spaces.
+ * @param str - String to compress.
+ * @returns String.
+ */
+function compressSpaces(str) {
+    return str.replace(/(?!\u3000)\s+/gm, ' ');
+}
+/**
+ * HTML-safe left trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+function trimLeft(str) {
+    return str.replace(/^[\n \t]+/, '');
+}
+/**
+ * HTML-safe right trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+function trimRight(str) {
+    return str.replace(/[\n \t]+$/, '');
+}
+/**
+ * String to numbers array.
+ * @param str - Numbers string.
+ * @returns Numbers array.
+ */
+function toNumbers(str) {
+    const matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
+    return matches.map(parseFloat);
+}
+// Microsoft Edge fix
+const allUppercase = /^[A-Z-]+$/;
+/**
+ * Normalize attribute name.
+ * @param name - Attribute name.
+ * @returns Normalized attribute name.
+ */
+function normalizeAttributeName(name) {
+    if (allUppercase.test(name)) {
+        return name.toLowerCase();
+    }
+    return name;
+}
+/**
+ * Parse external URL.
+ * @param url - CSS url string.
+ * @returns Parsed URL.
+ */
+function parseExternalUrl(url) {
+    //                      single quotes [2]
+    //                      v         double quotes [3]
+    //                      v         v         no quotes [4]
+    //                      v         v         v
+    const urlMatch = /url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(url) || [];
+    return urlMatch[2] || urlMatch[3] || urlMatch[4];
+}
+/**
+ * Transform floats to integers in rgb colors.
+ * @param color - Color to normalize.
+ * @returns Normalized color.
+ */
+function normalizeColor(color) {
+    if (!color.startsWith('rgb')) {
+        return color;
+    }
+    let rgbParts = 3;
+    const normalizedColor = color.replace(/\d+(\.\d+)?/g, (num, isFloat) => (rgbParts-- && isFloat
+        ? String(Math.round(parseFloat(num)))
+        : num));
+    return normalizedColor;
+}
+
+// slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
+const attributeRegex = /(\[[^\]]+\])/g;
+const idRegex = /(#[^\s+>~.[:]+)/g;
+const classRegex = /(\.[^\s+>~.[:]+)/g;
+const pseudoElementRegex = /(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi;
+const pseudoClassWithBracketsRegex = /(:[\w-]+\([^)]*\))/gi;
+const pseudoClassRegex = /(:[^\s+>~.[:]+)/g;
+const elementRegex = /([^\s+>~.[:]+)/g;
+function findSelectorMatch(selector, regex) {
+    const matches = regex.exec(selector);
+    if (!matches) {
+        return [
+            selector,
+            0
+        ];
+    }
+    return [
+        selector.replace(regex, ' '),
+        matches.length
+    ];
+}
+/**
+ * Measure selector specificity.
+ * @param selector - Selector to measure.
+ * @returns Specificity.
+ */
+function getSelectorSpecificity(selector) {
+    const specificity = [0, 0, 0];
+    let currentSelector = selector
+        .replace(/:not\(([^)]*)\)/g, '     $1 ')
+        .replace(/{[\s\S]*/gm, ' ');
+    let delta = 0;
+    [currentSelector, delta] = findSelectorMatch(currentSelector, attributeRegex);
+    specificity[1] += delta;
+    [currentSelector, delta] = findSelectorMatch(currentSelector, idRegex);
+    specificity[0] += delta;
+    [currentSelector, delta] = findSelectorMatch(currentSelector, classRegex);
+    specificity[1] += delta;
+    [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoElementRegex);
+    specificity[2] += delta;
+    [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
+    specificity[1] += delta;
+    [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassRegex);
+    specificity[1] += delta;
+    currentSelector = currentSelector
+        .replace(/[*\s+>~]/g, ' ')
+        .replace(/[#.]/g, ' ');
+    [currentSelector, delta] = findSelectorMatch(currentSelector, elementRegex); // lgtm [js/useless-assignment-to-local]
+    specificity[2] += delta;
+    return specificity.join('');
+}
+
+const PSEUDO_ZERO = .00000001;
+/**
+ * Vector magnitude.
+ * @param v
+ * @returns Number result.
+ */
+function vectorMagnitude(v) {
+    return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
+}
+/**
+ * Ratio between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+function vectorsRatio(u, v) {
+    return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
+}
+/**
+ * Angle between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+function vectorsAngle(u, v) {
+    return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
+}
+function CB1(t) {
+    return t * t * t;
+}
+function CB2(t) {
+    return 3 * t * t * (1 - t);
+}
+function CB3(t) {
+    return 3 * t * (1 - t) * (1 - t);
+}
+function CB4(t) {
+    return (1 - t) * (1 - t) * (1 - t);
+}
+function QB1(t) {
+    return t * t;
+}
+function QB2(t) {
+    return 2 * t * (1 - t);
+}
+function QB3(t) {
+    return (1 - t) * (1 - t);
+}
+
+/* eslint-disable @typescript-eslint/no-unsafe-assignment */
+class Property {
+    constructor(document, name, value) {
+        this.document = document;
+        this.name = name;
+        this.value = value;
+        this.isNormalizedColor = false;
+    }
+    static empty(document) {
+        return new Property(document, 'EMPTY', '');
+    }
+    split(separator = ' ') {
+        const { document, name } = this;
+        return compressSpaces(this.getString())
+            .trim()
+            .split(separator)
+            .map(value => new Property(document, name, value));
+    }
+    hasValue(zeroIsValue) {
+        const { value } = this;
+        return value !== null
+            && value !== ''
+            && (zeroIsValue || value !== 0)
+            && typeof value !== 'undefined';
+    }
+    isString(regexp) {
+        const { value } = this;
+        const result = typeof value === 'string';
+        if (!result || !regexp) {
+            return result;
+        }
+        return regexp.test(value);
+    }
+    isUrlDefinition() {
+        return this.isString(/^url\(/);
+    }
+    isPixels() {
+        if (!this.hasValue()) {
+            return false;
+        }
+        const asString = this.getString();
+        switch (true) {
+            case asString.endsWith('px'):
+            case /^[0-9]+$/.test(asString):
+                return true;
+            default:
+                return false;
+        }
+    }
+    setValue(value) {
+        this.value = value;
+        return this;
+    }
+    getValue(def) {
+        if (typeof def === 'undefined' || this.hasValue()) {
+            return this.value;
+        }
+        return def;
+    }
+    getNumber(def) {
+        if (!this.hasValue()) {
+            if (typeof def === 'undefined') {
+                return 0;
+            }
+            return parseFloat(def);
+        }
+        const { value } = this;
+        let n = parseFloat(value);
+        if (this.isString(/%$/)) {
+            n /= 100.0;
+        }
+        return n;
+    }
+    getString(def) {
+        if (typeof def === 'undefined' || this.hasValue()) {
+            return typeof this.value === 'undefined'
+                ? ''
+                : String(this.value);
+        }
+        return String(def);
+    }
+    getColor(def) {
+        let color = this.getString(def);
+        if (this.isNormalizedColor) {
+            return color;
+        }
+        this.isNormalizedColor = true;
+        color = normalizeColor(color);
+        this.value = color;
+        return color;
+    }
+    getDpi() {
+        return 96.0; // TODO: compute?
+    }
+    getRem() {
+        return this.document.rootEmSize;
+    }
+    getEm() {
+        return this.document.emSize;
+    }
+    getUnits() {
+        return this.getString().replace(/[0-9.-]/g, '');
+    }
+    getPixels(axisOrIsFontSize, processPercent = false) {
+        if (!this.hasValue()) {
+            return 0;
+        }
+        const [axis, isFontSize] = typeof axisOrIsFontSize === 'boolean'
+            ? [undefined, axisOrIsFontSize]
+            : [axisOrIsFontSize];
+        const { viewPort } = this.document.screen;
+        switch (true) {
+            case this.isString(/vmin$/):
+                return this.getNumber()
+                    / 100.0
+                    * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
+            case this.isString(/vmax$/):
+                return this.getNumber()
+                    / 100.0
+                    * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
+            case this.isString(/vw$/):
+                return this.getNumber()
+                    / 100.0
+                    * viewPort.computeSize('x');
+            case this.isString(/vh$/):
+                return this.getNumber()
+                    / 100.0
+                    * viewPort.computeSize('y');
+            case this.isString(/rem$/):
+                return this.getNumber() * this.getRem( /* viewPort */);
+            case this.isString(/em$/):
+                return this.getNumber() * this.getEm( /* viewPort */);
+            case this.isString(/ex$/):
+                return this.getNumber() * this.getEm( /* viewPort */) / 2.0;
+            case this.isString(/px$/):
+                return this.getNumber();
+            case this.isString(/pt$/):
+                return this.getNumber() * this.getDpi( /* viewPort */) * (1.0 / 72.0);
+            case this.isString(/pc$/):
+                return this.getNumber() * 15;
+            case this.isString(/cm$/):
+                return this.getNumber() * this.getDpi( /* viewPort */) / 2.54;
+            case this.isString(/mm$/):
+                return this.getNumber() * this.getDpi( /* viewPort */) / 25.4;
+            case this.isString(/in$/):
+                return this.getNumber() * this.getDpi( /* viewPort */);
+            case this.isString(/%$/) && isFontSize:
+                return this.getNumber() * this.getEm( /* viewPort */);
+            case this.isString(/%$/):
+                return this.getNumber() * viewPort.computeSize(axis);
+            default: {
+                const n = this.getNumber();
+                if (processPercent && n < 1.0) {
+                    return n * viewPort.computeSize(axis);
+                }
+                return n;
+            }
+        }
+    }
+    getMilliseconds() {
+        if (!this.hasValue()) {
+            return 0;
+        }
+        if (this.isString(/ms$/)) {
+            return this.getNumber();
+        }
+        return this.getNumber() * 1000;
+    }
+    getRadians() {
+        if (!this.hasValue()) {
+            return 0;
+        }
+        switch (true) {
+            case this.isString(/deg$/):
+                return this.getNumber() * (Math.PI / 180.0);
+            case this.isString(/grad$/):
+                return this.getNumber() * (Math.PI / 200.0);
+            case this.isString(/rad$/):
+                return this.getNumber();
+            default:
+                return this.getNumber() * (Math.PI / 180.0);
+        }
+    }
+    getDefinition() {
+        const asString = this.getString();
+        let name = /#([^)'"]+)/.exec(asString);
+        if (name) {
+            name = name[1];
+        }
+        if (!name) {
+            name = asString;
+        }
+        return this.document.definitions[name];
+    }
+    getFillStyleDefinition(element, opacity) {
+        let def = this.getDefinition();
+        if (!def) {
+            return null;
+        }
+        // gradient
+        if (typeof def.createGradient === 'function') {
+            return def.createGradient(this.document.ctx, element, opacity);
+        }
+        // pattern
+        if (typeof def.createPattern === 'function') {
+            if (def.getHrefAttribute().hasValue()) {
+                const patternTransform = def.getAttribute('patternTransform');
+                def = def.getHrefAttribute().getDefinition();
+                if (patternTransform.hasValue()) {
+                    def.getAttribute('patternTransform', true).setValue(patternTransform.value);
+                }
+            }
+            return def.createPattern(this.document.ctx, element, opacity);
+        }
+        return null;
+    }
+    getTextBaseline() {
+        if (!this.hasValue()) {
+            return null;
+        }
+        return Property.textBaselineMapping[this.getString()];
+    }
+    addOpacity(opacity) {
+        let value = this.getColor();
+        const len = value.length;
+        let commas = 0;
+        // Simulate old RGBColor version, which can't parse rgba.
+        for (let i = 0; i < len; i++) {
+            if (value[i] === ',') {
+                commas++;
+            }
+            if (commas === 3) {
+                break;
+            }
+        }
+        if (opacity.hasValue() && this.isString() && commas !== 3) {
+            const color = new RGBColor(value);
+            if (color.ok) {
+                color.alpha = opacity.getNumber();
+                value = color.toRGBA();
+            }
+        }
+        return new Property(this.document, this.name, value);
+    }
+}
+Property.textBaselineMapping = {
+    'baseline': 'alphabetic',
+    'before-edge': 'top',
+    'text-before-edge': 'top',
+    'middle': 'middle',
+    'central': 'middle',
+    'after-edge': 'bottom',
+    'text-after-edge': 'bottom',
+    'ideographic': 'ideographic',
+    'alphabetic': 'alphabetic',
+    'hanging': 'hanging',
+    'mathematical': 'alphabetic'
+};
+
+class ViewPort {
+    constructor() {
+        this.viewPorts = [];
+    }
+    clear() {
+        this.viewPorts = [];
+    }
+    setCurrent(width, height) {
+        this.viewPorts.push({
+            width,
+            height
+        });
+    }
+    removeCurrent() {
+        this.viewPorts.pop();
+    }
+    getCurrent() {
+        const { viewPorts } = this;
+        return viewPorts[viewPorts.length - 1];
+    }
+    get width() {
+        return this.getCurrent().width;
+    }
+    get height() {
+        return this.getCurrent().height;
+    }
+    computeSize(d) {
+        if (typeof d === 'number') {
+            return d;
+        }
+        if (d === 'x') {
+            return this.width;
+        }
+        if (d === 'y') {
+            return this.height;
+        }
+        return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
+    }
+}
+
+class Point {
+    constructor(x, y) {
+        this.x = x;
+        this.y = y;
+    }
+    static parse(point, defaultValue = 0) {
+        const [x = defaultValue, y = defaultValue] = toNumbers(point);
+        return new Point(x, y);
+    }
+    static parseScale(scale, defaultValue = 1) {
+        const [x = defaultValue, y = x] = toNumbers(scale);
+        return new Point(x, y);
+    }
+    static parsePath(path) {
+        const points = toNumbers(path);
+        const len = points.length;
+        const pathPoints = [];
+        for (let i = 0; i < len; i += 2) {
+            pathPoints.push(new Point(points[i], points[i + 1]));
+        }
+        return pathPoints;
+    }
+    angleTo(point) {
+        return Math.atan2(point.y - this.y, point.x - this.x);
+    }
+    applyTransform(transform) {
+        const { x, y } = this;
+        const xp = x * transform[0] + y * transform[2] + transform[4];
+        const yp = x * transform[1] + y * transform[3] + transform[5];
+        this.x = xp;
+        this.y = yp;
+    }
+}
+
+class Mouse {
+    constructor(screen) {
+        this.screen = screen;
+        this.working = false;
+        this.events = [];
+        this.eventElements = [];
+        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+        this.onClick = this.onClick.bind(this);
+        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+        this.onMouseMove = this.onMouseMove.bind(this);
+    }
+    isWorking() {
+        return this.working;
+    }
+    start() {
+        if (this.working) {
+            return;
+        }
+        const { screen, onClick, onMouseMove } = this;
+        const canvas = screen.ctx.canvas;
+        canvas.onclick = onClick;
+        canvas.onmousemove = onMouseMove;
+        this.working = true;
+    }
+    stop() {
+        if (!this.working) {
+            return;
+        }
+        const canvas = this.screen.ctx.canvas;
+        this.working = false;
+        canvas.onclick = null;
+        canvas.onmousemove = null;
+    }
+    hasEvents() {
+        return this.working && this.events.length > 0;
+    }
+    runEvents() {
+        if (!this.working) {
+            return;
+        }
+        const { screen: document, events, eventElements } = this;
+        const { style } = document.ctx.canvas;
+        if (style) {
+            style.cursor = '';
+        }
+        events.forEach(({ run }, i) => {
+            let element = eventElements[i];
+            while (element) {
+                run(element);
+                element = element.parent;
+            }
+        });
+        // done running, clear
+        this.events = [];
+        this.eventElements = [];
+    }
+    checkPath(element, ctx) {
+        if (!this.working || !ctx) {
+            return;
+        }
+        const { events, eventElements } = this;
+        events.forEach(({ x, y }, i) => {
+            if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
+                eventElements[i] = element;
+            }
+        });
+    }
+    checkBoundingBox(element, boundingBox) {
+        if (!this.working || !boundingBox) {
+            return;
+        }
+        const { events, eventElements } = this;
+        events.forEach(({ x, y }, i) => {
+            if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
+                eventElements[i] = element;
+            }
+        });
+    }
+    mapXY(x, y) {
+        const { window, ctx } = this.screen;
+        const point = new Point(x, y);
+        let element = ctx.canvas;
+        while (element) {
+            point.x -= element.offsetLeft;
+            point.y -= element.offsetTop;
+            element = element.offsetParent;
+        }
+        if (window.scrollX) {
+            point.x += window.scrollX;
+        }
+        if (window.scrollY) {
+            point.y += window.scrollY;
+        }
+        return point;
+    }
+    onClick(event) {
+        const { x, y } = this.mapXY(event.clientX, event.clientY);
+        this.events.push({
+            type: 'onclick',
+            x,
+            y,
+            run(eventTarget) {
+                if (eventTarget.onClick) {
+                    eventTarget.onClick();
+                }
+            }
+        });
+    }
+    onMouseMove(event) {
+        const { x, y } = this.mapXY(event.clientX, event.clientY);
+        this.events.push({
+            type: 'onmousemove',
+            x,
+            y,
+            run(eventTarget) {
+                if (eventTarget.onMouseMove) {
+                    eventTarget.onMouseMove();
+                }
+            }
+        });
+    }
+}
+
+const defaultWindow = typeof window !== 'undefined'
+    ? window
+    : null;
+const defaultFetch$1 = typeof fetch !== 'undefined'
+    ? fetch.bind(undefined) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
+    : null;
+class Screen {
+    constructor(ctx, { fetch = defaultFetch$1, window = defaultWindow } = {}) {
+        this.ctx = ctx;
+        this.FRAMERATE = 30;
+        this.MAX_VIRTUAL_PIXELS = 30000;
+        this.CLIENT_WIDTH = 800;
+        this.CLIENT_HEIGHT = 600;
+        this.viewPort = new ViewPort();
+        this.mouse = new Mouse(this);
+        this.animations = [];
+        this.waits = [];
+        this.frameDuration = 0;
+        this.isReadyLock = false;
+        this.isFirstRender = true;
+        this.intervalId = null;
+        this.window = window;
+        this.fetch = fetch;
+    }
+    wait(checker) {
+        this.waits.push(checker);
+    }
+    ready() {
+        // eslint-disable-next-line @typescript-eslint/no-misused-promises
+        if (!this.readyPromise) {
+            return Promise.resolve();
+        }
+        return this.readyPromise;
+    }
+    isReady() {
+        if (this.isReadyLock) {
+            return true;
+        }
+        const isReadyLock = this.waits.every(_ => _());
+        if (isReadyLock) {
+            this.waits = [];
+            if (this.resolveReady) {
+                this.resolveReady();
+            }
+        }
+        this.isReadyLock = isReadyLock;
+        return isReadyLock;
+    }
+    setDefaults(ctx) {
+        // initial values and defaults
+        ctx.strokeStyle = 'rgba(0,0,0,0)';
+        ctx.lineCap = 'butt';
+        ctx.lineJoin = 'miter';
+        ctx.miterLimit = 4;
+    }
+    setViewBox({ document, ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX = 0, minY = 0, refX, refY, clip = false, clipX = 0, clipY = 0 }) {
+        // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
+        const cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
+        const [aspectRatioAlign, aspectRatioMeetOrSlice] = cleanAspectRatio.split(' ');
+        const align = aspectRatioAlign || 'xMidYMid';
+        const meetOrSlice = aspectRatioMeetOrSlice || 'meet';
+        // calculate scale
+        const scaleX = width / desiredWidth;
+        const scaleY = height / desiredHeight;
+        const scaleMin = Math.min(scaleX, scaleY);
+        const scaleMax = Math.max(scaleX, scaleY);
+        let finalDesiredWidth = desiredWidth;
+        let finalDesiredHeight = desiredHeight;
+        if (meetOrSlice === 'meet') {
+            finalDesiredWidth *= scaleMin;
+            finalDesiredHeight *= scaleMin;
+        }
+        if (meetOrSlice === 'slice') {
+            finalDesiredWidth *= scaleMax;
+            finalDesiredHeight *= scaleMax;
+        }
+        const refXProp = new Property(document, 'refX', refX);
+        const refYProp = new Property(document, 'refY', refY);
+        const hasRefs = refXProp.hasValue() && refYProp.hasValue();
+        if (hasRefs) {
+            ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
+        }
+        if (clip) {
+            const scaledClipX = scaleMin * clipX;
+            const scaledClipY = scaleMin * clipY;
+            ctx.beginPath();
+            ctx.moveTo(scaledClipX, scaledClipY);
+            ctx.lineTo(width, scaledClipY);
+            ctx.lineTo(width, height);
+            ctx.lineTo(scaledClipX, height);
+            ctx.closePath();
+            ctx.clip();
+        }
+        if (!hasRefs) {
+            const isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
+            const isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
+            const isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
+            const isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
+            if (align.startsWith('xMid') && (isMeetMinY || isSliceMaxY)) {
+                ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
+            }
+            if (align.endsWith('YMid') && (isMeetMinX || isSliceMaxX)) {
+                ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
+            }
+            if (align.startsWith('xMax') && (isMeetMinY || isSliceMaxY)) {
+                ctx.translate(width - finalDesiredWidth, 0);
+            }
+            if (align.endsWith('YMax') && (isMeetMinX || isSliceMaxX)) {
+                ctx.translate(0, height - finalDesiredHeight);
+            }
+        }
+        // scale
+        switch (true) {
+            case align === 'none':
+                ctx.scale(scaleX, scaleY);
+                break;
+            case meetOrSlice === 'meet':
+                ctx.scale(scaleMin, scaleMin);
+                break;
+            case meetOrSlice === 'slice':
+                ctx.scale(scaleMax, scaleMax);
+                break;
+        }
+        // translate
+        ctx.translate(-minX, -minY);
+    }
+    start(element, { enableRedraw = false, ignoreMouse = false, ignoreAnimation = false, ignoreDimensions = false, ignoreClear = false, forceRedraw, scaleWidth, scaleHeight, offsetX, offsetY } = {}) {
+        const { FRAMERATE, mouse } = this;
+        const frameDuration = 1000 / FRAMERATE;
+        this.frameDuration = frameDuration;
+        this.readyPromise = new Promise((resolve) => {
+            this.resolveReady = resolve;
+        });
+        if (this.isReady()) {
+            this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
+        }
+        if (!enableRedraw) {
+            return;
+        }
+        let now = Date.now();
+        let then = now;
+        let delta = 0;
+        const tick = () => {
+            now = Date.now();
+            delta = now - then;
+            if (delta >= frameDuration) {
+                then = now - (delta % frameDuration);
+                if (this.shouldUpdate(ignoreAnimation, forceRedraw)) {
+                    this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
+                    mouse.runEvents();
+                }
+            }
+            this.intervalId = requestAnimationFrame(tick);
+        };
+        if (!ignoreMouse) {
+            mouse.start();
+        }
+        this.intervalId = requestAnimationFrame(tick);
+    }
+    stop() {
+        if (this.intervalId) {
+            requestAnimationFrame.cancel(this.intervalId);
+            this.intervalId = null;
+        }
+        this.mouse.stop();
+    }
+    shouldUpdate(ignoreAnimation, forceRedraw) {
+        // need update from animations?
+        if (!ignoreAnimation) {
+            const { frameDuration } = this;
+            const shouldUpdate = this.animations.reduce((shouldUpdate, animation) => animation.update(frameDuration) || shouldUpdate, false);
+            if (shouldUpdate) {
+                return true;
+            }
+        }
+        // need update from redraw?
+        if (typeof forceRedraw === 'function' && forceRedraw()) {
+            return true;
+        }
+        if (!this.isReadyLock && this.isReady()) {
+            return true;
+        }
+        // need update from mouse events?
+        if (this.mouse.hasEvents()) {
+            return true;
+        }
+        return false;
+    }
+    render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
+        const { CLIENT_WIDTH, CLIENT_HEIGHT, viewPort, ctx, isFirstRender } = this;
+        const canvas = ctx.canvas;
+        viewPort.clear();
+        if (canvas.width && canvas.height) {
+            viewPort.setCurrent(canvas.width, canvas.height);
+        }
+        else {
+            viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
+        }
+        const widthStyle = element.getStyle('width');
+        const heightStyle = element.getStyle('height');
+        if (!ignoreDimensions && (isFirstRender
+            || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
+            // set canvas size
+            if (widthStyle.hasValue()) {
+                canvas.width = widthStyle.getPixels('x');
+                if (canvas.style) {
+                    canvas.style.width = `${canvas.width}px`;
+                }
+            }
+            if (heightStyle.hasValue()) {
+                canvas.height = heightStyle.getPixels('y');
+                if (canvas.style) {
+                    canvas.style.height = `${canvas.height}px`;
+                }
+            }
+        }
+        let cWidth = canvas.clientWidth || canvas.width;
+        let cHeight = canvas.clientHeight || canvas.height;
+        if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
+            cWidth = widthStyle.getPixels('x');
+            cHeight = heightStyle.getPixels('y');
+        }
+        viewPort.setCurrent(cWidth, cHeight);
+        if (typeof offsetX === 'number') {
+            element.getAttribute('x', true).setValue(offsetX);
+        }
+        if (typeof offsetY === 'number') {
+            element.getAttribute('y', true).setValue(offsetY);
+        }
+        if (typeof scaleWidth === 'number'
+            || typeof scaleHeight === 'number') {
+            const viewBox = toNumbers(element.getAttribute('viewBox').getString());
+            let xRatio = 0;
+            let yRatio = 0;
+            if (typeof scaleWidth === 'number') {
+                const widthStyle = element.getStyle('width');
+                if (widthStyle.hasValue()) {
+                    xRatio = widthStyle.getPixels('x') / scaleWidth;
+                }
+                else if (!isNaN(viewBox[2])) {
+                    xRatio = viewBox[2] / scaleWidth;
+                }
+            }
+            if (typeof scaleHeight === 'number') {
+                const heightStyle = element.getStyle('height');
+                if (heightStyle.hasValue()) {
+                    yRatio = heightStyle.getPixels('y') / scaleHeight;
+                }
+                else if (!isNaN(viewBox[3])) {
+                    yRatio = viewBox[3] / scaleHeight;
+                }
+            }
+            if (!xRatio) {
+                xRatio = yRatio;
+            }
+            if (!yRatio) {
+                yRatio = xRatio;
+            }
+            element.getAttribute('width', true).setValue(scaleWidth);
+            element.getAttribute('height', true).setValue(scaleHeight);
+            const transformStyle = element.getStyle('transform', true, true);
+            transformStyle.setValue(`${transformStyle.getString()} scale(${1.0 / xRatio}, ${1.0 / yRatio})`);
+        }
+        // clear and render
+        if (!ignoreClear) {
+            ctx.clearRect(0, 0, cWidth, cHeight);
+        }
+        element.render(ctx);
+        if (isFirstRender) {
+            this.isFirstRender = false;
+        }
+    }
+}
+Screen.defaultWindow = defaultWindow;
+Screen.defaultFetch = defaultFetch$1;
+
+const { defaultFetch } = Screen;
+const DefaultDOMParser = typeof DOMParser !== 'undefined'
+    ? DOMParser
+    : null;
+class Parser {
+    constructor({ fetch = defaultFetch, DOMParser = DefaultDOMParser } = {}) {
+        this.fetch = fetch;
+        this.DOMParser = DOMParser;
+    }
+    async parse(resource) {
+        if (resource.startsWith('<')) {
+            return this.parseFromString(resource);
+        }
+        return this.load(resource);
+    }
+    parseFromString(xml) {
+        const parser = new this.DOMParser();
+        try {
+            return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
+        }
+        catch (err) {
+            return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
+        }
+    }
+    checkDocument(document) {
+        const parserError = document.getElementsByTagName('parsererror')[0];
+        if (parserError) {
+            throw new Error(parserError.textContent);
+        }
+        return document;
+    }
+    async load(url) {
+        const response = await this.fetch(url);
+        const xml = await response.text();
+        return this.parseFromString(xml);
+    }
+}
+
+class Translate {
+    constructor(_, point) {
+        this.type = 'translate';
+        this.point = null;
+        this.point = Point.parse(point);
+    }
+    apply(ctx) {
+        const { x, y } = this.point;
+        ctx.translate(x || 0.0, y || 0.0);
+    }
+    unapply(ctx) {
+        const { x, y } = this.point;
+        ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
+    }
+    applyToPoint(point) {
+        const { x, y } = this.point;
+        point.applyTransform([
+            1,
+            0,
+            0,
+            1,
+            x || 0.0,
+            y || 0.0
+        ]);
+    }
+}
+
+class Rotate {
+    constructor(document, rotate, transformOrigin) {
+        this.type = 'rotate';
+        this.angle = null;
+        this.originX = null;
+        this.originY = null;
+        this.cx = 0;
+        this.cy = 0;
+        const numbers = toNumbers(rotate);
+        this.angle = new Property(document, 'angle', numbers[0]);
+        this.originX = transformOrigin[0];
+        this.originY = transformOrigin[1];
+        this.cx = numbers[1] || 0;
+        this.cy = numbers[2] || 0;
+    }
+    apply(ctx) {
+        const { cx, cy, originX, originY, angle } = this;
+        const tx = cx + originX.getPixels('x');
+        const ty = cy + originY.getPixels('y');
+        ctx.translate(tx, ty);
+        ctx.rotate(angle.getRadians());
+        ctx.translate(-tx, -ty);
+    }
+    unapply(ctx) {
+        const { cx, cy, originX, originY, angle } = this;
+        const tx = cx + originX.getPixels('x');
+        const ty = cy + originY.getPixels('y');
+        ctx.translate(tx, ty);
+        ctx.rotate(-1.0 * angle.getRadians());
+        ctx.translate(-tx, -ty);
+    }
+    applyToPoint(point) {
+        const { cx, cy, angle } = this;
+        const rad = angle.getRadians();
+        point.applyTransform([
+            1,
+            0,
+            0,
+            1,
+            cx || 0.0,
+            cy || 0.0 // this.p.y
+        ]);
+        point.applyTransform([
+            Math.cos(rad),
+            Math.sin(rad),
+            -Math.sin(rad),
+            Math.cos(rad),
+            0,
+            0
+        ]);
+        point.applyTransform([
+            1,
+            0,
+            0,
+            1,
+            -cx || 0.0,
+            -cy || 0.0 // -this.p.y
+        ]);
+    }
+}
+
+class Scale {
+    constructor(_, scale, transformOrigin) {
+        this.type = 'scale';
+        this.scale = null;
+        this.originX = null;
+        this.originY = null;
+        const scaleSize = Point.parseScale(scale);
+        // Workaround for node-canvas
+        if (scaleSize.x === 0
+            || scaleSize.y === 0) {
+            scaleSize.x = PSEUDO_ZERO;
+            scaleSize.y = PSEUDO_ZERO;
+        }
+        this.scale = scaleSize;
+        this.originX = transformOrigin[0];
+        this.originY = transformOrigin[1];
+    }
+    apply(ctx) {
+        const { scale: { x, y }, originX, originY } = this;
+        const tx = originX.getPixels('x');
+        const ty = originY.getPixels('y');
+        ctx.translate(tx, ty);
+        ctx.scale(x, y || x);
+        ctx.translate(-tx, -ty);
+    }
+    unapply(ctx) {
+        const { scale: { x, y }, originX, originY } = this;
+        const tx = originX.getPixels('x');
+        const ty = originY.getPixels('y');
+        ctx.translate(tx, ty);
+        ctx.scale(1.0 / x, 1.0 / y || x);
+        ctx.translate(-tx, -ty);
+    }
+    applyToPoint(point) {
+        const { x, y } = this.scale;
+        point.applyTransform([
+            x || 0.0,
+            0,
+            0,
+            y || 0.0,
+            0,
+            0
+        ]);
+    }
+}
+
+class Matrix {
+    constructor(_, matrix, transformOrigin) {
+        this.type = 'matrix';
+        this.matrix = [];
+        this.originX = null;
+        this.originY = null;
+        this.matrix = toNumbers(matrix);
+        this.originX = transformOrigin[0];
+        this.originY = transformOrigin[1];
+    }
+    apply(ctx) {
+        const { originX, originY, matrix } = this;
+        const tx = originX.getPixels('x');
+        const ty = originY.getPixels('y');
+        ctx.translate(tx, ty);
+        ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
+        ctx.translate(-tx, -ty);
+    }
+    unapply(ctx) {
+        const { originX, originY, matrix } = this;
+        const a = matrix[0];
+        const b = matrix[2];
+        const c = matrix[4];
+        const d = matrix[1];
+        const e = matrix[3];
+        const f = matrix[5];
+        const g = 0.0;
+        const h = 0.0;
+        const i = 1.0;
+        const det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
+        const tx = originX.getPixels('x');
+        const ty = originY.getPixels('y');
+        ctx.translate(tx, ty);
+        ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));
+        ctx.translate(-tx, -ty);
+    }
+    applyToPoint(point) {
+        point.applyTransform(this.matrix);
+    }
+}
+
+class Skew extends Matrix {
+    constructor(document, skew, transformOrigin) {
+        super(document, skew, transformOrigin);
+        this.type = 'skew';
+        this.angle = null;
+        this.angle = new Property(document, 'angle', skew);
+    }
+}
+
+class SkewX extends Skew {
+    constructor(document, skew, transformOrigin) {
+        super(document, skew, transformOrigin);
+        this.type = 'skewX';
+        this.matrix = [
+            1,
+            0,
+            Math.tan(this.angle.getRadians()),
+            1,
+            0,
+            0
+        ];
+    }
+}
+
+class SkewY extends Skew {
+    constructor(document, skew, transformOrigin) {
+        super(document, skew, transformOrigin);
+        this.type = 'skewY';
+        this.matrix = [
+            1,
+            Math.tan(this.angle.getRadians()),
+            0,
+            1,
+            0,
+            0
+        ];
+    }
+}
+
+function parseTransforms(transform) {
+    return compressSpaces(transform)
+        .trim()
+        .replace(/\)([a-zA-Z])/g, ') $1')
+        .replace(/\)(\s?,\s?)/g, ') ')
+        .split(/\s(?=[a-z])/);
+}
+function parseTransform(transform) {
+    const [type, value] = transform.split('(');
+    return [
+        type.trim(),
+        value.trim().replace(')', '')
+    ];
+}
+class Transform {
+    constructor(document, transform, transformOrigin) {
+        this.document = document;
+        this.transforms = [];
+        const data = parseTransforms(transform);
+        data.forEach((transform) => {
+            if (transform === 'none') {
+                return;
+            }
+            const [type, value] = parseTransform(transform);
+            const TransformType = Transform.transformTypes[type];
+            if (typeof TransformType !== 'undefined') {
+                this.transforms.push(new TransformType(this.document, value, transformOrigin));
+            }
+        });
+    }
+    static fromElement(document, element) {
+        const transformStyle = element.getStyle('transform', false, true);
+        const [transformOriginXProperty, transformOriginYProperty = transformOriginXProperty] = element.getStyle('transform-origin', false, true).split();
+        const transformOrigin = [
+            transformOriginXProperty,
+            transformOriginYProperty
+        ];
+        if (transformStyle.hasValue()) {
+            return new Transform(document, transformStyle.getString(), transformOrigin);
+        }
+        return null;
+    }
+    apply(ctx) {
+        const { transforms } = this;
+        const len = transforms.length;
+        for (let i = 0; i < len; i++) {
+            transforms[i].apply(ctx);
+        }
+    }
+    unapply(ctx) {
+        const { transforms } = this;
+        const len = transforms.length;
+        for (let i = len - 1; i >= 0; i--) {
+            transforms[i].unapply(ctx);
+        }
+    }
+    // TODO: applyToPoint unused ... remove?
+    applyToPoint(point) {
+        const { transforms } = this;
+        const len = transforms.length;
+        for (let i = 0; i < len; i++) {
+            transforms[i].applyToPoint(point);
+        }
+    }
+}
+Transform.transformTypes = {
+    translate: Translate,
+    rotate: Rotate,
+    scale: Scale,
+    matrix: Matrix,
+    skewX: SkewX,
+    skewY: SkewY
+};
+
+class Element {
+    constructor(document, node, captureTextNodes = false) {
+        this.document = document;
+        this.node = node;
+        this.captureTextNodes = captureTextNodes;
+        this.attributes = {};
+        this.styles = {};
+        this.stylesSpecificity = {};
+        this.animationFrozen = false;
+        this.animationFrozenValue = '';
+        this.parent = null;
+        this.children = [];
+        if (!node || node.nodeType !== 1) { // ELEMENT_NODE
+            return;
+        }
+        // add attributes
+        Array.from(node.attributes).forEach((attribute) => {
+            const nodeName = normalizeAttributeName(attribute.nodeName);
+            this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
+        });
+        this.addStylesFromStyleDefinition();
+        // add inline styles
+        if (this.getAttribute('style').hasValue()) {
+            const styles = this.getAttribute('style')
+                .getString()
+                .split(';')
+                .map(_ => _.trim());
+            styles.forEach((style) => {
+                if (!style) {
+                    return;
+                }
+                const [name, value] = style.split(':').map(_ => _.trim());
+                this.styles[name] = new Property(document, name, value);
+            });
+        }
+        const { definitions } = document;
+        const id = this.getAttribute('id');
+        // add id
+        if (id.hasValue()) {
+            if (!definitions[id.getString()]) {
+                definitions[id.getString()] = this;
+            }
+        }
+        Array.from(node.childNodes).forEach((childNode) => {
+            if (childNode.nodeType === 1) {
+                this.addChild(childNode); // ELEMENT_NODE
+            }
+            else if (captureTextNodes && (childNode.nodeType === 3
+                || childNode.nodeType === 4)) {
+                const textNode = document.createTextNode(childNode);
+                if (textNode.getText().length > 0) {
+                    this.addChild(textNode); // TEXT_NODE
+                }
+            }
+        });
+    }
+    getAttribute(name, createIfNotExists = false) {
+        const attr = this.attributes[name];
+        if (!attr && createIfNotExists) {
+            const attr = new Property(this.document, name, '');
+            this.attributes[name] = attr;
+            return attr;
+        }
+        return attr || Property.empty(this.document);
+    }
+    getHrefAttribute() {
+        for (const key in this.attributes) {
+            if (key === 'href' || key.endsWith(':href')) {
+                return this.attributes[key];
+            }
+        }
+        return Property.empty(this.document);
+    }
+    getStyle(name, createIfNotExists = false, skipAncestors = false) {
+        const style = this.styles[name];
+        if (style) {
+            return style;
+        }
+        const attr = this.getAttribute(name);
+        if (attr?.hasValue()) {
+            this.styles[name] = attr; // move up to me to cache
+            return attr;
+        }
+        if (!skipAncestors) {
+            const { parent } = this;
+            if (parent) {
+                const parentStyle = parent.getStyle(name);
+                if (parentStyle?.hasValue()) {
+                    return parentStyle;
+                }
+            }
+        }
+        if (createIfNotExists) {
+            const style = new Property(this.document, name, '');
+            this.styles[name] = style;
+            return style;
+        }
+        return style || Property.empty(this.document);
+    }
+    render(ctx) {
+        // don't render display=none
+        // don't render visibility=hidden
+        if (this.getStyle('display').getString() === 'none'
+            || this.getStyle('visibility').getString() === 'hidden') {
+            return;
+        }
+        ctx.save();
+        if (this.getStyle('mask').hasValue()) { // mask
+            const mask = this.getStyle('mask').getDefinition();
+            if (mask) {
+                this.applyEffects(ctx);
+                mask.apply(ctx, this);
+            }
+        }
+        else if (this.getStyle('filter').getValue('none') !== 'none') { // filter
+            const filter = this.getStyle('filter').getDefinition();
+            if (filter) {
+                this.applyEffects(ctx);
+                filter.apply(ctx, this);
+            }
+        }
+        else {
+            this.setContext(ctx);
+            this.renderChildren(ctx);
+            this.clearContext(ctx);
+        }
+        ctx.restore();
+    }
+    setContext(_) {
+        // NO RENDER
+    }
+    applyEffects(ctx) {
+        // transform
+        const transform = Transform.fromElement(this.document, this);
+        if (transform) {
+            transform.apply(ctx);
+        }
+        // clip
+        const clipPathStyleProp = this.getStyle('clip-path', false, true);
+        if (clipPathStyleProp.hasValue()) {
+            const clip = clipPathStyleProp.getDefinition();
+            if (clip) {
+                clip.apply(ctx);
+            }
+        }
+    }
+    clearContext(_) {
+        // NO RENDER
+    }
+    renderChildren(ctx) {
+        this.children.forEach((child) => {
+            child.render(ctx);
+        });
+    }
+    addChild(childNode) {
+        const child = childNode instanceof Element
+            ? childNode
+            : this.document.createElement(childNode);
+        child.parent = this;
+        if (!Element.ignoreChildTypes.includes(child.type)) {
+            this.children.push(child);
+        }
+    }
+    matchesSelector(selector) {
+        const { node } = this;
+        if (typeof node.matches === 'function') {
+            return node.matches(selector);
+        }
+        const styleClasses = node.getAttribute?.('class');
+        if (!styleClasses || styleClasses === '') {
+            return false;
+        }
+        return styleClasses.split(' ').some(styleClass => `.${styleClass}` === selector);
+    }
+    addStylesFromStyleDefinition() {
+        const { styles, stylesSpecificity } = this.document;
+        for (const selector in styles) {
+            if (!selector.startsWith('@') && this.matchesSelector(selector)) {
+                const style = styles[selector];
+                const specificity = stylesSpecificity[selector];
+                if (style) {
+                    for (const name in style) {
+                        let existingSpecificity = this.stylesSpecificity[name];
+                        if (typeof existingSpecificity === 'undefined') {
+                            existingSpecificity = '000';
+                        }
+                        if (specificity >= existingSpecificity) {
+                            this.styles[name] = style[name];
+                            this.stylesSpecificity[name] = specificity;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    removeStyles(element, ignoreStyles) {
+        const toRestore = ignoreStyles.reduce((toRestore, name) => {
+            const styleProp = element.getStyle(name);
+            if (!styleProp.hasValue()) {
+                return toRestore;
+            }
+            const value = styleProp.getString();
+            styleProp.setValue('');
+            return [
+                ...toRestore,
+                [name, value]
+            ];
+        }, []);
+        return toRestore;
+    }
+    restoreStyles(element, styles) {
+        styles.forEach(([name, value]) => {
+            element.getStyle(name, true).setValue(value);
+        });
+    }
+    isFirstChild() {
+        return this.parent?.children.indexOf(this) === 0;
+    }
+}
+Element.ignoreChildTypes = [
+    'title'
+];
+
+class UnknownElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+    }
+}
+
+function wrapFontFamily(fontFamily) {
+    const trimmed = fontFamily.trim();
+    return /^('|")/.test(trimmed)
+        ? trimmed
+        : `"${trimmed}"`;
+}
+function prepareFontFamily(fontFamily) {
+    return typeof process === 'undefined'
+        ? fontFamily
+        : fontFamily
+            .trim()
+            .split(',')
+            .map(wrapFontFamily)
+            .join(',');
+}
+/**
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
+ * @param fontStyle
+ * @returns CSS font style.
+ */
+function prepareFontStyle(fontStyle) {
+    if (!fontStyle) {
+        return '';
+    }
+    const targetFontStyle = fontStyle.trim().toLowerCase();
+    switch (targetFontStyle) {
+        case 'normal':
+        case 'italic':
+        case 'oblique':
+        case 'inherit':
+        case 'initial':
+        case 'unset':
+            return targetFontStyle;
+        default:
+            if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
+                return targetFontStyle;
+            }
+            return '';
+    }
+}
+/**
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
+ * @param fontWeight
+ * @returns CSS font weight.
+ */
+function prepareFontWeight(fontWeight) {
+    if (!fontWeight) {
+        return '';
+    }
+    const targetFontWeight = fontWeight.trim().toLowerCase();
+    switch (targetFontWeight) {
+        case 'normal':
+        case 'bold':
+        case 'lighter':
+        case 'bolder':
+        case 'inherit':
+        case 'initial':
+        case 'unset':
+            return targetFontWeight;
+        default:
+            if (/^[\d.]+$/.test(targetFontWeight)) {
+                return targetFontWeight;
+            }
+            return '';
+    }
+}
+class Font {
+    constructor(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
+        const inheritFont = inherit
+            ? typeof inherit === 'string'
+                ? Font.parse(inherit)
+                : inherit
+            : {};
+        this.fontFamily = fontFamily || inheritFont.fontFamily;
+        this.fontSize = fontSize || inheritFont.fontSize;
+        this.fontStyle = fontStyle || inheritFont.fontStyle;
+        this.fontWeight = fontWeight || inheritFont.fontWeight;
+        this.fontVariant = fontVariant || inheritFont.fontVariant;
+    }
+    static parse(font = '', inherit) {
+        let fontStyle = '';
+        let fontVariant = '';
+        let fontWeight = '';
+        let fontSize = '';
+        let fontFamily = '';
+        const parts = compressSpaces(font).trim().split(' ');
+        const set = {
+            fontSize: false,
+            fontStyle: false,
+            fontWeight: false,
+            fontVariant: false
+        };
+        parts.forEach((part) => {
+            switch (true) {
+                case !set.fontStyle && Font.styles.includes(part):
+                    if (part !== 'inherit') {
+                        fontStyle = part;
+                    }
+                    set.fontStyle = true;
+                    break;
+                case !set.fontVariant && Font.variants.includes(part):
+                    if (part !== 'inherit') {
+                        fontVariant = part;
+                    }
+                    set.fontStyle = true;
+                    set.fontVariant = true;
+                    break;
+                case !set.fontWeight && Font.weights.includes(part):
+                    if (part !== 'inherit') {
+                        fontWeight = part;
+                    }
+                    set.fontStyle = true;
+                    set.fontVariant = true;
+                    set.fontWeight = true;
+                    break;
+                case !set.fontSize:
+                    if (part !== 'inherit') {
+                        [fontSize] = part.split('/');
+                    }
+                    set.fontStyle = true;
+                    set.fontVariant = true;
+                    set.fontWeight = true;
+                    set.fontSize = true;
+                    break;
+                default:
+                    if (part !== 'inherit') {
+                        fontFamily += part;
+                    }
+            }
+        });
+        return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
+    }
+    toString() {
+        return [
+            prepareFontStyle(this.fontStyle),
+            this.fontVariant,
+            prepareFontWeight(this.fontWeight),
+            this.fontSize,
+            // Wrap fontFamily only on nodejs and only for canvas.ctx
+            prepareFontFamily(this.fontFamily)
+        ].join(' ').trim();
+    }
+}
+Font.styles = 'normal|italic|oblique|inherit';
+Font.variants = 'normal|small-caps|inherit';
+Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
+
+class BoundingBox {
+    constructor(x1 = Number.NaN, y1 = Number.NaN, x2 = Number.NaN, y2 = Number.NaN) {
+        this.x1 = x1;
+        this.y1 = y1;
+        this.x2 = x2;
+        this.y2 = y2;
+        this.addPoint(x1, y1);
+        this.addPoint(x2, y2);
+    }
+    get x() {
+        return this.x1;
+    }
+    get y() {
+        return this.y1;
+    }
+    get width() {
+        return this.x2 - this.x1;
+    }
+    get height() {
+        return this.y2 - this.y1;
+    }
+    addPoint(x, y) {
+        if (typeof x !== 'undefined') {
+            if (isNaN(this.x1) || isNaN(this.x2)) {
+                this.x1 = x;
+                this.x2 = x;
+            }
+            if (x < this.x1) {
+                this.x1 = x;
+            }
+            if (x > this.x2) {
+                this.x2 = x;
+            }
+        }
+        if (typeof y !== 'undefined') {
+            if (isNaN(this.y1) || isNaN(this.y2)) {
+                this.y1 = y;
+                this.y2 = y;
+            }
+            if (y < this.y1) {
+                this.y1 = y;
+            }
+            if (y > this.y2) {
+                this.y2 = y;
+            }
+        }
+    }
+    addX(x) {
+        this.addPoint(x, null);
+    }
+    addY(y) {
+        this.addPoint(null, y);
+    }
+    addBoundingBox(boundingBox) {
+        if (!boundingBox) {
+            return;
+        }
+        const { x1, y1, x2, y2 } = boundingBox;
+        this.addPoint(x1, y1);
+        this.addPoint(x2, y2);
+    }
+    sumCubic(t, p0, p1, p2, p3) {
+        return (Math.pow(1 - t, 3) * p0
+            + 3 * Math.pow(1 - t, 2) * t * p1
+            + 3 * (1 - t) * Math.pow(t, 2) * p2
+            + Math.pow(t, 3) * p3);
+    }
+    bezierCurveAdd(forX, p0, p1, p2, p3) {
+        const b = 6 * p0 - 12 * p1 + 6 * p2;
+        const a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
+        const c = 3 * p1 - 3 * p0;
+        if (a === 0) {
+            if (b === 0) {
+                return;
+            }
+            const t = -c / b;
+            if (0 < t && t < 1) {
+                if (forX) {
+                    this.addX(this.sumCubic(t, p0, p1, p2, p3));
+                }
+                else {
+                    this.addY(this.sumCubic(t, p0, p1, p2, p3));
+                }
+            }
+            return;
+        }
+        const b2ac = Math.pow(b, 2) - 4 * c * a;
+        if (b2ac < 0) {
+            return;
+        }
+        const t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
+        if (0 < t1 && t1 < 1) {
+            if (forX) {
+                this.addX(this.sumCubic(t1, p0, p1, p2, p3));
+            }
+            else {
+                this.addY(this.sumCubic(t1, p0, p1, p2, p3));
+            }
+        }
+        const t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
+        if (0 < t2 && t2 < 1) {
+            if (forX) {
+                this.addX(this.sumCubic(t2, p0, p1, p2, p3));
+            }
+            else {
+                this.addY(this.sumCubic(t2, p0, p1, p2, p3));
+            }
+        }
+    }
+    // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
+    addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
+        this.addPoint(p0x, p0y);
+        this.addPoint(p3x, p3y);
+        this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
+        this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
+    }
+    addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
+        const cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
+        const cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
+        const cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
+        const cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
+        this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
+    }
+    isPointInBox(x, y) {
+        const { x1, y1, x2, y2 } = this;
+        return (x1 <= x
+            && x <= x2
+            && y1 <= y
+            && y <= y2);
+    }
+}
+
+class PathParser extends SVGPathData {
+    constructor(path) {
+        super(path
+            // Fix spaces after signs.
+            .replace(/([+\-.])\s+/gm, '$1')
+            // Remove invalid part.
+            .replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g, ''));
+        this.control = null;
+        this.start = null;
+        this.current = null;
+        this.command = null;
+        this.commands = this.commands;
+        this.i = -1;
+        this.previousCommand = null;
+        this.points = [];
+        this.angles = [];
+    }
+    reset() {
+        this.i = -1;
+        this.command = null;
+        this.previousCommand = null;
+        this.start = new Point(0, 0);
+        this.control = new Point(0, 0);
+        this.current = new Point(0, 0);
+        this.points = [];
+        this.angles = [];
+    }
+    isEnd() {
+        const { i, commands } = this;
+        return i >= commands.length - 1;
+    }
+    next() {
+        const command = this.commands[++this.i];
+        this.previousCommand = this.command;
+        this.command = command;
+        return command;
+    }
+    getPoint(xProp = 'x', yProp = 'y') {
+        const point = new Point(this.command[xProp], this.command[yProp]);
+        return this.makeAbsolute(point);
+    }
+    getAsControlPoint(xProp, yProp) {
+        const point = this.getPoint(xProp, yProp);
+        this.control = point;
+        return point;
+    }
+    getAsCurrentPoint(xProp, yProp) {
+        const point = this.getPoint(xProp, yProp);
+        this.current = point;
+        return point;
+    }
+    getReflectedControlPoint() {
+        const previousCommand = this.previousCommand.type;
+        if (previousCommand !== SVGPathData.CURVE_TO
+            && previousCommand !== SVGPathData.SMOOTH_CURVE_TO
+            && previousCommand !== SVGPathData.QUAD_TO
+            && previousCommand !== SVGPathData.SMOOTH_QUAD_TO) {
+            return this.current;
+        }
+        // reflect point
+        const { current: { x: cx, y: cy }, control: { x: ox, y: oy } } = this;
+        const point = new Point(2 * cx - ox, 2 * cy - oy);
+        return point;
+    }
+    makeAbsolute(point) {
+        if (this.command.relative) {
+            const { x, y } = this.current;
+            point.x += x;
+            point.y += y;
+        }
+        return point;
+    }
+    addMarker(point, from, priorTo) {
+        const { points, angles } = this;
+        // if the last angle isn't filled in because we didn't have this point yet ...
+        if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
+            angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
+        }
+        this.addMarkerAngle(point, from ? from.angleTo(point) : null);
+    }
+    addMarkerAngle(point, angle) {
+        this.points.push(point);
+        this.angles.push(angle);
+    }
+    getMarkerPoints() {
+        return this.points;
+    }
+    getMarkerAngles() {
+        const { angles } = this;
+        const len = angles.length;
+        for (let i = 0; i < len; i++) {
+            if (!angles[i]) {
+                for (let j = i + 1; j < len; j++) {
+                    if (angles[j]) {
+                        angles[i] = angles[j];
+                        break;
+                    }
+                }
+            }
+        }
+        return angles;
+    }
+}
+
+class RenderedElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.modifiedEmSizeStack = false;
+    }
+    calculateOpacity() {
+        let opacity = 1.0;
+        // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
+        let element = this;
+        while (element) {
+            const opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
+            if (opacityStyle.hasValue(true)) {
+                opacity *= opacityStyle.getNumber();
+            }
+            element = element.parent;
+        }
+        return opacity;
+    }
+    setContext(ctx, fromMeasure = false) {
+        if (!fromMeasure) { // causes stack overflow when measuring text with gradients
+            // fill
+            const fillStyleProp = this.getStyle('fill');
+            const fillOpacityStyleProp = this.getStyle('fill-opacity');
+            const strokeStyleProp = this.getStyle('stroke');
+            const strokeOpacityProp = this.getStyle('stroke-opacity');
+            if (fillStyleProp.isUrlDefinition()) {
+                const fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
+                if (fillStyle) {
+                    ctx.fillStyle = fillStyle;
+                }
+            }
+            else if (fillStyleProp.hasValue()) {
+                if (fillStyleProp.getString() === 'currentColor') {
+                    fillStyleProp.setValue(this.getStyle('color').getColor());
+                }
+                const fillStyle = fillStyleProp.getColor();
+                if (fillStyle !== 'inherit') {
+                    ctx.fillStyle = fillStyle === 'none'
+                        ? 'rgba(0,0,0,0)'
+                        : fillStyle;
+                }
+            }
+            if (fillOpacityStyleProp.hasValue()) {
+                const fillStyle = new Property(this.document, 'fill', ctx.fillStyle)
+                    .addOpacity(fillOpacityStyleProp)
+                    .getColor();
+                ctx.fillStyle = fillStyle;
+            }
+            // stroke
+            if (strokeStyleProp.isUrlDefinition()) {
+                const strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
+                if (strokeStyle) {
+                    ctx.strokeStyle = strokeStyle;
+                }
+            }
+            else if (strokeStyleProp.hasValue()) {
+                if (strokeStyleProp.getString() === 'currentColor') {
+                    strokeStyleProp.setValue(this.getStyle('color').getColor());
+                }
+                const strokeStyle = strokeStyleProp.getString();
+                if (strokeStyle !== 'inherit') {
+                    ctx.strokeStyle = strokeStyle === 'none'
+                        ? 'rgba(0,0,0,0)'
+                        : strokeStyle;
+                }
+            }
+            if (strokeOpacityProp.hasValue()) {
+                const strokeStyle = new Property(this.document, 'stroke', ctx.strokeStyle)
+                    .addOpacity(strokeOpacityProp)
+                    .getString();
+                ctx.strokeStyle = strokeStyle;
+            }
+            const strokeWidthStyleProp = this.getStyle('stroke-width');
+            if (strokeWidthStyleProp.hasValue()) {
+                const newLineWidth = strokeWidthStyleProp.getPixels();
+                ctx.lineWidth = !newLineWidth
+                    ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
+                    : newLineWidth;
+            }
+            const strokeLinecapStyleProp = this.getStyle('stroke-linecap');
+            const strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
+            const strokeMiterlimitProp = this.getStyle('stroke-miterlimit');
+            // NEED TEST
+            // const pointOrderStyleProp = this.getStyle('paint-order');
+            const strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
+            const strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
+            if (strokeLinecapStyleProp.hasValue()) {
+                ctx.lineCap = strokeLinecapStyleProp.getString();
+            }
+            if (strokeLinejoinStyleProp.hasValue()) {
+                ctx.lineJoin = strokeLinejoinStyleProp.getString();
+            }
+            if (strokeMiterlimitProp.hasValue()) {
+                ctx.miterLimit = strokeMiterlimitProp.getNumber();
+            }
+            // NEED TEST
+            // if (pointOrderStyleProp.hasValue()) {
+            // 	// ?
+            // 	ctx.paintOrder = pointOrderStyleProp.getValue();
+            // }
+            if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
+                const gaps = toNumbers(strokeDasharrayStyleProp.getString());
+                if (typeof ctx.setLineDash !== 'undefined') {
+                    ctx.setLineDash(gaps);
+                }
+                else 
+                // @ts-expect-error Handle browser prefix.
+                if (typeof ctx.webkitLineDash !== 'undefined') {
+                    // @ts-expect-error Handle browser prefix.
+                    ctx.webkitLineDash = gaps;
+                }
+                else 
+                // @ts-expect-error Handle browser prefix.
+                if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
+                    // @ts-expect-error Handle browser prefix.
+                    ctx.mozDash = gaps;
+                }
+                const offset = strokeDashoffsetProp.getPixels();
+                if (typeof ctx.lineDashOffset !== 'undefined') {
+                    ctx.lineDashOffset = offset;
+                }
+                else 
+                // @ts-expect-error Handle browser prefix.
+                if (typeof ctx.webkitLineDashOffset !== 'undefined') {
+                    // @ts-expect-error Handle browser prefix.
+                    ctx.webkitLineDashOffset = offset;
+                }
+                else 
+                // @ts-expect-error Handle browser prefix.
+                if (typeof ctx.mozDashOffset !== 'undefined') {
+                    // @ts-expect-error Handle browser prefix.
+                    ctx.mozDashOffset = offset;
+                }
+            }
+        }
+        // font
+        this.modifiedEmSizeStack = false;
+        if (typeof ctx.font !== 'undefined') {
+            const fontStyleProp = this.getStyle('font');
+            const fontStyleStyleProp = this.getStyle('font-style');
+            const fontVariantStyleProp = this.getStyle('font-variant');
+            const fontWeightStyleProp = this.getStyle('font-weight');
+            const fontSizeStyleProp = this.getStyle('font-size');
+            const fontFamilyStyleProp = this.getStyle('font-family');
+            const font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue()
+                ? `${fontSizeStyleProp.getPixels(true)}px`
+                : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));
+            fontStyleStyleProp.setValue(font.fontStyle);
+            fontVariantStyleProp.setValue(font.fontVariant);
+            fontWeightStyleProp.setValue(font.fontWeight);
+            fontSizeStyleProp.setValue(font.fontSize);
+            fontFamilyStyleProp.setValue(font.fontFamily);
+            ctx.font = font.toString();
+            if (fontSizeStyleProp.isPixels()) {
+                this.document.emSize = fontSizeStyleProp.getPixels();
+                this.modifiedEmSizeStack = true;
+            }
+        }
+        if (!fromMeasure) {
+            // effects
+            this.applyEffects(ctx);
+            // opacity
+            ctx.globalAlpha = this.calculateOpacity();
+        }
+    }
+    clearContext(ctx) {
+        super.clearContext(ctx);
+        if (this.modifiedEmSizeStack) {
+            this.document.popEmSize();
+        }
+    }
+}
+
+class PathElement extends RenderedElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'path';
+        this.pathParser = null;
+        this.pathParser = new PathParser(this.getAttribute('d').getString());
+    }
+    path(ctx) {
+        const { pathParser } = this;
+        const boundingBox = new BoundingBox();
+        pathParser.reset();
+        if (ctx) {
+            ctx.beginPath();
+        }
+        while (!pathParser.isEnd()) {
+            switch (pathParser.next().type) {
+                case PathParser.MOVE_TO:
+                    this.pathM(ctx, boundingBox);
+                    break;
+                case PathParser.LINE_TO:
+                    this.pathL(ctx, boundingBox);
+                    break;
+                case PathParser.HORIZ_LINE_TO:
+                    this.pathH(ctx, boundingBox);
+                    break;
+                case PathParser.VERT_LINE_TO:
+                    this.pathV(ctx, boundingBox);
+                    break;
+                case PathParser.CURVE_TO:
+                    this.pathC(ctx, boundingBox);
+                    break;
+                case PathParser.SMOOTH_CURVE_TO:
+                    this.pathS(ctx, boundingBox);
+                    break;
+                case PathParser.QUAD_TO:
+                    this.pathQ(ctx, boundingBox);
+                    break;
+                case PathParser.SMOOTH_QUAD_TO:
+                    this.pathT(ctx, boundingBox);
+                    break;
+                case PathParser.ARC:
+                    this.pathA(ctx, boundingBox);
+                    break;
+                case PathParser.CLOSE_PATH:
+                    this.pathZ(ctx, boundingBox);
+                    break;
+            }
+        }
+        return boundingBox;
+    }
+    getBoundingBox(_) {
+        return this.path();
+    }
+    getMarkers() {
+        const { pathParser } = this;
+        const points = pathParser.getMarkerPoints();
+        const angles = pathParser.getMarkerAngles();
+        const markers = points.map((point, i) => [
+            point,
+            angles[i]
+        ]);
+        return markers;
+    }
+    renderChildren(ctx) {
+        this.path(ctx);
+        this.document.screen.mouse.checkPath(this, ctx);
+        const fillRuleStyleProp = this.getStyle('fill-rule');
+        if (ctx.fillStyle !== '') {
+            if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
+                ctx.fill(fillRuleStyleProp.getString());
+            }
+            else {
+                ctx.fill();
+            }
+        }
+        if (ctx.strokeStyle !== '') {
+            if (this.getAttribute('vector-effect').getString() === 'non-scaling-stroke') {
+                ctx.save();
+                ctx.setTransform(1, 0, 0, 1, 0, 0);
+                ctx.stroke();
+                ctx.restore();
+            }
+            else {
+                ctx.stroke();
+            }
+        }
+        const markers = this.getMarkers();
+        if (markers) {
+            const markersLastIndex = markers.length - 1;
+            const markerStartStyleProp = this.getStyle('marker-start');
+            const markerMidStyleProp = this.getStyle('marker-mid');
+            const markerEndStyleProp = this.getStyle('marker-end');
+            if (markerStartStyleProp.isUrlDefinition()) {
+                const marker = markerStartStyleProp.getDefinition();
+                const [point, angle] = markers[0];
+                marker.render(ctx, point, angle);
+            }
+            if (markerMidStyleProp.isUrlDefinition()) {
+                const marker = markerMidStyleProp.getDefinition();
+                for (let i = 1; i < markersLastIndex; i++) {
+                    const [point, angle] = markers[i];
+                    marker.render(ctx, point, angle);
+                }
+            }
+            if (markerEndStyleProp.isUrlDefinition()) {
+                const marker = markerEndStyleProp.getDefinition();
+                const [point, angle] = markers[markersLastIndex];
+                marker.render(ctx, point, angle);
+            }
+        }
+    }
+    static pathM(pathParser) {
+        const point = pathParser.getAsCurrentPoint();
+        pathParser.start = pathParser.current;
+        return {
+            point
+        };
+    }
+    pathM(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { point } = PathElement.pathM(pathParser);
+        const { x, y } = point;
+        pathParser.addMarker(point);
+        boundingBox.addPoint(x, y);
+        if (ctx) {
+            ctx.moveTo(x, y);
+        }
+    }
+    static pathL(pathParser) {
+        const { current } = pathParser;
+        const point = pathParser.getAsCurrentPoint();
+        return {
+            current,
+            point
+        };
+    }
+    pathL(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { current, point } = PathElement.pathL(pathParser);
+        const { x, y } = point;
+        pathParser.addMarker(point, current);
+        boundingBox.addPoint(x, y);
+        if (ctx) {
+            ctx.lineTo(x, y);
+        }
+    }
+    static pathH(pathParser) {
+        const { current, command } = pathParser;
+        const point = new Point((command.relative ? current.x : 0) + command.x, current.y);
+        pathParser.current = point;
+        return {
+            current,
+            point
+        };
+    }
+    pathH(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { current, point } = PathElement.pathH(pathParser);
+        const { x, y } = point;
+        pathParser.addMarker(point, current);
+        boundingBox.addPoint(x, y);
+        if (ctx) {
+            ctx.lineTo(x, y);
+        }
+    }
+    static pathV(pathParser) {
+        const { current, command } = pathParser;
+        const point = new Point(current.x, (command.relative ? current.y : 0) + command.y);
+        pathParser.current = point;
+        return {
+            current,
+            point
+        };
+    }
+    pathV(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { current, point } = PathElement.pathV(pathParser);
+        const { x, y } = point;
+        pathParser.addMarker(point, current);
+        boundingBox.addPoint(x, y);
+        if (ctx) {
+            ctx.lineTo(x, y);
+        }
+    }
+    static pathC(pathParser) {
+        const { current } = pathParser;
+        const point = pathParser.getPoint('x1', 'y1');
+        const controlPoint = pathParser.getAsControlPoint('x2', 'y2');
+        const currentPoint = pathParser.getAsCurrentPoint();
+        return {
+            current,
+            point,
+            controlPoint,
+            currentPoint
+        };
+    }
+    pathC(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { current, point, controlPoint, currentPoint } = PathElement.pathC(pathParser);
+        pathParser.addMarker(currentPoint, controlPoint, point);
+        boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        if (ctx) {
+            ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        }
+    }
+    static pathS(pathParser) {
+        const { current } = pathParser;
+        const point = pathParser.getReflectedControlPoint();
+        const controlPoint = pathParser.getAsControlPoint('x2', 'y2');
+        const currentPoint = pathParser.getAsCurrentPoint();
+        return {
+            current,
+            point,
+            controlPoint,
+            currentPoint
+        };
+    }
+    pathS(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { current, point, controlPoint, currentPoint } = PathElement.pathS(pathParser);
+        pathParser.addMarker(currentPoint, controlPoint, point);
+        boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        if (ctx) {
+            ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        }
+    }
+    static pathQ(pathParser) {
+        const { current } = pathParser;
+        const controlPoint = pathParser.getAsControlPoint('x1', 'y1');
+        const currentPoint = pathParser.getAsCurrentPoint();
+        return {
+            current,
+            controlPoint,
+            currentPoint
+        };
+    }
+    pathQ(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { current, controlPoint, currentPoint } = PathElement.pathQ(pathParser);
+        pathParser.addMarker(currentPoint, controlPoint, controlPoint);
+        boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        if (ctx) {
+            ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        }
+    }
+    static pathT(pathParser) {
+        const { current } = pathParser;
+        const controlPoint = pathParser.getReflectedControlPoint();
+        pathParser.control = controlPoint;
+        const currentPoint = pathParser.getAsCurrentPoint();
+        return {
+            current,
+            controlPoint,
+            currentPoint
+        };
+    }
+    pathT(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { current, controlPoint, currentPoint } = PathElement.pathT(pathParser);
+        pathParser.addMarker(currentPoint, controlPoint, controlPoint);
+        boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        if (ctx) {
+            ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        }
+    }
+    static pathA(pathParser) {
+        const { current, command } = pathParser;
+        let { rX, rY, xRot, lArcFlag, sweepFlag } = command;
+        const xAxisRotation = xRot * (Math.PI / 180.0);
+        const currentPoint = pathParser.getAsCurrentPoint();
+        // Conversion from endpoint to center parameterization
+        // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
+        // x1', y1'
+        const currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0
+            + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0
+            + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0);
+        // adjust radii
+        const l = Math.pow(currp.x, 2) / Math.pow(rX, 2)
+            + Math.pow(currp.y, 2) / Math.pow(rY, 2);
+        if (l > 1) {
+            rX *= Math.sqrt(l);
+            rY *= Math.sqrt(l);
+        }
+        // cx', cy'
+        let s = (lArcFlag === sweepFlag ? -1 : 1) * Math.sqrt(((Math.pow(rX, 2) * Math.pow(rY, 2))
+            - (Math.pow(rX, 2) * Math.pow(currp.y, 2))
+            - (Math.pow(rY, 2) * Math.pow(currp.x, 2))) / (Math.pow(rX, 2) * Math.pow(currp.y, 2)
+            + Math.pow(rY, 2) * Math.pow(currp.x, 2)));
+        if (isNaN(s)) {
+            s = 0;
+        }
+        const cpp = new Point(s * rX * currp.y / rY, s * -rY * currp.x / rX);
+        // cx, cy
+        const centp = new Point((current.x + currentPoint.x) / 2.0
+            + Math.cos(xAxisRotation) * cpp.x
+            - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0
+            + Math.sin(xAxisRotation) * cpp.x
+            + Math.cos(xAxisRotation) * cpp.y);
+        // initial angle
+        const a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rX, (currp.y - cpp.y) / rY]); // θ1
+        // angle delta
+        const u = [(currp.x - cpp.x) / rX, (currp.y - cpp.y) / rY];
+        const v = [(-currp.x - cpp.x) / rX, (-currp.y - cpp.y) / rY];
+        let ad = vectorsAngle(u, v); // Δθ
+        if (vectorsRatio(u, v) <= -1) {
+            ad = Math.PI;
+        }
+        if (vectorsRatio(u, v) >= 1) {
+            ad = 0;
+        }
+        return {
+            currentPoint,
+            rX,
+            rY,
+            sweepFlag,
+            xAxisRotation,
+            centp,
+            a1,
+            ad
+        };
+    }
+    pathA(ctx, boundingBox) {
+        const { pathParser } = this;
+        const { currentPoint, rX, rY, sweepFlag, xAxisRotation, centp, a1, ad } = PathElement.pathA(pathParser);
+        // for markers
+        const dir = 1 - sweepFlag ? 1.0 : -1.0;
+        const ah = a1 + dir * (ad / 2.0);
+        const halfWay = new Point(centp.x + rX * Math.cos(ah), centp.y + rY * Math.sin(ah));
+        pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
+        pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
+        boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
+        if (ctx && !isNaN(a1) && !isNaN(ad)) {
+            const r = rX > rY ? rX : rY;
+            const sx = rX > rY ? 1 : rX / rY;
+            const sy = rX > rY ? rY / rX : 1;
+            ctx.translate(centp.x, centp.y);
+            ctx.rotate(xAxisRotation);
+            ctx.scale(sx, sy);
+            ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
+            ctx.scale(1 / sx, 1 / sy);
+            ctx.rotate(-xAxisRotation);
+            ctx.translate(-centp.x, -centp.y);
+        }
+    }
+    static pathZ(pathParser) {
+        pathParser.current = pathParser.start;
+    }
+    pathZ(ctx, boundingBox) {
+        PathElement.pathZ(this.pathParser);
+        if (ctx) {
+            // only close path if it is not a straight line
+            if (boundingBox.x1 !== boundingBox.x2
+                && boundingBox.y1 !== boundingBox.y2) {
+                ctx.closePath();
+            }
+        }
+    }
+}
+
+class GlyphElement extends PathElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'glyph';
+        this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();
+        this.unicode = this.getAttribute('unicode').getString();
+        this.arabicForm = this.getAttribute('arabic-form').getString();
+    }
+}
+
+class TextElement extends RenderedElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, new.target === TextElement
+            ? true
+            : captureTextNodes);
+        this.type = 'text';
+        this.x = 0;
+        this.y = 0;
+        this.measureCache = -1;
+    }
+    setContext(ctx, fromMeasure = false) {
+        super.setContext(ctx, fromMeasure);
+        const textBaseline = this.getStyle('dominant-baseline').getTextBaseline()
+            || this.getStyle('alignment-baseline').getTextBaseline();
+        if (textBaseline) {
+            ctx.textBaseline = textBaseline;
+        }
+    }
+    initializeCoordinates() {
+        this.x = 0;
+        this.y = 0;
+        this.leafTexts = [];
+        this.textChunkStart = 0;
+        this.minX = Number.POSITIVE_INFINITY;
+        this.maxX = Number.NEGATIVE_INFINITY;
+    }
+    getBoundingBox(ctx) {
+        if (this.type !== 'text') {
+            return this.getTElementBoundingBox(ctx);
+        }
+        // first, calculate child positions
+        this.initializeCoordinates();
+        this.adjustChildCoordinatesRecursive(ctx);
+        let boundingBox = null;
+        // then calculate bounding box
+        this.children.forEach((_, i) => {
+            const childBoundingBox = this.getChildBoundingBox(ctx, this, this, i);
+            if (!boundingBox) {
+                boundingBox = childBoundingBox;
+            }
+            else {
+                boundingBox.addBoundingBox(childBoundingBox);
+            }
+        });
+        return boundingBox;
+    }
+    getFontSize() {
+        const { document, parent } = this;
+        const inheritFontSize = Font.parse(document.ctx.font).fontSize;
+        const fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
+        return fontSize;
+    }
+    getTElementBoundingBox(ctx) {
+        const fontSize = this.getFontSize();
+        return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
+    }
+    getGlyph(font, text, i) {
+        const char = text[i];
+        let glyph = null;
+        if (font.isArabic) {
+            const len = text.length;
+            const prevChar = text[i - 1];
+            const nextChar = text[i + 1];
+            let arabicForm = 'isolated';
+            if ((i === 0 || prevChar === ' ') && i < len - 1 && nextChar !== ' ') {
+                arabicForm = 'terminal';
+            }
+            if (i > 0 && prevChar !== ' ' && i < len - 1 && nextChar !== ' ') {
+                arabicForm = 'medial';
+            }
+            if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
+                arabicForm = 'initial';
+            }
+            if (typeof font.glyphs[char] !== 'undefined') {
+                // NEED TEST
+                const maybeGlyph = font.glyphs[char];
+                glyph = maybeGlyph instanceof GlyphElement
+                    ? maybeGlyph
+                    : maybeGlyph[arabicForm];
+            }
+        }
+        else {
+            glyph = font.glyphs[char];
+        }
+        if (!glyph) {
+            glyph = font.missingGlyph;
+        }
+        return glyph;
+    }
+    getText() {
+        return '';
+    }
+    getTextFromNode(node) {
+        const textNode = node || this.node;
+        const childNodes = Array.from(textNode.parentNode.childNodes);
+        const index = childNodes.indexOf(textNode);
+        const lastIndex = childNodes.length - 1;
+        let text = compressSpaces(
+        // textNode.value
+        // || textNode.text
+        textNode.textContent
+            || '');
+        if (index === 0) {
+            text = trimLeft(text);
+        }
+        if (index === lastIndex) {
+            text = trimRight(text);
+        }
+        return text;
+    }
+    renderChildren(ctx) {
+        if (this.type !== 'text') {
+            this.renderTElementChildren(ctx);
+            return;
+        }
+        // first, calculate child positions
+        this.initializeCoordinates();
+        this.adjustChildCoordinatesRecursive(ctx);
+        // then render
+        this.children.forEach((_, i) => {
+            this.renderChild(ctx, this, this, i);
+        });
+        const { mouse } = this.document.screen;
+        // Do not calc bounding box if mouse is not working.
+        if (mouse.isWorking()) {
+            mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
+        }
+    }
+    renderTElementChildren(ctx) {
+        const { document, parent } = this;
+        const renderText = this.getText();
+        const customFont = parent.getStyle('font-family').getDefinition();
+        if (customFont) {
+            const { unitsPerEm } = customFont.fontFace;
+            const ctxFont = Font.parse(document.ctx.font);
+            const fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
+            const fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
+            const scale = fontSize / unitsPerEm;
+            const text = customFont.isRTL
+                ? renderText.split('').reverse().join('')
+                : renderText;
+            const dx = toNumbers(parent.getAttribute('dx').getString());
+            const len = text.length;
+            for (let i = 0; i < len; i++) {
+                const glyph = this.getGlyph(customFont, text, i);
+                ctx.translate(this.x, this.y);
+                ctx.scale(scale, -scale);
+                const lw = ctx.lineWidth;
+                ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
+                if (fontStyle === 'italic') {
+                    ctx.transform(1, 0, .4, 1, 0, 0);
+                }
+                glyph.render(ctx);
+                if (fontStyle === 'italic') {
+                    ctx.transform(1, 0, -.4, 1, 0, 0);
+                }
+                ctx.lineWidth = lw;
+                ctx.scale(1 / scale, -1 / scale);
+                ctx.translate(-this.x, -this.y);
+                this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
+                if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
+                    this.x += dx[i];
+                }
+            }
+            return;
+        }
+        const { x, y } = this;
+        // NEED TEST
+        // if (ctx.paintOrder === 'stroke') {
+        // 	if (ctx.strokeStyle) {
+        // 		ctx.strokeText(renderText, x, y);
+        // 	}
+        // 	if (ctx.fillStyle) {
+        // 		ctx.fillText(renderText, x, y);
+        // 	}
+        // } else {
+        if (ctx.fillStyle) {
+            ctx.fillText(renderText, x, y);
+        }
+        if (ctx.strokeStyle) {
+            ctx.strokeText(renderText, x, y);
+        }
+        // }
+    }
+    applyAnchoring() {
+        if (this.textChunkStart >= this.leafTexts.length) {
+            return;
+        }
+        // This is basically the "Apply anchoring" part of https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithm.
+        // The difference is that we apply the anchoring as soon as a chunk is finished. This saves some extra looping.
+        // Vertical text is not supported.
+        const firstElement = this.leafTexts[this.textChunkStart];
+        const textAnchor = firstElement.getStyle('text-anchor').getString('start');
+        const isRTL = false; // we treat RTL like LTR
+        let shift = 0;
+        if (textAnchor === 'start' && !isRTL || textAnchor === 'end' && isRTL) {
+            shift = firstElement.x - this.minX;
+        }
+        else if (textAnchor === 'end' && !isRTL || textAnchor === 'start' && isRTL) {
+            shift = firstElement.x - this.maxX;
+        }
+        else {
+            shift = firstElement.x - (this.minX + this.maxX) / 2;
+        }
+        for (let i = this.textChunkStart; i < this.leafTexts.length; i++) {
+            this.leafTexts[i].x += shift;
+        }
+        // start new chunk
+        this.minX = Number.POSITIVE_INFINITY;
+        this.maxX = Number.NEGATIVE_INFINITY;
+        this.textChunkStart = this.leafTexts.length;
+    }
+    adjustChildCoordinatesRecursive(ctx) {
+        this.children.forEach((_, i) => {
+            this.adjustChildCoordinatesRecursiveCore(ctx, this, this, i);
+        });
+        this.applyAnchoring();
+    }
+    adjustChildCoordinatesRecursiveCore(ctx, textParent, parent, i) {
+        const child = parent.children[i];
+        if (child.children.length > 0) {
+            child.children.forEach((_, i) => {
+                textParent.adjustChildCoordinatesRecursiveCore(ctx, textParent, child, i);
+            });
+        }
+        else {
+            // only leafs are relevant
+            this.adjustChildCoordinates(ctx, textParent, parent, i);
+        }
+    }
+    adjustChildCoordinates(ctx, textParent, parent, i) {
+        const child = parent.children[i];
+        if (typeof child.measureText !== 'function') {
+            return child;
+        }
+        ctx.save();
+        child.setContext(ctx, true);
+        const xAttr = child.getAttribute('x');
+        const yAttr = child.getAttribute('y');
+        const dxAttr = child.getAttribute('dx');
+        const dyAttr = child.getAttribute('dy');
+        const customFont = child.getStyle('font-family').getDefinition();
+        const isRTL = Boolean(customFont) && customFont.isRTL;
+        if (i === 0) {
+            // First children inherit attributes from parent(s). Positional attributes
+            // are only inherited from a parent to it's first child.
+            if (!xAttr.hasValue()) {
+                xAttr.setValue(child.getInheritedAttribute('x'));
+            }
+            if (!yAttr.hasValue()) {
+                yAttr.setValue(child.getInheritedAttribute('y'));
+            }
+            if (!dxAttr.hasValue()) {
+                dxAttr.setValue(child.getInheritedAttribute('dx'));
+            }
+            if (!dyAttr.hasValue()) {
+                dyAttr.setValue(child.getInheritedAttribute('dy'));
+            }
+        }
+        const width = child.measureText(ctx);
+        if (isRTL) {
+            textParent.x -= width;
+        }
+        if (xAttr.hasValue()) {
+            // an "x" attribute marks the start of a new chunk
+            textParent.applyAnchoring();
+            child.x = xAttr.getPixels('x');
+            if (dxAttr.hasValue()) {
+                child.x += dxAttr.getPixels('x');
+            }
+        }
+        else {
+            if (dxAttr.hasValue()) {
+                textParent.x += dxAttr.getPixels('x');
+            }
+            child.x = textParent.x;
+        }
+        textParent.x = child.x;
+        if (!isRTL) {
+            textParent.x += width;
+        }
+        if (yAttr.hasValue()) {
+            child.y = yAttr.getPixels('y');
+            if (dyAttr.hasValue()) {
+                child.y += dyAttr.getPixels('y');
+            }
+        }
+        else {
+            if (dyAttr.hasValue()) {
+                textParent.y += dyAttr.getPixels('y');
+            }
+            child.y = textParent.y;
+        }
+        textParent.y = child.y;
+        // update the current chunk and it's bounds
+        textParent.leafTexts.push(child);
+        textParent.minX = Math.min(textParent.minX, child.x, child.x + width);
+        textParent.maxX = Math.max(textParent.maxX, child.x, child.x + width);
+        child.clearContext(ctx);
+        ctx.restore();
+        return child;
+    }
+    getChildBoundingBox(ctx, textParent, parent, i) {
+        const child = parent.children[i];
+        // not a text node?
+        if (typeof child.getBoundingBox !== 'function') {
+            return null;
+        }
+        const boundingBox = child.getBoundingBox(ctx);
+        if (!boundingBox) {
+            return null;
+        }
+        child.children.forEach((_, i) => {
+            const childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
+            boundingBox.addBoundingBox(childBoundingBox);
+        });
+        return boundingBox;
+    }
+    renderChild(ctx, textParent, parent, i) {
+        const child = parent.children[i];
+        child.render(ctx);
+        child.children.forEach((_, i) => {
+            textParent.renderChild(ctx, textParent, child, i);
+        });
+    }
+    measureText(ctx) {
+        const { measureCache } = this;
+        if (~measureCache) {
+            return measureCache;
+        }
+        const renderText = this.getText();
+        const measure = this.measureTargetText(ctx, renderText);
+        this.measureCache = measure;
+        return measure;
+    }
+    measureTargetText(ctx, targetText) {
+        if (!targetText.length) {
+            return 0;
+        }
+        const { parent } = this;
+        const customFont = parent.getStyle('font-family').getDefinition();
+        if (customFont) {
+            const fontSize = this.getFontSize();
+            const text = customFont.isRTL
+                ? targetText.split('').reverse().join('')
+                : targetText;
+            const dx = toNumbers(parent.getAttribute('dx').getString());
+            const len = text.length;
+            let measure = 0;
+            for (let i = 0; i < len; i++) {
+                const glyph = this.getGlyph(customFont, text, i);
+                measure += (glyph.horizAdvX || customFont.horizAdvX)
+                    * fontSize
+                    / customFont.fontFace.unitsPerEm;
+                if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
+                    measure += dx[i];
+                }
+            }
+            return measure;
+        }
+        if (!ctx.measureText) {
+            return targetText.length * 10;
+        }
+        ctx.save();
+        this.setContext(ctx, true);
+        const { width: measure } = ctx.measureText(targetText);
+        this.clearContext(ctx);
+        ctx.restore();
+        return measure;
+    }
+    /**
+     * Inherits positional attributes from {@link TextElement} parent(s). Attributes
+     * are only inherited from a parent to its first child.
+     * @param name - The attribute name.
+     * @returns The attribute value or null.
+     */
+    getInheritedAttribute(name) {
+        // eslint-disable-next-line @typescript-eslint/no-this-alias,consistent-this
+        let current = this;
+        while (current instanceof TextElement && current.isFirstChild()) {
+            const parentAttr = current.parent.getAttribute(name);
+            if (parentAttr.hasValue(true)) {
+                return parentAttr.getValue('0');
+            }
+            current = current.parent;
+        }
+        return null;
+    }
+}
+
+class TSpanElement extends TextElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, new.target === TSpanElement
+            ? true
+            : captureTextNodes);
+        this.type = 'tspan';
+        // if this node has children, then they own the text
+        this.text = this.children.length > 0
+            ? ''
+            : this.getTextFromNode();
+    }
+    getText() {
+        return this.text;
+    }
+}
+
+class TextNode extends TSpanElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'textNode';
+    }
+}
+
+class SVGElement extends RenderedElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'svg';
+        this.root = false;
+    }
+    setContext(ctx) {
+        const { document } = this;
+        const { screen, window } = document;
+        const canvas = ctx.canvas;
+        screen.setDefaults(ctx);
+        if (canvas.style
+            && typeof ctx.font !== 'undefined'
+            && window
+            && typeof window.getComputedStyle !== 'undefined') {
+            ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
+            const fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
+            if (fontSizeProp.hasValue()) {
+                document.rootEmSize = fontSizeProp.getPixels('y');
+                document.emSize = document.rootEmSize;
+            }
+        }
+        // create new view port
+        if (!this.getAttribute('x').hasValue()) {
+            this.getAttribute('x', true).setValue(0);
+        }
+        if (!this.getAttribute('y').hasValue()) {
+            this.getAttribute('y', true).setValue(0);
+        }
+        let { width, height } = screen.viewPort;
+        if (!this.getStyle('width').hasValue()) {
+            this.getStyle('width', true).setValue('100%');
+        }
+        if (!this.getStyle('height').hasValue()) {
+            this.getStyle('height', true).setValue('100%');
+        }
+        if (!this.getStyle('color').hasValue()) {
+            this.getStyle('color', true).setValue('black');
+        }
+        const refXAttr = this.getAttribute('refX');
+        const refYAttr = this.getAttribute('refY');
+        const viewBoxAttr = this.getAttribute('viewBox');
+        const viewBox = viewBoxAttr.hasValue()
+            ? toNumbers(viewBoxAttr.getString())
+            : null;
+        const clip = !this.root
+            && this.getStyle('overflow').getValue('hidden') !== 'visible';
+        let minX = 0;
+        let minY = 0;
+        let clipX = 0;
+        let clipY = 0;
+        if (viewBox) {
+            minX = viewBox[0];
+            minY = viewBox[1];
+        }
+        if (!this.root) {
+            width = this.getStyle('width').getPixels('x');
+            height = this.getStyle('height').getPixels('y');
+            if (this.type === 'marker') {
+                clipX = minX;
+                clipY = minY;
+                minX = 0;
+                minY = 0;
+            }
+        }
+        screen.viewPort.setCurrent(width, height);
+        // Default value of transform-origin is center only for root SVG elements
+        // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin
+        if (this.node // is not temporary SVGElement
+            && (!this.parent || this.node.parentNode?.nodeName === 'foreignObject')
+            && this.getStyle('transform', false, true).hasValue()
+            && !this.getStyle('transform-origin', false, true).hasValue()) {
+            this.getStyle('transform-origin', true, true).setValue('50% 50%');
+        }
+        super.setContext(ctx);
+        ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
+        if (viewBox) {
+            width = viewBox[2];
+            height = viewBox[3];
+        }
+        document.setViewBox({
+            ctx,
+            aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
+            width: screen.viewPort.width,
+            desiredWidth: width,
+            height: screen.viewPort.height,
+            desiredHeight: height,
+            minX,
+            minY,
+            refX: refXAttr.getValue(),
+            refY: refYAttr.getValue(),
+            clip,
+            clipX,
+            clipY
+        });
+        if (viewBox) {
+            screen.viewPort.removeCurrent();
+            screen.viewPort.setCurrent(width, height);
+        }
+    }
+    clearContext(ctx) {
+        super.clearContext(ctx);
+        this.document.screen.viewPort.removeCurrent();
+    }
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+    resize(width, height = width, preserveAspectRatio = false) {
+        const widthAttr = this.getAttribute('width', true);
+        const heightAttr = this.getAttribute('height', true);
+        const viewBoxAttr = this.getAttribute('viewBox');
+        const styleAttr = this.getAttribute('style');
+        const originWidth = widthAttr.getNumber(0);
+        const originHeight = heightAttr.getNumber(0);
+        if (preserveAspectRatio) {
+            if (typeof preserveAspectRatio === 'string') {
+                this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
+            }
+            else {
+                const preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
+                if (preserveAspectRatioAttr.hasValue()) {
+                    preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
+                }
+            }
+        }
+        widthAttr.setValue(width);
+        heightAttr.setValue(height);
+        if (!viewBoxAttr.hasValue()) {
+            viewBoxAttr.setValue(`0 0 ${originWidth || width} ${originHeight || height}`);
+        }
+        if (styleAttr.hasValue()) {
+            const widthStyle = this.getStyle('width');
+            const heightStyle = this.getStyle('height');
+            if (widthStyle.hasValue()) {
+                widthStyle.setValue(`${width}px`);
+            }
+            if (heightStyle.hasValue()) {
+                heightStyle.setValue(`${height}px`);
+            }
+        }
+    }
+}
+
+class RectElement extends PathElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'rect';
+    }
+    path(ctx) {
+        const x = this.getAttribute('x').getPixels('x');
+        const y = this.getAttribute('y').getPixels('y');
+        const width = this.getStyle('width', false, true).getPixels('x');
+        const height = this.getStyle('height', false, true).getPixels('y');
+        const rxAttr = this.getAttribute('rx');
+        const ryAttr = this.getAttribute('ry');
+        let rx = rxAttr.getPixels('x');
+        let ry = ryAttr.getPixels('y');
+        if (rxAttr.hasValue() && !ryAttr.hasValue()) {
+            ry = rx;
+        }
+        if (ryAttr.hasValue() && !rxAttr.hasValue()) {
+            rx = ry;
+        }
+        rx = Math.min(rx, width / 2.0);
+        ry = Math.min(ry, height / 2.0);
+        if (ctx) {
+            const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+            ctx.beginPath(); // always start the path so we don't fill prior paths
+            if (height > 0 && width > 0) {
+                ctx.moveTo(x + rx, y);
+                ctx.lineTo(x + width - rx, y);
+                ctx.bezierCurveTo(x + width - rx + (KAPPA * rx), y, x + width, y + ry - (KAPPA * ry), x + width, y + ry);
+                ctx.lineTo(x + width, y + height - ry);
+                ctx.bezierCurveTo(x + width, y + height - ry + (KAPPA * ry), x + width - rx + (KAPPA * rx), y + height, x + width - rx, y + height);
+                ctx.lineTo(x + rx, y + height);
+                ctx.bezierCurveTo(x + rx - (KAPPA * rx), y + height, x, y + height - ry + (KAPPA * ry), x, y + height - ry);
+                ctx.lineTo(x, y + ry);
+                ctx.bezierCurveTo(x, y + ry - (KAPPA * ry), x + rx - (KAPPA * rx), y, x + rx, y);
+                ctx.closePath();
+            }
+        }
+        return new BoundingBox(x, y, x + width, y + height);
+    }
+    getMarkers() {
+        return null;
+    }
+}
+
+class CircleElement extends PathElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'circle';
+    }
+    path(ctx) {
+        const cx = this.getAttribute('cx').getPixels('x');
+        const cy = this.getAttribute('cy').getPixels('y');
+        const r = this.getAttribute('r').getPixels();
+        if (ctx && r > 0) {
+            ctx.beginPath();
+            ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
+            ctx.closePath();
+        }
+        return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
+    }
+    getMarkers() {
+        return null;
+    }
+}
+
+class EllipseElement extends PathElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'ellipse';
+    }
+    path(ctx) {
+        const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+        const rx = this.getAttribute('rx').getPixels('x');
+        const ry = this.getAttribute('ry').getPixels('y');
+        const cx = this.getAttribute('cx').getPixels('x');
+        const cy = this.getAttribute('cy').getPixels('y');
+        if (ctx && rx > 0 && ry > 0) {
+            ctx.beginPath();
+            ctx.moveTo(cx + rx, cy);
+            ctx.bezierCurveTo(cx + rx, cy + (KAPPA * ry), cx + (KAPPA * rx), cy + ry, cx, cy + ry);
+            ctx.bezierCurveTo(cx - (KAPPA * rx), cy + ry, cx - rx, cy + (KAPPA * ry), cx - rx, cy);
+            ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry);
+            ctx.bezierCurveTo(cx + (KAPPA * rx), cy - ry, cx + rx, cy - (KAPPA * ry), cx + rx, cy);
+            ctx.closePath();
+        }
+        return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
+    }
+    getMarkers() {
+        return null;
+    }
+}
+
+class LineElement extends PathElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'line';
+    }
+    getPoints() {
+        return [
+            new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')),
+            new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))
+        ];
+    }
+    path(ctx) {
+        const [{ x: x0, y: y0 }, { x: x1, y: y1 }] = this.getPoints();
+        if (ctx) {
+            ctx.beginPath();
+            ctx.moveTo(x0, y0);
+            ctx.lineTo(x1, y1);
+        }
+        return new BoundingBox(x0, y0, x1, y1);
+    }
+    getMarkers() {
+        const [p0, p1] = this.getPoints();
+        const a = p0.angleTo(p1);
+        return [
+            [p0, a],
+            [p1, a]
+        ];
+    }
+}
+
+class PolylineElement extends PathElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'polyline';
+        this.points = [];
+        this.points = Point.parsePath(this.getAttribute('points').getString());
+    }
+    path(ctx) {
+        const { points } = this;
+        const [{ x: x0, y: y0 }] = points;
+        const boundingBox = new BoundingBox(x0, y0);
+        if (ctx) {
+            ctx.beginPath();
+            ctx.moveTo(x0, y0);
+        }
+        points.forEach(({ x, y }) => {
+            boundingBox.addPoint(x, y);
+            if (ctx) {
+                ctx.lineTo(x, y);
+            }
+        });
+        return boundingBox;
+    }
+    getMarkers() {
+        const { points } = this;
+        const lastIndex = points.length - 1;
+        const markers = [];
+        points.forEach((point, i) => {
+            if (i === lastIndex) {
+                return;
+            }
+            markers.push([
+                point,
+                point.angleTo(points[i + 1])
+            ]);
+        });
+        if (markers.length > 0) {
+            markers.push([
+                points[points.length - 1],
+                markers[markers.length - 1][1]
+            ]);
+        }
+        return markers;
+    }
+}
+
+class PolygonElement extends PolylineElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'polygon';
+    }
+    path(ctx) {
+        const boundingBox = super.path(ctx);
+        const [{ x, y }] = this.points;
+        if (ctx) {
+            ctx.lineTo(x, y);
+            ctx.closePath();
+        }
+        return boundingBox;
+    }
+}
+
+class PatternElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'pattern';
+    }
+    createPattern(ctx, _, parentOpacityProp) {
+        const width = this.getStyle('width').getPixels('x', true);
+        const height = this.getStyle('height').getPixels('y', true);
+        // render me using a temporary svg element
+        const patternSvg = new SVGElement(this.document, null);
+        patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
+        patternSvg.attributes.width = new Property(this.document, 'width', `${width}px`);
+        patternSvg.attributes.height = new Property(this.document, 'height', `${height}px`);
+        patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
+        patternSvg.children = this.children;
+        const patternCanvas = this.document.createCanvas(width, height);
+        const patternCtx = patternCanvas.getContext('2d');
+        const xAttr = this.getAttribute('x');
+        const yAttr = this.getAttribute('y');
+        if (xAttr.hasValue() && yAttr.hasValue()) {
+            patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
+        }
+        if (parentOpacityProp.hasValue()) {
+            this.styles['fill-opacity'] = parentOpacityProp;
+        }
+        else {
+            Reflect.deleteProperty(this.styles, 'fill-opacity');
+        }
+        // render 3x3 grid so when we transform there's no white space on edges
+        for (let x = -1; x <= 1; x++) {
+            for (let y = -1; y <= 1; y++) {
+                patternCtx.save();
+                patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
+                patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
+                patternSvg.render(patternCtx);
+                patternCtx.restore();
+            }
+        }
+        const pattern = ctx.createPattern(patternCanvas, 'repeat');
+        return pattern;
+    }
+}
+
+class MarkerElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'marker';
+    }
+    render(ctx, point, angle) {
+        if (!point) {
+            return;
+        }
+        const { x, y } = point;
+        const orient = this.getAttribute('orient').getString('auto');
+        const markerUnits = this.getAttribute('markerUnits').getString('strokeWidth');
+        ctx.translate(x, y);
+        if (orient === 'auto') {
+            ctx.rotate(angle);
+        }
+        if (markerUnits === 'strokeWidth') {
+            ctx.scale(ctx.lineWidth, ctx.lineWidth);
+        }
+        ctx.save();
+        // render me using a temporary svg element
+        const markerSvg = new SVGElement(this.document, null);
+        markerSvg.type = this.type;
+        markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
+        markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
+        markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
+        markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
+        markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
+        markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
+        markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
+        markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
+        markerSvg.children = this.children;
+        markerSvg.render(ctx);
+        ctx.restore();
+        if (markerUnits === 'strokeWidth') {
+            ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
+        }
+        if (orient === 'auto') {
+            ctx.rotate(-angle);
+        }
+        ctx.translate(-x, -y);
+    }
+}
+
+class DefsElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'defs';
+    }
+    render() {
+        // NOOP
+    }
+}
+
+class GElement extends RenderedElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'g';
+    }
+    getBoundingBox(ctx) {
+        const boundingBox = new BoundingBox();
+        this.children.forEach((child) => {
+            boundingBox.addBoundingBox(child.getBoundingBox(ctx));
+        });
+        return boundingBox;
+    }
+}
+
+class GradientElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.attributesToInherit = [
+            'gradientUnits'
+        ];
+        this.stops = [];
+        const { stops, children } = this;
+        children.forEach((child) => {
+            if (child.type === 'stop') {
+                stops.push(child);
+            }
+        });
+    }
+    getGradientUnits() {
+        return this.getAttribute('gradientUnits').getString('objectBoundingBox');
+    }
+    createGradient(ctx, element, parentOpacityProp) {
+        // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
+        let stopsContainer = this;
+        if (this.getHrefAttribute().hasValue()) {
+            stopsContainer = this.getHrefAttribute().getDefinition();
+            this.inheritStopContainer(stopsContainer);
+        }
+        const { stops } = stopsContainer;
+        const gradient = this.getGradient(ctx, element);
+        if (!gradient) {
+            return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
+        }
+        stops.forEach((stop) => {
+            gradient.addColorStop(stop.offset, this.addParentOpacity(parentOpacityProp, stop.color));
+        });
+        if (this.getAttribute('gradientTransform').hasValue()) {
+            // render as transformed pattern on temporary canvas
+            const { document } = this;
+            const { MAX_VIRTUAL_PIXELS, viewPort } = document.screen;
+            const [rootView] = viewPort.viewPorts;
+            const rect = new RectElement(document, null);
+            rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
+            rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
+            rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
+            rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
+            const group = new GElement(document, null);
+            group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
+            group.children = [rect];
+            const patternSvg = new SVGElement(document, null);
+            patternSvg.attributes.x = new Property(document, 'x', 0);
+            patternSvg.attributes.y = new Property(document, 'y', 0);
+            patternSvg.attributes.width = new Property(document, 'width', rootView.width);
+            patternSvg.attributes.height = new Property(document, 'height', rootView.height);
+            patternSvg.children = [group];
+            const patternCanvas = document.createCanvas(rootView.width, rootView.height);
+            const patternCtx = patternCanvas.getContext('2d');
+            patternCtx.fillStyle = gradient;
+            patternSvg.render(patternCtx);
+            return patternCtx.createPattern(patternCanvas, 'no-repeat');
+        }
+        return gradient;
+    }
+    inheritStopContainer(stopsContainer) {
+        this.attributesToInherit.forEach((attributeToInherit) => {
+            if (!this.getAttribute(attributeToInherit).hasValue()
+                && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
+                this.getAttribute(attributeToInherit, true)
+                    .setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
+            }
+        });
+    }
+    addParentOpacity(parentOpacityProp, color) {
+        if (parentOpacityProp.hasValue()) {
+            const colorProp = new Property(this.document, 'color', color);
+            return colorProp.addOpacity(parentOpacityProp).getColor();
+        }
+        return color;
+    }
+}
+
+class LinearGradientElement extends GradientElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'linearGradient';
+        this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
+    }
+    getGradient(ctx, element) {
+        const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
+        const boundingBox = isBoundingBoxUnits
+            ? element.getBoundingBox(ctx)
+            : null;
+        if (isBoundingBoxUnits && !boundingBox) {
+            return null;
+        }
+        if (!this.getAttribute('x1').hasValue()
+            && !this.getAttribute('y1').hasValue()
+            && !this.getAttribute('x2').hasValue()
+            && !this.getAttribute('y2').hasValue()) {
+            this.getAttribute('x1', true).setValue(0);
+            this.getAttribute('y1', true).setValue(0);
+            this.getAttribute('x2', true).setValue(1);
+            this.getAttribute('y2', true).setValue(0);
+        }
+        const x1 = isBoundingBoxUnits
+            ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber()
+            : this.getAttribute('x1').getPixels('x');
+        const y1 = isBoundingBoxUnits
+            ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber()
+            : this.getAttribute('y1').getPixels('y');
+        const x2 = isBoundingBoxUnits
+            ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber()
+            : this.getAttribute('x2').getPixels('x');
+        const y2 = isBoundingBoxUnits
+            ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber()
+            : this.getAttribute('y2').getPixels('y');
+        if (x1 === x2 && y1 === y2) {
+            return null;
+        }
+        return ctx.createLinearGradient(x1, y1, x2, y2);
+    }
+}
+
+class RadialGradientElement extends GradientElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'radialGradient';
+        this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
+    }
+    getGradient(ctx, element) {
+        const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
+        const boundingBox = element.getBoundingBox(ctx);
+        if (isBoundingBoxUnits && !boundingBox) {
+            return null;
+        }
+        if (!this.getAttribute('cx').hasValue()) {
+            this.getAttribute('cx', true).setValue('50%');
+        }
+        if (!this.getAttribute('cy').hasValue()) {
+            this.getAttribute('cy', true).setValue('50%');
+        }
+        if (!this.getAttribute('r').hasValue()) {
+            this.getAttribute('r', true).setValue('50%');
+        }
+        const cx = isBoundingBoxUnits
+            ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber()
+            : this.getAttribute('cx').getPixels('x');
+        const cy = isBoundingBoxUnits
+            ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber()
+            : this.getAttribute('cy').getPixels('y');
+        let fx = cx;
+        let fy = cy;
+        if (this.getAttribute('fx').hasValue()) {
+            fx = isBoundingBoxUnits
+                ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber()
+                : this.getAttribute('fx').getPixels('x');
+        }
+        if (this.getAttribute('fy').hasValue()) {
+            fy = isBoundingBoxUnits
+                ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber()
+                : this.getAttribute('fy').getPixels('y');
+        }
+        const r = isBoundingBoxUnits
+            ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber()
+            : this.getAttribute('r').getPixels();
+        const fr = this.getAttribute('fr').getPixels();
+        return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
+    }
+}
+
+class StopElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'stop';
+        const offset = Math.max(0, Math.min(1, this.getAttribute('offset').getNumber()));
+        const stopOpacity = this.getStyle('stop-opacity');
+        let stopColor = this.getStyle('stop-color', true);
+        if (stopColor.getString() === '') {
+            stopColor.setValue('#000');
+        }
+        if (stopOpacity.hasValue()) {
+            stopColor = stopColor.addOpacity(stopOpacity);
+        }
+        this.offset = offset;
+        this.color = stopColor.getColor();
+    }
+}
+
+class AnimateElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'animate';
+        this.duration = 0;
+        this.initialValue = null;
+        this.initialUnits = '';
+        this.removed = false;
+        this.frozen = false;
+        document.screen.animations.push(this);
+        this.begin = this.getAttribute('begin').getMilliseconds();
+        this.maxDuration = this.begin + this.getAttribute('dur').getMilliseconds();
+        this.from = this.getAttribute('from');
+        this.to = this.getAttribute('to');
+        this.values = new Property(document, 'values', null);
+        const valuesAttr = this.getAttribute('values');
+        if (valuesAttr.hasValue()) {
+            this.values.setValue(valuesAttr.getString().split(';'));
+        }
+    }
+    getProperty() {
+        const attributeType = this.getAttribute('attributeType').getString();
+        const attributeName = this.getAttribute('attributeName').getString();
+        if (attributeType === 'CSS') {
+            return this.parent.getStyle(attributeName, true);
+        }
+        return this.parent.getAttribute(attributeName, true);
+    }
+    calcValue() {
+        const { initialUnits } = this;
+        const { progress, from, to } = this.getProgress();
+        // tween value linearly
+        let newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
+        if (initialUnits === '%') {
+            newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
+        }
+        return `${newValue}${initialUnits}`;
+    }
+    update(delta) {
+        const { parent } = this;
+        const prop = this.getProperty();
+        // set initial value
+        if (!this.initialValue) {
+            this.initialValue = prop.getString();
+            this.initialUnits = prop.getUnits();
+        }
+        // if we're past the end time
+        if (this.duration > this.maxDuration) {
+            const fill = this.getAttribute('fill').getString('remove');
+            // loop for indefinitely repeating animations
+            if (this.getAttribute('repeatCount').getString() === 'indefinite'
+                || this.getAttribute('repeatDur').getString() === 'indefinite') {
+                this.duration = 0;
+            }
+            else if (fill === 'freeze' && !this.frozen) {
+                this.frozen = true;
+                parent.animationFrozen = true;
+                parent.animationFrozenValue = prop.getString();
+            }
+            else if (fill === 'remove' && !this.removed) {
+                this.removed = true;
+                prop.setValue(parent.animationFrozen
+                    ? parent.animationFrozenValue
+                    : this.initialValue);
+                return true;
+            }
+            return false;
+        }
+        this.duration += delta;
+        // if we're past the begin time
+        let updated = false;
+        if (this.begin < this.duration) {
+            let newValue = this.calcValue(); // tween
+            const typeAttr = this.getAttribute('type');
+            if (typeAttr.hasValue()) {
+                // for transform, etc.
+                const type = typeAttr.getString();
+                newValue = `${type}(${newValue})`;
+            }
+            prop.setValue(newValue);
+            updated = true;
+        }
+        return updated;
+    }
+    getProgress() {
+        const { document, values } = this;
+        const result = {
+            progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
+        };
+        if (values.hasValue()) {
+            const p = result.progress * (values.getValue().length - 1);
+            const lb = Math.floor(p);
+            const ub = Math.ceil(p);
+            result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
+            result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
+            result.progress = (p - lb) / (ub - lb);
+        }
+        else {
+            result.from = this.from;
+            result.to = this.to;
+        }
+        return result;
+    }
+}
+
+class AnimateColorElement extends AnimateElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'animateColor';
+    }
+    calcValue() {
+        const { progress, from, to } = this.getProgress();
+        const colorFrom = new RGBColor(from.getColor());
+        const colorTo = new RGBColor(to.getColor());
+        if (colorFrom.ok && colorTo.ok) {
+            // tween color linearly
+            const r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
+            const g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
+            const b = colorFrom.b + (colorTo.b - colorFrom.b) * progress;
+            // ? alpha
+            return `rgb(${Math.floor(r)}, ${Math.floor(g)}, ${Math.floor(b)})`;
+        }
+        return this.getAttribute('from').getColor();
+    }
+}
+
+class AnimateTransformElement extends AnimateElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'animateTransform';
+    }
+    calcValue() {
+        const { progress, from, to } = this.getProgress();
+        // tween value linearly
+        const transformFrom = toNumbers(from.getString());
+        const transformTo = toNumbers(to.getString());
+        const newValue = transformFrom.map((from, i) => {
+            const to = transformTo[i];
+            return from + (to - from) * progress;
+        }).join(' ');
+        return newValue;
+    }
+}
+
+class FontElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'font';
+        this.glyphs = {};
+        this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();
+        const { definitions } = document;
+        const { children } = this;
+        for (const child of children) {
+            switch (child.type) {
+                case 'font-face': {
+                    this.fontFace = child;
+                    const fontFamilyStyle = child.getStyle('font-family');
+                    if (fontFamilyStyle.hasValue()) {
+                        definitions[fontFamilyStyle.getString()] = this;
+                    }
+                    break;
+                }
+                case 'missing-glyph':
+                    this.missingGlyph = child;
+                    break;
+                case 'glyph': {
+                    const glyph = child;
+                    if (glyph.arabicForm) {
+                        this.isRTL = true;
+                        this.isArabic = true;
+                        if (typeof this.glyphs[glyph.unicode] === 'undefined') {
+                            this.glyphs[glyph.unicode] = {};
+                        }
+                        this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
+                    }
+                    else {
+                        this.glyphs[glyph.unicode] = glyph;
+                    }
+                    break;
+                }
+            }
+        }
+    }
+    render() {
+        // NO RENDER
+    }
+}
+
+class FontFaceElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'font-face';
+        this.ascent = this.getAttribute('ascent').getNumber();
+        this.descent = this.getAttribute('descent').getNumber();
+        this.unitsPerEm = this.getAttribute('units-per-em').getNumber();
+    }
+}
+
+class MissingGlyphElement extends PathElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'missing-glyph';
+        this.horizAdvX = 0;
+    }
+}
+
+class TRefElement extends TextElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'tref';
+    }
+    getText() {
+        const element = this.getHrefAttribute().getDefinition();
+        if (element) {
+            const firstChild = element.children[0];
+            if (firstChild) {
+                return firstChild.getText();
+            }
+        }
+        return '';
+    }
+}
+
+class AElement extends TextElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'a';
+        const { childNodes } = node;
+        const firstChild = childNodes[0];
+        const hasText = childNodes.length > 0
+            && Array.from(childNodes).every(node => node.nodeType === 3);
+        this.hasText = hasText;
+        this.text = hasText
+            ? this.getTextFromNode(firstChild)
+            : '';
+    }
+    getText() {
+        return this.text;
+    }
+    renderChildren(ctx) {
+        if (this.hasText) {
+            // render as text element
+            super.renderChildren(ctx);
+            const { document, x, y } = this;
+            const { mouse } = document.screen;
+            const fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize);
+            // Do not calc bounding box if mouse is not working.
+            if (mouse.isWorking()) {
+                mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
+            }
+        }
+        else if (this.children.length > 0) {
+            // render as temporary group
+            const g = new GElement(this.document, null);
+            g.children = this.children;
+            g.parent = this;
+            g.render(ctx);
+        }
+    }
+    onClick() {
+        const { window } = this.document;
+        if (window) {
+            window.open(this.getHrefAttribute().getString());
+        }
+    }
+    onMouseMove() {
+        const ctx = this.document.ctx;
+        ctx.canvas.style.cursor = 'pointer';
+    }
+}
+
+class TextPathElement extends TextElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'textPath';
+        this.textWidth = 0;
+        this.textHeight = 0;
+        this.pathLength = -1;
+        this.glyphInfo = null;
+        this.letterSpacingCache = [];
+        this.measuresCache = new Map([['', 0]]);
+        const pathElement = this.getHrefAttribute().getDefinition();
+        this.text = this.getTextFromNode();
+        this.dataArray = this.parsePathData(pathElement);
+    }
+    getText() {
+        return this.text;
+    }
+    path(ctx) {
+        const { dataArray } = this;
+        if (ctx) {
+            ctx.beginPath();
+        }
+        dataArray.forEach(({ type, points }) => {
+            switch (type) {
+                case PathParser.LINE_TO:
+                    if (ctx) {
+                        ctx.lineTo(points[0], points[1]);
+                    }
+                    break;
+                case PathParser.MOVE_TO:
+                    if (ctx) {
+                        ctx.moveTo(points[0], points[1]);
+                    }
+                    break;
+                case PathParser.CURVE_TO:
+                    if (ctx) {
+                        ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
+                    }
+                    break;
+                case PathParser.QUAD_TO:
+                    if (ctx) {
+                        ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
+                    }
+                    break;
+                case PathParser.ARC: {
+                    const [cx, cy, rx, ry, theta, dTheta, psi, fs] = points;
+                    const r = rx > ry ? rx : ry;
+                    const scaleX = rx > ry ? 1 : rx / ry;
+                    const scaleY = rx > ry ? ry / rx : 1;
+                    if (ctx) {
+                        ctx.translate(cx, cy);
+                        ctx.rotate(psi);
+                        ctx.scale(scaleX, scaleY);
+                        ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
+                        ctx.scale(1 / scaleX, 1 / scaleY);
+                        ctx.rotate(-psi);
+                        ctx.translate(-cx, -cy);
+                    }
+                    break;
+                }
+                case PathParser.CLOSE_PATH:
+                    if (ctx) {
+                        ctx.closePath();
+                    }
+                    break;
+            }
+        });
+    }
+    renderChildren(ctx) {
+        this.setTextData(ctx);
+        ctx.save();
+        const textDecoration = this.parent.getStyle('text-decoration').getString();
+        const fontSize = this.getFontSize();
+        const { glyphInfo } = this;
+        const fill = ctx.fillStyle;
+        if (textDecoration === 'underline') {
+            ctx.beginPath();
+        }
+        glyphInfo.forEach((glyph, i) => {
+            const { p0, p1, rotation, text: partialText } = glyph;
+            ctx.save();
+            ctx.translate(p0.x, p0.y);
+            ctx.rotate(rotation);
+            if (ctx.fillStyle) {
+                ctx.fillText(partialText, 0, 0);
+            }
+            if (ctx.strokeStyle) {
+                ctx.strokeText(partialText, 0, 0);
+            }
+            ctx.restore();
+            if (textDecoration === 'underline') {
+                if (i === 0) {
+                    ctx.moveTo(p0.x, p0.y + fontSize / 8);
+                }
+                ctx.lineTo(p1.x, p1.y + fontSize / 5);
+            }
+            // // To assist with debugging visually, uncomment following
+            //
+            // ctx.beginPath();
+            // if (i % 2)
+            // 	ctx.strokeStyle = 'red';
+            // else
+            // 	ctx.strokeStyle = 'green';
+            // ctx.moveTo(p0.x, p0.y);
+            // ctx.lineTo(p1.x, p1.y);
+            // ctx.stroke();
+            // ctx.closePath();
+        });
+        if (textDecoration === 'underline') {
+            ctx.lineWidth = fontSize / 20;
+            ctx.strokeStyle = fill;
+            ctx.stroke();
+            ctx.closePath();
+        }
+        ctx.restore();
+    }
+    getLetterSpacingAt(idx = 0) {
+        return this.letterSpacingCache[idx] || 0;
+    }
+    findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, dy, c, charI) {
+        let offset = inputOffset;
+        let glyphWidth = this.measureText(ctx, c);
+        if (c === ' '
+            && anchor === 'justify'
+            && textFullWidth < fullPathWidth) {
+            glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
+        }
+        if (charI > -1) {
+            offset += this.getLetterSpacingAt(charI);
+        }
+        const splineStep = this.textHeight / 20;
+        const p0 = this.getEquidistantPointOnPath(offset, splineStep, 0);
+        const p1 = this.getEquidistantPointOnPath(offset + glyphWidth, splineStep, 0);
+        const segment = {
+            p0,
+            p1
+        };
+        const rotation = p0 && p1
+            ? Math.atan2(p1.y - p0.y, p1.x - p0.x)
+            : 0;
+        if (dy) {
+            const dyX = Math.cos(Math.PI / 2 + rotation) * dy;
+            const dyY = Math.cos(-rotation) * dy;
+            segment.p0 = {
+                ...p0,
+                x: p0.x + dyX,
+                y: p0.y + dyY
+            };
+            segment.p1 = {
+                ...p1,
+                x: p1.x + dyX,
+                y: p1.y + dyY
+            };
+        }
+        offset += glyphWidth;
+        return {
+            offset,
+            segment,
+            rotation
+        };
+    }
+    measureText(ctx, text) {
+        const { measuresCache } = this;
+        const targetText = text || this.getText();
+        if (measuresCache.has(targetText)) {
+            return measuresCache.get(targetText);
+        }
+        const measure = this.measureTargetText(ctx, targetText);
+        measuresCache.set(targetText, measure);
+        return measure;
+    }
+    // This method supposes what all custom fonts already loaded.
+    // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
+    // You need to call this method manually to update glyphs cache.
+    setTextData(ctx) {
+        if (this.glyphInfo) {
+            return;
+        }
+        const renderText = this.getText();
+        const chars = renderText.split('');
+        const spacesNumber = renderText.split(' ').length - 1;
+        const dx = this.parent.getAttribute('dx').split().map(_ => _.getPixels('x'));
+        const dy = this.parent.getAttribute('dy').getPixels('y');
+        const anchor = this.parent.getStyle('text-anchor').getString('start');
+        const thisSpacing = this.getStyle('letter-spacing');
+        const parentSpacing = this.parent.getStyle('letter-spacing');
+        let letterSpacing = 0;
+        if (!thisSpacing.hasValue()
+            || thisSpacing.getValue() === 'inherit') {
+            letterSpacing = parentSpacing.getPixels();
+        }
+        else if (thisSpacing.hasValue()) {
+            if (thisSpacing.getValue() !== 'initial'
+                && thisSpacing.getValue() !== 'unset') {
+                letterSpacing = thisSpacing.getPixels();
+            }
+        }
+        // fill letter-spacing cache
+        const letterSpacingCache = [];
+        const textLen = renderText.length;
+        this.letterSpacingCache = letterSpacingCache;
+        for (let i = 0; i < textLen; i++) {
+            letterSpacingCache.push(typeof dx[i] !== 'undefined'
+                ? dx[i]
+                : letterSpacing);
+        }
+        const dxSum = letterSpacingCache.reduce((acc, cur, i) => (i === 0
+            ? 0
+            : acc + cur || 0), 0);
+        const textWidth = this.measureText(ctx);
+        const textFullWidth = Math.max(textWidth + dxSum, 0);
+        this.textWidth = textWidth;
+        this.textHeight = this.getFontSize();
+        this.glyphInfo = [];
+        const fullPathWidth = this.getPathLength();
+        const startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
+        let offset = 0;
+        if (anchor === 'middle'
+            || anchor === 'center') {
+            offset = -textFullWidth / 2;
+        }
+        if (anchor === 'end'
+            || anchor === 'right') {
+            offset = -textFullWidth;
+        }
+        offset += startOffset;
+        chars.forEach((char, i) => {
+            // Find such segment what distance between p0 and p1 is approx. width of glyph
+            const { offset: nextOffset, segment, rotation } = this.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, dy, char, i);
+            offset = nextOffset;
+            if (!segment.p0 || !segment.p1) {
+                return;
+            }
+            // const width = this.getLineLength(
+            // 	segment.p0.x,
+            // 	segment.p0.y,
+            // 	segment.p1.x,
+            // 	segment.p1.y
+            // );
+            // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.
+            // Can foresee having a rough pair table built in that the developer can override as needed.
+            // Or use "dx" attribute of the <text> node as a naive replacement
+            // const kern = 0;
+            // placeholder for future implementation
+            // const midpoint = this.getPointOnLine(
+            // 	kern + width / 2.0,
+            // 	segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y
+            // );
+            this.glyphInfo.push({
+                // transposeX: midpoint.x,
+                // transposeY: midpoint.y,
+                text: chars[i],
+                p0: segment.p0,
+                p1: segment.p1,
+                rotation
+            });
+        });
+    }
+    parsePathData(path) {
+        this.pathLength = -1; // reset path length
+        if (!path) {
+            return [];
+        }
+        const pathCommands = [];
+        const { pathParser } = path;
+        pathParser.reset();
+        // convert l, H, h, V, and v to L
+        while (!pathParser.isEnd()) {
+            const { current } = pathParser;
+            const startX = current ? current.x : 0;
+            const startY = current ? current.y : 0;
+            const command = pathParser.next();
+            let nextCommandType = command.type;
+            let points = [];
+            switch (command.type) {
+                case PathParser.MOVE_TO:
+                    this.pathM(pathParser, points);
+                    break;
+                case PathParser.LINE_TO:
+                    nextCommandType = this.pathL(pathParser, points);
+                    break;
+                case PathParser.HORIZ_LINE_TO:
+                    nextCommandType = this.pathH(pathParser, points);
+                    break;
+                case PathParser.VERT_LINE_TO:
+                    nextCommandType = this.pathV(pathParser, points);
+                    break;
+                case PathParser.CURVE_TO:
+                    this.pathC(pathParser, points);
+                    break;
+                case PathParser.SMOOTH_CURVE_TO:
+                    nextCommandType = this.pathS(pathParser, points);
+                    break;
+                case PathParser.QUAD_TO:
+                    this.pathQ(pathParser, points);
+                    break;
+                case PathParser.SMOOTH_QUAD_TO:
+                    nextCommandType = this.pathT(pathParser, points);
+                    break;
+                case PathParser.ARC:
+                    points = this.pathA(pathParser);
+                    break;
+                case PathParser.CLOSE_PATH:
+                    PathElement.pathZ(pathParser);
+                    break;
+            }
+            if (command.type !== PathParser.CLOSE_PATH) {
+                pathCommands.push({
+                    type: nextCommandType,
+                    points,
+                    start: {
+                        x: startX,
+                        y: startY
+                    },
+                    pathLength: this.calcLength(startX, startY, nextCommandType, points)
+                });
+            }
+            else {
+                pathCommands.push({
+                    type: PathParser.CLOSE_PATH,
+                    points: [],
+                    pathLength: 0
+                });
+            }
+        }
+        return pathCommands;
+    }
+    pathM(pathParser, points) {
+        const { x, y } = PathElement.pathM(pathParser).point;
+        points.push(x, y);
+    }
+    pathL(pathParser, points) {
+        const { x, y } = PathElement.pathL(pathParser).point;
+        points.push(x, y);
+        return PathParser.LINE_TO;
+    }
+    pathH(pathParser, points) {
+        const { x, y } = PathElement.pathH(pathParser).point;
+        points.push(x, y);
+        return PathParser.LINE_TO;
+    }
+    pathV(pathParser, points) {
+        const { x, y } = PathElement.pathV(pathParser).point;
+        points.push(x, y);
+        return PathParser.LINE_TO;
+    }
+    pathC(pathParser, points) {
+        const { point, controlPoint, currentPoint } = PathElement.pathC(pathParser);
+        points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+    pathS(pathParser, points) {
+        const { point, controlPoint, currentPoint } = PathElement.pathS(pathParser);
+        points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        return PathParser.CURVE_TO;
+    }
+    pathQ(pathParser, points) {
+        const { controlPoint, currentPoint } = PathElement.pathQ(pathParser);
+        points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+    pathT(pathParser, points) {
+        const { controlPoint, currentPoint } = PathElement.pathT(pathParser);
+        points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+        return PathParser.QUAD_TO;
+    }
+    pathA(pathParser) {
+        let { rX, rY, sweepFlag, xAxisRotation, centp, a1, ad } = PathElement.pathA(pathParser);
+        if (sweepFlag === 0 && ad > 0) {
+            ad -= 2 * Math.PI;
+        }
+        if (sweepFlag === 1 && ad < 0) {
+            ad += 2 * Math.PI;
+        }
+        return [
+            centp.x,
+            centp.y,
+            rX,
+            rY,
+            a1,
+            ad,
+            xAxisRotation,
+            sweepFlag
+        ];
+    }
+    calcLength(x, y, commandType, points) {
+        let len = 0;
+        let p1 = null;
+        let p2 = null;
+        let t = 0;
+        switch (commandType) {
+            case PathParser.LINE_TO:
+                return this.getLineLength(x, y, points[0], points[1]);
+            case PathParser.CURVE_TO:
+                // Approximates by breaking curve into 100 line segments
+                len = 0.0;
+                p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
+                for (t = 0.01; t <= 1; t += 0.01) {
+                    p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
+                    len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                    p1 = p2;
+                }
+                return len;
+            case PathParser.QUAD_TO:
+                // Approximates by breaking curve into 100 line segments
+                len = 0.0;
+                p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
+                for (t = 0.01; t <= 1; t += 0.01) {
+                    p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
+                    len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                    p1 = p2;
+                }
+                return len;
+            case PathParser.ARC: {
+                // Approximates by breaking curve into line segments
+                len = 0.0;
+                const start = points[4];
+                // 4 = theta
+                const dTheta = points[5];
+                // 5 = dTheta
+                const end = points[4] + dTheta;
+                let inc = Math.PI / 180.0;
+                // 1 degree resolution
+                if (Math.abs(start - end) < inc) {
+                    inc = Math.abs(start - end);
+                }
+                // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
+                p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
+                if (dTheta < 0) { // clockwise
+                    for (t = start - inc; t > end; t -= inc) {
+                        p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
+                        len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                        p1 = p2;
+                    }
+                }
+                else { // counter-clockwise
+                    for (t = start + inc; t < end; t += inc) {
+                        p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
+                        len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                        p1 = p2;
+                    }
+                }
+                p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
+                len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                return len;
+            }
+        }
+        return 0;
+    }
+    getPointOnLine(dist, p1x, p1y, p2x, p2y, fromX = p1x, fromY = p1y) {
+        const m = (p2y - p1y) / ((p2x - p1x) + PSEUDO_ZERO);
+        let run = Math.sqrt(dist * dist / (1 + m * m));
+        if (p2x < p1x) {
+            run *= -1;
+        }
+        let rise = m * run;
+        let pt = null;
+        if (p2x === p1x) { // vertical line
+            pt = {
+                x: fromX,
+                y: fromY + rise
+            };
+        }
+        else if ((fromY - p1y) / ((fromX - p1x) + PSEUDO_ZERO) === m) {
+            pt = {
+                x: fromX + run,
+                y: fromY + rise
+            };
+        }
+        else {
+            let ix = 0;
+            let iy = 0;
+            const len = this.getLineLength(p1x, p1y, p2x, p2y);
+            if (len < PSEUDO_ZERO) {
+                return null;
+            }
+            let u = ((fromX - p1x) * (p2x - p1x))
+                + ((fromY - p1y) * (p2y - p1y));
+            u /= len * len;
+            ix = p1x + u * (p2x - p1x);
+            iy = p1y + u * (p2y - p1y);
+            const pRise = this.getLineLength(fromX, fromY, ix, iy);
+            const pRun = Math.sqrt(dist * dist - pRise * pRise);
+            run = Math.sqrt(pRun * pRun / (1 + m * m));
+            if (p2x < p1x) {
+                run *= -1;
+            }
+            rise = m * run;
+            pt = {
+                x: ix + run,
+                y: iy + rise
+            };
+        }
+        return pt;
+    }
+    getPointOnPath(distance) {
+        const fullLen = this.getPathLength();
+        let cumulativePathLength = 0;
+        let p = null;
+        if (distance < -0.00005
+            || distance - 0.00005 > fullLen) {
+            return null;
+        }
+        const { dataArray } = this;
+        for (const command of dataArray) {
+            if (command
+                && (command.pathLength < 0.00005
+                    || cumulativePathLength + command.pathLength + 0.00005 < distance)) {
+                cumulativePathLength += command.pathLength;
+                continue;
+            }
+            const delta = distance - cumulativePathLength;
+            let currentT = 0;
+            switch (command.type) {
+                case PathParser.LINE_TO:
+                    p = this.getPointOnLine(delta, command.start.x, command.start.y, command.points[0], command.points[1], command.start.x, command.start.y);
+                    break;
+                case PathParser.ARC: {
+                    const start = command.points[4];
+                    // 4 = theta
+                    const dTheta = command.points[5];
+                    // 5 = dTheta
+                    const end = command.points[4] + dTheta;
+                    currentT = start + delta / command.pathLength * dTheta;
+                    if (dTheta < 0 && currentT < end
+                        || dTheta >= 0 && currentT > end) {
+                        break;
+                    }
+                    p = this.getPointOnEllipticalArc(command.points[0], command.points[1], command.points[2], command.points[3], currentT, command.points[6]);
+                    break;
+                }
+                case PathParser.CURVE_TO:
+                    currentT = delta / command.pathLength;
+                    if (currentT > 1) {
+                        currentT = 1;
+                    }
+                    p = this.getPointOnCubicBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3], command.points[4], command.points[5]);
+                    break;
+                case PathParser.QUAD_TO:
+                    currentT = delta / command.pathLength;
+                    if (currentT > 1) {
+                        currentT = 1;
+                    }
+                    p = this.getPointOnQuadraticBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3]);
+                    break;
+            }
+            if (p) {
+                return p;
+            }
+            break;
+        }
+        return null;
+    }
+    getLineLength(x1, y1, x2, y2) {
+        return Math.sqrt((x2 - x1) * (x2 - x1)
+            + (y2 - y1) * (y2 - y1));
+    }
+    getPathLength() {
+        if (this.pathLength === -1) {
+            this.pathLength = this.dataArray.reduce((length, command) => (command.pathLength > 0
+                ? length + command.pathLength
+                : length), 0);
+        }
+        return this.pathLength;
+    }
+    getPointOnCubicBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y) {
+        const x = p4x * CB1(pct) + p3x * CB2(pct) + p2x * CB3(pct) + p1x * CB4(pct);
+        const y = p4y * CB1(pct) + p3y * CB2(pct) + p2y * CB3(pct) + p1y * CB4(pct);
+        return {
+            x,
+            y
+        };
+    }
+    getPointOnQuadraticBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y) {
+        const x = p3x * QB1(pct) + p2x * QB2(pct) + p1x * QB3(pct);
+        const y = p3y * QB1(pct) + p2y * QB2(pct) + p1y * QB3(pct);
+        return {
+            x,
+            y
+        };
+    }
+    getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
+        const cosPsi = Math.cos(psi);
+        const sinPsi = Math.sin(psi);
+        const pt = {
+            x: rx * Math.cos(theta),
+            y: ry * Math.sin(theta)
+        };
+        return {
+            x: cx + (pt.x * cosPsi - pt.y * sinPsi),
+            y: cy + (pt.x * sinPsi + pt.y * cosPsi)
+        };
+    }
+    // TODO need some optimisations. possibly build cache only for curved segments?
+    buildEquidistantCache(inputStep, inputPrecision) {
+        const fullLen = this.getPathLength();
+        const precision = inputPrecision || 0.25; // accuracy vs performance
+        const step = inputStep || fullLen / 100;
+        if (!this.equidistantCache
+            || this.equidistantCache.step !== step
+            || this.equidistantCache.precision !== precision) {
+            // Prepare cache
+            this.equidistantCache = {
+                step,
+                precision,
+                points: []
+            };
+            // Calculate points
+            let s = 0;
+            for (let l = 0; l <= fullLen; l += precision) {
+                const p0 = this.getPointOnPath(l);
+                const p1 = this.getPointOnPath(l + precision);
+                if (!p0 || !p1) {
+                    continue;
+                }
+                s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
+                if (s >= step) {
+                    this.equidistantCache.points.push({
+                        x: p0.x,
+                        y: p0.y,
+                        distance: l
+                    });
+                    s -= step;
+                }
+            }
+        }
+    }
+    getEquidistantPointOnPath(targetDistance, step, precision) {
+        this.buildEquidistantCache(step, precision);
+        if (targetDistance < 0
+            || targetDistance - this.getPathLength() > 0.00005) {
+            return null;
+        }
+        const idx = Math.round(targetDistance
+            / this.getPathLength()
+            * (this.equidistantCache.points.length - 1));
+        return this.equidistantCache.points[idx] || null;
+    }
+}
+
+// groups: 1: mime-type (+ charset), 2: mime-type (w/o charset), 3: charset, 4: base64?, 5: body
+const dataUriRegex = /^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;
+class ImageElement extends RenderedElement {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'image';
+        this.loaded = false;
+        const href = this.getHrefAttribute().getString();
+        if (!href) {
+            return;
+        }
+        const isSvg = href.endsWith('.svg') || /^\s*data:image\/svg\+xml/i.test(href);
+        document.images.push(this);
+        if (!isSvg) {
+            void this.loadImage(href);
+        }
+        else {
+            void this.loadSvg(href);
+        }
+        this.isSvg = isSvg;
+    }
+    async loadImage(href) {
+        try {
+            const image = await this.document.createImage(href);
+            this.image = image;
+        }
+        catch (err) {
+            console.error(`Error while loading image "${href}":`, err);
+        }
+        this.loaded = true;
+    }
+    async loadSvg(href) {
+        const match = dataUriRegex.exec(href);
+        if (match) {
+            const data = match[5];
+            if (match[4] === 'base64') {
+                this.image = atob(data);
+            }
+            else {
+                this.image = decodeURIComponent(data);
+            }
+        }
+        else {
+            try {
+                const response = await this.document.fetch(href);
+                const svg = await response.text();
+                this.image = svg;
+            }
+            catch (err) {
+                console.error(`Error while loading image "${href}":`, err);
+            }
+        }
+        this.loaded = true;
+    }
+    renderChildren(ctx) {
+        const { document, image, loaded } = this;
+        const x = this.getAttribute('x').getPixels('x');
+        const y = this.getAttribute('y').getPixels('y');
+        const width = this.getStyle('width').getPixels('x');
+        const height = this.getStyle('height').getPixels('y');
+        if (!loaded || !image
+            || !width || !height) {
+            return;
+        }
+        ctx.save();
+        ctx.translate(x, y);
+        if (this.isSvg) {
+            const subDocument = document.canvg.forkString(ctx, this.image, {
+                ignoreMouse: true,
+                ignoreAnimation: true,
+                ignoreDimensions: true,
+                ignoreClear: true,
+                offsetX: 0,
+                offsetY: 0,
+                scaleWidth: width,
+                scaleHeight: height
+            });
+            subDocument.document.documentElement.parent = this;
+            void subDocument.render();
+        }
+        else {
+            const image = this.image;
+            document.setViewBox({
+                ctx,
+                aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
+                width,
+                desiredWidth: image.width,
+                height,
+                desiredHeight: image.height
+            });
+            if (this.loaded) {
+                if (typeof image.complete === 'undefined' || image.complete) {
+                    ctx.drawImage(image, 0, 0);
+                }
+            }
+        }
+        ctx.restore();
+    }
+    getBoundingBox() {
+        const x = this.getAttribute('x').getPixels('x');
+        const y = this.getAttribute('y').getPixels('y');
+        const width = this.getStyle('width').getPixels('x');
+        const height = this.getStyle('height').getPixels('y');
+        return new BoundingBox(x, y, x + width, y + height);
+    }
+}
+
+class SymbolElement extends RenderedElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'symbol';
+    }
+    render(_) {
+        // NO RENDER
+    }
+}
+
+class SVGFontLoader {
+    constructor(document) {
+        this.document = document;
+        this.loaded = false;
+        document.fonts.push(this);
+    }
+    async load(fontFamily, url) {
+        try {
+            const { document } = this;
+            const svgDocument = await document.canvg.parser.load(url);
+            const fonts = svgDocument.getElementsByTagName('font');
+            Array.from(fonts).forEach((fontNode) => {
+                const font = document.createElement(fontNode);
+                document.definitions[fontFamily] = font;
+            });
+        }
+        catch (err) {
+            console.error(`Error while loading font "${url}":`, err);
+        }
+        this.loaded = true;
+    }
+}
+
+class StyleElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'style';
+        const css = compressSpaces(Array.from(node.childNodes)
+            // NEED TEST
+            .map(_ => _.textContent)
+            .join('')
+            .replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
+            .replace(/@import.*;/g, '') // remove imports
+        );
+        const cssDefs = css.split('}');
+        cssDefs.forEach((_) => {
+            const def = _.trim();
+            if (!def) {
+                return;
+            }
+            const cssParts = def.split('{');
+            const cssClasses = cssParts[0].split(',');
+            const cssProps = cssParts[1].split(';');
+            cssClasses.forEach((_) => {
+                const cssClass = _.trim();
+                if (!cssClass) {
+                    return;
+                }
+                const props = document.styles[cssClass] || {};
+                cssProps.forEach((cssProp) => {
+                    const prop = cssProp.indexOf(':');
+                    const name = cssProp.substr(0, prop).trim();
+                    const value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
+                    if (name && value) {
+                        props[name] = new Property(document, name, value);
+                    }
+                });
+                document.styles[cssClass] = props;
+                document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
+                if (cssClass === '@font-face') { //  && !nodeEnv
+                    const fontFamily = props['font-family'].getString().replace(/"|'/g, '');
+                    const srcs = props.src.getString().split(',');
+                    srcs.forEach((src) => {
+                        if (src.indexOf('format("svg")') > 0) {
+                            const url = parseExternalUrl(src);
+                            if (url) {
+                                void new SVGFontLoader(document).load(fontFamily, url);
+                            }
+                        }
+                    });
+                }
+            });
+        });
+    }
+}
+StyleElement.parseExternalUrl = parseExternalUrl;
+
+class UseElement extends RenderedElement {
+    constructor() {
+        super(...arguments);
+        this.type = 'use';
+    }
+    setContext(ctx) {
+        super.setContext(ctx);
+        const xAttr = this.getAttribute('x');
+        const yAttr = this.getAttribute('y');
+        if (xAttr.hasValue()) {
+            ctx.translate(xAttr.getPixels('x'), 0);
+        }
+        if (yAttr.hasValue()) {
+            ctx.translate(0, yAttr.getPixels('y'));
+        }
+    }
+    path(ctx) {
+        const { element } = this;
+        if (element) {
+            element.path(ctx);
+        }
+    }
+    renderChildren(ctx) {
+        const { document, element } = this;
+        if (element) {
+            let tempSvg = element;
+            if (element.type === 'symbol') {
+                // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
+                tempSvg = new SVGElement(document, null);
+                tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
+                tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
+                tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
+                tempSvg.children = element.children;
+                // element is still the parent of the children
+                element.styles.opacity = new Property(document, 'opacity', this.calculateOpacity());
+            }
+            if (tempSvg.type === 'svg') {
+                const widthStyle = this.getStyle('width', false, true);
+                const heightStyle = this.getStyle('height', false, true);
+                // if symbol or svg, inherit width/height from me
+                if (widthStyle.hasValue()) {
+                    tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
+                }
+                if (heightStyle.hasValue()) {
+                    tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
+                }
+            }
+            const oldParent = tempSvg.parent;
+            tempSvg.parent = this;
+            tempSvg.render(ctx);
+            tempSvg.parent = oldParent;
+        }
+    }
+    getBoundingBox(ctx) {
+        const { element } = this;
+        if (element) {
+            return element.getBoundingBox(ctx);
+        }
+        return null;
+    }
+    elementTransform() {
+        const { document, element } = this;
+        return Transform.fromElement(document, element);
+    }
+    get element() {
+        if (!this.cachedElement) {
+            this.cachedElement = this.getHrefAttribute().getDefinition();
+        }
+        return this.cachedElement;
+    }
+}
+
+function imGet(img, x, y, width, _height, rgba) {
+    return img[y * width * 4 + x * 4 + rgba];
+}
+function imSet(img, x, y, width, _height, rgba, val) {
+    img[y * width * 4 + x * 4 + rgba] = val;
+}
+function m(matrix, i, v) {
+    const mi = matrix[i];
+    return mi * v;
+}
+function c(a, m1, m2, m3) {
+    return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
+}
+class FeColorMatrixElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'feColorMatrix';
+        let matrix = toNumbers(this.getAttribute('values').getString());
+        switch (this.getAttribute('type').getString('matrix')) { // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
+            case 'saturate': {
+                const s = matrix[0];
+                /* eslint-disable array-element-newline */
+                matrix = [
+                    0.213 + 0.787 * s, 0.715 - 0.715 * s, 0.072 - 0.072 * s, 0, 0,
+                    0.213 - 0.213 * s, 0.715 + 0.285 * s, 0.072 - 0.072 * s, 0, 0,
+                    0.213 - 0.213 * s, 0.715 - 0.715 * s, 0.072 + 0.928 * s, 0, 0,
+                    0, 0, 0, 1, 0,
+                    0, 0, 0, 0, 1
+                ];
+                /* eslint-enable array-element-newline */
+                break;
+            }
+            case 'hueRotate': {
+                const a = matrix[0] * Math.PI / 180.0;
+                /* eslint-disable array-element-newline */
+                matrix = [
+                    c(a, 0.213, 0.787, -0.213), c(a, 0.715, -0.715, -0.715), c(a, 0.072, -0.072, 0.928), 0, 0,
+                    c(a, 0.213, -0.213, 0.143), c(a, 0.715, 0.285, 0.140), c(a, 0.072, -0.072, -0.283), 0, 0,
+                    c(a, 0.213, -0.213, -0.787), c(a, 0.715, -0.715, 0.715), c(a, 0.072, 0.928, 0.072), 0, 0,
+                    0, 0, 0, 1, 0,
+                    0, 0, 0, 0, 1
+                ];
+                /* eslint-enable array-element-newline */
+                break;
+            }
+            case 'luminanceToAlpha':
+                /* eslint-disable array-element-newline */
+                matrix = [
+                    0, 0, 0, 0, 0,
+                    0, 0, 0, 0, 0,
+                    0, 0, 0, 0, 0,
+                    0.2125, 0.7154, 0.0721, 0, 0,
+                    0, 0, 0, 0, 1
+                ];
+                /* eslint-enable array-element-newline */
+                break;
+        }
+        this.matrix = matrix;
+        this.includeOpacity = this.getAttribute('includeOpacity').hasValue();
+    }
+    apply(ctx, _x, _y, width, height) {
+        // assuming x==0 && y==0 for now
+        const { includeOpacity, matrix } = this;
+        const srcData = ctx.getImageData(0, 0, width, height);
+        for (let y = 0; y < height; y++) {
+            for (let x = 0; x < width; x++) {
+                const r = imGet(srcData.data, x, y, width, height, 0);
+                const g = imGet(srcData.data, x, y, width, height, 1);
+                const b = imGet(srcData.data, x, y, width, height, 2);
+                const a = imGet(srcData.data, x, y, width, height, 3);
+                let nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
+                let ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
+                let nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
+                let na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
+                if (includeOpacity) {
+                    nr = 0;
+                    ng = 0;
+                    nb = 0;
+                    na *= a / 255;
+                }
+                imSet(srcData.data, x, y, width, height, 0, nr);
+                imSet(srcData.data, x, y, width, height, 1, ng);
+                imSet(srcData.data, x, y, width, height, 2, nb);
+                imSet(srcData.data, x, y, width, height, 3, na);
+            }
+        }
+        ctx.clearRect(0, 0, width, height);
+        ctx.putImageData(srcData, 0, 0);
+    }
+}
+
+class MaskElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'mask';
+    }
+    apply(ctx, element) {
+        const { document } = this;
+        // render as temp svg
+        let x = this.getAttribute('x').getPixels('x');
+        let y = this.getAttribute('y').getPixels('y');
+        let width = this.getStyle('width').getPixels('x');
+        let height = this.getStyle('height').getPixels('y');
+        if (!width && !height) {
+            const boundingBox = new BoundingBox();
+            this.children.forEach((child) => {
+                boundingBox.addBoundingBox(child.getBoundingBox(ctx));
+            });
+            x = Math.floor(boundingBox.x1);
+            y = Math.floor(boundingBox.y1);
+            width = Math.floor(boundingBox.width);
+            height = Math.floor(boundingBox.height);
+        }
+        const ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
+        const maskCanvas = document.createCanvas(x + width, y + height);
+        const maskCtx = maskCanvas.getContext('2d');
+        document.screen.setDefaults(maskCtx);
+        this.renderChildren(maskCtx);
+        // convert mask to alpha with a fake node
+        // TODO: refactor out apply from feColorMatrix
+        new FeColorMatrixElement(document, ({
+            nodeType: 1,
+            childNodes: [],
+            attributes: [
+                {
+                    nodeName: 'type',
+                    value: 'luminanceToAlpha'
+                },
+                {
+                    nodeName: 'includeOpacity',
+                    value: 'true'
+                }
+            ]
+        })).apply(maskCtx, 0, 0, x + width, y + height);
+        const tmpCanvas = document.createCanvas(x + width, y + height);
+        const tmpCtx = tmpCanvas.getContext('2d');
+        document.screen.setDefaults(tmpCtx);
+        element.render(tmpCtx);
+        tmpCtx.globalCompositeOperation = 'destination-in';
+        tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
+        tmpCtx.fillRect(0, 0, x + width, y + height);
+        ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
+        ctx.fillRect(0, 0, x + width, y + height);
+        // reassign mask
+        this.restoreStyles(element, ignoredStyles);
+    }
+    render(_) {
+        // NO RENDER
+    }
+}
+MaskElement.ignoreStyles = [
+    'mask',
+    'transform',
+    'clip-path'
+];
+
+const noop = () => {
+    // NOOP
+};
+class ClipPathElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'clipPath';
+    }
+    apply(ctx) {
+        const { document } = this;
+        const contextProto = Reflect.getPrototypeOf(ctx);
+        const { beginPath, closePath } = ctx;
+        if (contextProto) {
+            contextProto.beginPath = noop;
+            contextProto.closePath = noop;
+        }
+        Reflect.apply(beginPath, ctx, []);
+        this.children.forEach((child) => {
+            if (typeof child.path === 'undefined') {
+                return;
+            }
+            let transform = typeof child.elementTransform !== 'undefined'
+                ? child.elementTransform()
+                : null; // handle <use />
+            if (!transform) {
+                transform = Transform.fromElement(document, child);
+            }
+            if (transform) {
+                transform.apply(ctx);
+            }
+            child.path(ctx);
+            if (contextProto) {
+                contextProto.closePath = closePath;
+            }
+            if (transform) {
+                transform.unapply(ctx);
+            }
+        });
+        Reflect.apply(closePath, ctx, []);
+        ctx.clip();
+        if (contextProto) {
+            contextProto.beginPath = beginPath;
+            contextProto.closePath = closePath;
+        }
+    }
+    render(_) {
+        // NO RENDER
+    }
+}
+
+class FilterElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'filter';
+    }
+    apply(ctx, element) {
+        // render as temp svg
+        const { document, children } = this;
+        const boundingBox = element.getBoundingBox(ctx);
+        if (!boundingBox) {
+            return;
+        }
+        let px = 0;
+        let py = 0;
+        children.forEach((child) => {
+            const efd = child.extraFilterDistance || 0;
+            px = Math.max(px, efd);
+            py = Math.max(py, efd);
+        });
+        const width = Math.floor(boundingBox.width);
+        const height = Math.floor(boundingBox.height);
+        const tmpCanvasWidth = width + 2 * px;
+        const tmpCanvasHeight = height + 2 * py;
+        if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
+            return;
+        }
+        const x = Math.floor(boundingBox.x);
+        const y = Math.floor(boundingBox.y);
+        const ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
+        const tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
+        const tmpCtx = tmpCanvas.getContext('2d');
+        document.screen.setDefaults(tmpCtx);
+        tmpCtx.translate(-x + px, -y + py);
+        element.render(tmpCtx);
+        // apply filters
+        children.forEach((child) => {
+            if (typeof child.apply === 'function') {
+                child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
+            }
+        });
+        // render on me
+        ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
+        this.restoreStyles(element, ignoredStyles);
+    }
+    render(_) {
+        // NO RENDER
+    }
+}
+FilterElement.ignoreStyles = [
+    'filter',
+    'transform',
+    'clip-path'
+];
+
+class FeDropShadowElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'feDropShadow';
+        this.addStylesFromStyleDefinition();
+    }
+    apply(_, _x, _y, _width, _height) {
+        // TODO: implement
+    }
+}
+
+class FeMorphologyElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'feMorphology';
+    }
+    apply(_, _x, _y, _width, _height) {
+        // TODO: implement
+    }
+}
+
+class FeCompositeElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'feComposite';
+    }
+    apply(_, _x, _y, _width, _height) {
+        // TODO: implement
+    }
+}
+
+class FeGaussianBlurElement extends Element {
+    constructor(document, node, captureTextNodes) {
+        super(document, node, captureTextNodes);
+        this.type = 'feGaussianBlur';
+        this.blurRadius = Math.floor(this.getAttribute('stdDeviation').getNumber());
+        this.extraFilterDistance = this.blurRadius;
+    }
+    apply(ctx, x, y, width, height) {
+        const { document, blurRadius } = this;
+        const body = document.window
+            ? document.window.document.body
+            : null;
+        const canvas = ctx.canvas;
+        // StackBlur requires canvas be on document
+        canvas.id = document.getUniqueId();
+        if (body) {
+            canvas.style.display = 'none';
+            body.appendChild(canvas);
+        }
+        canvasRGBA(canvas, x, y, width, height, blurRadius);
+        if (body) {
+            body.removeChild(canvas);
+        }
+    }
+}
+
+class TitleElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'title';
+    }
+}
+
+class DescElement extends Element {
+    constructor() {
+        super(...arguments);
+        this.type = 'desc';
+    }
+}
+
+const elements = {
+    'svg': SVGElement,
+    'rect': RectElement,
+    'circle': CircleElement,
+    'ellipse': EllipseElement,
+    'line': LineElement,
+    'polyline': PolylineElement,
+    'polygon': PolygonElement,
+    'path': PathElement,
+    'pattern': PatternElement,
+    'marker': MarkerElement,
+    'defs': DefsElement,
+    'linearGradient': LinearGradientElement,
+    'radialGradient': RadialGradientElement,
+    'stop': StopElement,
+    'animate': AnimateElement,
+    'animateColor': AnimateColorElement,
+    'animateTransform': AnimateTransformElement,
+    'font': FontElement,
+    'font-face': FontFaceElement,
+    'missing-glyph': MissingGlyphElement,
+    'glyph': GlyphElement,
+    'text': TextElement,
+    'tspan': TSpanElement,
+    'tref': TRefElement,
+    'a': AElement,
+    'textPath': TextPathElement,
+    'image': ImageElement,
+    'g': GElement,
+    'symbol': SymbolElement,
+    'style': StyleElement,
+    'use': UseElement,
+    'mask': MaskElement,
+    'clipPath': ClipPathElement,
+    'filter': FilterElement,
+    'feDropShadow': FeDropShadowElement,
+    'feMorphology': FeMorphologyElement,
+    'feComposite': FeCompositeElement,
+    'feColorMatrix': FeColorMatrixElement,
+    'feGaussianBlur': FeGaussianBlurElement,
+    'title': TitleElement,
+    'desc': DescElement
+};
+
+function createCanvas(width, height) {
+    const canvas = document.createElement('canvas');
+    canvas.width = width;
+    canvas.height = height;
+    return canvas;
+}
+async function createImage(src, anonymousCrossOrigin = false) {
+    const image = document.createElement('img');
+    if (anonymousCrossOrigin) {
+        image.crossOrigin = 'Anonymous';
+    }
+    return new Promise((resolve, reject) => {
+        image.onload = () => {
+            resolve(image);
+        };
+        image.onerror = (_event, _source, _lineno, _colno, error) => {
+            reject(error);
+        };
+        image.src = src;
+    });
+}
+class Document {
+    constructor(canvg, { rootEmSize = 12, emSize = 12, createCanvas = Document.createCanvas, createImage = Document.createImage, anonymousCrossOrigin } = {}) {
+        this.canvg = canvg;
+        this.definitions = {};
+        this.styles = {};
+        this.stylesSpecificity = {};
+        this.images = [];
+        this.fonts = [];
+        this.emSizeStack = [];
+        this.uniqueId = 0;
+        this.screen = canvg.screen;
+        this.rootEmSize = rootEmSize;
+        this.emSize = emSize;
+        this.createCanvas = createCanvas;
+        this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
+        this.screen.wait(this.isImagesLoaded.bind(this));
+        this.screen.wait(this.isFontsLoaded.bind(this));
+    }
+    bindCreateImage(createImage, anonymousCrossOrigin) {
+        if (typeof anonymousCrossOrigin === 'boolean') {
+            return (source, forceAnonymousCrossOrigin) => createImage(source, typeof forceAnonymousCrossOrigin === 'boolean'
+                ? forceAnonymousCrossOrigin
+                : anonymousCrossOrigin);
+        }
+        return createImage;
+    }
+    get window() {
+        return this.screen.window;
+    }
+    get fetch() {
+        return this.screen.fetch;
+    }
+    get ctx() {
+        return this.screen.ctx;
+    }
+    get emSize() {
+        const { emSizeStack } = this;
+        return emSizeStack[emSizeStack.length - 1];
+    }
+    set emSize(value) {
+        const { emSizeStack } = this;
+        emSizeStack.push(value);
+    }
+    popEmSize() {
+        const { emSizeStack } = this;
+        emSizeStack.pop();
+    }
+    getUniqueId() {
+        return `canvg${++this.uniqueId}`;
+    }
+    isImagesLoaded() {
+        return this.images.every(_ => _.loaded);
+    }
+    isFontsLoaded() {
+        return this.fonts.every(_ => _.loaded);
+    }
+    createDocumentElement(document) {
+        const documentElement = this.createElement(document.documentElement);
+        documentElement.root = true;
+        documentElement.addStylesFromStyleDefinition();
+        this.documentElement = documentElement;
+        return documentElement;
+    }
+    createElement(node) {
+        const elementType = node.nodeName.replace(/^[^:]+:/, '');
+        const ElementType = Document.elementTypes[elementType];
+        if (typeof ElementType !== 'undefined') {
+            return new ElementType(this, node);
+        }
+        return new UnknownElement(this, node);
+    }
+    createTextNode(node) {
+        return new TextNode(this, node);
+    }
+    setViewBox(config) {
+        this.screen.setViewBox({
+            document: this,
+            ...config
+        });
+    }
+}
+Document.createCanvas = createCanvas;
+Document.createImage = createImage;
+Document.elementTypes = elements;
+
+/**
+ * SVG renderer on canvas.
+ */
+class Canvg {
+    /**
+     * Main constructor.
+     * @param ctx - Rendering context.
+     * @param svg - SVG Document.
+     * @param options - Rendering options.
+     */
+    constructor(ctx, svg, options = {}) {
+        this.parser = new Parser(options);
+        this.screen = new Screen(ctx, options);
+        this.options = options;
+        const document = new Document(this, options);
+        const documentElement = document.createDocumentElement(svg);
+        this.document = document;
+        this.documentElement = documentElement;
+    }
+    /**
+     * Create Canvg instance from SVG source string or URL.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string or URL.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    static async from(ctx, svg, options = {}) {
+        const parser = new Parser(options);
+        const svgDocument = await parser.parse(svg);
+        return new Canvg(ctx, svgDocument, options);
+    }
+    /**
+     * Create Canvg instance from SVG source string.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    static fromString(ctx, svg, options = {}) {
+        const parser = new Parser(options);
+        const svgDocument = parser.parseFromString(svg);
+        return new Canvg(ctx, svgDocument, options);
+    }
+    /**
+     * Create new Canvg instance with inherited options.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string or URL.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    fork(ctx, svg, options = {}) {
+        return Canvg.from(ctx, svg, {
+            ...this.options,
+            ...options
+        });
+    }
+    /**
+     * Create new Canvg instance with inherited options.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    forkString(ctx, svg, options = {}) {
+        return Canvg.fromString(ctx, svg, {
+            ...this.options,
+            ...options
+        });
+    }
+    /**
+     * Document is ready promise.
+     * @returns Ready promise.
+     */
+    ready() {
+        return this.screen.ready();
+    }
+    /**
+     * Document is ready value.
+     * @returns Is ready or not.
+     */
+    isReady() {
+        return this.screen.isReady();
+    }
+    /**
+     * Render only first frame, ignoring animations and mouse.
+     * @param options - Rendering options.
+     */
+    async render(options = {}) {
+        this.start({
+            enableRedraw: true,
+            ignoreAnimation: true,
+            ignoreMouse: true,
+            ...options
+        });
+        await this.ready();
+        this.stop();
+    }
+    /**
+     * Start rendering.
+     * @param options - Render options.
+     */
+    start(options = {}) {
+        const { documentElement, screen, options: baseOptions } = this;
+        screen.start(documentElement, {
+            enableRedraw: true,
+            ...baseOptions,
+            ...options
+        });
+    }
+    /**
+     * Stop rendering.
+     */
+    stop() {
+        this.screen.stop();
+    }
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+    resize(width, height = width, preserveAspectRatio = false) {
+        this.documentElement.resize(width, height, preserveAspectRatio);
+    }
+}
+
+export { AElement, AnimateColorElement, AnimateElement, AnimateTransformElement, BoundingBox, CB1, CB2, CB3, CB4, Canvg, CircleElement, ClipPathElement, DefsElement, DescElement, Document, Element, EllipseElement, FeColorMatrixElement, FeCompositeElement, FeDropShadowElement, FeGaussianBlurElement, FeMorphologyElement, FilterElement, Font, FontElement, FontFaceElement, GElement, GlyphElement, GradientElement, ImageElement, LineElement, LinearGradientElement, MarkerElement, MaskElement, Matrix, MissingGlyphElement, Mouse, PSEUDO_ZERO, Parser, PathElement, PathParser, PatternElement, Point, PolygonElement, PolylineElement, Property, QB1, QB2, QB3, RadialGradientElement, RectElement, RenderedElement, Rotate, SVGElement, SVGFontLoader, Scale, Screen, Skew, SkewX, SkewY, StopElement, StyleElement, SymbolElement, TRefElement, TSpanElement, TextElement, TextPathElement, TitleElement, Transform, Translate, UnknownElement, UseElement, ViewPort, compressSpaces, Canvg as default, getSelectorSpecificity, normalizeAttributeName, normalizeColor, parseExternalUrl, index as presets, toNumbers, trimLeft, trimRight, vectorMagnitude, vectorsAngle, vectorsRatio };
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguYmFiZWwuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs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ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
Index: imaps-frontend/node_modules/canvg/lib/index.cjs
===================================================================
--- imaps-frontend/node_modules/canvg/lib/index.cjs	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/index.cjs	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8029 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+require('core-js/modules/es.object.to-string.js');
+require('core-js/modules/es.promise.js');
+require('core-js/modules/es.reflect.delete-property.js');
+var _regeneratorRuntime = require('@babel/runtime/regenerator');
+var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
+require('core-js/modules/es.array.map.js');
+require('core-js/modules/es.parse-float.js');
+require('core-js/modules/es.regexp.exec.js');
+require('core-js/modules/es.string.match.js');
+require('core-js/modules/es.string.replace.js');
+require('core-js/modules/es.string.starts-with.js');
+require('core-js/modules/es.array.join.js');
+var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
+var _defineProperty = require('@babel/runtime/helpers/defineProperty');
+var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
+var _createClass = require('@babel/runtime/helpers/createClass');
+require('core-js/modules/es.array.concat.js');
+require('core-js/modules/es.array.every.js');
+require('core-js/modules/es.array.reduce.js');
+require('core-js/modules/es.string.ends-with.js');
+require('core-js/modules/es.string.split.js');
+var requestAnimationFrame = require('raf');
+require('core-js/modules/es.function.name.js');
+require('core-js/modules/es.string.trim.js');
+var RGBColor = require('rgbcolor');
+require('core-js/modules/es.array.for-each.js');
+require('core-js/modules/web.dom-collections.for-each.js');
+var _inherits = require('@babel/runtime/helpers/inherits');
+var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
+var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
+require('core-js/modules/es.array.from.js');
+require('core-js/modules/es.array.includes.js');
+require('core-js/modules/es.array.index-of.js');
+require('core-js/modules/es.array.some.js');
+require('core-js/modules/es.string.includes.js');
+require('core-js/modules/es.string.iterator.js');
+var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
+require('core-js/modules/es.array.reverse.js');
+require('core-js/modules/es.number.constructor.js');
+var _get = require('@babel/runtime/helpers/get');
+require('core-js/modules/es.array.fill.js');
+var svgPathdata = require('svg-pathdata');
+require('core-js/modules/es.regexp.to-string.js');
+var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitialized');
+require('core-js/modules/es.array.iterator.js');
+require('core-js/modules/web.dom-collections.iterator.js');
+require('core-js/modules/es.map.js');
+require('core-js/modules/es.reflect.apply.js');
+require('core-js/modules/es.reflect.get-prototype-of.js');
+var stackblurCanvas = require('stackblur-canvas');
+
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
+var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
+var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
+var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
+var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
+var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
+var requestAnimationFrame__default = /*#__PURE__*/_interopDefaultLegacy(requestAnimationFrame);
+var RGBColor__default = /*#__PURE__*/_interopDefaultLegacy(RGBColor);
+var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
+var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
+var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
+var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
+var _get__default = /*#__PURE__*/_interopDefaultLegacy(_get);
+var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
+
+/**
+ * Options preset for `OffscreenCanvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @returns Preset object.
+ */
+function offscreen() {
+  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
+      DOMParserFallback = _ref.DOMParser;
+
+  var preset = {
+    window: null,
+    ignoreAnimation: true,
+    ignoreMouse: true,
+    DOMParser: DOMParserFallback,
+    createCanvas: function createCanvas(width, height) {
+      return new OffscreenCanvas(width, height);
+    },
+    createImage: function createImage(url) {
+      return _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
+        var response, blob, img;
+        return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                _context.next = 2;
+                return fetch(url);
+
+              case 2:
+                response = _context.sent;
+                _context.next = 5;
+                return response.blob();
+
+              case 5:
+                blob = _context.sent;
+                _context.next = 8;
+                return createImageBitmap(blob);
+
+              case 8:
+                img = _context.sent;
+                return _context.abrupt("return", img);
+
+              case 10:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee);
+      }))();
+    }
+  };
+
+  if (typeof DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {
+    Reflect.deleteProperty(preset, 'DOMParser');
+  }
+
+  return preset;
+}
+
+/**
+ * Options preset for `node-canvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @param config.canvas - `node-canvas` exports.
+ * @param config.fetch - WHATWG-compatible `fetch` function.
+ * @returns Preset object.
+ */
+function node(_ref) {
+  var DOMParser = _ref.DOMParser,
+      canvas = _ref.canvas,
+      fetch = _ref.fetch;
+  return {
+    window: null,
+    ignoreAnimation: true,
+    ignoreMouse: true,
+    DOMParser: DOMParser,
+    fetch: fetch,
+    createCanvas: canvas.createCanvas,
+    createImage: canvas.loadImage
+  };
+}
+
+var index = /*#__PURE__*/Object.freeze({
+	__proto__: null,
+	offscreen: offscreen,
+	node: node
+});
+
+/**
+ * HTML-safe compress white-spaces.
+ * @param str - String to compress.
+ * @returns String.
+ */
+function compressSpaces(str) {
+  return str.replace(/(?!\u3000)\s+/gm, ' ');
+}
+/**
+ * HTML-safe left trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+
+function trimLeft(str) {
+  return str.replace(/^[\n \t]+/, '');
+}
+/**
+ * HTML-safe right trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+
+function trimRight(str) {
+  return str.replace(/[\n \t]+$/, '');
+}
+/**
+ * String to numbers array.
+ * @param str - Numbers string.
+ * @returns Numbers array.
+ */
+
+function toNumbers(str) {
+  var matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
+  return matches.map(parseFloat);
+} // Microsoft Edge fix
+
+var allUppercase = /^[A-Z-]+$/;
+/**
+ * Normalize attribute name.
+ * @param name - Attribute name.
+ * @returns Normalized attribute name.
+ */
+
+function normalizeAttributeName(name) {
+  if (allUppercase.test(name)) {
+    return name.toLowerCase();
+  }
+
+  return name;
+}
+/**
+ * Parse external URL.
+ * @param url - CSS url string.
+ * @returns Parsed URL.
+ */
+
+function parseExternalUrl(url) {
+  //                      single quotes [2]
+  //                      v         double quotes [3]
+  //                      v         v         no quotes [4]
+  //                      v         v         v
+  var urlMatch = /url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(url) || [];
+  return urlMatch[2] || urlMatch[3] || urlMatch[4];
+}
+/**
+ * Transform floats to integers in rgb colors.
+ * @param color - Color to normalize.
+ * @returns Normalized color.
+ */
+
+function normalizeColor(color) {
+  if (!color.startsWith('rgb')) {
+    return color;
+  }
+
+  var rgbParts = 3;
+  var normalizedColor = color.replace(/\d+(\.\d+)?/g, function (num, isFloat) {
+    return rgbParts-- && isFloat ? String(Math.round(parseFloat(num))) : num;
+  });
+  return normalizedColor;
+}
+
+// slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
+var attributeRegex = /(\[[^\]]+\])/g;
+var idRegex = /(#[^\s+>~.[:]+)/g;
+var classRegex = /(\.[^\s+>~.[:]+)/g;
+var pseudoElementRegex = /(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi;
+var pseudoClassWithBracketsRegex = /(:[\w-]+\([^)]*\))/gi;
+var pseudoClassRegex = /(:[^\s+>~.[:]+)/g;
+var elementRegex = /([^\s+>~.[:]+)/g;
+
+function findSelectorMatch(selector, regex) {
+  var matches = regex.exec(selector);
+
+  if (!matches) {
+    return [selector, 0];
+  }
+
+  return [selector.replace(regex, ' '), matches.length];
+}
+/**
+ * Measure selector specificity.
+ * @param selector - Selector to measure.
+ * @returns Specificity.
+ */
+
+
+function getSelectorSpecificity(selector) {
+  var specificity = [0, 0, 0];
+  var currentSelector = selector.replace(/:not\(([^)]*)\)/g, '     $1 ').replace(/{[\s\S]*/gm, ' ');
+  var delta = 0;
+
+  var _findSelectorMatch = findSelectorMatch(currentSelector, attributeRegex);
+
+  var _findSelectorMatch2 = _slicedToArray__default["default"](_findSelectorMatch, 2);
+
+  currentSelector = _findSelectorMatch2[0];
+  delta = _findSelectorMatch2[1];
+  specificity[1] += delta;
+
+  var _findSelectorMatch3 = findSelectorMatch(currentSelector, idRegex);
+
+  var _findSelectorMatch4 = _slicedToArray__default["default"](_findSelectorMatch3, 2);
+
+  currentSelector = _findSelectorMatch4[0];
+  delta = _findSelectorMatch4[1];
+  specificity[0] += delta;
+
+  var _findSelectorMatch5 = findSelectorMatch(currentSelector, classRegex);
+
+  var _findSelectorMatch6 = _slicedToArray__default["default"](_findSelectorMatch5, 2);
+
+  currentSelector = _findSelectorMatch6[0];
+  delta = _findSelectorMatch6[1];
+  specificity[1] += delta;
+
+  var _findSelectorMatch7 = findSelectorMatch(currentSelector, pseudoElementRegex);
+
+  var _findSelectorMatch8 = _slicedToArray__default["default"](_findSelectorMatch7, 2);
+
+  currentSelector = _findSelectorMatch8[0];
+  delta = _findSelectorMatch8[1];
+  specificity[2] += delta;
+
+  var _findSelectorMatch9 = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
+
+  var _findSelectorMatch10 = _slicedToArray__default["default"](_findSelectorMatch9, 2);
+
+  currentSelector = _findSelectorMatch10[0];
+  delta = _findSelectorMatch10[1];
+  specificity[1] += delta;
+
+  var _findSelectorMatch11 = findSelectorMatch(currentSelector, pseudoClassRegex);
+
+  var _findSelectorMatch12 = _slicedToArray__default["default"](_findSelectorMatch11, 2);
+
+  currentSelector = _findSelectorMatch12[0];
+  delta = _findSelectorMatch12[1];
+  specificity[1] += delta;
+  currentSelector = currentSelector.replace(/[*\s+>~]/g, ' ').replace(/[#.]/g, ' ');
+
+  var _findSelectorMatch13 = findSelectorMatch(currentSelector, elementRegex);
+
+  var _findSelectorMatch14 = _slicedToArray__default["default"](_findSelectorMatch13, 2);
+
+  currentSelector = _findSelectorMatch14[0];
+  delta = _findSelectorMatch14[1];
+  // lgtm [js/useless-assignment-to-local]
+  specificity[2] += delta;
+  return specificity.join('');
+}
+
+var PSEUDO_ZERO = .00000001;
+/**
+ * Vector magnitude.
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorMagnitude(v) {
+  return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
+}
+/**
+ * Ratio between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorsRatio(u, v) {
+  return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
+}
+/**
+ * Angle between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorsAngle(u, v) {
+  return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
+}
+function CB1(t) {
+  return t * t * t;
+}
+function CB2(t) {
+  return 3 * t * t * (1 - t);
+}
+function CB3(t) {
+  return 3 * t * (1 - t) * (1 - t);
+}
+function CB4(t) {
+  return (1 - t) * (1 - t) * (1 - t);
+}
+function QB1(t) {
+  return t * t;
+}
+function QB2(t) {
+  return 2 * t * (1 - t);
+}
+function QB3(t) {
+  return (1 - t) * (1 - t);
+}
+
+var Property = /*#__PURE__*/function () {
+  function Property(document, name, value) {
+    _classCallCheck__default["default"](this, Property);
+
+    this.document = document;
+    this.name = name;
+    this.value = value;
+    this.isNormalizedColor = false;
+  }
+
+  _createClass__default["default"](Property, [{
+    key: "split",
+    value: function split() {
+      var separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ' ';
+      var document = this.document,
+          name = this.name;
+      return compressSpaces(this.getString()).trim().split(separator).map(function (value) {
+        return new Property(document, name, value);
+      });
+    }
+  }, {
+    key: "hasValue",
+    value: function hasValue(zeroIsValue) {
+      var value = this.value;
+      return value !== null && value !== '' && (zeroIsValue || value !== 0) && typeof value !== 'undefined';
+    }
+  }, {
+    key: "isString",
+    value: function isString(regexp) {
+      var value = this.value;
+      var result = typeof value === 'string';
+
+      if (!result || !regexp) {
+        return result;
+      }
+
+      return regexp.test(value);
+    }
+  }, {
+    key: "isUrlDefinition",
+    value: function isUrlDefinition() {
+      return this.isString(/^url\(/);
+    }
+  }, {
+    key: "isPixels",
+    value: function isPixels() {
+      if (!this.hasValue()) {
+        return false;
+      }
+
+      var asString = this.getString();
+
+      switch (true) {
+        case asString.endsWith('px'):
+        case /^[0-9]+$/.test(asString):
+          return true;
+
+        default:
+          return false;
+      }
+    }
+  }, {
+    key: "setValue",
+    value: function setValue(value) {
+      this.value = value;
+      return this;
+    }
+  }, {
+    key: "getValue",
+    value: function getValue(def) {
+      if (typeof def === 'undefined' || this.hasValue()) {
+        return this.value;
+      }
+
+      return def;
+    }
+  }, {
+    key: "getNumber",
+    value: function getNumber(def) {
+      if (!this.hasValue()) {
+        if (typeof def === 'undefined') {
+          return 0;
+        }
+
+        return parseFloat(def);
+      }
+
+      var value = this.value;
+      var n = parseFloat(value);
+
+      if (this.isString(/%$/)) {
+        n /= 100.0;
+      }
+
+      return n;
+    }
+  }, {
+    key: "getString",
+    value: function getString(def) {
+      if (typeof def === 'undefined' || this.hasValue()) {
+        return typeof this.value === 'undefined' ? '' : String(this.value);
+      }
+
+      return String(def);
+    }
+  }, {
+    key: "getColor",
+    value: function getColor(def) {
+      var color = this.getString(def);
+
+      if (this.isNormalizedColor) {
+        return color;
+      }
+
+      this.isNormalizedColor = true;
+      color = normalizeColor(color);
+      this.value = color;
+      return color;
+    }
+  }, {
+    key: "getDpi",
+    value: function getDpi() {
+      return 96.0; // TODO: compute?
+    }
+  }, {
+    key: "getRem",
+    value: function getRem() {
+      return this.document.rootEmSize;
+    }
+  }, {
+    key: "getEm",
+    value: function getEm() {
+      return this.document.emSize;
+    }
+  }, {
+    key: "getUnits",
+    value: function getUnits() {
+      return this.getString().replace(/[0-9.-]/g, '');
+    }
+  }, {
+    key: "getPixels",
+    value: function getPixels(axisOrIsFontSize) {
+      var processPercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      if (!this.hasValue()) {
+        return 0;
+      }
+
+      var _ref = typeof axisOrIsFontSize === 'boolean' ? [undefined, axisOrIsFontSize] : [axisOrIsFontSize],
+          _ref2 = _slicedToArray__default["default"](_ref, 2),
+          axis = _ref2[0],
+          isFontSize = _ref2[1];
+
+      var viewPort = this.document.screen.viewPort;
+
+      switch (true) {
+        case this.isString(/vmin$/):
+          return this.getNumber() / 100.0 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
+
+        case this.isString(/vmax$/):
+          return this.getNumber() / 100.0 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
+
+        case this.isString(/vw$/):
+          return this.getNumber() / 100.0 * viewPort.computeSize('x');
+
+        case this.isString(/vh$/):
+          return this.getNumber() / 100.0 * viewPort.computeSize('y');
+
+        case this.isString(/rem$/):
+          return this.getNumber() * this.getRem();
+
+        case this.isString(/em$/):
+          return this.getNumber() * this.getEm();
+
+        case this.isString(/ex$/):
+          return this.getNumber() * this.getEm() / 2.0;
+
+        case this.isString(/px$/):
+          return this.getNumber();
+
+        case this.isString(/pt$/):
+          return this.getNumber() * this.getDpi() * (1.0 / 72.0);
+
+        case this.isString(/pc$/):
+          return this.getNumber() * 15;
+
+        case this.isString(/cm$/):
+          return this.getNumber() * this.getDpi() / 2.54;
+
+        case this.isString(/mm$/):
+          return this.getNumber() * this.getDpi() / 25.4;
+
+        case this.isString(/in$/):
+          return this.getNumber() * this.getDpi();
+
+        case this.isString(/%$/) && isFontSize:
+          return this.getNumber() * this.getEm();
+
+        case this.isString(/%$/):
+          return this.getNumber() * viewPort.computeSize(axis);
+
+        default:
+          {
+            var n = this.getNumber();
+
+            if (processPercent && n < 1.0) {
+              return n * viewPort.computeSize(axis);
+            }
+
+            return n;
+          }
+      }
+    }
+  }, {
+    key: "getMilliseconds",
+    value: function getMilliseconds() {
+      if (!this.hasValue()) {
+        return 0;
+      }
+
+      if (this.isString(/ms$/)) {
+        return this.getNumber();
+      }
+
+      return this.getNumber() * 1000;
+    }
+  }, {
+    key: "getRadians",
+    value: function getRadians() {
+      if (!this.hasValue()) {
+        return 0;
+      }
+
+      switch (true) {
+        case this.isString(/deg$/):
+          return this.getNumber() * (Math.PI / 180.0);
+
+        case this.isString(/grad$/):
+          return this.getNumber() * (Math.PI / 200.0);
+
+        case this.isString(/rad$/):
+          return this.getNumber();
+
+        default:
+          return this.getNumber() * (Math.PI / 180.0);
+      }
+    }
+  }, {
+    key: "getDefinition",
+    value: function getDefinition() {
+      var asString = this.getString();
+      var name = /#([^)'"]+)/.exec(asString);
+
+      if (name) {
+        name = name[1];
+      }
+
+      if (!name) {
+        name = asString;
+      }
+
+      return this.document.definitions[name];
+    }
+  }, {
+    key: "getFillStyleDefinition",
+    value: function getFillStyleDefinition(element, opacity) {
+      var def = this.getDefinition();
+
+      if (!def) {
+        return null;
+      } // gradient
+
+
+      if (typeof def.createGradient === 'function') {
+        return def.createGradient(this.document.ctx, element, opacity);
+      } // pattern
+
+
+      if (typeof def.createPattern === 'function') {
+        if (def.getHrefAttribute().hasValue()) {
+          var patternTransform = def.getAttribute('patternTransform');
+          def = def.getHrefAttribute().getDefinition();
+
+          if (patternTransform.hasValue()) {
+            def.getAttribute('patternTransform', true).setValue(patternTransform.value);
+          }
+        }
+
+        return def.createPattern(this.document.ctx, element, opacity);
+      }
+
+      return null;
+    }
+  }, {
+    key: "getTextBaseline",
+    value: function getTextBaseline() {
+      if (!this.hasValue()) {
+        return null;
+      }
+
+      return Property.textBaselineMapping[this.getString()];
+    }
+  }, {
+    key: "addOpacity",
+    value: function addOpacity(opacity) {
+      var value = this.getColor();
+      var len = value.length;
+      var commas = 0; // Simulate old RGBColor version, which can't parse rgba.
+
+      for (var i = 0; i < len; i++) {
+        if (value[i] === ',') {
+          commas++;
+        }
+
+        if (commas === 3) {
+          break;
+        }
+      }
+
+      if (opacity.hasValue() && this.isString() && commas !== 3) {
+        var color = new RGBColor__default["default"](value);
+
+        if (color.ok) {
+          color.alpha = opacity.getNumber();
+          value = color.toRGBA();
+        }
+      }
+
+      return new Property(this.document, this.name, value);
+    }
+  }], [{
+    key: "empty",
+    value: function empty(document) {
+      return new Property(document, 'EMPTY', '');
+    }
+  }]);
+
+  return Property;
+}();
+Property.textBaselineMapping = {
+  'baseline': 'alphabetic',
+  'before-edge': 'top',
+  'text-before-edge': 'top',
+  'middle': 'middle',
+  'central': 'middle',
+  'after-edge': 'bottom',
+  'text-after-edge': 'bottom',
+  'ideographic': 'ideographic',
+  'alphabetic': 'alphabetic',
+  'hanging': 'hanging',
+  'mathematical': 'alphabetic'
+};
+
+var ViewPort = /*#__PURE__*/function () {
+  function ViewPort() {
+    _classCallCheck__default["default"](this, ViewPort);
+
+    this.viewPorts = [];
+  }
+
+  _createClass__default["default"](ViewPort, [{
+    key: "clear",
+    value: function clear() {
+      this.viewPorts = [];
+    }
+  }, {
+    key: "setCurrent",
+    value: function setCurrent(width, height) {
+      this.viewPorts.push({
+        width: width,
+        height: height
+      });
+    }
+  }, {
+    key: "removeCurrent",
+    value: function removeCurrent() {
+      this.viewPorts.pop();
+    }
+  }, {
+    key: "getCurrent",
+    value: function getCurrent() {
+      var viewPorts = this.viewPorts;
+      return viewPorts[viewPorts.length - 1];
+    }
+  }, {
+    key: "computeSize",
+    value: function computeSize(d) {
+      if (typeof d === 'number') {
+        return d;
+      }
+
+      if (d === 'x') {
+        return this.width;
+      }
+
+      if (d === 'y') {
+        return this.height;
+      }
+
+      return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
+    }
+  }, {
+    key: "width",
+    get: function get() {
+      return this.getCurrent().width;
+    }
+  }, {
+    key: "height",
+    get: function get() {
+      return this.getCurrent().height;
+    }
+  }]);
+
+  return ViewPort;
+}();
+
+var Point = /*#__PURE__*/function () {
+  function Point(x, y) {
+    _classCallCheck__default["default"](this, Point);
+
+    this.x = x;
+    this.y = y;
+  }
+
+  _createClass__default["default"](Point, [{
+    key: "angleTo",
+    value: function angleTo(point) {
+      return Math.atan2(point.y - this.y, point.x - this.x);
+    }
+  }, {
+    key: "applyTransform",
+    value: function applyTransform(transform) {
+      var x = this.x,
+          y = this.y;
+      var xp = x * transform[0] + y * transform[2] + transform[4];
+      var yp = x * transform[1] + y * transform[3] + transform[5];
+      this.x = xp;
+      this.y = yp;
+    }
+  }], [{
+    key: "parse",
+    value: function parse(point) {
+      var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
+
+      var _toNumbers = toNumbers(point),
+          _toNumbers2 = _slicedToArray__default["default"](_toNumbers, 2),
+          _toNumbers2$ = _toNumbers2[0],
+          x = _toNumbers2$ === void 0 ? defaultValue : _toNumbers2$,
+          _toNumbers2$2 = _toNumbers2[1],
+          y = _toNumbers2$2 === void 0 ? defaultValue : _toNumbers2$2;
+
+      return new Point(x, y);
+    }
+  }, {
+    key: "parseScale",
+    value: function parseScale(scale) {
+      var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
+
+      var _toNumbers3 = toNumbers(scale),
+          _toNumbers4 = _slicedToArray__default["default"](_toNumbers3, 2),
+          _toNumbers4$ = _toNumbers4[0],
+          x = _toNumbers4$ === void 0 ? defaultValue : _toNumbers4$,
+          _toNumbers4$2 = _toNumbers4[1],
+          y = _toNumbers4$2 === void 0 ? x : _toNumbers4$2;
+
+      return new Point(x, y);
+    }
+  }, {
+    key: "parsePath",
+    value: function parsePath(path) {
+      var points = toNumbers(path);
+      var len = points.length;
+      var pathPoints = [];
+
+      for (var i = 0; i < len; i += 2) {
+        pathPoints.push(new Point(points[i], points[i + 1]));
+      }
+
+      return pathPoints;
+    }
+  }]);
+
+  return Point;
+}();
+
+var Mouse = /*#__PURE__*/function () {
+  function Mouse(screen) {
+    _classCallCheck__default["default"](this, Mouse);
+
+    this.screen = screen;
+    this.working = false;
+    this.events = [];
+    this.eventElements = []; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+
+    this.onClick = this.onClick.bind(this); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+
+    this.onMouseMove = this.onMouseMove.bind(this);
+  }
+
+  _createClass__default["default"](Mouse, [{
+    key: "isWorking",
+    value: function isWorking() {
+      return this.working;
+    }
+  }, {
+    key: "start",
+    value: function start() {
+      if (this.working) {
+        return;
+      }
+
+      var screen = this.screen,
+          onClick = this.onClick,
+          onMouseMove = this.onMouseMove;
+      var canvas = screen.ctx.canvas;
+      canvas.onclick = onClick;
+      canvas.onmousemove = onMouseMove;
+      this.working = true;
+    }
+  }, {
+    key: "stop",
+    value: function stop() {
+      if (!this.working) {
+        return;
+      }
+
+      var canvas = this.screen.ctx.canvas;
+      this.working = false;
+      canvas.onclick = null;
+      canvas.onmousemove = null;
+    }
+  }, {
+    key: "hasEvents",
+    value: function hasEvents() {
+      return this.working && this.events.length > 0;
+    }
+  }, {
+    key: "runEvents",
+    value: function runEvents() {
+      if (!this.working) {
+        return;
+      }
+
+      var document = this.screen,
+          events = this.events,
+          eventElements = this.eventElements;
+      var style = document.ctx.canvas.style;
+
+      if (style) {
+        style.cursor = '';
+      }
+
+      events.forEach(function (_ref, i) {
+        var run = _ref.run;
+        var element = eventElements[i];
+
+        while (element) {
+          run(element);
+          element = element.parent;
+        }
+      }); // done running, clear
+
+      this.events = [];
+      this.eventElements = [];
+    }
+  }, {
+    key: "checkPath",
+    value: function checkPath(element, ctx) {
+      if (!this.working || !ctx) {
+        return;
+      }
+
+      var events = this.events,
+          eventElements = this.eventElements;
+      events.forEach(function (_ref2, i) {
+        var x = _ref2.x,
+            y = _ref2.y;
+
+        if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
+          eventElements[i] = element;
+        }
+      });
+    }
+  }, {
+    key: "checkBoundingBox",
+    value: function checkBoundingBox(element, boundingBox) {
+      if (!this.working || !boundingBox) {
+        return;
+      }
+
+      var events = this.events,
+          eventElements = this.eventElements;
+      events.forEach(function (_ref3, i) {
+        var x = _ref3.x,
+            y = _ref3.y;
+
+        if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
+          eventElements[i] = element;
+        }
+      });
+    }
+  }, {
+    key: "mapXY",
+    value: function mapXY(x, y) {
+      var _this$screen = this.screen,
+          window = _this$screen.window,
+          ctx = _this$screen.ctx;
+      var point = new Point(x, y);
+      var element = ctx.canvas;
+
+      while (element) {
+        point.x -= element.offsetLeft;
+        point.y -= element.offsetTop;
+        element = element.offsetParent;
+      }
+
+      if (window.scrollX) {
+        point.x += window.scrollX;
+      }
+
+      if (window.scrollY) {
+        point.y += window.scrollY;
+      }
+
+      return point;
+    }
+  }, {
+    key: "onClick",
+    value: function onClick(event) {
+      var _this$mapXY = this.mapXY(event.clientX, event.clientY),
+          x = _this$mapXY.x,
+          y = _this$mapXY.y;
+
+      this.events.push({
+        type: 'onclick',
+        x: x,
+        y: y,
+        run: function run(eventTarget) {
+          if (eventTarget.onClick) {
+            eventTarget.onClick();
+          }
+        }
+      });
+    }
+  }, {
+    key: "onMouseMove",
+    value: function onMouseMove(event) {
+      var _this$mapXY2 = this.mapXY(event.clientX, event.clientY),
+          x = _this$mapXY2.x,
+          y = _this$mapXY2.y;
+
+      this.events.push({
+        type: 'onmousemove',
+        x: x,
+        y: y,
+        run: function run(eventTarget) {
+          if (eventTarget.onMouseMove) {
+            eventTarget.onMouseMove();
+          }
+        }
+      });
+    }
+  }]);
+
+  return Mouse;
+}();
+
+var defaultWindow = typeof window !== 'undefined' ? window : null;
+var defaultFetch$1 = typeof fetch !== 'undefined' ? fetch.bind(undefined) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
+: null;
+
+var Screen = /*#__PURE__*/function () {
+  function Screen(ctx) {
+    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+        _ref$fetch = _ref.fetch,
+        fetch = _ref$fetch === void 0 ? defaultFetch$1 : _ref$fetch,
+        _ref$window = _ref.window,
+        window = _ref$window === void 0 ? defaultWindow : _ref$window;
+
+    _classCallCheck__default["default"](this, Screen);
+
+    this.ctx = ctx;
+    this.FRAMERATE = 30;
+    this.MAX_VIRTUAL_PIXELS = 30000;
+    this.CLIENT_WIDTH = 800;
+    this.CLIENT_HEIGHT = 600;
+    this.viewPort = new ViewPort();
+    this.mouse = new Mouse(this);
+    this.animations = [];
+    this.waits = [];
+    this.frameDuration = 0;
+    this.isReadyLock = false;
+    this.isFirstRender = true;
+    this.intervalId = null;
+    this.window = window;
+    this.fetch = fetch;
+  }
+
+  _createClass__default["default"](Screen, [{
+    key: "wait",
+    value: function wait(checker) {
+      this.waits.push(checker);
+    }
+  }, {
+    key: "ready",
+    value: function ready() {
+      // eslint-disable-next-line @typescript-eslint/no-misused-promises
+      if (!this.readyPromise) {
+        return Promise.resolve();
+      }
+
+      return this.readyPromise;
+    }
+  }, {
+    key: "isReady",
+    value: function isReady() {
+      if (this.isReadyLock) {
+        return true;
+      }
+
+      var isReadyLock = this.waits.every(function (_) {
+        return _();
+      });
+
+      if (isReadyLock) {
+        this.waits = [];
+
+        if (this.resolveReady) {
+          this.resolveReady();
+        }
+      }
+
+      this.isReadyLock = isReadyLock;
+      return isReadyLock;
+    }
+  }, {
+    key: "setDefaults",
+    value: function setDefaults(ctx) {
+      // initial values and defaults
+      ctx.strokeStyle = 'rgba(0,0,0,0)';
+      ctx.lineCap = 'butt';
+      ctx.lineJoin = 'miter';
+      ctx.miterLimit = 4;
+    }
+  }, {
+    key: "setViewBox",
+    value: function setViewBox(_ref2) {
+      var document = _ref2.document,
+          ctx = _ref2.ctx,
+          aspectRatio = _ref2.aspectRatio,
+          width = _ref2.width,
+          desiredWidth = _ref2.desiredWidth,
+          height = _ref2.height,
+          desiredHeight = _ref2.desiredHeight,
+          _ref2$minX = _ref2.minX,
+          minX = _ref2$minX === void 0 ? 0 : _ref2$minX,
+          _ref2$minY = _ref2.minY,
+          minY = _ref2$minY === void 0 ? 0 : _ref2$minY,
+          refX = _ref2.refX,
+          refY = _ref2.refY,
+          _ref2$clip = _ref2.clip,
+          clip = _ref2$clip === void 0 ? false : _ref2$clip,
+          _ref2$clipX = _ref2.clipX,
+          clipX = _ref2$clipX === void 0 ? 0 : _ref2$clipX,
+          _ref2$clipY = _ref2.clipY,
+          clipY = _ref2$clipY === void 0 ? 0 : _ref2$clipY;
+      // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
+      var cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
+
+      var _cleanAspectRatio$spl = cleanAspectRatio.split(' '),
+          _cleanAspectRatio$spl2 = _slicedToArray__default["default"](_cleanAspectRatio$spl, 2),
+          aspectRatioAlign = _cleanAspectRatio$spl2[0],
+          aspectRatioMeetOrSlice = _cleanAspectRatio$spl2[1];
+
+      var align = aspectRatioAlign || 'xMidYMid';
+      var meetOrSlice = aspectRatioMeetOrSlice || 'meet'; // calculate scale
+
+      var scaleX = width / desiredWidth;
+      var scaleY = height / desiredHeight;
+      var scaleMin = Math.min(scaleX, scaleY);
+      var scaleMax = Math.max(scaleX, scaleY);
+      var finalDesiredWidth = desiredWidth;
+      var finalDesiredHeight = desiredHeight;
+
+      if (meetOrSlice === 'meet') {
+        finalDesiredWidth *= scaleMin;
+        finalDesiredHeight *= scaleMin;
+      }
+
+      if (meetOrSlice === 'slice') {
+        finalDesiredWidth *= scaleMax;
+        finalDesiredHeight *= scaleMax;
+      }
+
+      var refXProp = new Property(document, 'refX', refX);
+      var refYProp = new Property(document, 'refY', refY);
+      var hasRefs = refXProp.hasValue() && refYProp.hasValue();
+
+      if (hasRefs) {
+        ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
+      }
+
+      if (clip) {
+        var scaledClipX = scaleMin * clipX;
+        var scaledClipY = scaleMin * clipY;
+        ctx.beginPath();
+        ctx.moveTo(scaledClipX, scaledClipY);
+        ctx.lineTo(width, scaledClipY);
+        ctx.lineTo(width, height);
+        ctx.lineTo(scaledClipX, height);
+        ctx.closePath();
+        ctx.clip();
+      }
+
+      if (!hasRefs) {
+        var isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
+        var isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
+        var isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
+        var isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
+
+        if (align.startsWith('xMid') && (isMeetMinY || isSliceMaxY)) {
+          ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
+        }
+
+        if (align.endsWith('YMid') && (isMeetMinX || isSliceMaxX)) {
+          ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
+        }
+
+        if (align.startsWith('xMax') && (isMeetMinY || isSliceMaxY)) {
+          ctx.translate(width - finalDesiredWidth, 0);
+        }
+
+        if (align.endsWith('YMax') && (isMeetMinX || isSliceMaxX)) {
+          ctx.translate(0, height - finalDesiredHeight);
+        }
+      } // scale
+
+
+      switch (true) {
+        case align === 'none':
+          ctx.scale(scaleX, scaleY);
+          break;
+
+        case meetOrSlice === 'meet':
+          ctx.scale(scaleMin, scaleMin);
+          break;
+
+        case meetOrSlice === 'slice':
+          ctx.scale(scaleMax, scaleMax);
+          break;
+      } // translate
+
+
+      ctx.translate(-minX, -minY);
+    }
+  }, {
+    key: "start",
+    value: function start(element) {
+      var _this = this;
+
+      var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+          _ref3$enableRedraw = _ref3.enableRedraw,
+          enableRedraw = _ref3$enableRedraw === void 0 ? false : _ref3$enableRedraw,
+          _ref3$ignoreMouse = _ref3.ignoreMouse,
+          ignoreMouse = _ref3$ignoreMouse === void 0 ? false : _ref3$ignoreMouse,
+          _ref3$ignoreAnimation = _ref3.ignoreAnimation,
+          ignoreAnimation = _ref3$ignoreAnimation === void 0 ? false : _ref3$ignoreAnimation,
+          _ref3$ignoreDimension = _ref3.ignoreDimensions,
+          ignoreDimensions = _ref3$ignoreDimension === void 0 ? false : _ref3$ignoreDimension,
+          _ref3$ignoreClear = _ref3.ignoreClear,
+          ignoreClear = _ref3$ignoreClear === void 0 ? false : _ref3$ignoreClear,
+          forceRedraw = _ref3.forceRedraw,
+          scaleWidth = _ref3.scaleWidth,
+          scaleHeight = _ref3.scaleHeight,
+          offsetX = _ref3.offsetX,
+          offsetY = _ref3.offsetY;
+
+      var FRAMERATE = this.FRAMERATE,
+          mouse = this.mouse;
+      var frameDuration = 1000 / FRAMERATE;
+      this.frameDuration = frameDuration;
+      this.readyPromise = new Promise(function (resolve) {
+        _this.resolveReady = resolve;
+      });
+
+      if (this.isReady()) {
+        this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
+      }
+
+      if (!enableRedraw) {
+        return;
+      }
+
+      var now = Date.now();
+      var then = now;
+      var delta = 0;
+
+      var tick = function tick() {
+        now = Date.now();
+        delta = now - then;
+
+        if (delta >= frameDuration) {
+          then = now - delta % frameDuration;
+
+          if (_this.shouldUpdate(ignoreAnimation, forceRedraw)) {
+            _this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
+
+            mouse.runEvents();
+          }
+        }
+
+        _this.intervalId = requestAnimationFrame__default["default"](tick);
+      };
+
+      if (!ignoreMouse) {
+        mouse.start();
+      }
+
+      this.intervalId = requestAnimationFrame__default["default"](tick);
+    }
+  }, {
+    key: "stop",
+    value: function stop() {
+      if (this.intervalId) {
+        requestAnimationFrame__default["default"].cancel(this.intervalId);
+        this.intervalId = null;
+      }
+
+      this.mouse.stop();
+    }
+  }, {
+    key: "shouldUpdate",
+    value: function shouldUpdate(ignoreAnimation, forceRedraw) {
+      // need update from animations?
+      if (!ignoreAnimation) {
+        var frameDuration = this.frameDuration;
+        var shouldUpdate = this.animations.reduce(function (shouldUpdate, animation) {
+          return animation.update(frameDuration) || shouldUpdate;
+        }, false);
+
+        if (shouldUpdate) {
+          return true;
+        }
+      } // need update from redraw?
+
+
+      if (typeof forceRedraw === 'function' && forceRedraw()) {
+        return true;
+      }
+
+      if (!this.isReadyLock && this.isReady()) {
+        return true;
+      } // need update from mouse events?
+
+
+      if (this.mouse.hasEvents()) {
+        return true;
+      }
+
+      return false;
+    }
+  }, {
+    key: "render",
+    value: function render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
+      var CLIENT_WIDTH = this.CLIENT_WIDTH,
+          CLIENT_HEIGHT = this.CLIENT_HEIGHT,
+          viewPort = this.viewPort,
+          ctx = this.ctx,
+          isFirstRender = this.isFirstRender;
+      var canvas = ctx.canvas;
+      viewPort.clear();
+
+      if (canvas.width && canvas.height) {
+        viewPort.setCurrent(canvas.width, canvas.height);
+      } else {
+        viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
+      }
+
+      var widthStyle = element.getStyle('width');
+      var heightStyle = element.getStyle('height');
+
+      if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
+        // set canvas size
+        if (widthStyle.hasValue()) {
+          canvas.width = widthStyle.getPixels('x');
+
+          if (canvas.style) {
+            canvas.style.width = "".concat(canvas.width, "px");
+          }
+        }
+
+        if (heightStyle.hasValue()) {
+          canvas.height = heightStyle.getPixels('y');
+
+          if (canvas.style) {
+            canvas.style.height = "".concat(canvas.height, "px");
+          }
+        }
+      }
+
+      var cWidth = canvas.clientWidth || canvas.width;
+      var cHeight = canvas.clientHeight || canvas.height;
+
+      if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
+        cWidth = widthStyle.getPixels('x');
+        cHeight = heightStyle.getPixels('y');
+      }
+
+      viewPort.setCurrent(cWidth, cHeight);
+
+      if (typeof offsetX === 'number') {
+        element.getAttribute('x', true).setValue(offsetX);
+      }
+
+      if (typeof offsetY === 'number') {
+        element.getAttribute('y', true).setValue(offsetY);
+      }
+
+      if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {
+        var viewBox = toNumbers(element.getAttribute('viewBox').getString());
+        var xRatio = 0;
+        var yRatio = 0;
+
+        if (typeof scaleWidth === 'number') {
+          var _widthStyle = element.getStyle('width');
+
+          if (_widthStyle.hasValue()) {
+            xRatio = _widthStyle.getPixels('x') / scaleWidth;
+          } else if (!isNaN(viewBox[2])) {
+            xRatio = viewBox[2] / scaleWidth;
+          }
+        }
+
+        if (typeof scaleHeight === 'number') {
+          var _heightStyle = element.getStyle('height');
+
+          if (_heightStyle.hasValue()) {
+            yRatio = _heightStyle.getPixels('y') / scaleHeight;
+          } else if (!isNaN(viewBox[3])) {
+            yRatio = viewBox[3] / scaleHeight;
+          }
+        }
+
+        if (!xRatio) {
+          xRatio = yRatio;
+        }
+
+        if (!yRatio) {
+          yRatio = xRatio;
+        }
+
+        element.getAttribute('width', true).setValue(scaleWidth);
+        element.getAttribute('height', true).setValue(scaleHeight);
+        var transformStyle = element.getStyle('transform', true, true);
+        transformStyle.setValue("".concat(transformStyle.getString(), " scale(").concat(1.0 / xRatio, ", ").concat(1.0 / yRatio, ")"));
+      } // clear and render
+
+
+      if (!ignoreClear) {
+        ctx.clearRect(0, 0, cWidth, cHeight);
+      }
+
+      element.render(ctx);
+
+      if (isFirstRender) {
+        this.isFirstRender = false;
+      }
+    }
+  }]);
+
+  return Screen;
+}();
+Screen.defaultWindow = defaultWindow;
+Screen.defaultFetch = defaultFetch$1;
+
+var defaultFetch = Screen.defaultFetch;
+var DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : null;
+
+var Parser = /*#__PURE__*/function () {
+  function Parser() {
+    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
+        _ref$fetch = _ref.fetch,
+        fetch = _ref$fetch === void 0 ? defaultFetch : _ref$fetch,
+        _ref$DOMParser = _ref.DOMParser,
+        DOMParser = _ref$DOMParser === void 0 ? DefaultDOMParser : _ref$DOMParser;
+
+    _classCallCheck__default["default"](this, Parser);
+
+    this.fetch = fetch;
+    this.DOMParser = DOMParser;
+  }
+
+  _createClass__default["default"](Parser, [{
+    key: "parse",
+    value: function () {
+      var _parse = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(resource) {
+        return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                if (!resource.startsWith('<')) {
+                  _context.next = 2;
+                  break;
+                }
+
+                return _context.abrupt("return", this.parseFromString(resource));
+
+              case 2:
+                return _context.abrupt("return", this.load(resource));
+
+              case 3:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee, this);
+      }));
+
+      function parse(_x) {
+        return _parse.apply(this, arguments);
+      }
+
+      return parse;
+    }()
+  }, {
+    key: "parseFromString",
+    value: function parseFromString(xml) {
+      var parser = new this.DOMParser();
+
+      try {
+        return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
+      } catch (err) {
+        return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
+      }
+    }
+  }, {
+    key: "checkDocument",
+    value: function checkDocument(document) {
+      var parserError = document.getElementsByTagName('parsererror')[0];
+
+      if (parserError) {
+        throw new Error(parserError.textContent);
+      }
+
+      return document;
+    }
+  }, {
+    key: "load",
+    value: function () {
+      var _load = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(url) {
+        var response, xml;
+        return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
+          while (1) {
+            switch (_context2.prev = _context2.next) {
+              case 0:
+                _context2.next = 2;
+                return this.fetch(url);
+
+              case 2:
+                response = _context2.sent;
+                _context2.next = 5;
+                return response.text();
+
+              case 5:
+                xml = _context2.sent;
+                return _context2.abrupt("return", this.parseFromString(xml));
+
+              case 7:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2, this);
+      }));
+
+      function load(_x2) {
+        return _load.apply(this, arguments);
+      }
+
+      return load;
+    }()
+  }]);
+
+  return Parser;
+}();
+
+var Translate = /*#__PURE__*/function () {
+  function Translate(_, point) {
+    _classCallCheck__default["default"](this, Translate);
+
+    this.type = 'translate';
+    this.point = null;
+    this.point = Point.parse(point);
+  }
+
+  _createClass__default["default"](Translate, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var _this$point = this.point,
+          x = _this$point.x,
+          y = _this$point.y;
+      ctx.translate(x || 0.0, y || 0.0);
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var _this$point2 = this.point,
+          x = _this$point2.x,
+          y = _this$point2.y;
+      ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
+    }
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      var _this$point3 = this.point,
+          x = _this$point3.x,
+          y = _this$point3.y;
+      point.applyTransform([1, 0, 0, 1, x || 0.0, y || 0.0]);
+    }
+  }]);
+
+  return Translate;
+}();
+
+var Rotate = /*#__PURE__*/function () {
+  function Rotate(document, rotate, transformOrigin) {
+    _classCallCheck__default["default"](this, Rotate);
+
+    this.type = 'rotate';
+    this.angle = null;
+    this.originX = null;
+    this.originY = null;
+    this.cx = 0;
+    this.cy = 0;
+    var numbers = toNumbers(rotate);
+    this.angle = new Property(document, 'angle', numbers[0]);
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+    this.cx = numbers[1] || 0;
+    this.cy = numbers[2] || 0;
+  }
+
+  _createClass__default["default"](Rotate, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var cx = this.cx,
+          cy = this.cy,
+          originX = this.originX,
+          originY = this.originY,
+          angle = this.angle;
+      var tx = cx + originX.getPixels('x');
+      var ty = cy + originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.rotate(angle.getRadians());
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var cx = this.cx,
+          cy = this.cy,
+          originX = this.originX,
+          originY = this.originY,
+          angle = this.angle;
+      var tx = cx + originX.getPixels('x');
+      var ty = cy + originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.rotate(-1.0 * angle.getRadians());
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      var cx = this.cx,
+          cy = this.cy,
+          angle = this.angle;
+      var rad = angle.getRadians();
+      point.applyTransform([1, 0, 0, 1, cx || 0.0, cy || 0.0 // this.p.y
+      ]);
+      point.applyTransform([Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0]);
+      point.applyTransform([1, 0, 0, 1, -cx || 0.0, -cy || 0.0 // -this.p.y
+      ]);
+    }
+  }]);
+
+  return Rotate;
+}();
+
+var Scale = /*#__PURE__*/function () {
+  function Scale(_, scale, transformOrigin) {
+    _classCallCheck__default["default"](this, Scale);
+
+    this.type = 'scale';
+    this.scale = null;
+    this.originX = null;
+    this.originY = null;
+    var scaleSize = Point.parseScale(scale); // Workaround for node-canvas
+
+    if (scaleSize.x === 0 || scaleSize.y === 0) {
+      scaleSize.x = PSEUDO_ZERO;
+      scaleSize.y = PSEUDO_ZERO;
+    }
+
+    this.scale = scaleSize;
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+  }
+
+  _createClass__default["default"](Scale, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var _this$scale = this.scale,
+          x = _this$scale.x,
+          y = _this$scale.y,
+          originX = this.originX,
+          originY = this.originY;
+      var tx = originX.getPixels('x');
+      var ty = originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.scale(x, y || x);
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var _this$scale2 = this.scale,
+          x = _this$scale2.x,
+          y = _this$scale2.y,
+          originX = this.originX,
+          originY = this.originY;
+      var tx = originX.getPixels('x');
+      var ty = originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.scale(1.0 / x, 1.0 / y || x);
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      var _this$scale3 = this.scale,
+          x = _this$scale3.x,
+          y = _this$scale3.y;
+      point.applyTransform([x || 0.0, 0, 0, y || 0.0, 0, 0]);
+    }
+  }]);
+
+  return Scale;
+}();
+
+var Matrix = /*#__PURE__*/function () {
+  function Matrix(_, matrix, transformOrigin) {
+    _classCallCheck__default["default"](this, Matrix);
+
+    this.type = 'matrix';
+    this.matrix = [];
+    this.originX = null;
+    this.originY = null;
+    this.matrix = toNumbers(matrix);
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+  }
+
+  _createClass__default["default"](Matrix, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var originX = this.originX,
+          originY = this.originY,
+          matrix = this.matrix;
+      var tx = originX.getPixels('x');
+      var ty = originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var originX = this.originX,
+          originY = this.originY,
+          matrix = this.matrix;
+      var a = matrix[0];
+      var b = matrix[2];
+      var c = matrix[4];
+      var d = matrix[1];
+      var e = matrix[3];
+      var f = matrix[5];
+      var g = 0.0;
+      var h = 0.0;
+      var i = 1.0;
+      var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
+      var tx = originX.getPixels('x');
+      var ty = originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      point.applyTransform(this.matrix);
+    }
+  }]);
+
+  return Matrix;
+}();
+
+function _createSuper$M(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$M(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$M() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var Skew = /*#__PURE__*/function (_Matrix) {
+  _inherits__default["default"](Skew, _Matrix);
+
+  var _super = _createSuper$M(Skew);
+
+  function Skew(document, skew, transformOrigin) {
+    var _this;
+
+    _classCallCheck__default["default"](this, Skew);
+
+    _this = _super.call(this, document, skew, transformOrigin);
+    _this.type = 'skew';
+    _this.angle = null;
+    _this.angle = new Property(document, 'angle', skew);
+    return _this;
+  }
+
+  return Skew;
+}(Matrix);
+
+function _createSuper$L(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$L(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$L() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var SkewX = /*#__PURE__*/function (_Skew) {
+  _inherits__default["default"](SkewX, _Skew);
+
+  var _super = _createSuper$L(SkewX);
+
+  function SkewX(document, skew, transformOrigin) {
+    var _this;
+
+    _classCallCheck__default["default"](this, SkewX);
+
+    _this = _super.call(this, document, skew, transformOrigin);
+    _this.type = 'skewX';
+    _this.matrix = [1, 0, Math.tan(_this.angle.getRadians()), 1, 0, 0];
+    return _this;
+  }
+
+  return SkewX;
+}(Skew);
+
+function _createSuper$K(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$K(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$K() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var SkewY = /*#__PURE__*/function (_Skew) {
+  _inherits__default["default"](SkewY, _Skew);
+
+  var _super = _createSuper$K(SkewY);
+
+  function SkewY(document, skew, transformOrigin) {
+    var _this;
+
+    _classCallCheck__default["default"](this, SkewY);
+
+    _this = _super.call(this, document, skew, transformOrigin);
+    _this.type = 'skewY';
+    _this.matrix = [1, Math.tan(_this.angle.getRadians()), 0, 1, 0, 0];
+    return _this;
+  }
+
+  return SkewY;
+}(Skew);
+
+function parseTransforms(transform) {
+  return compressSpaces(transform).trim().replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g, ') ').split(/\s(?=[a-z])/);
+}
+
+function parseTransform(transform) {
+  var _transform$split = transform.split('('),
+      _transform$split2 = _slicedToArray__default["default"](_transform$split, 2),
+      type = _transform$split2[0],
+      value = _transform$split2[1];
+
+  return [type.trim(), value.trim().replace(')', '')];
+}
+
+var Transform = /*#__PURE__*/function () {
+  function Transform(document, transform, transformOrigin) {
+    var _this = this;
+
+    _classCallCheck__default["default"](this, Transform);
+
+    this.document = document;
+    this.transforms = [];
+    var data = parseTransforms(transform);
+    data.forEach(function (transform) {
+      if (transform === 'none') {
+        return;
+      }
+
+      var _parseTransform = parseTransform(transform),
+          _parseTransform2 = _slicedToArray__default["default"](_parseTransform, 2),
+          type = _parseTransform2[0],
+          value = _parseTransform2[1];
+
+      var TransformType = Transform.transformTypes[type];
+
+      if (typeof TransformType !== 'undefined') {
+        _this.transforms.push(new TransformType(_this.document, value, transformOrigin));
+      }
+    });
+  }
+
+  _createClass__default["default"](Transform, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var transforms = this.transforms;
+      var len = transforms.length;
+
+      for (var i = 0; i < len; i++) {
+        transforms[i].apply(ctx);
+      }
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var transforms = this.transforms;
+      var len = transforms.length;
+
+      for (var i = len - 1; i >= 0; i--) {
+        transforms[i].unapply(ctx);
+      }
+    } // TODO: applyToPoint unused ... remove?
+
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      var transforms = this.transforms;
+      var len = transforms.length;
+
+      for (var i = 0; i < len; i++) {
+        transforms[i].applyToPoint(point);
+      }
+    }
+  }], [{
+    key: "fromElement",
+    value: function fromElement(document, element) {
+      var transformStyle = element.getStyle('transform', false, true);
+
+      var _element$getStyle$spl = element.getStyle('transform-origin', false, true).split(),
+          _element$getStyle$spl2 = _slicedToArray__default["default"](_element$getStyle$spl, 2),
+          transformOriginXProperty = _element$getStyle$spl2[0],
+          _element$getStyle$spl3 = _element$getStyle$spl2[1],
+          transformOriginYProperty = _element$getStyle$spl3 === void 0 ? transformOriginXProperty : _element$getStyle$spl3;
+
+      var transformOrigin = [transformOriginXProperty, transformOriginYProperty];
+
+      if (transformStyle.hasValue()) {
+        return new Transform(document, transformStyle.getString(), transformOrigin);
+      }
+
+      return null;
+    }
+  }]);
+
+  return Transform;
+}();
+Transform.transformTypes = {
+  translate: Translate,
+  rotate: Rotate,
+  scale: Scale,
+  matrix: Matrix,
+  skewX: SkewX,
+  skewY: SkewY
+};
+
+var Element = /*#__PURE__*/function () {
+  function Element(document, node) {
+    var _this = this;
+
+    var captureTextNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+    _classCallCheck__default["default"](this, Element);
+
+    this.document = document;
+    this.node = node;
+    this.captureTextNodes = captureTextNodes;
+    this.attributes = {};
+    this.styles = {};
+    this.stylesSpecificity = {};
+    this.animationFrozen = false;
+    this.animationFrozenValue = '';
+    this.parent = null;
+    this.children = [];
+
+    if (!node || node.nodeType !== 1) {
+      // ELEMENT_NODE
+      return;
+    } // add attributes
+
+
+    Array.from(node.attributes).forEach(function (attribute) {
+      var nodeName = normalizeAttributeName(attribute.nodeName);
+      _this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
+    });
+    this.addStylesFromStyleDefinition(); // add inline styles
+
+    if (this.getAttribute('style').hasValue()) {
+      var styles = this.getAttribute('style').getString().split(';').map(function (_) {
+        return _.trim();
+      });
+      styles.forEach(function (style) {
+        if (!style) {
+          return;
+        }
+
+        var _style$split$map = style.split(':').map(function (_) {
+          return _.trim();
+        }),
+            _style$split$map2 = _slicedToArray__default["default"](_style$split$map, 2),
+            name = _style$split$map2[0],
+            value = _style$split$map2[1];
+
+        _this.styles[name] = new Property(document, name, value);
+      });
+    }
+
+    var definitions = document.definitions;
+    var id = this.getAttribute('id'); // add id
+
+    if (id.hasValue()) {
+      if (!definitions[id.getString()]) {
+        definitions[id.getString()] = this;
+      }
+    }
+
+    Array.from(node.childNodes).forEach(function (childNode) {
+      if (childNode.nodeType === 1) {
+        _this.addChild(childNode); // ELEMENT_NODE
+
+      } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {
+        var textNode = document.createTextNode(childNode);
+
+        if (textNode.getText().length > 0) {
+          _this.addChild(textNode); // TEXT_NODE
+
+        }
+      }
+    });
+  }
+
+  _createClass__default["default"](Element, [{
+    key: "getAttribute",
+    value: function getAttribute(name) {
+      var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+      var attr = this.attributes[name];
+
+      if (!attr && createIfNotExists) {
+        var _attr = new Property(this.document, name, '');
+
+        this.attributes[name] = _attr;
+        return _attr;
+      }
+
+      return attr || Property.empty(this.document);
+    }
+  }, {
+    key: "getHrefAttribute",
+    value: function getHrefAttribute() {
+      for (var key in this.attributes) {
+        if (key === 'href' || key.endsWith(':href')) {
+          return this.attributes[key];
+        }
+      }
+
+      return Property.empty(this.document);
+    }
+  }, {
+    key: "getStyle",
+    value: function getStyle(name) {
+      var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+      var skipAncestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      var style = this.styles[name];
+
+      if (style) {
+        return style;
+      }
+
+      var attr = this.getAttribute(name);
+
+      if (attr !== null && attr !== void 0 && attr.hasValue()) {
+        this.styles[name] = attr; // move up to me to cache
+
+        return attr;
+      }
+
+      if (!skipAncestors) {
+        var parent = this.parent;
+
+        if (parent) {
+          var parentStyle = parent.getStyle(name);
+
+          if (parentStyle !== null && parentStyle !== void 0 && parentStyle.hasValue()) {
+            return parentStyle;
+          }
+        }
+      }
+
+      if (createIfNotExists) {
+        var _style = new Property(this.document, name, '');
+
+        this.styles[name] = _style;
+        return _style;
+      }
+
+      return style || Property.empty(this.document);
+    }
+  }, {
+    key: "render",
+    value: function render(ctx) {
+      // don't render display=none
+      // don't render visibility=hidden
+      if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {
+        return;
+      }
+
+      ctx.save();
+
+      if (this.getStyle('mask').hasValue()) {
+        // mask
+        var mask = this.getStyle('mask').getDefinition();
+
+        if (mask) {
+          this.applyEffects(ctx);
+          mask.apply(ctx, this);
+        }
+      } else if (this.getStyle('filter').getValue('none') !== 'none') {
+        // filter
+        var filter = this.getStyle('filter').getDefinition();
+
+        if (filter) {
+          this.applyEffects(ctx);
+          filter.apply(ctx, this);
+        }
+      } else {
+        this.setContext(ctx);
+        this.renderChildren(ctx);
+        this.clearContext(ctx);
+      }
+
+      ctx.restore();
+    }
+  }, {
+    key: "setContext",
+    value: function setContext(_) {// NO RENDER
+    }
+  }, {
+    key: "applyEffects",
+    value: function applyEffects(ctx) {
+      // transform
+      var transform = Transform.fromElement(this.document, this);
+
+      if (transform) {
+        transform.apply(ctx);
+      } // clip
+
+
+      var clipPathStyleProp = this.getStyle('clip-path', false, true);
+
+      if (clipPathStyleProp.hasValue()) {
+        var clip = clipPathStyleProp.getDefinition();
+
+        if (clip) {
+          clip.apply(ctx);
+        }
+      }
+    }
+  }, {
+    key: "clearContext",
+    value: function clearContext(_) {// NO RENDER
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      this.children.forEach(function (child) {
+        child.render(ctx);
+      });
+    }
+  }, {
+    key: "addChild",
+    value: function addChild(childNode) {
+      var child = childNode instanceof Element ? childNode : this.document.createElement(childNode);
+      child.parent = this;
+
+      if (!Element.ignoreChildTypes.includes(child.type)) {
+        this.children.push(child);
+      }
+    }
+  }, {
+    key: "matchesSelector",
+    value: function matchesSelector(selector) {
+      var _node$getAttribute;
+
+      var node = this.node;
+
+      if (typeof node.matches === 'function') {
+        return node.matches(selector);
+      }
+
+      var styleClasses = (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'class');
+
+      if (!styleClasses || styleClasses === '') {
+        return false;
+      }
+
+      return styleClasses.split(' ').some(function (styleClass) {
+        return ".".concat(styleClass) === selector;
+      });
+    }
+  }, {
+    key: "addStylesFromStyleDefinition",
+    value: function addStylesFromStyleDefinition() {
+      var _this$document = this.document,
+          styles = _this$document.styles,
+          stylesSpecificity = _this$document.stylesSpecificity;
+
+      for (var selector in styles) {
+        if (!selector.startsWith('@') && this.matchesSelector(selector)) {
+          var style = styles[selector];
+          var specificity = stylesSpecificity[selector];
+
+          if (style) {
+            for (var name in style) {
+              var existingSpecificity = this.stylesSpecificity[name];
+
+              if (typeof existingSpecificity === 'undefined') {
+                existingSpecificity = '000';
+              }
+
+              if (specificity >= existingSpecificity) {
+                this.styles[name] = style[name];
+                this.stylesSpecificity[name] = specificity;
+              }
+            }
+          }
+        }
+      }
+    }
+  }, {
+    key: "removeStyles",
+    value: function removeStyles(element, ignoreStyles) {
+      var toRestore = ignoreStyles.reduce(function (toRestore, name) {
+        var styleProp = element.getStyle(name);
+
+        if (!styleProp.hasValue()) {
+          return toRestore;
+        }
+
+        var value = styleProp.getString();
+        styleProp.setValue('');
+        return [].concat(_toConsumableArray__default["default"](toRestore), [[name, value]]);
+      }, []);
+      return toRestore;
+    }
+  }, {
+    key: "restoreStyles",
+    value: function restoreStyles(element, styles) {
+      styles.forEach(function (_ref) {
+        var _ref2 = _slicedToArray__default["default"](_ref, 2),
+            name = _ref2[0],
+            value = _ref2[1];
+
+        element.getStyle(name, true).setValue(value);
+      });
+    }
+  }, {
+    key: "isFirstChild",
+    value: function isFirstChild() {
+      var _this$parent;
+
+      return ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.children.indexOf(this)) === 0;
+    }
+  }]);
+
+  return Element;
+}();
+Element.ignoreChildTypes = ['title'];
+
+function _createSuper$J(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$J(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$J() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var UnknownElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](UnknownElement, _Element);
+
+  var _super = _createSuper$J(UnknownElement);
+
+  function UnknownElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, UnknownElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+
+    return _this;
+  }
+
+  return UnknownElement;
+}(Element);
+
+function wrapFontFamily(fontFamily) {
+  var trimmed = fontFamily.trim();
+  return /^('|")/.test(trimmed) ? trimmed : "\"".concat(trimmed, "\"");
+}
+
+function prepareFontFamily(fontFamily) {
+  return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
+}
+/**
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
+ * @param fontStyle
+ * @returns CSS font style.
+ */
+
+
+function prepareFontStyle(fontStyle) {
+  if (!fontStyle) {
+    return '';
+  }
+
+  var targetFontStyle = fontStyle.trim().toLowerCase();
+
+  switch (targetFontStyle) {
+    case 'normal':
+    case 'italic':
+    case 'oblique':
+    case 'inherit':
+    case 'initial':
+    case 'unset':
+      return targetFontStyle;
+
+    default:
+      if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
+        return targetFontStyle;
+      }
+
+      return '';
+  }
+}
+/**
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
+ * @param fontWeight
+ * @returns CSS font weight.
+ */
+
+
+function prepareFontWeight(fontWeight) {
+  if (!fontWeight) {
+    return '';
+  }
+
+  var targetFontWeight = fontWeight.trim().toLowerCase();
+
+  switch (targetFontWeight) {
+    case 'normal':
+    case 'bold':
+    case 'lighter':
+    case 'bolder':
+    case 'inherit':
+    case 'initial':
+    case 'unset':
+      return targetFontWeight;
+
+    default:
+      if (/^[\d.]+$/.test(targetFontWeight)) {
+        return targetFontWeight;
+      }
+
+      return '';
+  }
+}
+
+var Font = /*#__PURE__*/function () {
+  function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
+    _classCallCheck__default["default"](this, Font);
+
+    var inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};
+    this.fontFamily = fontFamily || inheritFont.fontFamily;
+    this.fontSize = fontSize || inheritFont.fontSize;
+    this.fontStyle = fontStyle || inheritFont.fontStyle;
+    this.fontWeight = fontWeight || inheritFont.fontWeight;
+    this.fontVariant = fontVariant || inheritFont.fontVariant;
+  }
+
+  _createClass__default["default"](Font, [{
+    key: "toString",
+    value: function toString() {
+      return [prepareFontStyle(this.fontStyle), this.fontVariant, prepareFontWeight(this.fontWeight), this.fontSize, // Wrap fontFamily only on nodejs and only for canvas.ctx
+      prepareFontFamily(this.fontFamily)].join(' ').trim();
+    }
+  }], [{
+    key: "parse",
+    value: function parse() {
+      var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+      var inherit = arguments.length > 1 ? arguments[1] : undefined;
+      var fontStyle = '';
+      var fontVariant = '';
+      var fontWeight = '';
+      var fontSize = '';
+      var fontFamily = '';
+      var parts = compressSpaces(font).trim().split(' ');
+      var set = {
+        fontSize: false,
+        fontStyle: false,
+        fontWeight: false,
+        fontVariant: false
+      };
+      parts.forEach(function (part) {
+        switch (true) {
+          case !set.fontStyle && Font.styles.includes(part):
+            if (part !== 'inherit') {
+              fontStyle = part;
+            }
+
+            set.fontStyle = true;
+            break;
+
+          case !set.fontVariant && Font.variants.includes(part):
+            if (part !== 'inherit') {
+              fontVariant = part;
+            }
+
+            set.fontStyle = true;
+            set.fontVariant = true;
+            break;
+
+          case !set.fontWeight && Font.weights.includes(part):
+            if (part !== 'inherit') {
+              fontWeight = part;
+            }
+
+            set.fontStyle = true;
+            set.fontVariant = true;
+            set.fontWeight = true;
+            break;
+
+          case !set.fontSize:
+            if (part !== 'inherit') {
+              var _part$split = part.split('/');
+
+              var _part$split2 = _slicedToArray__default["default"](_part$split, 1);
+
+              fontSize = _part$split2[0];
+            }
+
+            set.fontStyle = true;
+            set.fontVariant = true;
+            set.fontWeight = true;
+            set.fontSize = true;
+            break;
+
+          default:
+            if (part !== 'inherit') {
+              fontFamily += part;
+            }
+
+        }
+      });
+      return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
+    }
+  }]);
+
+  return Font;
+}();
+Font.styles = 'normal|italic|oblique|inherit';
+Font.variants = 'normal|small-caps|inherit';
+Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
+
+var BoundingBox = /*#__PURE__*/function () {
+  function BoundingBox() {
+    var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.NaN;
+    var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.NaN;
+    var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.NaN;
+    var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Number.NaN;
+
+    _classCallCheck__default["default"](this, BoundingBox);
+
+    this.x1 = x1;
+    this.y1 = y1;
+    this.x2 = x2;
+    this.y2 = y2;
+    this.addPoint(x1, y1);
+    this.addPoint(x2, y2);
+  }
+
+  _createClass__default["default"](BoundingBox, [{
+    key: "addPoint",
+    value: function addPoint(x, y) {
+      if (typeof x !== 'undefined') {
+        if (isNaN(this.x1) || isNaN(this.x2)) {
+          this.x1 = x;
+          this.x2 = x;
+        }
+
+        if (x < this.x1) {
+          this.x1 = x;
+        }
+
+        if (x > this.x2) {
+          this.x2 = x;
+        }
+      }
+
+      if (typeof y !== 'undefined') {
+        if (isNaN(this.y1) || isNaN(this.y2)) {
+          this.y1 = y;
+          this.y2 = y;
+        }
+
+        if (y < this.y1) {
+          this.y1 = y;
+        }
+
+        if (y > this.y2) {
+          this.y2 = y;
+        }
+      }
+    }
+  }, {
+    key: "addX",
+    value: function addX(x) {
+      this.addPoint(x, null);
+    }
+  }, {
+    key: "addY",
+    value: function addY(y) {
+      this.addPoint(null, y);
+    }
+  }, {
+    key: "addBoundingBox",
+    value: function addBoundingBox(boundingBox) {
+      if (!boundingBox) {
+        return;
+      }
+
+      var x1 = boundingBox.x1,
+          y1 = boundingBox.y1,
+          x2 = boundingBox.x2,
+          y2 = boundingBox.y2;
+      this.addPoint(x1, y1);
+      this.addPoint(x2, y2);
+    }
+  }, {
+    key: "sumCubic",
+    value: function sumCubic(t, p0, p1, p2, p3) {
+      return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;
+    }
+  }, {
+    key: "bezierCurveAdd",
+    value: function bezierCurveAdd(forX, p0, p1, p2, p3) {
+      var b = 6 * p0 - 12 * p1 + 6 * p2;
+      var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
+      var c = 3 * p1 - 3 * p0;
+
+      if (a === 0) {
+        if (b === 0) {
+          return;
+        }
+
+        var t = -c / b;
+
+        if (0 < t && t < 1) {
+          if (forX) {
+            this.addX(this.sumCubic(t, p0, p1, p2, p3));
+          } else {
+            this.addY(this.sumCubic(t, p0, p1, p2, p3));
+          }
+        }
+
+        return;
+      }
+
+      var b2ac = Math.pow(b, 2) - 4 * c * a;
+
+      if (b2ac < 0) {
+        return;
+      }
+
+      var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
+
+      if (0 < t1 && t1 < 1) {
+        if (forX) {
+          this.addX(this.sumCubic(t1, p0, p1, p2, p3));
+        } else {
+          this.addY(this.sumCubic(t1, p0, p1, p2, p3));
+        }
+      }
+
+      var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
+
+      if (0 < t2 && t2 < 1) {
+        if (forX) {
+          this.addX(this.sumCubic(t2, p0, p1, p2, p3));
+        } else {
+          this.addY(this.sumCubic(t2, p0, p1, p2, p3));
+        }
+      }
+    } // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
+
+  }, {
+    key: "addBezierCurve",
+    value: function addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
+      this.addPoint(p0x, p0y);
+      this.addPoint(p3x, p3y);
+      this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
+      this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
+    }
+  }, {
+    key: "addQuadraticCurve",
+    value: function addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
+      var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
+
+      var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
+
+      var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
+
+      var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
+
+      this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
+    }
+  }, {
+    key: "isPointInBox",
+    value: function isPointInBox(x, y) {
+      var x1 = this.x1,
+          y1 = this.y1,
+          x2 = this.x2,
+          y2 = this.y2;
+      return x1 <= x && x <= x2 && y1 <= y && y <= y2;
+    }
+  }, {
+    key: "x",
+    get: function get() {
+      return this.x1;
+    }
+  }, {
+    key: "y",
+    get: function get() {
+      return this.y1;
+    }
+  }, {
+    key: "width",
+    get: function get() {
+      return this.x2 - this.x1;
+    }
+  }, {
+    key: "height",
+    get: function get() {
+      return this.y2 - this.y1;
+    }
+  }]);
+
+  return BoundingBox;
+}();
+
+function _createSuper$I(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$I(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$I() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var PathParser = /*#__PURE__*/function (_SVGPathData) {
+  _inherits__default["default"](PathParser, _SVGPathData);
+
+  var _super = _createSuper$I(PathParser);
+
+  function PathParser(path) {
+    var _this;
+
+    _classCallCheck__default["default"](this, PathParser);
+
+    _this = _super.call(this, path // Fix spaces after signs.
+    .replace(/([+\-.])\s+/gm, '$1') // Remove invalid part.
+    .replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g, ''));
+    _this.control = null;
+    _this.start = null;
+    _this.current = null;
+    _this.command = null;
+    _this.commands = _this.commands;
+    _this.i = -1;
+    _this.previousCommand = null;
+    _this.points = [];
+    _this.angles = [];
+    return _this;
+  }
+
+  _createClass__default["default"](PathParser, [{
+    key: "reset",
+    value: function reset() {
+      this.i = -1;
+      this.command = null;
+      this.previousCommand = null;
+      this.start = new Point(0, 0);
+      this.control = new Point(0, 0);
+      this.current = new Point(0, 0);
+      this.points = [];
+      this.angles = [];
+    }
+  }, {
+    key: "isEnd",
+    value: function isEnd() {
+      var i = this.i,
+          commands = this.commands;
+      return i >= commands.length - 1;
+    }
+  }, {
+    key: "next",
+    value: function next() {
+      var command = this.commands[++this.i];
+      this.previousCommand = this.command;
+      this.command = command;
+      return command;
+    }
+  }, {
+    key: "getPoint",
+    value: function getPoint() {
+      var xProp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'x';
+      var yProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'y';
+      var point = new Point(this.command[xProp], this.command[yProp]);
+      return this.makeAbsolute(point);
+    }
+  }, {
+    key: "getAsControlPoint",
+    value: function getAsControlPoint(xProp, yProp) {
+      var point = this.getPoint(xProp, yProp);
+      this.control = point;
+      return point;
+    }
+  }, {
+    key: "getAsCurrentPoint",
+    value: function getAsCurrentPoint(xProp, yProp) {
+      var point = this.getPoint(xProp, yProp);
+      this.current = point;
+      return point;
+    }
+  }, {
+    key: "getReflectedControlPoint",
+    value: function getReflectedControlPoint() {
+      var previousCommand = this.previousCommand.type;
+
+      if (previousCommand !== svgPathdata.SVGPathData.CURVE_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_CURVE_TO && previousCommand !== svgPathdata.SVGPathData.QUAD_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_QUAD_TO) {
+        return this.current;
+      } // reflect point
+
+
+      var _this$current = this.current,
+          cx = _this$current.x,
+          cy = _this$current.y,
+          _this$control = this.control,
+          ox = _this$control.x,
+          oy = _this$control.y;
+      var point = new Point(2 * cx - ox, 2 * cy - oy);
+      return point;
+    }
+  }, {
+    key: "makeAbsolute",
+    value: function makeAbsolute(point) {
+      if (this.command.relative) {
+        var _this$current2 = this.current,
+            x = _this$current2.x,
+            y = _this$current2.y;
+        point.x += x;
+        point.y += y;
+      }
+
+      return point;
+    }
+  }, {
+    key: "addMarker",
+    value: function addMarker(point, from, priorTo) {
+      var points = this.points,
+          angles = this.angles; // if the last angle isn't filled in because we didn't have this point yet ...
+
+      if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
+        angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
+      }
+
+      this.addMarkerAngle(point, from ? from.angleTo(point) : null);
+    }
+  }, {
+    key: "addMarkerAngle",
+    value: function addMarkerAngle(point, angle) {
+      this.points.push(point);
+      this.angles.push(angle);
+    }
+  }, {
+    key: "getMarkerPoints",
+    value: function getMarkerPoints() {
+      return this.points;
+    }
+  }, {
+    key: "getMarkerAngles",
+    value: function getMarkerAngles() {
+      var angles = this.angles;
+      var len = angles.length;
+
+      for (var i = 0; i < len; i++) {
+        if (!angles[i]) {
+          for (var j = i + 1; j < len; j++) {
+            if (angles[j]) {
+              angles[i] = angles[j];
+              break;
+            }
+          }
+        }
+      }
+
+      return angles;
+    }
+  }]);
+
+  return PathParser;
+}(svgPathdata.SVGPathData);
+
+function _createSuper$H(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$H(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$H() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var RenderedElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](RenderedElement, _Element);
+
+  var _super = _createSuper$H(RenderedElement);
+
+  function RenderedElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, RenderedElement);
+
+    _this = _super.apply(this, arguments);
+    _this.modifiedEmSizeStack = false;
+    return _this;
+  }
+
+  _createClass__default["default"](RenderedElement, [{
+    key: "calculateOpacity",
+    value: function calculateOpacity() {
+      var opacity = 1.0; // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
+
+      var element = this;
+
+      while (element) {
+        var opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
+
+        if (opacityStyle.hasValue(true)) {
+          opacity *= opacityStyle.getNumber();
+        }
+
+        element = element.parent;
+      }
+
+      return opacity;
+    }
+  }, {
+    key: "setContext",
+    value: function setContext(ctx) {
+      var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      if (!fromMeasure) {
+        // causes stack overflow when measuring text with gradients
+        // fill
+        var fillStyleProp = this.getStyle('fill');
+        var fillOpacityStyleProp = this.getStyle('fill-opacity');
+        var strokeStyleProp = this.getStyle('stroke');
+        var strokeOpacityProp = this.getStyle('stroke-opacity');
+
+        if (fillStyleProp.isUrlDefinition()) {
+          var fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
+
+          if (fillStyle) {
+            ctx.fillStyle = fillStyle;
+          }
+        } else if (fillStyleProp.hasValue()) {
+          if (fillStyleProp.getString() === 'currentColor') {
+            fillStyleProp.setValue(this.getStyle('color').getColor());
+          }
+
+          var _fillStyle = fillStyleProp.getColor();
+
+          if (_fillStyle !== 'inherit') {
+            ctx.fillStyle = _fillStyle === 'none' ? 'rgba(0,0,0,0)' : _fillStyle;
+          }
+        }
+
+        if (fillOpacityStyleProp.hasValue()) {
+          var _fillStyle2 = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();
+
+          ctx.fillStyle = _fillStyle2;
+        } // stroke
+
+
+        if (strokeStyleProp.isUrlDefinition()) {
+          var strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
+
+          if (strokeStyle) {
+            ctx.strokeStyle = strokeStyle;
+          }
+        } else if (strokeStyleProp.hasValue()) {
+          if (strokeStyleProp.getString() === 'currentColor') {
+            strokeStyleProp.setValue(this.getStyle('color').getColor());
+          }
+
+          var _strokeStyle = strokeStyleProp.getString();
+
+          if (_strokeStyle !== 'inherit') {
+            ctx.strokeStyle = _strokeStyle === 'none' ? 'rgba(0,0,0,0)' : _strokeStyle;
+          }
+        }
+
+        if (strokeOpacityProp.hasValue()) {
+          var _strokeStyle2 = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();
+
+          ctx.strokeStyle = _strokeStyle2;
+        }
+
+        var strokeWidthStyleProp = this.getStyle('stroke-width');
+
+        if (strokeWidthStyleProp.hasValue()) {
+          var newLineWidth = strokeWidthStyleProp.getPixels();
+          ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
+          : newLineWidth;
+        }
+
+        var strokeLinecapStyleProp = this.getStyle('stroke-linecap');
+        var strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
+        var strokeMiterlimitProp = this.getStyle('stroke-miterlimit'); // NEED TEST
+        // const pointOrderStyleProp = this.getStyle('paint-order');
+
+        var strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
+        var strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
+
+        if (strokeLinecapStyleProp.hasValue()) {
+          ctx.lineCap = strokeLinecapStyleProp.getString();
+        }
+
+        if (strokeLinejoinStyleProp.hasValue()) {
+          ctx.lineJoin = strokeLinejoinStyleProp.getString();
+        }
+
+        if (strokeMiterlimitProp.hasValue()) {
+          ctx.miterLimit = strokeMiterlimitProp.getNumber();
+        } // NEED TEST
+        // if (pointOrderStyleProp.hasValue()) {
+        // 	// ?
+        // 	ctx.paintOrder = pointOrderStyleProp.getValue();
+        // }
+
+
+        if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
+          var gaps = toNumbers(strokeDasharrayStyleProp.getString());
+
+          if (typeof ctx.setLineDash !== 'undefined') {
+            ctx.setLineDash(gaps);
+          } else // @ts-expect-error Handle browser prefix.
+            if (typeof ctx.webkitLineDash !== 'undefined') {
+              // @ts-expect-error Handle browser prefix.
+              ctx.webkitLineDash = gaps;
+            } else // @ts-expect-error Handle browser prefix.
+              if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
+                // @ts-expect-error Handle browser prefix.
+                ctx.mozDash = gaps;
+              }
+
+          var offset = strokeDashoffsetProp.getPixels();
+
+          if (typeof ctx.lineDashOffset !== 'undefined') {
+            ctx.lineDashOffset = offset;
+          } else // @ts-expect-error Handle browser prefix.
+            if (typeof ctx.webkitLineDashOffset !== 'undefined') {
+              // @ts-expect-error Handle browser prefix.
+              ctx.webkitLineDashOffset = offset;
+            } else // @ts-expect-error Handle browser prefix.
+              if (typeof ctx.mozDashOffset !== 'undefined') {
+                // @ts-expect-error Handle browser prefix.
+                ctx.mozDashOffset = offset;
+              }
+        }
+      } // font
+
+
+      this.modifiedEmSizeStack = false;
+
+      if (typeof ctx.font !== 'undefined') {
+        var fontStyleProp = this.getStyle('font');
+        var fontStyleStyleProp = this.getStyle('font-style');
+        var fontVariantStyleProp = this.getStyle('font-variant');
+        var fontWeightStyleProp = this.getStyle('font-weight');
+        var fontSizeStyleProp = this.getStyle('font-size');
+        var fontFamilyStyleProp = this.getStyle('font-family');
+        var font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? "".concat(fontSizeStyleProp.getPixels(true), "px") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));
+        fontStyleStyleProp.setValue(font.fontStyle);
+        fontVariantStyleProp.setValue(font.fontVariant);
+        fontWeightStyleProp.setValue(font.fontWeight);
+        fontSizeStyleProp.setValue(font.fontSize);
+        fontFamilyStyleProp.setValue(font.fontFamily);
+        ctx.font = font.toString();
+
+        if (fontSizeStyleProp.isPixels()) {
+          this.document.emSize = fontSizeStyleProp.getPixels();
+          this.modifiedEmSizeStack = true;
+        }
+      }
+
+      if (!fromMeasure) {
+        // effects
+        this.applyEffects(ctx); // opacity
+
+        ctx.globalAlpha = this.calculateOpacity();
+      }
+    }
+  }, {
+    key: "clearContext",
+    value: function clearContext(ctx) {
+      _get__default["default"](_getPrototypeOf__default["default"](RenderedElement.prototype), "clearContext", this).call(this, ctx);
+
+      if (this.modifiedEmSizeStack) {
+        this.document.popEmSize();
+      }
+    }
+  }]);
+
+  return RenderedElement;
+}(Element);
+
+function _createSuper$G(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$G(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$G() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var PathElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default["default"](PathElement, _RenderedElement);
+
+  var _super = _createSuper$G(PathElement);
+
+  function PathElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, PathElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'path';
+    _this.pathParser = null;
+    _this.pathParser = new PathParser(_this.getAttribute('d').getString());
+    return _this;
+  }
+
+  _createClass__default["default"](PathElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var pathParser = this.pathParser;
+      var boundingBox = new BoundingBox();
+      pathParser.reset();
+
+      if (ctx) {
+        ctx.beginPath();
+      }
+
+      while (!pathParser.isEnd()) {
+        switch (pathParser.next().type) {
+          case PathParser.MOVE_TO:
+            this.pathM(ctx, boundingBox);
+            break;
+
+          case PathParser.LINE_TO:
+            this.pathL(ctx, boundingBox);
+            break;
+
+          case PathParser.HORIZ_LINE_TO:
+            this.pathH(ctx, boundingBox);
+            break;
+
+          case PathParser.VERT_LINE_TO:
+            this.pathV(ctx, boundingBox);
+            break;
+
+          case PathParser.CURVE_TO:
+            this.pathC(ctx, boundingBox);
+            break;
+
+          case PathParser.SMOOTH_CURVE_TO:
+            this.pathS(ctx, boundingBox);
+            break;
+
+          case PathParser.QUAD_TO:
+            this.pathQ(ctx, boundingBox);
+            break;
+
+          case PathParser.SMOOTH_QUAD_TO:
+            this.pathT(ctx, boundingBox);
+            break;
+
+          case PathParser.ARC:
+            this.pathA(ctx, boundingBox);
+            break;
+
+          case PathParser.CLOSE_PATH:
+            this.pathZ(ctx, boundingBox);
+            break;
+        }
+      }
+
+      return boundingBox;
+    }
+  }, {
+    key: "getBoundingBox",
+    value: function getBoundingBox(_) {
+      return this.path();
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      var pathParser = this.pathParser;
+      var points = pathParser.getMarkerPoints();
+      var angles = pathParser.getMarkerAngles();
+      var markers = points.map(function (point, i) {
+        return [point, angles[i]];
+      });
+      return markers;
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      this.path(ctx);
+      this.document.screen.mouse.checkPath(this, ctx);
+      var fillRuleStyleProp = this.getStyle('fill-rule');
+
+      if (ctx.fillStyle !== '') {
+        if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
+          ctx.fill(fillRuleStyleProp.getString());
+        } else {
+          ctx.fill();
+        }
+      }
+
+      if (ctx.strokeStyle !== '') {
+        if (this.getAttribute('vector-effect').getString() === 'non-scaling-stroke') {
+          ctx.save();
+          ctx.setTransform(1, 0, 0, 1, 0, 0);
+          ctx.stroke();
+          ctx.restore();
+        } else {
+          ctx.stroke();
+        }
+      }
+
+      var markers = this.getMarkers();
+
+      if (markers) {
+        var markersLastIndex = markers.length - 1;
+        var markerStartStyleProp = this.getStyle('marker-start');
+        var markerMidStyleProp = this.getStyle('marker-mid');
+        var markerEndStyleProp = this.getStyle('marker-end');
+
+        if (markerStartStyleProp.isUrlDefinition()) {
+          var marker = markerStartStyleProp.getDefinition();
+
+          var _markers$ = _slicedToArray__default["default"](markers[0], 2),
+              point = _markers$[0],
+              angle = _markers$[1];
+
+          marker.render(ctx, point, angle);
+        }
+
+        if (markerMidStyleProp.isUrlDefinition()) {
+          var _marker = markerMidStyleProp.getDefinition();
+
+          for (var i = 1; i < markersLastIndex; i++) {
+            var _markers$i = _slicedToArray__default["default"](markers[i], 2),
+                _point = _markers$i[0],
+                _angle = _markers$i[1];
+
+            _marker.render(ctx, _point, _angle);
+          }
+        }
+
+        if (markerEndStyleProp.isUrlDefinition()) {
+          var _marker2 = markerEndStyleProp.getDefinition();
+
+          var _markers$markersLastI = _slicedToArray__default["default"](markers[markersLastIndex], 2),
+              _point2 = _markers$markersLastI[0],
+              _angle2 = _markers$markersLastI[1];
+
+          _marker2.render(ctx, _point2, _angle2);
+        }
+      }
+    }
+  }, {
+    key: "pathM",
+    value: function pathM(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathM = PathElement.pathM(pathParser),
+          point = _PathElement$pathM.point;
+
+      var x = point.x,
+          y = point.y;
+      pathParser.addMarker(point);
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.moveTo(x, y);
+      }
+    }
+  }, {
+    key: "pathL",
+    value: function pathL(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathL = PathElement.pathL(pathParser),
+          current = _PathElement$pathL.current,
+          point = _PathElement$pathL.point;
+
+      var x = point.x,
+          y = point.y;
+      pathParser.addMarker(point, current);
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+      }
+    }
+  }, {
+    key: "pathH",
+    value: function pathH(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathH = PathElement.pathH(pathParser),
+          current = _PathElement$pathH.current,
+          point = _PathElement$pathH.point;
+
+      var x = point.x,
+          y = point.y;
+      pathParser.addMarker(point, current);
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+      }
+    }
+  }, {
+    key: "pathV",
+    value: function pathV(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathV = PathElement.pathV(pathParser),
+          current = _PathElement$pathV.current,
+          point = _PathElement$pathV.point;
+
+      var x = point.x,
+          y = point.y;
+      pathParser.addMarker(point, current);
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+      }
+    }
+  }, {
+    key: "pathC",
+    value: function pathC(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathC = PathElement.pathC(pathParser),
+          current = _PathElement$pathC.current,
+          point = _PathElement$pathC.point,
+          controlPoint = _PathElement$pathC.controlPoint,
+          currentPoint = _PathElement$pathC.currentPoint;
+
+      pathParser.addMarker(currentPoint, controlPoint, point);
+      boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+      if (ctx) {
+        ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      }
+    }
+  }, {
+    key: "pathS",
+    value: function pathS(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathS = PathElement.pathS(pathParser),
+          current = _PathElement$pathS.current,
+          point = _PathElement$pathS.point,
+          controlPoint = _PathElement$pathS.controlPoint,
+          currentPoint = _PathElement$pathS.currentPoint;
+
+      pathParser.addMarker(currentPoint, controlPoint, point);
+      boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+      if (ctx) {
+        ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      }
+    }
+  }, {
+    key: "pathQ",
+    value: function pathQ(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathQ = PathElement.pathQ(pathParser),
+          current = _PathElement$pathQ.current,
+          controlPoint = _PathElement$pathQ.controlPoint,
+          currentPoint = _PathElement$pathQ.currentPoint;
+
+      pathParser.addMarker(currentPoint, controlPoint, controlPoint);
+      boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+      if (ctx) {
+        ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      }
+    }
+  }, {
+    key: "pathT",
+    value: function pathT(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathT = PathElement.pathT(pathParser),
+          current = _PathElement$pathT.current,
+          controlPoint = _PathElement$pathT.controlPoint,
+          currentPoint = _PathElement$pathT.currentPoint;
+
+      pathParser.addMarker(currentPoint, controlPoint, controlPoint);
+      boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+      if (ctx) {
+        ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      }
+    }
+  }, {
+    key: "pathA",
+    value: function pathA(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathA = PathElement.pathA(pathParser),
+          currentPoint = _PathElement$pathA.currentPoint,
+          rX = _PathElement$pathA.rX,
+          rY = _PathElement$pathA.rY,
+          sweepFlag = _PathElement$pathA.sweepFlag,
+          xAxisRotation = _PathElement$pathA.xAxisRotation,
+          centp = _PathElement$pathA.centp,
+          a1 = _PathElement$pathA.a1,
+          ad = _PathElement$pathA.ad; // for markers
+
+
+      var dir = 1 - sweepFlag ? 1.0 : -1.0;
+      var ah = a1 + dir * (ad / 2.0);
+      var halfWay = new Point(centp.x + rX * Math.cos(ah), centp.y + rY * Math.sin(ah));
+      pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
+      pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
+      boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
+
+      if (ctx && !isNaN(a1) && !isNaN(ad)) {
+        var r = rX > rY ? rX : rY;
+        var sx = rX > rY ? 1 : rX / rY;
+        var sy = rX > rY ? rY / rX : 1;
+        ctx.translate(centp.x, centp.y);
+        ctx.rotate(xAxisRotation);
+        ctx.scale(sx, sy);
+        ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
+        ctx.scale(1 / sx, 1 / sy);
+        ctx.rotate(-xAxisRotation);
+        ctx.translate(-centp.x, -centp.y);
+      }
+    }
+  }, {
+    key: "pathZ",
+    value: function pathZ(ctx, boundingBox) {
+      PathElement.pathZ(this.pathParser);
+
+      if (ctx) {
+        // only close path if it is not a straight line
+        if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {
+          ctx.closePath();
+        }
+      }
+    }
+  }], [{
+    key: "pathM",
+    value: function pathM(pathParser) {
+      var point = pathParser.getAsCurrentPoint();
+      pathParser.start = pathParser.current;
+      return {
+        point: point
+      };
+    }
+  }, {
+    key: "pathL",
+    value: function pathL(pathParser) {
+      var current = pathParser.current;
+      var point = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        point: point
+      };
+    }
+  }, {
+    key: "pathH",
+    value: function pathH(pathParser) {
+      var current = pathParser.current,
+          command = pathParser.command;
+      var point = new Point((command.relative ? current.x : 0) + command.x, current.y);
+      pathParser.current = point;
+      return {
+        current: current,
+        point: point
+      };
+    }
+  }, {
+    key: "pathV",
+    value: function pathV(pathParser) {
+      var current = pathParser.current,
+          command = pathParser.command;
+      var point = new Point(current.x, (command.relative ? current.y : 0) + command.y);
+      pathParser.current = point;
+      return {
+        current: current,
+        point: point
+      };
+    }
+  }, {
+    key: "pathC",
+    value: function pathC(pathParser) {
+      var current = pathParser.current;
+      var point = pathParser.getPoint('x1', 'y1');
+      var controlPoint = pathParser.getAsControlPoint('x2', 'y2');
+      var currentPoint = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        point: point,
+        controlPoint: controlPoint,
+        currentPoint: currentPoint
+      };
+    }
+  }, {
+    key: "pathS",
+    value: function pathS(pathParser) {
+      var current = pathParser.current;
+      var point = pathParser.getReflectedControlPoint();
+      var controlPoint = pathParser.getAsControlPoint('x2', 'y2');
+      var currentPoint = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        point: point,
+        controlPoint: controlPoint,
+        currentPoint: currentPoint
+      };
+    }
+  }, {
+    key: "pathQ",
+    value: function pathQ(pathParser) {
+      var current = pathParser.current;
+      var controlPoint = pathParser.getAsControlPoint('x1', 'y1');
+      var currentPoint = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        controlPoint: controlPoint,
+        currentPoint: currentPoint
+      };
+    }
+  }, {
+    key: "pathT",
+    value: function pathT(pathParser) {
+      var current = pathParser.current;
+      var controlPoint = pathParser.getReflectedControlPoint();
+      pathParser.control = controlPoint;
+      var currentPoint = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        controlPoint: controlPoint,
+        currentPoint: currentPoint
+      };
+    }
+  }, {
+    key: "pathA",
+    value: function pathA(pathParser) {
+      var current = pathParser.current,
+          command = pathParser.command;
+      var rX = command.rX,
+          rY = command.rY,
+          xRot = command.xRot,
+          lArcFlag = command.lArcFlag,
+          sweepFlag = command.sweepFlag;
+      var xAxisRotation = xRot * (Math.PI / 180.0);
+      var currentPoint = pathParser.getAsCurrentPoint(); // Conversion from endpoint to center parameterization
+      // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
+      // x1', y1'
+
+      var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
+
+      var l = Math.pow(currp.x, 2) / Math.pow(rX, 2) + Math.pow(currp.y, 2) / Math.pow(rY, 2);
+
+      if (l > 1) {
+        rX *= Math.sqrt(l);
+        rY *= Math.sqrt(l);
+      } // cx', cy'
+
+
+      var s = (lArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rX, 2) * Math.pow(rY, 2) - Math.pow(rX, 2) * Math.pow(currp.y, 2) - Math.pow(rY, 2) * Math.pow(currp.x, 2)) / (Math.pow(rX, 2) * Math.pow(currp.y, 2) + Math.pow(rY, 2) * Math.pow(currp.x, 2)));
+
+      if (isNaN(s)) {
+        s = 0;
+      }
+
+      var cpp = new Point(s * rX * currp.y / rY, s * -rY * currp.x / rX); // cx, cy
+
+      var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
+
+      var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rX, (currp.y - cpp.y) / rY]); // θ1
+      // angle delta
+
+      var u = [(currp.x - cpp.x) / rX, (currp.y - cpp.y) / rY];
+      var v = [(-currp.x - cpp.x) / rX, (-currp.y - cpp.y) / rY];
+      var ad = vectorsAngle(u, v); // Δθ
+
+      if (vectorsRatio(u, v) <= -1) {
+        ad = Math.PI;
+      }
+
+      if (vectorsRatio(u, v) >= 1) {
+        ad = 0;
+      }
+
+      return {
+        currentPoint: currentPoint,
+        rX: rX,
+        rY: rY,
+        sweepFlag: sweepFlag,
+        xAxisRotation: xAxisRotation,
+        centp: centp,
+        a1: a1,
+        ad: ad
+      };
+    }
+  }, {
+    key: "pathZ",
+    value: function pathZ(pathParser) {
+      pathParser.current = pathParser.start;
+    }
+  }]);
+
+  return PathElement;
+}(RenderedElement);
+
+function _createSuper$F(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$F(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$F() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var GlyphElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default["default"](GlyphElement, _PathElement);
+
+  var _super = _createSuper$F(GlyphElement);
+
+  function GlyphElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, GlyphElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'glyph';
+    _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
+    _this.unicode = _this.getAttribute('unicode').getString();
+    _this.arabicForm = _this.getAttribute('arabic-form').getString();
+    return _this;
+  }
+
+  return GlyphElement;
+}(PathElement);
+
+function _createSuper$E(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$E(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$E() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var TextElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default["default"](TextElement, _RenderedElement);
+
+  var _super = _createSuper$E(TextElement);
+
+  function TextElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, TextElement);
+
+    _this = _super.call(this, document, node, (this instanceof TextElement ? this.constructor : void 0) === TextElement ? true : captureTextNodes);
+    _this.type = 'text';
+    _this.x = 0;
+    _this.y = 0;
+    _this.measureCache = -1;
+    return _this;
+  }
+
+  _createClass__default["default"](TextElement, [{
+    key: "setContext",
+    value: function setContext(ctx) {
+      var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      _get__default["default"](_getPrototypeOf__default["default"](TextElement.prototype), "setContext", this).call(this, ctx, fromMeasure);
+
+      var textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();
+
+      if (textBaseline) {
+        ctx.textBaseline = textBaseline;
+      }
+    }
+  }, {
+    key: "initializeCoordinates",
+    value: function initializeCoordinates() {
+      this.x = 0;
+      this.y = 0;
+      this.leafTexts = [];
+      this.textChunkStart = 0;
+      this.minX = Number.POSITIVE_INFINITY;
+      this.maxX = Number.NEGATIVE_INFINITY;
+    }
+  }, {
+    key: "getBoundingBox",
+    value: function getBoundingBox(ctx) {
+      var _this2 = this;
+
+      if (this.type !== 'text') {
+        return this.getTElementBoundingBox(ctx);
+      } // first, calculate child positions
+
+
+      this.initializeCoordinates();
+      this.adjustChildCoordinatesRecursive(ctx);
+      var boundingBox = null; // then calculate bounding box
+
+      this.children.forEach(function (_, i) {
+        var childBoundingBox = _this2.getChildBoundingBox(ctx, _this2, _this2, i);
+
+        if (!boundingBox) {
+          boundingBox = childBoundingBox;
+        } else {
+          boundingBox.addBoundingBox(childBoundingBox);
+        }
+      });
+      return boundingBox;
+    }
+  }, {
+    key: "getFontSize",
+    value: function getFontSize() {
+      var document = this.document,
+          parent = this.parent;
+      var inheritFontSize = Font.parse(document.ctx.font).fontSize;
+      var fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
+      return fontSize;
+    }
+  }, {
+    key: "getTElementBoundingBox",
+    value: function getTElementBoundingBox(ctx) {
+      var fontSize = this.getFontSize();
+      return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
+    }
+  }, {
+    key: "getGlyph",
+    value: function getGlyph(font, text, i) {
+      var char = text[i];
+      var glyph = null;
+
+      if (font.isArabic) {
+        var len = text.length;
+        var prevChar = text[i - 1];
+        var nextChar = text[i + 1];
+        var arabicForm = 'isolated';
+
+        if ((i === 0 || prevChar === ' ') && i < len - 1 && nextChar !== ' ') {
+          arabicForm = 'terminal';
+        }
+
+        if (i > 0 && prevChar !== ' ' && i < len - 1 && nextChar !== ' ') {
+          arabicForm = 'medial';
+        }
+
+        if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
+          arabicForm = 'initial';
+        }
+
+        if (typeof font.glyphs[char] !== 'undefined') {
+          // NEED TEST
+          var maybeGlyph = font.glyphs[char];
+          glyph = maybeGlyph instanceof GlyphElement ? maybeGlyph : maybeGlyph[arabicForm];
+        }
+      } else {
+        glyph = font.glyphs[char];
+      }
+
+      if (!glyph) {
+        glyph = font.missingGlyph;
+      }
+
+      return glyph;
+    }
+  }, {
+    key: "getText",
+    value: function getText() {
+      return '';
+    }
+  }, {
+    key: "getTextFromNode",
+    value: function getTextFromNode(node) {
+      var textNode = node || this.node;
+      var childNodes = Array.from(textNode.parentNode.childNodes);
+      var index = childNodes.indexOf(textNode);
+      var lastIndex = childNodes.length - 1;
+      var text = compressSpaces( // textNode.value
+      // || textNode.text
+      textNode.textContent || '');
+
+      if (index === 0) {
+        text = trimLeft(text);
+      }
+
+      if (index === lastIndex) {
+        text = trimRight(text);
+      }
+
+      return text;
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      var _this3 = this;
+
+      if (this.type !== 'text') {
+        this.renderTElementChildren(ctx);
+        return;
+      } // first, calculate child positions
+
+
+      this.initializeCoordinates();
+      this.adjustChildCoordinatesRecursive(ctx); // then render
+
+      this.children.forEach(function (_, i) {
+        _this3.renderChild(ctx, _this3, _this3, i);
+      });
+      var mouse = this.document.screen.mouse; // Do not calc bounding box if mouse is not working.
+
+      if (mouse.isWorking()) {
+        mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
+      }
+    }
+  }, {
+    key: "renderTElementChildren",
+    value: function renderTElementChildren(ctx) {
+      var document = this.document,
+          parent = this.parent;
+      var renderText = this.getText();
+      var customFont = parent.getStyle('font-family').getDefinition();
+
+      if (customFont) {
+        var unitsPerEm = customFont.fontFace.unitsPerEm;
+        var ctxFont = Font.parse(document.ctx.font);
+        var fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
+        var fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
+        var scale = fontSize / unitsPerEm;
+        var text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;
+        var dx = toNumbers(parent.getAttribute('dx').getString());
+        var len = text.length;
+
+        for (var i = 0; i < len; i++) {
+          var glyph = this.getGlyph(customFont, text, i);
+          ctx.translate(this.x, this.y);
+          ctx.scale(scale, -scale);
+          var lw = ctx.lineWidth;
+          ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
+
+          if (fontStyle === 'italic') {
+            ctx.transform(1, 0, .4, 1, 0, 0);
+          }
+
+          glyph.render(ctx);
+
+          if (fontStyle === 'italic') {
+            ctx.transform(1, 0, -.4, 1, 0, 0);
+          }
+
+          ctx.lineWidth = lw;
+          ctx.scale(1 / scale, -1 / scale);
+          ctx.translate(-this.x, -this.y);
+          this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
+
+          if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
+            this.x += dx[i];
+          }
+        }
+
+        return;
+      }
+
+      var x = this.x,
+          y = this.y; // NEED TEST
+      // if (ctx.paintOrder === 'stroke') {
+      // 	if (ctx.strokeStyle) {
+      // 		ctx.strokeText(renderText, x, y);
+      // 	}
+      // 	if (ctx.fillStyle) {
+      // 		ctx.fillText(renderText, x, y);
+      // 	}
+      // } else {
+
+      if (ctx.fillStyle) {
+        ctx.fillText(renderText, x, y);
+      }
+
+      if (ctx.strokeStyle) {
+        ctx.strokeText(renderText, x, y);
+      } // }
+
+    }
+  }, {
+    key: "applyAnchoring",
+    value: function applyAnchoring() {
+      if (this.textChunkStart >= this.leafTexts.length) {
+        return;
+      } // This is basically the "Apply anchoring" part of https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithm.
+      // The difference is that we apply the anchoring as soon as a chunk is finished. This saves some extra looping.
+      // Vertical text is not supported.
+
+
+      var firstElement = this.leafTexts[this.textChunkStart];
+      var textAnchor = firstElement.getStyle('text-anchor').getString('start');
+      var isRTL = false; // we treat RTL like LTR
+
+      var shift = 0;
+
+      if (textAnchor === 'start' && !isRTL || textAnchor === 'end' && isRTL) {
+        shift = firstElement.x - this.minX;
+      } else if (textAnchor === 'end' && !isRTL || textAnchor === 'start' && isRTL) {
+        shift = firstElement.x - this.maxX;
+      } else {
+        shift = firstElement.x - (this.minX + this.maxX) / 2;
+      }
+
+      for (var i = this.textChunkStart; i < this.leafTexts.length; i++) {
+        this.leafTexts[i].x += shift;
+      } // start new chunk
+
+
+      this.minX = Number.POSITIVE_INFINITY;
+      this.maxX = Number.NEGATIVE_INFINITY;
+      this.textChunkStart = this.leafTexts.length;
+    }
+  }, {
+    key: "adjustChildCoordinatesRecursive",
+    value: function adjustChildCoordinatesRecursive(ctx) {
+      var _this4 = this;
+
+      this.children.forEach(function (_, i) {
+        _this4.adjustChildCoordinatesRecursiveCore(ctx, _this4, _this4, i);
+      });
+      this.applyAnchoring();
+    }
+  }, {
+    key: "adjustChildCoordinatesRecursiveCore",
+    value: function adjustChildCoordinatesRecursiveCore(ctx, textParent, parent, i) {
+      var child = parent.children[i];
+
+      if (child.children.length > 0) {
+        child.children.forEach(function (_, i) {
+          textParent.adjustChildCoordinatesRecursiveCore(ctx, textParent, child, i);
+        });
+      } else {
+        // only leafs are relevant
+        this.adjustChildCoordinates(ctx, textParent, parent, i);
+      }
+    }
+  }, {
+    key: "adjustChildCoordinates",
+    value: function adjustChildCoordinates(ctx, textParent, parent, i) {
+      var child = parent.children[i];
+
+      if (typeof child.measureText !== 'function') {
+        return child;
+      }
+
+      ctx.save();
+      child.setContext(ctx, true);
+      var xAttr = child.getAttribute('x');
+      var yAttr = child.getAttribute('y');
+      var dxAttr = child.getAttribute('dx');
+      var dyAttr = child.getAttribute('dy');
+      var customFont = child.getStyle('font-family').getDefinition();
+      var isRTL = Boolean(customFont) && customFont.isRTL;
+
+      if (i === 0) {
+        // First children inherit attributes from parent(s). Positional attributes
+        // are only inherited from a parent to it's first child.
+        if (!xAttr.hasValue()) {
+          xAttr.setValue(child.getInheritedAttribute('x'));
+        }
+
+        if (!yAttr.hasValue()) {
+          yAttr.setValue(child.getInheritedAttribute('y'));
+        }
+
+        if (!dxAttr.hasValue()) {
+          dxAttr.setValue(child.getInheritedAttribute('dx'));
+        }
+
+        if (!dyAttr.hasValue()) {
+          dyAttr.setValue(child.getInheritedAttribute('dy'));
+        }
+      }
+
+      var width = child.measureText(ctx);
+
+      if (isRTL) {
+        textParent.x -= width;
+      }
+
+      if (xAttr.hasValue()) {
+        // an "x" attribute marks the start of a new chunk
+        textParent.applyAnchoring();
+        child.x = xAttr.getPixels('x');
+
+        if (dxAttr.hasValue()) {
+          child.x += dxAttr.getPixels('x');
+        }
+      } else {
+        if (dxAttr.hasValue()) {
+          textParent.x += dxAttr.getPixels('x');
+        }
+
+        child.x = textParent.x;
+      }
+
+      textParent.x = child.x;
+
+      if (!isRTL) {
+        textParent.x += width;
+      }
+
+      if (yAttr.hasValue()) {
+        child.y = yAttr.getPixels('y');
+
+        if (dyAttr.hasValue()) {
+          child.y += dyAttr.getPixels('y');
+        }
+      } else {
+        if (dyAttr.hasValue()) {
+          textParent.y += dyAttr.getPixels('y');
+        }
+
+        child.y = textParent.y;
+      }
+
+      textParent.y = child.y; // update the current chunk and it's bounds
+
+      textParent.leafTexts.push(child);
+      textParent.minX = Math.min(textParent.minX, child.x, child.x + width);
+      textParent.maxX = Math.max(textParent.maxX, child.x, child.x + width);
+      child.clearContext(ctx);
+      ctx.restore();
+      return child;
+    }
+  }, {
+    key: "getChildBoundingBox",
+    value: function getChildBoundingBox(ctx, textParent, parent, i) {
+      var child = parent.children[i]; // not a text node?
+
+      if (typeof child.getBoundingBox !== 'function') {
+        return null;
+      }
+
+      var boundingBox = child.getBoundingBox(ctx);
+
+      if (!boundingBox) {
+        return null;
+      }
+
+      child.children.forEach(function (_, i) {
+        var childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
+        boundingBox.addBoundingBox(childBoundingBox);
+      });
+      return boundingBox;
+    }
+  }, {
+    key: "renderChild",
+    value: function renderChild(ctx, textParent, parent, i) {
+      var child = parent.children[i];
+      child.render(ctx);
+      child.children.forEach(function (_, i) {
+        textParent.renderChild(ctx, textParent, child, i);
+      });
+    }
+  }, {
+    key: "measureText",
+    value: function measureText(ctx) {
+      var measureCache = this.measureCache;
+
+      if (~measureCache) {
+        return measureCache;
+      }
+
+      var renderText = this.getText();
+      var measure = this.measureTargetText(ctx, renderText);
+      this.measureCache = measure;
+      return measure;
+    }
+  }, {
+    key: "measureTargetText",
+    value: function measureTargetText(ctx, targetText) {
+      if (!targetText.length) {
+        return 0;
+      }
+
+      var parent = this.parent;
+      var customFont = parent.getStyle('font-family').getDefinition();
+
+      if (customFont) {
+        var fontSize = this.getFontSize();
+        var text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;
+        var dx = toNumbers(parent.getAttribute('dx').getString());
+        var len = text.length;
+        var _measure = 0;
+
+        for (var i = 0; i < len; i++) {
+          var glyph = this.getGlyph(customFont, text, i);
+          _measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
+
+          if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
+            _measure += dx[i];
+          }
+        }
+
+        return _measure;
+      }
+
+      if (!ctx.measureText) {
+        return targetText.length * 10;
+      }
+
+      ctx.save();
+      this.setContext(ctx, true);
+
+      var _ctx$measureText = ctx.measureText(targetText),
+          measure = _ctx$measureText.width;
+
+      this.clearContext(ctx);
+      ctx.restore();
+      return measure;
+    }
+    /**
+     * Inherits positional attributes from {@link TextElement} parent(s). Attributes
+     * are only inherited from a parent to its first child.
+     * @param name - The attribute name.
+     * @returns The attribute value or null.
+     */
+
+  }, {
+    key: "getInheritedAttribute",
+    value: function getInheritedAttribute(name) {
+      // eslint-disable-next-line @typescript-eslint/no-this-alias,consistent-this
+      var current = this;
+
+      while (current instanceof TextElement && current.isFirstChild()) {
+        var parentAttr = current.parent.getAttribute(name);
+
+        if (parentAttr.hasValue(true)) {
+          return parentAttr.getValue('0');
+        }
+
+        current = current.parent;
+      }
+
+      return null;
+    }
+  }]);
+
+  return TextElement;
+}(RenderedElement);
+
+function _createSuper$D(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$D(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$D() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var TSpanElement = /*#__PURE__*/function (_TextElement) {
+  _inherits__default["default"](TSpanElement, _TextElement);
+
+  var _super = _createSuper$D(TSpanElement);
+
+  function TSpanElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, TSpanElement);
+
+    _this = _super.call(this, document, node, (this instanceof TSpanElement ? this.constructor : void 0) === TSpanElement ? true : captureTextNodes);
+    _this.type = 'tspan'; // if this node has children, then they own the text
+
+    _this.text = _this.children.length > 0 ? '' : _this.getTextFromNode();
+    return _this;
+  }
+
+  _createClass__default["default"](TSpanElement, [{
+    key: "getText",
+    value: function getText() {
+      return this.text;
+    }
+  }]);
+
+  return TSpanElement;
+}(TextElement);
+
+function _createSuper$C(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$C(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var TextNode = /*#__PURE__*/function (_TSpanElement) {
+  _inherits__default["default"](TextNode, _TSpanElement);
+
+  var _super = _createSuper$C(TextNode);
+
+  function TextNode() {
+    var _this;
+
+    _classCallCheck__default["default"](this, TextNode);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'textNode';
+    return _this;
+  }
+
+  return TextNode;
+}(TSpanElement);
+
+function _createSuper$B(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$B(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var SVGElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default["default"](SVGElement, _RenderedElement);
+
+  var _super = _createSuper$B(SVGElement);
+
+  function SVGElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, SVGElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'svg';
+    _this.root = false;
+    return _this;
+  }
+
+  _createClass__default["default"](SVGElement, [{
+    key: "setContext",
+    value: function setContext(ctx) {
+      var _this$node$parentNode;
+
+      var document = this.document;
+      var screen = document.screen,
+          window = document.window;
+      var canvas = ctx.canvas;
+      screen.setDefaults(ctx);
+
+      if (canvas.style && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {
+        ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
+        var fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
+
+        if (fontSizeProp.hasValue()) {
+          document.rootEmSize = fontSizeProp.getPixels('y');
+          document.emSize = document.rootEmSize;
+        }
+      } // create new view port
+
+
+      if (!this.getAttribute('x').hasValue()) {
+        this.getAttribute('x', true).setValue(0);
+      }
+
+      if (!this.getAttribute('y').hasValue()) {
+        this.getAttribute('y', true).setValue(0);
+      }
+
+      var _screen$viewPort = screen.viewPort,
+          width = _screen$viewPort.width,
+          height = _screen$viewPort.height;
+
+      if (!this.getStyle('width').hasValue()) {
+        this.getStyle('width', true).setValue('100%');
+      }
+
+      if (!this.getStyle('height').hasValue()) {
+        this.getStyle('height', true).setValue('100%');
+      }
+
+      if (!this.getStyle('color').hasValue()) {
+        this.getStyle('color', true).setValue('black');
+      }
+
+      var refXAttr = this.getAttribute('refX');
+      var refYAttr = this.getAttribute('refY');
+      var viewBoxAttr = this.getAttribute('viewBox');
+      var viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;
+      var clip = !this.root && this.getStyle('overflow').getValue('hidden') !== 'visible';
+      var minX = 0;
+      var minY = 0;
+      var clipX = 0;
+      var clipY = 0;
+
+      if (viewBox) {
+        minX = viewBox[0];
+        minY = viewBox[1];
+      }
+
+      if (!this.root) {
+        width = this.getStyle('width').getPixels('x');
+        height = this.getStyle('height').getPixels('y');
+
+        if (this.type === 'marker') {
+          clipX = minX;
+          clipY = minY;
+          minX = 0;
+          minY = 0;
+        }
+      }
+
+      screen.viewPort.setCurrent(width, height); // Default value of transform-origin is center only for root SVG elements
+      // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin
+
+      if (this.node // is not temporary SVGElement
+      && (!this.parent || ((_this$node$parentNode = this.node.parentNode) === null || _this$node$parentNode === void 0 ? void 0 : _this$node$parentNode.nodeName) === 'foreignObject') && this.getStyle('transform', false, true).hasValue() && !this.getStyle('transform-origin', false, true).hasValue()) {
+        this.getStyle('transform-origin', true, true).setValue('50% 50%');
+      }
+
+      _get__default["default"](_getPrototypeOf__default["default"](SVGElement.prototype), "setContext", this).call(this, ctx);
+
+      ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
+
+      if (viewBox) {
+        width = viewBox[2];
+        height = viewBox[3];
+      }
+
+      document.setViewBox({
+        ctx: ctx,
+        aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
+        width: screen.viewPort.width,
+        desiredWidth: width,
+        height: screen.viewPort.height,
+        desiredHeight: height,
+        minX: minX,
+        minY: minY,
+        refX: refXAttr.getValue(),
+        refY: refYAttr.getValue(),
+        clip: clip,
+        clipX: clipX,
+        clipY: clipY
+      });
+
+      if (viewBox) {
+        screen.viewPort.removeCurrent();
+        screen.viewPort.setCurrent(width, height);
+      }
+    }
+  }, {
+    key: "clearContext",
+    value: function clearContext(ctx) {
+      _get__default["default"](_getPrototypeOf__default["default"](SVGElement.prototype), "clearContext", this).call(this, ctx);
+
+      this.document.screen.viewPort.removeCurrent();
+    }
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+
+  }, {
+    key: "resize",
+    value: function resize(width) {
+      var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
+      var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      var widthAttr = this.getAttribute('width', true);
+      var heightAttr = this.getAttribute('height', true);
+      var viewBoxAttr = this.getAttribute('viewBox');
+      var styleAttr = this.getAttribute('style');
+      var originWidth = widthAttr.getNumber(0);
+      var originHeight = heightAttr.getNumber(0);
+
+      if (preserveAspectRatio) {
+        if (typeof preserveAspectRatio === 'string') {
+          this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
+        } else {
+          var preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
+
+          if (preserveAspectRatioAttr.hasValue()) {
+            preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
+          }
+        }
+      }
+
+      widthAttr.setValue(width);
+      heightAttr.setValue(height);
+
+      if (!viewBoxAttr.hasValue()) {
+        viewBoxAttr.setValue("0 0 ".concat(originWidth || width, " ").concat(originHeight || height));
+      }
+
+      if (styleAttr.hasValue()) {
+        var widthStyle = this.getStyle('width');
+        var heightStyle = this.getStyle('height');
+
+        if (widthStyle.hasValue()) {
+          widthStyle.setValue("".concat(width, "px"));
+        }
+
+        if (heightStyle.hasValue()) {
+          heightStyle.setValue("".concat(height, "px"));
+        }
+      }
+    }
+  }]);
+
+  return SVGElement;
+}(RenderedElement);
+
+function _createSuper$A(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$A(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var RectElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default["default"](RectElement, _PathElement);
+
+  var _super = _createSuper$A(RectElement);
+
+  function RectElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, RectElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'rect';
+    return _this;
+  }
+
+  _createClass__default["default"](RectElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var x = this.getAttribute('x').getPixels('x');
+      var y = this.getAttribute('y').getPixels('y');
+      var width = this.getStyle('width', false, true).getPixels('x');
+      var height = this.getStyle('height', false, true).getPixels('y');
+      var rxAttr = this.getAttribute('rx');
+      var ryAttr = this.getAttribute('ry');
+      var rx = rxAttr.getPixels('x');
+      var ry = ryAttr.getPixels('y');
+
+      if (rxAttr.hasValue() && !ryAttr.hasValue()) {
+        ry = rx;
+      }
+
+      if (ryAttr.hasValue() && !rxAttr.hasValue()) {
+        rx = ry;
+      }
+
+      rx = Math.min(rx, width / 2.0);
+      ry = Math.min(ry, height / 2.0);
+
+      if (ctx) {
+        var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+        ctx.beginPath(); // always start the path so we don't fill prior paths
+
+        if (height > 0 && width > 0) {
+          ctx.moveTo(x + rx, y);
+          ctx.lineTo(x + width - rx, y);
+          ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);
+          ctx.lineTo(x + width, y + height - ry);
+          ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);
+          ctx.lineTo(x + rx, y + height);
+          ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);
+          ctx.lineTo(x, y + ry);
+          ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);
+          ctx.closePath();
+        }
+      }
+
+      return new BoundingBox(x, y, x + width, y + height);
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      return null;
+    }
+  }]);
+
+  return RectElement;
+}(PathElement);
+
+function _createSuper$z(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$z(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$z() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var CircleElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default["default"](CircleElement, _PathElement);
+
+  var _super = _createSuper$z(CircleElement);
+
+  function CircleElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, CircleElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'circle';
+    return _this;
+  }
+
+  _createClass__default["default"](CircleElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var cx = this.getAttribute('cx').getPixels('x');
+      var cy = this.getAttribute('cy').getPixels('y');
+      var r = this.getAttribute('r').getPixels();
+
+      if (ctx && r > 0) {
+        ctx.beginPath();
+        ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
+        ctx.closePath();
+      }
+
+      return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      return null;
+    }
+  }]);
+
+  return CircleElement;
+}(PathElement);
+
+function _createSuper$y(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$y(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var EllipseElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default["default"](EllipseElement, _PathElement);
+
+  var _super = _createSuper$y(EllipseElement);
+
+  function EllipseElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, EllipseElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'ellipse';
+    return _this;
+  }
+
+  _createClass__default["default"](EllipseElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+      var rx = this.getAttribute('rx').getPixels('x');
+      var ry = this.getAttribute('ry').getPixels('y');
+      var cx = this.getAttribute('cx').getPixels('x');
+      var cy = this.getAttribute('cy').getPixels('y');
+
+      if (ctx && rx > 0 && ry > 0) {
+        ctx.beginPath();
+        ctx.moveTo(cx + rx, cy);
+        ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);
+        ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);
+        ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);
+        ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);
+        ctx.closePath();
+      }
+
+      return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      return null;
+    }
+  }]);
+
+  return EllipseElement;
+}(PathElement);
+
+function _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$x(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var LineElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default["default"](LineElement, _PathElement);
+
+  var _super = _createSuper$x(LineElement);
+
+  function LineElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, LineElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'line';
+    return _this;
+  }
+
+  _createClass__default["default"](LineElement, [{
+    key: "getPoints",
+    value: function getPoints() {
+      return [new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')), new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))];
+    }
+  }, {
+    key: "path",
+    value: function path(ctx) {
+      var _this$getPoints = this.getPoints(),
+          _this$getPoints2 = _slicedToArray__default["default"](_this$getPoints, 2),
+          _this$getPoints2$ = _this$getPoints2[0],
+          x0 = _this$getPoints2$.x,
+          y0 = _this$getPoints2$.y,
+          _this$getPoints2$2 = _this$getPoints2[1],
+          x1 = _this$getPoints2$2.x,
+          y1 = _this$getPoints2$2.y;
+
+      if (ctx) {
+        ctx.beginPath();
+        ctx.moveTo(x0, y0);
+        ctx.lineTo(x1, y1);
+      }
+
+      return new BoundingBox(x0, y0, x1, y1);
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      var _this$getPoints3 = this.getPoints(),
+          _this$getPoints4 = _slicedToArray__default["default"](_this$getPoints3, 2),
+          p0 = _this$getPoints4[0],
+          p1 = _this$getPoints4[1];
+
+      var a = p0.angleTo(p1);
+      return [[p0, a], [p1, a]];
+    }
+  }]);
+
+  return LineElement;
+}(PathElement);
+
+function _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$w(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var PolylineElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default["default"](PolylineElement, _PathElement);
+
+  var _super = _createSuper$w(PolylineElement);
+
+  function PolylineElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, PolylineElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'polyline';
+    _this.points = [];
+    _this.points = Point.parsePath(_this.getAttribute('points').getString());
+    return _this;
+  }
+
+  _createClass__default["default"](PolylineElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var points = this.points;
+
+      var _points = _slicedToArray__default["default"](points, 1),
+          _points$ = _points[0],
+          x0 = _points$.x,
+          y0 = _points$.y;
+
+      var boundingBox = new BoundingBox(x0, y0);
+
+      if (ctx) {
+        ctx.beginPath();
+        ctx.moveTo(x0, y0);
+      }
+
+      points.forEach(function (_ref) {
+        var x = _ref.x,
+            y = _ref.y;
+        boundingBox.addPoint(x, y);
+
+        if (ctx) {
+          ctx.lineTo(x, y);
+        }
+      });
+      return boundingBox;
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      var points = this.points;
+      var lastIndex = points.length - 1;
+      var markers = [];
+      points.forEach(function (point, i) {
+        if (i === lastIndex) {
+          return;
+        }
+
+        markers.push([point, point.angleTo(points[i + 1])]);
+      });
+
+      if (markers.length > 0) {
+        markers.push([points[points.length - 1], markers[markers.length - 1][1]]);
+      }
+
+      return markers;
+    }
+  }]);
+
+  return PolylineElement;
+}(PathElement);
+
+function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$v(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var PolygonElement = /*#__PURE__*/function (_PolylineElement) {
+  _inherits__default["default"](PolygonElement, _PolylineElement);
+
+  var _super = _createSuper$v(PolygonElement);
+
+  function PolygonElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, PolygonElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'polygon';
+    return _this;
+  }
+
+  _createClass__default["default"](PolygonElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var boundingBox = _get__default["default"](_getPrototypeOf__default["default"](PolygonElement.prototype), "path", this).call(this, ctx);
+
+      var _this$points = _slicedToArray__default["default"](this.points, 1),
+          _this$points$ = _this$points[0],
+          x = _this$points$.x,
+          y = _this$points$.y;
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+        ctx.closePath();
+      }
+
+      return boundingBox;
+    }
+  }]);
+
+  return PolygonElement;
+}(PolylineElement);
+
+function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$u(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var PatternElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](PatternElement, _Element);
+
+  var _super = _createSuper$u(PatternElement);
+
+  function PatternElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, PatternElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'pattern';
+    return _this;
+  }
+
+  _createClass__default["default"](PatternElement, [{
+    key: "createPattern",
+    value: function createPattern(ctx, _, parentOpacityProp) {
+      var width = this.getStyle('width').getPixels('x', true);
+      var height = this.getStyle('height').getPixels('y', true); // render me using a temporary svg element
+
+      var patternSvg = new SVGElement(this.document, null);
+      patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
+      patternSvg.attributes.width = new Property(this.document, 'width', "".concat(width, "px"));
+      patternSvg.attributes.height = new Property(this.document, 'height', "".concat(height, "px"));
+      patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
+      patternSvg.children = this.children;
+      var patternCanvas = this.document.createCanvas(width, height);
+      var patternCtx = patternCanvas.getContext('2d');
+      var xAttr = this.getAttribute('x');
+      var yAttr = this.getAttribute('y');
+
+      if (xAttr.hasValue() && yAttr.hasValue()) {
+        patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
+      }
+
+      if (parentOpacityProp.hasValue()) {
+        this.styles['fill-opacity'] = parentOpacityProp;
+      } else {
+        Reflect.deleteProperty(this.styles, 'fill-opacity');
+      } // render 3x3 grid so when we transform there's no white space on edges
+
+
+      for (var x = -1; x <= 1; x++) {
+        for (var y = -1; y <= 1; y++) {
+          patternCtx.save();
+          patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
+          patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
+          patternSvg.render(patternCtx);
+          patternCtx.restore();
+        }
+      }
+
+      var pattern = ctx.createPattern(patternCanvas, 'repeat');
+      return pattern;
+    }
+  }]);
+
+  return PatternElement;
+}(Element);
+
+function _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$t(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var MarkerElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](MarkerElement, _Element);
+
+  var _super = _createSuper$t(MarkerElement);
+
+  function MarkerElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, MarkerElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'marker';
+    return _this;
+  }
+
+  _createClass__default["default"](MarkerElement, [{
+    key: "render",
+    value: function render(ctx, point, angle) {
+      if (!point) {
+        return;
+      }
+
+      var x = point.x,
+          y = point.y;
+      var orient = this.getAttribute('orient').getString('auto');
+      var markerUnits = this.getAttribute('markerUnits').getString('strokeWidth');
+      ctx.translate(x, y);
+
+      if (orient === 'auto') {
+        ctx.rotate(angle);
+      }
+
+      if (markerUnits === 'strokeWidth') {
+        ctx.scale(ctx.lineWidth, ctx.lineWidth);
+      }
+
+      ctx.save(); // render me using a temporary svg element
+
+      var markerSvg = new SVGElement(this.document, null);
+      markerSvg.type = this.type;
+      markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
+      markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
+      markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
+      markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
+      markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
+      markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
+      markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
+      markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
+      markerSvg.children = this.children;
+      markerSvg.render(ctx);
+      ctx.restore();
+
+      if (markerUnits === 'strokeWidth') {
+        ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
+      }
+
+      if (orient === 'auto') {
+        ctx.rotate(-angle);
+      }
+
+      ctx.translate(-x, -y);
+    }
+  }]);
+
+  return MarkerElement;
+}(Element);
+
+function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var DefsElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](DefsElement, _Element);
+
+  var _super = _createSuper$s(DefsElement);
+
+  function DefsElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, DefsElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'defs';
+    return _this;
+  }
+
+  _createClass__default["default"](DefsElement, [{
+    key: "render",
+    value: function render() {// NOOP
+    }
+  }]);
+
+  return DefsElement;
+}(Element);
+
+function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var GElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default["default"](GElement, _RenderedElement);
+
+  var _super = _createSuper$r(GElement);
+
+  function GElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, GElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'g';
+    return _this;
+  }
+
+  _createClass__default["default"](GElement, [{
+    key: "getBoundingBox",
+    value: function getBoundingBox(ctx) {
+      var boundingBox = new BoundingBox();
+      this.children.forEach(function (child) {
+        boundingBox.addBoundingBox(child.getBoundingBox(ctx));
+      });
+      return boundingBox;
+    }
+  }]);
+
+  return GElement;
+}(RenderedElement);
+
+function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var GradientElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](GradientElement, _Element);
+
+  var _super = _createSuper$q(GradientElement);
+
+  function GradientElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, GradientElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.attributesToInherit = ['gradientUnits'];
+    _this.stops = [];
+
+    var _assertThisInitialize = _assertThisInitialized__default["default"](_this),
+        stops = _assertThisInitialize.stops,
+        children = _assertThisInitialize.children;
+
+    children.forEach(function (child) {
+      if (child.type === 'stop') {
+        stops.push(child);
+      }
+    });
+    return _this;
+  }
+
+  _createClass__default["default"](GradientElement, [{
+    key: "getGradientUnits",
+    value: function getGradientUnits() {
+      return this.getAttribute('gradientUnits').getString('objectBoundingBox');
+    }
+  }, {
+    key: "createGradient",
+    value: function createGradient(ctx, element, parentOpacityProp) {
+      var _this2 = this;
+
+      // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
+      var stopsContainer = this;
+
+      if (this.getHrefAttribute().hasValue()) {
+        stopsContainer = this.getHrefAttribute().getDefinition();
+        this.inheritStopContainer(stopsContainer);
+      }
+
+      var _stopsContainer = stopsContainer,
+          stops = _stopsContainer.stops;
+      var gradient = this.getGradient(ctx, element);
+
+      if (!gradient) {
+        return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
+      }
+
+      stops.forEach(function (stop) {
+        gradient.addColorStop(stop.offset, _this2.addParentOpacity(parentOpacityProp, stop.color));
+      });
+
+      if (this.getAttribute('gradientTransform').hasValue()) {
+        // render as transformed pattern on temporary canvas
+        var document = this.document;
+        var _document$screen = document.screen,
+            MAX_VIRTUAL_PIXELS = _document$screen.MAX_VIRTUAL_PIXELS,
+            viewPort = _document$screen.viewPort;
+
+        var _viewPort$viewPorts = _slicedToArray__default["default"](viewPort.viewPorts, 1),
+            rootView = _viewPort$viewPorts[0];
+
+        var rect = new RectElement(document, null);
+        rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
+        rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
+        rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
+        rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
+        var group = new GElement(document, null);
+        group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
+        group.children = [rect];
+        var patternSvg = new SVGElement(document, null);
+        patternSvg.attributes.x = new Property(document, 'x', 0);
+        patternSvg.attributes.y = new Property(document, 'y', 0);
+        patternSvg.attributes.width = new Property(document, 'width', rootView.width);
+        patternSvg.attributes.height = new Property(document, 'height', rootView.height);
+        patternSvg.children = [group];
+        var patternCanvas = document.createCanvas(rootView.width, rootView.height);
+        var patternCtx = patternCanvas.getContext('2d');
+        patternCtx.fillStyle = gradient;
+        patternSvg.render(patternCtx);
+        return patternCtx.createPattern(patternCanvas, 'no-repeat');
+      }
+
+      return gradient;
+    }
+  }, {
+    key: "inheritStopContainer",
+    value: function inheritStopContainer(stopsContainer) {
+      var _this3 = this;
+
+      this.attributesToInherit.forEach(function (attributeToInherit) {
+        if (!_this3.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
+          _this3.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
+        }
+      });
+    }
+  }, {
+    key: "addParentOpacity",
+    value: function addParentOpacity(parentOpacityProp, color) {
+      if (parentOpacityProp.hasValue()) {
+        var colorProp = new Property(this.document, 'color', color);
+        return colorProp.addOpacity(parentOpacityProp).getColor();
+      }
+
+      return color;
+    }
+  }]);
+
+  return GradientElement;
+}(Element);
+
+function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var LinearGradientElement = /*#__PURE__*/function (_GradientElement) {
+  _inherits__default["default"](LinearGradientElement, _GradientElement);
+
+  var _super = _createSuper$p(LinearGradientElement);
+
+  function LinearGradientElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, LinearGradientElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'linearGradient';
+
+    _this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
+
+    return _this;
+  }
+
+  _createClass__default["default"](LinearGradientElement, [{
+    key: "getGradient",
+    value: function getGradient(ctx, element) {
+      var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
+      var boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;
+
+      if (isBoundingBoxUnits && !boundingBox) {
+        return null;
+      }
+
+      if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {
+        this.getAttribute('x1', true).setValue(0);
+        this.getAttribute('y1', true).setValue(0);
+        this.getAttribute('x2', true).setValue(1);
+        this.getAttribute('y2', true).setValue(0);
+      }
+
+      var x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');
+      var y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');
+      var x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');
+      var y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');
+
+      if (x1 === x2 && y1 === y2) {
+        return null;
+      }
+
+      return ctx.createLinearGradient(x1, y1, x2, y2);
+    }
+  }]);
+
+  return LinearGradientElement;
+}(GradientElement);
+
+function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var RadialGradientElement = /*#__PURE__*/function (_GradientElement) {
+  _inherits__default["default"](RadialGradientElement, _GradientElement);
+
+  var _super = _createSuper$o(RadialGradientElement);
+
+  function RadialGradientElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, RadialGradientElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'radialGradient';
+
+    _this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
+
+    return _this;
+  }
+
+  _createClass__default["default"](RadialGradientElement, [{
+    key: "getGradient",
+    value: function getGradient(ctx, element) {
+      var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
+      var boundingBox = element.getBoundingBox(ctx);
+
+      if (isBoundingBoxUnits && !boundingBox) {
+        return null;
+      }
+
+      if (!this.getAttribute('cx').hasValue()) {
+        this.getAttribute('cx', true).setValue('50%');
+      }
+
+      if (!this.getAttribute('cy').hasValue()) {
+        this.getAttribute('cy', true).setValue('50%');
+      }
+
+      if (!this.getAttribute('r').hasValue()) {
+        this.getAttribute('r', true).setValue('50%');
+      }
+
+      var cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');
+      var cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');
+      var fx = cx;
+      var fy = cy;
+
+      if (this.getAttribute('fx').hasValue()) {
+        fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');
+      }
+
+      if (this.getAttribute('fy').hasValue()) {
+        fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');
+      }
+
+      var r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();
+      var fr = this.getAttribute('fr').getPixels();
+      return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
+    }
+  }]);
+
+  return RadialGradientElement;
+}(GradientElement);
+
+function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var StopElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](StopElement, _Element);
+
+  var _super = _createSuper$n(StopElement);
+
+  function StopElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, StopElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'stop';
+    var offset = Math.max(0, Math.min(1, _this.getAttribute('offset').getNumber()));
+
+    var stopOpacity = _this.getStyle('stop-opacity');
+
+    var stopColor = _this.getStyle('stop-color', true);
+
+    if (stopColor.getString() === '') {
+      stopColor.setValue('#000');
+    }
+
+    if (stopOpacity.hasValue()) {
+      stopColor = stopColor.addOpacity(stopOpacity);
+    }
+
+    _this.offset = offset;
+    _this.color = stopColor.getColor();
+    return _this;
+  }
+
+  return StopElement;
+}(Element);
+
+function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var AnimateElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](AnimateElement, _Element);
+
+  var _super = _createSuper$m(AnimateElement);
+
+  function AnimateElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, AnimateElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'animate';
+    _this.duration = 0;
+    _this.initialValue = null;
+    _this.initialUnits = '';
+    _this.removed = false;
+    _this.frozen = false;
+    document.screen.animations.push(_assertThisInitialized__default["default"](_this));
+    _this.begin = _this.getAttribute('begin').getMilliseconds();
+    _this.maxDuration = _this.begin + _this.getAttribute('dur').getMilliseconds();
+    _this.from = _this.getAttribute('from');
+    _this.to = _this.getAttribute('to');
+    _this.values = new Property(document, 'values', null);
+
+    var valuesAttr = _this.getAttribute('values');
+
+    if (valuesAttr.hasValue()) {
+      _this.values.setValue(valuesAttr.getString().split(';'));
+    }
+
+    return _this;
+  }
+
+  _createClass__default["default"](AnimateElement, [{
+    key: "getProperty",
+    value: function getProperty() {
+      var attributeType = this.getAttribute('attributeType').getString();
+      var attributeName = this.getAttribute('attributeName').getString();
+
+      if (attributeType === 'CSS') {
+        return this.parent.getStyle(attributeName, true);
+      }
+
+      return this.parent.getAttribute(attributeName, true);
+    }
+  }, {
+    key: "calcValue",
+    value: function calcValue() {
+      var initialUnits = this.initialUnits;
+
+      var _this$getProgress = this.getProgress(),
+          progress = _this$getProgress.progress,
+          from = _this$getProgress.from,
+          to = _this$getProgress.to; // tween value linearly
+
+
+      var newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
+
+      if (initialUnits === '%') {
+        newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
+      }
+
+      return "".concat(newValue).concat(initialUnits);
+    }
+  }, {
+    key: "update",
+    value: function update(delta) {
+      var parent = this.parent;
+      var prop = this.getProperty(); // set initial value
+
+      if (!this.initialValue) {
+        this.initialValue = prop.getString();
+        this.initialUnits = prop.getUnits();
+      } // if we're past the end time
+
+
+      if (this.duration > this.maxDuration) {
+        var fill = this.getAttribute('fill').getString('remove'); // loop for indefinitely repeating animations
+
+        if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {
+          this.duration = 0;
+        } else if (fill === 'freeze' && !this.frozen) {
+          this.frozen = true;
+          parent.animationFrozen = true;
+          parent.animationFrozenValue = prop.getString();
+        } else if (fill === 'remove' && !this.removed) {
+          this.removed = true;
+          prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);
+          return true;
+        }
+
+        return false;
+      }
+
+      this.duration += delta; // if we're past the begin time
+
+      var updated = false;
+
+      if (this.begin < this.duration) {
+        var newValue = this.calcValue(); // tween
+
+        var typeAttr = this.getAttribute('type');
+
+        if (typeAttr.hasValue()) {
+          // for transform, etc.
+          var type = typeAttr.getString();
+          newValue = "".concat(type, "(").concat(newValue, ")");
+        }
+
+        prop.setValue(newValue);
+        updated = true;
+      }
+
+      return updated;
+    }
+  }, {
+    key: "getProgress",
+    value: function getProgress() {
+      var document = this.document,
+          values = this.values;
+      var result = {
+        progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
+      };
+
+      if (values.hasValue()) {
+        var p = result.progress * (values.getValue().length - 1);
+        var lb = Math.floor(p);
+        var ub = Math.ceil(p);
+        result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
+        result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
+        result.progress = (p - lb) / (ub - lb);
+      } else {
+        result.from = this.from;
+        result.to = this.to;
+      }
+
+      return result;
+    }
+  }]);
+
+  return AnimateElement;
+}(Element);
+
+function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var AnimateColorElement = /*#__PURE__*/function (_AnimateElement) {
+  _inherits__default["default"](AnimateColorElement, _AnimateElement);
+
+  var _super = _createSuper$l(AnimateColorElement);
+
+  function AnimateColorElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, AnimateColorElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'animateColor';
+    return _this;
+  }
+
+  _createClass__default["default"](AnimateColorElement, [{
+    key: "calcValue",
+    value: function calcValue() {
+      var _this$getProgress = this.getProgress(),
+          progress = _this$getProgress.progress,
+          from = _this$getProgress.from,
+          to = _this$getProgress.to;
+
+      var colorFrom = new RGBColor__default["default"](from.getColor());
+      var colorTo = new RGBColor__default["default"](to.getColor());
+
+      if (colorFrom.ok && colorTo.ok) {
+        // tween color linearly
+        var r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
+        var g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
+        var b = colorFrom.b + (colorTo.b - colorFrom.b) * progress; // ? alpha
+
+        return "rgb(".concat(Math.floor(r), ", ").concat(Math.floor(g), ", ").concat(Math.floor(b), ")");
+      }
+
+      return this.getAttribute('from').getColor();
+    }
+  }]);
+
+  return AnimateColorElement;
+}(AnimateElement);
+
+function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var AnimateTransformElement = /*#__PURE__*/function (_AnimateElement) {
+  _inherits__default["default"](AnimateTransformElement, _AnimateElement);
+
+  var _super = _createSuper$k(AnimateTransformElement);
+
+  function AnimateTransformElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, AnimateTransformElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'animateTransform';
+    return _this;
+  }
+
+  _createClass__default["default"](AnimateTransformElement, [{
+    key: "calcValue",
+    value: function calcValue() {
+      var _this$getProgress = this.getProgress(),
+          progress = _this$getProgress.progress,
+          from = _this$getProgress.from,
+          to = _this$getProgress.to; // tween value linearly
+
+
+      var transformFrom = toNumbers(from.getString());
+      var transformTo = toNumbers(to.getString());
+      var newValue = transformFrom.map(function (from, i) {
+        var to = transformTo[i];
+        return from + (to - from) * progress;
+      }).join(' ');
+      return newValue;
+    }
+  }]);
+
+  return AnimateTransformElement;
+}(AnimateElement);
+
+function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+
+function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
+
+function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+
+function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var FontElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](FontElement, _Element);
+
+  var _super = _createSuper$j(FontElement);
+
+  function FontElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, FontElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'font';
+    _this.glyphs = {};
+    _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
+    var definitions = document.definitions;
+
+    var _assertThisInitialize = _assertThisInitialized__default["default"](_this),
+        children = _assertThisInitialize.children;
+
+    var _iterator = _createForOfIteratorHelper$1(children),
+        _step;
+
+    try {
+      for (_iterator.s(); !(_step = _iterator.n()).done;) {
+        var child = _step.value;
+
+        switch (child.type) {
+          case 'font-face':
+            {
+              _this.fontFace = child;
+              var fontFamilyStyle = child.getStyle('font-family');
+
+              if (fontFamilyStyle.hasValue()) {
+                definitions[fontFamilyStyle.getString()] = _assertThisInitialized__default["default"](_this);
+              }
+
+              break;
+            }
+
+          case 'missing-glyph':
+            _this.missingGlyph = child;
+            break;
+
+          case 'glyph':
+            {
+              var glyph = child;
+
+              if (glyph.arabicForm) {
+                _this.isRTL = true;
+                _this.isArabic = true;
+
+                if (typeof _this.glyphs[glyph.unicode] === 'undefined') {
+                  _this.glyphs[glyph.unicode] = {};
+                }
+
+                _this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
+              } else {
+                _this.glyphs[glyph.unicode] = glyph;
+              }
+
+              break;
+            }
+
+          default:
+        }
+      }
+    } catch (err) {
+      _iterator.e(err);
+    } finally {
+      _iterator.f();
+    }
+
+    return _this;
+  }
+
+  _createClass__default["default"](FontElement, [{
+    key: "render",
+    value: function render() {// NO RENDER
+    }
+  }]);
+
+  return FontElement;
+}(Element);
+
+function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var FontFaceElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](FontFaceElement, _Element);
+
+  var _super = _createSuper$i(FontFaceElement);
+
+  function FontFaceElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, FontFaceElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'font-face';
+    _this.ascent = _this.getAttribute('ascent').getNumber();
+    _this.descent = _this.getAttribute('descent').getNumber();
+    _this.unitsPerEm = _this.getAttribute('units-per-em').getNumber();
+    return _this;
+  }
+
+  return FontFaceElement;
+}(Element);
+
+function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var MissingGlyphElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default["default"](MissingGlyphElement, _PathElement);
+
+  var _super = _createSuper$h(MissingGlyphElement);
+
+  function MissingGlyphElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, MissingGlyphElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'missing-glyph';
+    _this.horizAdvX = 0;
+    return _this;
+  }
+
+  return MissingGlyphElement;
+}(PathElement);
+
+function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var TRefElement = /*#__PURE__*/function (_TextElement) {
+  _inherits__default["default"](TRefElement, _TextElement);
+
+  var _super = _createSuper$g(TRefElement);
+
+  function TRefElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, TRefElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'tref';
+    return _this;
+  }
+
+  _createClass__default["default"](TRefElement, [{
+    key: "getText",
+    value: function getText() {
+      var element = this.getHrefAttribute().getDefinition();
+
+      if (element) {
+        var firstChild = element.children[0];
+
+        if (firstChild) {
+          return firstChild.getText();
+        }
+      }
+
+      return '';
+    }
+  }]);
+
+  return TRefElement;
+}(TextElement);
+
+function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var AElement = /*#__PURE__*/function (_TextElement) {
+  _inherits__default["default"](AElement, _TextElement);
+
+  var _super = _createSuper$f(AElement);
+
+  function AElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, AElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'a';
+    var childNodes = node.childNodes;
+    var firstChild = childNodes[0];
+    var hasText = childNodes.length > 0 && Array.from(childNodes).every(function (node) {
+      return node.nodeType === 3;
+    });
+    _this.hasText = hasText;
+    _this.text = hasText ? _this.getTextFromNode(firstChild) : '';
+    return _this;
+  }
+
+  _createClass__default["default"](AElement, [{
+    key: "getText",
+    value: function getText() {
+      return this.text;
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      if (this.hasText) {
+        // render as text element
+        _get__default["default"](_getPrototypeOf__default["default"](AElement.prototype), "renderChildren", this).call(this, ctx);
+
+        var document = this.document,
+            x = this.x,
+            y = this.y;
+        var mouse = document.screen.mouse;
+        var fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize); // Do not calc bounding box if mouse is not working.
+
+        if (mouse.isWorking()) {
+          mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
+        }
+      } else if (this.children.length > 0) {
+        // render as temporary group
+        var g = new GElement(this.document, null);
+        g.children = this.children;
+        g.parent = this;
+        g.render(ctx);
+      }
+    }
+  }, {
+    key: "onClick",
+    value: function onClick() {
+      var window = this.document.window;
+
+      if (window) {
+        window.open(this.getHrefAttribute().getString());
+      }
+    }
+  }, {
+    key: "onMouseMove",
+    value: function onMouseMove() {
+      var ctx = this.document.ctx;
+      ctx.canvas.style.cursor = 'pointer';
+    }
+  }]);
+
+  return AElement;
+}(TextElement);
+
+function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+
+function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
+
+function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+
+function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var TextPathElement = /*#__PURE__*/function (_TextElement) {
+  _inherits__default["default"](TextPathElement, _TextElement);
+
+  var _super = _createSuper$e(TextPathElement);
+
+  function TextPathElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, TextPathElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'textPath';
+    _this.textWidth = 0;
+    _this.textHeight = 0;
+    _this.pathLength = -1;
+    _this.glyphInfo = null;
+    _this.letterSpacingCache = [];
+    _this.measuresCache = new Map([['', 0]]);
+
+    var pathElement = _this.getHrefAttribute().getDefinition();
+
+    _this.text = _this.getTextFromNode();
+    _this.dataArray = _this.parsePathData(pathElement);
+    return _this;
+  }
+
+  _createClass__default["default"](TextPathElement, [{
+    key: "getText",
+    value: function getText() {
+      return this.text;
+    }
+  }, {
+    key: "path",
+    value: function path(ctx) {
+      var dataArray = this.dataArray;
+
+      if (ctx) {
+        ctx.beginPath();
+      }
+
+      dataArray.forEach(function (_ref) {
+        var type = _ref.type,
+            points = _ref.points;
+
+        switch (type) {
+          case PathParser.LINE_TO:
+            if (ctx) {
+              ctx.lineTo(points[0], points[1]);
+            }
+
+            break;
+
+          case PathParser.MOVE_TO:
+            if (ctx) {
+              ctx.moveTo(points[0], points[1]);
+            }
+
+            break;
+
+          case PathParser.CURVE_TO:
+            if (ctx) {
+              ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
+            }
+
+            break;
+
+          case PathParser.QUAD_TO:
+            if (ctx) {
+              ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
+            }
+
+            break;
+
+          case PathParser.ARC:
+            {
+              var _points = _slicedToArray__default["default"](points, 8),
+                  cx = _points[0],
+                  cy = _points[1],
+                  rx = _points[2],
+                  ry = _points[3],
+                  theta = _points[4],
+                  dTheta = _points[5],
+                  psi = _points[6],
+                  fs = _points[7];
+
+              var r = rx > ry ? rx : ry;
+              var scaleX = rx > ry ? 1 : rx / ry;
+              var scaleY = rx > ry ? ry / rx : 1;
+
+              if (ctx) {
+                ctx.translate(cx, cy);
+                ctx.rotate(psi);
+                ctx.scale(scaleX, scaleY);
+                ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
+                ctx.scale(1 / scaleX, 1 / scaleY);
+                ctx.rotate(-psi);
+                ctx.translate(-cx, -cy);
+              }
+
+              break;
+            }
+
+          case PathParser.CLOSE_PATH:
+            if (ctx) {
+              ctx.closePath();
+            }
+
+            break;
+        }
+      });
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      this.setTextData(ctx);
+      ctx.save();
+      var textDecoration = this.parent.getStyle('text-decoration').getString();
+      var fontSize = this.getFontSize();
+      var glyphInfo = this.glyphInfo;
+      var fill = ctx.fillStyle;
+
+      if (textDecoration === 'underline') {
+        ctx.beginPath();
+      }
+
+      glyphInfo.forEach(function (glyph, i) {
+        var p0 = glyph.p0,
+            p1 = glyph.p1,
+            rotation = glyph.rotation,
+            partialText = glyph.text;
+        ctx.save();
+        ctx.translate(p0.x, p0.y);
+        ctx.rotate(rotation);
+
+        if (ctx.fillStyle) {
+          ctx.fillText(partialText, 0, 0);
+        }
+
+        if (ctx.strokeStyle) {
+          ctx.strokeText(partialText, 0, 0);
+        }
+
+        ctx.restore();
+
+        if (textDecoration === 'underline') {
+          if (i === 0) {
+            ctx.moveTo(p0.x, p0.y + fontSize / 8);
+          }
+
+          ctx.lineTo(p1.x, p1.y + fontSize / 5);
+        } // // To assist with debugging visually, uncomment following
+        //
+        // ctx.beginPath();
+        // if (i % 2)
+        // 	ctx.strokeStyle = 'red';
+        // else
+        // 	ctx.strokeStyle = 'green';
+        // ctx.moveTo(p0.x, p0.y);
+        // ctx.lineTo(p1.x, p1.y);
+        // ctx.stroke();
+        // ctx.closePath();
+
+      });
+
+      if (textDecoration === 'underline') {
+        ctx.lineWidth = fontSize / 20;
+        ctx.strokeStyle = fill;
+        ctx.stroke();
+        ctx.closePath();
+      }
+
+      ctx.restore();
+    }
+  }, {
+    key: "getLetterSpacingAt",
+    value: function getLetterSpacingAt() {
+      var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
+      return this.letterSpacingCache[idx] || 0;
+    }
+  }, {
+    key: "findSegmentToFitChar",
+    value: function findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, dy, c, charI) {
+      var offset = inputOffset;
+      var glyphWidth = this.measureText(ctx, c);
+
+      if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {
+        glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
+      }
+
+      if (charI > -1) {
+        offset += this.getLetterSpacingAt(charI);
+      }
+
+      var splineStep = this.textHeight / 20;
+      var p0 = this.getEquidistantPointOnPath(offset, splineStep, 0);
+      var p1 = this.getEquidistantPointOnPath(offset + glyphWidth, splineStep, 0);
+      var segment = {
+        p0: p0,
+        p1: p1
+      };
+      var rotation = p0 && p1 ? Math.atan2(p1.y - p0.y, p1.x - p0.x) : 0;
+
+      if (dy) {
+        var dyX = Math.cos(Math.PI / 2 + rotation) * dy;
+        var dyY = Math.cos(-rotation) * dy;
+        segment.p0 = _objectSpread$2(_objectSpread$2({}, p0), {}, {
+          x: p0.x + dyX,
+          y: p0.y + dyY
+        });
+        segment.p1 = _objectSpread$2(_objectSpread$2({}, p1), {}, {
+          x: p1.x + dyX,
+          y: p1.y + dyY
+        });
+      }
+
+      offset += glyphWidth;
+      return {
+        offset: offset,
+        segment: segment,
+        rotation: rotation
+      };
+    }
+  }, {
+    key: "measureText",
+    value: function measureText(ctx, text) {
+      var measuresCache = this.measuresCache;
+      var targetText = text || this.getText();
+
+      if (measuresCache.has(targetText)) {
+        return measuresCache.get(targetText);
+      }
+
+      var measure = this.measureTargetText(ctx, targetText);
+      measuresCache.set(targetText, measure);
+      return measure;
+    } // This method supposes what all custom fonts already loaded.
+    // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
+    // You need to call this method manually to update glyphs cache.
+
+  }, {
+    key: "setTextData",
+    value: function setTextData(ctx) {
+      var _this2 = this;
+
+      if (this.glyphInfo) {
+        return;
+      }
+
+      var renderText = this.getText();
+      var chars = renderText.split('');
+      var spacesNumber = renderText.split(' ').length - 1;
+      var dx = this.parent.getAttribute('dx').split().map(function (_) {
+        return _.getPixels('x');
+      });
+      var dy = this.parent.getAttribute('dy').getPixels('y');
+      var anchor = this.parent.getStyle('text-anchor').getString('start');
+      var thisSpacing = this.getStyle('letter-spacing');
+      var parentSpacing = this.parent.getStyle('letter-spacing');
+      var letterSpacing = 0;
+
+      if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {
+        letterSpacing = parentSpacing.getPixels();
+      } else if (thisSpacing.hasValue()) {
+        if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {
+          letterSpacing = thisSpacing.getPixels();
+        }
+      } // fill letter-spacing cache
+
+
+      var letterSpacingCache = [];
+      var textLen = renderText.length;
+      this.letterSpacingCache = letterSpacingCache;
+
+      for (var i = 0; i < textLen; i++) {
+        letterSpacingCache.push(typeof dx[i] !== 'undefined' ? dx[i] : letterSpacing);
+      }
+
+      var dxSum = letterSpacingCache.reduce(function (acc, cur, i) {
+        return i === 0 ? 0 : acc + cur || 0;
+      }, 0);
+      var textWidth = this.measureText(ctx);
+      var textFullWidth = Math.max(textWidth + dxSum, 0);
+      this.textWidth = textWidth;
+      this.textHeight = this.getFontSize();
+      this.glyphInfo = [];
+      var fullPathWidth = this.getPathLength();
+      var startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
+      var offset = 0;
+
+      if (anchor === 'middle' || anchor === 'center') {
+        offset = -textFullWidth / 2;
+      }
+
+      if (anchor === 'end' || anchor === 'right') {
+        offset = -textFullWidth;
+      }
+
+      offset += startOffset;
+      chars.forEach(function (char, i) {
+        // Find such segment what distance between p0 and p1 is approx. width of glyph
+        var _this2$findSegmentToF = _this2.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, dy, char, i),
+            nextOffset = _this2$findSegmentToF.offset,
+            segment = _this2$findSegmentToF.segment,
+            rotation = _this2$findSegmentToF.rotation;
+
+        offset = nextOffset;
+
+        if (!segment.p0 || !segment.p1) {
+          return;
+        } // const width = this.getLineLength(
+        // 	segment.p0.x,
+        // 	segment.p0.y,
+        // 	segment.p1.x,
+        // 	segment.p1.y
+        // );
+        // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.
+        // Can foresee having a rough pair table built in that the developer can override as needed.
+        // Or use "dx" attribute of the <text> node as a naive replacement
+        // const kern = 0;
+        // placeholder for future implementation
+        // const midpoint = this.getPointOnLine(
+        // 	kern + width / 2.0,
+        // 	segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y
+        // );
+
+
+        _this2.glyphInfo.push({
+          // transposeX: midpoint.x,
+          // transposeY: midpoint.y,
+          text: chars[i],
+          p0: segment.p0,
+          p1: segment.p1,
+          rotation: rotation
+        });
+      });
+    }
+  }, {
+    key: "parsePathData",
+    value: function parsePathData(path) {
+      this.pathLength = -1; // reset path length
+
+      if (!path) {
+        return [];
+      }
+
+      var pathCommands = [];
+      var pathParser = path.pathParser;
+      pathParser.reset(); // convert l, H, h, V, and v to L
+
+      while (!pathParser.isEnd()) {
+        var current = pathParser.current;
+        var startX = current ? current.x : 0;
+        var startY = current ? current.y : 0;
+        var command = pathParser.next();
+        var nextCommandType = command.type;
+        var points = [];
+
+        switch (command.type) {
+          case PathParser.MOVE_TO:
+            this.pathM(pathParser, points);
+            break;
+
+          case PathParser.LINE_TO:
+            nextCommandType = this.pathL(pathParser, points);
+            break;
+
+          case PathParser.HORIZ_LINE_TO:
+            nextCommandType = this.pathH(pathParser, points);
+            break;
+
+          case PathParser.VERT_LINE_TO:
+            nextCommandType = this.pathV(pathParser, points);
+            break;
+
+          case PathParser.CURVE_TO:
+            this.pathC(pathParser, points);
+            break;
+
+          case PathParser.SMOOTH_CURVE_TO:
+            nextCommandType = this.pathS(pathParser, points);
+            break;
+
+          case PathParser.QUAD_TO:
+            this.pathQ(pathParser, points);
+            break;
+
+          case PathParser.SMOOTH_QUAD_TO:
+            nextCommandType = this.pathT(pathParser, points);
+            break;
+
+          case PathParser.ARC:
+            points = this.pathA(pathParser);
+            break;
+
+          case PathParser.CLOSE_PATH:
+            PathElement.pathZ(pathParser);
+            break;
+        }
+
+        if (command.type !== PathParser.CLOSE_PATH) {
+          pathCommands.push({
+            type: nextCommandType,
+            points: points,
+            start: {
+              x: startX,
+              y: startY
+            },
+            pathLength: this.calcLength(startX, startY, nextCommandType, points)
+          });
+        } else {
+          pathCommands.push({
+            type: PathParser.CLOSE_PATH,
+            points: [],
+            pathLength: 0
+          });
+        }
+      }
+
+      return pathCommands;
+    }
+  }, {
+    key: "pathM",
+    value: function pathM(pathParser, points) {
+      var _PathElement$pathM$po = PathElement.pathM(pathParser).point,
+          x = _PathElement$pathM$po.x,
+          y = _PathElement$pathM$po.y;
+      points.push(x, y);
+    }
+  }, {
+    key: "pathL",
+    value: function pathL(pathParser, points) {
+      var _PathElement$pathL$po = PathElement.pathL(pathParser).point,
+          x = _PathElement$pathL$po.x,
+          y = _PathElement$pathL$po.y;
+      points.push(x, y);
+      return PathParser.LINE_TO;
+    }
+  }, {
+    key: "pathH",
+    value: function pathH(pathParser, points) {
+      var _PathElement$pathH$po = PathElement.pathH(pathParser).point,
+          x = _PathElement$pathH$po.x,
+          y = _PathElement$pathH$po.y;
+      points.push(x, y);
+      return PathParser.LINE_TO;
+    }
+  }, {
+    key: "pathV",
+    value: function pathV(pathParser, points) {
+      var _PathElement$pathV$po = PathElement.pathV(pathParser).point,
+          x = _PathElement$pathV$po.x,
+          y = _PathElement$pathV$po.y;
+      points.push(x, y);
+      return PathParser.LINE_TO;
+    }
+  }, {
+    key: "pathC",
+    value: function pathC(pathParser, points) {
+      var _PathElement$pathC = PathElement.pathC(pathParser),
+          point = _PathElement$pathC.point,
+          controlPoint = _PathElement$pathC.controlPoint,
+          currentPoint = _PathElement$pathC.currentPoint;
+
+      points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+  }, {
+    key: "pathS",
+    value: function pathS(pathParser, points) {
+      var _PathElement$pathS = PathElement.pathS(pathParser),
+          point = _PathElement$pathS.point,
+          controlPoint = _PathElement$pathS.controlPoint,
+          currentPoint = _PathElement$pathS.currentPoint;
+
+      points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      return PathParser.CURVE_TO;
+    }
+  }, {
+    key: "pathQ",
+    value: function pathQ(pathParser, points) {
+      var _PathElement$pathQ = PathElement.pathQ(pathParser),
+          controlPoint = _PathElement$pathQ.controlPoint,
+          currentPoint = _PathElement$pathQ.currentPoint;
+
+      points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+  }, {
+    key: "pathT",
+    value: function pathT(pathParser, points) {
+      var _PathElement$pathT = PathElement.pathT(pathParser),
+          controlPoint = _PathElement$pathT.controlPoint,
+          currentPoint = _PathElement$pathT.currentPoint;
+
+      points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      return PathParser.QUAD_TO;
+    }
+  }, {
+    key: "pathA",
+    value: function pathA(pathParser) {
+      var _PathElement$pathA = PathElement.pathA(pathParser),
+          rX = _PathElement$pathA.rX,
+          rY = _PathElement$pathA.rY,
+          sweepFlag = _PathElement$pathA.sweepFlag,
+          xAxisRotation = _PathElement$pathA.xAxisRotation,
+          centp = _PathElement$pathA.centp,
+          a1 = _PathElement$pathA.a1,
+          ad = _PathElement$pathA.ad;
+
+      if (sweepFlag === 0 && ad > 0) {
+        ad -= 2 * Math.PI;
+      }
+
+      if (sweepFlag === 1 && ad < 0) {
+        ad += 2 * Math.PI;
+      }
+
+      return [centp.x, centp.y, rX, rY, a1, ad, xAxisRotation, sweepFlag];
+    }
+  }, {
+    key: "calcLength",
+    value: function calcLength(x, y, commandType, points) {
+      var len = 0;
+      var p1 = null;
+      var p2 = null;
+      var t = 0;
+
+      switch (commandType) {
+        case PathParser.LINE_TO:
+          return this.getLineLength(x, y, points[0], points[1]);
+
+        case PathParser.CURVE_TO:
+          // Approximates by breaking curve into 100 line segments
+          len = 0.0;
+          p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
+
+          for (t = 0.01; t <= 1; t += 0.01) {
+            p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
+            len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+            p1 = p2;
+          }
+
+          return len;
+
+        case PathParser.QUAD_TO:
+          // Approximates by breaking curve into 100 line segments
+          len = 0.0;
+          p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
+
+          for (t = 0.01; t <= 1; t += 0.01) {
+            p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
+            len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+            p1 = p2;
+          }
+
+          return len;
+
+        case PathParser.ARC:
+          {
+            // Approximates by breaking curve into line segments
+            len = 0.0;
+            var start = points[4]; // 4 = theta
+
+            var dTheta = points[5]; // 5 = dTheta
+
+            var end = points[4] + dTheta;
+            var inc = Math.PI / 180.0; // 1 degree resolution
+
+            if (Math.abs(start - end) < inc) {
+              inc = Math.abs(start - end);
+            } // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
+
+
+            p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
+
+            if (dTheta < 0) {
+              // clockwise
+              for (t = start - inc; t > end; t -= inc) {
+                p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
+                len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                p1 = p2;
+              }
+            } else {
+              // counter-clockwise
+              for (t = start + inc; t < end; t += inc) {
+                p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
+                len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                p1 = p2;
+              }
+            }
+
+            p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
+            len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+            return len;
+          }
+      }
+
+      return 0;
+    }
+  }, {
+    key: "getPointOnLine",
+    value: function getPointOnLine(dist, p1x, p1y, p2x, p2y) {
+      var fromX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : p1x;
+      var fromY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : p1y;
+      var m = (p2y - p1y) / (p2x - p1x + PSEUDO_ZERO);
+      var run = Math.sqrt(dist * dist / (1 + m * m));
+
+      if (p2x < p1x) {
+        run *= -1;
+      }
+
+      var rise = m * run;
+      var pt = null;
+
+      if (p2x === p1x) {
+        // vertical line
+        pt = {
+          x: fromX,
+          y: fromY + rise
+        };
+      } else if ((fromY - p1y) / (fromX - p1x + PSEUDO_ZERO) === m) {
+        pt = {
+          x: fromX + run,
+          y: fromY + rise
+        };
+      } else {
+        var ix = 0;
+        var iy = 0;
+        var len = this.getLineLength(p1x, p1y, p2x, p2y);
+
+        if (len < PSEUDO_ZERO) {
+          return null;
+        }
+
+        var u = (fromX - p1x) * (p2x - p1x) + (fromY - p1y) * (p2y - p1y);
+        u /= len * len;
+        ix = p1x + u * (p2x - p1x);
+        iy = p1y + u * (p2y - p1y);
+        var pRise = this.getLineLength(fromX, fromY, ix, iy);
+        var pRun = Math.sqrt(dist * dist - pRise * pRise);
+        run = Math.sqrt(pRun * pRun / (1 + m * m));
+
+        if (p2x < p1x) {
+          run *= -1;
+        }
+
+        rise = m * run;
+        pt = {
+          x: ix + run,
+          y: iy + rise
+        };
+      }
+
+      return pt;
+    }
+  }, {
+    key: "getPointOnPath",
+    value: function getPointOnPath(distance) {
+      var fullLen = this.getPathLength();
+      var cumulativePathLength = 0;
+      var p = null;
+
+      if (distance < -0.00005 || distance - 0.00005 > fullLen) {
+        return null;
+      }
+
+      var dataArray = this.dataArray;
+
+      var _iterator = _createForOfIteratorHelper(dataArray),
+          _step;
+
+      try {
+        for (_iterator.s(); !(_step = _iterator.n()).done;) {
+          var command = _step.value;
+
+          if (command && (command.pathLength < 0.00005 || cumulativePathLength + command.pathLength + 0.00005 < distance)) {
+            cumulativePathLength += command.pathLength;
+            continue;
+          }
+
+          var delta = distance - cumulativePathLength;
+          var currentT = 0;
+
+          switch (command.type) {
+            case PathParser.LINE_TO:
+              p = this.getPointOnLine(delta, command.start.x, command.start.y, command.points[0], command.points[1], command.start.x, command.start.y);
+              break;
+
+            case PathParser.ARC:
+              {
+                var start = command.points[4]; // 4 = theta
+
+                var dTheta = command.points[5]; // 5 = dTheta
+
+                var end = command.points[4] + dTheta;
+                currentT = start + delta / command.pathLength * dTheta;
+
+                if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {
+                  break;
+                }
+
+                p = this.getPointOnEllipticalArc(command.points[0], command.points[1], command.points[2], command.points[3], currentT, command.points[6]);
+                break;
+              }
+
+            case PathParser.CURVE_TO:
+              currentT = delta / command.pathLength;
+
+              if (currentT > 1) {
+                currentT = 1;
+              }
+
+              p = this.getPointOnCubicBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3], command.points[4], command.points[5]);
+              break;
+
+            case PathParser.QUAD_TO:
+              currentT = delta / command.pathLength;
+
+              if (currentT > 1) {
+                currentT = 1;
+              }
+
+              p = this.getPointOnQuadraticBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3]);
+              break;
+
+            default:
+          }
+
+          if (p) {
+            return p;
+          }
+
+          break;
+        }
+      } catch (err) {
+        _iterator.e(err);
+      } finally {
+        _iterator.f();
+      }
+
+      return null;
+    }
+  }, {
+    key: "getLineLength",
+    value: function getLineLength(x1, y1, x2, y2) {
+      return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
+    }
+  }, {
+    key: "getPathLength",
+    value: function getPathLength() {
+      if (this.pathLength === -1) {
+        this.pathLength = this.dataArray.reduce(function (length, command) {
+          return command.pathLength > 0 ? length + command.pathLength : length;
+        }, 0);
+      }
+
+      return this.pathLength;
+    }
+  }, {
+    key: "getPointOnCubicBezier",
+    value: function getPointOnCubicBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y) {
+      var x = p4x * CB1(pct) + p3x * CB2(pct) + p2x * CB3(pct) + p1x * CB4(pct);
+      var y = p4y * CB1(pct) + p3y * CB2(pct) + p2y * CB3(pct) + p1y * CB4(pct);
+      return {
+        x: x,
+        y: y
+      };
+    }
+  }, {
+    key: "getPointOnQuadraticBezier",
+    value: function getPointOnQuadraticBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y) {
+      var x = p3x * QB1(pct) + p2x * QB2(pct) + p1x * QB3(pct);
+      var y = p3y * QB1(pct) + p2y * QB2(pct) + p1y * QB3(pct);
+      return {
+        x: x,
+        y: y
+      };
+    }
+  }, {
+    key: "getPointOnEllipticalArc",
+    value: function getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
+      var cosPsi = Math.cos(psi);
+      var sinPsi = Math.sin(psi);
+      var pt = {
+        x: rx * Math.cos(theta),
+        y: ry * Math.sin(theta)
+      };
+      return {
+        x: cx + (pt.x * cosPsi - pt.y * sinPsi),
+        y: cy + (pt.x * sinPsi + pt.y * cosPsi)
+      };
+    } // TODO need some optimisations. possibly build cache only for curved segments?
+
+  }, {
+    key: "buildEquidistantCache",
+    value: function buildEquidistantCache(inputStep, inputPrecision) {
+      var fullLen = this.getPathLength();
+      var precision = inputPrecision || 0.25; // accuracy vs performance
+
+      var step = inputStep || fullLen / 100;
+
+      if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {
+        // Prepare cache
+        this.equidistantCache = {
+          step: step,
+          precision: precision,
+          points: []
+        }; // Calculate points
+
+        var s = 0;
+
+        for (var l = 0; l <= fullLen; l += precision) {
+          var p0 = this.getPointOnPath(l);
+          var p1 = this.getPointOnPath(l + precision);
+
+          if (!p0 || !p1) {
+            continue;
+          }
+
+          s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
+
+          if (s >= step) {
+            this.equidistantCache.points.push({
+              x: p0.x,
+              y: p0.y,
+              distance: l
+            });
+            s -= step;
+          }
+        }
+      }
+    }
+  }, {
+    key: "getEquidistantPointOnPath",
+    value: function getEquidistantPointOnPath(targetDistance, step, precision) {
+      this.buildEquidistantCache(step, precision);
+
+      if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {
+        return null;
+      }
+
+      var idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));
+      return this.equidistantCache.points[idx] || null;
+    }
+  }]);
+
+  return TextPathElement;
+}(TextElement);
+
+function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var dataUriRegex = /^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;
+
+var ImageElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default["default"](ImageElement, _RenderedElement);
+
+  var _super = _createSuper$d(ImageElement);
+
+  function ImageElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, ImageElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'image';
+    _this.loaded = false;
+
+    var href = _this.getHrefAttribute().getString();
+
+    if (!href) {
+      return _possibleConstructorReturn__default["default"](_this);
+    }
+
+    var isSvg = href.endsWith('.svg') || /^\s*data:image\/svg\+xml/i.test(href);
+    document.images.push(_assertThisInitialized__default["default"](_this));
+
+    if (!isSvg) {
+      void _this.loadImage(href);
+    } else {
+      void _this.loadSvg(href);
+    }
+
+    _this.isSvg = isSvg;
+    return _this;
+  }
+
+  _createClass__default["default"](ImageElement, [{
+    key: "loadImage",
+    value: function () {
+      var _loadImage = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(href) {
+        var image;
+        return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                _context.prev = 0;
+                _context.next = 3;
+                return this.document.createImage(href);
+
+              case 3:
+                image = _context.sent;
+                this.image = image;
+                _context.next = 10;
+                break;
+
+              case 7:
+                _context.prev = 7;
+                _context.t0 = _context["catch"](0);
+                console.error("Error while loading image \"".concat(href, "\":"), _context.t0);
+
+              case 10:
+                this.loaded = true;
+
+              case 11:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee, this, [[0, 7]]);
+      }));
+
+      function loadImage(_x) {
+        return _loadImage.apply(this, arguments);
+      }
+
+      return loadImage;
+    }()
+  }, {
+    key: "loadSvg",
+    value: function () {
+      var _loadSvg = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(href) {
+        var match, data, response, svg;
+        return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
+          while (1) {
+            switch (_context2.prev = _context2.next) {
+              case 0:
+                match = dataUriRegex.exec(href);
+
+                if (!match) {
+                  _context2.next = 6;
+                  break;
+                }
+
+                data = match[5];
+
+                if (match[4] === 'base64') {
+                  this.image = atob(data);
+                } else {
+                  this.image = decodeURIComponent(data);
+                }
+
+                _context2.next = 19;
+                break;
+
+              case 6:
+                _context2.prev = 6;
+                _context2.next = 9;
+                return this.document.fetch(href);
+
+              case 9:
+                response = _context2.sent;
+                _context2.next = 12;
+                return response.text();
+
+              case 12:
+                svg = _context2.sent;
+                this.image = svg;
+                _context2.next = 19;
+                break;
+
+              case 16:
+                _context2.prev = 16;
+                _context2.t0 = _context2["catch"](6);
+                console.error("Error while loading image \"".concat(href, "\":"), _context2.t0);
+
+              case 19:
+                this.loaded = true;
+
+              case 20:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2, this, [[6, 16]]);
+      }));
+
+      function loadSvg(_x2) {
+        return _loadSvg.apply(this, arguments);
+      }
+
+      return loadSvg;
+    }()
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      var document = this.document,
+          image = this.image,
+          loaded = this.loaded;
+      var x = this.getAttribute('x').getPixels('x');
+      var y = this.getAttribute('y').getPixels('y');
+      var width = this.getStyle('width').getPixels('x');
+      var height = this.getStyle('height').getPixels('y');
+
+      if (!loaded || !image || !width || !height) {
+        return;
+      }
+
+      ctx.save();
+      ctx.translate(x, y);
+
+      if (this.isSvg) {
+        var subDocument = document.canvg.forkString(ctx, this.image, {
+          ignoreMouse: true,
+          ignoreAnimation: true,
+          ignoreDimensions: true,
+          ignoreClear: true,
+          offsetX: 0,
+          offsetY: 0,
+          scaleWidth: width,
+          scaleHeight: height
+        });
+        subDocument.document.documentElement.parent = this;
+        void subDocument.render();
+      } else {
+        var _image = this.image;
+        document.setViewBox({
+          ctx: ctx,
+          aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
+          width: width,
+          desiredWidth: _image.width,
+          height: height,
+          desiredHeight: _image.height
+        });
+
+        if (this.loaded) {
+          if (typeof _image.complete === 'undefined' || _image.complete) {
+            ctx.drawImage(_image, 0, 0);
+          }
+        }
+      }
+
+      ctx.restore();
+    }
+  }, {
+    key: "getBoundingBox",
+    value: function getBoundingBox() {
+      var x = this.getAttribute('x').getPixels('x');
+      var y = this.getAttribute('y').getPixels('y');
+      var width = this.getStyle('width').getPixels('x');
+      var height = this.getStyle('height').getPixels('y');
+      return new BoundingBox(x, y, x + width, y + height);
+    }
+  }]);
+
+  return ImageElement;
+}(RenderedElement);
+
+function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var SymbolElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default["default"](SymbolElement, _RenderedElement);
+
+  var _super = _createSuper$c(SymbolElement);
+
+  function SymbolElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, SymbolElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'symbol';
+    return _this;
+  }
+
+  _createClass__default["default"](SymbolElement, [{
+    key: "render",
+    value: function render(_) {// NO RENDER
+    }
+  }]);
+
+  return SymbolElement;
+}(RenderedElement);
+
+var SVGFontLoader = /*#__PURE__*/function () {
+  function SVGFontLoader(document) {
+    _classCallCheck__default["default"](this, SVGFontLoader);
+
+    this.document = document;
+    this.loaded = false;
+    document.fonts.push(this);
+  }
+
+  _createClass__default["default"](SVGFontLoader, [{
+    key: "load",
+    value: function () {
+      var _load = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(fontFamily, url) {
+        var document, svgDocument, fonts;
+        return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                _context.prev = 0;
+                document = this.document;
+                _context.next = 4;
+                return document.canvg.parser.load(url);
+
+              case 4:
+                svgDocument = _context.sent;
+                fonts = svgDocument.getElementsByTagName('font');
+                Array.from(fonts).forEach(function (fontNode) {
+                  var font = document.createElement(fontNode);
+                  document.definitions[fontFamily] = font;
+                });
+                _context.next = 12;
+                break;
+
+              case 9:
+                _context.prev = 9;
+                _context.t0 = _context["catch"](0);
+                console.error("Error while loading font \"".concat(url, "\":"), _context.t0);
+
+              case 12:
+                this.loaded = true;
+
+              case 13:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee, this, [[0, 9]]);
+      }));
+
+      function load(_x, _x2) {
+        return _load.apply(this, arguments);
+      }
+
+      return load;
+    }()
+  }]);
+
+  return SVGFontLoader;
+}();
+
+function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var StyleElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](StyleElement, _Element);
+
+  var _super = _createSuper$b(StyleElement);
+
+  function StyleElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, StyleElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'style';
+    var css = compressSpaces(Array.from(node.childNodes) // NEED TEST
+    .map(function (_) {
+      return _.textContent;
+    }).join('').replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
+    .replace(/@import.*;/g, '') // remove imports
+    );
+    var cssDefs = css.split('}');
+    cssDefs.forEach(function (_) {
+      var def = _.trim();
+
+      if (!def) {
+        return;
+      }
+
+      var cssParts = def.split('{');
+      var cssClasses = cssParts[0].split(',');
+      var cssProps = cssParts[1].split(';');
+      cssClasses.forEach(function (_) {
+        var cssClass = _.trim();
+
+        if (!cssClass) {
+          return;
+        }
+
+        var props = document.styles[cssClass] || {};
+        cssProps.forEach(function (cssProp) {
+          var prop = cssProp.indexOf(':');
+          var name = cssProp.substr(0, prop).trim();
+          var value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
+
+          if (name && value) {
+            props[name] = new Property(document, name, value);
+          }
+        });
+        document.styles[cssClass] = props;
+        document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
+
+        if (cssClass === '@font-face') {
+          //  && !nodeEnv
+          var fontFamily = props['font-family'].getString().replace(/"|'/g, '');
+          var srcs = props.src.getString().split(',');
+          srcs.forEach(function (src) {
+            if (src.indexOf('format("svg")') > 0) {
+              var url = parseExternalUrl(src);
+
+              if (url) {
+                void new SVGFontLoader(document).load(fontFamily, url);
+              }
+            }
+          });
+        }
+      });
+    });
+    return _this;
+  }
+
+  return StyleElement;
+}(Element);
+StyleElement.parseExternalUrl = parseExternalUrl;
+
+function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var UseElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default["default"](UseElement, _RenderedElement);
+
+  var _super = _createSuper$a(UseElement);
+
+  function UseElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, UseElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'use';
+    return _this;
+  }
+
+  _createClass__default["default"](UseElement, [{
+    key: "setContext",
+    value: function setContext(ctx) {
+      _get__default["default"](_getPrototypeOf__default["default"](UseElement.prototype), "setContext", this).call(this, ctx);
+
+      var xAttr = this.getAttribute('x');
+      var yAttr = this.getAttribute('y');
+
+      if (xAttr.hasValue()) {
+        ctx.translate(xAttr.getPixels('x'), 0);
+      }
+
+      if (yAttr.hasValue()) {
+        ctx.translate(0, yAttr.getPixels('y'));
+      }
+    }
+  }, {
+    key: "path",
+    value: function path(ctx) {
+      var element = this.element;
+
+      if (element) {
+        element.path(ctx);
+      }
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      var document = this.document,
+          element = this.element;
+
+      if (element) {
+        var tempSvg = element;
+
+        if (element.type === 'symbol') {
+          // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
+          tempSvg = new SVGElement(document, null);
+          tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
+          tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
+          tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
+          tempSvg.children = element.children; // element is still the parent of the children
+
+          element.styles.opacity = new Property(document, 'opacity', this.calculateOpacity());
+        }
+
+        if (tempSvg.type === 'svg') {
+          var widthStyle = this.getStyle('width', false, true);
+          var heightStyle = this.getStyle('height', false, true); // if symbol or svg, inherit width/height from me
+
+          if (widthStyle.hasValue()) {
+            tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
+          }
+
+          if (heightStyle.hasValue()) {
+            tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
+          }
+        }
+
+        var oldParent = tempSvg.parent;
+        tempSvg.parent = this;
+        tempSvg.render(ctx);
+        tempSvg.parent = oldParent;
+      }
+    }
+  }, {
+    key: "getBoundingBox",
+    value: function getBoundingBox(ctx) {
+      var element = this.element;
+
+      if (element) {
+        return element.getBoundingBox(ctx);
+      }
+
+      return null;
+    }
+  }, {
+    key: "elementTransform",
+    value: function elementTransform() {
+      var document = this.document,
+          element = this.element;
+      return Transform.fromElement(document, element);
+    }
+  }, {
+    key: "element",
+    get: function get() {
+      if (!this.cachedElement) {
+        this.cachedElement = this.getHrefAttribute().getDefinition();
+      }
+
+      return this.cachedElement;
+    }
+  }]);
+
+  return UseElement;
+}(RenderedElement);
+
+function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+function imGet(img, x, y, width, _height, rgba) {
+  return img[y * width * 4 + x * 4 + rgba];
+}
+
+function imSet(img, x, y, width, _height, rgba, val) {
+  img[y * width * 4 + x * 4 + rgba] = val;
+}
+
+function m(matrix, i, v) {
+  var mi = matrix[i];
+  return mi * v;
+}
+
+function c(a, m1, m2, m3) {
+  return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
+}
+
+var FeColorMatrixElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](FeColorMatrixElement, _Element);
+
+  var _super = _createSuper$9(FeColorMatrixElement);
+
+  function FeColorMatrixElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, FeColorMatrixElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'feColorMatrix';
+    var matrix = toNumbers(_this.getAttribute('values').getString());
+
+    switch (_this.getAttribute('type').getString('matrix')) {
+      // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
+      case 'saturate':
+        {
+          var s = matrix[0];
+          /* eslint-disable array-element-newline */
+
+          matrix = [0.213 + 0.787 * s, 0.715 - 0.715 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 + 0.285 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 - 0.715 * s, 0.072 + 0.928 * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
+          /* eslint-enable array-element-newline */
+
+          break;
+        }
+
+      case 'hueRotate':
+        {
+          var a = matrix[0] * Math.PI / 180.0;
+          /* eslint-disable array-element-newline */
+
+          matrix = [c(a, 0.213, 0.787, -0.213), c(a, 0.715, -0.715, -0.715), c(a, 0.072, -0.072, 0.928), 0, 0, c(a, 0.213, -0.213, 0.143), c(a, 0.715, 0.285, 0.140), c(a, 0.072, -0.072, -0.283), 0, 0, c(a, 0.213, -0.213, -0.787), c(a, 0.715, -0.715, 0.715), c(a, 0.072, 0.928, 0.072), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
+          /* eslint-enable array-element-newline */
+
+          break;
+        }
+
+      case 'luminanceToAlpha':
+        /* eslint-disable array-element-newline */
+        matrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0, 0, 0, 0, 0, 1];
+        /* eslint-enable array-element-newline */
+
+        break;
+    }
+
+    _this.matrix = matrix;
+    _this.includeOpacity = _this.getAttribute('includeOpacity').hasValue();
+    return _this;
+  }
+
+  _createClass__default["default"](FeColorMatrixElement, [{
+    key: "apply",
+    value: function apply(ctx, _x, _y, width, height) {
+      // assuming x==0 && y==0 for now
+      var includeOpacity = this.includeOpacity,
+          matrix = this.matrix;
+      var srcData = ctx.getImageData(0, 0, width, height);
+
+      for (var y = 0; y < height; y++) {
+        for (var x = 0; x < width; x++) {
+          var r = imGet(srcData.data, x, y, width, height, 0);
+          var g = imGet(srcData.data, x, y, width, height, 1);
+          var b = imGet(srcData.data, x, y, width, height, 2);
+          var a = imGet(srcData.data, x, y, width, height, 3);
+          var nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
+          var ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
+          var nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
+          var na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
+
+          if (includeOpacity) {
+            nr = 0;
+            ng = 0;
+            nb = 0;
+            na *= a / 255;
+          }
+
+          imSet(srcData.data, x, y, width, height, 0, nr);
+          imSet(srcData.data, x, y, width, height, 1, ng);
+          imSet(srcData.data, x, y, width, height, 2, nb);
+          imSet(srcData.data, x, y, width, height, 3, na);
+        }
+      }
+
+      ctx.clearRect(0, 0, width, height);
+      ctx.putImageData(srcData, 0, 0);
+    }
+  }]);
+
+  return FeColorMatrixElement;
+}(Element);
+
+function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var MaskElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](MaskElement, _Element);
+
+  var _super = _createSuper$8(MaskElement);
+
+  function MaskElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, MaskElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'mask';
+    return _this;
+  }
+
+  _createClass__default["default"](MaskElement, [{
+    key: "apply",
+    value: function apply(ctx, element) {
+      var document = this.document; // render as temp svg
+
+      var x = this.getAttribute('x').getPixels('x');
+      var y = this.getAttribute('y').getPixels('y');
+      var width = this.getStyle('width').getPixels('x');
+      var height = this.getStyle('height').getPixels('y');
+
+      if (!width && !height) {
+        var boundingBox = new BoundingBox();
+        this.children.forEach(function (child) {
+          boundingBox.addBoundingBox(child.getBoundingBox(ctx));
+        });
+        x = Math.floor(boundingBox.x1);
+        y = Math.floor(boundingBox.y1);
+        width = Math.floor(boundingBox.width);
+        height = Math.floor(boundingBox.height);
+      }
+
+      var ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
+      var maskCanvas = document.createCanvas(x + width, y + height);
+      var maskCtx = maskCanvas.getContext('2d');
+      document.screen.setDefaults(maskCtx);
+      this.renderChildren(maskCtx); // convert mask to alpha with a fake node
+      // TODO: refactor out apply from feColorMatrix
+
+      new FeColorMatrixElement(document, {
+        nodeType: 1,
+        childNodes: [],
+        attributes: [{
+          nodeName: 'type',
+          value: 'luminanceToAlpha'
+        }, {
+          nodeName: 'includeOpacity',
+          value: 'true'
+        }]
+      }).apply(maskCtx, 0, 0, x + width, y + height);
+      var tmpCanvas = document.createCanvas(x + width, y + height);
+      var tmpCtx = tmpCanvas.getContext('2d');
+      document.screen.setDefaults(tmpCtx);
+      element.render(tmpCtx);
+      tmpCtx.globalCompositeOperation = 'destination-in';
+      tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
+      tmpCtx.fillRect(0, 0, x + width, y + height);
+      ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
+      ctx.fillRect(0, 0, x + width, y + height); // reassign mask
+
+      this.restoreStyles(element, ignoredStyles);
+    }
+  }, {
+    key: "render",
+    value: function render(_) {// NO RENDER
+    }
+  }]);
+
+  return MaskElement;
+}(Element);
+MaskElement.ignoreStyles = ['mask', 'transform', 'clip-path'];
+
+function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var noop = function noop() {// NOOP
+};
+
+var ClipPathElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](ClipPathElement, _Element);
+
+  var _super = _createSuper$7(ClipPathElement);
+
+  function ClipPathElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, ClipPathElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'clipPath';
+    return _this;
+  }
+
+  _createClass__default["default"](ClipPathElement, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var document = this.document;
+      var contextProto = Reflect.getPrototypeOf(ctx);
+      var beginPath = ctx.beginPath,
+          closePath = ctx.closePath;
+
+      if (contextProto) {
+        contextProto.beginPath = noop;
+        contextProto.closePath = noop;
+      }
+
+      Reflect.apply(beginPath, ctx, []);
+      this.children.forEach(function (child) {
+        if (typeof child.path === 'undefined') {
+          return;
+        }
+
+        var transform = typeof child.elementTransform !== 'undefined' ? child.elementTransform() : null; // handle <use />
+
+        if (!transform) {
+          transform = Transform.fromElement(document, child);
+        }
+
+        if (transform) {
+          transform.apply(ctx);
+        }
+
+        child.path(ctx);
+
+        if (contextProto) {
+          contextProto.closePath = closePath;
+        }
+
+        if (transform) {
+          transform.unapply(ctx);
+        }
+      });
+      Reflect.apply(closePath, ctx, []);
+      ctx.clip();
+
+      if (contextProto) {
+        contextProto.beginPath = beginPath;
+        contextProto.closePath = closePath;
+      }
+    }
+  }, {
+    key: "render",
+    value: function render(_) {// NO RENDER
+    }
+  }]);
+
+  return ClipPathElement;
+}(Element);
+
+function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var FilterElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](FilterElement, _Element);
+
+  var _super = _createSuper$6(FilterElement);
+
+  function FilterElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, FilterElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'filter';
+    return _this;
+  }
+
+  _createClass__default["default"](FilterElement, [{
+    key: "apply",
+    value: function apply(ctx, element) {
+      // render as temp svg
+      var document = this.document,
+          children = this.children;
+      var boundingBox = element.getBoundingBox(ctx);
+
+      if (!boundingBox) {
+        return;
+      }
+
+      var px = 0;
+      var py = 0;
+      children.forEach(function (child) {
+        var efd = child.extraFilterDistance || 0;
+        px = Math.max(px, efd);
+        py = Math.max(py, efd);
+      });
+      var width = Math.floor(boundingBox.width);
+      var height = Math.floor(boundingBox.height);
+      var tmpCanvasWidth = width + 2 * px;
+      var tmpCanvasHeight = height + 2 * py;
+
+      if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
+        return;
+      }
+
+      var x = Math.floor(boundingBox.x);
+      var y = Math.floor(boundingBox.y);
+      var ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
+      var tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
+      var tmpCtx = tmpCanvas.getContext('2d');
+      document.screen.setDefaults(tmpCtx);
+      tmpCtx.translate(-x + px, -y + py);
+      element.render(tmpCtx); // apply filters
+
+      children.forEach(function (child) {
+        if (typeof child.apply === 'function') {
+          child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
+        }
+      }); // render on me
+
+      ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
+      this.restoreStyles(element, ignoredStyles);
+    }
+  }, {
+    key: "render",
+    value: function render(_) {// NO RENDER
+    }
+  }]);
+
+  return FilterElement;
+}(Element);
+FilterElement.ignoreStyles = ['filter', 'transform', 'clip-path'];
+
+function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var FeDropShadowElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](FeDropShadowElement, _Element);
+
+  var _super = _createSuper$5(FeDropShadowElement);
+
+  function FeDropShadowElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, FeDropShadowElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'feDropShadow';
+
+    _this.addStylesFromStyleDefinition();
+
+    return _this;
+  }
+
+  _createClass__default["default"](FeDropShadowElement, [{
+    key: "apply",
+    value: function apply(_, _x, _y, _width, _height) {// TODO: implement
+    }
+  }]);
+
+  return FeDropShadowElement;
+}(Element);
+
+function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var FeMorphologyElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](FeMorphologyElement, _Element);
+
+  var _super = _createSuper$4(FeMorphologyElement);
+
+  function FeMorphologyElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, FeMorphologyElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'feMorphology';
+    return _this;
+  }
+
+  _createClass__default["default"](FeMorphologyElement, [{
+    key: "apply",
+    value: function apply(_, _x, _y, _width, _height) {// TODO: implement
+    }
+  }]);
+
+  return FeMorphologyElement;
+}(Element);
+
+function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var FeCompositeElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](FeCompositeElement, _Element);
+
+  var _super = _createSuper$3(FeCompositeElement);
+
+  function FeCompositeElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, FeCompositeElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'feComposite';
+    return _this;
+  }
+
+  _createClass__default["default"](FeCompositeElement, [{
+    key: "apply",
+    value: function apply(_, _x, _y, _width, _height) {// TODO: implement
+    }
+  }]);
+
+  return FeCompositeElement;
+}(Element);
+
+function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var FeGaussianBlurElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](FeGaussianBlurElement, _Element);
+
+  var _super = _createSuper$2(FeGaussianBlurElement);
+
+  function FeGaussianBlurElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default["default"](this, FeGaussianBlurElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'feGaussianBlur';
+    _this.blurRadius = Math.floor(_this.getAttribute('stdDeviation').getNumber());
+    _this.extraFilterDistance = _this.blurRadius;
+    return _this;
+  }
+
+  _createClass__default["default"](FeGaussianBlurElement, [{
+    key: "apply",
+    value: function apply(ctx, x, y, width, height) {
+      var document = this.document,
+          blurRadius = this.blurRadius;
+      var body = document.window ? document.window.document.body : null;
+      var canvas = ctx.canvas; // StackBlur requires canvas be on document
+
+      canvas.id = document.getUniqueId();
+
+      if (body) {
+        canvas.style.display = 'none';
+        body.appendChild(canvas);
+      }
+
+      stackblurCanvas.canvasRGBA(canvas, x, y, width, height, blurRadius);
+
+      if (body) {
+        body.removeChild(canvas);
+      }
+    }
+  }]);
+
+  return FeGaussianBlurElement;
+}(Element);
+
+function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var TitleElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](TitleElement, _Element);
+
+  var _super = _createSuper$1(TitleElement);
+
+  function TitleElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, TitleElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'title';
+    return _this;
+  }
+
+  return TitleElement;
+}(Element);
+
+function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
+
+function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
+
+var DescElement = /*#__PURE__*/function (_Element) {
+  _inherits__default["default"](DescElement, _Element);
+
+  var _super = _createSuper(DescElement);
+
+  function DescElement() {
+    var _this;
+
+    _classCallCheck__default["default"](this, DescElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'desc';
+    return _this;
+  }
+
+  return DescElement;
+}(Element);
+
+var elements = {
+  'svg': SVGElement,
+  'rect': RectElement,
+  'circle': CircleElement,
+  'ellipse': EllipseElement,
+  'line': LineElement,
+  'polyline': PolylineElement,
+  'polygon': PolygonElement,
+  'path': PathElement,
+  'pattern': PatternElement,
+  'marker': MarkerElement,
+  'defs': DefsElement,
+  'linearGradient': LinearGradientElement,
+  'radialGradient': RadialGradientElement,
+  'stop': StopElement,
+  'animate': AnimateElement,
+  'animateColor': AnimateColorElement,
+  'animateTransform': AnimateTransformElement,
+  'font': FontElement,
+  'font-face': FontFaceElement,
+  'missing-glyph': MissingGlyphElement,
+  'glyph': GlyphElement,
+  'text': TextElement,
+  'tspan': TSpanElement,
+  'tref': TRefElement,
+  'a': AElement,
+  'textPath': TextPathElement,
+  'image': ImageElement,
+  'g': GElement,
+  'symbol': SymbolElement,
+  'style': StyleElement,
+  'use': UseElement,
+  'mask': MaskElement,
+  'clipPath': ClipPathElement,
+  'filter': FilterElement,
+  'feDropShadow': FeDropShadowElement,
+  'feMorphology': FeMorphologyElement,
+  'feComposite': FeCompositeElement,
+  'feColorMatrix': FeColorMatrixElement,
+  'feGaussianBlur': FeGaussianBlurElement,
+  'title': TitleElement,
+  'desc': DescElement
+};
+
+function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function createCanvas(width, height) {
+  var canvas = document.createElement('canvas');
+  canvas.width = width;
+  canvas.height = height;
+  return canvas;
+}
+
+function createImage(_x) {
+  return _createImage.apply(this, arguments);
+}
+
+function _createImage() {
+  _createImage = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(src) {
+    var anonymousCrossOrigin,
+        image,
+        _args = arguments;
+    return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
+      while (1) {
+        switch (_context.prev = _context.next) {
+          case 0:
+            anonymousCrossOrigin = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
+            image = document.createElement('img');
+
+            if (anonymousCrossOrigin) {
+              image.crossOrigin = 'Anonymous';
+            }
+
+            return _context.abrupt("return", new Promise(function (resolve, reject) {
+              image.onload = function () {
+                resolve(image);
+              };
+
+              image.onerror = function (_event, _source, _lineno, _colno, error) {
+                reject(error);
+              };
+
+              image.src = src;
+            }));
+
+          case 4:
+          case "end":
+            return _context.stop();
+        }
+      }
+    }, _callee);
+  }));
+  return _createImage.apply(this, arguments);
+}
+
+var Document = /*#__PURE__*/function () {
+  function Document(canvg) {
+    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+        _ref$rootEmSize = _ref.rootEmSize,
+        rootEmSize = _ref$rootEmSize === void 0 ? 12 : _ref$rootEmSize,
+        _ref$emSize = _ref.emSize,
+        emSize = _ref$emSize === void 0 ? 12 : _ref$emSize,
+        _ref$createCanvas = _ref.createCanvas,
+        createCanvas = _ref$createCanvas === void 0 ? Document.createCanvas : _ref$createCanvas,
+        _ref$createImage = _ref.createImage,
+        createImage = _ref$createImage === void 0 ? Document.createImage : _ref$createImage,
+        anonymousCrossOrigin = _ref.anonymousCrossOrigin;
+
+    _classCallCheck__default["default"](this, Document);
+
+    this.canvg = canvg;
+    this.definitions = {};
+    this.styles = {};
+    this.stylesSpecificity = {};
+    this.images = [];
+    this.fonts = [];
+    this.emSizeStack = [];
+    this.uniqueId = 0;
+    this.screen = canvg.screen;
+    this.rootEmSize = rootEmSize;
+    this.emSize = emSize;
+    this.createCanvas = createCanvas;
+    this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
+    this.screen.wait(this.isImagesLoaded.bind(this));
+    this.screen.wait(this.isFontsLoaded.bind(this));
+  }
+
+  _createClass__default["default"](Document, [{
+    key: "bindCreateImage",
+    value: function bindCreateImage(createImage, anonymousCrossOrigin) {
+      if (typeof anonymousCrossOrigin === 'boolean') {
+        return function (source, forceAnonymousCrossOrigin) {
+          return createImage(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin);
+        };
+      }
+
+      return createImage;
+    }
+  }, {
+    key: "popEmSize",
+    value: function popEmSize() {
+      var emSizeStack = this.emSizeStack;
+      emSizeStack.pop();
+    }
+  }, {
+    key: "getUniqueId",
+    value: function getUniqueId() {
+      return "canvg".concat(++this.uniqueId);
+    }
+  }, {
+    key: "isImagesLoaded",
+    value: function isImagesLoaded() {
+      return this.images.every(function (_) {
+        return _.loaded;
+      });
+    }
+  }, {
+    key: "isFontsLoaded",
+    value: function isFontsLoaded() {
+      return this.fonts.every(function (_) {
+        return _.loaded;
+      });
+    }
+  }, {
+    key: "createDocumentElement",
+    value: function createDocumentElement(document) {
+      var documentElement = this.createElement(document.documentElement);
+      documentElement.root = true;
+      documentElement.addStylesFromStyleDefinition();
+      this.documentElement = documentElement;
+      return documentElement;
+    }
+  }, {
+    key: "createElement",
+    value: function createElement(node) {
+      var elementType = node.nodeName.replace(/^[^:]+:/, '');
+      var ElementType = Document.elementTypes[elementType];
+
+      if (typeof ElementType !== 'undefined') {
+        return new ElementType(this, node);
+      }
+
+      return new UnknownElement(this, node);
+    }
+  }, {
+    key: "createTextNode",
+    value: function createTextNode(node) {
+      return new TextNode(this, node);
+    }
+  }, {
+    key: "setViewBox",
+    value: function setViewBox(config) {
+      this.screen.setViewBox(_objectSpread$1({
+        document: this
+      }, config));
+    }
+  }, {
+    key: "window",
+    get: function get() {
+      return this.screen.window;
+    }
+  }, {
+    key: "fetch",
+    get: function get() {
+      return this.screen.fetch;
+    }
+  }, {
+    key: "ctx",
+    get: function get() {
+      return this.screen.ctx;
+    }
+  }, {
+    key: "emSize",
+    get: function get() {
+      var emSizeStack = this.emSizeStack;
+      return emSizeStack[emSizeStack.length - 1];
+    },
+    set: function set(value) {
+      var emSizeStack = this.emSizeStack;
+      emSizeStack.push(value);
+    }
+  }]);
+
+  return Document;
+}();
+Document.createCanvas = createCanvas;
+Document.createImage = createImage;
+Document.elementTypes = elements;
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+/**
+ * SVG renderer on canvas.
+ */
+
+var Canvg = /*#__PURE__*/function () {
+  /**
+   * Main constructor.
+   * @param ctx - Rendering context.
+   * @param svg - SVG Document.
+   * @param options - Rendering options.
+   */
+  function Canvg(ctx, svg) {
+    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+    _classCallCheck__default["default"](this, Canvg);
+
+    this.parser = new Parser(options);
+    this.screen = new Screen(ctx, options);
+    this.options = options;
+    var document = new Document(this, options);
+    var documentElement = document.createDocumentElement(svg);
+    this.document = document;
+    this.documentElement = documentElement;
+  }
+  /**
+   * Create Canvg instance from SVG source string or URL.
+   * @param ctx - Rendering context.
+   * @param svg - SVG source string or URL.
+   * @param options - Rendering options.
+   * @returns Canvg instance.
+   */
+
+
+  _createClass__default["default"](Canvg, [{
+    key: "fork",
+
+    /**
+     * Create new Canvg instance with inherited options.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string or URL.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    value: function fork(ctx, svg) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      return Canvg.from(ctx, svg, _objectSpread(_objectSpread({}, this.options), options));
+    }
+    /**
+     * Create new Canvg instance with inherited options.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+
+  }, {
+    key: "forkString",
+    value: function forkString(ctx, svg) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      return Canvg.fromString(ctx, svg, _objectSpread(_objectSpread({}, this.options), options));
+    }
+    /**
+     * Document is ready promise.
+     * @returns Ready promise.
+     */
+
+  }, {
+    key: "ready",
+    value: function ready() {
+      return this.screen.ready();
+    }
+    /**
+     * Document is ready value.
+     * @returns Is ready or not.
+     */
+
+  }, {
+    key: "isReady",
+    value: function isReady() {
+      return this.screen.isReady();
+    }
+    /**
+     * Render only first frame, ignoring animations and mouse.
+     * @param options - Rendering options.
+     */
+
+  }, {
+    key: "render",
+    value: function () {
+      var _render = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
+        var options,
+            _args = arguments;
+        return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
+                this.start(_objectSpread({
+                  enableRedraw: true,
+                  ignoreAnimation: true,
+                  ignoreMouse: true
+                }, options));
+                _context.next = 4;
+                return this.ready();
+
+              case 4:
+                this.stop();
+
+              case 5:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee, this);
+      }));
+
+      function render() {
+        return _render.apply(this, arguments);
+      }
+
+      return render;
+    }()
+    /**
+     * Start rendering.
+     * @param options - Render options.
+     */
+
+  }, {
+    key: "start",
+    value: function start() {
+      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+      var documentElement = this.documentElement,
+          screen = this.screen,
+          baseOptions = this.options;
+      screen.start(documentElement, _objectSpread(_objectSpread({
+        enableRedraw: true
+      }, baseOptions), options));
+    }
+    /**
+     * Stop rendering.
+     */
+
+  }, {
+    key: "stop",
+    value: function stop() {
+      this.screen.stop();
+    }
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+
+  }, {
+    key: "resize",
+    value: function resize(width) {
+      var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
+      var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      this.documentElement.resize(width, height, preserveAspectRatio);
+    }
+  }], [{
+    key: "from",
+    value: function () {
+      var _from = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(ctx, svg) {
+        var options,
+            parser,
+            svgDocument,
+            _args2 = arguments;
+        return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
+          while (1) {
+            switch (_context2.prev = _context2.next) {
+              case 0:
+                options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
+                parser = new Parser(options);
+                _context2.next = 4;
+                return parser.parse(svg);
+
+              case 4:
+                svgDocument = _context2.sent;
+                return _context2.abrupt("return", new Canvg(ctx, svgDocument, options));
+
+              case 6:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2);
+      }));
+
+      function from(_x, _x2) {
+        return _from.apply(this, arguments);
+      }
+
+      return from;
+    }()
+    /**
+     * Create Canvg instance from SVG source string.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+
+  }, {
+    key: "fromString",
+    value: function fromString(ctx, svg) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      var parser = new Parser(options);
+      var svgDocument = parser.parseFromString(svg);
+      return new Canvg(ctx, svgDocument, options);
+    }
+  }]);
+
+  return Canvg;
+}();
+
+exports.AElement = AElement;
+exports.AnimateColorElement = AnimateColorElement;
+exports.AnimateElement = AnimateElement;
+exports.AnimateTransformElement = AnimateTransformElement;
+exports.BoundingBox = BoundingBox;
+exports.CB1 = CB1;
+exports.CB2 = CB2;
+exports.CB3 = CB3;
+exports.CB4 = CB4;
+exports.Canvg = Canvg;
+exports.CircleElement = CircleElement;
+exports.ClipPathElement = ClipPathElement;
+exports.DefsElement = DefsElement;
+exports.DescElement = DescElement;
+exports.Document = Document;
+exports.Element = Element;
+exports.EllipseElement = EllipseElement;
+exports.FeColorMatrixElement = FeColorMatrixElement;
+exports.FeCompositeElement = FeCompositeElement;
+exports.FeDropShadowElement = FeDropShadowElement;
+exports.FeGaussianBlurElement = FeGaussianBlurElement;
+exports.FeMorphologyElement = FeMorphologyElement;
+exports.FilterElement = FilterElement;
+exports.Font = Font;
+exports.FontElement = FontElement;
+exports.FontFaceElement = FontFaceElement;
+exports.GElement = GElement;
+exports.GlyphElement = GlyphElement;
+exports.GradientElement = GradientElement;
+exports.ImageElement = ImageElement;
+exports.LineElement = LineElement;
+exports.LinearGradientElement = LinearGradientElement;
+exports.MarkerElement = MarkerElement;
+exports.MaskElement = MaskElement;
+exports.Matrix = Matrix;
+exports.MissingGlyphElement = MissingGlyphElement;
+exports.Mouse = Mouse;
+exports.PSEUDO_ZERO = PSEUDO_ZERO;
+exports.Parser = Parser;
+exports.PathElement = PathElement;
+exports.PathParser = PathParser;
+exports.PatternElement = PatternElement;
+exports.Point = Point;
+exports.PolygonElement = PolygonElement;
+exports.PolylineElement = PolylineElement;
+exports.Property = Property;
+exports.QB1 = QB1;
+exports.QB2 = QB2;
+exports.QB3 = QB3;
+exports.RadialGradientElement = RadialGradientElement;
+exports.RectElement = RectElement;
+exports.RenderedElement = RenderedElement;
+exports.Rotate = Rotate;
+exports.SVGElement = SVGElement;
+exports.SVGFontLoader = SVGFontLoader;
+exports.Scale = Scale;
+exports.Screen = Screen;
+exports.Skew = Skew;
+exports.SkewX = SkewX;
+exports.SkewY = SkewY;
+exports.StopElement = StopElement;
+exports.StyleElement = StyleElement;
+exports.SymbolElement = SymbolElement;
+exports.TRefElement = TRefElement;
+exports.TSpanElement = TSpanElement;
+exports.TextElement = TextElement;
+exports.TextPathElement = TextPathElement;
+exports.TitleElement = TitleElement;
+exports.Transform = Transform;
+exports.Translate = Translate;
+exports.UnknownElement = UnknownElement;
+exports.UseElement = UseElement;
+exports.ViewPort = ViewPort;
+exports.compressSpaces = compressSpaces;
+exports["default"] = Canvg;
+exports.getSelectorSpecificity = getSelectorSpecificity;
+exports.normalizeAttributeName = normalizeAttributeName;
+exports.normalizeColor = normalizeColor;
+exports.parseExternalUrl = parseExternalUrl;
+exports.presets = index;
+exports.toNumbers = toNumbers;
+exports.trimLeft = trimLeft;
+exports.trimRight = trimRight;
+exports.vectorMagnitude = vectorMagnitude;
+exports.vectorsAngle = vectorsAngle;
+exports.vectorsRatio = vectorsRatio;
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWx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7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
Index: imaps-frontend/node_modules/canvg/lib/index.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,32 @@
+import * as presets from './presets';
+export * from './types';
+export * from './util';
+export { default } from './Canvg';
+export { default as Canvg } from './Canvg';
+export * from './Canvg';
+export { default as Parser } from './Parser';
+export * from './Parser';
+export { default as Screen } from './Screen';
+export * from './Screen';
+export { default as Document } from './Document';
+export * from './Document';
+export { default as Transform } from './Transform';
+export * from './Transform';
+export { default as BoundingBox } from './BoundingBox';
+export * from './BoundingBox';
+export { default as Point } from './Point';
+export * from './Point';
+export { default as Property } from './Property';
+export * from './Property';
+export { default as Font } from './Font';
+export * from './Font';
+export { default as Mouse } from './Mouse';
+export * from './Mouse';
+export { default as ViewPort } from './ViewPort';
+export * from './ViewPort';
+export { default as SVGFontLoader } from './SVGFontLoader';
+export * from './SVGFontLoader';
+export { default as PathParser } from './PathParser';
+export * from './PathParser';
+export { presets };
+//# sourceMappingURL=index.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/index.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,cAAc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modules/canvg/lib/index.es.js
===================================================================
--- imaps-frontend/node_modules/canvg/lib/index.es.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/index.es.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6551 @@
+import 'core-js/modules/es.promise.js';
+import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
+import 'core-js/modules/es.string.match.js';
+import 'core-js/modules/es.string.replace.js';
+import 'core-js/modules/es.string.starts-with.js';
+import 'core-js/modules/es.array.iterator.js';
+import 'core-js/modules/web.dom-collections.iterator.js';
+import _defineProperty from '@babel/runtime/helpers/defineProperty';
+import 'core-js/modules/es.array.reduce.js';
+import 'core-js/modules/es.string.ends-with.js';
+import 'core-js/modules/es.string.split.js';
+import requestAnimationFrame from 'raf';
+import 'core-js/modules/es.string.trim.js';
+import RGBColor from 'rgbcolor';
+import 'core-js/modules/es.array.index-of.js';
+import 'core-js/modules/es.string.includes.js';
+import 'core-js/modules/es.array.reverse.js';
+import { SVGPathData } from 'svg-pathdata';
+import 'core-js/modules/es.regexp.to-string.js';
+import { canvasRGBA } from 'stackblur-canvas';
+
+/**
+ * Options preset for `OffscreenCanvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @returns Preset object.
+ */
+function offscreen() {
+  var {
+    DOMParser: DOMParserFallback
+  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+  var preset = {
+    window: null,
+    ignoreAnimation: true,
+    ignoreMouse: true,
+    DOMParser: DOMParserFallback,
+
+    createCanvas(width, height) {
+      return new OffscreenCanvas(width, height);
+    },
+
+    createImage(url) {
+      return _asyncToGenerator(function* () {
+        var response = yield fetch(url);
+        var blob = yield response.blob();
+        var img = yield createImageBitmap(blob);
+        return img;
+      })();
+    }
+
+  };
+
+  if (typeof DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {
+    Reflect.deleteProperty(preset, 'DOMParser');
+  }
+
+  return preset;
+}
+
+/**
+ * Options preset for `node-canvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @param config.canvas - `node-canvas` exports.
+ * @param config.fetch - WHATWG-compatible `fetch` function.
+ * @returns Preset object.
+ */
+function node(_ref) {
+  var {
+    DOMParser,
+    canvas,
+    fetch
+  } = _ref;
+  return {
+    window: null,
+    ignoreAnimation: true,
+    ignoreMouse: true,
+    DOMParser,
+    fetch,
+    createCanvas: canvas.createCanvas,
+    createImage: canvas.loadImage
+  };
+}
+
+var index = /*#__PURE__*/Object.freeze({
+	__proto__: null,
+	offscreen: offscreen,
+	node: node
+});
+
+/**
+ * HTML-safe compress white-spaces.
+ * @param str - String to compress.
+ * @returns String.
+ */
+function compressSpaces(str) {
+  return str.replace(/(?!\u3000)\s+/gm, ' ');
+}
+/**
+ * HTML-safe left trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+
+function trimLeft(str) {
+  return str.replace(/^[\n \t]+/, '');
+}
+/**
+ * HTML-safe right trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+
+function trimRight(str) {
+  return str.replace(/[\n \t]+$/, '');
+}
+/**
+ * String to numbers array.
+ * @param str - Numbers string.
+ * @returns Numbers array.
+ */
+
+function toNumbers(str) {
+  var matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
+  return matches.map(parseFloat);
+} // Microsoft Edge fix
+
+var allUppercase = /^[A-Z-]+$/;
+/**
+ * Normalize attribute name.
+ * @param name - Attribute name.
+ * @returns Normalized attribute name.
+ */
+
+function normalizeAttributeName(name) {
+  if (allUppercase.test(name)) {
+    return name.toLowerCase();
+  }
+
+  return name;
+}
+/**
+ * Parse external URL.
+ * @param url - CSS url string.
+ * @returns Parsed URL.
+ */
+
+function parseExternalUrl(url) {
+  //                      single quotes [2]
+  //                      v         double quotes [3]
+  //                      v         v         no quotes [4]
+  //                      v         v         v
+  var urlMatch = /url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(url) || [];
+  return urlMatch[2] || urlMatch[3] || urlMatch[4];
+}
+/**
+ * Transform floats to integers in rgb colors.
+ * @param color - Color to normalize.
+ * @returns Normalized color.
+ */
+
+function normalizeColor(color) {
+  if (!color.startsWith('rgb')) {
+    return color;
+  }
+
+  var rgbParts = 3;
+  var normalizedColor = color.replace(/\d+(\.\d+)?/g, (num, isFloat) => rgbParts-- && isFloat ? String(Math.round(parseFloat(num))) : num);
+  return normalizedColor;
+}
+
+// slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
+var attributeRegex = /(\[[^\]]+\])/g;
+var idRegex = /(#[^\s+>~.[:]+)/g;
+var classRegex = /(\.[^\s+>~.[:]+)/g;
+var pseudoElementRegex = /(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi;
+var pseudoClassWithBracketsRegex = /(:[\w-]+\([^)]*\))/gi;
+var pseudoClassRegex = /(:[^\s+>~.[:]+)/g;
+var elementRegex = /([^\s+>~.[:]+)/g;
+
+function findSelectorMatch(selector, regex) {
+  var matches = regex.exec(selector);
+
+  if (!matches) {
+    return [selector, 0];
+  }
+
+  return [selector.replace(regex, ' '), matches.length];
+}
+/**
+ * Measure selector specificity.
+ * @param selector - Selector to measure.
+ * @returns Specificity.
+ */
+
+
+function getSelectorSpecificity(selector) {
+  var specificity = [0, 0, 0];
+  var currentSelector = selector.replace(/:not\(([^)]*)\)/g, '     $1 ').replace(/{[\s\S]*/gm, ' ');
+  var delta = 0;
+  [currentSelector, delta] = findSelectorMatch(currentSelector, attributeRegex);
+  specificity[1] += delta;
+  [currentSelector, delta] = findSelectorMatch(currentSelector, idRegex);
+  specificity[0] += delta;
+  [currentSelector, delta] = findSelectorMatch(currentSelector, classRegex);
+  specificity[1] += delta;
+  [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoElementRegex);
+  specificity[2] += delta;
+  [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
+  specificity[1] += delta;
+  [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassRegex);
+  specificity[1] += delta;
+  currentSelector = currentSelector.replace(/[*\s+>~]/g, ' ').replace(/[#.]/g, ' ');
+  [currentSelector, delta] = findSelectorMatch(currentSelector, elementRegex); // lgtm [js/useless-assignment-to-local]
+
+  specificity[2] += delta;
+  return specificity.join('');
+}
+
+var PSEUDO_ZERO = .00000001;
+/**
+ * Vector magnitude.
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorMagnitude(v) {
+  return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
+}
+/**
+ * Ratio between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorsRatio(u, v) {
+  return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
+}
+/**
+ * Angle between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorsAngle(u, v) {
+  return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
+}
+function CB1(t) {
+  return t * t * t;
+}
+function CB2(t) {
+  return 3 * t * t * (1 - t);
+}
+function CB3(t) {
+  return 3 * t * (1 - t) * (1 - t);
+}
+function CB4(t) {
+  return (1 - t) * (1 - t) * (1 - t);
+}
+function QB1(t) {
+  return t * t;
+}
+function QB2(t) {
+  return 2 * t * (1 - t);
+}
+function QB3(t) {
+  return (1 - t) * (1 - t);
+}
+
+class Property {
+  constructor(document, name, value) {
+    this.document = document;
+    this.name = name;
+    this.value = value;
+    this.isNormalizedColor = false;
+  }
+
+  static empty(document) {
+    return new Property(document, 'EMPTY', '');
+  }
+
+  split() {
+    var separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ' ';
+    var {
+      document,
+      name
+    } = this;
+    return compressSpaces(this.getString()).trim().split(separator).map(value => new Property(document, name, value));
+  }
+
+  hasValue(zeroIsValue) {
+    var {
+      value
+    } = this;
+    return value !== null && value !== '' && (zeroIsValue || value !== 0) && typeof value !== 'undefined';
+  }
+
+  isString(regexp) {
+    var {
+      value
+    } = this;
+    var result = typeof value === 'string';
+
+    if (!result || !regexp) {
+      return result;
+    }
+
+    return regexp.test(value);
+  }
+
+  isUrlDefinition() {
+    return this.isString(/^url\(/);
+  }
+
+  isPixels() {
+    if (!this.hasValue()) {
+      return false;
+    }
+
+    var asString = this.getString();
+
+    switch (true) {
+      case asString.endsWith('px'):
+      case /^[0-9]+$/.test(asString):
+        return true;
+
+      default:
+        return false;
+    }
+  }
+
+  setValue(value) {
+    this.value = value;
+    return this;
+  }
+
+  getValue(def) {
+    if (typeof def === 'undefined' || this.hasValue()) {
+      return this.value;
+    }
+
+    return def;
+  }
+
+  getNumber(def) {
+    if (!this.hasValue()) {
+      if (typeof def === 'undefined') {
+        return 0;
+      }
+
+      return parseFloat(def);
+    }
+
+    var {
+      value
+    } = this;
+    var n = parseFloat(value);
+
+    if (this.isString(/%$/)) {
+      n /= 100.0;
+    }
+
+    return n;
+  }
+
+  getString(def) {
+    if (typeof def === 'undefined' || this.hasValue()) {
+      return typeof this.value === 'undefined' ? '' : String(this.value);
+    }
+
+    return String(def);
+  }
+
+  getColor(def) {
+    var color = this.getString(def);
+
+    if (this.isNormalizedColor) {
+      return color;
+    }
+
+    this.isNormalizedColor = true;
+    color = normalizeColor(color);
+    this.value = color;
+    return color;
+  }
+
+  getDpi() {
+    return 96.0; // TODO: compute?
+  }
+
+  getRem() {
+    return this.document.rootEmSize;
+  }
+
+  getEm() {
+    return this.document.emSize;
+  }
+
+  getUnits() {
+    return this.getString().replace(/[0-9.-]/g, '');
+  }
+
+  getPixels(axisOrIsFontSize) {
+    var processPercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+    if (!this.hasValue()) {
+      return 0;
+    }
+
+    var [axis, isFontSize] = typeof axisOrIsFontSize === 'boolean' ? [undefined, axisOrIsFontSize] : [axisOrIsFontSize];
+    var {
+      viewPort
+    } = this.document.screen;
+
+    switch (true) {
+      case this.isString(/vmin$/):
+        return this.getNumber() / 100.0 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
+
+      case this.isString(/vmax$/):
+        return this.getNumber() / 100.0 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
+
+      case this.isString(/vw$/):
+        return this.getNumber() / 100.0 * viewPort.computeSize('x');
+
+      case this.isString(/vh$/):
+        return this.getNumber() / 100.0 * viewPort.computeSize('y');
+
+      case this.isString(/rem$/):
+        return this.getNumber() * this.getRem();
+
+      case this.isString(/em$/):
+        return this.getNumber() * this.getEm();
+
+      case this.isString(/ex$/):
+        return this.getNumber() * this.getEm() / 2.0;
+
+      case this.isString(/px$/):
+        return this.getNumber();
+
+      case this.isString(/pt$/):
+        return this.getNumber() * this.getDpi() * (1.0 / 72.0);
+
+      case this.isString(/pc$/):
+        return this.getNumber() * 15;
+
+      case this.isString(/cm$/):
+        return this.getNumber() * this.getDpi() / 2.54;
+
+      case this.isString(/mm$/):
+        return this.getNumber() * this.getDpi() / 25.4;
+
+      case this.isString(/in$/):
+        return this.getNumber() * this.getDpi();
+
+      case this.isString(/%$/) && isFontSize:
+        return this.getNumber() * this.getEm();
+
+      case this.isString(/%$/):
+        return this.getNumber() * viewPort.computeSize(axis);
+
+      default:
+        {
+          var n = this.getNumber();
+
+          if (processPercent && n < 1.0) {
+            return n * viewPort.computeSize(axis);
+          }
+
+          return n;
+        }
+    }
+  }
+
+  getMilliseconds() {
+    if (!this.hasValue()) {
+      return 0;
+    }
+
+    if (this.isString(/ms$/)) {
+      return this.getNumber();
+    }
+
+    return this.getNumber() * 1000;
+  }
+
+  getRadians() {
+    if (!this.hasValue()) {
+      return 0;
+    }
+
+    switch (true) {
+      case this.isString(/deg$/):
+        return this.getNumber() * (Math.PI / 180.0);
+
+      case this.isString(/grad$/):
+        return this.getNumber() * (Math.PI / 200.0);
+
+      case this.isString(/rad$/):
+        return this.getNumber();
+
+      default:
+        return this.getNumber() * (Math.PI / 180.0);
+    }
+  }
+
+  getDefinition() {
+    var asString = this.getString();
+    var name = /#([^)'"]+)/.exec(asString);
+
+    if (name) {
+      name = name[1];
+    }
+
+    if (!name) {
+      name = asString;
+    }
+
+    return this.document.definitions[name];
+  }
+
+  getFillStyleDefinition(element, opacity) {
+    var def = this.getDefinition();
+
+    if (!def) {
+      return null;
+    } // gradient
+
+
+    if (typeof def.createGradient === 'function') {
+      return def.createGradient(this.document.ctx, element, opacity);
+    } // pattern
+
+
+    if (typeof def.createPattern === 'function') {
+      if (def.getHrefAttribute().hasValue()) {
+        var patternTransform = def.getAttribute('patternTransform');
+        def = def.getHrefAttribute().getDefinition();
+
+        if (patternTransform.hasValue()) {
+          def.getAttribute('patternTransform', true).setValue(patternTransform.value);
+        }
+      }
+
+      return def.createPattern(this.document.ctx, element, opacity);
+    }
+
+    return null;
+  }
+
+  getTextBaseline() {
+    if (!this.hasValue()) {
+      return null;
+    }
+
+    return Property.textBaselineMapping[this.getString()];
+  }
+
+  addOpacity(opacity) {
+    var value = this.getColor();
+    var len = value.length;
+    var commas = 0; // Simulate old RGBColor version, which can't parse rgba.
+
+    for (var i = 0; i < len; i++) {
+      if (value[i] === ',') {
+        commas++;
+      }
+
+      if (commas === 3) {
+        break;
+      }
+    }
+
+    if (opacity.hasValue() && this.isString() && commas !== 3) {
+      var color = new RGBColor(value);
+
+      if (color.ok) {
+        color.alpha = opacity.getNumber();
+        value = color.toRGBA();
+      }
+    }
+
+    return new Property(this.document, this.name, value);
+  }
+
+}
+Property.textBaselineMapping = {
+  'baseline': 'alphabetic',
+  'before-edge': 'top',
+  'text-before-edge': 'top',
+  'middle': 'middle',
+  'central': 'middle',
+  'after-edge': 'bottom',
+  'text-after-edge': 'bottom',
+  'ideographic': 'ideographic',
+  'alphabetic': 'alphabetic',
+  'hanging': 'hanging',
+  'mathematical': 'alphabetic'
+};
+
+class ViewPort {
+  constructor() {
+    this.viewPorts = [];
+  }
+
+  clear() {
+    this.viewPorts = [];
+  }
+
+  setCurrent(width, height) {
+    this.viewPorts.push({
+      width,
+      height
+    });
+  }
+
+  removeCurrent() {
+    this.viewPorts.pop();
+  }
+
+  getCurrent() {
+    var {
+      viewPorts
+    } = this;
+    return viewPorts[viewPorts.length - 1];
+  }
+
+  get width() {
+    return this.getCurrent().width;
+  }
+
+  get height() {
+    return this.getCurrent().height;
+  }
+
+  computeSize(d) {
+    if (typeof d === 'number') {
+      return d;
+    }
+
+    if (d === 'x') {
+      return this.width;
+    }
+
+    if (d === 'y') {
+      return this.height;
+    }
+
+    return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
+  }
+
+}
+
+class Point {
+  constructor(x, y) {
+    this.x = x;
+    this.y = y;
+  }
+
+  static parse(point) {
+    var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
+    var [x = defaultValue, y = defaultValue] = toNumbers(point);
+    return new Point(x, y);
+  }
+
+  static parseScale(scale) {
+    var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
+    var [x = defaultValue, y = x] = toNumbers(scale);
+    return new Point(x, y);
+  }
+
+  static parsePath(path) {
+    var points = toNumbers(path);
+    var len = points.length;
+    var pathPoints = [];
+
+    for (var i = 0; i < len; i += 2) {
+      pathPoints.push(new Point(points[i], points[i + 1]));
+    }
+
+    return pathPoints;
+  }
+
+  angleTo(point) {
+    return Math.atan2(point.y - this.y, point.x - this.x);
+  }
+
+  applyTransform(transform) {
+    var {
+      x,
+      y
+    } = this;
+    var xp = x * transform[0] + y * transform[2] + transform[4];
+    var yp = x * transform[1] + y * transform[3] + transform[5];
+    this.x = xp;
+    this.y = yp;
+  }
+
+}
+
+class Mouse {
+  constructor(screen) {
+    this.screen = screen;
+    this.working = false;
+    this.events = [];
+    this.eventElements = []; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+
+    this.onClick = this.onClick.bind(this); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+
+    this.onMouseMove = this.onMouseMove.bind(this);
+  }
+
+  isWorking() {
+    return this.working;
+  }
+
+  start() {
+    if (this.working) {
+      return;
+    }
+
+    var {
+      screen,
+      onClick,
+      onMouseMove
+    } = this;
+    var canvas = screen.ctx.canvas;
+    canvas.onclick = onClick;
+    canvas.onmousemove = onMouseMove;
+    this.working = true;
+  }
+
+  stop() {
+    if (!this.working) {
+      return;
+    }
+
+    var canvas = this.screen.ctx.canvas;
+    this.working = false;
+    canvas.onclick = null;
+    canvas.onmousemove = null;
+  }
+
+  hasEvents() {
+    return this.working && this.events.length > 0;
+  }
+
+  runEvents() {
+    if (!this.working) {
+      return;
+    }
+
+    var {
+      screen: document,
+      events,
+      eventElements
+    } = this;
+    var {
+      style
+    } = document.ctx.canvas;
+
+    if (style) {
+      style.cursor = '';
+    }
+
+    events.forEach((_ref, i) => {
+      var {
+        run
+      } = _ref;
+      var element = eventElements[i];
+
+      while (element) {
+        run(element);
+        element = element.parent;
+      }
+    }); // done running, clear
+
+    this.events = [];
+    this.eventElements = [];
+  }
+
+  checkPath(element, ctx) {
+    if (!this.working || !ctx) {
+      return;
+    }
+
+    var {
+      events,
+      eventElements
+    } = this;
+    events.forEach((_ref2, i) => {
+      var {
+        x,
+        y
+      } = _ref2;
+
+      if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
+        eventElements[i] = element;
+      }
+    });
+  }
+
+  checkBoundingBox(element, boundingBox) {
+    if (!this.working || !boundingBox) {
+      return;
+    }
+
+    var {
+      events,
+      eventElements
+    } = this;
+    events.forEach((_ref3, i) => {
+      var {
+        x,
+        y
+      } = _ref3;
+
+      if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
+        eventElements[i] = element;
+      }
+    });
+  }
+
+  mapXY(x, y) {
+    var {
+      window,
+      ctx
+    } = this.screen;
+    var point = new Point(x, y);
+    var element = ctx.canvas;
+
+    while (element) {
+      point.x -= element.offsetLeft;
+      point.y -= element.offsetTop;
+      element = element.offsetParent;
+    }
+
+    if (window.scrollX) {
+      point.x += window.scrollX;
+    }
+
+    if (window.scrollY) {
+      point.y += window.scrollY;
+    }
+
+    return point;
+  }
+
+  onClick(event) {
+    var {
+      x,
+      y
+    } = this.mapXY(event.clientX, event.clientY);
+    this.events.push({
+      type: 'onclick',
+      x,
+      y,
+
+      run(eventTarget) {
+        if (eventTarget.onClick) {
+          eventTarget.onClick();
+        }
+      }
+
+    });
+  }
+
+  onMouseMove(event) {
+    var {
+      x,
+      y
+    } = this.mapXY(event.clientX, event.clientY);
+    this.events.push({
+      type: 'onmousemove',
+      x,
+      y,
+
+      run(eventTarget) {
+        if (eventTarget.onMouseMove) {
+          eventTarget.onMouseMove();
+        }
+      }
+
+    });
+  }
+
+}
+
+var defaultWindow = typeof window !== 'undefined' ? window : null;
+var defaultFetch$1 = typeof fetch !== 'undefined' ? fetch.bind(undefined) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
+: null;
+class Screen {
+  constructor(ctx) {
+    var {
+      fetch = defaultFetch$1,
+      window = defaultWindow
+    } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+    this.ctx = ctx;
+    this.FRAMERATE = 30;
+    this.MAX_VIRTUAL_PIXELS = 30000;
+    this.CLIENT_WIDTH = 800;
+    this.CLIENT_HEIGHT = 600;
+    this.viewPort = new ViewPort();
+    this.mouse = new Mouse(this);
+    this.animations = [];
+    this.waits = [];
+    this.frameDuration = 0;
+    this.isReadyLock = false;
+    this.isFirstRender = true;
+    this.intervalId = null;
+    this.window = window;
+    this.fetch = fetch;
+  }
+
+  wait(checker) {
+    this.waits.push(checker);
+  }
+
+  ready() {
+    // eslint-disable-next-line @typescript-eslint/no-misused-promises
+    if (!this.readyPromise) {
+      return Promise.resolve();
+    }
+
+    return this.readyPromise;
+  }
+
+  isReady() {
+    if (this.isReadyLock) {
+      return true;
+    }
+
+    var isReadyLock = this.waits.every(_ => _());
+
+    if (isReadyLock) {
+      this.waits = [];
+
+      if (this.resolveReady) {
+        this.resolveReady();
+      }
+    }
+
+    this.isReadyLock = isReadyLock;
+    return isReadyLock;
+  }
+
+  setDefaults(ctx) {
+    // initial values and defaults
+    ctx.strokeStyle = 'rgba(0,0,0,0)';
+    ctx.lineCap = 'butt';
+    ctx.lineJoin = 'miter';
+    ctx.miterLimit = 4;
+  }
+
+  setViewBox(_ref) {
+    var {
+      document,
+      ctx,
+      aspectRatio,
+      width,
+      desiredWidth,
+      height,
+      desiredHeight,
+      minX = 0,
+      minY = 0,
+      refX,
+      refY,
+      clip = false,
+      clipX = 0,
+      clipY = 0
+    } = _ref;
+    // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
+    var cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
+
+    var [aspectRatioAlign, aspectRatioMeetOrSlice] = cleanAspectRatio.split(' ');
+    var align = aspectRatioAlign || 'xMidYMid';
+    var meetOrSlice = aspectRatioMeetOrSlice || 'meet'; // calculate scale
+
+    var scaleX = width / desiredWidth;
+    var scaleY = height / desiredHeight;
+    var scaleMin = Math.min(scaleX, scaleY);
+    var scaleMax = Math.max(scaleX, scaleY);
+    var finalDesiredWidth = desiredWidth;
+    var finalDesiredHeight = desiredHeight;
+
+    if (meetOrSlice === 'meet') {
+      finalDesiredWidth *= scaleMin;
+      finalDesiredHeight *= scaleMin;
+    }
+
+    if (meetOrSlice === 'slice') {
+      finalDesiredWidth *= scaleMax;
+      finalDesiredHeight *= scaleMax;
+    }
+
+    var refXProp = new Property(document, 'refX', refX);
+    var refYProp = new Property(document, 'refY', refY);
+    var hasRefs = refXProp.hasValue() && refYProp.hasValue();
+
+    if (hasRefs) {
+      ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
+    }
+
+    if (clip) {
+      var scaledClipX = scaleMin * clipX;
+      var scaledClipY = scaleMin * clipY;
+      ctx.beginPath();
+      ctx.moveTo(scaledClipX, scaledClipY);
+      ctx.lineTo(width, scaledClipY);
+      ctx.lineTo(width, height);
+      ctx.lineTo(scaledClipX, height);
+      ctx.closePath();
+      ctx.clip();
+    }
+
+    if (!hasRefs) {
+      var isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
+      var isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
+      var isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
+      var isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
+
+      if (align.startsWith('xMid') && (isMeetMinY || isSliceMaxY)) {
+        ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
+      }
+
+      if (align.endsWith('YMid') && (isMeetMinX || isSliceMaxX)) {
+        ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
+      }
+
+      if (align.startsWith('xMax') && (isMeetMinY || isSliceMaxY)) {
+        ctx.translate(width - finalDesiredWidth, 0);
+      }
+
+      if (align.endsWith('YMax') && (isMeetMinX || isSliceMaxX)) {
+        ctx.translate(0, height - finalDesiredHeight);
+      }
+    } // scale
+
+
+    switch (true) {
+      case align === 'none':
+        ctx.scale(scaleX, scaleY);
+        break;
+
+      case meetOrSlice === 'meet':
+        ctx.scale(scaleMin, scaleMin);
+        break;
+
+      case meetOrSlice === 'slice':
+        ctx.scale(scaleMax, scaleMax);
+        break;
+    } // translate
+
+
+    ctx.translate(-minX, -minY);
+  }
+
+  start(element) {
+    var {
+      enableRedraw = false,
+      ignoreMouse = false,
+      ignoreAnimation = false,
+      ignoreDimensions = false,
+      ignoreClear = false,
+      forceRedraw,
+      scaleWidth,
+      scaleHeight,
+      offsetX,
+      offsetY
+    } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+    var {
+      FRAMERATE,
+      mouse
+    } = this;
+    var frameDuration = 1000 / FRAMERATE;
+    this.frameDuration = frameDuration;
+    this.readyPromise = new Promise(resolve => {
+      this.resolveReady = resolve;
+    });
+
+    if (this.isReady()) {
+      this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
+    }
+
+    if (!enableRedraw) {
+      return;
+    }
+
+    var now = Date.now();
+    var then = now;
+    var delta = 0;
+
+    var tick = () => {
+      now = Date.now();
+      delta = now - then;
+
+      if (delta >= frameDuration) {
+        then = now - delta % frameDuration;
+
+        if (this.shouldUpdate(ignoreAnimation, forceRedraw)) {
+          this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
+          mouse.runEvents();
+        }
+      }
+
+      this.intervalId = requestAnimationFrame(tick);
+    };
+
+    if (!ignoreMouse) {
+      mouse.start();
+    }
+
+    this.intervalId = requestAnimationFrame(tick);
+  }
+
+  stop() {
+    if (this.intervalId) {
+      requestAnimationFrame.cancel(this.intervalId);
+      this.intervalId = null;
+    }
+
+    this.mouse.stop();
+  }
+
+  shouldUpdate(ignoreAnimation, forceRedraw) {
+    // need update from animations?
+    if (!ignoreAnimation) {
+      var {
+        frameDuration
+      } = this;
+      var shouldUpdate = this.animations.reduce((shouldUpdate, animation) => animation.update(frameDuration) || shouldUpdate, false);
+
+      if (shouldUpdate) {
+        return true;
+      }
+    } // need update from redraw?
+
+
+    if (typeof forceRedraw === 'function' && forceRedraw()) {
+      return true;
+    }
+
+    if (!this.isReadyLock && this.isReady()) {
+      return true;
+    } // need update from mouse events?
+
+
+    if (this.mouse.hasEvents()) {
+      return true;
+    }
+
+    return false;
+  }
+
+  render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
+    var {
+      CLIENT_WIDTH,
+      CLIENT_HEIGHT,
+      viewPort,
+      ctx,
+      isFirstRender
+    } = this;
+    var canvas = ctx.canvas;
+    viewPort.clear();
+
+    if (canvas.width && canvas.height) {
+      viewPort.setCurrent(canvas.width, canvas.height);
+    } else {
+      viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
+    }
+
+    var widthStyle = element.getStyle('width');
+    var heightStyle = element.getStyle('height');
+
+    if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
+      // set canvas size
+      if (widthStyle.hasValue()) {
+        canvas.width = widthStyle.getPixels('x');
+
+        if (canvas.style) {
+          canvas.style.width = "".concat(canvas.width, "px");
+        }
+      }
+
+      if (heightStyle.hasValue()) {
+        canvas.height = heightStyle.getPixels('y');
+
+        if (canvas.style) {
+          canvas.style.height = "".concat(canvas.height, "px");
+        }
+      }
+    }
+
+    var cWidth = canvas.clientWidth || canvas.width;
+    var cHeight = canvas.clientHeight || canvas.height;
+
+    if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
+      cWidth = widthStyle.getPixels('x');
+      cHeight = heightStyle.getPixels('y');
+    }
+
+    viewPort.setCurrent(cWidth, cHeight);
+
+    if (typeof offsetX === 'number') {
+      element.getAttribute('x', true).setValue(offsetX);
+    }
+
+    if (typeof offsetY === 'number') {
+      element.getAttribute('y', true).setValue(offsetY);
+    }
+
+    if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {
+      var viewBox = toNumbers(element.getAttribute('viewBox').getString());
+      var xRatio = 0;
+      var yRatio = 0;
+
+      if (typeof scaleWidth === 'number') {
+        var _widthStyle = element.getStyle('width');
+
+        if (_widthStyle.hasValue()) {
+          xRatio = _widthStyle.getPixels('x') / scaleWidth;
+        } else if (!isNaN(viewBox[2])) {
+          xRatio = viewBox[2] / scaleWidth;
+        }
+      }
+
+      if (typeof scaleHeight === 'number') {
+        var _heightStyle = element.getStyle('height');
+
+        if (_heightStyle.hasValue()) {
+          yRatio = _heightStyle.getPixels('y') / scaleHeight;
+        } else if (!isNaN(viewBox[3])) {
+          yRatio = viewBox[3] / scaleHeight;
+        }
+      }
+
+      if (!xRatio) {
+        xRatio = yRatio;
+      }
+
+      if (!yRatio) {
+        yRatio = xRatio;
+      }
+
+      element.getAttribute('width', true).setValue(scaleWidth);
+      element.getAttribute('height', true).setValue(scaleHeight);
+      var transformStyle = element.getStyle('transform', true, true);
+      transformStyle.setValue("".concat(transformStyle.getString(), " scale(").concat(1.0 / xRatio, ", ").concat(1.0 / yRatio, ")"));
+    } // clear and render
+
+
+    if (!ignoreClear) {
+      ctx.clearRect(0, 0, cWidth, cHeight);
+    }
+
+    element.render(ctx);
+
+    if (isFirstRender) {
+      this.isFirstRender = false;
+    }
+  }
+
+}
+Screen.defaultWindow = defaultWindow;
+Screen.defaultFetch = defaultFetch$1;
+
+var {
+  defaultFetch
+} = Screen;
+var DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : null;
+class Parser {
+  constructor() {
+    var {
+      fetch = defaultFetch,
+      DOMParser = DefaultDOMParser
+    } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+    this.fetch = fetch;
+    this.DOMParser = DOMParser;
+  }
+
+  parse(resource) {
+    var _this = this;
+
+    return _asyncToGenerator(function* () {
+      if (resource.startsWith('<')) {
+        return _this.parseFromString(resource);
+      }
+
+      return _this.load(resource);
+    })();
+  }
+
+  parseFromString(xml) {
+    var parser = new this.DOMParser();
+
+    try {
+      return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
+    } catch (err) {
+      return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
+    }
+  }
+
+  checkDocument(document) {
+    var parserError = document.getElementsByTagName('parsererror')[0];
+
+    if (parserError) {
+      throw new Error(parserError.textContent);
+    }
+
+    return document;
+  }
+
+  load(url) {
+    var _this2 = this;
+
+    return _asyncToGenerator(function* () {
+      var response = yield _this2.fetch(url);
+      var xml = yield response.text();
+      return _this2.parseFromString(xml);
+    })();
+  }
+
+}
+
+class Translate {
+  constructor(_, point) {
+    this.type = 'translate';
+    this.point = null;
+    this.point = Point.parse(point);
+  }
+
+  apply(ctx) {
+    var {
+      x,
+      y
+    } = this.point;
+    ctx.translate(x || 0.0, y || 0.0);
+  }
+
+  unapply(ctx) {
+    var {
+      x,
+      y
+    } = this.point;
+    ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
+  }
+
+  applyToPoint(point) {
+    var {
+      x,
+      y
+    } = this.point;
+    point.applyTransform([1, 0, 0, 1, x || 0.0, y || 0.0]);
+  }
+
+}
+
+class Rotate {
+  constructor(document, rotate, transformOrigin) {
+    this.type = 'rotate';
+    this.angle = null;
+    this.originX = null;
+    this.originY = null;
+    this.cx = 0;
+    this.cy = 0;
+    var numbers = toNumbers(rotate);
+    this.angle = new Property(document, 'angle', numbers[0]);
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+    this.cx = numbers[1] || 0;
+    this.cy = numbers[2] || 0;
+  }
+
+  apply(ctx) {
+    var {
+      cx,
+      cy,
+      originX,
+      originY,
+      angle
+    } = this;
+    var tx = cx + originX.getPixels('x');
+    var ty = cy + originY.getPixels('y');
+    ctx.translate(tx, ty);
+    ctx.rotate(angle.getRadians());
+    ctx.translate(-tx, -ty);
+  }
+
+  unapply(ctx) {
+    var {
+      cx,
+      cy,
+      originX,
+      originY,
+      angle
+    } = this;
+    var tx = cx + originX.getPixels('x');
+    var ty = cy + originY.getPixels('y');
+    ctx.translate(tx, ty);
+    ctx.rotate(-1.0 * angle.getRadians());
+    ctx.translate(-tx, -ty);
+  }
+
+  applyToPoint(point) {
+    var {
+      cx,
+      cy,
+      angle
+    } = this;
+    var rad = angle.getRadians();
+    point.applyTransform([1, 0, 0, 1, cx || 0.0, cy || 0.0 // this.p.y
+    ]);
+    point.applyTransform([Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0]);
+    point.applyTransform([1, 0, 0, 1, -cx || 0.0, -cy || 0.0 // -this.p.y
+    ]);
+  }
+
+}
+
+class Scale {
+  constructor(_, scale, transformOrigin) {
+    this.type = 'scale';
+    this.scale = null;
+    this.originX = null;
+    this.originY = null;
+    var scaleSize = Point.parseScale(scale); // Workaround for node-canvas
+
+    if (scaleSize.x === 0 || scaleSize.y === 0) {
+      scaleSize.x = PSEUDO_ZERO;
+      scaleSize.y = PSEUDO_ZERO;
+    }
+
+    this.scale = scaleSize;
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+  }
+
+  apply(ctx) {
+    var {
+      scale: {
+        x,
+        y
+      },
+      originX,
+      originY
+    } = this;
+    var tx = originX.getPixels('x');
+    var ty = originY.getPixels('y');
+    ctx.translate(tx, ty);
+    ctx.scale(x, y || x);
+    ctx.translate(-tx, -ty);
+  }
+
+  unapply(ctx) {
+    var {
+      scale: {
+        x,
+        y
+      },
+      originX,
+      originY
+    } = this;
+    var tx = originX.getPixels('x');
+    var ty = originY.getPixels('y');
+    ctx.translate(tx, ty);
+    ctx.scale(1.0 / x, 1.0 / y || x);
+    ctx.translate(-tx, -ty);
+  }
+
+  applyToPoint(point) {
+    var {
+      x,
+      y
+    } = this.scale;
+    point.applyTransform([x || 0.0, 0, 0, y || 0.0, 0, 0]);
+  }
+
+}
+
+class Matrix {
+  constructor(_, matrix, transformOrigin) {
+    this.type = 'matrix';
+    this.matrix = [];
+    this.originX = null;
+    this.originY = null;
+    this.matrix = toNumbers(matrix);
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+  }
+
+  apply(ctx) {
+    var {
+      originX,
+      originY,
+      matrix
+    } = this;
+    var tx = originX.getPixels('x');
+    var ty = originY.getPixels('y');
+    ctx.translate(tx, ty);
+    ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
+    ctx.translate(-tx, -ty);
+  }
+
+  unapply(ctx) {
+    var {
+      originX,
+      originY,
+      matrix
+    } = this;
+    var a = matrix[0];
+    var b = matrix[2];
+    var c = matrix[4];
+    var d = matrix[1];
+    var e = matrix[3];
+    var f = matrix[5];
+    var g = 0.0;
+    var h = 0.0;
+    var i = 1.0;
+    var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
+    var tx = originX.getPixels('x');
+    var ty = originY.getPixels('y');
+    ctx.translate(tx, ty);
+    ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));
+    ctx.translate(-tx, -ty);
+  }
+
+  applyToPoint(point) {
+    point.applyTransform(this.matrix);
+  }
+
+}
+
+class Skew extends Matrix {
+  constructor(document, skew, transformOrigin) {
+    super(document, skew, transformOrigin);
+    this.type = 'skew';
+    this.angle = null;
+    this.angle = new Property(document, 'angle', skew);
+  }
+
+}
+
+class SkewX extends Skew {
+  constructor(document, skew, transformOrigin) {
+    super(document, skew, transformOrigin);
+    this.type = 'skewX';
+    this.matrix = [1, 0, Math.tan(this.angle.getRadians()), 1, 0, 0];
+  }
+
+}
+
+class SkewY extends Skew {
+  constructor(document, skew, transformOrigin) {
+    super(document, skew, transformOrigin);
+    this.type = 'skewY';
+    this.matrix = [1, Math.tan(this.angle.getRadians()), 0, 1, 0, 0];
+  }
+
+}
+
+function parseTransforms(transform) {
+  return compressSpaces(transform).trim().replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g, ') ').split(/\s(?=[a-z])/);
+}
+
+function parseTransform(transform) {
+  var [type, value] = transform.split('(');
+  return [type.trim(), value.trim().replace(')', '')];
+}
+
+class Transform {
+  constructor(document, transform, transformOrigin) {
+    this.document = document;
+    this.transforms = [];
+    var data = parseTransforms(transform);
+    data.forEach(transform => {
+      if (transform === 'none') {
+        return;
+      }
+
+      var [type, value] = parseTransform(transform);
+      var TransformType = Transform.transformTypes[type];
+
+      if (typeof TransformType !== 'undefined') {
+        this.transforms.push(new TransformType(this.document, value, transformOrigin));
+      }
+    });
+  }
+
+  static fromElement(document, element) {
+    var transformStyle = element.getStyle('transform', false, true);
+    var [transformOriginXProperty, transformOriginYProperty = transformOriginXProperty] = element.getStyle('transform-origin', false, true).split();
+    var transformOrigin = [transformOriginXProperty, transformOriginYProperty];
+
+    if (transformStyle.hasValue()) {
+      return new Transform(document, transformStyle.getString(), transformOrigin);
+    }
+
+    return null;
+  }
+
+  apply(ctx) {
+    var {
+      transforms
+    } = this;
+    var len = transforms.length;
+
+    for (var i = 0; i < len; i++) {
+      transforms[i].apply(ctx);
+    }
+  }
+
+  unapply(ctx) {
+    var {
+      transforms
+    } = this;
+    var len = transforms.length;
+
+    for (var i = len - 1; i >= 0; i--) {
+      transforms[i].unapply(ctx);
+    }
+  } // TODO: applyToPoint unused ... remove?
+
+
+  applyToPoint(point) {
+    var {
+      transforms
+    } = this;
+    var len = transforms.length;
+
+    for (var i = 0; i < len; i++) {
+      transforms[i].applyToPoint(point);
+    }
+  }
+
+}
+Transform.transformTypes = {
+  translate: Translate,
+  rotate: Rotate,
+  scale: Scale,
+  matrix: Matrix,
+  skewX: SkewX,
+  skewY: SkewY
+};
+
+class Element {
+  constructor(document, node) {
+    var captureTextNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+    this.document = document;
+    this.node = node;
+    this.captureTextNodes = captureTextNodes;
+    this.attributes = {};
+    this.styles = {};
+    this.stylesSpecificity = {};
+    this.animationFrozen = false;
+    this.animationFrozenValue = '';
+    this.parent = null;
+    this.children = [];
+
+    if (!node || node.nodeType !== 1) {
+      // ELEMENT_NODE
+      return;
+    } // add attributes
+
+
+    Array.from(node.attributes).forEach(attribute => {
+      var nodeName = normalizeAttributeName(attribute.nodeName);
+      this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
+    });
+    this.addStylesFromStyleDefinition(); // add inline styles
+
+    if (this.getAttribute('style').hasValue()) {
+      var styles = this.getAttribute('style').getString().split(';').map(_ => _.trim());
+      styles.forEach(style => {
+        if (!style) {
+          return;
+        }
+
+        var [name, value] = style.split(':').map(_ => _.trim());
+        this.styles[name] = new Property(document, name, value);
+      });
+    }
+
+    var {
+      definitions
+    } = document;
+    var id = this.getAttribute('id'); // add id
+
+    if (id.hasValue()) {
+      if (!definitions[id.getString()]) {
+        definitions[id.getString()] = this;
+      }
+    }
+
+    Array.from(node.childNodes).forEach(childNode => {
+      if (childNode.nodeType === 1) {
+        this.addChild(childNode); // ELEMENT_NODE
+      } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {
+        var textNode = document.createTextNode(childNode);
+
+        if (textNode.getText().length > 0) {
+          this.addChild(textNode); // TEXT_NODE
+        }
+      }
+    });
+  }
+
+  getAttribute(name) {
+    var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+    var attr = this.attributes[name];
+
+    if (!attr && createIfNotExists) {
+      var _attr = new Property(this.document, name, '');
+
+      this.attributes[name] = _attr;
+      return _attr;
+    }
+
+    return attr || Property.empty(this.document);
+  }
+
+  getHrefAttribute() {
+    for (var key in this.attributes) {
+      if (key === 'href' || key.endsWith(':href')) {
+        return this.attributes[key];
+      }
+    }
+
+    return Property.empty(this.document);
+  }
+
+  getStyle(name) {
+    var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+    var skipAncestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+    var style = this.styles[name];
+
+    if (style) {
+      return style;
+    }
+
+    var attr = this.getAttribute(name);
+
+    if (attr !== null && attr !== void 0 && attr.hasValue()) {
+      this.styles[name] = attr; // move up to me to cache
+
+      return attr;
+    }
+
+    if (!skipAncestors) {
+      var {
+        parent
+      } = this;
+
+      if (parent) {
+        var parentStyle = parent.getStyle(name);
+
+        if (parentStyle !== null && parentStyle !== void 0 && parentStyle.hasValue()) {
+          return parentStyle;
+        }
+      }
+    }
+
+    if (createIfNotExists) {
+      var _style = new Property(this.document, name, '');
+
+      this.styles[name] = _style;
+      return _style;
+    }
+
+    return style || Property.empty(this.document);
+  }
+
+  render(ctx) {
+    // don't render display=none
+    // don't render visibility=hidden
+    if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {
+      return;
+    }
+
+    ctx.save();
+
+    if (this.getStyle('mask').hasValue()) {
+      // mask
+      var mask = this.getStyle('mask').getDefinition();
+
+      if (mask) {
+        this.applyEffects(ctx);
+        mask.apply(ctx, this);
+      }
+    } else if (this.getStyle('filter').getValue('none') !== 'none') {
+      // filter
+      var filter = this.getStyle('filter').getDefinition();
+
+      if (filter) {
+        this.applyEffects(ctx);
+        filter.apply(ctx, this);
+      }
+    } else {
+      this.setContext(ctx);
+      this.renderChildren(ctx);
+      this.clearContext(ctx);
+    }
+
+    ctx.restore();
+  }
+
+  setContext(_) {// NO RENDER
+  }
+
+  applyEffects(ctx) {
+    // transform
+    var transform = Transform.fromElement(this.document, this);
+
+    if (transform) {
+      transform.apply(ctx);
+    } // clip
+
+
+    var clipPathStyleProp = this.getStyle('clip-path', false, true);
+
+    if (clipPathStyleProp.hasValue()) {
+      var clip = clipPathStyleProp.getDefinition();
+
+      if (clip) {
+        clip.apply(ctx);
+      }
+    }
+  }
+
+  clearContext(_) {// NO RENDER
+  }
+
+  renderChildren(ctx) {
+    this.children.forEach(child => {
+      child.render(ctx);
+    });
+  }
+
+  addChild(childNode) {
+    var child = childNode instanceof Element ? childNode : this.document.createElement(childNode);
+    child.parent = this;
+
+    if (!Element.ignoreChildTypes.includes(child.type)) {
+      this.children.push(child);
+    }
+  }
+
+  matchesSelector(selector) {
+    var _node$getAttribute;
+
+    var {
+      node
+    } = this;
+
+    if (typeof node.matches === 'function') {
+      return node.matches(selector);
+    }
+
+    var styleClasses = (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'class');
+
+    if (!styleClasses || styleClasses === '') {
+      return false;
+    }
+
+    return styleClasses.split(' ').some(styleClass => ".".concat(styleClass) === selector);
+  }
+
+  addStylesFromStyleDefinition() {
+    var {
+      styles,
+      stylesSpecificity
+    } = this.document;
+
+    for (var selector in styles) {
+      if (!selector.startsWith('@') && this.matchesSelector(selector)) {
+        var style = styles[selector];
+        var specificity = stylesSpecificity[selector];
+
+        if (style) {
+          for (var name in style) {
+            var existingSpecificity = this.stylesSpecificity[name];
+
+            if (typeof existingSpecificity === 'undefined') {
+              existingSpecificity = '000';
+            }
+
+            if (specificity >= existingSpecificity) {
+              this.styles[name] = style[name];
+              this.stylesSpecificity[name] = specificity;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  removeStyles(element, ignoreStyles) {
+    var toRestore = ignoreStyles.reduce((toRestore, name) => {
+      var styleProp = element.getStyle(name);
+
+      if (!styleProp.hasValue()) {
+        return toRestore;
+      }
+
+      var value = styleProp.getString();
+      styleProp.setValue('');
+      return [...toRestore, [name, value]];
+    }, []);
+    return toRestore;
+  }
+
+  restoreStyles(element, styles) {
+    styles.forEach(_ref => {
+      var [name, value] = _ref;
+      element.getStyle(name, true).setValue(value);
+    });
+  }
+
+  isFirstChild() {
+    var _this$parent;
+
+    return ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.children.indexOf(this)) === 0;
+  }
+
+}
+Element.ignoreChildTypes = ['title'];
+
+class UnknownElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+  }
+
+}
+
+function wrapFontFamily(fontFamily) {
+  var trimmed = fontFamily.trim();
+  return /^('|")/.test(trimmed) ? trimmed : "\"".concat(trimmed, "\"");
+}
+
+function prepareFontFamily(fontFamily) {
+  return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
+}
+/**
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
+ * @param fontStyle
+ * @returns CSS font style.
+ */
+
+
+function prepareFontStyle(fontStyle) {
+  if (!fontStyle) {
+    return '';
+  }
+
+  var targetFontStyle = fontStyle.trim().toLowerCase();
+
+  switch (targetFontStyle) {
+    case 'normal':
+    case 'italic':
+    case 'oblique':
+    case 'inherit':
+    case 'initial':
+    case 'unset':
+      return targetFontStyle;
+
+    default:
+      if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
+        return targetFontStyle;
+      }
+
+      return '';
+  }
+}
+/**
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
+ * @param fontWeight
+ * @returns CSS font weight.
+ */
+
+
+function prepareFontWeight(fontWeight) {
+  if (!fontWeight) {
+    return '';
+  }
+
+  var targetFontWeight = fontWeight.trim().toLowerCase();
+
+  switch (targetFontWeight) {
+    case 'normal':
+    case 'bold':
+    case 'lighter':
+    case 'bolder':
+    case 'inherit':
+    case 'initial':
+    case 'unset':
+      return targetFontWeight;
+
+    default:
+      if (/^[\d.]+$/.test(targetFontWeight)) {
+        return targetFontWeight;
+      }
+
+      return '';
+  }
+}
+
+class Font {
+  constructor(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
+    var inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};
+    this.fontFamily = fontFamily || inheritFont.fontFamily;
+    this.fontSize = fontSize || inheritFont.fontSize;
+    this.fontStyle = fontStyle || inheritFont.fontStyle;
+    this.fontWeight = fontWeight || inheritFont.fontWeight;
+    this.fontVariant = fontVariant || inheritFont.fontVariant;
+  }
+
+  static parse() {
+    var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+    var inherit = arguments.length > 1 ? arguments[1] : undefined;
+    var fontStyle = '';
+    var fontVariant = '';
+    var fontWeight = '';
+    var fontSize = '';
+    var fontFamily = '';
+    var parts = compressSpaces(font).trim().split(' ');
+    var set = {
+      fontSize: false,
+      fontStyle: false,
+      fontWeight: false,
+      fontVariant: false
+    };
+    parts.forEach(part => {
+      switch (true) {
+        case !set.fontStyle && Font.styles.includes(part):
+          if (part !== 'inherit') {
+            fontStyle = part;
+          }
+
+          set.fontStyle = true;
+          break;
+
+        case !set.fontVariant && Font.variants.includes(part):
+          if (part !== 'inherit') {
+            fontVariant = part;
+          }
+
+          set.fontStyle = true;
+          set.fontVariant = true;
+          break;
+
+        case !set.fontWeight && Font.weights.includes(part):
+          if (part !== 'inherit') {
+            fontWeight = part;
+          }
+
+          set.fontStyle = true;
+          set.fontVariant = true;
+          set.fontWeight = true;
+          break;
+
+        case !set.fontSize:
+          if (part !== 'inherit') {
+            [fontSize] = part.split('/');
+          }
+
+          set.fontStyle = true;
+          set.fontVariant = true;
+          set.fontWeight = true;
+          set.fontSize = true;
+          break;
+
+        default:
+          if (part !== 'inherit') {
+            fontFamily += part;
+          }
+
+      }
+    });
+    return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
+  }
+
+  toString() {
+    return [prepareFontStyle(this.fontStyle), this.fontVariant, prepareFontWeight(this.fontWeight), this.fontSize, // Wrap fontFamily only on nodejs and only for canvas.ctx
+    prepareFontFamily(this.fontFamily)].join(' ').trim();
+  }
+
+}
+Font.styles = 'normal|italic|oblique|inherit';
+Font.variants = 'normal|small-caps|inherit';
+Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
+
+class BoundingBox {
+  constructor() {
+    var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.NaN;
+    var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.NaN;
+    var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.NaN;
+    var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Number.NaN;
+    this.x1 = x1;
+    this.y1 = y1;
+    this.x2 = x2;
+    this.y2 = y2;
+    this.addPoint(x1, y1);
+    this.addPoint(x2, y2);
+  }
+
+  get x() {
+    return this.x1;
+  }
+
+  get y() {
+    return this.y1;
+  }
+
+  get width() {
+    return this.x2 - this.x1;
+  }
+
+  get height() {
+    return this.y2 - this.y1;
+  }
+
+  addPoint(x, y) {
+    if (typeof x !== 'undefined') {
+      if (isNaN(this.x1) || isNaN(this.x2)) {
+        this.x1 = x;
+        this.x2 = x;
+      }
+
+      if (x < this.x1) {
+        this.x1 = x;
+      }
+
+      if (x > this.x2) {
+        this.x2 = x;
+      }
+    }
+
+    if (typeof y !== 'undefined') {
+      if (isNaN(this.y1) || isNaN(this.y2)) {
+        this.y1 = y;
+        this.y2 = y;
+      }
+
+      if (y < this.y1) {
+        this.y1 = y;
+      }
+
+      if (y > this.y2) {
+        this.y2 = y;
+      }
+    }
+  }
+
+  addX(x) {
+    this.addPoint(x, null);
+  }
+
+  addY(y) {
+    this.addPoint(null, y);
+  }
+
+  addBoundingBox(boundingBox) {
+    if (!boundingBox) {
+      return;
+    }
+
+    var {
+      x1,
+      y1,
+      x2,
+      y2
+    } = boundingBox;
+    this.addPoint(x1, y1);
+    this.addPoint(x2, y2);
+  }
+
+  sumCubic(t, p0, p1, p2, p3) {
+    return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;
+  }
+
+  bezierCurveAdd(forX, p0, p1, p2, p3) {
+    var b = 6 * p0 - 12 * p1 + 6 * p2;
+    var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
+    var c = 3 * p1 - 3 * p0;
+
+    if (a === 0) {
+      if (b === 0) {
+        return;
+      }
+
+      var t = -c / b;
+
+      if (0 < t && t < 1) {
+        if (forX) {
+          this.addX(this.sumCubic(t, p0, p1, p2, p3));
+        } else {
+          this.addY(this.sumCubic(t, p0, p1, p2, p3));
+        }
+      }
+
+      return;
+    }
+
+    var b2ac = Math.pow(b, 2) - 4 * c * a;
+
+    if (b2ac < 0) {
+      return;
+    }
+
+    var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
+
+    if (0 < t1 && t1 < 1) {
+      if (forX) {
+        this.addX(this.sumCubic(t1, p0, p1, p2, p3));
+      } else {
+        this.addY(this.sumCubic(t1, p0, p1, p2, p3));
+      }
+    }
+
+    var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
+
+    if (0 < t2 && t2 < 1) {
+      if (forX) {
+        this.addX(this.sumCubic(t2, p0, p1, p2, p3));
+      } else {
+        this.addY(this.sumCubic(t2, p0, p1, p2, p3));
+      }
+    }
+  } // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
+
+
+  addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
+    this.addPoint(p0x, p0y);
+    this.addPoint(p3x, p3y);
+    this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
+    this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
+  }
+
+  addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
+    var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
+
+    var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
+
+    var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
+
+    var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
+
+    this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
+  }
+
+  isPointInBox(x, y) {
+    var {
+      x1,
+      y1,
+      x2,
+      y2
+    } = this;
+    return x1 <= x && x <= x2 && y1 <= y && y <= y2;
+  }
+
+}
+
+class PathParser extends SVGPathData {
+  constructor(path) {
+    super(path // Fix spaces after signs.
+    .replace(/([+\-.])\s+/gm, '$1') // Remove invalid part.
+    .replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g, ''));
+    this.control = null;
+    this.start = null;
+    this.current = null;
+    this.command = null;
+    this.commands = this.commands;
+    this.i = -1;
+    this.previousCommand = null;
+    this.points = [];
+    this.angles = [];
+  }
+
+  reset() {
+    this.i = -1;
+    this.command = null;
+    this.previousCommand = null;
+    this.start = new Point(0, 0);
+    this.control = new Point(0, 0);
+    this.current = new Point(0, 0);
+    this.points = [];
+    this.angles = [];
+  }
+
+  isEnd() {
+    var {
+      i,
+      commands
+    } = this;
+    return i >= commands.length - 1;
+  }
+
+  next() {
+    var command = this.commands[++this.i];
+    this.previousCommand = this.command;
+    this.command = command;
+    return command;
+  }
+
+  getPoint() {
+    var xProp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'x';
+    var yProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'y';
+    var point = new Point(this.command[xProp], this.command[yProp]);
+    return this.makeAbsolute(point);
+  }
+
+  getAsControlPoint(xProp, yProp) {
+    var point = this.getPoint(xProp, yProp);
+    this.control = point;
+    return point;
+  }
+
+  getAsCurrentPoint(xProp, yProp) {
+    var point = this.getPoint(xProp, yProp);
+    this.current = point;
+    return point;
+  }
+
+  getReflectedControlPoint() {
+    var previousCommand = this.previousCommand.type;
+
+    if (previousCommand !== SVGPathData.CURVE_TO && previousCommand !== SVGPathData.SMOOTH_CURVE_TO && previousCommand !== SVGPathData.QUAD_TO && previousCommand !== SVGPathData.SMOOTH_QUAD_TO) {
+      return this.current;
+    } // reflect point
+
+
+    var {
+      current: {
+        x: cx,
+        y: cy
+      },
+      control: {
+        x: ox,
+        y: oy
+      }
+    } = this;
+    var point = new Point(2 * cx - ox, 2 * cy - oy);
+    return point;
+  }
+
+  makeAbsolute(point) {
+    if (this.command.relative) {
+      var {
+        x,
+        y
+      } = this.current;
+      point.x += x;
+      point.y += y;
+    }
+
+    return point;
+  }
+
+  addMarker(point, from, priorTo) {
+    var {
+      points,
+      angles
+    } = this; // if the last angle isn't filled in because we didn't have this point yet ...
+
+    if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
+      angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
+    }
+
+    this.addMarkerAngle(point, from ? from.angleTo(point) : null);
+  }
+
+  addMarkerAngle(point, angle) {
+    this.points.push(point);
+    this.angles.push(angle);
+  }
+
+  getMarkerPoints() {
+    return this.points;
+  }
+
+  getMarkerAngles() {
+    var {
+      angles
+    } = this;
+    var len = angles.length;
+
+    for (var i = 0; i < len; i++) {
+      if (!angles[i]) {
+        for (var j = i + 1; j < len; j++) {
+          if (angles[j]) {
+            angles[i] = angles[j];
+            break;
+          }
+        }
+      }
+    }
+
+    return angles;
+  }
+
+}
+
+class RenderedElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.modifiedEmSizeStack = false;
+  }
+
+  calculateOpacity() {
+    var opacity = 1.0; // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
+
+    var element = this;
+
+    while (element) {
+      var opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
+
+      if (opacityStyle.hasValue(true)) {
+        opacity *= opacityStyle.getNumber();
+      }
+
+      element = element.parent;
+    }
+
+    return opacity;
+  }
+
+  setContext(ctx) {
+    var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+    if (!fromMeasure) {
+      // causes stack overflow when measuring text with gradients
+      // fill
+      var fillStyleProp = this.getStyle('fill');
+      var fillOpacityStyleProp = this.getStyle('fill-opacity');
+      var strokeStyleProp = this.getStyle('stroke');
+      var strokeOpacityProp = this.getStyle('stroke-opacity');
+
+      if (fillStyleProp.isUrlDefinition()) {
+        var fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
+
+        if (fillStyle) {
+          ctx.fillStyle = fillStyle;
+        }
+      } else if (fillStyleProp.hasValue()) {
+        if (fillStyleProp.getString() === 'currentColor') {
+          fillStyleProp.setValue(this.getStyle('color').getColor());
+        }
+
+        var _fillStyle = fillStyleProp.getColor();
+
+        if (_fillStyle !== 'inherit') {
+          ctx.fillStyle = _fillStyle === 'none' ? 'rgba(0,0,0,0)' : _fillStyle;
+        }
+      }
+
+      if (fillOpacityStyleProp.hasValue()) {
+        var _fillStyle2 = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();
+
+        ctx.fillStyle = _fillStyle2;
+      } // stroke
+
+
+      if (strokeStyleProp.isUrlDefinition()) {
+        var strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
+
+        if (strokeStyle) {
+          ctx.strokeStyle = strokeStyle;
+        }
+      } else if (strokeStyleProp.hasValue()) {
+        if (strokeStyleProp.getString() === 'currentColor') {
+          strokeStyleProp.setValue(this.getStyle('color').getColor());
+        }
+
+        var _strokeStyle = strokeStyleProp.getString();
+
+        if (_strokeStyle !== 'inherit') {
+          ctx.strokeStyle = _strokeStyle === 'none' ? 'rgba(0,0,0,0)' : _strokeStyle;
+        }
+      }
+
+      if (strokeOpacityProp.hasValue()) {
+        var _strokeStyle2 = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();
+
+        ctx.strokeStyle = _strokeStyle2;
+      }
+
+      var strokeWidthStyleProp = this.getStyle('stroke-width');
+
+      if (strokeWidthStyleProp.hasValue()) {
+        var newLineWidth = strokeWidthStyleProp.getPixels();
+        ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
+        : newLineWidth;
+      }
+
+      var strokeLinecapStyleProp = this.getStyle('stroke-linecap');
+      var strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
+      var strokeMiterlimitProp = this.getStyle('stroke-miterlimit'); // NEED TEST
+      // const pointOrderStyleProp = this.getStyle('paint-order');
+
+      var strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
+      var strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
+
+      if (strokeLinecapStyleProp.hasValue()) {
+        ctx.lineCap = strokeLinecapStyleProp.getString();
+      }
+
+      if (strokeLinejoinStyleProp.hasValue()) {
+        ctx.lineJoin = strokeLinejoinStyleProp.getString();
+      }
+
+      if (strokeMiterlimitProp.hasValue()) {
+        ctx.miterLimit = strokeMiterlimitProp.getNumber();
+      } // NEED TEST
+      // if (pointOrderStyleProp.hasValue()) {
+      // 	// ?
+      // 	ctx.paintOrder = pointOrderStyleProp.getValue();
+      // }
+
+
+      if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
+        var gaps = toNumbers(strokeDasharrayStyleProp.getString());
+
+        if (typeof ctx.setLineDash !== 'undefined') {
+          ctx.setLineDash(gaps);
+        } else // @ts-expect-error Handle browser prefix.
+          if (typeof ctx.webkitLineDash !== 'undefined') {
+            // @ts-expect-error Handle browser prefix.
+            ctx.webkitLineDash = gaps;
+          } else // @ts-expect-error Handle browser prefix.
+            if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
+              // @ts-expect-error Handle browser prefix.
+              ctx.mozDash = gaps;
+            }
+
+        var offset = strokeDashoffsetProp.getPixels();
+
+        if (typeof ctx.lineDashOffset !== 'undefined') {
+          ctx.lineDashOffset = offset;
+        } else // @ts-expect-error Handle browser prefix.
+          if (typeof ctx.webkitLineDashOffset !== 'undefined') {
+            // @ts-expect-error Handle browser prefix.
+            ctx.webkitLineDashOffset = offset;
+          } else // @ts-expect-error Handle browser prefix.
+            if (typeof ctx.mozDashOffset !== 'undefined') {
+              // @ts-expect-error Handle browser prefix.
+              ctx.mozDashOffset = offset;
+            }
+      }
+    } // font
+
+
+    this.modifiedEmSizeStack = false;
+
+    if (typeof ctx.font !== 'undefined') {
+      var fontStyleProp = this.getStyle('font');
+      var fontStyleStyleProp = this.getStyle('font-style');
+      var fontVariantStyleProp = this.getStyle('font-variant');
+      var fontWeightStyleProp = this.getStyle('font-weight');
+      var fontSizeStyleProp = this.getStyle('font-size');
+      var fontFamilyStyleProp = this.getStyle('font-family');
+      var font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? "".concat(fontSizeStyleProp.getPixels(true), "px") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));
+      fontStyleStyleProp.setValue(font.fontStyle);
+      fontVariantStyleProp.setValue(font.fontVariant);
+      fontWeightStyleProp.setValue(font.fontWeight);
+      fontSizeStyleProp.setValue(font.fontSize);
+      fontFamilyStyleProp.setValue(font.fontFamily);
+      ctx.font = font.toString();
+
+      if (fontSizeStyleProp.isPixels()) {
+        this.document.emSize = fontSizeStyleProp.getPixels();
+        this.modifiedEmSizeStack = true;
+      }
+    }
+
+    if (!fromMeasure) {
+      // effects
+      this.applyEffects(ctx); // opacity
+
+      ctx.globalAlpha = this.calculateOpacity();
+    }
+  }
+
+  clearContext(ctx) {
+    super.clearContext(ctx);
+
+    if (this.modifiedEmSizeStack) {
+      this.document.popEmSize();
+    }
+  }
+
+}
+
+class PathElement extends RenderedElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'path';
+    this.pathParser = null;
+    this.pathParser = new PathParser(this.getAttribute('d').getString());
+  }
+
+  path(ctx) {
+    var {
+      pathParser
+    } = this;
+    var boundingBox = new BoundingBox();
+    pathParser.reset();
+
+    if (ctx) {
+      ctx.beginPath();
+    }
+
+    while (!pathParser.isEnd()) {
+      switch (pathParser.next().type) {
+        case PathParser.MOVE_TO:
+          this.pathM(ctx, boundingBox);
+          break;
+
+        case PathParser.LINE_TO:
+          this.pathL(ctx, boundingBox);
+          break;
+
+        case PathParser.HORIZ_LINE_TO:
+          this.pathH(ctx, boundingBox);
+          break;
+
+        case PathParser.VERT_LINE_TO:
+          this.pathV(ctx, boundingBox);
+          break;
+
+        case PathParser.CURVE_TO:
+          this.pathC(ctx, boundingBox);
+          break;
+
+        case PathParser.SMOOTH_CURVE_TO:
+          this.pathS(ctx, boundingBox);
+          break;
+
+        case PathParser.QUAD_TO:
+          this.pathQ(ctx, boundingBox);
+          break;
+
+        case PathParser.SMOOTH_QUAD_TO:
+          this.pathT(ctx, boundingBox);
+          break;
+
+        case PathParser.ARC:
+          this.pathA(ctx, boundingBox);
+          break;
+
+        case PathParser.CLOSE_PATH:
+          this.pathZ(ctx, boundingBox);
+          break;
+      }
+    }
+
+    return boundingBox;
+  }
+
+  getBoundingBox(_) {
+    return this.path();
+  }
+
+  getMarkers() {
+    var {
+      pathParser
+    } = this;
+    var points = pathParser.getMarkerPoints();
+    var angles = pathParser.getMarkerAngles();
+    var markers = points.map((point, i) => [point, angles[i]]);
+    return markers;
+  }
+
+  renderChildren(ctx) {
+    this.path(ctx);
+    this.document.screen.mouse.checkPath(this, ctx);
+    var fillRuleStyleProp = this.getStyle('fill-rule');
+
+    if (ctx.fillStyle !== '') {
+      if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
+        ctx.fill(fillRuleStyleProp.getString());
+      } else {
+        ctx.fill();
+      }
+    }
+
+    if (ctx.strokeStyle !== '') {
+      if (this.getAttribute('vector-effect').getString() === 'non-scaling-stroke') {
+        ctx.save();
+        ctx.setTransform(1, 0, 0, 1, 0, 0);
+        ctx.stroke();
+        ctx.restore();
+      } else {
+        ctx.stroke();
+      }
+    }
+
+    var markers = this.getMarkers();
+
+    if (markers) {
+      var markersLastIndex = markers.length - 1;
+      var markerStartStyleProp = this.getStyle('marker-start');
+      var markerMidStyleProp = this.getStyle('marker-mid');
+      var markerEndStyleProp = this.getStyle('marker-end');
+
+      if (markerStartStyleProp.isUrlDefinition()) {
+        var marker = markerStartStyleProp.getDefinition();
+        var [point, angle] = markers[0];
+        marker.render(ctx, point, angle);
+      }
+
+      if (markerMidStyleProp.isUrlDefinition()) {
+        var _marker = markerMidStyleProp.getDefinition();
+
+        for (var i = 1; i < markersLastIndex; i++) {
+          var [_point, _angle] = markers[i];
+
+          _marker.render(ctx, _point, _angle);
+        }
+      }
+
+      if (markerEndStyleProp.isUrlDefinition()) {
+        var _marker2 = markerEndStyleProp.getDefinition();
+
+        var [_point2, _angle2] = markers[markersLastIndex];
+
+        _marker2.render(ctx, _point2, _angle2);
+      }
+    }
+  }
+
+  static pathM(pathParser) {
+    var point = pathParser.getAsCurrentPoint();
+    pathParser.start = pathParser.current;
+    return {
+      point
+    };
+  }
+
+  pathM(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      point
+    } = PathElement.pathM(pathParser);
+    var {
+      x,
+      y
+    } = point;
+    pathParser.addMarker(point);
+    boundingBox.addPoint(x, y);
+
+    if (ctx) {
+      ctx.moveTo(x, y);
+    }
+  }
+
+  static pathL(pathParser) {
+    var {
+      current
+    } = pathParser;
+    var point = pathParser.getAsCurrentPoint();
+    return {
+      current,
+      point
+    };
+  }
+
+  pathL(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      current,
+      point
+    } = PathElement.pathL(pathParser);
+    var {
+      x,
+      y
+    } = point;
+    pathParser.addMarker(point, current);
+    boundingBox.addPoint(x, y);
+
+    if (ctx) {
+      ctx.lineTo(x, y);
+    }
+  }
+
+  static pathH(pathParser) {
+    var {
+      current,
+      command
+    } = pathParser;
+    var point = new Point((command.relative ? current.x : 0) + command.x, current.y);
+    pathParser.current = point;
+    return {
+      current,
+      point
+    };
+  }
+
+  pathH(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      current,
+      point
+    } = PathElement.pathH(pathParser);
+    var {
+      x,
+      y
+    } = point;
+    pathParser.addMarker(point, current);
+    boundingBox.addPoint(x, y);
+
+    if (ctx) {
+      ctx.lineTo(x, y);
+    }
+  }
+
+  static pathV(pathParser) {
+    var {
+      current,
+      command
+    } = pathParser;
+    var point = new Point(current.x, (command.relative ? current.y : 0) + command.y);
+    pathParser.current = point;
+    return {
+      current,
+      point
+    };
+  }
+
+  pathV(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      current,
+      point
+    } = PathElement.pathV(pathParser);
+    var {
+      x,
+      y
+    } = point;
+    pathParser.addMarker(point, current);
+    boundingBox.addPoint(x, y);
+
+    if (ctx) {
+      ctx.lineTo(x, y);
+    }
+  }
+
+  static pathC(pathParser) {
+    var {
+      current
+    } = pathParser;
+    var point = pathParser.getPoint('x1', 'y1');
+    var controlPoint = pathParser.getAsControlPoint('x2', 'y2');
+    var currentPoint = pathParser.getAsCurrentPoint();
+    return {
+      current,
+      point,
+      controlPoint,
+      currentPoint
+    };
+  }
+
+  pathC(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      current,
+      point,
+      controlPoint,
+      currentPoint
+    } = PathElement.pathC(pathParser);
+    pathParser.addMarker(currentPoint, controlPoint, point);
+    boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+    if (ctx) {
+      ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+  }
+
+  static pathS(pathParser) {
+    var {
+      current
+    } = pathParser;
+    var point = pathParser.getReflectedControlPoint();
+    var controlPoint = pathParser.getAsControlPoint('x2', 'y2');
+    var currentPoint = pathParser.getAsCurrentPoint();
+    return {
+      current,
+      point,
+      controlPoint,
+      currentPoint
+    };
+  }
+
+  pathS(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      current,
+      point,
+      controlPoint,
+      currentPoint
+    } = PathElement.pathS(pathParser);
+    pathParser.addMarker(currentPoint, controlPoint, point);
+    boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+    if (ctx) {
+      ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+  }
+
+  static pathQ(pathParser) {
+    var {
+      current
+    } = pathParser;
+    var controlPoint = pathParser.getAsControlPoint('x1', 'y1');
+    var currentPoint = pathParser.getAsCurrentPoint();
+    return {
+      current,
+      controlPoint,
+      currentPoint
+    };
+  }
+
+  pathQ(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      current,
+      controlPoint,
+      currentPoint
+    } = PathElement.pathQ(pathParser);
+    pathParser.addMarker(currentPoint, controlPoint, controlPoint);
+    boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+    if (ctx) {
+      ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+  }
+
+  static pathT(pathParser) {
+    var {
+      current
+    } = pathParser;
+    var controlPoint = pathParser.getReflectedControlPoint();
+    pathParser.control = controlPoint;
+    var currentPoint = pathParser.getAsCurrentPoint();
+    return {
+      current,
+      controlPoint,
+      currentPoint
+    };
+  }
+
+  pathT(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      current,
+      controlPoint,
+      currentPoint
+    } = PathElement.pathT(pathParser);
+    pathParser.addMarker(currentPoint, controlPoint, controlPoint);
+    boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+    if (ctx) {
+      ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+  }
+
+  static pathA(pathParser) {
+    var {
+      current,
+      command
+    } = pathParser;
+    var {
+      rX,
+      rY,
+      xRot,
+      lArcFlag,
+      sweepFlag
+    } = command;
+    var xAxisRotation = xRot * (Math.PI / 180.0);
+    var currentPoint = pathParser.getAsCurrentPoint(); // Conversion from endpoint to center parameterization
+    // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
+    // x1', y1'
+
+    var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
+
+    var l = Math.pow(currp.x, 2) / Math.pow(rX, 2) + Math.pow(currp.y, 2) / Math.pow(rY, 2);
+
+    if (l > 1) {
+      rX *= Math.sqrt(l);
+      rY *= Math.sqrt(l);
+    } // cx', cy'
+
+
+    var s = (lArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rX, 2) * Math.pow(rY, 2) - Math.pow(rX, 2) * Math.pow(currp.y, 2) - Math.pow(rY, 2) * Math.pow(currp.x, 2)) / (Math.pow(rX, 2) * Math.pow(currp.y, 2) + Math.pow(rY, 2) * Math.pow(currp.x, 2)));
+
+    if (isNaN(s)) {
+      s = 0;
+    }
+
+    var cpp = new Point(s * rX * currp.y / rY, s * -rY * currp.x / rX); // cx, cy
+
+    var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
+
+    var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rX, (currp.y - cpp.y) / rY]); // θ1
+    // angle delta
+
+    var u = [(currp.x - cpp.x) / rX, (currp.y - cpp.y) / rY];
+    var v = [(-currp.x - cpp.x) / rX, (-currp.y - cpp.y) / rY];
+    var ad = vectorsAngle(u, v); // Δθ
+
+    if (vectorsRatio(u, v) <= -1) {
+      ad = Math.PI;
+    }
+
+    if (vectorsRatio(u, v) >= 1) {
+      ad = 0;
+    }
+
+    return {
+      currentPoint,
+      rX,
+      rY,
+      sweepFlag,
+      xAxisRotation,
+      centp,
+      a1,
+      ad
+    };
+  }
+
+  pathA(ctx, boundingBox) {
+    var {
+      pathParser
+    } = this;
+    var {
+      currentPoint,
+      rX,
+      rY,
+      sweepFlag,
+      xAxisRotation,
+      centp,
+      a1,
+      ad
+    } = PathElement.pathA(pathParser); // for markers
+
+    var dir = 1 - sweepFlag ? 1.0 : -1.0;
+    var ah = a1 + dir * (ad / 2.0);
+    var halfWay = new Point(centp.x + rX * Math.cos(ah), centp.y + rY * Math.sin(ah));
+    pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
+    pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
+    boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
+
+    if (ctx && !isNaN(a1) && !isNaN(ad)) {
+      var r = rX > rY ? rX : rY;
+      var sx = rX > rY ? 1 : rX / rY;
+      var sy = rX > rY ? rY / rX : 1;
+      ctx.translate(centp.x, centp.y);
+      ctx.rotate(xAxisRotation);
+      ctx.scale(sx, sy);
+      ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
+      ctx.scale(1 / sx, 1 / sy);
+      ctx.rotate(-xAxisRotation);
+      ctx.translate(-centp.x, -centp.y);
+    }
+  }
+
+  static pathZ(pathParser) {
+    pathParser.current = pathParser.start;
+  }
+
+  pathZ(ctx, boundingBox) {
+    PathElement.pathZ(this.pathParser);
+
+    if (ctx) {
+      // only close path if it is not a straight line
+      if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {
+        ctx.closePath();
+      }
+    }
+  }
+
+}
+
+class GlyphElement extends PathElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'glyph';
+    this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();
+    this.unicode = this.getAttribute('unicode').getString();
+    this.arabicForm = this.getAttribute('arabic-form').getString();
+  }
+
+}
+
+class TextElement extends RenderedElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, new.target === TextElement ? true : captureTextNodes);
+    this.type = 'text';
+    this.x = 0;
+    this.y = 0;
+    this.measureCache = -1;
+  }
+
+  setContext(ctx) {
+    var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+    super.setContext(ctx, fromMeasure);
+    var textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();
+
+    if (textBaseline) {
+      ctx.textBaseline = textBaseline;
+    }
+  }
+
+  initializeCoordinates() {
+    this.x = 0;
+    this.y = 0;
+    this.leafTexts = [];
+    this.textChunkStart = 0;
+    this.minX = Number.POSITIVE_INFINITY;
+    this.maxX = Number.NEGATIVE_INFINITY;
+  }
+
+  getBoundingBox(ctx) {
+    if (this.type !== 'text') {
+      return this.getTElementBoundingBox(ctx);
+    } // first, calculate child positions
+
+
+    this.initializeCoordinates();
+    this.adjustChildCoordinatesRecursive(ctx);
+    var boundingBox = null; // then calculate bounding box
+
+    this.children.forEach((_, i) => {
+      var childBoundingBox = this.getChildBoundingBox(ctx, this, this, i);
+
+      if (!boundingBox) {
+        boundingBox = childBoundingBox;
+      } else {
+        boundingBox.addBoundingBox(childBoundingBox);
+      }
+    });
+    return boundingBox;
+  }
+
+  getFontSize() {
+    var {
+      document,
+      parent
+    } = this;
+    var inheritFontSize = Font.parse(document.ctx.font).fontSize;
+    var fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
+    return fontSize;
+  }
+
+  getTElementBoundingBox(ctx) {
+    var fontSize = this.getFontSize();
+    return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
+  }
+
+  getGlyph(font, text, i) {
+    var char = text[i];
+    var glyph = null;
+
+    if (font.isArabic) {
+      var len = text.length;
+      var prevChar = text[i - 1];
+      var nextChar = text[i + 1];
+      var arabicForm = 'isolated';
+
+      if ((i === 0 || prevChar === ' ') && i < len - 1 && nextChar !== ' ') {
+        arabicForm = 'terminal';
+      }
+
+      if (i > 0 && prevChar !== ' ' && i < len - 1 && nextChar !== ' ') {
+        arabicForm = 'medial';
+      }
+
+      if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
+        arabicForm = 'initial';
+      }
+
+      if (typeof font.glyphs[char] !== 'undefined') {
+        // NEED TEST
+        var maybeGlyph = font.glyphs[char];
+        glyph = maybeGlyph instanceof GlyphElement ? maybeGlyph : maybeGlyph[arabicForm];
+      }
+    } else {
+      glyph = font.glyphs[char];
+    }
+
+    if (!glyph) {
+      glyph = font.missingGlyph;
+    }
+
+    return glyph;
+  }
+
+  getText() {
+    return '';
+  }
+
+  getTextFromNode(node) {
+    var textNode = node || this.node;
+    var childNodes = Array.from(textNode.parentNode.childNodes);
+    var index = childNodes.indexOf(textNode);
+    var lastIndex = childNodes.length - 1;
+    var text = compressSpaces( // textNode.value
+    // || textNode.text
+    textNode.textContent || '');
+
+    if (index === 0) {
+      text = trimLeft(text);
+    }
+
+    if (index === lastIndex) {
+      text = trimRight(text);
+    }
+
+    return text;
+  }
+
+  renderChildren(ctx) {
+    if (this.type !== 'text') {
+      this.renderTElementChildren(ctx);
+      return;
+    } // first, calculate child positions
+
+
+    this.initializeCoordinates();
+    this.adjustChildCoordinatesRecursive(ctx); // then render
+
+    this.children.forEach((_, i) => {
+      this.renderChild(ctx, this, this, i);
+    });
+    var {
+      mouse
+    } = this.document.screen; // Do not calc bounding box if mouse is not working.
+
+    if (mouse.isWorking()) {
+      mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
+    }
+  }
+
+  renderTElementChildren(ctx) {
+    var {
+      document,
+      parent
+    } = this;
+    var renderText = this.getText();
+    var customFont = parent.getStyle('font-family').getDefinition();
+
+    if (customFont) {
+      var {
+        unitsPerEm
+      } = customFont.fontFace;
+      var ctxFont = Font.parse(document.ctx.font);
+      var fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
+      var fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
+      var scale = fontSize / unitsPerEm;
+      var text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;
+      var dx = toNumbers(parent.getAttribute('dx').getString());
+      var len = text.length;
+
+      for (var i = 0; i < len; i++) {
+        var glyph = this.getGlyph(customFont, text, i);
+        ctx.translate(this.x, this.y);
+        ctx.scale(scale, -scale);
+        var lw = ctx.lineWidth;
+        ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
+
+        if (fontStyle === 'italic') {
+          ctx.transform(1, 0, .4, 1, 0, 0);
+        }
+
+        glyph.render(ctx);
+
+        if (fontStyle === 'italic') {
+          ctx.transform(1, 0, -.4, 1, 0, 0);
+        }
+
+        ctx.lineWidth = lw;
+        ctx.scale(1 / scale, -1 / scale);
+        ctx.translate(-this.x, -this.y);
+        this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
+
+        if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
+          this.x += dx[i];
+        }
+      }
+
+      return;
+    }
+
+    var {
+      x,
+      y
+    } = this; // NEED TEST
+    // if (ctx.paintOrder === 'stroke') {
+    // 	if (ctx.strokeStyle) {
+    // 		ctx.strokeText(renderText, x, y);
+    // 	}
+    // 	if (ctx.fillStyle) {
+    // 		ctx.fillText(renderText, x, y);
+    // 	}
+    // } else {
+
+    if (ctx.fillStyle) {
+      ctx.fillText(renderText, x, y);
+    }
+
+    if (ctx.strokeStyle) {
+      ctx.strokeText(renderText, x, y);
+    } // }
+
+  }
+
+  applyAnchoring() {
+    if (this.textChunkStart >= this.leafTexts.length) {
+      return;
+    } // This is basically the "Apply anchoring" part of https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithm.
+    // The difference is that we apply the anchoring as soon as a chunk is finished. This saves some extra looping.
+    // Vertical text is not supported.
+
+
+    var firstElement = this.leafTexts[this.textChunkStart];
+    var textAnchor = firstElement.getStyle('text-anchor').getString('start');
+    var isRTL = false; // we treat RTL like LTR
+
+    var shift = 0;
+
+    if (textAnchor === 'start' && !isRTL || textAnchor === 'end' && isRTL) {
+      shift = firstElement.x - this.minX;
+    } else if (textAnchor === 'end' && !isRTL || textAnchor === 'start' && isRTL) {
+      shift = firstElement.x - this.maxX;
+    } else {
+      shift = firstElement.x - (this.minX + this.maxX) / 2;
+    }
+
+    for (var i = this.textChunkStart; i < this.leafTexts.length; i++) {
+      this.leafTexts[i].x += shift;
+    } // start new chunk
+
+
+    this.minX = Number.POSITIVE_INFINITY;
+    this.maxX = Number.NEGATIVE_INFINITY;
+    this.textChunkStart = this.leafTexts.length;
+  }
+
+  adjustChildCoordinatesRecursive(ctx) {
+    this.children.forEach((_, i) => {
+      this.adjustChildCoordinatesRecursiveCore(ctx, this, this, i);
+    });
+    this.applyAnchoring();
+  }
+
+  adjustChildCoordinatesRecursiveCore(ctx, textParent, parent, i) {
+    var child = parent.children[i];
+
+    if (child.children.length > 0) {
+      child.children.forEach((_, i) => {
+        textParent.adjustChildCoordinatesRecursiveCore(ctx, textParent, child, i);
+      });
+    } else {
+      // only leafs are relevant
+      this.adjustChildCoordinates(ctx, textParent, parent, i);
+    }
+  }
+
+  adjustChildCoordinates(ctx, textParent, parent, i) {
+    var child = parent.children[i];
+
+    if (typeof child.measureText !== 'function') {
+      return child;
+    }
+
+    ctx.save();
+    child.setContext(ctx, true);
+    var xAttr = child.getAttribute('x');
+    var yAttr = child.getAttribute('y');
+    var dxAttr = child.getAttribute('dx');
+    var dyAttr = child.getAttribute('dy');
+    var customFont = child.getStyle('font-family').getDefinition();
+    var isRTL = Boolean(customFont) && customFont.isRTL;
+
+    if (i === 0) {
+      // First children inherit attributes from parent(s). Positional attributes
+      // are only inherited from a parent to it's first child.
+      if (!xAttr.hasValue()) {
+        xAttr.setValue(child.getInheritedAttribute('x'));
+      }
+
+      if (!yAttr.hasValue()) {
+        yAttr.setValue(child.getInheritedAttribute('y'));
+      }
+
+      if (!dxAttr.hasValue()) {
+        dxAttr.setValue(child.getInheritedAttribute('dx'));
+      }
+
+      if (!dyAttr.hasValue()) {
+        dyAttr.setValue(child.getInheritedAttribute('dy'));
+      }
+    }
+
+    var width = child.measureText(ctx);
+
+    if (isRTL) {
+      textParent.x -= width;
+    }
+
+    if (xAttr.hasValue()) {
+      // an "x" attribute marks the start of a new chunk
+      textParent.applyAnchoring();
+      child.x = xAttr.getPixels('x');
+
+      if (dxAttr.hasValue()) {
+        child.x += dxAttr.getPixels('x');
+      }
+    } else {
+      if (dxAttr.hasValue()) {
+        textParent.x += dxAttr.getPixels('x');
+      }
+
+      child.x = textParent.x;
+    }
+
+    textParent.x = child.x;
+
+    if (!isRTL) {
+      textParent.x += width;
+    }
+
+    if (yAttr.hasValue()) {
+      child.y = yAttr.getPixels('y');
+
+      if (dyAttr.hasValue()) {
+        child.y += dyAttr.getPixels('y');
+      }
+    } else {
+      if (dyAttr.hasValue()) {
+        textParent.y += dyAttr.getPixels('y');
+      }
+
+      child.y = textParent.y;
+    }
+
+    textParent.y = child.y; // update the current chunk and it's bounds
+
+    textParent.leafTexts.push(child);
+    textParent.minX = Math.min(textParent.minX, child.x, child.x + width);
+    textParent.maxX = Math.max(textParent.maxX, child.x, child.x + width);
+    child.clearContext(ctx);
+    ctx.restore();
+    return child;
+  }
+
+  getChildBoundingBox(ctx, textParent, parent, i) {
+    var child = parent.children[i]; // not a text node?
+
+    if (typeof child.getBoundingBox !== 'function') {
+      return null;
+    }
+
+    var boundingBox = child.getBoundingBox(ctx);
+
+    if (!boundingBox) {
+      return null;
+    }
+
+    child.children.forEach((_, i) => {
+      var childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
+      boundingBox.addBoundingBox(childBoundingBox);
+    });
+    return boundingBox;
+  }
+
+  renderChild(ctx, textParent, parent, i) {
+    var child = parent.children[i];
+    child.render(ctx);
+    child.children.forEach((_, i) => {
+      textParent.renderChild(ctx, textParent, child, i);
+    });
+  }
+
+  measureText(ctx) {
+    var {
+      measureCache
+    } = this;
+
+    if (~measureCache) {
+      return measureCache;
+    }
+
+    var renderText = this.getText();
+    var measure = this.measureTargetText(ctx, renderText);
+    this.measureCache = measure;
+    return measure;
+  }
+
+  measureTargetText(ctx, targetText) {
+    if (!targetText.length) {
+      return 0;
+    }
+
+    var {
+      parent
+    } = this;
+    var customFont = parent.getStyle('font-family').getDefinition();
+
+    if (customFont) {
+      var fontSize = this.getFontSize();
+      var text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;
+      var dx = toNumbers(parent.getAttribute('dx').getString());
+      var len = text.length;
+      var _measure = 0;
+
+      for (var i = 0; i < len; i++) {
+        var glyph = this.getGlyph(customFont, text, i);
+        _measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
+
+        if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
+          _measure += dx[i];
+        }
+      }
+
+      return _measure;
+    }
+
+    if (!ctx.measureText) {
+      return targetText.length * 10;
+    }
+
+    ctx.save();
+    this.setContext(ctx, true);
+    var {
+      width: measure
+    } = ctx.measureText(targetText);
+    this.clearContext(ctx);
+    ctx.restore();
+    return measure;
+  }
+  /**
+   * Inherits positional attributes from {@link TextElement} parent(s). Attributes
+   * are only inherited from a parent to its first child.
+   * @param name - The attribute name.
+   * @returns The attribute value or null.
+   */
+
+
+  getInheritedAttribute(name) {
+    // eslint-disable-next-line @typescript-eslint/no-this-alias,consistent-this
+    var current = this;
+
+    while (current instanceof TextElement && current.isFirstChild()) {
+      var parentAttr = current.parent.getAttribute(name);
+
+      if (parentAttr.hasValue(true)) {
+        return parentAttr.getValue('0');
+      }
+
+      current = current.parent;
+    }
+
+    return null;
+  }
+
+}
+
+class TSpanElement extends TextElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, new.target === TSpanElement ? true : captureTextNodes);
+    this.type = 'tspan'; // if this node has children, then they own the text
+
+    this.text = this.children.length > 0 ? '' : this.getTextFromNode();
+  }
+
+  getText() {
+    return this.text;
+  }
+
+}
+
+class TextNode extends TSpanElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'textNode';
+  }
+
+}
+
+class SVGElement extends RenderedElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'svg';
+    this.root = false;
+  }
+
+  setContext(ctx) {
+    var _this$node$parentNode;
+
+    var {
+      document
+    } = this;
+    var {
+      screen,
+      window
+    } = document;
+    var canvas = ctx.canvas;
+    screen.setDefaults(ctx);
+
+    if (canvas.style && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {
+      ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
+      var fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
+
+      if (fontSizeProp.hasValue()) {
+        document.rootEmSize = fontSizeProp.getPixels('y');
+        document.emSize = document.rootEmSize;
+      }
+    } // create new view port
+
+
+    if (!this.getAttribute('x').hasValue()) {
+      this.getAttribute('x', true).setValue(0);
+    }
+
+    if (!this.getAttribute('y').hasValue()) {
+      this.getAttribute('y', true).setValue(0);
+    }
+
+    var {
+      width,
+      height
+    } = screen.viewPort;
+
+    if (!this.getStyle('width').hasValue()) {
+      this.getStyle('width', true).setValue('100%');
+    }
+
+    if (!this.getStyle('height').hasValue()) {
+      this.getStyle('height', true).setValue('100%');
+    }
+
+    if (!this.getStyle('color').hasValue()) {
+      this.getStyle('color', true).setValue('black');
+    }
+
+    var refXAttr = this.getAttribute('refX');
+    var refYAttr = this.getAttribute('refY');
+    var viewBoxAttr = this.getAttribute('viewBox');
+    var viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;
+    var clip = !this.root && this.getStyle('overflow').getValue('hidden') !== 'visible';
+    var minX = 0;
+    var minY = 0;
+    var clipX = 0;
+    var clipY = 0;
+
+    if (viewBox) {
+      minX = viewBox[0];
+      minY = viewBox[1];
+    }
+
+    if (!this.root) {
+      width = this.getStyle('width').getPixels('x');
+      height = this.getStyle('height').getPixels('y');
+
+      if (this.type === 'marker') {
+        clipX = minX;
+        clipY = minY;
+        minX = 0;
+        minY = 0;
+      }
+    }
+
+    screen.viewPort.setCurrent(width, height); // Default value of transform-origin is center only for root SVG elements
+    // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin
+
+    if (this.node // is not temporary SVGElement
+    && (!this.parent || ((_this$node$parentNode = this.node.parentNode) === null || _this$node$parentNode === void 0 ? void 0 : _this$node$parentNode.nodeName) === 'foreignObject') && this.getStyle('transform', false, true).hasValue() && !this.getStyle('transform-origin', false, true).hasValue()) {
+      this.getStyle('transform-origin', true, true).setValue('50% 50%');
+    }
+
+    super.setContext(ctx);
+    ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
+
+    if (viewBox) {
+      width = viewBox[2];
+      height = viewBox[3];
+    }
+
+    document.setViewBox({
+      ctx,
+      aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
+      width: screen.viewPort.width,
+      desiredWidth: width,
+      height: screen.viewPort.height,
+      desiredHeight: height,
+      minX,
+      minY,
+      refX: refXAttr.getValue(),
+      refY: refYAttr.getValue(),
+      clip,
+      clipX,
+      clipY
+    });
+
+    if (viewBox) {
+      screen.viewPort.removeCurrent();
+      screen.viewPort.setCurrent(width, height);
+    }
+  }
+
+  clearContext(ctx) {
+    super.clearContext(ctx);
+    this.document.screen.viewPort.removeCurrent();
+  }
+  /**
+   * Resize SVG to fit in given size.
+   * @param width
+   * @param height
+   * @param preserveAspectRatio
+   */
+
+
+  resize(width) {
+    var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
+    var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+    var widthAttr = this.getAttribute('width', true);
+    var heightAttr = this.getAttribute('height', true);
+    var viewBoxAttr = this.getAttribute('viewBox');
+    var styleAttr = this.getAttribute('style');
+    var originWidth = widthAttr.getNumber(0);
+    var originHeight = heightAttr.getNumber(0);
+
+    if (preserveAspectRatio) {
+      if (typeof preserveAspectRatio === 'string') {
+        this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
+      } else {
+        var preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
+
+        if (preserveAspectRatioAttr.hasValue()) {
+          preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
+        }
+      }
+    }
+
+    widthAttr.setValue(width);
+    heightAttr.setValue(height);
+
+    if (!viewBoxAttr.hasValue()) {
+      viewBoxAttr.setValue("0 0 ".concat(originWidth || width, " ").concat(originHeight || height));
+    }
+
+    if (styleAttr.hasValue()) {
+      var widthStyle = this.getStyle('width');
+      var heightStyle = this.getStyle('height');
+
+      if (widthStyle.hasValue()) {
+        widthStyle.setValue("".concat(width, "px"));
+      }
+
+      if (heightStyle.hasValue()) {
+        heightStyle.setValue("".concat(height, "px"));
+      }
+    }
+  }
+
+}
+
+class RectElement extends PathElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'rect';
+  }
+
+  path(ctx) {
+    var x = this.getAttribute('x').getPixels('x');
+    var y = this.getAttribute('y').getPixels('y');
+    var width = this.getStyle('width', false, true).getPixels('x');
+    var height = this.getStyle('height', false, true).getPixels('y');
+    var rxAttr = this.getAttribute('rx');
+    var ryAttr = this.getAttribute('ry');
+    var rx = rxAttr.getPixels('x');
+    var ry = ryAttr.getPixels('y');
+
+    if (rxAttr.hasValue() && !ryAttr.hasValue()) {
+      ry = rx;
+    }
+
+    if (ryAttr.hasValue() && !rxAttr.hasValue()) {
+      rx = ry;
+    }
+
+    rx = Math.min(rx, width / 2.0);
+    ry = Math.min(ry, height / 2.0);
+
+    if (ctx) {
+      var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+      ctx.beginPath(); // always start the path so we don't fill prior paths
+
+      if (height > 0 && width > 0) {
+        ctx.moveTo(x + rx, y);
+        ctx.lineTo(x + width - rx, y);
+        ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);
+        ctx.lineTo(x + width, y + height - ry);
+        ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);
+        ctx.lineTo(x + rx, y + height);
+        ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);
+        ctx.lineTo(x, y + ry);
+        ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);
+        ctx.closePath();
+      }
+    }
+
+    return new BoundingBox(x, y, x + width, y + height);
+  }
+
+  getMarkers() {
+    return null;
+  }
+
+}
+
+class CircleElement extends PathElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'circle';
+  }
+
+  path(ctx) {
+    var cx = this.getAttribute('cx').getPixels('x');
+    var cy = this.getAttribute('cy').getPixels('y');
+    var r = this.getAttribute('r').getPixels();
+
+    if (ctx && r > 0) {
+      ctx.beginPath();
+      ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
+      ctx.closePath();
+    }
+
+    return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
+  }
+
+  getMarkers() {
+    return null;
+  }
+
+}
+
+class EllipseElement extends PathElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'ellipse';
+  }
+
+  path(ctx) {
+    var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+    var rx = this.getAttribute('rx').getPixels('x');
+    var ry = this.getAttribute('ry').getPixels('y');
+    var cx = this.getAttribute('cx').getPixels('x');
+    var cy = this.getAttribute('cy').getPixels('y');
+
+    if (ctx && rx > 0 && ry > 0) {
+      ctx.beginPath();
+      ctx.moveTo(cx + rx, cy);
+      ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);
+      ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);
+      ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);
+      ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);
+      ctx.closePath();
+    }
+
+    return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
+  }
+
+  getMarkers() {
+    return null;
+  }
+
+}
+
+class LineElement extends PathElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'line';
+  }
+
+  getPoints() {
+    return [new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')), new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))];
+  }
+
+  path(ctx) {
+    var [{
+      x: x0,
+      y: y0
+    }, {
+      x: x1,
+      y: y1
+    }] = this.getPoints();
+
+    if (ctx) {
+      ctx.beginPath();
+      ctx.moveTo(x0, y0);
+      ctx.lineTo(x1, y1);
+    }
+
+    return new BoundingBox(x0, y0, x1, y1);
+  }
+
+  getMarkers() {
+    var [p0, p1] = this.getPoints();
+    var a = p0.angleTo(p1);
+    return [[p0, a], [p1, a]];
+  }
+
+}
+
+class PolylineElement extends PathElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'polyline';
+    this.points = [];
+    this.points = Point.parsePath(this.getAttribute('points').getString());
+  }
+
+  path(ctx) {
+    var {
+      points
+    } = this;
+    var [{
+      x: x0,
+      y: y0
+    }] = points;
+    var boundingBox = new BoundingBox(x0, y0);
+
+    if (ctx) {
+      ctx.beginPath();
+      ctx.moveTo(x0, y0);
+    }
+
+    points.forEach(_ref => {
+      var {
+        x,
+        y
+      } = _ref;
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+      }
+    });
+    return boundingBox;
+  }
+
+  getMarkers() {
+    var {
+      points
+    } = this;
+    var lastIndex = points.length - 1;
+    var markers = [];
+    points.forEach((point, i) => {
+      if (i === lastIndex) {
+        return;
+      }
+
+      markers.push([point, point.angleTo(points[i + 1])]);
+    });
+
+    if (markers.length > 0) {
+      markers.push([points[points.length - 1], markers[markers.length - 1][1]]);
+    }
+
+    return markers;
+  }
+
+}
+
+class PolygonElement extends PolylineElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'polygon';
+  }
+
+  path(ctx) {
+    var boundingBox = super.path(ctx);
+    var [{
+      x,
+      y
+    }] = this.points;
+
+    if (ctx) {
+      ctx.lineTo(x, y);
+      ctx.closePath();
+    }
+
+    return boundingBox;
+  }
+
+}
+
+class PatternElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'pattern';
+  }
+
+  createPattern(ctx, _, parentOpacityProp) {
+    var width = this.getStyle('width').getPixels('x', true);
+    var height = this.getStyle('height').getPixels('y', true); // render me using a temporary svg element
+
+    var patternSvg = new SVGElement(this.document, null);
+    patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
+    patternSvg.attributes.width = new Property(this.document, 'width', "".concat(width, "px"));
+    patternSvg.attributes.height = new Property(this.document, 'height', "".concat(height, "px"));
+    patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
+    patternSvg.children = this.children;
+    var patternCanvas = this.document.createCanvas(width, height);
+    var patternCtx = patternCanvas.getContext('2d');
+    var xAttr = this.getAttribute('x');
+    var yAttr = this.getAttribute('y');
+
+    if (xAttr.hasValue() && yAttr.hasValue()) {
+      patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
+    }
+
+    if (parentOpacityProp.hasValue()) {
+      this.styles['fill-opacity'] = parentOpacityProp;
+    } else {
+      Reflect.deleteProperty(this.styles, 'fill-opacity');
+    } // render 3x3 grid so when we transform there's no white space on edges
+
+
+    for (var x = -1; x <= 1; x++) {
+      for (var y = -1; y <= 1; y++) {
+        patternCtx.save();
+        patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
+        patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
+        patternSvg.render(patternCtx);
+        patternCtx.restore();
+      }
+    }
+
+    var pattern = ctx.createPattern(patternCanvas, 'repeat');
+    return pattern;
+  }
+
+}
+
+class MarkerElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'marker';
+  }
+
+  render(ctx, point, angle) {
+    if (!point) {
+      return;
+    }
+
+    var {
+      x,
+      y
+    } = point;
+    var orient = this.getAttribute('orient').getString('auto');
+    var markerUnits = this.getAttribute('markerUnits').getString('strokeWidth');
+    ctx.translate(x, y);
+
+    if (orient === 'auto') {
+      ctx.rotate(angle);
+    }
+
+    if (markerUnits === 'strokeWidth') {
+      ctx.scale(ctx.lineWidth, ctx.lineWidth);
+    }
+
+    ctx.save(); // render me using a temporary svg element
+
+    var markerSvg = new SVGElement(this.document, null);
+    markerSvg.type = this.type;
+    markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
+    markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
+    markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
+    markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
+    markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
+    markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
+    markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
+    markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
+    markerSvg.children = this.children;
+    markerSvg.render(ctx);
+    ctx.restore();
+
+    if (markerUnits === 'strokeWidth') {
+      ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
+    }
+
+    if (orient === 'auto') {
+      ctx.rotate(-angle);
+    }
+
+    ctx.translate(-x, -y);
+  }
+
+}
+
+class DefsElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'defs';
+  }
+
+  render() {// NOOP
+  }
+
+}
+
+class GElement extends RenderedElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'g';
+  }
+
+  getBoundingBox(ctx) {
+    var boundingBox = new BoundingBox();
+    this.children.forEach(child => {
+      boundingBox.addBoundingBox(child.getBoundingBox(ctx));
+    });
+    return boundingBox;
+  }
+
+}
+
+class GradientElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.attributesToInherit = ['gradientUnits'];
+    this.stops = [];
+    var {
+      stops,
+      children
+    } = this;
+    children.forEach(child => {
+      if (child.type === 'stop') {
+        stops.push(child);
+      }
+    });
+  }
+
+  getGradientUnits() {
+    return this.getAttribute('gradientUnits').getString('objectBoundingBox');
+  }
+
+  createGradient(ctx, element, parentOpacityProp) {
+    // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
+    var stopsContainer = this;
+
+    if (this.getHrefAttribute().hasValue()) {
+      stopsContainer = this.getHrefAttribute().getDefinition();
+      this.inheritStopContainer(stopsContainer);
+    }
+
+    var {
+      stops
+    } = stopsContainer;
+    var gradient = this.getGradient(ctx, element);
+
+    if (!gradient) {
+      return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
+    }
+
+    stops.forEach(stop => {
+      gradient.addColorStop(stop.offset, this.addParentOpacity(parentOpacityProp, stop.color));
+    });
+
+    if (this.getAttribute('gradientTransform').hasValue()) {
+      // render as transformed pattern on temporary canvas
+      var {
+        document
+      } = this;
+      var {
+        MAX_VIRTUAL_PIXELS,
+        viewPort
+      } = document.screen;
+      var [rootView] = viewPort.viewPorts;
+      var rect = new RectElement(document, null);
+      rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
+      rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
+      rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
+      rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
+      var group = new GElement(document, null);
+      group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
+      group.children = [rect];
+      var patternSvg = new SVGElement(document, null);
+      patternSvg.attributes.x = new Property(document, 'x', 0);
+      patternSvg.attributes.y = new Property(document, 'y', 0);
+      patternSvg.attributes.width = new Property(document, 'width', rootView.width);
+      patternSvg.attributes.height = new Property(document, 'height', rootView.height);
+      patternSvg.children = [group];
+      var patternCanvas = document.createCanvas(rootView.width, rootView.height);
+      var patternCtx = patternCanvas.getContext('2d');
+      patternCtx.fillStyle = gradient;
+      patternSvg.render(patternCtx);
+      return patternCtx.createPattern(patternCanvas, 'no-repeat');
+    }
+
+    return gradient;
+  }
+
+  inheritStopContainer(stopsContainer) {
+    this.attributesToInherit.forEach(attributeToInherit => {
+      if (!this.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
+        this.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
+      }
+    });
+  }
+
+  addParentOpacity(parentOpacityProp, color) {
+    if (parentOpacityProp.hasValue()) {
+      var colorProp = new Property(this.document, 'color', color);
+      return colorProp.addOpacity(parentOpacityProp).getColor();
+    }
+
+    return color;
+  }
+
+}
+
+class LinearGradientElement extends GradientElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'linearGradient';
+    this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
+  }
+
+  getGradient(ctx, element) {
+    var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
+    var boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;
+
+    if (isBoundingBoxUnits && !boundingBox) {
+      return null;
+    }
+
+    if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {
+      this.getAttribute('x1', true).setValue(0);
+      this.getAttribute('y1', true).setValue(0);
+      this.getAttribute('x2', true).setValue(1);
+      this.getAttribute('y2', true).setValue(0);
+    }
+
+    var x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');
+    var y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');
+    var x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');
+    var y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');
+
+    if (x1 === x2 && y1 === y2) {
+      return null;
+    }
+
+    return ctx.createLinearGradient(x1, y1, x2, y2);
+  }
+
+}
+
+class RadialGradientElement extends GradientElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'radialGradient';
+    this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
+  }
+
+  getGradient(ctx, element) {
+    var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
+    var boundingBox = element.getBoundingBox(ctx);
+
+    if (isBoundingBoxUnits && !boundingBox) {
+      return null;
+    }
+
+    if (!this.getAttribute('cx').hasValue()) {
+      this.getAttribute('cx', true).setValue('50%');
+    }
+
+    if (!this.getAttribute('cy').hasValue()) {
+      this.getAttribute('cy', true).setValue('50%');
+    }
+
+    if (!this.getAttribute('r').hasValue()) {
+      this.getAttribute('r', true).setValue('50%');
+    }
+
+    var cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');
+    var cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');
+    var fx = cx;
+    var fy = cy;
+
+    if (this.getAttribute('fx').hasValue()) {
+      fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');
+    }
+
+    if (this.getAttribute('fy').hasValue()) {
+      fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');
+    }
+
+    var r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();
+    var fr = this.getAttribute('fr').getPixels();
+    return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
+  }
+
+}
+
+class StopElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'stop';
+    var offset = Math.max(0, Math.min(1, this.getAttribute('offset').getNumber()));
+    var stopOpacity = this.getStyle('stop-opacity');
+    var stopColor = this.getStyle('stop-color', true);
+
+    if (stopColor.getString() === '') {
+      stopColor.setValue('#000');
+    }
+
+    if (stopOpacity.hasValue()) {
+      stopColor = stopColor.addOpacity(stopOpacity);
+    }
+
+    this.offset = offset;
+    this.color = stopColor.getColor();
+  }
+
+}
+
+class AnimateElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'animate';
+    this.duration = 0;
+    this.initialValue = null;
+    this.initialUnits = '';
+    this.removed = false;
+    this.frozen = false;
+    document.screen.animations.push(this);
+    this.begin = this.getAttribute('begin').getMilliseconds();
+    this.maxDuration = this.begin + this.getAttribute('dur').getMilliseconds();
+    this.from = this.getAttribute('from');
+    this.to = this.getAttribute('to');
+    this.values = new Property(document, 'values', null);
+    var valuesAttr = this.getAttribute('values');
+
+    if (valuesAttr.hasValue()) {
+      this.values.setValue(valuesAttr.getString().split(';'));
+    }
+  }
+
+  getProperty() {
+    var attributeType = this.getAttribute('attributeType').getString();
+    var attributeName = this.getAttribute('attributeName').getString();
+
+    if (attributeType === 'CSS') {
+      return this.parent.getStyle(attributeName, true);
+    }
+
+    return this.parent.getAttribute(attributeName, true);
+  }
+
+  calcValue() {
+    var {
+      initialUnits
+    } = this;
+    var {
+      progress,
+      from,
+      to
+    } = this.getProgress(); // tween value linearly
+
+    var newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
+
+    if (initialUnits === '%') {
+      newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
+    }
+
+    return "".concat(newValue).concat(initialUnits);
+  }
+
+  update(delta) {
+    var {
+      parent
+    } = this;
+    var prop = this.getProperty(); // set initial value
+
+    if (!this.initialValue) {
+      this.initialValue = prop.getString();
+      this.initialUnits = prop.getUnits();
+    } // if we're past the end time
+
+
+    if (this.duration > this.maxDuration) {
+      var fill = this.getAttribute('fill').getString('remove'); // loop for indefinitely repeating animations
+
+      if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {
+        this.duration = 0;
+      } else if (fill === 'freeze' && !this.frozen) {
+        this.frozen = true;
+        parent.animationFrozen = true;
+        parent.animationFrozenValue = prop.getString();
+      } else if (fill === 'remove' && !this.removed) {
+        this.removed = true;
+        prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);
+        return true;
+      }
+
+      return false;
+    }
+
+    this.duration += delta; // if we're past the begin time
+
+    var updated = false;
+
+    if (this.begin < this.duration) {
+      var newValue = this.calcValue(); // tween
+
+      var typeAttr = this.getAttribute('type');
+
+      if (typeAttr.hasValue()) {
+        // for transform, etc.
+        var type = typeAttr.getString();
+        newValue = "".concat(type, "(").concat(newValue, ")");
+      }
+
+      prop.setValue(newValue);
+      updated = true;
+    }
+
+    return updated;
+  }
+
+  getProgress() {
+    var {
+      document,
+      values
+    } = this;
+    var result = {
+      progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
+    };
+
+    if (values.hasValue()) {
+      var p = result.progress * (values.getValue().length - 1);
+      var lb = Math.floor(p);
+      var ub = Math.ceil(p);
+      result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
+      result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
+      result.progress = (p - lb) / (ub - lb);
+    } else {
+      result.from = this.from;
+      result.to = this.to;
+    }
+
+    return result;
+  }
+
+}
+
+class AnimateColorElement extends AnimateElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'animateColor';
+  }
+
+  calcValue() {
+    var {
+      progress,
+      from,
+      to
+    } = this.getProgress();
+    var colorFrom = new RGBColor(from.getColor());
+    var colorTo = new RGBColor(to.getColor());
+
+    if (colorFrom.ok && colorTo.ok) {
+      // tween color linearly
+      var r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
+      var g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
+      var b = colorFrom.b + (colorTo.b - colorFrom.b) * progress; // ? alpha
+
+      return "rgb(".concat(Math.floor(r), ", ").concat(Math.floor(g), ", ").concat(Math.floor(b), ")");
+    }
+
+    return this.getAttribute('from').getColor();
+  }
+
+}
+
+class AnimateTransformElement extends AnimateElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'animateTransform';
+  }
+
+  calcValue() {
+    var {
+      progress,
+      from,
+      to
+    } = this.getProgress(); // tween value linearly
+
+    var transformFrom = toNumbers(from.getString());
+    var transformTo = toNumbers(to.getString());
+    var newValue = transformFrom.map((from, i) => {
+      var to = transformTo[i];
+      return from + (to - from) * progress;
+    }).join(' ');
+    return newValue;
+  }
+
+}
+
+class FontElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'font';
+    this.glyphs = {};
+    this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();
+    var {
+      definitions
+    } = document;
+    var {
+      children
+    } = this;
+
+    for (var child of children) {
+      switch (child.type) {
+        case 'font-face':
+          {
+            this.fontFace = child;
+            var fontFamilyStyle = child.getStyle('font-family');
+
+            if (fontFamilyStyle.hasValue()) {
+              definitions[fontFamilyStyle.getString()] = this;
+            }
+
+            break;
+          }
+
+        case 'missing-glyph':
+          this.missingGlyph = child;
+          break;
+
+        case 'glyph':
+          {
+            var glyph = child;
+
+            if (glyph.arabicForm) {
+              this.isRTL = true;
+              this.isArabic = true;
+
+              if (typeof this.glyphs[glyph.unicode] === 'undefined') {
+                this.glyphs[glyph.unicode] = {};
+              }
+
+              this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
+            } else {
+              this.glyphs[glyph.unicode] = glyph;
+            }
+
+            break;
+          }
+      }
+    }
+  }
+
+  render() {// NO RENDER
+  }
+
+}
+
+class FontFaceElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'font-face';
+    this.ascent = this.getAttribute('ascent').getNumber();
+    this.descent = this.getAttribute('descent').getNumber();
+    this.unitsPerEm = this.getAttribute('units-per-em').getNumber();
+  }
+
+}
+
+class MissingGlyphElement extends PathElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'missing-glyph';
+    this.horizAdvX = 0;
+  }
+
+}
+
+class TRefElement extends TextElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'tref';
+  }
+
+  getText() {
+    var element = this.getHrefAttribute().getDefinition();
+
+    if (element) {
+      var firstChild = element.children[0];
+
+      if (firstChild) {
+        return firstChild.getText();
+      }
+    }
+
+    return '';
+  }
+
+}
+
+class AElement extends TextElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'a';
+    var {
+      childNodes
+    } = node;
+    var firstChild = childNodes[0];
+    var hasText = childNodes.length > 0 && Array.from(childNodes).every(node => node.nodeType === 3);
+    this.hasText = hasText;
+    this.text = hasText ? this.getTextFromNode(firstChild) : '';
+  }
+
+  getText() {
+    return this.text;
+  }
+
+  renderChildren(ctx) {
+    if (this.hasText) {
+      // render as text element
+      super.renderChildren(ctx);
+      var {
+        document,
+        x,
+        y
+      } = this;
+      var {
+        mouse
+      } = document.screen;
+      var fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize); // Do not calc bounding box if mouse is not working.
+
+      if (mouse.isWorking()) {
+        mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
+      }
+    } else if (this.children.length > 0) {
+      // render as temporary group
+      var g = new GElement(this.document, null);
+      g.children = this.children;
+      g.parent = this;
+      g.render(ctx);
+    }
+  }
+
+  onClick() {
+    var {
+      window
+    } = this.document;
+
+    if (window) {
+      window.open(this.getHrefAttribute().getString());
+    }
+  }
+
+  onMouseMove() {
+    var ctx = this.document.ctx;
+    ctx.canvas.style.cursor = 'pointer';
+  }
+
+}
+
+function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+class TextPathElement extends TextElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'textPath';
+    this.textWidth = 0;
+    this.textHeight = 0;
+    this.pathLength = -1;
+    this.glyphInfo = null;
+    this.letterSpacingCache = [];
+    this.measuresCache = new Map([['', 0]]);
+    var pathElement = this.getHrefAttribute().getDefinition();
+    this.text = this.getTextFromNode();
+    this.dataArray = this.parsePathData(pathElement);
+  }
+
+  getText() {
+    return this.text;
+  }
+
+  path(ctx) {
+    var {
+      dataArray
+    } = this;
+
+    if (ctx) {
+      ctx.beginPath();
+    }
+
+    dataArray.forEach(_ref => {
+      var {
+        type,
+        points
+      } = _ref;
+
+      switch (type) {
+        case PathParser.LINE_TO:
+          if (ctx) {
+            ctx.lineTo(points[0], points[1]);
+          }
+
+          break;
+
+        case PathParser.MOVE_TO:
+          if (ctx) {
+            ctx.moveTo(points[0], points[1]);
+          }
+
+          break;
+
+        case PathParser.CURVE_TO:
+          if (ctx) {
+            ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
+          }
+
+          break;
+
+        case PathParser.QUAD_TO:
+          if (ctx) {
+            ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
+          }
+
+          break;
+
+        case PathParser.ARC:
+          {
+            var [cx, cy, rx, ry, theta, dTheta, psi, fs] = points;
+            var r = rx > ry ? rx : ry;
+            var scaleX = rx > ry ? 1 : rx / ry;
+            var scaleY = rx > ry ? ry / rx : 1;
+
+            if (ctx) {
+              ctx.translate(cx, cy);
+              ctx.rotate(psi);
+              ctx.scale(scaleX, scaleY);
+              ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
+              ctx.scale(1 / scaleX, 1 / scaleY);
+              ctx.rotate(-psi);
+              ctx.translate(-cx, -cy);
+            }
+
+            break;
+          }
+
+        case PathParser.CLOSE_PATH:
+          if (ctx) {
+            ctx.closePath();
+          }
+
+          break;
+      }
+    });
+  }
+
+  renderChildren(ctx) {
+    this.setTextData(ctx);
+    ctx.save();
+    var textDecoration = this.parent.getStyle('text-decoration').getString();
+    var fontSize = this.getFontSize();
+    var {
+      glyphInfo
+    } = this;
+    var fill = ctx.fillStyle;
+
+    if (textDecoration === 'underline') {
+      ctx.beginPath();
+    }
+
+    glyphInfo.forEach((glyph, i) => {
+      var {
+        p0,
+        p1,
+        rotation,
+        text: partialText
+      } = glyph;
+      ctx.save();
+      ctx.translate(p0.x, p0.y);
+      ctx.rotate(rotation);
+
+      if (ctx.fillStyle) {
+        ctx.fillText(partialText, 0, 0);
+      }
+
+      if (ctx.strokeStyle) {
+        ctx.strokeText(partialText, 0, 0);
+      }
+
+      ctx.restore();
+
+      if (textDecoration === 'underline') {
+        if (i === 0) {
+          ctx.moveTo(p0.x, p0.y + fontSize / 8);
+        }
+
+        ctx.lineTo(p1.x, p1.y + fontSize / 5);
+      } // // To assist with debugging visually, uncomment following
+      //
+      // ctx.beginPath();
+      // if (i % 2)
+      // 	ctx.strokeStyle = 'red';
+      // else
+      // 	ctx.strokeStyle = 'green';
+      // ctx.moveTo(p0.x, p0.y);
+      // ctx.lineTo(p1.x, p1.y);
+      // ctx.stroke();
+      // ctx.closePath();
+
+    });
+
+    if (textDecoration === 'underline') {
+      ctx.lineWidth = fontSize / 20;
+      ctx.strokeStyle = fill;
+      ctx.stroke();
+      ctx.closePath();
+    }
+
+    ctx.restore();
+  }
+
+  getLetterSpacingAt() {
+    var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
+    return this.letterSpacingCache[idx] || 0;
+  }
+
+  findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, dy, c, charI) {
+    var offset = inputOffset;
+    var glyphWidth = this.measureText(ctx, c);
+
+    if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {
+      glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
+    }
+
+    if (charI > -1) {
+      offset += this.getLetterSpacingAt(charI);
+    }
+
+    var splineStep = this.textHeight / 20;
+    var p0 = this.getEquidistantPointOnPath(offset, splineStep, 0);
+    var p1 = this.getEquidistantPointOnPath(offset + glyphWidth, splineStep, 0);
+    var segment = {
+      p0,
+      p1
+    };
+    var rotation = p0 && p1 ? Math.atan2(p1.y - p0.y, p1.x - p0.x) : 0;
+
+    if (dy) {
+      var dyX = Math.cos(Math.PI / 2 + rotation) * dy;
+      var dyY = Math.cos(-rotation) * dy;
+      segment.p0 = _objectSpread$2(_objectSpread$2({}, p0), {}, {
+        x: p0.x + dyX,
+        y: p0.y + dyY
+      });
+      segment.p1 = _objectSpread$2(_objectSpread$2({}, p1), {}, {
+        x: p1.x + dyX,
+        y: p1.y + dyY
+      });
+    }
+
+    offset += glyphWidth;
+    return {
+      offset,
+      segment,
+      rotation
+    };
+  }
+
+  measureText(ctx, text) {
+    var {
+      measuresCache
+    } = this;
+    var targetText = text || this.getText();
+
+    if (measuresCache.has(targetText)) {
+      return measuresCache.get(targetText);
+    }
+
+    var measure = this.measureTargetText(ctx, targetText);
+    measuresCache.set(targetText, measure);
+    return measure;
+  } // This method supposes what all custom fonts already loaded.
+  // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
+  // You need to call this method manually to update glyphs cache.
+
+
+  setTextData(ctx) {
+    if (this.glyphInfo) {
+      return;
+    }
+
+    var renderText = this.getText();
+    var chars = renderText.split('');
+    var spacesNumber = renderText.split(' ').length - 1;
+    var dx = this.parent.getAttribute('dx').split().map(_ => _.getPixels('x'));
+    var dy = this.parent.getAttribute('dy').getPixels('y');
+    var anchor = this.parent.getStyle('text-anchor').getString('start');
+    var thisSpacing = this.getStyle('letter-spacing');
+    var parentSpacing = this.parent.getStyle('letter-spacing');
+    var letterSpacing = 0;
+
+    if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {
+      letterSpacing = parentSpacing.getPixels();
+    } else if (thisSpacing.hasValue()) {
+      if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {
+        letterSpacing = thisSpacing.getPixels();
+      }
+    } // fill letter-spacing cache
+
+
+    var letterSpacingCache = [];
+    var textLen = renderText.length;
+    this.letterSpacingCache = letterSpacingCache;
+
+    for (var i = 0; i < textLen; i++) {
+      letterSpacingCache.push(typeof dx[i] !== 'undefined' ? dx[i] : letterSpacing);
+    }
+
+    var dxSum = letterSpacingCache.reduce((acc, cur, i) => i === 0 ? 0 : acc + cur || 0, 0);
+    var textWidth = this.measureText(ctx);
+    var textFullWidth = Math.max(textWidth + dxSum, 0);
+    this.textWidth = textWidth;
+    this.textHeight = this.getFontSize();
+    this.glyphInfo = [];
+    var fullPathWidth = this.getPathLength();
+    var startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
+    var offset = 0;
+
+    if (anchor === 'middle' || anchor === 'center') {
+      offset = -textFullWidth / 2;
+    }
+
+    if (anchor === 'end' || anchor === 'right') {
+      offset = -textFullWidth;
+    }
+
+    offset += startOffset;
+    chars.forEach((char, i) => {
+      // Find such segment what distance between p0 and p1 is approx. width of glyph
+      var {
+        offset: nextOffset,
+        segment,
+        rotation
+      } = this.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, dy, char, i);
+      offset = nextOffset;
+
+      if (!segment.p0 || !segment.p1) {
+        return;
+      } // const width = this.getLineLength(
+      // 	segment.p0.x,
+      // 	segment.p0.y,
+      // 	segment.p1.x,
+      // 	segment.p1.y
+      // );
+      // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.
+      // Can foresee having a rough pair table built in that the developer can override as needed.
+      // Or use "dx" attribute of the <text> node as a naive replacement
+      // const kern = 0;
+      // placeholder for future implementation
+      // const midpoint = this.getPointOnLine(
+      // 	kern + width / 2.0,
+      // 	segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y
+      // );
+
+
+      this.glyphInfo.push({
+        // transposeX: midpoint.x,
+        // transposeY: midpoint.y,
+        text: chars[i],
+        p0: segment.p0,
+        p1: segment.p1,
+        rotation
+      });
+    });
+  }
+
+  parsePathData(path) {
+    this.pathLength = -1; // reset path length
+
+    if (!path) {
+      return [];
+    }
+
+    var pathCommands = [];
+    var {
+      pathParser
+    } = path;
+    pathParser.reset(); // convert l, H, h, V, and v to L
+
+    while (!pathParser.isEnd()) {
+      var {
+        current
+      } = pathParser;
+      var startX = current ? current.x : 0;
+      var startY = current ? current.y : 0;
+      var command = pathParser.next();
+      var nextCommandType = command.type;
+      var points = [];
+
+      switch (command.type) {
+        case PathParser.MOVE_TO:
+          this.pathM(pathParser, points);
+          break;
+
+        case PathParser.LINE_TO:
+          nextCommandType = this.pathL(pathParser, points);
+          break;
+
+        case PathParser.HORIZ_LINE_TO:
+          nextCommandType = this.pathH(pathParser, points);
+          break;
+
+        case PathParser.VERT_LINE_TO:
+          nextCommandType = this.pathV(pathParser, points);
+          break;
+
+        case PathParser.CURVE_TO:
+          this.pathC(pathParser, points);
+          break;
+
+        case PathParser.SMOOTH_CURVE_TO:
+          nextCommandType = this.pathS(pathParser, points);
+          break;
+
+        case PathParser.QUAD_TO:
+          this.pathQ(pathParser, points);
+          break;
+
+        case PathParser.SMOOTH_QUAD_TO:
+          nextCommandType = this.pathT(pathParser, points);
+          break;
+
+        case PathParser.ARC:
+          points = this.pathA(pathParser);
+          break;
+
+        case PathParser.CLOSE_PATH:
+          PathElement.pathZ(pathParser);
+          break;
+      }
+
+      if (command.type !== PathParser.CLOSE_PATH) {
+        pathCommands.push({
+          type: nextCommandType,
+          points,
+          start: {
+            x: startX,
+            y: startY
+          },
+          pathLength: this.calcLength(startX, startY, nextCommandType, points)
+        });
+      } else {
+        pathCommands.push({
+          type: PathParser.CLOSE_PATH,
+          points: [],
+          pathLength: 0
+        });
+      }
+    }
+
+    return pathCommands;
+  }
+
+  pathM(pathParser, points) {
+    var {
+      x,
+      y
+    } = PathElement.pathM(pathParser).point;
+    points.push(x, y);
+  }
+
+  pathL(pathParser, points) {
+    var {
+      x,
+      y
+    } = PathElement.pathL(pathParser).point;
+    points.push(x, y);
+    return PathParser.LINE_TO;
+  }
+
+  pathH(pathParser, points) {
+    var {
+      x,
+      y
+    } = PathElement.pathH(pathParser).point;
+    points.push(x, y);
+    return PathParser.LINE_TO;
+  }
+
+  pathV(pathParser, points) {
+    var {
+      x,
+      y
+    } = PathElement.pathV(pathParser).point;
+    points.push(x, y);
+    return PathParser.LINE_TO;
+  }
+
+  pathC(pathParser, points) {
+    var {
+      point,
+      controlPoint,
+      currentPoint
+    } = PathElement.pathC(pathParser);
+    points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+  }
+
+  pathS(pathParser, points) {
+    var {
+      point,
+      controlPoint,
+      currentPoint
+    } = PathElement.pathS(pathParser);
+    points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    return PathParser.CURVE_TO;
+  }
+
+  pathQ(pathParser, points) {
+    var {
+      controlPoint,
+      currentPoint
+    } = PathElement.pathQ(pathParser);
+    points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+  }
+
+  pathT(pathParser, points) {
+    var {
+      controlPoint,
+      currentPoint
+    } = PathElement.pathT(pathParser);
+    points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    return PathParser.QUAD_TO;
+  }
+
+  pathA(pathParser) {
+    var {
+      rX,
+      rY,
+      sweepFlag,
+      xAxisRotation,
+      centp,
+      a1,
+      ad
+    } = PathElement.pathA(pathParser);
+
+    if (sweepFlag === 0 && ad > 0) {
+      ad -= 2 * Math.PI;
+    }
+
+    if (sweepFlag === 1 && ad < 0) {
+      ad += 2 * Math.PI;
+    }
+
+    return [centp.x, centp.y, rX, rY, a1, ad, xAxisRotation, sweepFlag];
+  }
+
+  calcLength(x, y, commandType, points) {
+    var len = 0;
+    var p1 = null;
+    var p2 = null;
+    var t = 0;
+
+    switch (commandType) {
+      case PathParser.LINE_TO:
+        return this.getLineLength(x, y, points[0], points[1]);
+
+      case PathParser.CURVE_TO:
+        // Approximates by breaking curve into 100 line segments
+        len = 0.0;
+        p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
+
+        for (t = 0.01; t <= 1; t += 0.01) {
+          p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
+          len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+          p1 = p2;
+        }
+
+        return len;
+
+      case PathParser.QUAD_TO:
+        // Approximates by breaking curve into 100 line segments
+        len = 0.0;
+        p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
+
+        for (t = 0.01; t <= 1; t += 0.01) {
+          p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
+          len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+          p1 = p2;
+        }
+
+        return len;
+
+      case PathParser.ARC:
+        {
+          // Approximates by breaking curve into line segments
+          len = 0.0;
+          var start = points[4]; // 4 = theta
+
+          var dTheta = points[5]; // 5 = dTheta
+
+          var end = points[4] + dTheta;
+          var inc = Math.PI / 180.0; // 1 degree resolution
+
+          if (Math.abs(start - end) < inc) {
+            inc = Math.abs(start - end);
+          } // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
+
+
+          p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
+
+          if (dTheta < 0) {
+            // clockwise
+            for (t = start - inc; t > end; t -= inc) {
+              p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
+              len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+              p1 = p2;
+            }
+          } else {
+            // counter-clockwise
+            for (t = start + inc; t < end; t += inc) {
+              p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
+              len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+              p1 = p2;
+            }
+          }
+
+          p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
+          len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+          return len;
+        }
+    }
+
+    return 0;
+  }
+
+  getPointOnLine(dist, p1x, p1y, p2x, p2y) {
+    var fromX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : p1x;
+    var fromY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : p1y;
+    var m = (p2y - p1y) / (p2x - p1x + PSEUDO_ZERO);
+    var run = Math.sqrt(dist * dist / (1 + m * m));
+
+    if (p2x < p1x) {
+      run *= -1;
+    }
+
+    var rise = m * run;
+    var pt = null;
+
+    if (p2x === p1x) {
+      // vertical line
+      pt = {
+        x: fromX,
+        y: fromY + rise
+      };
+    } else if ((fromY - p1y) / (fromX - p1x + PSEUDO_ZERO) === m) {
+      pt = {
+        x: fromX + run,
+        y: fromY + rise
+      };
+    } else {
+      var ix = 0;
+      var iy = 0;
+      var len = this.getLineLength(p1x, p1y, p2x, p2y);
+
+      if (len < PSEUDO_ZERO) {
+        return null;
+      }
+
+      var u = (fromX - p1x) * (p2x - p1x) + (fromY - p1y) * (p2y - p1y);
+      u /= len * len;
+      ix = p1x + u * (p2x - p1x);
+      iy = p1y + u * (p2y - p1y);
+      var pRise = this.getLineLength(fromX, fromY, ix, iy);
+      var pRun = Math.sqrt(dist * dist - pRise * pRise);
+      run = Math.sqrt(pRun * pRun / (1 + m * m));
+
+      if (p2x < p1x) {
+        run *= -1;
+      }
+
+      rise = m * run;
+      pt = {
+        x: ix + run,
+        y: iy + rise
+      };
+    }
+
+    return pt;
+  }
+
+  getPointOnPath(distance) {
+    var fullLen = this.getPathLength();
+    var cumulativePathLength = 0;
+    var p = null;
+
+    if (distance < -0.00005 || distance - 0.00005 > fullLen) {
+      return null;
+    }
+
+    var {
+      dataArray
+    } = this;
+
+    for (var command of dataArray) {
+      if (command && (command.pathLength < 0.00005 || cumulativePathLength + command.pathLength + 0.00005 < distance)) {
+        cumulativePathLength += command.pathLength;
+        continue;
+      }
+
+      var delta = distance - cumulativePathLength;
+      var currentT = 0;
+
+      switch (command.type) {
+        case PathParser.LINE_TO:
+          p = this.getPointOnLine(delta, command.start.x, command.start.y, command.points[0], command.points[1], command.start.x, command.start.y);
+          break;
+
+        case PathParser.ARC:
+          {
+            var start = command.points[4]; // 4 = theta
+
+            var dTheta = command.points[5]; // 5 = dTheta
+
+            var end = command.points[4] + dTheta;
+            currentT = start + delta / command.pathLength * dTheta;
+
+            if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {
+              break;
+            }
+
+            p = this.getPointOnEllipticalArc(command.points[0], command.points[1], command.points[2], command.points[3], currentT, command.points[6]);
+            break;
+          }
+
+        case PathParser.CURVE_TO:
+          currentT = delta / command.pathLength;
+
+          if (currentT > 1) {
+            currentT = 1;
+          }
+
+          p = this.getPointOnCubicBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3], command.points[4], command.points[5]);
+          break;
+
+        case PathParser.QUAD_TO:
+          currentT = delta / command.pathLength;
+
+          if (currentT > 1) {
+            currentT = 1;
+          }
+
+          p = this.getPointOnQuadraticBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3]);
+          break;
+      }
+
+      if (p) {
+        return p;
+      }
+
+      break;
+    }
+
+    return null;
+  }
+
+  getLineLength(x1, y1, x2, y2) {
+    return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
+  }
+
+  getPathLength() {
+    if (this.pathLength === -1) {
+      this.pathLength = this.dataArray.reduce((length, command) => command.pathLength > 0 ? length + command.pathLength : length, 0);
+    }
+
+    return this.pathLength;
+  }
+
+  getPointOnCubicBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y) {
+    var x = p4x * CB1(pct) + p3x * CB2(pct) + p2x * CB3(pct) + p1x * CB4(pct);
+    var y = p4y * CB1(pct) + p3y * CB2(pct) + p2y * CB3(pct) + p1y * CB4(pct);
+    return {
+      x,
+      y
+    };
+  }
+
+  getPointOnQuadraticBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y) {
+    var x = p3x * QB1(pct) + p2x * QB2(pct) + p1x * QB3(pct);
+    var y = p3y * QB1(pct) + p2y * QB2(pct) + p1y * QB3(pct);
+    return {
+      x,
+      y
+    };
+  }
+
+  getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
+    var cosPsi = Math.cos(psi);
+    var sinPsi = Math.sin(psi);
+    var pt = {
+      x: rx * Math.cos(theta),
+      y: ry * Math.sin(theta)
+    };
+    return {
+      x: cx + (pt.x * cosPsi - pt.y * sinPsi),
+      y: cy + (pt.x * sinPsi + pt.y * cosPsi)
+    };
+  } // TODO need some optimisations. possibly build cache only for curved segments?
+
+
+  buildEquidistantCache(inputStep, inputPrecision) {
+    var fullLen = this.getPathLength();
+    var precision = inputPrecision || 0.25; // accuracy vs performance
+
+    var step = inputStep || fullLen / 100;
+
+    if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {
+      // Prepare cache
+      this.equidistantCache = {
+        step,
+        precision,
+        points: []
+      }; // Calculate points
+
+      var s = 0;
+
+      for (var l = 0; l <= fullLen; l += precision) {
+        var p0 = this.getPointOnPath(l);
+        var p1 = this.getPointOnPath(l + precision);
+
+        if (!p0 || !p1) {
+          continue;
+        }
+
+        s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
+
+        if (s >= step) {
+          this.equidistantCache.points.push({
+            x: p0.x,
+            y: p0.y,
+            distance: l
+          });
+          s -= step;
+        }
+      }
+    }
+  }
+
+  getEquidistantPointOnPath(targetDistance, step, precision) {
+    this.buildEquidistantCache(step, precision);
+
+    if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {
+      return null;
+    }
+
+    var idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));
+    return this.equidistantCache.points[idx] || null;
+  }
+
+}
+
+var dataUriRegex = /^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;
+class ImageElement extends RenderedElement {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'image';
+    this.loaded = false;
+    var href = this.getHrefAttribute().getString();
+
+    if (!href) {
+      return;
+    }
+
+    var isSvg = href.endsWith('.svg') || /^\s*data:image\/svg\+xml/i.test(href);
+    document.images.push(this);
+
+    if (!isSvg) {
+      void this.loadImage(href);
+    } else {
+      void this.loadSvg(href);
+    }
+
+    this.isSvg = isSvg;
+  }
+
+  loadImage(href) {
+    var _this = this;
+
+    return _asyncToGenerator(function* () {
+      try {
+        var image = yield _this.document.createImage(href);
+        _this.image = image;
+      } catch (err) {
+        console.error("Error while loading image \"".concat(href, "\":"), err);
+      }
+
+      _this.loaded = true;
+    })();
+  }
+
+  loadSvg(href) {
+    var _this2 = this;
+
+    return _asyncToGenerator(function* () {
+      var match = dataUriRegex.exec(href);
+
+      if (match) {
+        var data = match[5];
+
+        if (match[4] === 'base64') {
+          _this2.image = atob(data);
+        } else {
+          _this2.image = decodeURIComponent(data);
+        }
+      } else {
+        try {
+          var response = yield _this2.document.fetch(href);
+          var svg = yield response.text();
+          _this2.image = svg;
+        } catch (err) {
+          console.error("Error while loading image \"".concat(href, "\":"), err);
+        }
+      }
+
+      _this2.loaded = true;
+    })();
+  }
+
+  renderChildren(ctx) {
+    var {
+      document,
+      image,
+      loaded
+    } = this;
+    var x = this.getAttribute('x').getPixels('x');
+    var y = this.getAttribute('y').getPixels('y');
+    var width = this.getStyle('width').getPixels('x');
+    var height = this.getStyle('height').getPixels('y');
+
+    if (!loaded || !image || !width || !height) {
+      return;
+    }
+
+    ctx.save();
+    ctx.translate(x, y);
+
+    if (this.isSvg) {
+      var subDocument = document.canvg.forkString(ctx, this.image, {
+        ignoreMouse: true,
+        ignoreAnimation: true,
+        ignoreDimensions: true,
+        ignoreClear: true,
+        offsetX: 0,
+        offsetY: 0,
+        scaleWidth: width,
+        scaleHeight: height
+      });
+      subDocument.document.documentElement.parent = this;
+      void subDocument.render();
+    } else {
+      var _image = this.image;
+      document.setViewBox({
+        ctx,
+        aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
+        width,
+        desiredWidth: _image.width,
+        height,
+        desiredHeight: _image.height
+      });
+
+      if (this.loaded) {
+        if (typeof _image.complete === 'undefined' || _image.complete) {
+          ctx.drawImage(_image, 0, 0);
+        }
+      }
+    }
+
+    ctx.restore();
+  }
+
+  getBoundingBox() {
+    var x = this.getAttribute('x').getPixels('x');
+    var y = this.getAttribute('y').getPixels('y');
+    var width = this.getStyle('width').getPixels('x');
+    var height = this.getStyle('height').getPixels('y');
+    return new BoundingBox(x, y, x + width, y + height);
+  }
+
+}
+
+class SymbolElement extends RenderedElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'symbol';
+  }
+
+  render(_) {// NO RENDER
+  }
+
+}
+
+class SVGFontLoader {
+  constructor(document) {
+    this.document = document;
+    this.loaded = false;
+    document.fonts.push(this);
+  }
+
+  load(fontFamily, url) {
+    var _this = this;
+
+    return _asyncToGenerator(function* () {
+      try {
+        var {
+          document
+        } = _this;
+        var svgDocument = yield document.canvg.parser.load(url);
+        var fonts = svgDocument.getElementsByTagName('font');
+        Array.from(fonts).forEach(fontNode => {
+          var font = document.createElement(fontNode);
+          document.definitions[fontFamily] = font;
+        });
+      } catch (err) {
+        console.error("Error while loading font \"".concat(url, "\":"), err);
+      }
+
+      _this.loaded = true;
+    })();
+  }
+
+}
+
+class StyleElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'style';
+    var css = compressSpaces(Array.from(node.childNodes) // NEED TEST
+    .map(_ => _.textContent).join('').replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
+    .replace(/@import.*;/g, '') // remove imports
+    );
+    var cssDefs = css.split('}');
+    cssDefs.forEach(_ => {
+      var def = _.trim();
+
+      if (!def) {
+        return;
+      }
+
+      var cssParts = def.split('{');
+      var cssClasses = cssParts[0].split(',');
+      var cssProps = cssParts[1].split(';');
+      cssClasses.forEach(_ => {
+        var cssClass = _.trim();
+
+        if (!cssClass) {
+          return;
+        }
+
+        var props = document.styles[cssClass] || {};
+        cssProps.forEach(cssProp => {
+          var prop = cssProp.indexOf(':');
+          var name = cssProp.substr(0, prop).trim();
+          var value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
+
+          if (name && value) {
+            props[name] = new Property(document, name, value);
+          }
+        });
+        document.styles[cssClass] = props;
+        document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
+
+        if (cssClass === '@font-face') {
+          //  && !nodeEnv
+          var fontFamily = props['font-family'].getString().replace(/"|'/g, '');
+          var srcs = props.src.getString().split(',');
+          srcs.forEach(src => {
+            if (src.indexOf('format("svg")') > 0) {
+              var url = parseExternalUrl(src);
+
+              if (url) {
+                void new SVGFontLoader(document).load(fontFamily, url);
+              }
+            }
+          });
+        }
+      });
+    });
+  }
+
+}
+StyleElement.parseExternalUrl = parseExternalUrl;
+
+class UseElement extends RenderedElement {
+  constructor() {
+    super(...arguments);
+    this.type = 'use';
+  }
+
+  setContext(ctx) {
+    super.setContext(ctx);
+    var xAttr = this.getAttribute('x');
+    var yAttr = this.getAttribute('y');
+
+    if (xAttr.hasValue()) {
+      ctx.translate(xAttr.getPixels('x'), 0);
+    }
+
+    if (yAttr.hasValue()) {
+      ctx.translate(0, yAttr.getPixels('y'));
+    }
+  }
+
+  path(ctx) {
+    var {
+      element
+    } = this;
+
+    if (element) {
+      element.path(ctx);
+    }
+  }
+
+  renderChildren(ctx) {
+    var {
+      document,
+      element
+    } = this;
+
+    if (element) {
+      var tempSvg = element;
+
+      if (element.type === 'symbol') {
+        // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
+        tempSvg = new SVGElement(document, null);
+        tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
+        tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
+        tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
+        tempSvg.children = element.children; // element is still the parent of the children
+
+        element.styles.opacity = new Property(document, 'opacity', this.calculateOpacity());
+      }
+
+      if (tempSvg.type === 'svg') {
+        var widthStyle = this.getStyle('width', false, true);
+        var heightStyle = this.getStyle('height', false, true); // if symbol or svg, inherit width/height from me
+
+        if (widthStyle.hasValue()) {
+          tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
+        }
+
+        if (heightStyle.hasValue()) {
+          tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
+        }
+      }
+
+      var oldParent = tempSvg.parent;
+      tempSvg.parent = this;
+      tempSvg.render(ctx);
+      tempSvg.parent = oldParent;
+    }
+  }
+
+  getBoundingBox(ctx) {
+    var {
+      element
+    } = this;
+
+    if (element) {
+      return element.getBoundingBox(ctx);
+    }
+
+    return null;
+  }
+
+  elementTransform() {
+    var {
+      document,
+      element
+    } = this;
+    return Transform.fromElement(document, element);
+  }
+
+  get element() {
+    if (!this.cachedElement) {
+      this.cachedElement = this.getHrefAttribute().getDefinition();
+    }
+
+    return this.cachedElement;
+  }
+
+}
+
+function imGet(img, x, y, width, _height, rgba) {
+  return img[y * width * 4 + x * 4 + rgba];
+}
+
+function imSet(img, x, y, width, _height, rgba, val) {
+  img[y * width * 4 + x * 4 + rgba] = val;
+}
+
+function m(matrix, i, v) {
+  var mi = matrix[i];
+  return mi * v;
+}
+
+function c(a, m1, m2, m3) {
+  return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
+}
+
+class FeColorMatrixElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'feColorMatrix';
+    var matrix = toNumbers(this.getAttribute('values').getString());
+
+    switch (this.getAttribute('type').getString('matrix')) {
+      // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
+      case 'saturate':
+        {
+          var s = matrix[0];
+          /* eslint-disable array-element-newline */
+
+          matrix = [0.213 + 0.787 * s, 0.715 - 0.715 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 + 0.285 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 - 0.715 * s, 0.072 + 0.928 * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
+          /* eslint-enable array-element-newline */
+
+          break;
+        }
+
+      case 'hueRotate':
+        {
+          var a = matrix[0] * Math.PI / 180.0;
+          /* eslint-disable array-element-newline */
+
+          matrix = [c(a, 0.213, 0.787, -0.213), c(a, 0.715, -0.715, -0.715), c(a, 0.072, -0.072, 0.928), 0, 0, c(a, 0.213, -0.213, 0.143), c(a, 0.715, 0.285, 0.140), c(a, 0.072, -0.072, -0.283), 0, 0, c(a, 0.213, -0.213, -0.787), c(a, 0.715, -0.715, 0.715), c(a, 0.072, 0.928, 0.072), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
+          /* eslint-enable array-element-newline */
+
+          break;
+        }
+
+      case 'luminanceToAlpha':
+        /* eslint-disable array-element-newline */
+        matrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0, 0, 0, 0, 0, 1];
+        /* eslint-enable array-element-newline */
+
+        break;
+    }
+
+    this.matrix = matrix;
+    this.includeOpacity = this.getAttribute('includeOpacity').hasValue();
+  }
+
+  apply(ctx, _x, _y, width, height) {
+    // assuming x==0 && y==0 for now
+    var {
+      includeOpacity,
+      matrix
+    } = this;
+    var srcData = ctx.getImageData(0, 0, width, height);
+
+    for (var y = 0; y < height; y++) {
+      for (var x = 0; x < width; x++) {
+        var r = imGet(srcData.data, x, y, width, height, 0);
+        var g = imGet(srcData.data, x, y, width, height, 1);
+        var b = imGet(srcData.data, x, y, width, height, 2);
+        var a = imGet(srcData.data, x, y, width, height, 3);
+        var nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
+        var ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
+        var nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
+        var na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
+
+        if (includeOpacity) {
+          nr = 0;
+          ng = 0;
+          nb = 0;
+          na *= a / 255;
+        }
+
+        imSet(srcData.data, x, y, width, height, 0, nr);
+        imSet(srcData.data, x, y, width, height, 1, ng);
+        imSet(srcData.data, x, y, width, height, 2, nb);
+        imSet(srcData.data, x, y, width, height, 3, na);
+      }
+    }
+
+    ctx.clearRect(0, 0, width, height);
+    ctx.putImageData(srcData, 0, 0);
+  }
+
+}
+
+class MaskElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'mask';
+  }
+
+  apply(ctx, element) {
+    var {
+      document
+    } = this; // render as temp svg
+
+    var x = this.getAttribute('x').getPixels('x');
+    var y = this.getAttribute('y').getPixels('y');
+    var width = this.getStyle('width').getPixels('x');
+    var height = this.getStyle('height').getPixels('y');
+
+    if (!width && !height) {
+      var boundingBox = new BoundingBox();
+      this.children.forEach(child => {
+        boundingBox.addBoundingBox(child.getBoundingBox(ctx));
+      });
+      x = Math.floor(boundingBox.x1);
+      y = Math.floor(boundingBox.y1);
+      width = Math.floor(boundingBox.width);
+      height = Math.floor(boundingBox.height);
+    }
+
+    var ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
+    var maskCanvas = document.createCanvas(x + width, y + height);
+    var maskCtx = maskCanvas.getContext('2d');
+    document.screen.setDefaults(maskCtx);
+    this.renderChildren(maskCtx); // convert mask to alpha with a fake node
+    // TODO: refactor out apply from feColorMatrix
+
+    new FeColorMatrixElement(document, {
+      nodeType: 1,
+      childNodes: [],
+      attributes: [{
+        nodeName: 'type',
+        value: 'luminanceToAlpha'
+      }, {
+        nodeName: 'includeOpacity',
+        value: 'true'
+      }]
+    }).apply(maskCtx, 0, 0, x + width, y + height);
+    var tmpCanvas = document.createCanvas(x + width, y + height);
+    var tmpCtx = tmpCanvas.getContext('2d');
+    document.screen.setDefaults(tmpCtx);
+    element.render(tmpCtx);
+    tmpCtx.globalCompositeOperation = 'destination-in';
+    tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
+    tmpCtx.fillRect(0, 0, x + width, y + height);
+    ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
+    ctx.fillRect(0, 0, x + width, y + height); // reassign mask
+
+    this.restoreStyles(element, ignoredStyles);
+  }
+
+  render(_) {// NO RENDER
+  }
+
+}
+MaskElement.ignoreStyles = ['mask', 'transform', 'clip-path'];
+
+var noop = () => {// NOOP
+};
+
+class ClipPathElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'clipPath';
+  }
+
+  apply(ctx) {
+    var {
+      document
+    } = this;
+    var contextProto = Reflect.getPrototypeOf(ctx);
+    var {
+      beginPath,
+      closePath
+    } = ctx;
+
+    if (contextProto) {
+      contextProto.beginPath = noop;
+      contextProto.closePath = noop;
+    }
+
+    Reflect.apply(beginPath, ctx, []);
+    this.children.forEach(child => {
+      if (typeof child.path === 'undefined') {
+        return;
+      }
+
+      var transform = typeof child.elementTransform !== 'undefined' ? child.elementTransform() : null; // handle <use />
+
+      if (!transform) {
+        transform = Transform.fromElement(document, child);
+      }
+
+      if (transform) {
+        transform.apply(ctx);
+      }
+
+      child.path(ctx);
+
+      if (contextProto) {
+        contextProto.closePath = closePath;
+      }
+
+      if (transform) {
+        transform.unapply(ctx);
+      }
+    });
+    Reflect.apply(closePath, ctx, []);
+    ctx.clip();
+
+    if (contextProto) {
+      contextProto.beginPath = beginPath;
+      contextProto.closePath = closePath;
+    }
+  }
+
+  render(_) {// NO RENDER
+  }
+
+}
+
+class FilterElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'filter';
+  }
+
+  apply(ctx, element) {
+    // render as temp svg
+    var {
+      document,
+      children
+    } = this;
+    var boundingBox = element.getBoundingBox(ctx);
+
+    if (!boundingBox) {
+      return;
+    }
+
+    var px = 0;
+    var py = 0;
+    children.forEach(child => {
+      var efd = child.extraFilterDistance || 0;
+      px = Math.max(px, efd);
+      py = Math.max(py, efd);
+    });
+    var width = Math.floor(boundingBox.width);
+    var height = Math.floor(boundingBox.height);
+    var tmpCanvasWidth = width + 2 * px;
+    var tmpCanvasHeight = height + 2 * py;
+
+    if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
+      return;
+    }
+
+    var x = Math.floor(boundingBox.x);
+    var y = Math.floor(boundingBox.y);
+    var ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
+    var tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
+    var tmpCtx = tmpCanvas.getContext('2d');
+    document.screen.setDefaults(tmpCtx);
+    tmpCtx.translate(-x + px, -y + py);
+    element.render(tmpCtx); // apply filters
+
+    children.forEach(child => {
+      if (typeof child.apply === 'function') {
+        child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
+      }
+    }); // render on me
+
+    ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
+    this.restoreStyles(element, ignoredStyles);
+  }
+
+  render(_) {// NO RENDER
+  }
+
+}
+FilterElement.ignoreStyles = ['filter', 'transform', 'clip-path'];
+
+class FeDropShadowElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'feDropShadow';
+    this.addStylesFromStyleDefinition();
+  }
+
+  apply(_, _x, _y, _width, _height) {// TODO: implement
+  }
+
+}
+
+class FeMorphologyElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'feMorphology';
+  }
+
+  apply(_, _x, _y, _width, _height) {// TODO: implement
+  }
+
+}
+
+class FeCompositeElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'feComposite';
+  }
+
+  apply(_, _x, _y, _width, _height) {// TODO: implement
+  }
+
+}
+
+class FeGaussianBlurElement extends Element {
+  constructor(document, node, captureTextNodes) {
+    super(document, node, captureTextNodes);
+    this.type = 'feGaussianBlur';
+    this.blurRadius = Math.floor(this.getAttribute('stdDeviation').getNumber());
+    this.extraFilterDistance = this.blurRadius;
+  }
+
+  apply(ctx, x, y, width, height) {
+    var {
+      document,
+      blurRadius
+    } = this;
+    var body = document.window ? document.window.document.body : null;
+    var canvas = ctx.canvas; // StackBlur requires canvas be on document
+
+    canvas.id = document.getUniqueId();
+
+    if (body) {
+      canvas.style.display = 'none';
+      body.appendChild(canvas);
+    }
+
+    canvasRGBA(canvas, x, y, width, height, blurRadius);
+
+    if (body) {
+      body.removeChild(canvas);
+    }
+  }
+
+}
+
+class TitleElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'title';
+  }
+
+}
+
+class DescElement extends Element {
+  constructor() {
+    super(...arguments);
+    this.type = 'desc';
+  }
+
+}
+
+var elements = {
+  'svg': SVGElement,
+  'rect': RectElement,
+  'circle': CircleElement,
+  'ellipse': EllipseElement,
+  'line': LineElement,
+  'polyline': PolylineElement,
+  'polygon': PolygonElement,
+  'path': PathElement,
+  'pattern': PatternElement,
+  'marker': MarkerElement,
+  'defs': DefsElement,
+  'linearGradient': LinearGradientElement,
+  'radialGradient': RadialGradientElement,
+  'stop': StopElement,
+  'animate': AnimateElement,
+  'animateColor': AnimateColorElement,
+  'animateTransform': AnimateTransformElement,
+  'font': FontElement,
+  'font-face': FontFaceElement,
+  'missing-glyph': MissingGlyphElement,
+  'glyph': GlyphElement,
+  'text': TextElement,
+  'tspan': TSpanElement,
+  'tref': TRefElement,
+  'a': AElement,
+  'textPath': TextPathElement,
+  'image': ImageElement,
+  'g': GElement,
+  'symbol': SymbolElement,
+  'style': StyleElement,
+  'use': UseElement,
+  'mask': MaskElement,
+  'clipPath': ClipPathElement,
+  'filter': FilterElement,
+  'feDropShadow': FeDropShadowElement,
+  'feMorphology': FeMorphologyElement,
+  'feComposite': FeCompositeElement,
+  'feColorMatrix': FeColorMatrixElement,
+  'feGaussianBlur': FeGaussianBlurElement,
+  'title': TitleElement,
+  'desc': DescElement
+};
+
+function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function createCanvas(width, height) {
+  var canvas = document.createElement('canvas');
+  canvas.width = width;
+  canvas.height = height;
+  return canvas;
+}
+
+function createImage(_x) {
+  return _createImage.apply(this, arguments);
+}
+
+function _createImage() {
+  _createImage = _asyncToGenerator(function* (src) {
+    var anonymousCrossOrigin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+    var image = document.createElement('img');
+
+    if (anonymousCrossOrigin) {
+      image.crossOrigin = 'Anonymous';
+    }
+
+    return new Promise((resolve, reject) => {
+      image.onload = () => {
+        resolve(image);
+      };
+
+      image.onerror = (_event, _source, _lineno, _colno, error) => {
+        reject(error);
+      };
+
+      image.src = src;
+    });
+  });
+  return _createImage.apply(this, arguments);
+}
+
+class Document {
+  constructor(canvg) {
+    var {
+      rootEmSize = 12,
+      emSize = 12,
+      createCanvas = Document.createCanvas,
+      createImage = Document.createImage,
+      anonymousCrossOrigin
+    } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+    this.canvg = canvg;
+    this.definitions = {};
+    this.styles = {};
+    this.stylesSpecificity = {};
+    this.images = [];
+    this.fonts = [];
+    this.emSizeStack = [];
+    this.uniqueId = 0;
+    this.screen = canvg.screen;
+    this.rootEmSize = rootEmSize;
+    this.emSize = emSize;
+    this.createCanvas = createCanvas;
+    this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
+    this.screen.wait(this.isImagesLoaded.bind(this));
+    this.screen.wait(this.isFontsLoaded.bind(this));
+  }
+
+  bindCreateImage(createImage, anonymousCrossOrigin) {
+    if (typeof anonymousCrossOrigin === 'boolean') {
+      return (source, forceAnonymousCrossOrigin) => createImage(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin);
+    }
+
+    return createImage;
+  }
+
+  get window() {
+    return this.screen.window;
+  }
+
+  get fetch() {
+    return this.screen.fetch;
+  }
+
+  get ctx() {
+    return this.screen.ctx;
+  }
+
+  get emSize() {
+    var {
+      emSizeStack
+    } = this;
+    return emSizeStack[emSizeStack.length - 1];
+  }
+
+  set emSize(value) {
+    var {
+      emSizeStack
+    } = this;
+    emSizeStack.push(value);
+  }
+
+  popEmSize() {
+    var {
+      emSizeStack
+    } = this;
+    emSizeStack.pop();
+  }
+
+  getUniqueId() {
+    return "canvg".concat(++this.uniqueId);
+  }
+
+  isImagesLoaded() {
+    return this.images.every(_ => _.loaded);
+  }
+
+  isFontsLoaded() {
+    return this.fonts.every(_ => _.loaded);
+  }
+
+  createDocumentElement(document) {
+    var documentElement = this.createElement(document.documentElement);
+    documentElement.root = true;
+    documentElement.addStylesFromStyleDefinition();
+    this.documentElement = documentElement;
+    return documentElement;
+  }
+
+  createElement(node) {
+    var elementType = node.nodeName.replace(/^[^:]+:/, '');
+    var ElementType = Document.elementTypes[elementType];
+
+    if (typeof ElementType !== 'undefined') {
+      return new ElementType(this, node);
+    }
+
+    return new UnknownElement(this, node);
+  }
+
+  createTextNode(node) {
+    return new TextNode(this, node);
+  }
+
+  setViewBox(config) {
+    this.screen.setViewBox(_objectSpread$1({
+      document: this
+    }, config));
+  }
+
+}
+Document.createCanvas = createCanvas;
+Document.createImage = createImage;
+Document.elementTypes = elements;
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+/**
+ * SVG renderer on canvas.
+ */
+
+class Canvg {
+  /**
+   * Main constructor.
+   * @param ctx - Rendering context.
+   * @param svg - SVG Document.
+   * @param options - Rendering options.
+   */
+  constructor(ctx, svg) {
+    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+    this.parser = new Parser(options);
+    this.screen = new Screen(ctx, options);
+    this.options = options;
+    var document = new Document(this, options);
+    var documentElement = document.createDocumentElement(svg);
+    this.document = document;
+    this.documentElement = documentElement;
+  }
+  /**
+   * Create Canvg instance from SVG source string or URL.
+   * @param ctx - Rendering context.
+   * @param svg - SVG source string or URL.
+   * @param options - Rendering options.
+   * @returns Canvg instance.
+   */
+
+
+  static from(ctx, svg) {
+    var _arguments = arguments;
+    return _asyncToGenerator(function* () {
+      var options = _arguments.length > 2 && _arguments[2] !== undefined ? _arguments[2] : {};
+      var parser = new Parser(options);
+      var svgDocument = yield parser.parse(svg);
+      return new Canvg(ctx, svgDocument, options);
+    })();
+  }
+  /**
+   * Create Canvg instance from SVG source string.
+   * @param ctx - Rendering context.
+   * @param svg - SVG source string.
+   * @param options - Rendering options.
+   * @returns Canvg instance.
+   */
+
+
+  static fromString(ctx, svg) {
+    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+    var parser = new Parser(options);
+    var svgDocument = parser.parseFromString(svg);
+    return new Canvg(ctx, svgDocument, options);
+  }
+  /**
+   * Create new Canvg instance with inherited options.
+   * @param ctx - Rendering context.
+   * @param svg - SVG source string or URL.
+   * @param options - Rendering options.
+   * @returns Canvg instance.
+   */
+
+
+  fork(ctx, svg) {
+    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+    return Canvg.from(ctx, svg, _objectSpread(_objectSpread({}, this.options), options));
+  }
+  /**
+   * Create new Canvg instance with inherited options.
+   * @param ctx - Rendering context.
+   * @param svg - SVG source string.
+   * @param options - Rendering options.
+   * @returns Canvg instance.
+   */
+
+
+  forkString(ctx, svg) {
+    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+    return Canvg.fromString(ctx, svg, _objectSpread(_objectSpread({}, this.options), options));
+  }
+  /**
+   * Document is ready promise.
+   * @returns Ready promise.
+   */
+
+
+  ready() {
+    return this.screen.ready();
+  }
+  /**
+   * Document is ready value.
+   * @returns Is ready or not.
+   */
+
+
+  isReady() {
+    return this.screen.isReady();
+  }
+  /**
+   * Render only first frame, ignoring animations and mouse.
+   * @param options - Rendering options.
+   */
+
+
+  render() {
+    var _arguments2 = arguments,
+        _this = this;
+
+    return _asyncToGenerator(function* () {
+      var options = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : {};
+
+      _this.start(_objectSpread({
+        enableRedraw: true,
+        ignoreAnimation: true,
+        ignoreMouse: true
+      }, options));
+
+      yield _this.ready();
+
+      _this.stop();
+    })();
+  }
+  /**
+   * Start rendering.
+   * @param options - Render options.
+   */
+
+
+  start() {
+    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+    var {
+      documentElement,
+      screen,
+      options: baseOptions
+    } = this;
+    screen.start(documentElement, _objectSpread(_objectSpread({
+      enableRedraw: true
+    }, baseOptions), options));
+  }
+  /**
+   * Stop rendering.
+   */
+
+
+  stop() {
+    this.screen.stop();
+  }
+  /**
+   * Resize SVG to fit in given size.
+   * @param width
+   * @param height
+   * @param preserveAspectRatio
+   */
+
+
+  resize(width) {
+    var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
+    var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+    this.documentElement.resize(width, height, preserveAspectRatio);
+  }
+
+}
+
+export { AElement, AnimateColorElement, AnimateElement, AnimateTransformElement, BoundingBox, CB1, CB2, CB3, CB4, Canvg, CircleElement, ClipPathElement, DefsElement, DescElement, Document, Element, EllipseElement, FeColorMatrixElement, FeCompositeElement, FeDropShadowElement, FeGaussianBlurElement, FeMorphologyElement, FilterElement, Font, FontElement, FontFaceElement, GElement, GlyphElement, GradientElement, ImageElement, LineElement, LinearGradientElement, MarkerElement, MaskElement, Matrix, MissingGlyphElement, Mouse, PSEUDO_ZERO, Parser, PathElement, PathParser, PatternElement, Point, PolygonElement, PolylineElement, Property, QB1, QB2, QB3, RadialGradientElement, RectElement, RenderedElement, Rotate, SVGElement, SVGFontLoader, Scale, Screen, Skew, SkewX, SkewY, StopElement, StyleElement, SymbolElement, TRefElement, TSpanElement, TextElement, TextPathElement, TitleElement, Transform, Translate, UnknownElement, UseElement, ViewPort, compressSpaces, Canvg as default, getSelectorSpecificity, normalizeAttributeName, normalizeColor, parseExternalUrl, index as presets, toNumbers, trimLeft, trimRight, vectorMagnitude, vectorsAngle, vectorsRatio };
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
Index: imaps-frontend/node_modules/canvg/lib/index.js
===================================================================
--- imaps-frontend/node_modules/canvg/lib/index.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/index.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,7966 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+require('core-js/modules/es.object.to-string.js');
+require('core-js/modules/es.promise.js');
+require('core-js/modules/es.reflect.delete-property.js');
+var _regeneratorRuntime = require('@babel/runtime/regenerator');
+var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
+require('core-js/modules/es.array.map.js');
+require('core-js/modules/es.parse-float.js');
+require('core-js/modules/es.regexp.exec.js');
+require('core-js/modules/es.string.match.js');
+require('core-js/modules/es.string.replace.js');
+require('core-js/modules/es.string.starts-with.js');
+require('core-js/modules/es.array.join.js');
+var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
+var _defineProperty = require('@babel/runtime/helpers/defineProperty');
+var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
+var _createClass = require('@babel/runtime/helpers/createClass');
+require('core-js/modules/es.array.concat.js');
+require('core-js/modules/es.array.every.js');
+require('core-js/modules/es.array.reduce.js');
+require('core-js/modules/es.string.ends-with.js');
+require('core-js/modules/es.string.split.js');
+var requestAnimationFrame = require('raf');
+require('core-js/modules/es.function.name.js');
+require('core-js/modules/es.string.trim.js');
+var RGBColor = require('rgbcolor');
+require('core-js/modules/es.array.for-each.js');
+require('core-js/modules/web.dom-collections.for-each.js');
+var _inherits = require('@babel/runtime/helpers/inherits');
+var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
+var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
+require('core-js/modules/es.array.from.js');
+require('core-js/modules/es.array.includes.js');
+require('core-js/modules/es.array.some.js');
+require('core-js/modules/es.string.includes.js');
+require('core-js/modules/es.string.iterator.js');
+var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
+require('core-js/modules/es.array.index-of.js');
+require('core-js/modules/es.array.reverse.js');
+var _get = require('@babel/runtime/helpers/get');
+require('core-js/modules/es.number.constructor.js');
+require('core-js/modules/es.array.fill.js');
+var svgPathdata = require('svg-pathdata');
+require('core-js/modules/es.regexp.to-string.js');
+var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitialized');
+require('core-js/modules/es.array.iterator.js');
+require('core-js/modules/web.dom-collections.iterator.js');
+require('core-js/modules/es.map.js');
+require('core-js/modules/es.reflect.apply.js');
+require('core-js/modules/es.reflect.get-prototype-of.js');
+var stackblurCanvas = require('stackblur-canvas');
+
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
+var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
+var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
+var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
+var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
+var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
+var requestAnimationFrame__default = /*#__PURE__*/_interopDefaultLegacy(requestAnimationFrame);
+var RGBColor__default = /*#__PURE__*/_interopDefaultLegacy(RGBColor);
+var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
+var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
+var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
+var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
+var _get__default = /*#__PURE__*/_interopDefaultLegacy(_get);
+var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
+
+/**
+ * Options preset for `OffscreenCanvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @returns Preset object.
+ */
+function offscreen() {
+  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
+      DOMParserFallback = _ref.DOMParser;
+
+  var preset = {
+    window: null,
+    ignoreAnimation: true,
+    ignoreMouse: true,
+    DOMParser: DOMParserFallback,
+    createCanvas: function createCanvas(width, height) {
+      return new OffscreenCanvas(width, height);
+    },
+    createImage: function createImage(url) {
+      return _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
+        var response, blob, img;
+        return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                _context.next = 2;
+                return fetch(url);
+
+              case 2:
+                response = _context.sent;
+                _context.next = 5;
+                return response.blob();
+
+              case 5:
+                blob = _context.sent;
+                _context.next = 8;
+                return createImageBitmap(blob);
+
+              case 8:
+                img = _context.sent;
+                return _context.abrupt("return", img);
+
+              case 10:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee);
+      }))();
+    }
+  };
+
+  if (typeof DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {
+    Reflect.deleteProperty(preset, 'DOMParser');
+  }
+
+  return preset;
+}
+
+/**
+ * Options preset for `node-canvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @param config.canvas - `node-canvas` exports.
+ * @param config.fetch - WHATWG-compatible `fetch` function.
+ * @returns Preset object.
+ */
+function node(_ref) {
+  var DOMParser = _ref.DOMParser,
+      canvas = _ref.canvas,
+      fetch = _ref.fetch;
+  return {
+    window: null,
+    ignoreAnimation: true,
+    ignoreMouse: true,
+    DOMParser: DOMParser,
+    fetch: fetch,
+    createCanvas: canvas.createCanvas,
+    createImage: canvas.loadImage
+  };
+}
+
+var index = /*#__PURE__*/Object.freeze({
+	__proto__: null,
+	offscreen: offscreen,
+	node: node
+});
+
+/**
+ * HTML-safe compress white-spaces.
+ * @param str - String to compress.
+ * @returns String.
+ */
+function compressSpaces(str) {
+  return str.replace(/(?!\u3000)\s+/gm, ' ');
+}
+/**
+ * HTML-safe left trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+
+function trimLeft(str) {
+  return str.replace(/^[\n \t]+/, '');
+}
+/**
+ * HTML-safe right trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+
+function trimRight(str) {
+  return str.replace(/[\n \t]+$/, '');
+}
+/**
+ * String to numbers array.
+ * @param str - Numbers string.
+ * @returns Numbers array.
+ */
+
+function toNumbers(str) {
+  var matches = (str || '').match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
+  return matches.map(parseFloat);
+} // Microsoft Edge fix
+
+var allUppercase = /^[A-Z-]+$/;
+/**
+ * Normalize attribute name.
+ * @param name - Attribute name.
+ * @returns Normalized attribute name.
+ */
+
+function normalizeAttributeName(name) {
+  if (allUppercase.test(name)) {
+    return name.toLowerCase();
+  }
+
+  return name;
+}
+/**
+ * Parse external URL.
+ * @param url - CSS url string.
+ * @returns Parsed URL.
+ */
+
+function parseExternalUrl(url) {
+  //                      single quotes [2]
+  //                      v         double quotes [3]
+  //                      v         v         no quotes [4]
+  //                      v         v         v
+  var urlMatch = /url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(url) || [];
+  return urlMatch[2] || urlMatch[3] || urlMatch[4];
+}
+/**
+ * Transform floats to integers in rgb colors.
+ * @param color - Color to normalize.
+ * @returns Normalized color.
+ */
+
+function normalizeColor(color) {
+  if (!color.startsWith('rgb')) {
+    return color;
+  }
+
+  var rgbParts = 3;
+  var normalizedColor = color.replace(/\d+(\.\d+)?/g, function (num, isFloat) {
+    return rgbParts-- && isFloat ? String(Math.round(parseFloat(num))) : num;
+  });
+  return normalizedColor;
+}
+
+// slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js
+var attributeRegex = /(\[[^\]]+\])/g;
+var idRegex = /(#[^\s+>~.[:]+)/g;
+var classRegex = /(\.[^\s+>~.[:]+)/g;
+var pseudoElementRegex = /(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi;
+var pseudoClassWithBracketsRegex = /(:[\w-]+\([^)]*\))/gi;
+var pseudoClassRegex = /(:[^\s+>~.[:]+)/g;
+var elementRegex = /([^\s+>~.[:]+)/g;
+
+function findSelectorMatch(selector, regex) {
+  var matches = regex.exec(selector);
+
+  if (!matches) {
+    return [selector, 0];
+  }
+
+  return [selector.replace(regex, ' '), matches.length];
+}
+/**
+ * Measure selector specificity.
+ * @param selector - Selector to measure.
+ * @returns Specificity.
+ */
+
+
+function getSelectorSpecificity(selector) {
+  var specificity = [0, 0, 0];
+  var currentSelector = selector.replace(/:not\(([^)]*)\)/g, '     $1 ').replace(/{[\s\S]*/gm, ' ');
+  var delta = 0;
+
+  var _findSelectorMatch = findSelectorMatch(currentSelector, attributeRegex);
+
+  var _findSelectorMatch2 = _slicedToArray__default['default'](_findSelectorMatch, 2);
+
+  currentSelector = _findSelectorMatch2[0];
+  delta = _findSelectorMatch2[1];
+  specificity[1] += delta;
+
+  var _findSelectorMatch3 = findSelectorMatch(currentSelector, idRegex);
+
+  var _findSelectorMatch4 = _slicedToArray__default['default'](_findSelectorMatch3, 2);
+
+  currentSelector = _findSelectorMatch4[0];
+  delta = _findSelectorMatch4[1];
+  specificity[0] += delta;
+
+  var _findSelectorMatch5 = findSelectorMatch(currentSelector, classRegex);
+
+  var _findSelectorMatch6 = _slicedToArray__default['default'](_findSelectorMatch5, 2);
+
+  currentSelector = _findSelectorMatch6[0];
+  delta = _findSelectorMatch6[1];
+  specificity[1] += delta;
+
+  var _findSelectorMatch7 = findSelectorMatch(currentSelector, pseudoElementRegex);
+
+  var _findSelectorMatch8 = _slicedToArray__default['default'](_findSelectorMatch7, 2);
+
+  currentSelector = _findSelectorMatch8[0];
+  delta = _findSelectorMatch8[1];
+  specificity[2] += delta;
+
+  var _findSelectorMatch9 = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);
+
+  var _findSelectorMatch10 = _slicedToArray__default['default'](_findSelectorMatch9, 2);
+
+  currentSelector = _findSelectorMatch10[0];
+  delta = _findSelectorMatch10[1];
+  specificity[1] += delta;
+
+  var _findSelectorMatch11 = findSelectorMatch(currentSelector, pseudoClassRegex);
+
+  var _findSelectorMatch12 = _slicedToArray__default['default'](_findSelectorMatch11, 2);
+
+  currentSelector = _findSelectorMatch12[0];
+  delta = _findSelectorMatch12[1];
+  specificity[1] += delta;
+  currentSelector = currentSelector.replace(/[*\s+>~]/g, ' ').replace(/[#.]/g, ' ');
+
+  var _findSelectorMatch13 = findSelectorMatch(currentSelector, elementRegex);
+
+  var _findSelectorMatch14 = _slicedToArray__default['default'](_findSelectorMatch13, 2);
+
+  currentSelector = _findSelectorMatch14[0];
+  delta = _findSelectorMatch14[1];
+  // lgtm [js/useless-assignment-to-local]
+  specificity[2] += delta;
+  return specificity.join('');
+}
+
+var PSEUDO_ZERO = .00000001;
+/**
+ * Vector magnitude.
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorMagnitude(v) {
+  return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
+}
+/**
+ * Ratio between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorsRatio(u, v) {
+  return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
+}
+/**
+ * Angle between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+
+function vectorsAngle(u, v) {
+  return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));
+}
+function CB1(t) {
+  return t * t * t;
+}
+function CB2(t) {
+  return 3 * t * t * (1 - t);
+}
+function CB3(t) {
+  return 3 * t * (1 - t) * (1 - t);
+}
+function CB4(t) {
+  return (1 - t) * (1 - t) * (1 - t);
+}
+function QB1(t) {
+  return t * t;
+}
+function QB2(t) {
+  return 2 * t * (1 - t);
+}
+function QB3(t) {
+  return (1 - t) * (1 - t);
+}
+
+var Property = /*#__PURE__*/function () {
+  function Property(document, name, value) {
+    _classCallCheck__default['default'](this, Property);
+
+    this.document = document;
+    this.name = name;
+    this.value = value;
+    this.isNormalizedColor = false;
+  }
+
+  _createClass__default['default'](Property, [{
+    key: "split",
+    value: function split() {
+      var separator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ' ';
+      var document = this.document,
+          name = this.name;
+      return compressSpaces(this.getString()).trim().split(separator).map(function (value) {
+        return new Property(document, name, value);
+      });
+    }
+  }, {
+    key: "hasValue",
+    value: function hasValue(zeroIsValue) {
+      var value = this.value;
+      return value !== null && value !== '' && (zeroIsValue || value !== 0) && typeof value !== 'undefined';
+    }
+  }, {
+    key: "isString",
+    value: function isString(regexp) {
+      var value = this.value;
+      var result = typeof value === 'string';
+
+      if (!result || !regexp) {
+        return result;
+      }
+
+      return regexp.test(value);
+    }
+  }, {
+    key: "isUrlDefinition",
+    value: function isUrlDefinition() {
+      return this.isString(/^url\(/);
+    }
+  }, {
+    key: "isPixels",
+    value: function isPixels() {
+      if (!this.hasValue()) {
+        return false;
+      }
+
+      var asString = this.getString();
+
+      switch (true) {
+        case asString.endsWith('px'):
+        case /^[0-9]+$/.test(asString):
+          return true;
+
+        default:
+          return false;
+      }
+    }
+  }, {
+    key: "setValue",
+    value: function setValue(value) {
+      this.value = value;
+      return this;
+    }
+  }, {
+    key: "getValue",
+    value: function getValue(def) {
+      if (typeof def === 'undefined' || this.hasValue()) {
+        return this.value;
+      }
+
+      return def;
+    }
+  }, {
+    key: "getNumber",
+    value: function getNumber(def) {
+      if (!this.hasValue()) {
+        if (typeof def === 'undefined') {
+          return 0;
+        }
+
+        return parseFloat(def);
+      }
+
+      var value = this.value;
+      var n = parseFloat(value);
+
+      if (this.isString(/%$/)) {
+        n /= 100.0;
+      }
+
+      return n;
+    }
+  }, {
+    key: "getString",
+    value: function getString(def) {
+      if (typeof def === 'undefined' || this.hasValue()) {
+        return typeof this.value === 'undefined' ? '' : String(this.value);
+      }
+
+      return String(def);
+    }
+  }, {
+    key: "getColor",
+    value: function getColor(def) {
+      var color = this.getString(def);
+
+      if (this.isNormalizedColor) {
+        return color;
+      }
+
+      this.isNormalizedColor = true;
+      color = normalizeColor(color);
+      this.value = color;
+      return color;
+    }
+  }, {
+    key: "getDpi",
+    value: function getDpi() {
+      return 96.0; // TODO: compute?
+    }
+  }, {
+    key: "getRem",
+    value: function getRem() {
+      return this.document.rootEmSize;
+    }
+  }, {
+    key: "getEm",
+    value: function getEm() {
+      return this.document.emSize;
+    }
+  }, {
+    key: "getUnits",
+    value: function getUnits() {
+      return this.getString().replace(/[0-9.-]/g, '');
+    }
+  }, {
+    key: "getPixels",
+    value: function getPixels(axisOrIsFontSize) {
+      var processPercent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      if (!this.hasValue()) {
+        return 0;
+      }
+
+      var _ref = typeof axisOrIsFontSize === 'boolean' ? [undefined, axisOrIsFontSize] : [axisOrIsFontSize],
+          _ref2 = _slicedToArray__default['default'](_ref, 2),
+          axis = _ref2[0],
+          isFontSize = _ref2[1];
+
+      var viewPort = this.document.screen.viewPort;
+
+      switch (true) {
+        case this.isString(/vmin$/):
+          return this.getNumber() / 100.0 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));
+
+        case this.isString(/vmax$/):
+          return this.getNumber() / 100.0 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));
+
+        case this.isString(/vw$/):
+          return this.getNumber() / 100.0 * viewPort.computeSize('x');
+
+        case this.isString(/vh$/):
+          return this.getNumber() / 100.0 * viewPort.computeSize('y');
+
+        case this.isString(/rem$/):
+          return this.getNumber() * this.getRem();
+
+        case this.isString(/em$/):
+          return this.getNumber() * this.getEm();
+
+        case this.isString(/ex$/):
+          return this.getNumber() * this.getEm() / 2.0;
+
+        case this.isString(/px$/):
+          return this.getNumber();
+
+        case this.isString(/pt$/):
+          return this.getNumber() * this.getDpi() * (1.0 / 72.0);
+
+        case this.isString(/pc$/):
+          return this.getNumber() * 15;
+
+        case this.isString(/cm$/):
+          return this.getNumber() * this.getDpi() / 2.54;
+
+        case this.isString(/mm$/):
+          return this.getNumber() * this.getDpi() / 25.4;
+
+        case this.isString(/in$/):
+          return this.getNumber() * this.getDpi();
+
+        case this.isString(/%$/) && isFontSize:
+          return this.getNumber() * this.getEm();
+
+        case this.isString(/%$/):
+          return this.getNumber() * viewPort.computeSize(axis);
+
+        default:
+          {
+            var n = this.getNumber();
+
+            if (processPercent && n < 1.0) {
+              return n * viewPort.computeSize(axis);
+            }
+
+            return n;
+          }
+      }
+    }
+  }, {
+    key: "getMilliseconds",
+    value: function getMilliseconds() {
+      if (!this.hasValue()) {
+        return 0;
+      }
+
+      if (this.isString(/ms$/)) {
+        return this.getNumber();
+      }
+
+      return this.getNumber() * 1000;
+    }
+  }, {
+    key: "getRadians",
+    value: function getRadians() {
+      if (!this.hasValue()) {
+        return 0;
+      }
+
+      switch (true) {
+        case this.isString(/deg$/):
+          return this.getNumber() * (Math.PI / 180.0);
+
+        case this.isString(/grad$/):
+          return this.getNumber() * (Math.PI / 200.0);
+
+        case this.isString(/rad$/):
+          return this.getNumber();
+
+        default:
+          return this.getNumber() * (Math.PI / 180.0);
+      }
+    }
+  }, {
+    key: "getDefinition",
+    value: function getDefinition() {
+      var asString = this.getString();
+      var name = /#([^)'"]+)/.exec(asString);
+
+      if (name) {
+        name = name[1];
+      }
+
+      if (!name) {
+        name = asString;
+      }
+
+      return this.document.definitions[name];
+    }
+  }, {
+    key: "getFillStyleDefinition",
+    value: function getFillStyleDefinition(element, opacity) {
+      var def = this.getDefinition();
+
+      if (!def) {
+        return null;
+      } // gradient
+
+
+      if (typeof def.createGradient === 'function') {
+        return def.createGradient(this.document.ctx, element, opacity);
+      } // pattern
+
+
+      if (typeof def.createPattern === 'function') {
+        if (def.getHrefAttribute().hasValue()) {
+          var patternTransform = def.getAttribute('patternTransform');
+          def = def.getHrefAttribute().getDefinition();
+
+          if (patternTransform.hasValue()) {
+            def.getAttribute('patternTransform', true).setValue(patternTransform.value);
+          }
+        }
+
+        return def.createPattern(this.document.ctx, element, opacity);
+      }
+
+      return null;
+    }
+  }, {
+    key: "getTextBaseline",
+    value: function getTextBaseline() {
+      if (!this.hasValue()) {
+        return null;
+      }
+
+      return Property.textBaselineMapping[this.getString()];
+    }
+  }, {
+    key: "addOpacity",
+    value: function addOpacity(opacity) {
+      var value = this.getColor();
+      var len = value.length;
+      var commas = 0; // Simulate old RGBColor version, which can't parse rgba.
+
+      for (var i = 0; i < len; i++) {
+        if (value[i] === ',') {
+          commas++;
+        }
+
+        if (commas === 3) {
+          break;
+        }
+      }
+
+      if (opacity.hasValue() && this.isString() && commas !== 3) {
+        var color = new RGBColor__default['default'](value);
+
+        if (color.ok) {
+          color.alpha = opacity.getNumber();
+          value = color.toRGBA();
+        }
+      }
+
+      return new Property(this.document, this.name, value);
+    }
+  }], [{
+    key: "empty",
+    value: function empty(document) {
+      return new Property(document, 'EMPTY', '');
+    }
+  }]);
+
+  return Property;
+}();
+Property.textBaselineMapping = {
+  'baseline': 'alphabetic',
+  'before-edge': 'top',
+  'text-before-edge': 'top',
+  'middle': 'middle',
+  'central': 'middle',
+  'after-edge': 'bottom',
+  'text-after-edge': 'bottom',
+  'ideographic': 'ideographic',
+  'alphabetic': 'alphabetic',
+  'hanging': 'hanging',
+  'mathematical': 'alphabetic'
+};
+
+var ViewPort = /*#__PURE__*/function () {
+  function ViewPort() {
+    _classCallCheck__default['default'](this, ViewPort);
+
+    this.viewPorts = [];
+  }
+
+  _createClass__default['default'](ViewPort, [{
+    key: "clear",
+    value: function clear() {
+      this.viewPorts = [];
+    }
+  }, {
+    key: "setCurrent",
+    value: function setCurrent(width, height) {
+      this.viewPorts.push({
+        width: width,
+        height: height
+      });
+    }
+  }, {
+    key: "removeCurrent",
+    value: function removeCurrent() {
+      this.viewPorts.pop();
+    }
+  }, {
+    key: "getCurrent",
+    value: function getCurrent() {
+      var viewPorts = this.viewPorts;
+      return viewPorts[viewPorts.length - 1];
+    }
+  }, {
+    key: "computeSize",
+    value: function computeSize(d) {
+      if (typeof d === 'number') {
+        return d;
+      }
+
+      if (d === 'x') {
+        return this.width;
+      }
+
+      if (d === 'y') {
+        return this.height;
+      }
+
+      return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);
+    }
+  }, {
+    key: "width",
+    get: function get() {
+      return this.getCurrent().width;
+    }
+  }, {
+    key: "height",
+    get: function get() {
+      return this.getCurrent().height;
+    }
+  }]);
+
+  return ViewPort;
+}();
+
+var Point = /*#__PURE__*/function () {
+  function Point(x, y) {
+    _classCallCheck__default['default'](this, Point);
+
+    this.x = x;
+    this.y = y;
+  }
+
+  _createClass__default['default'](Point, [{
+    key: "angleTo",
+    value: function angleTo(point) {
+      return Math.atan2(point.y - this.y, point.x - this.x);
+    }
+  }, {
+    key: "applyTransform",
+    value: function applyTransform(transform) {
+      var x = this.x,
+          y = this.y;
+      var xp = x * transform[0] + y * transform[2] + transform[4];
+      var yp = x * transform[1] + y * transform[3] + transform[5];
+      this.x = xp;
+      this.y = yp;
+    }
+  }], [{
+    key: "parse",
+    value: function parse(point) {
+      var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
+
+      var _toNumbers = toNumbers(point),
+          _toNumbers2 = _slicedToArray__default['default'](_toNumbers, 2),
+          _toNumbers2$ = _toNumbers2[0],
+          x = _toNumbers2$ === void 0 ? defaultValue : _toNumbers2$,
+          _toNumbers2$2 = _toNumbers2[1],
+          y = _toNumbers2$2 === void 0 ? defaultValue : _toNumbers2$2;
+
+      return new Point(x, y);
+    }
+  }, {
+    key: "parseScale",
+    value: function parseScale(scale) {
+      var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
+
+      var _toNumbers3 = toNumbers(scale),
+          _toNumbers4 = _slicedToArray__default['default'](_toNumbers3, 2),
+          _toNumbers4$ = _toNumbers4[0],
+          x = _toNumbers4$ === void 0 ? defaultValue : _toNumbers4$,
+          _toNumbers4$2 = _toNumbers4[1],
+          y = _toNumbers4$2 === void 0 ? x : _toNumbers4$2;
+
+      return new Point(x, y);
+    }
+  }, {
+    key: "parsePath",
+    value: function parsePath(path) {
+      var points = toNumbers(path);
+      var len = points.length;
+      var pathPoints = [];
+
+      for (var i = 0; i < len; i += 2) {
+        pathPoints.push(new Point(points[i], points[i + 1]));
+      }
+
+      return pathPoints;
+    }
+  }]);
+
+  return Point;
+}();
+
+var Mouse = /*#__PURE__*/function () {
+  function Mouse(screen) {
+    _classCallCheck__default['default'](this, Mouse);
+
+    this.screen = screen;
+    this.working = false;
+    this.events = [];
+    this.eventElements = []; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+
+    this.onClick = this.onClick.bind(this); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+
+    this.onMouseMove = this.onMouseMove.bind(this);
+  }
+
+  _createClass__default['default'](Mouse, [{
+    key: "isWorking",
+    value: function isWorking() {
+      return this.working;
+    }
+  }, {
+    key: "start",
+    value: function start() {
+      if (this.working) {
+        return;
+      }
+
+      var screen = this.screen,
+          onClick = this.onClick,
+          onMouseMove = this.onMouseMove;
+      var canvas = screen.ctx.canvas;
+      canvas.onclick = onClick;
+      canvas.onmousemove = onMouseMove;
+      this.working = true;
+    }
+  }, {
+    key: "stop",
+    value: function stop() {
+      if (!this.working) {
+        return;
+      }
+
+      var canvas = this.screen.ctx.canvas;
+      this.working = false;
+      canvas.onclick = null;
+      canvas.onmousemove = null;
+    }
+  }, {
+    key: "hasEvents",
+    value: function hasEvents() {
+      return this.working && this.events.length > 0;
+    }
+  }, {
+    key: "runEvents",
+    value: function runEvents() {
+      if (!this.working) {
+        return;
+      }
+
+      var document = this.screen,
+          events = this.events,
+          eventElements = this.eventElements;
+      var style = document.ctx.canvas.style;
+
+      if (style) {
+        style.cursor = '';
+      }
+
+      events.forEach(function (_ref, i) {
+        var run = _ref.run;
+        var element = eventElements[i];
+
+        while (element) {
+          run(element);
+          element = element.parent;
+        }
+      }); // done running, clear
+
+      this.events = [];
+      this.eventElements = [];
+    }
+  }, {
+    key: "checkPath",
+    value: function checkPath(element, ctx) {
+      if (!this.working || !ctx) {
+        return;
+      }
+
+      var events = this.events,
+          eventElements = this.eventElements;
+      events.forEach(function (_ref2, i) {
+        var x = _ref2.x,
+            y = _ref2.y;
+
+        if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {
+          eventElements[i] = element;
+        }
+      });
+    }
+  }, {
+    key: "checkBoundingBox",
+    value: function checkBoundingBox(element, boundingBox) {
+      if (!this.working || !boundingBox) {
+        return;
+      }
+
+      var events = this.events,
+          eventElements = this.eventElements;
+      events.forEach(function (_ref3, i) {
+        var x = _ref3.x,
+            y = _ref3.y;
+
+        if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {
+          eventElements[i] = element;
+        }
+      });
+    }
+  }, {
+    key: "mapXY",
+    value: function mapXY(x, y) {
+      var _this$screen = this.screen,
+          window = _this$screen.window,
+          ctx = _this$screen.ctx;
+      var point = new Point(x, y);
+      var element = ctx.canvas;
+
+      while (element) {
+        point.x -= element.offsetLeft;
+        point.y -= element.offsetTop;
+        element = element.offsetParent;
+      }
+
+      if (window.scrollX) {
+        point.x += window.scrollX;
+      }
+
+      if (window.scrollY) {
+        point.y += window.scrollY;
+      }
+
+      return point;
+    }
+  }, {
+    key: "onClick",
+    value: function onClick(event) {
+      var _this$mapXY = this.mapXY(event.clientX, event.clientY),
+          x = _this$mapXY.x,
+          y = _this$mapXY.y;
+
+      this.events.push({
+        type: 'onclick',
+        x: x,
+        y: y,
+        run: function run(eventTarget) {
+          if (eventTarget.onClick) {
+            eventTarget.onClick();
+          }
+        }
+      });
+    }
+  }, {
+    key: "onMouseMove",
+    value: function onMouseMove(event) {
+      var _this$mapXY2 = this.mapXY(event.clientX, event.clientY),
+          x = _this$mapXY2.x,
+          y = _this$mapXY2.y;
+
+      this.events.push({
+        type: 'onmousemove',
+        x: x,
+        y: y,
+        run: function run(eventTarget) {
+          if (eventTarget.onMouseMove) {
+            eventTarget.onMouseMove();
+          }
+        }
+      });
+    }
+  }]);
+
+  return Mouse;
+}();
+
+var defaultWindow = typeof window !== 'undefined' ? window : null;
+var defaultFetch$1 = typeof fetch !== 'undefined' ? fetch.bind(undefined) // `fetch` depends on context: `someObject.fetch(...)` will throw error.
+: null;
+
+var Screen = /*#__PURE__*/function () {
+  function Screen(ctx) {
+    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+        _ref$fetch = _ref.fetch,
+        fetch = _ref$fetch === void 0 ? defaultFetch$1 : _ref$fetch,
+        _ref$window = _ref.window,
+        window = _ref$window === void 0 ? defaultWindow : _ref$window;
+
+    _classCallCheck__default['default'](this, Screen);
+
+    this.ctx = ctx;
+    this.FRAMERATE = 30;
+    this.MAX_VIRTUAL_PIXELS = 30000;
+    this.CLIENT_WIDTH = 800;
+    this.CLIENT_HEIGHT = 600;
+    this.viewPort = new ViewPort();
+    this.mouse = new Mouse(this);
+    this.animations = [];
+    this.waits = [];
+    this.frameDuration = 0;
+    this.isReadyLock = false;
+    this.isFirstRender = true;
+    this.intervalId = null;
+    this.window = window;
+    this.fetch = fetch;
+  }
+
+  _createClass__default['default'](Screen, [{
+    key: "wait",
+    value: function wait(checker) {
+      this.waits.push(checker);
+    }
+  }, {
+    key: "ready",
+    value: function ready() {
+      // eslint-disable-next-line @typescript-eslint/no-misused-promises
+      if (!this.readyPromise) {
+        return Promise.resolve();
+      }
+
+      return this.readyPromise;
+    }
+  }, {
+    key: "isReady",
+    value: function isReady() {
+      if (this.isReadyLock) {
+        return true;
+      }
+
+      var isReadyLock = this.waits.every(function (_) {
+        return _();
+      });
+
+      if (isReadyLock) {
+        this.waits = [];
+
+        if (this.resolveReady) {
+          this.resolveReady();
+        }
+      }
+
+      this.isReadyLock = isReadyLock;
+      return isReadyLock;
+    }
+  }, {
+    key: "setDefaults",
+    value: function setDefaults(ctx) {
+      // initial values and defaults
+      ctx.strokeStyle = 'rgba(0,0,0,0)';
+      ctx.lineCap = 'butt';
+      ctx.lineJoin = 'miter';
+      ctx.miterLimit = 4;
+    }
+  }, {
+    key: "setViewBox",
+    value: function setViewBox(_ref2) {
+      var document = _ref2.document,
+          ctx = _ref2.ctx,
+          aspectRatio = _ref2.aspectRatio,
+          width = _ref2.width,
+          desiredWidth = _ref2.desiredWidth,
+          height = _ref2.height,
+          desiredHeight = _ref2.desiredHeight,
+          _ref2$minX = _ref2.minX,
+          minX = _ref2$minX === void 0 ? 0 : _ref2$minX,
+          _ref2$minY = _ref2.minY,
+          minY = _ref2$minY === void 0 ? 0 : _ref2$minY,
+          refX = _ref2.refX,
+          refY = _ref2.refY,
+          _ref2$clip = _ref2.clip,
+          clip = _ref2$clip === void 0 ? false : _ref2$clip,
+          _ref2$clipX = _ref2.clipX,
+          clipX = _ref2$clipX === void 0 ? 0 : _ref2$clipX,
+          _ref2$clipY = _ref2.clipY,
+          clipY = _ref2$clipY === void 0 ? 0 : _ref2$clipY;
+      // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
+      var cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\s/, ''); // ignore defer
+
+      var _cleanAspectRatio$spl = cleanAspectRatio.split(' '),
+          _cleanAspectRatio$spl2 = _slicedToArray__default['default'](_cleanAspectRatio$spl, 2),
+          aspectRatioAlign = _cleanAspectRatio$spl2[0],
+          aspectRatioMeetOrSlice = _cleanAspectRatio$spl2[1];
+
+      var align = aspectRatioAlign || 'xMidYMid';
+      var meetOrSlice = aspectRatioMeetOrSlice || 'meet'; // calculate scale
+
+      var scaleX = width / desiredWidth;
+      var scaleY = height / desiredHeight;
+      var scaleMin = Math.min(scaleX, scaleY);
+      var scaleMax = Math.max(scaleX, scaleY);
+      var finalDesiredWidth = desiredWidth;
+      var finalDesiredHeight = desiredHeight;
+
+      if (meetOrSlice === 'meet') {
+        finalDesiredWidth *= scaleMin;
+        finalDesiredHeight *= scaleMin;
+      }
+
+      if (meetOrSlice === 'slice') {
+        finalDesiredWidth *= scaleMax;
+        finalDesiredHeight *= scaleMax;
+      }
+
+      var refXProp = new Property(document, 'refX', refX);
+      var refYProp = new Property(document, 'refY', refY);
+      var hasRefs = refXProp.hasValue() && refYProp.hasValue();
+
+      if (hasRefs) {
+        ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));
+      }
+
+      if (clip) {
+        var scaledClipX = scaleMin * clipX;
+        var scaledClipY = scaleMin * clipY;
+        ctx.beginPath();
+        ctx.moveTo(scaledClipX, scaledClipY);
+        ctx.lineTo(width, scaledClipY);
+        ctx.lineTo(width, height);
+        ctx.lineTo(scaledClipX, height);
+        ctx.closePath();
+        ctx.clip();
+      }
+
+      if (!hasRefs) {
+        var isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;
+        var isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;
+        var isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;
+        var isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;
+
+        if (align.startsWith('xMid') && (isMeetMinY || isSliceMaxY)) {
+          ctx.translate(width / 2.0 - finalDesiredWidth / 2.0, 0);
+        }
+
+        if (align.endsWith('YMid') && (isMeetMinX || isSliceMaxX)) {
+          ctx.translate(0, height / 2.0 - finalDesiredHeight / 2.0);
+        }
+
+        if (align.startsWith('xMax') && (isMeetMinY || isSliceMaxY)) {
+          ctx.translate(width - finalDesiredWidth, 0);
+        }
+
+        if (align.endsWith('YMax') && (isMeetMinX || isSliceMaxX)) {
+          ctx.translate(0, height - finalDesiredHeight);
+        }
+      } // scale
+
+
+      switch (true) {
+        case align === 'none':
+          ctx.scale(scaleX, scaleY);
+          break;
+
+        case meetOrSlice === 'meet':
+          ctx.scale(scaleMin, scaleMin);
+          break;
+
+        case meetOrSlice === 'slice':
+          ctx.scale(scaleMax, scaleMax);
+          break;
+      } // translate
+
+
+      ctx.translate(-minX, -minY);
+    }
+  }, {
+    key: "start",
+    value: function start(element) {
+      var _this = this;
+
+      var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+          _ref3$enableRedraw = _ref3.enableRedraw,
+          enableRedraw = _ref3$enableRedraw === void 0 ? false : _ref3$enableRedraw,
+          _ref3$ignoreMouse = _ref3.ignoreMouse,
+          ignoreMouse = _ref3$ignoreMouse === void 0 ? false : _ref3$ignoreMouse,
+          _ref3$ignoreAnimation = _ref3.ignoreAnimation,
+          ignoreAnimation = _ref3$ignoreAnimation === void 0 ? false : _ref3$ignoreAnimation,
+          _ref3$ignoreDimension = _ref3.ignoreDimensions,
+          ignoreDimensions = _ref3$ignoreDimension === void 0 ? false : _ref3$ignoreDimension,
+          _ref3$ignoreClear = _ref3.ignoreClear,
+          ignoreClear = _ref3$ignoreClear === void 0 ? false : _ref3$ignoreClear,
+          forceRedraw = _ref3.forceRedraw,
+          scaleWidth = _ref3.scaleWidth,
+          scaleHeight = _ref3.scaleHeight,
+          offsetX = _ref3.offsetX,
+          offsetY = _ref3.offsetY;
+
+      var FRAMERATE = this.FRAMERATE,
+          mouse = this.mouse;
+      var frameDuration = 1000 / FRAMERATE;
+      this.frameDuration = frameDuration;
+      this.readyPromise = new Promise(function (resolve) {
+        _this.resolveReady = resolve;
+      });
+
+      if (this.isReady()) {
+        this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
+      }
+
+      if (!enableRedraw) {
+        return;
+      }
+
+      var now = Date.now();
+      var then = now;
+      var delta = 0;
+
+      var tick = function tick() {
+        now = Date.now();
+        delta = now - then;
+
+        if (delta >= frameDuration) {
+          then = now - delta % frameDuration;
+
+          if (_this.shouldUpdate(ignoreAnimation, forceRedraw)) {
+            _this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);
+
+            mouse.runEvents();
+          }
+        }
+
+        _this.intervalId = requestAnimationFrame__default['default'](tick);
+      };
+
+      if (!ignoreMouse) {
+        mouse.start();
+      }
+
+      this.intervalId = requestAnimationFrame__default['default'](tick);
+    }
+  }, {
+    key: "stop",
+    value: function stop() {
+      if (this.intervalId) {
+        requestAnimationFrame__default['default'].cancel(this.intervalId);
+        this.intervalId = null;
+      }
+
+      this.mouse.stop();
+    }
+  }, {
+    key: "shouldUpdate",
+    value: function shouldUpdate(ignoreAnimation, forceRedraw) {
+      // need update from animations?
+      if (!ignoreAnimation) {
+        var frameDuration = this.frameDuration;
+        var shouldUpdate = this.animations.reduce(function (shouldUpdate, animation) {
+          return animation.update(frameDuration) || shouldUpdate;
+        }, false);
+
+        if (shouldUpdate) {
+          return true;
+        }
+      } // need update from redraw?
+
+
+      if (typeof forceRedraw === 'function' && forceRedraw()) {
+        return true;
+      }
+
+      if (!this.isReadyLock && this.isReady()) {
+        return true;
+      } // need update from mouse events?
+
+
+      if (this.mouse.hasEvents()) {
+        return true;
+      }
+
+      return false;
+    }
+  }, {
+    key: "render",
+    value: function render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {
+      var CLIENT_WIDTH = this.CLIENT_WIDTH,
+          CLIENT_HEIGHT = this.CLIENT_HEIGHT,
+          viewPort = this.viewPort,
+          ctx = this.ctx,
+          isFirstRender = this.isFirstRender;
+      var canvas = ctx.canvas;
+      viewPort.clear();
+
+      if (canvas.width && canvas.height) {
+        viewPort.setCurrent(canvas.width, canvas.height);
+      } else {
+        viewPort.setCurrent(CLIENT_WIDTH, CLIENT_HEIGHT);
+      }
+
+      var widthStyle = element.getStyle('width');
+      var heightStyle = element.getStyle('height');
+
+      if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {
+        // set canvas size
+        if (widthStyle.hasValue()) {
+          canvas.width = widthStyle.getPixels('x');
+
+          if (canvas.style) {
+            canvas.style.width = "".concat(canvas.width, "px");
+          }
+        }
+
+        if (heightStyle.hasValue()) {
+          canvas.height = heightStyle.getPixels('y');
+
+          if (canvas.style) {
+            canvas.style.height = "".concat(canvas.height, "px");
+          }
+        }
+      }
+
+      var cWidth = canvas.clientWidth || canvas.width;
+      var cHeight = canvas.clientHeight || canvas.height;
+
+      if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {
+        cWidth = widthStyle.getPixels('x');
+        cHeight = heightStyle.getPixels('y');
+      }
+
+      viewPort.setCurrent(cWidth, cHeight);
+
+      if (typeof offsetX === 'number') {
+        element.getAttribute('x', true).setValue(offsetX);
+      }
+
+      if (typeof offsetY === 'number') {
+        element.getAttribute('y', true).setValue(offsetY);
+      }
+
+      if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {
+        var viewBox = toNumbers(element.getAttribute('viewBox').getString());
+        var xRatio = 0;
+        var yRatio = 0;
+
+        if (typeof scaleWidth === 'number') {
+          var _widthStyle = element.getStyle('width');
+
+          if (_widthStyle.hasValue()) {
+            xRatio = _widthStyle.getPixels('x') / scaleWidth;
+          } else if (!isNaN(viewBox[2])) {
+            xRatio = viewBox[2] / scaleWidth;
+          }
+        }
+
+        if (typeof scaleHeight === 'number') {
+          var _heightStyle = element.getStyle('height');
+
+          if (_heightStyle.hasValue()) {
+            yRatio = _heightStyle.getPixels('y') / scaleHeight;
+          } else if (!isNaN(viewBox[3])) {
+            yRatio = viewBox[3] / scaleHeight;
+          }
+        }
+
+        if (!xRatio) {
+          xRatio = yRatio;
+        }
+
+        if (!yRatio) {
+          yRatio = xRatio;
+        }
+
+        element.getAttribute('width', true).setValue(scaleWidth);
+        element.getAttribute('height', true).setValue(scaleHeight);
+        var transformStyle = element.getStyle('transform', true, true);
+        transformStyle.setValue("".concat(transformStyle.getString(), " scale(").concat(1.0 / xRatio, ", ").concat(1.0 / yRatio, ")"));
+      } // clear and render
+
+
+      if (!ignoreClear) {
+        ctx.clearRect(0, 0, cWidth, cHeight);
+      }
+
+      element.render(ctx);
+
+      if (isFirstRender) {
+        this.isFirstRender = false;
+      }
+    }
+  }]);
+
+  return Screen;
+}();
+Screen.defaultWindow = defaultWindow;
+Screen.defaultFetch = defaultFetch$1;
+
+var defaultFetch = Screen.defaultFetch;
+var DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : null;
+
+var Parser = /*#__PURE__*/function () {
+  function Parser() {
+    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
+        _ref$fetch = _ref.fetch,
+        fetch = _ref$fetch === void 0 ? defaultFetch : _ref$fetch,
+        _ref$DOMParser = _ref.DOMParser,
+        DOMParser = _ref$DOMParser === void 0 ? DefaultDOMParser : _ref$DOMParser;
+
+    _classCallCheck__default['default'](this, Parser);
+
+    this.fetch = fetch;
+    this.DOMParser = DOMParser;
+  }
+
+  _createClass__default['default'](Parser, [{
+    key: "parse",
+    value: function () {
+      var _parse = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(resource) {
+        return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                if (!resource.startsWith('<')) {
+                  _context.next = 2;
+                  break;
+                }
+
+                return _context.abrupt("return", this.parseFromString(resource));
+
+              case 2:
+                return _context.abrupt("return", this.load(resource));
+
+              case 3:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee, this);
+      }));
+
+      function parse(_x) {
+        return _parse.apply(this, arguments);
+      }
+
+      return parse;
+    }()
+  }, {
+    key: "parseFromString",
+    value: function parseFromString(xml) {
+      var parser = new this.DOMParser();
+
+      try {
+        return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));
+      } catch (err) {
+        return this.checkDocument(parser.parseFromString(xml, 'text/xml'));
+      }
+    }
+  }, {
+    key: "checkDocument",
+    value: function checkDocument(document) {
+      var parserError = document.getElementsByTagName('parsererror')[0];
+
+      if (parserError) {
+        throw new Error(parserError.textContent);
+      }
+
+      return document;
+    }
+  }, {
+    key: "load",
+    value: function () {
+      var _load = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(url) {
+        var response, xml;
+        return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
+          while (1) {
+            switch (_context2.prev = _context2.next) {
+              case 0:
+                _context2.next = 2;
+                return this.fetch(url);
+
+              case 2:
+                response = _context2.sent;
+                _context2.next = 5;
+                return response.text();
+
+              case 5:
+                xml = _context2.sent;
+                return _context2.abrupt("return", this.parseFromString(xml));
+
+              case 7:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2, this);
+      }));
+
+      function load(_x2) {
+        return _load.apply(this, arguments);
+      }
+
+      return load;
+    }()
+  }]);
+
+  return Parser;
+}();
+
+var Translate = /*#__PURE__*/function () {
+  function Translate(_, point) {
+    _classCallCheck__default['default'](this, Translate);
+
+    this.type = 'translate';
+    this.point = null;
+    this.point = Point.parse(point);
+  }
+
+  _createClass__default['default'](Translate, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var _this$point = this.point,
+          x = _this$point.x,
+          y = _this$point.y;
+      ctx.translate(x || 0.0, y || 0.0);
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var _this$point2 = this.point,
+          x = _this$point2.x,
+          y = _this$point2.y;
+      ctx.translate(-1.0 * x || 0.0, -1.0 * y || 0.0);
+    }
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      var _this$point3 = this.point,
+          x = _this$point3.x,
+          y = _this$point3.y;
+      point.applyTransform([1, 0, 0, 1, x || 0.0, y || 0.0]);
+    }
+  }]);
+
+  return Translate;
+}();
+
+var Rotate = /*#__PURE__*/function () {
+  function Rotate(document, rotate, transformOrigin) {
+    _classCallCheck__default['default'](this, Rotate);
+
+    this.type = 'rotate';
+    this.angle = null;
+    this.originX = null;
+    this.originY = null;
+    this.cx = 0;
+    this.cy = 0;
+    var numbers = toNumbers(rotate);
+    this.angle = new Property(document, 'angle', numbers[0]);
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+    this.cx = numbers[1] || 0;
+    this.cy = numbers[2] || 0;
+  }
+
+  _createClass__default['default'](Rotate, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var cx = this.cx,
+          cy = this.cy,
+          originX = this.originX,
+          originY = this.originY,
+          angle = this.angle;
+      var tx = cx + originX.getPixels('x');
+      var ty = cy + originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.rotate(angle.getRadians());
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var cx = this.cx,
+          cy = this.cy,
+          originX = this.originX,
+          originY = this.originY,
+          angle = this.angle;
+      var tx = cx + originX.getPixels('x');
+      var ty = cy + originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.rotate(-1.0 * angle.getRadians());
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      var cx = this.cx,
+          cy = this.cy,
+          angle = this.angle;
+      var rad = angle.getRadians();
+      point.applyTransform([1, 0, 0, 1, cx || 0.0, cy || 0.0 // this.p.y
+      ]);
+      point.applyTransform([Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0]);
+      point.applyTransform([1, 0, 0, 1, -cx || 0.0, -cy || 0.0 // -this.p.y
+      ]);
+    }
+  }]);
+
+  return Rotate;
+}();
+
+var Scale = /*#__PURE__*/function () {
+  function Scale(_, scale, transformOrigin) {
+    _classCallCheck__default['default'](this, Scale);
+
+    this.type = 'scale';
+    this.scale = null;
+    this.originX = null;
+    this.originY = null;
+    var scaleSize = Point.parseScale(scale); // Workaround for node-canvas
+
+    if (scaleSize.x === 0 || scaleSize.y === 0) {
+      scaleSize.x = PSEUDO_ZERO;
+      scaleSize.y = PSEUDO_ZERO;
+    }
+
+    this.scale = scaleSize;
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+  }
+
+  _createClass__default['default'](Scale, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var _this$scale = this.scale,
+          x = _this$scale.x,
+          y = _this$scale.y,
+          originX = this.originX,
+          originY = this.originY;
+      var tx = originX.getPixels('x');
+      var ty = originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.scale(x, y || x);
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var _this$scale2 = this.scale,
+          x = _this$scale2.x,
+          y = _this$scale2.y,
+          originX = this.originX,
+          originY = this.originY;
+      var tx = originX.getPixels('x');
+      var ty = originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.scale(1.0 / x, 1.0 / y || x);
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      var _this$scale3 = this.scale,
+          x = _this$scale3.x,
+          y = _this$scale3.y;
+      point.applyTransform([x || 0.0, 0, 0, y || 0.0, 0, 0]);
+    }
+  }]);
+
+  return Scale;
+}();
+
+var Matrix = /*#__PURE__*/function () {
+  function Matrix(_, matrix, transformOrigin) {
+    _classCallCheck__default['default'](this, Matrix);
+
+    this.type = 'matrix';
+    this.matrix = [];
+    this.originX = null;
+    this.originY = null;
+    this.matrix = toNumbers(matrix);
+    this.originX = transformOrigin[0];
+    this.originY = transformOrigin[1];
+  }
+
+  _createClass__default['default'](Matrix, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var originX = this.originX,
+          originY = this.originY,
+          matrix = this.matrix;
+      var tx = originX.getPixels('x');
+      var ty = originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var originX = this.originX,
+          originY = this.originY,
+          matrix = this.matrix;
+      var a = matrix[0];
+      var b = matrix[2];
+      var c = matrix[4];
+      var d = matrix[1];
+      var e = matrix[3];
+      var f = matrix[5];
+      var g = 0.0;
+      var h = 0.0;
+      var i = 1.0;
+      var det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));
+      var tx = originX.getPixels('x');
+      var ty = originY.getPixels('y');
+      ctx.translate(tx, ty);
+      ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));
+      ctx.translate(-tx, -ty);
+    }
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      point.applyTransform(this.matrix);
+    }
+  }]);
+
+  return Matrix;
+}();
+
+function _createSuper$M(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$M(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$M() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var Skew = /*#__PURE__*/function (_Matrix) {
+  _inherits__default['default'](Skew, _Matrix);
+
+  var _super = _createSuper$M(Skew);
+
+  function Skew(document, skew, transformOrigin) {
+    var _this;
+
+    _classCallCheck__default['default'](this, Skew);
+
+    _this = _super.call(this, document, skew, transformOrigin);
+    _this.type = 'skew';
+    _this.angle = null;
+    _this.angle = new Property(document, 'angle', skew);
+    return _this;
+  }
+
+  return Skew;
+}(Matrix);
+
+function _createSuper$L(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$L(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$L() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var SkewX = /*#__PURE__*/function (_Skew) {
+  _inherits__default['default'](SkewX, _Skew);
+
+  var _super = _createSuper$L(SkewX);
+
+  function SkewX(document, skew, transformOrigin) {
+    var _this;
+
+    _classCallCheck__default['default'](this, SkewX);
+
+    _this = _super.call(this, document, skew, transformOrigin);
+    _this.type = 'skewX';
+    _this.matrix = [1, 0, Math.tan(_this.angle.getRadians()), 1, 0, 0];
+    return _this;
+  }
+
+  return SkewX;
+}(Skew);
+
+function _createSuper$K(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$K(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$K() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var SkewY = /*#__PURE__*/function (_Skew) {
+  _inherits__default['default'](SkewY, _Skew);
+
+  var _super = _createSuper$K(SkewY);
+
+  function SkewY(document, skew, transformOrigin) {
+    var _this;
+
+    _classCallCheck__default['default'](this, SkewY);
+
+    _this = _super.call(this, document, skew, transformOrigin);
+    _this.type = 'skewY';
+    _this.matrix = [1, Math.tan(_this.angle.getRadians()), 0, 1, 0, 0];
+    return _this;
+  }
+
+  return SkewY;
+}(Skew);
+
+function parseTransforms(transform) {
+  return compressSpaces(transform).trim().replace(/\)([a-zA-Z])/g, ') $1').replace(/\)(\s?,\s?)/g, ') ').split(/\s(?=[a-z])/);
+}
+
+function parseTransform(transform) {
+  var _transform$split = transform.split('('),
+      _transform$split2 = _slicedToArray__default['default'](_transform$split, 2),
+      type = _transform$split2[0],
+      value = _transform$split2[1];
+
+  return [type.trim(), value.trim().replace(')', '')];
+}
+
+var Transform = /*#__PURE__*/function () {
+  function Transform(document, transform, transformOrigin) {
+    var _this = this;
+
+    _classCallCheck__default['default'](this, Transform);
+
+    this.document = document;
+    this.transforms = [];
+    var data = parseTransforms(transform);
+    data.forEach(function (transform) {
+      if (transform === 'none') {
+        return;
+      }
+
+      var _parseTransform = parseTransform(transform),
+          _parseTransform2 = _slicedToArray__default['default'](_parseTransform, 2),
+          type = _parseTransform2[0],
+          value = _parseTransform2[1];
+
+      var TransformType = Transform.transformTypes[type];
+
+      if (typeof TransformType !== 'undefined') {
+        _this.transforms.push(new TransformType(_this.document, value, transformOrigin));
+      }
+    });
+  }
+
+  _createClass__default['default'](Transform, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var transforms = this.transforms;
+      var len = transforms.length;
+
+      for (var i = 0; i < len; i++) {
+        transforms[i].apply(ctx);
+      }
+    }
+  }, {
+    key: "unapply",
+    value: function unapply(ctx) {
+      var transforms = this.transforms;
+      var len = transforms.length;
+
+      for (var i = len - 1; i >= 0; i--) {
+        transforms[i].unapply(ctx);
+      }
+    } // TODO: applyToPoint unused ... remove?
+
+  }, {
+    key: "applyToPoint",
+    value: function applyToPoint(point) {
+      var transforms = this.transforms;
+      var len = transforms.length;
+
+      for (var i = 0; i < len; i++) {
+        transforms[i].applyToPoint(point);
+      }
+    }
+  }], [{
+    key: "fromElement",
+    value: function fromElement(document, element) {
+      var transformStyle = element.getStyle('transform', false, true);
+
+      var _element$getStyle$spl = element.getStyle('transform-origin', false, true).split(),
+          _element$getStyle$spl2 = _slicedToArray__default['default'](_element$getStyle$spl, 2),
+          transformOriginXProperty = _element$getStyle$spl2[0],
+          _element$getStyle$spl3 = _element$getStyle$spl2[1],
+          transformOriginYProperty = _element$getStyle$spl3 === void 0 ? transformOriginXProperty : _element$getStyle$spl3;
+
+      var transformOrigin = [transformOriginXProperty, transformOriginYProperty];
+
+      if (transformStyle.hasValue()) {
+        return new Transform(document, transformStyle.getString(), transformOrigin);
+      }
+
+      return null;
+    }
+  }]);
+
+  return Transform;
+}();
+Transform.transformTypes = {
+  translate: Translate,
+  rotate: Rotate,
+  scale: Scale,
+  matrix: Matrix,
+  skewX: SkewX,
+  skewY: SkewY
+};
+
+var Element = /*#__PURE__*/function () {
+  function Element(document, node) {
+    var _this = this;
+
+    var captureTextNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+    _classCallCheck__default['default'](this, Element);
+
+    this.document = document;
+    this.node = node;
+    this.captureTextNodes = captureTextNodes;
+    this.attributes = {};
+    this.styles = {};
+    this.stylesSpecificity = {};
+    this.animationFrozen = false;
+    this.animationFrozenValue = '';
+    this.parent = null;
+    this.children = [];
+
+    if (!node || node.nodeType !== 1) {
+      // ELEMENT_NODE
+      return;
+    } // add attributes
+
+
+    Array.from(node.attributes).forEach(function (attribute) {
+      var nodeName = normalizeAttributeName(attribute.nodeName);
+      _this.attributes[nodeName] = new Property(document, nodeName, attribute.value);
+    });
+    this.addStylesFromStyleDefinition(); // add inline styles
+
+    if (this.getAttribute('style').hasValue()) {
+      var styles = this.getAttribute('style').getString().split(';').map(function (_) {
+        return _.trim();
+      });
+      styles.forEach(function (style) {
+        if (!style) {
+          return;
+        }
+
+        var _style$split$map = style.split(':').map(function (_) {
+          return _.trim();
+        }),
+            _style$split$map2 = _slicedToArray__default['default'](_style$split$map, 2),
+            name = _style$split$map2[0],
+            value = _style$split$map2[1];
+
+        _this.styles[name] = new Property(document, name, value);
+      });
+    }
+
+    var definitions = document.definitions;
+    var id = this.getAttribute('id'); // add id
+
+    if (id.hasValue()) {
+      if (!definitions[id.getString()]) {
+        definitions[id.getString()] = this;
+      }
+    }
+
+    Array.from(node.childNodes).forEach(function (childNode) {
+      if (childNode.nodeType === 1) {
+        _this.addChild(childNode); // ELEMENT_NODE
+
+      } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {
+        var textNode = document.createTextNode(childNode);
+
+        if (textNode.getText().length > 0) {
+          _this.addChild(textNode); // TEXT_NODE
+
+        }
+      }
+    });
+  }
+
+  _createClass__default['default'](Element, [{
+    key: "getAttribute",
+    value: function getAttribute(name) {
+      var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+      var attr = this.attributes[name];
+
+      if (!attr && createIfNotExists) {
+        var _attr = new Property(this.document, name, '');
+
+        this.attributes[name] = _attr;
+        return _attr;
+      }
+
+      return attr || Property.empty(this.document);
+    }
+  }, {
+    key: "getHrefAttribute",
+    value: function getHrefAttribute() {
+      for (var key in this.attributes) {
+        if (key === 'href' || key.endsWith(':href')) {
+          return this.attributes[key];
+        }
+      }
+
+      return Property.empty(this.document);
+    }
+  }, {
+    key: "getStyle",
+    value: function getStyle(name) {
+      var createIfNotExists = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+      var skipAncestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      var style = this.styles[name];
+
+      if (style) {
+        return style;
+      }
+
+      var attr = this.getAttribute(name);
+
+      if (attr !== null && attr !== void 0 && attr.hasValue()) {
+        this.styles[name] = attr; // move up to me to cache
+
+        return attr;
+      }
+
+      if (!skipAncestors) {
+        var parent = this.parent;
+
+        if (parent) {
+          var parentStyle = parent.getStyle(name);
+
+          if (parentStyle !== null && parentStyle !== void 0 && parentStyle.hasValue()) {
+            return parentStyle;
+          }
+        }
+      }
+
+      if (createIfNotExists) {
+        var _style = new Property(this.document, name, '');
+
+        this.styles[name] = _style;
+        return _style;
+      }
+
+      return style || Property.empty(this.document);
+    }
+  }, {
+    key: "render",
+    value: function render(ctx) {
+      // don't render display=none
+      // don't render visibility=hidden
+      if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {
+        return;
+      }
+
+      ctx.save();
+
+      if (this.getStyle('mask').hasValue()) {
+        // mask
+        var mask = this.getStyle('mask').getDefinition();
+
+        if (mask) {
+          this.applyEffects(ctx);
+          mask.apply(ctx, this);
+        }
+      } else if (this.getStyle('filter').getValue('none') !== 'none') {
+        // filter
+        var filter = this.getStyle('filter').getDefinition();
+
+        if (filter) {
+          this.applyEffects(ctx);
+          filter.apply(ctx, this);
+        }
+      } else {
+        this.setContext(ctx);
+        this.renderChildren(ctx);
+        this.clearContext(ctx);
+      }
+
+      ctx.restore();
+    }
+  }, {
+    key: "setContext",
+    value: function setContext(_) {// NO RENDER
+    }
+  }, {
+    key: "applyEffects",
+    value: function applyEffects(ctx) {
+      // transform
+      var transform = Transform.fromElement(this.document, this);
+
+      if (transform) {
+        transform.apply(ctx);
+      } // clip
+
+
+      var clipPathStyleProp = this.getStyle('clip-path', false, true);
+
+      if (clipPathStyleProp.hasValue()) {
+        var clip = clipPathStyleProp.getDefinition();
+
+        if (clip) {
+          clip.apply(ctx);
+        }
+      }
+    }
+  }, {
+    key: "clearContext",
+    value: function clearContext(_) {// NO RENDER
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      this.children.forEach(function (child) {
+        child.render(ctx);
+      });
+    }
+  }, {
+    key: "addChild",
+    value: function addChild(childNode) {
+      var child = childNode instanceof Element ? childNode : this.document.createElement(childNode);
+      child.parent = this;
+
+      if (!Element.ignoreChildTypes.includes(child.type)) {
+        this.children.push(child);
+      }
+    }
+  }, {
+    key: "matchesSelector",
+    value: function matchesSelector(selector) {
+      var node = this.node;
+
+      if (typeof node.matches === 'function') {
+        return node.matches(selector);
+      }
+
+      var styleClasses = node.getAttribute('class');
+
+      if (!styleClasses || styleClasses === '') {
+        return false;
+      }
+
+      return styleClasses.split(' ').some(function (styleClass) {
+        return ".".concat(styleClass) === selector;
+      });
+    }
+  }, {
+    key: "addStylesFromStyleDefinition",
+    value: function addStylesFromStyleDefinition() {
+      var _this$document = this.document,
+          styles = _this$document.styles,
+          stylesSpecificity = _this$document.stylesSpecificity;
+
+      for (var selector in styles) {
+        if (!selector.startsWith('@') && this.matchesSelector(selector)) {
+          var style = styles[selector];
+          var specificity = stylesSpecificity[selector];
+
+          if (style) {
+            for (var name in style) {
+              var existingSpecificity = this.stylesSpecificity[name];
+
+              if (typeof existingSpecificity === 'undefined') {
+                existingSpecificity = '000';
+              }
+
+              if (specificity >= existingSpecificity) {
+                this.styles[name] = style[name];
+                this.stylesSpecificity[name] = specificity;
+              }
+            }
+          }
+        }
+      }
+    }
+  }, {
+    key: "removeStyles",
+    value: function removeStyles(element, ignoreStyles) {
+      var toRestore = ignoreStyles.reduce(function (toRestore, name) {
+        var styleProp = element.getStyle(name);
+
+        if (!styleProp.hasValue()) {
+          return toRestore;
+        }
+
+        var value = styleProp.getString();
+        styleProp.setValue('');
+        return [].concat(_toConsumableArray__default['default'](toRestore), [[name, value]]);
+      }, []);
+      return toRestore;
+    }
+  }, {
+    key: "restoreStyles",
+    value: function restoreStyles(element, styles) {
+      styles.forEach(function (_ref) {
+        var _ref2 = _slicedToArray__default['default'](_ref, 2),
+            name = _ref2[0],
+            value = _ref2[1];
+
+        element.getStyle(name, true).setValue(value);
+      });
+    }
+  }]);
+
+  return Element;
+}();
+Element.ignoreChildTypes = ['title'];
+
+function _createSuper$J(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$J(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$J() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var UnknownElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](UnknownElement, _Element);
+
+  var _super = _createSuper$J(UnknownElement);
+
+  function UnknownElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, UnknownElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+
+    return _this;
+  }
+
+  return UnknownElement;
+}(Element);
+
+function wrapFontFamily(fontFamily) {
+  var trimmed = fontFamily.trim();
+  return /^('|")/.test(trimmed) ? trimmed : "\"".concat(trimmed, "\"");
+}
+
+function prepareFontFamily(fontFamily) {
+  return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
+}
+/**
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
+ * @param fontStyle
+ * @returns CSS font style.
+ */
+
+
+function prepareFontStyle(fontStyle) {
+  if (!fontStyle) {
+    return '';
+  }
+
+  var targetFontStyle = fontStyle.trim().toLowerCase();
+
+  switch (targetFontStyle) {
+    case 'normal':
+    case 'italic':
+    case 'oblique':
+    case 'inherit':
+    case 'initial':
+    case 'unset':
+      return targetFontStyle;
+
+    default:
+      if (/^oblique\s+(-|)\d+deg$/.test(targetFontStyle)) {
+        return targetFontStyle;
+      }
+
+      return '';
+  }
+}
+/**
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
+ * @param fontWeight
+ * @returns CSS font weight.
+ */
+
+
+function prepareFontWeight(fontWeight) {
+  if (!fontWeight) {
+    return '';
+  }
+
+  var targetFontWeight = fontWeight.trim().toLowerCase();
+
+  switch (targetFontWeight) {
+    case 'normal':
+    case 'bold':
+    case 'lighter':
+    case 'bolder':
+    case 'inherit':
+    case 'initial':
+    case 'unset':
+      return targetFontWeight;
+
+    default:
+      if (/^[\d.]+$/.test(targetFontWeight)) {
+        return targetFontWeight;
+      }
+
+      return '';
+  }
+}
+
+var Font = /*#__PURE__*/function () {
+  function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
+    _classCallCheck__default['default'](this, Font);
+
+    var inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};
+    this.fontFamily = fontFamily || inheritFont.fontFamily;
+    this.fontSize = fontSize || inheritFont.fontSize;
+    this.fontStyle = fontStyle || inheritFont.fontStyle;
+    this.fontWeight = fontWeight || inheritFont.fontWeight;
+    this.fontVariant = fontVariant || inheritFont.fontVariant;
+  }
+
+  _createClass__default['default'](Font, [{
+    key: "toString",
+    value: function toString() {
+      return [prepareFontStyle(this.fontStyle), this.fontVariant, prepareFontWeight(this.fontWeight), this.fontSize, // Wrap fontFamily only on nodejs and only for canvas.ctx
+      prepareFontFamily(this.fontFamily)].join(' ').trim();
+    }
+  }], [{
+    key: "parse",
+    value: function parse() {
+      var font = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+      var inherit = arguments.length > 1 ? arguments[1] : undefined;
+      var fontStyle = '';
+      var fontVariant = '';
+      var fontWeight = '';
+      var fontSize = '';
+      var fontFamily = '';
+      var parts = compressSpaces(font).trim().split(' ');
+      var set = {
+        fontSize: false,
+        fontStyle: false,
+        fontWeight: false,
+        fontVariant: false
+      };
+      parts.forEach(function (part) {
+        switch (true) {
+          case !set.fontStyle && Font.styles.includes(part):
+            if (part !== 'inherit') {
+              fontStyle = part;
+            }
+
+            set.fontStyle = true;
+            break;
+
+          case !set.fontVariant && Font.variants.includes(part):
+            if (part !== 'inherit') {
+              fontVariant = part;
+            }
+
+            set.fontStyle = true;
+            set.fontVariant = true;
+            break;
+
+          case !set.fontWeight && Font.weights.includes(part):
+            if (part !== 'inherit') {
+              fontWeight = part;
+            }
+
+            set.fontStyle = true;
+            set.fontVariant = true;
+            set.fontWeight = true;
+            break;
+
+          case !set.fontSize:
+            if (part !== 'inherit') {
+              var _part$split = part.split('/');
+
+              var _part$split2 = _slicedToArray__default['default'](_part$split, 1);
+
+              fontSize = _part$split2[0];
+            }
+
+            set.fontStyle = true;
+            set.fontVariant = true;
+            set.fontWeight = true;
+            set.fontSize = true;
+            break;
+
+          default:
+            if (part !== 'inherit') {
+              fontFamily += part;
+            }
+
+        }
+      });
+      return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);
+    }
+  }]);
+
+  return Font;
+}();
+Font.styles = 'normal|italic|oblique|inherit';
+Font.variants = 'normal|small-caps|inherit';
+Font.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';
+
+var BoundingBox = /*#__PURE__*/function () {
+  function BoundingBox() {
+    var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.NaN;
+    var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.NaN;
+    var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.NaN;
+    var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Number.NaN;
+
+    _classCallCheck__default['default'](this, BoundingBox);
+
+    this.x1 = x1;
+    this.y1 = y1;
+    this.x2 = x2;
+    this.y2 = y2;
+    this.addPoint(x1, y1);
+    this.addPoint(x2, y2);
+  }
+
+  _createClass__default['default'](BoundingBox, [{
+    key: "addPoint",
+    value: function addPoint(x, y) {
+      if (typeof x !== 'undefined') {
+        if (isNaN(this.x1) || isNaN(this.x2)) {
+          this.x1 = x;
+          this.x2 = x;
+        }
+
+        if (x < this.x1) {
+          this.x1 = x;
+        }
+
+        if (x > this.x2) {
+          this.x2 = x;
+        }
+      }
+
+      if (typeof y !== 'undefined') {
+        if (isNaN(this.y1) || isNaN(this.y2)) {
+          this.y1 = y;
+          this.y2 = y;
+        }
+
+        if (y < this.y1) {
+          this.y1 = y;
+        }
+
+        if (y > this.y2) {
+          this.y2 = y;
+        }
+      }
+    }
+  }, {
+    key: "addX",
+    value: function addX(x) {
+      this.addPoint(x, null);
+    }
+  }, {
+    key: "addY",
+    value: function addY(y) {
+      this.addPoint(null, y);
+    }
+  }, {
+    key: "addBoundingBox",
+    value: function addBoundingBox(boundingBox) {
+      if (!boundingBox) {
+        return;
+      }
+
+      var x1 = boundingBox.x1,
+          y1 = boundingBox.y1,
+          x2 = boundingBox.x2,
+          y2 = boundingBox.y2;
+      this.addPoint(x1, y1);
+      this.addPoint(x2, y2);
+    }
+  }, {
+    key: "sumCubic",
+    value: function sumCubic(t, p0, p1, p2, p3) {
+      return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;
+    }
+  }, {
+    key: "bezierCurveAdd",
+    value: function bezierCurveAdd(forX, p0, p1, p2, p3) {
+      var b = 6 * p0 - 12 * p1 + 6 * p2;
+      var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;
+      var c = 3 * p1 - 3 * p0;
+
+      if (a === 0) {
+        if (b === 0) {
+          return;
+        }
+
+        var t = -c / b;
+
+        if (0 < t && t < 1) {
+          if (forX) {
+            this.addX(this.sumCubic(t, p0, p1, p2, p3));
+          } else {
+            this.addY(this.sumCubic(t, p0, p1, p2, p3));
+          }
+        }
+
+        return;
+      }
+
+      var b2ac = Math.pow(b, 2) - 4 * c * a;
+
+      if (b2ac < 0) {
+        return;
+      }
+
+      var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
+
+      if (0 < t1 && t1 < 1) {
+        if (forX) {
+          this.addX(this.sumCubic(t1, p0, p1, p2, p3));
+        } else {
+          this.addY(this.sumCubic(t1, p0, p1, p2, p3));
+        }
+      }
+
+      var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
+
+      if (0 < t2 && t2 < 1) {
+        if (forX) {
+          this.addX(this.sumCubic(t2, p0, p1, p2, p3));
+        } else {
+          this.addY(this.sumCubic(t2, p0, p1, p2, p3));
+        }
+      }
+    } // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
+
+  }, {
+    key: "addBezierCurve",
+    value: function addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
+      this.addPoint(p0x, p0y);
+      this.addPoint(p3x, p3y);
+      this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);
+      this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);
+    }
+  }, {
+    key: "addQuadraticCurve",
+    value: function addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
+      var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
+
+      var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
+
+      var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
+
+      var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
+
+      this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
+    }
+  }, {
+    key: "isPointInBox",
+    value: function isPointInBox(x, y) {
+      var x1 = this.x1,
+          y1 = this.y1,
+          x2 = this.x2,
+          y2 = this.y2;
+      return x1 <= x && x <= x2 && y1 <= y && y <= y2;
+    }
+  }, {
+    key: "x",
+    get: function get() {
+      return this.x1;
+    }
+  }, {
+    key: "y",
+    get: function get() {
+      return this.y1;
+    }
+  }, {
+    key: "width",
+    get: function get() {
+      return this.x2 - this.x1;
+    }
+  }, {
+    key: "height",
+    get: function get() {
+      return this.y2 - this.y1;
+    }
+  }]);
+
+  return BoundingBox;
+}();
+
+function _createSuper$I(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$I(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$I() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var PathParser = /*#__PURE__*/function (_SVGPathData) {
+  _inherits__default['default'](PathParser, _SVGPathData);
+
+  var _super = _createSuper$I(PathParser);
+
+  function PathParser(path) {
+    var _this;
+
+    _classCallCheck__default['default'](this, PathParser);
+
+    _this = _super.call(this, path // Fix spaces after signs.
+    .replace(/([+\-.])\s+/gm, '$1') // Remove invalid part.
+    .replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g, ''));
+    _this.control = null;
+    _this.start = null;
+    _this.current = null;
+    _this.command = null;
+    _this.commands = _this.commands;
+    _this.i = -1;
+    _this.previousCommand = null;
+    _this.points = [];
+    _this.angles = [];
+    return _this;
+  }
+
+  _createClass__default['default'](PathParser, [{
+    key: "reset",
+    value: function reset() {
+      this.i = -1;
+      this.command = null;
+      this.previousCommand = null;
+      this.start = new Point(0, 0);
+      this.control = new Point(0, 0);
+      this.current = new Point(0, 0);
+      this.points = [];
+      this.angles = [];
+    }
+  }, {
+    key: "isEnd",
+    value: function isEnd() {
+      var i = this.i,
+          commands = this.commands;
+      return i >= commands.length - 1;
+    }
+  }, {
+    key: "next",
+    value: function next() {
+      var command = this.commands[++this.i];
+      this.previousCommand = this.command;
+      this.command = command;
+      return command;
+    }
+  }, {
+    key: "getPoint",
+    value: function getPoint() {
+      var xProp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'x';
+      var yProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'y';
+      var point = new Point(this.command[xProp], this.command[yProp]);
+      return this.makeAbsolute(point);
+    }
+  }, {
+    key: "getAsControlPoint",
+    value: function getAsControlPoint(xProp, yProp) {
+      var point = this.getPoint(xProp, yProp);
+      this.control = point;
+      return point;
+    }
+  }, {
+    key: "getAsCurrentPoint",
+    value: function getAsCurrentPoint(xProp, yProp) {
+      var point = this.getPoint(xProp, yProp);
+      this.current = point;
+      return point;
+    }
+  }, {
+    key: "getReflectedControlPoint",
+    value: function getReflectedControlPoint() {
+      var previousCommand = this.previousCommand.type;
+
+      if (previousCommand !== svgPathdata.SVGPathData.CURVE_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_CURVE_TO && previousCommand !== svgPathdata.SVGPathData.QUAD_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_QUAD_TO) {
+        return this.current;
+      } // reflect point
+
+
+      var _this$current = this.current,
+          cx = _this$current.x,
+          cy = _this$current.y,
+          _this$control = this.control,
+          ox = _this$control.x,
+          oy = _this$control.y;
+      var point = new Point(2 * cx - ox, 2 * cy - oy);
+      return point;
+    }
+  }, {
+    key: "makeAbsolute",
+    value: function makeAbsolute(point) {
+      if (this.command.relative) {
+        var _this$current2 = this.current,
+            x = _this$current2.x,
+            y = _this$current2.y;
+        point.x += x;
+        point.y += y;
+      }
+
+      return point;
+    }
+  }, {
+    key: "addMarker",
+    value: function addMarker(point, from, priorTo) {
+      var points = this.points,
+          angles = this.angles; // if the last angle isn't filled in because we didn't have this point yet ...
+
+      if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {
+        angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);
+      }
+
+      this.addMarkerAngle(point, from ? from.angleTo(point) : null);
+    }
+  }, {
+    key: "addMarkerAngle",
+    value: function addMarkerAngle(point, angle) {
+      this.points.push(point);
+      this.angles.push(angle);
+    }
+  }, {
+    key: "getMarkerPoints",
+    value: function getMarkerPoints() {
+      return this.points;
+    }
+  }, {
+    key: "getMarkerAngles",
+    value: function getMarkerAngles() {
+      var angles = this.angles;
+      var len = angles.length;
+
+      for (var i = 0; i < len; i++) {
+        if (!angles[i]) {
+          for (var j = i + 1; j < len; j++) {
+            if (angles[j]) {
+              angles[i] = angles[j];
+              break;
+            }
+          }
+        }
+      }
+
+      return angles;
+    }
+  }]);
+
+  return PathParser;
+}(svgPathdata.SVGPathData);
+
+function _createSuper$H(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$H(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$H() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var RenderedElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](RenderedElement, _Element);
+
+  var _super = _createSuper$H(RenderedElement);
+
+  function RenderedElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, RenderedElement);
+
+    _this = _super.apply(this, arguments);
+    _this.modifiedEmSizeStack = false;
+    return _this;
+  }
+
+  _createClass__default['default'](RenderedElement, [{
+    key: "calculateOpacity",
+    value: function calculateOpacity() {
+      var opacity = 1.0; // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
+
+      var element = this;
+
+      while (element) {
+        var opacityStyle = element.getStyle('opacity', false, true); // no ancestors on style call
+
+        if (opacityStyle.hasValue(true)) {
+          opacity *= opacityStyle.getNumber();
+        }
+
+        element = element.parent;
+      }
+
+      return opacity;
+    }
+  }, {
+    key: "setContext",
+    value: function setContext(ctx) {
+      var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      if (!fromMeasure) {
+        // causes stack overflow when measuring text with gradients
+        // fill
+        var fillStyleProp = this.getStyle('fill');
+        var fillOpacityStyleProp = this.getStyle('fill-opacity');
+        var strokeStyleProp = this.getStyle('stroke');
+        var strokeOpacityProp = this.getStyle('stroke-opacity');
+
+        if (fillStyleProp.isUrlDefinition()) {
+          var fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);
+
+          if (fillStyle) {
+            ctx.fillStyle = fillStyle;
+          }
+        } else if (fillStyleProp.hasValue()) {
+          if (fillStyleProp.getString() === 'currentColor') {
+            fillStyleProp.setValue(this.getStyle('color').getColor());
+          }
+
+          var _fillStyle = fillStyleProp.getColor();
+
+          if (_fillStyle !== 'inherit') {
+            ctx.fillStyle = _fillStyle === 'none' ? 'rgba(0,0,0,0)' : _fillStyle;
+          }
+        }
+
+        if (fillOpacityStyleProp.hasValue()) {
+          var _fillStyle2 = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();
+
+          ctx.fillStyle = _fillStyle2;
+        } // stroke
+
+
+        if (strokeStyleProp.isUrlDefinition()) {
+          var strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);
+
+          if (strokeStyle) {
+            ctx.strokeStyle = strokeStyle;
+          }
+        } else if (strokeStyleProp.hasValue()) {
+          if (strokeStyleProp.getString() === 'currentColor') {
+            strokeStyleProp.setValue(this.getStyle('color').getColor());
+          }
+
+          var _strokeStyle = strokeStyleProp.getString();
+
+          if (_strokeStyle !== 'inherit') {
+            ctx.strokeStyle = _strokeStyle === 'none' ? 'rgba(0,0,0,0)' : _strokeStyle;
+          }
+        }
+
+        if (strokeOpacityProp.hasValue()) {
+          var _strokeStyle2 = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();
+
+          ctx.strokeStyle = _strokeStyle2;
+        }
+
+        var strokeWidthStyleProp = this.getStyle('stroke-width');
+
+        if (strokeWidthStyleProp.hasValue()) {
+          var newLineWidth = strokeWidthStyleProp.getPixels();
+          ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)
+          : newLineWidth;
+        }
+
+        var strokeLinecapStyleProp = this.getStyle('stroke-linecap');
+        var strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');
+        var strokeMiterlimitProp = this.getStyle('stroke-miterlimit'); // NEED TEST
+        // const pointOrderStyleProp = this.getStyle('paint-order');
+
+        var strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');
+        var strokeDashoffsetProp = this.getStyle('stroke-dashoffset');
+
+        if (strokeLinecapStyleProp.hasValue()) {
+          ctx.lineCap = strokeLinecapStyleProp.getString();
+        }
+
+        if (strokeLinejoinStyleProp.hasValue()) {
+          ctx.lineJoin = strokeLinejoinStyleProp.getString();
+        }
+
+        if (strokeMiterlimitProp.hasValue()) {
+          ctx.miterLimit = strokeMiterlimitProp.getNumber();
+        } // NEED TEST
+        // if (pointOrderStyleProp.hasValue()) {
+        // 	// ?
+        // 	ctx.paintOrder = pointOrderStyleProp.getValue();
+        // }
+
+
+        if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {
+          var gaps = toNumbers(strokeDasharrayStyleProp.getString());
+
+          if (typeof ctx.setLineDash !== 'undefined') {
+            ctx.setLineDash(gaps);
+          } else // @ts-expect-error Handle browser prefix.
+            if (typeof ctx.webkitLineDash !== 'undefined') {
+              // @ts-expect-error Handle browser prefix.
+              ctx.webkitLineDash = gaps;
+            } else // @ts-expect-error Handle browser prefix.
+              if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {
+                // @ts-expect-error Handle browser prefix.
+                ctx.mozDash = gaps;
+              }
+
+          var offset = strokeDashoffsetProp.getPixels();
+
+          if (typeof ctx.lineDashOffset !== 'undefined') {
+            ctx.lineDashOffset = offset;
+          } else // @ts-expect-error Handle browser prefix.
+            if (typeof ctx.webkitLineDashOffset !== 'undefined') {
+              // @ts-expect-error Handle browser prefix.
+              ctx.webkitLineDashOffset = offset;
+            } else // @ts-expect-error Handle browser prefix.
+              if (typeof ctx.mozDashOffset !== 'undefined') {
+                // @ts-expect-error Handle browser prefix.
+                ctx.mozDashOffset = offset;
+              }
+        }
+      } // font
+
+
+      this.modifiedEmSizeStack = false;
+
+      if (typeof ctx.font !== 'undefined') {
+        var fontStyleProp = this.getStyle('font');
+        var fontStyleStyleProp = this.getStyle('font-style');
+        var fontVariantStyleProp = this.getStyle('font-variant');
+        var fontWeightStyleProp = this.getStyle('font-weight');
+        var fontSizeStyleProp = this.getStyle('font-size');
+        var fontFamilyStyleProp = this.getStyle('font-family');
+        var font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? "".concat(fontSizeStyleProp.getPixels(true), "px") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));
+        fontStyleStyleProp.setValue(font.fontStyle);
+        fontVariantStyleProp.setValue(font.fontVariant);
+        fontWeightStyleProp.setValue(font.fontWeight);
+        fontSizeStyleProp.setValue(font.fontSize);
+        fontFamilyStyleProp.setValue(font.fontFamily);
+        ctx.font = font.toString();
+
+        if (fontSizeStyleProp.isPixels()) {
+          this.document.emSize = fontSizeStyleProp.getPixels();
+          this.modifiedEmSizeStack = true;
+        }
+      }
+
+      if (!fromMeasure) {
+        // effects
+        this.applyEffects(ctx); // opacity
+
+        ctx.globalAlpha = this.calculateOpacity();
+      }
+    }
+  }, {
+    key: "clearContext",
+    value: function clearContext(ctx) {
+      _get__default['default'](_getPrototypeOf__default['default'](RenderedElement.prototype), "clearContext", this).call(this, ctx);
+
+      if (this.modifiedEmSizeStack) {
+        this.document.popEmSize();
+      }
+    }
+  }]);
+
+  return RenderedElement;
+}(Element);
+
+function _createSuper$G(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$G(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$G() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var PathElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default['default'](PathElement, _RenderedElement);
+
+  var _super = _createSuper$G(PathElement);
+
+  function PathElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, PathElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'path';
+    _this.pathParser = null;
+    _this.pathParser = new PathParser(_this.getAttribute('d').getString());
+    return _this;
+  }
+
+  _createClass__default['default'](PathElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var pathParser = this.pathParser;
+      var boundingBox = new BoundingBox();
+      pathParser.reset();
+
+      if (ctx) {
+        ctx.beginPath();
+      }
+
+      while (!pathParser.isEnd()) {
+        switch (pathParser.next().type) {
+          case PathParser.MOVE_TO:
+            this.pathM(ctx, boundingBox);
+            break;
+
+          case PathParser.LINE_TO:
+            this.pathL(ctx, boundingBox);
+            break;
+
+          case PathParser.HORIZ_LINE_TO:
+            this.pathH(ctx, boundingBox);
+            break;
+
+          case PathParser.VERT_LINE_TO:
+            this.pathV(ctx, boundingBox);
+            break;
+
+          case PathParser.CURVE_TO:
+            this.pathC(ctx, boundingBox);
+            break;
+
+          case PathParser.SMOOTH_CURVE_TO:
+            this.pathS(ctx, boundingBox);
+            break;
+
+          case PathParser.QUAD_TO:
+            this.pathQ(ctx, boundingBox);
+            break;
+
+          case PathParser.SMOOTH_QUAD_TO:
+            this.pathT(ctx, boundingBox);
+            break;
+
+          case PathParser.ARC:
+            this.pathA(ctx, boundingBox);
+            break;
+
+          case PathParser.CLOSE_PATH:
+            this.pathZ(ctx, boundingBox);
+            break;
+        }
+      }
+
+      return boundingBox;
+    }
+  }, {
+    key: "getBoundingBox",
+    value: function getBoundingBox(_) {
+      return this.path();
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      var pathParser = this.pathParser;
+      var points = pathParser.getMarkerPoints();
+      var angles = pathParser.getMarkerAngles();
+      var markers = points.map(function (point, i) {
+        return [point, angles[i]];
+      });
+      return markers;
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      this.path(ctx);
+      this.document.screen.mouse.checkPath(this, ctx);
+      var fillRuleStyleProp = this.getStyle('fill-rule');
+
+      if (ctx.fillStyle !== '') {
+        if (fillRuleStyleProp.getString('inherit') !== 'inherit') {
+          ctx.fill(fillRuleStyleProp.getString());
+        } else {
+          ctx.fill();
+        }
+      }
+
+      if (ctx.strokeStyle !== '') {
+        if (this.getAttribute('vector-effect').getString() === 'non-scaling-stroke') {
+          ctx.save();
+          ctx.setTransform(1, 0, 0, 1, 0, 0);
+          ctx.stroke();
+          ctx.restore();
+        } else {
+          ctx.stroke();
+        }
+      }
+
+      var markers = this.getMarkers();
+
+      if (markers) {
+        var markersLastIndex = markers.length - 1;
+        var markerStartStyleProp = this.getStyle('marker-start');
+        var markerMidStyleProp = this.getStyle('marker-mid');
+        var markerEndStyleProp = this.getStyle('marker-end');
+
+        if (markerStartStyleProp.isUrlDefinition()) {
+          var marker = markerStartStyleProp.getDefinition();
+
+          var _markers$ = _slicedToArray__default['default'](markers[0], 2),
+              point = _markers$[0],
+              angle = _markers$[1];
+
+          marker.render(ctx, point, angle);
+        }
+
+        if (markerMidStyleProp.isUrlDefinition()) {
+          var _marker = markerMidStyleProp.getDefinition();
+
+          for (var i = 1; i < markersLastIndex; i++) {
+            var _markers$i = _slicedToArray__default['default'](markers[i], 2),
+                _point = _markers$i[0],
+                _angle = _markers$i[1];
+
+            _marker.render(ctx, _point, _angle);
+          }
+        }
+
+        if (markerEndStyleProp.isUrlDefinition()) {
+          var _marker2 = markerEndStyleProp.getDefinition();
+
+          var _markers$markersLastI = _slicedToArray__default['default'](markers[markersLastIndex], 2),
+              _point2 = _markers$markersLastI[0],
+              _angle2 = _markers$markersLastI[1];
+
+          _marker2.render(ctx, _point2, _angle2);
+        }
+      }
+    }
+  }, {
+    key: "pathM",
+    value: function pathM(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathM = PathElement.pathM(pathParser),
+          point = _PathElement$pathM.point;
+
+      var x = point.x,
+          y = point.y;
+      pathParser.addMarker(point);
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.moveTo(x, y);
+      }
+    }
+  }, {
+    key: "pathL",
+    value: function pathL(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathL = PathElement.pathL(pathParser),
+          current = _PathElement$pathL.current,
+          point = _PathElement$pathL.point;
+
+      var x = point.x,
+          y = point.y;
+      pathParser.addMarker(point, current);
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+      }
+    }
+  }, {
+    key: "pathH",
+    value: function pathH(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathH = PathElement.pathH(pathParser),
+          current = _PathElement$pathH.current,
+          point = _PathElement$pathH.point;
+
+      var x = point.x,
+          y = point.y;
+      pathParser.addMarker(point, current);
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+      }
+    }
+  }, {
+    key: "pathV",
+    value: function pathV(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathV = PathElement.pathV(pathParser),
+          current = _PathElement$pathV.current,
+          point = _PathElement$pathV.point;
+
+      var x = point.x,
+          y = point.y;
+      pathParser.addMarker(point, current);
+      boundingBox.addPoint(x, y);
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+      }
+    }
+  }, {
+    key: "pathC",
+    value: function pathC(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathC = PathElement.pathC(pathParser),
+          current = _PathElement$pathC.current,
+          point = _PathElement$pathC.point,
+          controlPoint = _PathElement$pathC.controlPoint,
+          currentPoint = _PathElement$pathC.currentPoint;
+
+      pathParser.addMarker(currentPoint, controlPoint, point);
+      boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+      if (ctx) {
+        ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      }
+    }
+  }, {
+    key: "pathS",
+    value: function pathS(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathS = PathElement.pathS(pathParser),
+          current = _PathElement$pathS.current,
+          point = _PathElement$pathS.point,
+          controlPoint = _PathElement$pathS.controlPoint,
+          currentPoint = _PathElement$pathS.currentPoint;
+
+      pathParser.addMarker(currentPoint, controlPoint, point);
+      boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+      if (ctx) {
+        ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      }
+    }
+  }, {
+    key: "pathQ",
+    value: function pathQ(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathQ = PathElement.pathQ(pathParser),
+          current = _PathElement$pathQ.current,
+          controlPoint = _PathElement$pathQ.controlPoint,
+          currentPoint = _PathElement$pathQ.currentPoint;
+
+      pathParser.addMarker(currentPoint, controlPoint, controlPoint);
+      boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+      if (ctx) {
+        ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      }
+    }
+  }, {
+    key: "pathT",
+    value: function pathT(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathT = PathElement.pathT(pathParser),
+          current = _PathElement$pathT.current,
+          controlPoint = _PathElement$pathT.controlPoint,
+          currentPoint = _PathElement$pathT.currentPoint;
+
+      pathParser.addMarker(currentPoint, controlPoint, controlPoint);
+      boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+
+      if (ctx) {
+        ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      }
+    }
+  }, {
+    key: "pathA",
+    value: function pathA(ctx, boundingBox) {
+      var pathParser = this.pathParser;
+
+      var _PathElement$pathA = PathElement.pathA(pathParser),
+          currentPoint = _PathElement$pathA.currentPoint,
+          rX = _PathElement$pathA.rX,
+          rY = _PathElement$pathA.rY,
+          sweepFlag = _PathElement$pathA.sweepFlag,
+          xAxisRotation = _PathElement$pathA.xAxisRotation,
+          centp = _PathElement$pathA.centp,
+          a1 = _PathElement$pathA.a1,
+          ad = _PathElement$pathA.ad; // for markers
+
+
+      var dir = 1 - sweepFlag ? 1.0 : -1.0;
+      var ah = a1 + dir * (ad / 2.0);
+      var halfWay = new Point(centp.x + rX * Math.cos(ah), centp.y + rY * Math.sin(ah));
+      pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);
+      pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);
+      boundingBox.addPoint(currentPoint.x, currentPoint.y); // TODO: this is too naive, make it better
+
+      if (ctx && !isNaN(a1) && !isNaN(ad)) {
+        var r = rX > rY ? rX : rY;
+        var sx = rX > rY ? 1 : rX / rY;
+        var sy = rX > rY ? rY / rX : 1;
+        ctx.translate(centp.x, centp.y);
+        ctx.rotate(xAxisRotation);
+        ctx.scale(sx, sy);
+        ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));
+        ctx.scale(1 / sx, 1 / sy);
+        ctx.rotate(-xAxisRotation);
+        ctx.translate(-centp.x, -centp.y);
+      }
+    }
+  }, {
+    key: "pathZ",
+    value: function pathZ(ctx, boundingBox) {
+      PathElement.pathZ(this.pathParser);
+
+      if (ctx) {
+        // only close path if it is not a straight line
+        if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {
+          ctx.closePath();
+        }
+      }
+    }
+  }], [{
+    key: "pathM",
+    value: function pathM(pathParser) {
+      var point = pathParser.getAsCurrentPoint();
+      pathParser.start = pathParser.current;
+      return {
+        point: point
+      };
+    }
+  }, {
+    key: "pathL",
+    value: function pathL(pathParser) {
+      var current = pathParser.current;
+      var point = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        point: point
+      };
+    }
+  }, {
+    key: "pathH",
+    value: function pathH(pathParser) {
+      var current = pathParser.current,
+          command = pathParser.command;
+      var point = new Point((command.relative ? current.x : 0) + command.x, current.y);
+      pathParser.current = point;
+      return {
+        current: current,
+        point: point
+      };
+    }
+  }, {
+    key: "pathV",
+    value: function pathV(pathParser) {
+      var current = pathParser.current,
+          command = pathParser.command;
+      var point = new Point(current.x, (command.relative ? current.y : 0) + command.y);
+      pathParser.current = point;
+      return {
+        current: current,
+        point: point
+      };
+    }
+  }, {
+    key: "pathC",
+    value: function pathC(pathParser) {
+      var current = pathParser.current;
+      var point = pathParser.getPoint('x1', 'y1');
+      var controlPoint = pathParser.getAsControlPoint('x2', 'y2');
+      var currentPoint = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        point: point,
+        controlPoint: controlPoint,
+        currentPoint: currentPoint
+      };
+    }
+  }, {
+    key: "pathS",
+    value: function pathS(pathParser) {
+      var current = pathParser.current;
+      var point = pathParser.getReflectedControlPoint();
+      var controlPoint = pathParser.getAsControlPoint('x2', 'y2');
+      var currentPoint = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        point: point,
+        controlPoint: controlPoint,
+        currentPoint: currentPoint
+      };
+    }
+  }, {
+    key: "pathQ",
+    value: function pathQ(pathParser) {
+      var current = pathParser.current;
+      var controlPoint = pathParser.getAsControlPoint('x1', 'y1');
+      var currentPoint = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        controlPoint: controlPoint,
+        currentPoint: currentPoint
+      };
+    }
+  }, {
+    key: "pathT",
+    value: function pathT(pathParser) {
+      var current = pathParser.current;
+      var controlPoint = pathParser.getReflectedControlPoint();
+      pathParser.control = controlPoint;
+      var currentPoint = pathParser.getAsCurrentPoint();
+      return {
+        current: current,
+        controlPoint: controlPoint,
+        currentPoint: currentPoint
+      };
+    }
+  }, {
+    key: "pathA",
+    value: function pathA(pathParser) {
+      var current = pathParser.current,
+          command = pathParser.command;
+      var rX = command.rX,
+          rY = command.rY,
+          xRot = command.xRot,
+          lArcFlag = command.lArcFlag,
+          sweepFlag = command.sweepFlag;
+      var xAxisRotation = xRot * (Math.PI / 180.0);
+      var currentPoint = pathParser.getAsCurrentPoint(); // Conversion from endpoint to center parameterization
+      // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
+      // x1', y1'
+
+      var currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2.0, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2.0); // adjust radii
+
+      var l = Math.pow(currp.x, 2) / Math.pow(rX, 2) + Math.pow(currp.y, 2) / Math.pow(rY, 2);
+
+      if (l > 1) {
+        rX *= Math.sqrt(l);
+        rY *= Math.sqrt(l);
+      } // cx', cy'
+
+
+      var s = (lArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rX, 2) * Math.pow(rY, 2) - Math.pow(rX, 2) * Math.pow(currp.y, 2) - Math.pow(rY, 2) * Math.pow(currp.x, 2)) / (Math.pow(rX, 2) * Math.pow(currp.y, 2) + Math.pow(rY, 2) * Math.pow(currp.x, 2)));
+
+      if (isNaN(s)) {
+        s = 0;
+      }
+
+      var cpp = new Point(s * rX * currp.y / rY, s * -rY * currp.x / rX); // cx, cy
+
+      var centp = new Point((current.x + currentPoint.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y); // initial angle
+
+      var a1 = vectorsAngle([1, 0], [(currp.x - cpp.x) / rX, (currp.y - cpp.y) / rY]); // θ1
+      // angle delta
+
+      var u = [(currp.x - cpp.x) / rX, (currp.y - cpp.y) / rY];
+      var v = [(-currp.x - cpp.x) / rX, (-currp.y - cpp.y) / rY];
+      var ad = vectorsAngle(u, v); // Δθ
+
+      if (vectorsRatio(u, v) <= -1) {
+        ad = Math.PI;
+      }
+
+      if (vectorsRatio(u, v) >= 1) {
+        ad = 0;
+      }
+
+      return {
+        currentPoint: currentPoint,
+        rX: rX,
+        rY: rY,
+        sweepFlag: sweepFlag,
+        xAxisRotation: xAxisRotation,
+        centp: centp,
+        a1: a1,
+        ad: ad
+      };
+    }
+  }, {
+    key: "pathZ",
+    value: function pathZ(pathParser) {
+      pathParser.current = pathParser.start;
+    }
+  }]);
+
+  return PathElement;
+}(RenderedElement);
+
+function _createSuper$F(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$F(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$F() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var GlyphElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default['default'](GlyphElement, _PathElement);
+
+  var _super = _createSuper$F(GlyphElement);
+
+  function GlyphElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, GlyphElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'glyph';
+    _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
+    _this.unicode = _this.getAttribute('unicode').getString();
+    _this.arabicForm = _this.getAttribute('arabic-form').getString();
+    return _this;
+  }
+
+  return GlyphElement;
+}(PathElement);
+
+function _createSuper$E(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$E(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$E() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var TextElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default['default'](TextElement, _RenderedElement);
+
+  var _super = _createSuper$E(TextElement);
+
+  function TextElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, TextElement);
+
+    _this = _super.call(this, document, node, (this instanceof TextElement ? this.constructor : void 0) === TextElement ? true : captureTextNodes);
+    _this.type = 'text';
+    _this.x = 0;
+    _this.y = 0;
+    _this.measureCache = -1;
+    return _this;
+  }
+
+  _createClass__default['default'](TextElement, [{
+    key: "setContext",
+    value: function setContext(ctx) {
+      var fromMeasure = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      _get__default['default'](_getPrototypeOf__default['default'](TextElement.prototype), "setContext", this).call(this, ctx, fromMeasure);
+
+      var textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();
+
+      if (textBaseline) {
+        ctx.textBaseline = textBaseline;
+      }
+    }
+  }, {
+    key: "initializeCoordinates",
+    value: function initializeCoordinates(ctx) {
+      this.x = this.getAttribute('x').getPixels('x');
+      this.y = this.getAttribute('y').getPixels('y');
+      var dxAttr = this.getAttribute('dx');
+      var dyAttr = this.getAttribute('dy');
+
+      if (dxAttr.hasValue()) {
+        this.x += dxAttr.getPixels('x');
+      }
+
+      if (dyAttr.hasValue()) {
+        this.y += dyAttr.getPixels('y');
+      }
+
+      this.x += this.getAnchorDelta(ctx, this, 0);
+    }
+  }, {
+    key: "getBoundingBox",
+    value: function getBoundingBox(ctx) {
+      var _this2 = this;
+
+      if (this.type !== 'text') {
+        return this.getTElementBoundingBox(ctx);
+      }
+
+      this.initializeCoordinates(ctx);
+      var boundingBox = null;
+      this.children.forEach(function (_, i) {
+        var childBoundingBox = _this2.getChildBoundingBox(ctx, _this2, _this2, i);
+
+        if (!boundingBox) {
+          boundingBox = childBoundingBox;
+        } else {
+          boundingBox.addBoundingBox(childBoundingBox);
+        }
+      });
+      return boundingBox;
+    }
+  }, {
+    key: "getFontSize",
+    value: function getFontSize() {
+      var document = this.document,
+          parent = this.parent;
+      var inheritFontSize = Font.parse(document.ctx.font).fontSize;
+      var fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);
+      return fontSize;
+    }
+  }, {
+    key: "getTElementBoundingBox",
+    value: function getTElementBoundingBox(ctx) {
+      var fontSize = this.getFontSize();
+      return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);
+    }
+  }, {
+    key: "getGlyph",
+    value: function getGlyph(font, text, i) {
+      var char = text[i];
+      var glyph = null;
+
+      if (font.isArabic) {
+        var len = text.length;
+        var prevChar = text[i - 1];
+        var nextChar = text[i + 1];
+        var arabicForm = 'isolated';
+
+        if ((i === 0 || prevChar === ' ') && i < len - 2 && nextChar !== ' ') {
+          arabicForm = 'terminal';
+        }
+
+        if (i > 0 && prevChar !== ' ' && i < len - 2 && nextChar !== ' ') {
+          arabicForm = 'medial';
+        }
+
+        if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {
+          arabicForm = 'initial';
+        }
+
+        if (typeof font.glyphs[char] !== 'undefined') {
+          // NEED TEST
+          var maybeGlyph = font.glyphs[char];
+          glyph = maybeGlyph instanceof GlyphElement ? maybeGlyph : maybeGlyph[arabicForm];
+        }
+      } else {
+        glyph = font.glyphs[char];
+      }
+
+      if (!glyph) {
+        glyph = font.missingGlyph;
+      }
+
+      return glyph;
+    }
+  }, {
+    key: "getText",
+    value: function getText() {
+      return '';
+    }
+  }, {
+    key: "getTextFromNode",
+    value: function getTextFromNode(node) {
+      var textNode = node || this.node;
+      var childNodes = Array.from(textNode.parentNode.childNodes);
+      var index = childNodes.indexOf(textNode);
+      var lastIndex = childNodes.length - 1;
+      var text = compressSpaces( // textNode.value
+      // || textNode.text
+      textNode.textContent || '');
+
+      if (index === 0) {
+        text = trimLeft(text);
+      }
+
+      if (index === lastIndex) {
+        text = trimRight(text);
+      }
+
+      return text;
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      var _this3 = this;
+
+      if (this.type !== 'text') {
+        this.renderTElementChildren(ctx);
+        return;
+      }
+
+      this.initializeCoordinates(ctx);
+      this.children.forEach(function (_, i) {
+        _this3.renderChild(ctx, _this3, _this3, i);
+      });
+      var mouse = this.document.screen.mouse; // Do not calc bounding box if mouse is not working.
+
+      if (mouse.isWorking()) {
+        mouse.checkBoundingBox(this, this.getBoundingBox(ctx));
+      }
+    }
+  }, {
+    key: "renderTElementChildren",
+    value: function renderTElementChildren(ctx) {
+      var document = this.document,
+          parent = this.parent;
+      var renderText = this.getText();
+      var customFont = parent.getStyle('font-family').getDefinition();
+
+      if (customFont) {
+        var unitsPerEm = customFont.fontFace.unitsPerEm;
+        var ctxFont = Font.parse(document.ctx.font);
+        var fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);
+        var fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);
+        var scale = fontSize / unitsPerEm;
+        var text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;
+        var dx = toNumbers(parent.getAttribute('dx').getString());
+        var len = text.length;
+
+        for (var i = 0; i < len; i++) {
+          var glyph = this.getGlyph(customFont, text, i);
+          ctx.translate(this.x, this.y);
+          ctx.scale(scale, -scale);
+          var lw = ctx.lineWidth;
+          ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;
+
+          if (fontStyle === 'italic') {
+            ctx.transform(1, 0, .4, 1, 0, 0);
+          }
+
+          glyph.render(ctx);
+
+          if (fontStyle === 'italic') {
+            ctx.transform(1, 0, -.4, 1, 0, 0);
+          }
+
+          ctx.lineWidth = lw;
+          ctx.scale(1 / scale, -1 / scale);
+          ctx.translate(-this.x, -this.y);
+          this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;
+
+          if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
+            this.x += dx[i];
+          }
+        }
+
+        return;
+      }
+
+      var x = this.x,
+          y = this.y; // NEED TEST
+      // if (ctx.paintOrder === 'stroke') {
+      // 	if (ctx.strokeStyle) {
+      // 		ctx.strokeText(renderText, x, y);
+      // 	}
+      // 	if (ctx.fillStyle) {
+      // 		ctx.fillText(renderText, x, y);
+      // 	}
+      // } else {
+
+      if (ctx.fillStyle) {
+        ctx.fillText(renderText, x, y);
+      }
+
+      if (ctx.strokeStyle) {
+        ctx.strokeText(renderText, x, y);
+      } // }
+
+    }
+  }, {
+    key: "getAnchorDelta",
+    value: function getAnchorDelta(ctx, parent, startI) {
+      var textAnchor = this.getStyle('text-anchor').getString('start');
+
+      if (textAnchor !== 'start') {
+        var children = parent.children;
+        var len = children.length;
+        var child = null;
+        var width = 0;
+
+        for (var i = startI; i < len; i++) {
+          child = children[i];
+
+          if (i > startI && child.getAttribute('x').hasValue() || child.getAttribute('text-anchor').hasValue()) {
+            break; // new group
+          }
+
+          width += child.measureTextRecursive(ctx);
+        }
+
+        return -1 * (textAnchor === 'end' ? width : width / 2.0);
+      }
+
+      return 0;
+    }
+  }, {
+    key: "adjustChildCoordinates",
+    value: function adjustChildCoordinates(ctx, textParent, parent, i) {
+      var child = parent.children[i];
+
+      if (typeof child.measureText !== 'function') {
+        return child;
+      }
+
+      ctx.save();
+      child.setContext(ctx, true);
+      var xAttr = child.getAttribute('x');
+      var yAttr = child.getAttribute('y');
+      var dxAttr = child.getAttribute('dx');
+      var dyAttr = child.getAttribute('dy');
+      var textAnchor = child.getAttribute('text-anchor').getString('start');
+
+      if (i === 0 && child.type !== 'textNode') {
+        if (!xAttr.hasValue()) {
+          xAttr.setValue(textParent.getAttribute('x').getValue('0'));
+        }
+
+        if (!yAttr.hasValue()) {
+          yAttr.setValue(textParent.getAttribute('y').getValue('0'));
+        }
+
+        if (!dxAttr.hasValue()) {
+          dxAttr.setValue(textParent.getAttribute('dx').getValue('0'));
+        }
+
+        if (!dyAttr.hasValue()) {
+          dyAttr.setValue(textParent.getAttribute('dy').getValue('0'));
+        }
+      }
+
+      if (xAttr.hasValue()) {
+        child.x = xAttr.getPixels('x') + textParent.getAnchorDelta(ctx, parent, i);
+
+        if (textAnchor !== 'start') {
+          var width = child.measureTextRecursive(ctx);
+          child.x += -1 * (textAnchor === 'end' ? width : width / 2.0);
+        }
+
+        if (dxAttr.hasValue()) {
+          child.x += dxAttr.getPixels('x');
+        }
+      } else {
+        if (textAnchor !== 'start') {
+          var _width = child.measureTextRecursive(ctx);
+
+          textParent.x += -1 * (textAnchor === 'end' ? _width : _width / 2.0);
+        }
+
+        if (dxAttr.hasValue()) {
+          textParent.x += dxAttr.getPixels('x');
+        }
+
+        child.x = textParent.x;
+      }
+
+      textParent.x = child.x + child.measureText(ctx);
+
+      if (yAttr.hasValue()) {
+        child.y = yAttr.getPixels('y');
+
+        if (dyAttr.hasValue()) {
+          child.y += dyAttr.getPixels('y');
+        }
+      } else {
+        if (dyAttr.hasValue()) {
+          textParent.y += dyAttr.getPixels('y');
+        }
+
+        child.y = textParent.y;
+      }
+
+      textParent.y = child.y;
+      child.clearContext(ctx);
+      ctx.restore();
+      return child;
+    }
+  }, {
+    key: "getChildBoundingBox",
+    value: function getChildBoundingBox(ctx, textParent, parent, i) {
+      var child = this.adjustChildCoordinates(ctx, textParent, parent, i); // not a text node?
+
+      if (typeof child.getBoundingBox !== 'function') {
+        return null;
+      }
+
+      var boundingBox = child.getBoundingBox(ctx);
+
+      if (!boundingBox) {
+        return null;
+      }
+
+      child.children.forEach(function (_, i) {
+        var childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);
+        boundingBox.addBoundingBox(childBoundingBox);
+      });
+      return boundingBox;
+    }
+  }, {
+    key: "renderChild",
+    value: function renderChild(ctx, textParent, parent, i) {
+      var child = this.adjustChildCoordinates(ctx, textParent, parent, i);
+      child.render(ctx);
+      child.children.forEach(function (_, i) {
+        textParent.renderChild(ctx, textParent, child, i);
+      });
+    }
+  }, {
+    key: "measureTextRecursive",
+    value: function measureTextRecursive(ctx) {
+      var width = this.children.reduce(function (width, child) {
+        return width + child.measureTextRecursive(ctx);
+      }, this.measureText(ctx));
+      return width;
+    }
+  }, {
+    key: "measureText",
+    value: function measureText(ctx) {
+      var measureCache = this.measureCache;
+
+      if (~measureCache) {
+        return measureCache;
+      }
+
+      var renderText = this.getText();
+      var measure = this.measureTargetText(ctx, renderText);
+      this.measureCache = measure;
+      return measure;
+    }
+  }, {
+    key: "measureTargetText",
+    value: function measureTargetText(ctx, targetText) {
+      if (!targetText.length) {
+        return 0;
+      }
+
+      var parent = this.parent;
+      var customFont = parent.getStyle('font-family').getDefinition();
+
+      if (customFont) {
+        var fontSize = this.getFontSize();
+        var text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;
+        var dx = toNumbers(parent.getAttribute('dx').getString());
+        var len = text.length;
+        var _measure = 0;
+
+        for (var i = 0; i < len; i++) {
+          var glyph = this.getGlyph(customFont, text, i);
+          _measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
+
+          if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {
+            _measure += dx[i];
+          }
+        }
+
+        return _measure;
+      }
+
+      if (!ctx.measureText) {
+        return targetText.length * 10;
+      }
+
+      ctx.save();
+      this.setContext(ctx, true);
+
+      var _ctx$measureText = ctx.measureText(targetText),
+          measure = _ctx$measureText.width;
+
+      this.clearContext(ctx);
+      ctx.restore();
+      return measure;
+    }
+  }]);
+
+  return TextElement;
+}(RenderedElement);
+
+function _createSuper$D(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$D(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$D() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var TSpanElement = /*#__PURE__*/function (_TextElement) {
+  _inherits__default['default'](TSpanElement, _TextElement);
+
+  var _super = _createSuper$D(TSpanElement);
+
+  function TSpanElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, TSpanElement);
+
+    _this = _super.call(this, document, node, (this instanceof TSpanElement ? this.constructor : void 0) === TSpanElement ? true : captureTextNodes);
+    _this.type = 'tspan'; // if this node has children, then they own the text
+
+    _this.text = _this.children.length > 0 ? '' : _this.getTextFromNode();
+    return _this;
+  }
+
+  _createClass__default['default'](TSpanElement, [{
+    key: "getText",
+    value: function getText() {
+      return this.text;
+    }
+  }]);
+
+  return TSpanElement;
+}(TextElement);
+
+function _createSuper$C(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$C(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var TextNode = /*#__PURE__*/function (_TSpanElement) {
+  _inherits__default['default'](TextNode, _TSpanElement);
+
+  var _super = _createSuper$C(TextNode);
+
+  function TextNode() {
+    var _this;
+
+    _classCallCheck__default['default'](this, TextNode);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'textNode';
+    return _this;
+  }
+
+  return TextNode;
+}(TSpanElement);
+
+function _createSuper$B(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$B(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var SVGElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default['default'](SVGElement, _RenderedElement);
+
+  var _super = _createSuper$B(SVGElement);
+
+  function SVGElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, SVGElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'svg';
+    _this.root = false;
+    return _this;
+  }
+
+  _createClass__default['default'](SVGElement, [{
+    key: "setContext",
+    value: function setContext(ctx) {
+      var _this$node$parentNode;
+
+      var document = this.document;
+      var screen = document.screen,
+          window = document.window;
+      var canvas = ctx.canvas;
+      screen.setDefaults(ctx);
+
+      if (canvas.style && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {
+        ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');
+        var fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);
+
+        if (fontSizeProp.hasValue()) {
+          document.rootEmSize = fontSizeProp.getPixels('y');
+          document.emSize = document.rootEmSize;
+        }
+      } // create new view port
+
+
+      if (!this.getAttribute('x').hasValue()) {
+        this.getAttribute('x', true).setValue(0);
+      }
+
+      if (!this.getAttribute('y').hasValue()) {
+        this.getAttribute('y', true).setValue(0);
+      }
+
+      var _screen$viewPort = screen.viewPort,
+          width = _screen$viewPort.width,
+          height = _screen$viewPort.height;
+
+      if (!this.getStyle('width').hasValue()) {
+        this.getStyle('width', true).setValue('100%');
+      }
+
+      if (!this.getStyle('height').hasValue()) {
+        this.getStyle('height', true).setValue('100%');
+      }
+
+      if (!this.getStyle('color').hasValue()) {
+        this.getStyle('color', true).setValue('black');
+      }
+
+      var refXAttr = this.getAttribute('refX');
+      var refYAttr = this.getAttribute('refY');
+      var viewBoxAttr = this.getAttribute('viewBox');
+      var viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;
+      var clip = !this.root && this.getStyle('overflow').getValue('hidden') !== 'visible';
+      var minX = 0;
+      var minY = 0;
+      var clipX = 0;
+      var clipY = 0;
+
+      if (viewBox) {
+        minX = viewBox[0];
+        minY = viewBox[1];
+      }
+
+      if (!this.root) {
+        width = this.getStyle('width').getPixels('x');
+        height = this.getStyle('height').getPixels('y');
+
+        if (this.type === 'marker') {
+          clipX = minX;
+          clipY = minY;
+          minX = 0;
+          minY = 0;
+        }
+      }
+
+      screen.viewPort.setCurrent(width, height); // Default value of transform-origin is center only for root SVG elements
+      // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin
+
+      if (this.node // is not temporary SVGElement
+      && (!this.parent || ((_this$node$parentNode = this.node.parentNode) === null || _this$node$parentNode === void 0 ? void 0 : _this$node$parentNode.nodeName) === 'foreignObject') && this.getStyle('transform', false, true).hasValue() && !this.getStyle('transform-origin', false, true).hasValue()) {
+        this.getStyle('transform-origin', true, true).setValue('50% 50%');
+      }
+
+      _get__default['default'](_getPrototypeOf__default['default'](SVGElement.prototype), "setContext", this).call(this, ctx);
+
+      ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));
+
+      if (viewBox) {
+        width = viewBox[2];
+        height = viewBox[3];
+      }
+
+      document.setViewBox({
+        ctx: ctx,
+        aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
+        width: screen.viewPort.width,
+        desiredWidth: width,
+        height: screen.viewPort.height,
+        desiredHeight: height,
+        minX: minX,
+        minY: minY,
+        refX: refXAttr.getValue(),
+        refY: refYAttr.getValue(),
+        clip: clip,
+        clipX: clipX,
+        clipY: clipY
+      });
+
+      if (viewBox) {
+        screen.viewPort.removeCurrent();
+        screen.viewPort.setCurrent(width, height);
+      }
+    }
+  }, {
+    key: "clearContext",
+    value: function clearContext(ctx) {
+      _get__default['default'](_getPrototypeOf__default['default'](SVGElement.prototype), "clearContext", this).call(this, ctx);
+
+      this.document.screen.viewPort.removeCurrent();
+    }
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+
+  }, {
+    key: "resize",
+    value: function resize(width) {
+      var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
+      var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      var widthAttr = this.getAttribute('width', true);
+      var heightAttr = this.getAttribute('height', true);
+      var viewBoxAttr = this.getAttribute('viewBox');
+      var styleAttr = this.getAttribute('style');
+      var originWidth = widthAttr.getNumber(0);
+      var originHeight = heightAttr.getNumber(0);
+
+      if (preserveAspectRatio) {
+        if (typeof preserveAspectRatio === 'string') {
+          this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);
+        } else {
+          var preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');
+
+          if (preserveAspectRatioAttr.hasValue()) {
+            preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\s*(\S.*\S)\s*$/, '$1'));
+          }
+        }
+      }
+
+      widthAttr.setValue(width);
+      heightAttr.setValue(height);
+
+      if (!viewBoxAttr.hasValue()) {
+        viewBoxAttr.setValue("0 0 ".concat(originWidth || width, " ").concat(originHeight || height));
+      }
+
+      if (styleAttr.hasValue()) {
+        var widthStyle = this.getStyle('width');
+        var heightStyle = this.getStyle('height');
+
+        if (widthStyle.hasValue()) {
+          widthStyle.setValue("".concat(width, "px"));
+        }
+
+        if (heightStyle.hasValue()) {
+          heightStyle.setValue("".concat(height, "px"));
+        }
+      }
+    }
+  }]);
+
+  return SVGElement;
+}(RenderedElement);
+
+function _createSuper$A(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$A(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var RectElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default['default'](RectElement, _PathElement);
+
+  var _super = _createSuper$A(RectElement);
+
+  function RectElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, RectElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'rect';
+    return _this;
+  }
+
+  _createClass__default['default'](RectElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var x = this.getAttribute('x').getPixels('x');
+      var y = this.getAttribute('y').getPixels('y');
+      var width = this.getStyle('width', false, true).getPixels('x');
+      var height = this.getStyle('height', false, true).getPixels('y');
+      var rxAttr = this.getAttribute('rx');
+      var ryAttr = this.getAttribute('ry');
+      var rx = rxAttr.getPixels('x');
+      var ry = ryAttr.getPixels('y');
+
+      if (rxAttr.hasValue() && !ryAttr.hasValue()) {
+        ry = rx;
+      }
+
+      if (ryAttr.hasValue() && !rxAttr.hasValue()) {
+        rx = ry;
+      }
+
+      rx = Math.min(rx, width / 2.0);
+      ry = Math.min(ry, height / 2.0);
+
+      if (ctx) {
+        var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+        ctx.beginPath(); // always start the path so we don't fill prior paths
+
+        if (height > 0 && width > 0) {
+          ctx.moveTo(x + rx, y);
+          ctx.lineTo(x + width - rx, y);
+          ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);
+          ctx.lineTo(x + width, y + height - ry);
+          ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);
+          ctx.lineTo(x + rx, y + height);
+          ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);
+          ctx.lineTo(x, y + ry);
+          ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);
+          ctx.closePath();
+        }
+      }
+
+      return new BoundingBox(x, y, x + width, y + height);
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      return null;
+    }
+  }]);
+
+  return RectElement;
+}(PathElement);
+
+function _createSuper$z(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$z(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$z() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var CircleElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default['default'](CircleElement, _PathElement);
+
+  var _super = _createSuper$z(CircleElement);
+
+  function CircleElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, CircleElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'circle';
+    return _this;
+  }
+
+  _createClass__default['default'](CircleElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var cx = this.getAttribute('cx').getPixels('x');
+      var cy = this.getAttribute('cy').getPixels('y');
+      var r = this.getAttribute('r').getPixels();
+
+      if (ctx && r > 0) {
+        ctx.beginPath();
+        ctx.arc(cx, cy, r, 0, Math.PI * 2, false);
+        ctx.closePath();
+      }
+
+      return new BoundingBox(cx - r, cy - r, cx + r, cy + r);
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      return null;
+    }
+  }]);
+
+  return CircleElement;
+}(PathElement);
+
+function _createSuper$y(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$y(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var EllipseElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default['default'](EllipseElement, _PathElement);
+
+  var _super = _createSuper$y(EllipseElement);
+
+  function EllipseElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, EllipseElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'ellipse';
+    return _this;
+  }
+
+  _createClass__default['default'](EllipseElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
+      var rx = this.getAttribute('rx').getPixels('x');
+      var ry = this.getAttribute('ry').getPixels('y');
+      var cx = this.getAttribute('cx').getPixels('x');
+      var cy = this.getAttribute('cy').getPixels('y');
+
+      if (ctx && rx > 0 && ry > 0) {
+        ctx.beginPath();
+        ctx.moveTo(cx + rx, cy);
+        ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);
+        ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);
+        ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);
+        ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);
+        ctx.closePath();
+      }
+
+      return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      return null;
+    }
+  }]);
+
+  return EllipseElement;
+}(PathElement);
+
+function _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$x(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var LineElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default['default'](LineElement, _PathElement);
+
+  var _super = _createSuper$x(LineElement);
+
+  function LineElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, LineElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'line';
+    return _this;
+  }
+
+  _createClass__default['default'](LineElement, [{
+    key: "getPoints",
+    value: function getPoints() {
+      return [new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')), new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))];
+    }
+  }, {
+    key: "path",
+    value: function path(ctx) {
+      var _this$getPoints = this.getPoints(),
+          _this$getPoints2 = _slicedToArray__default['default'](_this$getPoints, 2),
+          _this$getPoints2$ = _this$getPoints2[0],
+          x0 = _this$getPoints2$.x,
+          y0 = _this$getPoints2$.y,
+          _this$getPoints2$2 = _this$getPoints2[1],
+          x1 = _this$getPoints2$2.x,
+          y1 = _this$getPoints2$2.y;
+
+      if (ctx) {
+        ctx.beginPath();
+        ctx.moveTo(x0, y0);
+        ctx.lineTo(x1, y1);
+      }
+
+      return new BoundingBox(x0, y0, x1, y1);
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      var _this$getPoints3 = this.getPoints(),
+          _this$getPoints4 = _slicedToArray__default['default'](_this$getPoints3, 2),
+          p0 = _this$getPoints4[0],
+          p1 = _this$getPoints4[1];
+
+      var a = p0.angleTo(p1);
+      return [[p0, a], [p1, a]];
+    }
+  }]);
+
+  return LineElement;
+}(PathElement);
+
+function _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$w(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var PolylineElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default['default'](PolylineElement, _PathElement);
+
+  var _super = _createSuper$w(PolylineElement);
+
+  function PolylineElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, PolylineElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'polyline';
+    _this.points = [];
+    _this.points = Point.parsePath(_this.getAttribute('points').getString());
+    return _this;
+  }
+
+  _createClass__default['default'](PolylineElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var points = this.points;
+
+      var _points = _slicedToArray__default['default'](points, 1),
+          _points$ = _points[0],
+          x0 = _points$.x,
+          y0 = _points$.y;
+
+      var boundingBox = new BoundingBox(x0, y0);
+
+      if (ctx) {
+        ctx.beginPath();
+        ctx.moveTo(x0, y0);
+      }
+
+      points.forEach(function (_ref) {
+        var x = _ref.x,
+            y = _ref.y;
+        boundingBox.addPoint(x, y);
+
+        if (ctx) {
+          ctx.lineTo(x, y);
+        }
+      });
+      return boundingBox;
+    }
+  }, {
+    key: "getMarkers",
+    value: function getMarkers() {
+      var points = this.points;
+      var lastIndex = points.length - 1;
+      var markers = [];
+      points.forEach(function (point, i) {
+        if (i === lastIndex) {
+          return;
+        }
+
+        markers.push([point, point.angleTo(points[i + 1])]);
+      });
+
+      if (markers.length > 0) {
+        markers.push([points[points.length - 1], markers[markers.length - 1][1]]);
+      }
+
+      return markers;
+    }
+  }]);
+
+  return PolylineElement;
+}(PathElement);
+
+function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$v(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var PolygonElement = /*#__PURE__*/function (_PolylineElement) {
+  _inherits__default['default'](PolygonElement, _PolylineElement);
+
+  var _super = _createSuper$v(PolygonElement);
+
+  function PolygonElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, PolygonElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'polygon';
+    return _this;
+  }
+
+  _createClass__default['default'](PolygonElement, [{
+    key: "path",
+    value: function path(ctx) {
+      var boundingBox = _get__default['default'](_getPrototypeOf__default['default'](PolygonElement.prototype), "path", this).call(this, ctx);
+
+      var _this$points = _slicedToArray__default['default'](this.points, 1),
+          _this$points$ = _this$points[0],
+          x = _this$points$.x,
+          y = _this$points$.y;
+
+      if (ctx) {
+        ctx.lineTo(x, y);
+        ctx.closePath();
+      }
+
+      return boundingBox;
+    }
+  }]);
+
+  return PolygonElement;
+}(PolylineElement);
+
+function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$u(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var PatternElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](PatternElement, _Element);
+
+  var _super = _createSuper$u(PatternElement);
+
+  function PatternElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, PatternElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'pattern';
+    return _this;
+  }
+
+  _createClass__default['default'](PatternElement, [{
+    key: "createPattern",
+    value: function createPattern(ctx, _, parentOpacityProp) {
+      var width = this.getStyle('width').getPixels('x', true);
+      var height = this.getStyle('height').getPixels('y', true); // render me using a temporary svg element
+
+      var patternSvg = new SVGElement(this.document, null);
+      patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
+      patternSvg.attributes.width = new Property(this.document, 'width', "".concat(width, "px"));
+      patternSvg.attributes.height = new Property(this.document, 'height', "".concat(height, "px"));
+      patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());
+      patternSvg.children = this.children;
+      var patternCanvas = this.document.createCanvas(width, height);
+      var patternCtx = patternCanvas.getContext('2d');
+      var xAttr = this.getAttribute('x');
+      var yAttr = this.getAttribute('y');
+
+      if (xAttr.hasValue() && yAttr.hasValue()) {
+        patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));
+      }
+
+      if (parentOpacityProp.hasValue()) {
+        this.styles['fill-opacity'] = parentOpacityProp;
+      } else {
+        Reflect.deleteProperty(this.styles, 'fill-opacity');
+      } // render 3x3 grid so when we transform there's no white space on edges
+
+
+      for (var x = -1; x <= 1; x++) {
+        for (var y = -1; y <= 1; y++) {
+          patternCtx.save();
+          patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);
+          patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);
+          patternSvg.render(patternCtx);
+          patternCtx.restore();
+        }
+      }
+
+      var pattern = ctx.createPattern(patternCanvas, 'repeat');
+      return pattern;
+    }
+  }]);
+
+  return PatternElement;
+}(Element);
+
+function _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$t(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var MarkerElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](MarkerElement, _Element);
+
+  var _super = _createSuper$t(MarkerElement);
+
+  function MarkerElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, MarkerElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'marker';
+    return _this;
+  }
+
+  _createClass__default['default'](MarkerElement, [{
+    key: "render",
+    value: function render(ctx, point, angle) {
+      if (!point) {
+        return;
+      }
+
+      var x = point.x,
+          y = point.y;
+      var orient = this.getAttribute('orient').getString('auto');
+      var markerUnits = this.getAttribute('markerUnits').getString('strokeWidth');
+      ctx.translate(x, y);
+
+      if (orient === 'auto') {
+        ctx.rotate(angle);
+      }
+
+      if (markerUnits === 'strokeWidth') {
+        ctx.scale(ctx.lineWidth, ctx.lineWidth);
+      }
+
+      ctx.save(); // render me using a temporary svg element
+
+      var markerSvg = new SVGElement(this.document, null);
+      markerSvg.type = this.type;
+      markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());
+      markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());
+      markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());
+      markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());
+      markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());
+      markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());
+      markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));
+      markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));
+      markerSvg.children = this.children;
+      markerSvg.render(ctx);
+      ctx.restore();
+
+      if (markerUnits === 'strokeWidth') {
+        ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
+      }
+
+      if (orient === 'auto') {
+        ctx.rotate(-angle);
+      }
+
+      ctx.translate(-x, -y);
+    }
+  }]);
+
+  return MarkerElement;
+}(Element);
+
+function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var DefsElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](DefsElement, _Element);
+
+  var _super = _createSuper$s(DefsElement);
+
+  function DefsElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, DefsElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'defs';
+    return _this;
+  }
+
+  _createClass__default['default'](DefsElement, [{
+    key: "render",
+    value: function render() {// NOOP
+    }
+  }]);
+
+  return DefsElement;
+}(Element);
+
+function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var GElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default['default'](GElement, _RenderedElement);
+
+  var _super = _createSuper$r(GElement);
+
+  function GElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, GElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'g';
+    return _this;
+  }
+
+  _createClass__default['default'](GElement, [{
+    key: "getBoundingBox",
+    value: function getBoundingBox(ctx) {
+      var boundingBox = new BoundingBox();
+      this.children.forEach(function (child) {
+        boundingBox.addBoundingBox(child.getBoundingBox(ctx));
+      });
+      return boundingBox;
+    }
+  }]);
+
+  return GElement;
+}(RenderedElement);
+
+function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var GradientElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](GradientElement, _Element);
+
+  var _super = _createSuper$q(GradientElement);
+
+  function GradientElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, GradientElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.attributesToInherit = ['gradientUnits'];
+    _this.stops = [];
+
+    var _assertThisInitialize = _assertThisInitialized__default['default'](_this),
+        stops = _assertThisInitialize.stops,
+        children = _assertThisInitialize.children;
+
+    children.forEach(function (child) {
+      if (child.type === 'stop') {
+        stops.push(child);
+      }
+    });
+    return _this;
+  }
+
+  _createClass__default['default'](GradientElement, [{
+    key: "getGradientUnits",
+    value: function getGradientUnits() {
+      return this.getAttribute('gradientUnits').getString('objectBoundingBox');
+    }
+  }, {
+    key: "createGradient",
+    value: function createGradient(ctx, element, parentOpacityProp) {
+      var _this2 = this;
+
+      // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
+      var stopsContainer = this;
+
+      if (this.getHrefAttribute().hasValue()) {
+        stopsContainer = this.getHrefAttribute().getDefinition();
+        this.inheritStopContainer(stopsContainer);
+      }
+
+      var _stopsContainer = stopsContainer,
+          stops = _stopsContainer.stops;
+      var gradient = this.getGradient(ctx, element);
+
+      if (!gradient) {
+        return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);
+      }
+
+      stops.forEach(function (stop) {
+        gradient.addColorStop(stop.offset, _this2.addParentOpacity(parentOpacityProp, stop.color));
+      });
+
+      if (this.getAttribute('gradientTransform').hasValue()) {
+        // render as transformed pattern on temporary canvas
+        var document = this.document;
+        var _document$screen = document.screen,
+            MAX_VIRTUAL_PIXELS = _document$screen.MAX_VIRTUAL_PIXELS,
+            viewPort = _document$screen.viewPort;
+
+        var _viewPort$viewPorts = _slicedToArray__default['default'](viewPort.viewPorts, 1),
+            rootView = _viewPort$viewPorts[0];
+
+        var rect = new RectElement(document, null);
+        rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3.0);
+        rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3.0);
+        rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);
+        rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);
+        var group = new GElement(document, null);
+        group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());
+        group.children = [rect];
+        var patternSvg = new SVGElement(document, null);
+        patternSvg.attributes.x = new Property(document, 'x', 0);
+        patternSvg.attributes.y = new Property(document, 'y', 0);
+        patternSvg.attributes.width = new Property(document, 'width', rootView.width);
+        patternSvg.attributes.height = new Property(document, 'height', rootView.height);
+        patternSvg.children = [group];
+        var patternCanvas = document.createCanvas(rootView.width, rootView.height);
+        var patternCtx = patternCanvas.getContext('2d');
+        patternCtx.fillStyle = gradient;
+        patternSvg.render(patternCtx);
+        return patternCtx.createPattern(patternCanvas, 'no-repeat');
+      }
+
+      return gradient;
+    }
+  }, {
+    key: "inheritStopContainer",
+    value: function inheritStopContainer(stopsContainer) {
+      var _this3 = this;
+
+      this.attributesToInherit.forEach(function (attributeToInherit) {
+        if (!_this3.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {
+          _this3.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());
+        }
+      });
+    }
+  }, {
+    key: "addParentOpacity",
+    value: function addParentOpacity(parentOpacityProp, color) {
+      if (parentOpacityProp.hasValue()) {
+        var colorProp = new Property(this.document, 'color', color);
+        return colorProp.addOpacity(parentOpacityProp).getColor();
+      }
+
+      return color;
+    }
+  }]);
+
+  return GradientElement;
+}(Element);
+
+function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var LinearGradientElement = /*#__PURE__*/function (_GradientElement) {
+  _inherits__default['default'](LinearGradientElement, _GradientElement);
+
+  var _super = _createSuper$p(LinearGradientElement);
+
+  function LinearGradientElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, LinearGradientElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'linearGradient';
+
+    _this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');
+
+    return _this;
+  }
+
+  _createClass__default['default'](LinearGradientElement, [{
+    key: "getGradient",
+    value: function getGradient(ctx, element) {
+      var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
+      var boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;
+
+      if (isBoundingBoxUnits && !boundingBox) {
+        return null;
+      }
+
+      if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {
+        this.getAttribute('x1', true).setValue(0);
+        this.getAttribute('y1', true).setValue(0);
+        this.getAttribute('x2', true).setValue(1);
+        this.getAttribute('y2', true).setValue(0);
+      }
+
+      var x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');
+      var y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');
+      var x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');
+      var y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');
+
+      if (x1 === x2 && y1 === y2) {
+        return null;
+      }
+
+      return ctx.createLinearGradient(x1, y1, x2, y2);
+    }
+  }]);
+
+  return LinearGradientElement;
+}(GradientElement);
+
+function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var RadialGradientElement = /*#__PURE__*/function (_GradientElement) {
+  _inherits__default['default'](RadialGradientElement, _GradientElement);
+
+  var _super = _createSuper$o(RadialGradientElement);
+
+  function RadialGradientElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, RadialGradientElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'radialGradient';
+
+    _this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');
+
+    return _this;
+  }
+
+  _createClass__default['default'](RadialGradientElement, [{
+    key: "getGradient",
+    value: function getGradient(ctx, element) {
+      var isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';
+      var boundingBox = element.getBoundingBox(ctx);
+
+      if (isBoundingBoxUnits && !boundingBox) {
+        return null;
+      }
+
+      if (!this.getAttribute('cx').hasValue()) {
+        this.getAttribute('cx', true).setValue('50%');
+      }
+
+      if (!this.getAttribute('cy').hasValue()) {
+        this.getAttribute('cy', true).setValue('50%');
+      }
+
+      if (!this.getAttribute('r').hasValue()) {
+        this.getAttribute('r', true).setValue('50%');
+      }
+
+      var cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');
+      var cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');
+      var fx = cx;
+      var fy = cy;
+
+      if (this.getAttribute('fx').hasValue()) {
+        fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');
+      }
+
+      if (this.getAttribute('fy').hasValue()) {
+        fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');
+      }
+
+      var r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2.0 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();
+      var fr = this.getAttribute('fr').getPixels();
+      return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);
+    }
+  }]);
+
+  return RadialGradientElement;
+}(GradientElement);
+
+function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var StopElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](StopElement, _Element);
+
+  var _super = _createSuper$n(StopElement);
+
+  function StopElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, StopElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'stop';
+    var offset = Math.max(0, Math.min(1, _this.getAttribute('offset').getNumber()));
+
+    var stopOpacity = _this.getStyle('stop-opacity');
+
+    var stopColor = _this.getStyle('stop-color', true);
+
+    if (stopColor.getString() === '') {
+      stopColor.setValue('#000');
+    }
+
+    if (stopOpacity.hasValue()) {
+      stopColor = stopColor.addOpacity(stopOpacity);
+    }
+
+    _this.offset = offset;
+    _this.color = stopColor.getColor();
+    return _this;
+  }
+
+  return StopElement;
+}(Element);
+
+function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var AnimateElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](AnimateElement, _Element);
+
+  var _super = _createSuper$m(AnimateElement);
+
+  function AnimateElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, AnimateElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'animate';
+    _this.duration = 0;
+    _this.initialValue = null;
+    _this.initialUnits = '';
+    _this.removed = false;
+    _this.frozen = false;
+    document.screen.animations.push(_assertThisInitialized__default['default'](_this));
+    _this.begin = _this.getAttribute('begin').getMilliseconds();
+    _this.maxDuration = _this.begin + _this.getAttribute('dur').getMilliseconds();
+    _this.from = _this.getAttribute('from');
+    _this.to = _this.getAttribute('to');
+    _this.values = new Property(document, 'values', null);
+
+    var valuesAttr = _this.getAttribute('values');
+
+    if (valuesAttr.hasValue()) {
+      _this.values.setValue(valuesAttr.getString().split(';'));
+    }
+
+    return _this;
+  }
+
+  _createClass__default['default'](AnimateElement, [{
+    key: "getProperty",
+    value: function getProperty() {
+      var attributeType = this.getAttribute('attributeType').getString();
+      var attributeName = this.getAttribute('attributeName').getString();
+
+      if (attributeType === 'CSS') {
+        return this.parent.getStyle(attributeName, true);
+      }
+
+      return this.parent.getAttribute(attributeName, true);
+    }
+  }, {
+    key: "calcValue",
+    value: function calcValue() {
+      var initialUnits = this.initialUnits;
+
+      var _this$getProgress = this.getProgress(),
+          progress = _this$getProgress.progress,
+          from = _this$getProgress.from,
+          to = _this$getProgress.to; // tween value linearly
+
+
+      var newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;
+
+      if (initialUnits === '%') {
+        newValue *= 100.0; // numValue() returns 0-1 whereas properties are 0-100
+      }
+
+      return "".concat(newValue).concat(initialUnits);
+    }
+  }, {
+    key: "update",
+    value: function update(delta) {
+      var parent = this.parent;
+      var prop = this.getProperty(); // set initial value
+
+      if (!this.initialValue) {
+        this.initialValue = prop.getString();
+        this.initialUnits = prop.getUnits();
+      } // if we're past the end time
+
+
+      if (this.duration > this.maxDuration) {
+        var fill = this.getAttribute('fill').getString('remove'); // loop for indefinitely repeating animations
+
+        if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {
+          this.duration = 0;
+        } else if (fill === 'freeze' && !this.frozen) {
+          this.frozen = true;
+          parent.animationFrozen = true;
+          parent.animationFrozenValue = prop.getString();
+        } else if (fill === 'remove' && !this.removed) {
+          this.removed = true;
+          prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);
+          return true;
+        }
+
+        return false;
+      }
+
+      this.duration += delta; // if we're past the begin time
+
+      var updated = false;
+
+      if (this.begin < this.duration) {
+        var newValue = this.calcValue(); // tween
+
+        var typeAttr = this.getAttribute('type');
+
+        if (typeAttr.hasValue()) {
+          // for transform, etc.
+          var type = typeAttr.getString();
+          newValue = "".concat(type, "(").concat(newValue, ")");
+        }
+
+        prop.setValue(newValue);
+        updated = true;
+      }
+
+      return updated;
+    }
+  }, {
+    key: "getProgress",
+    value: function getProgress() {
+      var document = this.document,
+          values = this.values;
+      var result = {
+        progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
+      };
+
+      if (values.hasValue()) {
+        var p = result.progress * (values.getValue().length - 1);
+        var lb = Math.floor(p);
+        var ub = Math.ceil(p);
+        result.from = new Property(document, 'from', parseFloat(values.getValue()[lb]));
+        result.to = new Property(document, 'to', parseFloat(values.getValue()[ub]));
+        result.progress = (p - lb) / (ub - lb);
+      } else {
+        result.from = this.from;
+        result.to = this.to;
+      }
+
+      return result;
+    }
+  }]);
+
+  return AnimateElement;
+}(Element);
+
+function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var AnimateColorElement = /*#__PURE__*/function (_AnimateElement) {
+  _inherits__default['default'](AnimateColorElement, _AnimateElement);
+
+  var _super = _createSuper$l(AnimateColorElement);
+
+  function AnimateColorElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, AnimateColorElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'animateColor';
+    return _this;
+  }
+
+  _createClass__default['default'](AnimateColorElement, [{
+    key: "calcValue",
+    value: function calcValue() {
+      var _this$getProgress = this.getProgress(),
+          progress = _this$getProgress.progress,
+          from = _this$getProgress.from,
+          to = _this$getProgress.to;
+
+      var colorFrom = new RGBColor__default['default'](from.getColor());
+      var colorTo = new RGBColor__default['default'](to.getColor());
+
+      if (colorFrom.ok && colorTo.ok) {
+        // tween color linearly
+        var r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;
+        var g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;
+        var b = colorFrom.b + (colorTo.b - colorFrom.b) * progress; // ? alpha
+
+        return "rgb(".concat(Math.floor(r), ", ").concat(Math.floor(g), ", ").concat(Math.floor(b), ")");
+      }
+
+      return this.getAttribute('from').getColor();
+    }
+  }]);
+
+  return AnimateColorElement;
+}(AnimateElement);
+
+function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var AnimateTransformElement = /*#__PURE__*/function (_AnimateElement) {
+  _inherits__default['default'](AnimateTransformElement, _AnimateElement);
+
+  var _super = _createSuper$k(AnimateTransformElement);
+
+  function AnimateTransformElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, AnimateTransformElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'animateTransform';
+    return _this;
+  }
+
+  _createClass__default['default'](AnimateTransformElement, [{
+    key: "calcValue",
+    value: function calcValue() {
+      var _this$getProgress = this.getProgress(),
+          progress = _this$getProgress.progress,
+          from = _this$getProgress.from,
+          to = _this$getProgress.to; // tween value linearly
+
+
+      var transformFrom = toNumbers(from.getString());
+      var transformTo = toNumbers(to.getString());
+      var newValue = transformFrom.map(function (from, i) {
+        var to = transformTo[i];
+        return from + (to - from) * progress;
+      }).join(' ');
+      return newValue;
+    }
+  }]);
+
+  return AnimateTransformElement;
+}(AnimateElement);
+
+function _createForOfIteratorHelper$1(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+
+function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
+
+function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+
+function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var FontElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](FontElement, _Element);
+
+  var _super = _createSuper$j(FontElement);
+
+  function FontElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, FontElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'font';
+    _this.glyphs = {};
+    _this.horizAdvX = _this.getAttribute('horiz-adv-x').getNumber();
+    var definitions = document.definitions;
+
+    var _assertThisInitialize = _assertThisInitialized__default['default'](_this),
+        children = _assertThisInitialize.children;
+
+    var _iterator = _createForOfIteratorHelper$1(children),
+        _step;
+
+    try {
+      for (_iterator.s(); !(_step = _iterator.n()).done;) {
+        var child = _step.value;
+
+        switch (child.type) {
+          case 'font-face':
+            {
+              _this.fontFace = child;
+              var fontFamilyStyle = child.getStyle('font-family');
+
+              if (fontFamilyStyle.hasValue()) {
+                definitions[fontFamilyStyle.getString()] = _assertThisInitialized__default['default'](_this);
+              }
+
+              break;
+            }
+
+          case 'missing-glyph':
+            _this.missingGlyph = child;
+            break;
+
+          case 'glyph':
+            {
+              var glyph = child;
+
+              if (glyph.arabicForm) {
+                _this.isRTL = true;
+                _this.isArabic = true;
+
+                if (typeof _this.glyphs[glyph.unicode] === 'undefined') {
+                  _this.glyphs[glyph.unicode] = {};
+                }
+
+                _this.glyphs[glyph.unicode][glyph.arabicForm] = glyph;
+              } else {
+                _this.glyphs[glyph.unicode] = glyph;
+              }
+
+              break;
+            }
+
+          default:
+        }
+      }
+    } catch (err) {
+      _iterator.e(err);
+    } finally {
+      _iterator.f();
+    }
+
+    return _this;
+  }
+
+  _createClass__default['default'](FontElement, [{
+    key: "render",
+    value: function render() {// NO RENDER
+    }
+  }]);
+
+  return FontElement;
+}(Element);
+
+function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var FontFaceElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](FontFaceElement, _Element);
+
+  var _super = _createSuper$i(FontFaceElement);
+
+  function FontFaceElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, FontFaceElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'font-face';
+    _this.ascent = _this.getAttribute('ascent').getNumber();
+    _this.descent = _this.getAttribute('descent').getNumber();
+    _this.unitsPerEm = _this.getAttribute('units-per-em').getNumber();
+    return _this;
+  }
+
+  return FontFaceElement;
+}(Element);
+
+function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var MissingGlyphElement = /*#__PURE__*/function (_PathElement) {
+  _inherits__default['default'](MissingGlyphElement, _PathElement);
+
+  var _super = _createSuper$h(MissingGlyphElement);
+
+  function MissingGlyphElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, MissingGlyphElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'missing-glyph';
+    _this.horizAdvX = 0;
+    return _this;
+  }
+
+  return MissingGlyphElement;
+}(PathElement);
+
+function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var TRefElement = /*#__PURE__*/function (_TextElement) {
+  _inherits__default['default'](TRefElement, _TextElement);
+
+  var _super = _createSuper$g(TRefElement);
+
+  function TRefElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, TRefElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'tref';
+    return _this;
+  }
+
+  _createClass__default['default'](TRefElement, [{
+    key: "getText",
+    value: function getText() {
+      var element = this.getHrefAttribute().getDefinition();
+
+      if (element) {
+        var firstChild = element.children[0];
+
+        if (firstChild) {
+          return firstChild.getText();
+        }
+      }
+
+      return '';
+    }
+  }]);
+
+  return TRefElement;
+}(TextElement);
+
+function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var AElement = /*#__PURE__*/function (_TextElement) {
+  _inherits__default['default'](AElement, _TextElement);
+
+  var _super = _createSuper$f(AElement);
+
+  function AElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, AElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'a';
+    var childNodes = node.childNodes;
+    var firstChild = childNodes[0];
+    var hasText = childNodes.length > 0 && Array.from(childNodes).every(function (node) {
+      return node.nodeType === 3;
+    });
+    _this.hasText = hasText;
+    _this.text = hasText ? _this.getTextFromNode(firstChild) : '';
+    return _this;
+  }
+
+  _createClass__default['default'](AElement, [{
+    key: "getText",
+    value: function getText() {
+      return this.text;
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      if (this.hasText) {
+        // render as text element
+        _get__default['default'](_getPrototypeOf__default['default'](AElement.prototype), "renderChildren", this).call(this, ctx);
+
+        var document = this.document,
+            x = this.x,
+            y = this.y;
+        var mouse = document.screen.mouse;
+        var fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize); // Do not calc bounding box if mouse is not working.
+
+        if (mouse.isWorking()) {
+          mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));
+        }
+      } else if (this.children.length > 0) {
+        // render as temporary group
+        var g = new GElement(this.document, null);
+        g.children = this.children;
+        g.parent = this;
+        g.render(ctx);
+      }
+    }
+  }, {
+    key: "onClick",
+    value: function onClick() {
+      var window = this.document.window;
+
+      if (window) {
+        window.open(this.getHrefAttribute().getString());
+      }
+    }
+  }, {
+    key: "onMouseMove",
+    value: function onMouseMove() {
+      var ctx = this.document.ctx;
+      ctx.canvas.style.cursor = 'pointer';
+    }
+  }]);
+
+  return AElement;
+}(TextElement);
+
+function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
+
+function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
+
+function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
+
+function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var TextPathElement = /*#__PURE__*/function (_TextElement) {
+  _inherits__default['default'](TextPathElement, _TextElement);
+
+  var _super = _createSuper$e(TextPathElement);
+
+  function TextPathElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, TextPathElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'textPath';
+    _this.textWidth = 0;
+    _this.textHeight = 0;
+    _this.pathLength = -1;
+    _this.glyphInfo = null;
+    _this.letterSpacingCache = [];
+    _this.measuresCache = new Map([['', 0]]);
+
+    var pathElement = _this.getHrefAttribute().getDefinition();
+
+    _this.text = _this.getTextFromNode();
+    _this.dataArray = _this.parsePathData(pathElement);
+    return _this;
+  }
+
+  _createClass__default['default'](TextPathElement, [{
+    key: "getText",
+    value: function getText() {
+      return this.text;
+    }
+  }, {
+    key: "path",
+    value: function path(ctx) {
+      var dataArray = this.dataArray;
+
+      if (ctx) {
+        ctx.beginPath();
+      }
+
+      dataArray.forEach(function (_ref) {
+        var type = _ref.type,
+            points = _ref.points;
+
+        switch (type) {
+          case PathParser.LINE_TO:
+            if (ctx) {
+              ctx.lineTo(points[0], points[1]);
+            }
+
+            break;
+
+          case PathParser.MOVE_TO:
+            if (ctx) {
+              ctx.moveTo(points[0], points[1]);
+            }
+
+            break;
+
+          case PathParser.CURVE_TO:
+            if (ctx) {
+              ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
+            }
+
+            break;
+
+          case PathParser.QUAD_TO:
+            if (ctx) {
+              ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);
+            }
+
+            break;
+
+          case PathParser.ARC:
+            {
+              var _points = _slicedToArray__default['default'](points, 8),
+                  cx = _points[0],
+                  cy = _points[1],
+                  rx = _points[2],
+                  ry = _points[3],
+                  theta = _points[4],
+                  dTheta = _points[5],
+                  psi = _points[6],
+                  fs = _points[7];
+
+              var r = rx > ry ? rx : ry;
+              var scaleX = rx > ry ? 1 : rx / ry;
+              var scaleY = rx > ry ? ry / rx : 1;
+
+              if (ctx) {
+                ctx.translate(cx, cy);
+                ctx.rotate(psi);
+                ctx.scale(scaleX, scaleY);
+                ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));
+                ctx.scale(1 / scaleX, 1 / scaleY);
+                ctx.rotate(-psi);
+                ctx.translate(-cx, -cy);
+              }
+
+              break;
+            }
+
+          case PathParser.CLOSE_PATH:
+            if (ctx) {
+              ctx.closePath();
+            }
+
+            break;
+        }
+      });
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      this.setTextData(ctx);
+      ctx.save();
+      var textDecoration = this.parent.getStyle('text-decoration').getString();
+      var fontSize = this.getFontSize();
+      var glyphInfo = this.glyphInfo;
+      var fill = ctx.fillStyle;
+
+      if (textDecoration === 'underline') {
+        ctx.beginPath();
+      }
+
+      glyphInfo.forEach(function (glyph, i) {
+        var p0 = glyph.p0,
+            p1 = glyph.p1,
+            rotation = glyph.rotation,
+            partialText = glyph.text;
+        ctx.save();
+        ctx.translate(p0.x, p0.y);
+        ctx.rotate(rotation);
+
+        if (ctx.fillStyle) {
+          ctx.fillText(partialText, 0, 0);
+        }
+
+        if (ctx.strokeStyle) {
+          ctx.strokeText(partialText, 0, 0);
+        }
+
+        ctx.restore();
+
+        if (textDecoration === 'underline') {
+          if (i === 0) {
+            ctx.moveTo(p0.x, p0.y + fontSize / 8);
+          }
+
+          ctx.lineTo(p1.x, p1.y + fontSize / 5);
+        } // // To assist with debugging visually, uncomment following
+        //
+        // ctx.beginPath();
+        // if (i % 2)
+        // 	ctx.strokeStyle = 'red';
+        // else
+        // 	ctx.strokeStyle = 'green';
+        // ctx.moveTo(p0.x, p0.y);
+        // ctx.lineTo(p1.x, p1.y);
+        // ctx.stroke();
+        // ctx.closePath();
+
+      });
+
+      if (textDecoration === 'underline') {
+        ctx.lineWidth = fontSize / 20;
+        ctx.strokeStyle = fill;
+        ctx.stroke();
+        ctx.closePath();
+      }
+
+      ctx.restore();
+    }
+  }, {
+    key: "getLetterSpacingAt",
+    value: function getLetterSpacingAt() {
+      var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
+      return this.letterSpacingCache[idx] || 0;
+    }
+  }, {
+    key: "findSegmentToFitChar",
+    value: function findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, dy, c, charI) {
+      var offset = inputOffset;
+      var glyphWidth = this.measureText(ctx, c);
+
+      if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {
+        glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;
+      }
+
+      if (charI > -1) {
+        offset += this.getLetterSpacingAt(charI);
+      }
+
+      var splineStep = this.textHeight / 20;
+      var p0 = this.getEquidistantPointOnPath(offset, splineStep, 0);
+      var p1 = this.getEquidistantPointOnPath(offset + glyphWidth, splineStep, 0);
+      var segment = {
+        p0: p0,
+        p1: p1
+      };
+      var rotation = p0 && p1 ? Math.atan2(p1.y - p0.y, p1.x - p0.x) : 0;
+
+      if (dy) {
+        var dyX = Math.cos(Math.PI / 2 + rotation) * dy;
+        var dyY = Math.cos(-rotation) * dy;
+        segment.p0 = _objectSpread$2(_objectSpread$2({}, p0), {}, {
+          x: p0.x + dyX,
+          y: p0.y + dyY
+        });
+        segment.p1 = _objectSpread$2(_objectSpread$2({}, p1), {}, {
+          x: p1.x + dyX,
+          y: p1.y + dyY
+        });
+      }
+
+      offset += glyphWidth;
+      return {
+        offset: offset,
+        segment: segment,
+        rotation: rotation
+      };
+    }
+  }, {
+    key: "measureText",
+    value: function measureText(ctx, text) {
+      var measuresCache = this.measuresCache;
+      var targetText = text || this.getText();
+
+      if (measuresCache.has(targetText)) {
+        return measuresCache.get(targetText);
+      }
+
+      var measure = this.measureTargetText(ctx, targetText);
+      measuresCache.set(targetText, measure);
+      return measure;
+    } // This method supposes what all custom fonts already loaded.
+    // If some font will be loaded after this method call, <textPath> will not be rendered correctly.
+    // You need to call this method manually to update glyphs cache.
+
+  }, {
+    key: "setTextData",
+    value: function setTextData(ctx) {
+      var _this2 = this;
+
+      if (this.glyphInfo) {
+        return;
+      }
+
+      var renderText = this.getText();
+      var chars = renderText.split('');
+      var spacesNumber = renderText.split(' ').length - 1;
+      var dx = this.parent.getAttribute('dx').split().map(function (_) {
+        return _.getPixels('x');
+      });
+      var dy = this.parent.getAttribute('dy').getPixels('y');
+      var anchor = this.parent.getStyle('text-anchor').getString('start');
+      var thisSpacing = this.getStyle('letter-spacing');
+      var parentSpacing = this.parent.getStyle('letter-spacing');
+      var letterSpacing = 0;
+
+      if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {
+        letterSpacing = parentSpacing.getPixels();
+      } else if (thisSpacing.hasValue()) {
+        if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {
+          letterSpacing = thisSpacing.getPixels();
+        }
+      } // fill letter-spacing cache
+
+
+      var letterSpacingCache = [];
+      var textLen = renderText.length;
+      this.letterSpacingCache = letterSpacingCache;
+
+      for (var i = 0; i < textLen; i++) {
+        letterSpacingCache.push(typeof dx[i] !== 'undefined' ? dx[i] : letterSpacing);
+      }
+
+      var dxSum = letterSpacingCache.reduce(function (acc, cur, i) {
+        return i === 0 ? 0 : acc + cur || 0;
+      }, 0);
+      var textWidth = this.measureText(ctx);
+      var textFullWidth = Math.max(textWidth + dxSum, 0);
+      this.textWidth = textWidth;
+      this.textHeight = this.getFontSize();
+      this.glyphInfo = [];
+      var fullPathWidth = this.getPathLength();
+      var startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;
+      var offset = 0;
+
+      if (anchor === 'middle' || anchor === 'center') {
+        offset = -textFullWidth / 2;
+      }
+
+      if (anchor === 'end' || anchor === 'right') {
+        offset = -textFullWidth;
+      }
+
+      offset += startOffset;
+      chars.forEach(function (char, i) {
+        // Find such segment what distance between p0 and p1 is approx. width of glyph
+        var _this2$findSegmentToF = _this2.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, dy, char, i),
+            nextOffset = _this2$findSegmentToF.offset,
+            segment = _this2$findSegmentToF.segment,
+            rotation = _this2$findSegmentToF.rotation;
+
+        offset = nextOffset;
+
+        if (!segment.p0 || !segment.p1) {
+          return;
+        } // const width = this.getLineLength(
+        // 	segment.p0.x,
+        // 	segment.p0.y,
+        // 	segment.p1.x,
+        // 	segment.p1.y
+        // );
+        // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.
+        // Can foresee having a rough pair table built in that the developer can override as needed.
+        // Or use "dx" attribute of the <text> node as a naive replacement
+        // const kern = 0;
+        // placeholder for future implementation
+        // const midpoint = this.getPointOnLine(
+        // 	kern + width / 2.0,
+        // 	segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y
+        // );
+
+
+        _this2.glyphInfo.push({
+          // transposeX: midpoint.x,
+          // transposeY: midpoint.y,
+          text: chars[i],
+          p0: segment.p0,
+          p1: segment.p1,
+          rotation: rotation
+        });
+      });
+    }
+  }, {
+    key: "parsePathData",
+    value: function parsePathData(path) {
+      this.pathLength = -1; // reset path length
+
+      if (!path) {
+        return [];
+      }
+
+      var pathCommands = [];
+      var pathParser = path.pathParser;
+      pathParser.reset(); // convert l, H, h, V, and v to L
+
+      while (!pathParser.isEnd()) {
+        var current = pathParser.current;
+        var startX = current ? current.x : 0;
+        var startY = current ? current.y : 0;
+        var command = pathParser.next();
+        var nextCommandType = command.type;
+        var points = [];
+
+        switch (command.type) {
+          case PathParser.MOVE_TO:
+            this.pathM(pathParser, points);
+            break;
+
+          case PathParser.LINE_TO:
+            nextCommandType = this.pathL(pathParser, points);
+            break;
+
+          case PathParser.HORIZ_LINE_TO:
+            nextCommandType = this.pathH(pathParser, points);
+            break;
+
+          case PathParser.VERT_LINE_TO:
+            nextCommandType = this.pathV(pathParser, points);
+            break;
+
+          case PathParser.CURVE_TO:
+            this.pathC(pathParser, points);
+            break;
+
+          case PathParser.SMOOTH_CURVE_TO:
+            nextCommandType = this.pathS(pathParser, points);
+            break;
+
+          case PathParser.QUAD_TO:
+            this.pathQ(pathParser, points);
+            break;
+
+          case PathParser.SMOOTH_QUAD_TO:
+            nextCommandType = this.pathT(pathParser, points);
+            break;
+
+          case PathParser.ARC:
+            points = this.pathA(pathParser);
+            break;
+
+          case PathParser.CLOSE_PATH:
+            PathElement.pathZ(pathParser);
+            break;
+        }
+
+        if (command.type !== PathParser.CLOSE_PATH) {
+          pathCommands.push({
+            type: nextCommandType,
+            points: points,
+            start: {
+              x: startX,
+              y: startY
+            },
+            pathLength: this.calcLength(startX, startY, nextCommandType, points)
+          });
+        } else {
+          pathCommands.push({
+            type: PathParser.CLOSE_PATH,
+            points: [],
+            pathLength: 0
+          });
+        }
+      }
+
+      return pathCommands;
+    }
+  }, {
+    key: "pathM",
+    value: function pathM(pathParser, points) {
+      var _PathElement$pathM$po = PathElement.pathM(pathParser).point,
+          x = _PathElement$pathM$po.x,
+          y = _PathElement$pathM$po.y;
+      points.push(x, y);
+    }
+  }, {
+    key: "pathL",
+    value: function pathL(pathParser, points) {
+      var _PathElement$pathL$po = PathElement.pathL(pathParser).point,
+          x = _PathElement$pathL$po.x,
+          y = _PathElement$pathL$po.y;
+      points.push(x, y);
+      return PathParser.LINE_TO;
+    }
+  }, {
+    key: "pathH",
+    value: function pathH(pathParser, points) {
+      var _PathElement$pathH$po = PathElement.pathH(pathParser).point,
+          x = _PathElement$pathH$po.x,
+          y = _PathElement$pathH$po.y;
+      points.push(x, y);
+      return PathParser.LINE_TO;
+    }
+  }, {
+    key: "pathV",
+    value: function pathV(pathParser, points) {
+      var _PathElement$pathV$po = PathElement.pathV(pathParser).point,
+          x = _PathElement$pathV$po.x,
+          y = _PathElement$pathV$po.y;
+      points.push(x, y);
+      return PathParser.LINE_TO;
+    }
+  }, {
+    key: "pathC",
+    value: function pathC(pathParser, points) {
+      var _PathElement$pathC = PathElement.pathC(pathParser),
+          point = _PathElement$pathC.point,
+          controlPoint = _PathElement$pathC.controlPoint,
+          currentPoint = _PathElement$pathC.currentPoint;
+
+      points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+  }, {
+    key: "pathS",
+    value: function pathS(pathParser, points) {
+      var _PathElement$pathS = PathElement.pathS(pathParser),
+          point = _PathElement$pathS.point,
+          controlPoint = _PathElement$pathS.controlPoint,
+          currentPoint = _PathElement$pathS.currentPoint;
+
+      points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      return PathParser.CURVE_TO;
+    }
+  }, {
+    key: "pathQ",
+    value: function pathQ(pathParser, points) {
+      var _PathElement$pathQ = PathElement.pathQ(pathParser),
+          controlPoint = _PathElement$pathQ.controlPoint,
+          currentPoint = _PathElement$pathQ.currentPoint;
+
+      points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+    }
+  }, {
+    key: "pathT",
+    value: function pathT(pathParser, points) {
+      var _PathElement$pathT = PathElement.pathT(pathParser),
+          controlPoint = _PathElement$pathT.controlPoint,
+          currentPoint = _PathElement$pathT.currentPoint;
+
+      points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);
+      return PathParser.QUAD_TO;
+    }
+  }, {
+    key: "pathA",
+    value: function pathA(pathParser) {
+      var _PathElement$pathA = PathElement.pathA(pathParser),
+          rX = _PathElement$pathA.rX,
+          rY = _PathElement$pathA.rY,
+          sweepFlag = _PathElement$pathA.sweepFlag,
+          xAxisRotation = _PathElement$pathA.xAxisRotation,
+          centp = _PathElement$pathA.centp,
+          a1 = _PathElement$pathA.a1,
+          ad = _PathElement$pathA.ad;
+
+      if (sweepFlag === 0 && ad > 0) {
+        ad -= 2 * Math.PI;
+      }
+
+      if (sweepFlag === 1 && ad < 0) {
+        ad += 2 * Math.PI;
+      }
+
+      return [centp.x, centp.y, rX, rY, a1, ad, xAxisRotation, sweepFlag];
+    }
+  }, {
+    key: "calcLength",
+    value: function calcLength(x, y, commandType, points) {
+      var len = 0;
+      var p1 = null;
+      var p2 = null;
+      var t = 0;
+
+      switch (commandType) {
+        case PathParser.LINE_TO:
+          return this.getLineLength(x, y, points[0], points[1]);
+
+        case PathParser.CURVE_TO:
+          // Approximates by breaking curve into 100 line segments
+          len = 0.0;
+          p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
+
+          for (t = 0.01; t <= 1; t += 0.01) {
+            p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);
+            len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+            p1 = p2;
+          }
+
+          return len;
+
+        case PathParser.QUAD_TO:
+          // Approximates by breaking curve into 100 line segments
+          len = 0.0;
+          p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);
+
+          for (t = 0.01; t <= 1; t += 0.01) {
+            p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);
+            len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+            p1 = p2;
+          }
+
+          return len;
+
+        case PathParser.ARC:
+          {
+            // Approximates by breaking curve into line segments
+            len = 0.0;
+            var start = points[4]; // 4 = theta
+
+            var dTheta = points[5]; // 5 = dTheta
+
+            var end = points[4] + dTheta;
+            var inc = Math.PI / 180.0; // 1 degree resolution
+
+            if (Math.abs(start - end) < inc) {
+              inc = Math.abs(start - end);
+            } // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi
+
+
+            p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);
+
+            if (dTheta < 0) {
+              // clockwise
+              for (t = start - inc; t > end; t -= inc) {
+                p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
+                len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                p1 = p2;
+              }
+            } else {
+              // counter-clockwise
+              for (t = start + inc; t < end; t += inc) {
+                p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);
+                len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+                p1 = p2;
+              }
+            }
+
+            p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);
+            len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);
+            return len;
+          }
+      }
+
+      return 0;
+    }
+  }, {
+    key: "getPointOnLine",
+    value: function getPointOnLine(dist, p1x, p1y, p2x, p2y) {
+      var fromX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : p1x;
+      var fromY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : p1y;
+      var m = (p2y - p1y) / (p2x - p1x + PSEUDO_ZERO);
+      var run = Math.sqrt(dist * dist / (1 + m * m));
+
+      if (p2x < p1x) {
+        run *= -1;
+      }
+
+      var rise = m * run;
+      var pt = null;
+
+      if (p2x === p1x) {
+        // vertical line
+        pt = {
+          x: fromX,
+          y: fromY + rise
+        };
+      } else if ((fromY - p1y) / (fromX - p1x + PSEUDO_ZERO) === m) {
+        pt = {
+          x: fromX + run,
+          y: fromY + rise
+        };
+      } else {
+        var ix = 0;
+        var iy = 0;
+        var len = this.getLineLength(p1x, p1y, p2x, p2y);
+
+        if (len < PSEUDO_ZERO) {
+          return null;
+        }
+
+        var u = (fromX - p1x) * (p2x - p1x) + (fromY - p1y) * (p2y - p1y);
+        u /= len * len;
+        ix = p1x + u * (p2x - p1x);
+        iy = p1y + u * (p2y - p1y);
+        var pRise = this.getLineLength(fromX, fromY, ix, iy);
+        var pRun = Math.sqrt(dist * dist - pRise * pRise);
+        run = Math.sqrt(pRun * pRun / (1 + m * m));
+
+        if (p2x < p1x) {
+          run *= -1;
+        }
+
+        rise = m * run;
+        pt = {
+          x: ix + run,
+          y: iy + rise
+        };
+      }
+
+      return pt;
+    }
+  }, {
+    key: "getPointOnPath",
+    value: function getPointOnPath(distance) {
+      var fullLen = this.getPathLength();
+      var cumulativePathLength = 0;
+      var p = null;
+
+      if (distance < -0.00005 || distance - 0.00005 > fullLen) {
+        return null;
+      }
+
+      var dataArray = this.dataArray;
+
+      var _iterator = _createForOfIteratorHelper(dataArray),
+          _step;
+
+      try {
+        for (_iterator.s(); !(_step = _iterator.n()).done;) {
+          var command = _step.value;
+
+          if (command && (command.pathLength < 0.00005 || cumulativePathLength + command.pathLength + 0.00005 < distance)) {
+            cumulativePathLength += command.pathLength;
+            continue;
+          }
+
+          var delta = distance - cumulativePathLength;
+          var currentT = 0;
+
+          switch (command.type) {
+            case PathParser.LINE_TO:
+              p = this.getPointOnLine(delta, command.start.x, command.start.y, command.points[0], command.points[1], command.start.x, command.start.y);
+              break;
+
+            case PathParser.ARC:
+              {
+                var start = command.points[4]; // 4 = theta
+
+                var dTheta = command.points[5]; // 5 = dTheta
+
+                var end = command.points[4] + dTheta;
+                currentT = start + delta / command.pathLength * dTheta;
+
+                if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {
+                  break;
+                }
+
+                p = this.getPointOnEllipticalArc(command.points[0], command.points[1], command.points[2], command.points[3], currentT, command.points[6]);
+                break;
+              }
+
+            case PathParser.CURVE_TO:
+              currentT = delta / command.pathLength;
+
+              if (currentT > 1) {
+                currentT = 1;
+              }
+
+              p = this.getPointOnCubicBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3], command.points[4], command.points[5]);
+              break;
+
+            case PathParser.QUAD_TO:
+              currentT = delta / command.pathLength;
+
+              if (currentT > 1) {
+                currentT = 1;
+              }
+
+              p = this.getPointOnQuadraticBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3]);
+              break;
+
+            default:
+          }
+
+          if (p) {
+            return p;
+          }
+
+          break;
+        }
+      } catch (err) {
+        _iterator.e(err);
+      } finally {
+        _iterator.f();
+      }
+
+      return null;
+    }
+  }, {
+    key: "getLineLength",
+    value: function getLineLength(x1, y1, x2, y2) {
+      return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
+    }
+  }, {
+    key: "getPathLength",
+    value: function getPathLength() {
+      if (this.pathLength === -1) {
+        this.pathLength = this.dataArray.reduce(function (length, command) {
+          return command.pathLength > 0 ? length + command.pathLength : length;
+        }, 0);
+      }
+
+      return this.pathLength;
+    }
+  }, {
+    key: "getPointOnCubicBezier",
+    value: function getPointOnCubicBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y) {
+      var x = p4x * CB1(pct) + p3x * CB2(pct) + p2x * CB3(pct) + p1x * CB4(pct);
+      var y = p4y * CB1(pct) + p3y * CB2(pct) + p2y * CB3(pct) + p1y * CB4(pct);
+      return {
+        x: x,
+        y: y
+      };
+    }
+  }, {
+    key: "getPointOnQuadraticBezier",
+    value: function getPointOnQuadraticBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y) {
+      var x = p3x * QB1(pct) + p2x * QB2(pct) + p1x * QB3(pct);
+      var y = p3y * QB1(pct) + p2y * QB2(pct) + p1y * QB3(pct);
+      return {
+        x: x,
+        y: y
+      };
+    }
+  }, {
+    key: "getPointOnEllipticalArc",
+    value: function getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
+      var cosPsi = Math.cos(psi);
+      var sinPsi = Math.sin(psi);
+      var pt = {
+        x: rx * Math.cos(theta),
+        y: ry * Math.sin(theta)
+      };
+      return {
+        x: cx + (pt.x * cosPsi - pt.y * sinPsi),
+        y: cy + (pt.x * sinPsi + pt.y * cosPsi)
+      };
+    } // TODO need some optimisations. possibly build cache only for curved segments?
+
+  }, {
+    key: "buildEquidistantCache",
+    value: function buildEquidistantCache(inputStep, inputPrecision) {
+      var fullLen = this.getPathLength();
+      var precision = inputPrecision || 0.25; // accuracy vs performance
+
+      var step = inputStep || fullLen / 100;
+
+      if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {
+        // Prepare cache
+        this.equidistantCache = {
+          step: step,
+          precision: precision,
+          points: []
+        }; // Calculate points
+
+        var s = 0;
+
+        for (var l = 0; l <= fullLen; l += precision) {
+          var p0 = this.getPointOnPath(l);
+          var p1 = this.getPointOnPath(l + precision);
+
+          if (!p0 || !p1) {
+            continue;
+          }
+
+          s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);
+
+          if (s >= step) {
+            this.equidistantCache.points.push({
+              x: p0.x,
+              y: p0.y,
+              distance: l
+            });
+            s -= step;
+          }
+        }
+      }
+    }
+  }, {
+    key: "getEquidistantPointOnPath",
+    value: function getEquidistantPointOnPath(targetDistance, step, precision) {
+      this.buildEquidistantCache(step, precision);
+
+      if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {
+        return null;
+      }
+
+      var idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));
+      return this.equidistantCache.points[idx] || null;
+    }
+  }]);
+
+  return TextPathElement;
+}(TextElement);
+
+function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var dataUriRegex = /^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;
+
+var ImageElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default['default'](ImageElement, _RenderedElement);
+
+  var _super = _createSuper$d(ImageElement);
+
+  function ImageElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, ImageElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'image';
+    _this.loaded = false;
+
+    var href = _this.getHrefAttribute().getString();
+
+    if (!href) {
+      return _possibleConstructorReturn__default['default'](_this);
+    }
+
+    var isSvg = href.endsWith('.svg') || /^\s*data:image\/svg\+xml/i.test(href);
+    document.images.push(_assertThisInitialized__default['default'](_this));
+
+    if (!isSvg) {
+      void _this.loadImage(href);
+    } else {
+      void _this.loadSvg(href);
+    }
+
+    _this.isSvg = isSvg;
+    return _this;
+  }
+
+  _createClass__default['default'](ImageElement, [{
+    key: "loadImage",
+    value: function () {
+      var _loadImage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(href) {
+        var image;
+        return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                _context.prev = 0;
+                _context.next = 3;
+                return this.document.createImage(href);
+
+              case 3:
+                image = _context.sent;
+                this.image = image;
+                _context.next = 10;
+                break;
+
+              case 7:
+                _context.prev = 7;
+                _context.t0 = _context["catch"](0);
+                console.error("Error while loading image \"".concat(href, "\":"), _context.t0);
+
+              case 10:
+                this.loaded = true;
+
+              case 11:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee, this, [[0, 7]]);
+      }));
+
+      function loadImage(_x) {
+        return _loadImage.apply(this, arguments);
+      }
+
+      return loadImage;
+    }()
+  }, {
+    key: "loadSvg",
+    value: function () {
+      var _loadSvg = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(href) {
+        var match, data, response, svg;
+        return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
+          while (1) {
+            switch (_context2.prev = _context2.next) {
+              case 0:
+                match = dataUriRegex.exec(href);
+
+                if (!match) {
+                  _context2.next = 6;
+                  break;
+                }
+
+                data = match[5];
+
+                if (match[4] === 'base64') {
+                  this.image = atob(data);
+                } else {
+                  this.image = decodeURIComponent(data);
+                }
+
+                _context2.next = 19;
+                break;
+
+              case 6:
+                _context2.prev = 6;
+                _context2.next = 9;
+                return this.document.fetch(href);
+
+              case 9:
+                response = _context2.sent;
+                _context2.next = 12;
+                return response.text();
+
+              case 12:
+                svg = _context2.sent;
+                this.image = svg;
+                _context2.next = 19;
+                break;
+
+              case 16:
+                _context2.prev = 16;
+                _context2.t0 = _context2["catch"](6);
+                console.error("Error while loading image \"".concat(href, "\":"), _context2.t0);
+
+              case 19:
+                this.loaded = true;
+
+              case 20:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2, this, [[6, 16]]);
+      }));
+
+      function loadSvg(_x2) {
+        return _loadSvg.apply(this, arguments);
+      }
+
+      return loadSvg;
+    }()
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      var document = this.document,
+          image = this.image,
+          loaded = this.loaded;
+      var x = this.getAttribute('x').getPixels('x');
+      var y = this.getAttribute('y').getPixels('y');
+      var width = this.getStyle('width').getPixels('x');
+      var height = this.getStyle('height').getPixels('y');
+
+      if (!loaded || !image || !width || !height) {
+        return;
+      }
+
+      ctx.save();
+      ctx.translate(x, y);
+
+      if (this.isSvg) {
+        var subDocument = document.canvg.forkString(ctx, this.image, {
+          ignoreMouse: true,
+          ignoreAnimation: true,
+          ignoreDimensions: true,
+          ignoreClear: true,
+          offsetX: 0,
+          offsetY: 0,
+          scaleWidth: width,
+          scaleHeight: height
+        });
+        subDocument.document.documentElement.parent = this;
+        void subDocument.render();
+      } else {
+        var _image = this.image;
+        document.setViewBox({
+          ctx: ctx,
+          aspectRatio: this.getAttribute('preserveAspectRatio').getString(),
+          width: width,
+          desiredWidth: _image.width,
+          height: height,
+          desiredHeight: _image.height
+        });
+
+        if (this.loaded) {
+          if (typeof _image.complete === 'undefined' || _image.complete) {
+            ctx.drawImage(_image, 0, 0);
+          }
+        }
+      }
+
+      ctx.restore();
+    }
+  }, {
+    key: "getBoundingBox",
+    value: function getBoundingBox() {
+      var x = this.getAttribute('x').getPixels('x');
+      var y = this.getAttribute('y').getPixels('y');
+      var width = this.getStyle('width').getPixels('x');
+      var height = this.getStyle('height').getPixels('y');
+      return new BoundingBox(x, y, x + width, y + height);
+    }
+  }]);
+
+  return ImageElement;
+}(RenderedElement);
+
+function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var SymbolElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default['default'](SymbolElement, _RenderedElement);
+
+  var _super = _createSuper$c(SymbolElement);
+
+  function SymbolElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, SymbolElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'symbol';
+    return _this;
+  }
+
+  _createClass__default['default'](SymbolElement, [{
+    key: "render",
+    value: function render(_) {// NO RENDER
+    }
+  }]);
+
+  return SymbolElement;
+}(RenderedElement);
+
+var SVGFontLoader = /*#__PURE__*/function () {
+  function SVGFontLoader(document) {
+    _classCallCheck__default['default'](this, SVGFontLoader);
+
+    this.document = document;
+    this.loaded = false;
+    document.fonts.push(this);
+  }
+
+  _createClass__default['default'](SVGFontLoader, [{
+    key: "load",
+    value: function () {
+      var _load = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(fontFamily, url) {
+        var document, svgDocument, fonts;
+        return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                _context.prev = 0;
+                document = this.document;
+                _context.next = 4;
+                return document.canvg.parser.load(url);
+
+              case 4:
+                svgDocument = _context.sent;
+                fonts = svgDocument.getElementsByTagName('font');
+                Array.from(fonts).forEach(function (fontNode) {
+                  var font = document.createElement(fontNode);
+                  document.definitions[fontFamily] = font;
+                });
+                _context.next = 12;
+                break;
+
+              case 9:
+                _context.prev = 9;
+                _context.t0 = _context["catch"](0);
+                console.error("Error while loading font \"".concat(url, "\":"), _context.t0);
+
+              case 12:
+                this.loaded = true;
+
+              case 13:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee, this, [[0, 9]]);
+      }));
+
+      function load(_x, _x2) {
+        return _load.apply(this, arguments);
+      }
+
+      return load;
+    }()
+  }]);
+
+  return SVGFontLoader;
+}();
+
+function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var StyleElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](StyleElement, _Element);
+
+  var _super = _createSuper$b(StyleElement);
+
+  function StyleElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, StyleElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'style';
+    var css = compressSpaces(Array.from(node.childNodes) // NEED TEST
+    .map(function (_) {
+      return _.textContent;
+    }).join('').replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, '') // remove comments
+    .replace(/@import.*;/g, '') // remove imports
+    );
+    var cssDefs = css.split('}');
+    cssDefs.forEach(function (_) {
+      var def = _.trim();
+
+      if (!def) {
+        return;
+      }
+
+      var cssParts = def.split('{');
+      var cssClasses = cssParts[0].split(',');
+      var cssProps = cssParts[1].split(';');
+      cssClasses.forEach(function (_) {
+        var cssClass = _.trim();
+
+        if (!cssClass) {
+          return;
+        }
+
+        var props = document.styles[cssClass] || {};
+        cssProps.forEach(function (cssProp) {
+          var prop = cssProp.indexOf(':');
+          var name = cssProp.substr(0, prop).trim();
+          var value = cssProp.substr(prop + 1, cssProp.length - prop).trim();
+
+          if (name && value) {
+            props[name] = new Property(document, name, value);
+          }
+        });
+        document.styles[cssClass] = props;
+        document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);
+
+        if (cssClass === '@font-face') {
+          //  && !nodeEnv
+          var fontFamily = props['font-family'].getString().replace(/"|'/g, '');
+          var srcs = props.src.getString().split(',');
+          srcs.forEach(function (src) {
+            if (src.indexOf('format("svg")') > 0) {
+              var url = parseExternalUrl(src);
+
+              if (url) {
+                void new SVGFontLoader(document).load(fontFamily, url);
+              }
+            }
+          });
+        }
+      });
+    });
+    return _this;
+  }
+
+  return StyleElement;
+}(Element);
+StyleElement.parseExternalUrl = parseExternalUrl;
+
+function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var UseElement = /*#__PURE__*/function (_RenderedElement) {
+  _inherits__default['default'](UseElement, _RenderedElement);
+
+  var _super = _createSuper$a(UseElement);
+
+  function UseElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, UseElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'use';
+    return _this;
+  }
+
+  _createClass__default['default'](UseElement, [{
+    key: "setContext",
+    value: function setContext(ctx) {
+      _get__default['default'](_getPrototypeOf__default['default'](UseElement.prototype), "setContext", this).call(this, ctx);
+
+      var xAttr = this.getAttribute('x');
+      var yAttr = this.getAttribute('y');
+
+      if (xAttr.hasValue()) {
+        ctx.translate(xAttr.getPixels('x'), 0);
+      }
+
+      if (yAttr.hasValue()) {
+        ctx.translate(0, yAttr.getPixels('y'));
+      }
+    }
+  }, {
+    key: "path",
+    value: function path(ctx) {
+      var element = this.element;
+
+      if (element) {
+        element.path(ctx);
+      }
+    }
+  }, {
+    key: "renderChildren",
+    value: function renderChildren(ctx) {
+      var document = this.document,
+          element = this.element;
+
+      if (element) {
+        var tempSvg = element;
+
+        if (element.type === 'symbol') {
+          // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)
+          tempSvg = new SVGElement(document, null);
+          tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());
+          tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());
+          tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());
+          tempSvg.children = element.children; // element is still the parent of the children
+
+          element.styles.opacity = new Property(document, 'opacity', this.calculateOpacity());
+        }
+
+        if (tempSvg.type === 'svg') {
+          var widthStyle = this.getStyle('width', false, true);
+          var heightStyle = this.getStyle('height', false, true); // if symbol or svg, inherit width/height from me
+
+          if (widthStyle.hasValue()) {
+            tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());
+          }
+
+          if (heightStyle.hasValue()) {
+            tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());
+          }
+        }
+
+        var oldParent = tempSvg.parent;
+        tempSvg.parent = this;
+        tempSvg.render(ctx);
+        tempSvg.parent = oldParent;
+      }
+    }
+  }, {
+    key: "getBoundingBox",
+    value: function getBoundingBox(ctx) {
+      var element = this.element;
+
+      if (element) {
+        return element.getBoundingBox(ctx);
+      }
+
+      return null;
+    }
+  }, {
+    key: "elementTransform",
+    value: function elementTransform() {
+      var document = this.document,
+          element = this.element;
+      return Transform.fromElement(document, element);
+    }
+  }, {
+    key: "element",
+    get: function get() {
+      if (!this.cachedElement) {
+        this.cachedElement = this.getHrefAttribute().getDefinition();
+      }
+
+      return this.cachedElement;
+    }
+  }]);
+
+  return UseElement;
+}(RenderedElement);
+
+function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+function imGet(img, x, y, width, _height, rgba) {
+  return img[y * width * 4 + x * 4 + rgba];
+}
+
+function imSet(img, x, y, width, _height, rgba, val) {
+  img[y * width * 4 + x * 4 + rgba] = val;
+}
+
+function m(matrix, i, v) {
+  var mi = matrix[i];
+  return mi * v;
+}
+
+function c(a, m1, m2, m3) {
+  return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;
+}
+
+var FeColorMatrixElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](FeColorMatrixElement, _Element);
+
+  var _super = _createSuper$9(FeColorMatrixElement);
+
+  function FeColorMatrixElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, FeColorMatrixElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'feColorMatrix';
+    var matrix = toNumbers(_this.getAttribute('values').getString());
+
+    switch (_this.getAttribute('type').getString('matrix')) {
+      // http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
+      case 'saturate':
+        {
+          var s = matrix[0];
+          /* eslint-disable array-element-newline */
+
+          matrix = [0.213 + 0.787 * s, 0.715 - 0.715 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 + 0.285 * s, 0.072 - 0.072 * s, 0, 0, 0.213 - 0.213 * s, 0.715 - 0.715 * s, 0.072 + 0.928 * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
+          /* eslint-enable array-element-newline */
+
+          break;
+        }
+
+      case 'hueRotate':
+        {
+          var a = matrix[0] * Math.PI / 180.0;
+          /* eslint-disable array-element-newline */
+
+          matrix = [c(a, 0.213, 0.787, -0.213), c(a, 0.715, -0.715, -0.715), c(a, 0.072, -0.072, 0.928), 0, 0, c(a, 0.213, -0.213, 0.143), c(a, 0.715, 0.285, 0.140), c(a, 0.072, -0.072, -0.283), 0, 0, c(a, 0.213, -0.213, -0.787), c(a, 0.715, -0.715, 0.715), c(a, 0.072, 0.928, 0.072), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
+          /* eslint-enable array-element-newline */
+
+          break;
+        }
+
+      case 'luminanceToAlpha':
+        /* eslint-disable array-element-newline */
+        matrix = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2125, 0.7154, 0.0721, 0, 0, 0, 0, 0, 0, 1];
+        /* eslint-enable array-element-newline */
+
+        break;
+    }
+
+    _this.matrix = matrix;
+    _this.includeOpacity = _this.getAttribute('includeOpacity').hasValue();
+    return _this;
+  }
+
+  _createClass__default['default'](FeColorMatrixElement, [{
+    key: "apply",
+    value: function apply(ctx, _x, _y, width, height) {
+      // assuming x==0 && y==0 for now
+      var includeOpacity = this.includeOpacity,
+          matrix = this.matrix;
+      var srcData = ctx.getImageData(0, 0, width, height);
+
+      for (var y = 0; y < height; y++) {
+        for (var x = 0; x < width; x++) {
+          var r = imGet(srcData.data, x, y, width, height, 0);
+          var g = imGet(srcData.data, x, y, width, height, 1);
+          var b = imGet(srcData.data, x, y, width, height, 2);
+          var a = imGet(srcData.data, x, y, width, height, 3);
+          var nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);
+          var ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);
+          var nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);
+          var na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);
+
+          if (includeOpacity) {
+            nr = 0;
+            ng = 0;
+            nb = 0;
+            na *= a / 255;
+          }
+
+          imSet(srcData.data, x, y, width, height, 0, nr);
+          imSet(srcData.data, x, y, width, height, 1, ng);
+          imSet(srcData.data, x, y, width, height, 2, nb);
+          imSet(srcData.data, x, y, width, height, 3, na);
+        }
+      }
+
+      ctx.clearRect(0, 0, width, height);
+      ctx.putImageData(srcData, 0, 0);
+    }
+  }]);
+
+  return FeColorMatrixElement;
+}(Element);
+
+function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var MaskElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](MaskElement, _Element);
+
+  var _super = _createSuper$8(MaskElement);
+
+  function MaskElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, MaskElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'mask';
+    return _this;
+  }
+
+  _createClass__default['default'](MaskElement, [{
+    key: "apply",
+    value: function apply(ctx, element) {
+      var document = this.document; // render as temp svg
+
+      var x = this.getAttribute('x').getPixels('x');
+      var y = this.getAttribute('y').getPixels('y');
+      var width = this.getStyle('width').getPixels('x');
+      var height = this.getStyle('height').getPixels('y');
+
+      if (!width && !height) {
+        var boundingBox = new BoundingBox();
+        this.children.forEach(function (child) {
+          boundingBox.addBoundingBox(child.getBoundingBox(ctx));
+        });
+        x = Math.floor(boundingBox.x1);
+        y = Math.floor(boundingBox.y1);
+        width = Math.floor(boundingBox.width);
+        height = Math.floor(boundingBox.height);
+      }
+
+      var ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);
+      var maskCanvas = document.createCanvas(x + width, y + height);
+      var maskCtx = maskCanvas.getContext('2d');
+      document.screen.setDefaults(maskCtx);
+      this.renderChildren(maskCtx); // convert mask to alpha with a fake node
+      // TODO: refactor out apply from feColorMatrix
+
+      new FeColorMatrixElement(document, {
+        nodeType: 1,
+        childNodes: [],
+        attributes: [{
+          nodeName: 'type',
+          value: 'luminanceToAlpha'
+        }, {
+          nodeName: 'includeOpacity',
+          value: 'true'
+        }]
+      }).apply(maskCtx, 0, 0, x + width, y + height);
+      var tmpCanvas = document.createCanvas(x + width, y + height);
+      var tmpCtx = tmpCanvas.getContext('2d');
+      document.screen.setDefaults(tmpCtx);
+      element.render(tmpCtx);
+      tmpCtx.globalCompositeOperation = 'destination-in';
+      tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');
+      tmpCtx.fillRect(0, 0, x + width, y + height);
+      ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');
+      ctx.fillRect(0, 0, x + width, y + height); // reassign mask
+
+      this.restoreStyles(element, ignoredStyles);
+    }
+  }, {
+    key: "render",
+    value: function render(_) {// NO RENDER
+    }
+  }]);
+
+  return MaskElement;
+}(Element);
+MaskElement.ignoreStyles = ['mask', 'transform', 'clip-path'];
+
+function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var noop = function noop() {// NOOP
+};
+
+var ClipPathElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](ClipPathElement, _Element);
+
+  var _super = _createSuper$7(ClipPathElement);
+
+  function ClipPathElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, ClipPathElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'clipPath';
+    return _this;
+  }
+
+  _createClass__default['default'](ClipPathElement, [{
+    key: "apply",
+    value: function apply(ctx) {
+      var document = this.document;
+      var contextProto = Reflect.getPrototypeOf(ctx);
+      var beginPath = ctx.beginPath,
+          closePath = ctx.closePath;
+
+      if (contextProto) {
+        contextProto.beginPath = noop;
+        contextProto.closePath = noop;
+      }
+
+      Reflect.apply(beginPath, ctx, []);
+      this.children.forEach(function (child) {
+        if (typeof child.path === 'undefined') {
+          return;
+        }
+
+        var transform = typeof child.elementTransform !== 'undefined' ? child.elementTransform() : null; // handle <use />
+
+        if (!transform) {
+          transform = Transform.fromElement(document, child);
+        }
+
+        if (transform) {
+          transform.apply(ctx);
+        }
+
+        child.path(ctx);
+
+        if (contextProto) {
+          contextProto.closePath = closePath;
+        }
+
+        if (transform) {
+          transform.unapply(ctx);
+        }
+      });
+      Reflect.apply(closePath, ctx, []);
+      ctx.clip();
+
+      if (contextProto) {
+        contextProto.beginPath = beginPath;
+        contextProto.closePath = closePath;
+      }
+    }
+  }, {
+    key: "render",
+    value: function render(_) {// NO RENDER
+    }
+  }]);
+
+  return ClipPathElement;
+}(Element);
+
+function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var FilterElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](FilterElement, _Element);
+
+  var _super = _createSuper$6(FilterElement);
+
+  function FilterElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, FilterElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'filter';
+    return _this;
+  }
+
+  _createClass__default['default'](FilterElement, [{
+    key: "apply",
+    value: function apply(ctx, element) {
+      // render as temp svg
+      var document = this.document,
+          children = this.children;
+      var boundingBox = element.getBoundingBox(ctx);
+
+      if (!boundingBox) {
+        return;
+      }
+
+      var px = 0;
+      var py = 0;
+      children.forEach(function (child) {
+        var efd = child.extraFilterDistance || 0;
+        px = Math.max(px, efd);
+        py = Math.max(py, efd);
+      });
+      var width = Math.floor(boundingBox.width);
+      var height = Math.floor(boundingBox.height);
+      var tmpCanvasWidth = width + 2 * px;
+      var tmpCanvasHeight = height + 2 * py;
+
+      if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {
+        return;
+      }
+
+      var x = Math.floor(boundingBox.x);
+      var y = Math.floor(boundingBox.y);
+      var ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);
+      var tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);
+      var tmpCtx = tmpCanvas.getContext('2d');
+      document.screen.setDefaults(tmpCtx);
+      tmpCtx.translate(-x + px, -y + py);
+      element.render(tmpCtx); // apply filters
+
+      children.forEach(function (child) {
+        if (typeof child.apply === 'function') {
+          child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);
+        }
+      }); // render on me
+
+      ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);
+      this.restoreStyles(element, ignoredStyles);
+    }
+  }, {
+    key: "render",
+    value: function render(_) {// NO RENDER
+    }
+  }]);
+
+  return FilterElement;
+}(Element);
+FilterElement.ignoreStyles = ['filter', 'transform', 'clip-path'];
+
+function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var FeDropShadowElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](FeDropShadowElement, _Element);
+
+  var _super = _createSuper$5(FeDropShadowElement);
+
+  function FeDropShadowElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, FeDropShadowElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'feDropShadow';
+
+    _this.addStylesFromStyleDefinition();
+
+    return _this;
+  }
+
+  _createClass__default['default'](FeDropShadowElement, [{
+    key: "apply",
+    value: function apply(_, _x, _y, _width, _height) {// TODO: implement
+    }
+  }]);
+
+  return FeDropShadowElement;
+}(Element);
+
+function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var FeMorphologyElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](FeMorphologyElement, _Element);
+
+  var _super = _createSuper$4(FeMorphologyElement);
+
+  function FeMorphologyElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, FeMorphologyElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'feMorphology';
+    return _this;
+  }
+
+  _createClass__default['default'](FeMorphologyElement, [{
+    key: "apply",
+    value: function apply(_, _x, _y, _width, _height) {// TODO: implement
+    }
+  }]);
+
+  return FeMorphologyElement;
+}(Element);
+
+function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var FeCompositeElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](FeCompositeElement, _Element);
+
+  var _super = _createSuper$3(FeCompositeElement);
+
+  function FeCompositeElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, FeCompositeElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'feComposite';
+    return _this;
+  }
+
+  _createClass__default['default'](FeCompositeElement, [{
+    key: "apply",
+    value: function apply(_, _x, _y, _width, _height) {// TODO: implement
+    }
+  }]);
+
+  return FeCompositeElement;
+}(Element);
+
+function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var FeGaussianBlurElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](FeGaussianBlurElement, _Element);
+
+  var _super = _createSuper$2(FeGaussianBlurElement);
+
+  function FeGaussianBlurElement(document, node, captureTextNodes) {
+    var _this;
+
+    _classCallCheck__default['default'](this, FeGaussianBlurElement);
+
+    _this = _super.call(this, document, node, captureTextNodes);
+    _this.type = 'feGaussianBlur';
+    _this.blurRadius = Math.floor(_this.getAttribute('stdDeviation').getNumber());
+    _this.extraFilterDistance = _this.blurRadius;
+    return _this;
+  }
+
+  _createClass__default['default'](FeGaussianBlurElement, [{
+    key: "apply",
+    value: function apply(ctx, x, y, width, height) {
+      var document = this.document,
+          blurRadius = this.blurRadius;
+      var body = document.window ? document.window.document.body : null;
+      var canvas = ctx.canvas; // StackBlur requires canvas be on document
+
+      canvas.id = document.getUniqueId();
+
+      if (body) {
+        canvas.style.display = 'none';
+        body.appendChild(canvas);
+      }
+
+      stackblurCanvas.canvasRGBA(canvas, x, y, width, height, blurRadius);
+
+      if (body) {
+        body.removeChild(canvas);
+      }
+    }
+  }]);
+
+  return FeGaussianBlurElement;
+}(Element);
+
+function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var TitleElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](TitleElement, _Element);
+
+  var _super = _createSuper$1(TitleElement);
+
+  function TitleElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, TitleElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'title';
+    return _this;
+  }
+
+  return TitleElement;
+}(Element);
+
+function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
+
+function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
+
+var DescElement = /*#__PURE__*/function (_Element) {
+  _inherits__default['default'](DescElement, _Element);
+
+  var _super = _createSuper(DescElement);
+
+  function DescElement() {
+    var _this;
+
+    _classCallCheck__default['default'](this, DescElement);
+
+    _this = _super.apply(this, arguments);
+    _this.type = 'desc';
+    return _this;
+  }
+
+  return DescElement;
+}(Element);
+
+var elements = {
+  'svg': SVGElement,
+  'rect': RectElement,
+  'circle': CircleElement,
+  'ellipse': EllipseElement,
+  'line': LineElement,
+  'polyline': PolylineElement,
+  'polygon': PolygonElement,
+  'path': PathElement,
+  'pattern': PatternElement,
+  'marker': MarkerElement,
+  'defs': DefsElement,
+  'linearGradient': LinearGradientElement,
+  'radialGradient': RadialGradientElement,
+  'stop': StopElement,
+  'animate': AnimateElement,
+  'animateColor': AnimateColorElement,
+  'animateTransform': AnimateTransformElement,
+  'font': FontElement,
+  'font-face': FontFaceElement,
+  'missing-glyph': MissingGlyphElement,
+  'glyph': GlyphElement,
+  'text': TextElement,
+  'tspan': TSpanElement,
+  'tref': TRefElement,
+  'a': AElement,
+  'textPath': TextPathElement,
+  'image': ImageElement,
+  'g': GElement,
+  'symbol': SymbolElement,
+  'style': StyleElement,
+  'use': UseElement,
+  'mask': MaskElement,
+  'clipPath': ClipPathElement,
+  'filter': FilterElement,
+  'feDropShadow': FeDropShadowElement,
+  'feMorphology': FeMorphologyElement,
+  'feComposite': FeCompositeElement,
+  'feColorMatrix': FeColorMatrixElement,
+  'feGaussianBlur': FeGaussianBlurElement,
+  'title': TitleElement,
+  'desc': DescElement
+};
+
+function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+function createCanvas(width, height) {
+  var canvas = document.createElement('canvas');
+  canvas.width = width;
+  canvas.height = height;
+  return canvas;
+}
+
+function createImage(_x) {
+  return _createImage.apply(this, arguments);
+}
+
+function _createImage() {
+  _createImage = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(src) {
+    var anonymousCrossOrigin,
+        image,
+        _args = arguments;
+    return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
+      while (1) {
+        switch (_context.prev = _context.next) {
+          case 0:
+            anonymousCrossOrigin = _args.length > 1 && _args[1] !== undefined ? _args[1] : false;
+            image = document.createElement('img');
+
+            if (anonymousCrossOrigin) {
+              image.crossOrigin = 'Anonymous';
+            }
+
+            return _context.abrupt("return", new Promise(function (resolve, reject) {
+              image.onload = function () {
+                resolve(image);
+              };
+
+              image.onerror = function (_event, _source, _lineno, _colno, error) {
+                reject(error);
+              };
+
+              image.src = src;
+            }));
+
+          case 4:
+          case "end":
+            return _context.stop();
+        }
+      }
+    }, _callee);
+  }));
+  return _createImage.apply(this, arguments);
+}
+
+var Document = /*#__PURE__*/function () {
+  function Document(canvg) {
+    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+        _ref$rootEmSize = _ref.rootEmSize,
+        rootEmSize = _ref$rootEmSize === void 0 ? 12 : _ref$rootEmSize,
+        _ref$emSize = _ref.emSize,
+        emSize = _ref$emSize === void 0 ? 12 : _ref$emSize,
+        _ref$createCanvas = _ref.createCanvas,
+        createCanvas = _ref$createCanvas === void 0 ? Document.createCanvas : _ref$createCanvas,
+        _ref$createImage = _ref.createImage,
+        createImage = _ref$createImage === void 0 ? Document.createImage : _ref$createImage,
+        anonymousCrossOrigin = _ref.anonymousCrossOrigin;
+
+    _classCallCheck__default['default'](this, Document);
+
+    this.canvg = canvg;
+    this.definitions = {};
+    this.styles = {};
+    this.stylesSpecificity = {};
+    this.images = [];
+    this.fonts = [];
+    this.emSizeStack = [];
+    this.uniqueId = 0;
+    this.screen = canvg.screen;
+    this.rootEmSize = rootEmSize;
+    this.emSize = emSize;
+    this.createCanvas = createCanvas;
+    this.createImage = this.bindCreateImage(createImage, anonymousCrossOrigin);
+    this.screen.wait(this.isImagesLoaded.bind(this));
+    this.screen.wait(this.isFontsLoaded.bind(this));
+  }
+
+  _createClass__default['default'](Document, [{
+    key: "bindCreateImage",
+    value: function bindCreateImage(createImage, anonymousCrossOrigin) {
+      if (typeof anonymousCrossOrigin === 'boolean') {
+        return function (source, forceAnonymousCrossOrigin) {
+          return createImage(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin);
+        };
+      }
+
+      return createImage;
+    }
+  }, {
+    key: "popEmSize",
+    value: function popEmSize() {
+      var emSizeStack = this.emSizeStack;
+      emSizeStack.pop();
+    }
+  }, {
+    key: "getUniqueId",
+    value: function getUniqueId() {
+      return "canvg".concat(++this.uniqueId);
+    }
+  }, {
+    key: "isImagesLoaded",
+    value: function isImagesLoaded() {
+      return this.images.every(function (_) {
+        return _.loaded;
+      });
+    }
+  }, {
+    key: "isFontsLoaded",
+    value: function isFontsLoaded() {
+      return this.fonts.every(function (_) {
+        return _.loaded;
+      });
+    }
+  }, {
+    key: "createDocumentElement",
+    value: function createDocumentElement(document) {
+      var documentElement = this.createElement(document.documentElement);
+      documentElement.root = true;
+      documentElement.addStylesFromStyleDefinition();
+      this.documentElement = documentElement;
+      return documentElement;
+    }
+  }, {
+    key: "createElement",
+    value: function createElement(node) {
+      var elementType = node.nodeName.replace(/^[^:]+:/, '');
+      var ElementType = Document.elementTypes[elementType];
+
+      if (typeof ElementType !== 'undefined') {
+        return new ElementType(this, node);
+      }
+
+      return new UnknownElement(this, node);
+    }
+  }, {
+    key: "createTextNode",
+    value: function createTextNode(node) {
+      return new TextNode(this, node);
+    }
+  }, {
+    key: "setViewBox",
+    value: function setViewBox(config) {
+      this.screen.setViewBox(_objectSpread$1({
+        document: this
+      }, config));
+    }
+  }, {
+    key: "window",
+    get: function get() {
+      return this.screen.window;
+    }
+  }, {
+    key: "fetch",
+    get: function get() {
+      return this.screen.fetch;
+    }
+  }, {
+    key: "ctx",
+    get: function get() {
+      return this.screen.ctx;
+    }
+  }, {
+    key: "emSize",
+    get: function get() {
+      var emSizeStack = this.emSizeStack;
+      return emSizeStack[emSizeStack.length - 1];
+    },
+    set: function set(value) {
+      var emSizeStack = this.emSizeStack;
+      emSizeStack.push(value);
+    }
+  }]);
+
+  return Document;
+}();
+Document.createCanvas = createCanvas;
+Document.createImage = createImage;
+Document.elementTypes = elements;
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+/**
+ * SVG renderer on canvas.
+ */
+
+var Canvg = /*#__PURE__*/function () {
+  /**
+   * Main constructor.
+   * @param ctx - Rendering context.
+   * @param svg - SVG Document.
+   * @param options - Rendering options.
+   */
+  function Canvg(ctx, svg) {
+    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+    _classCallCheck__default['default'](this, Canvg);
+
+    this.parser = new Parser(options);
+    this.screen = new Screen(ctx, options);
+    this.options = options;
+    var document = new Document(this, options);
+    var documentElement = document.createDocumentElement(svg);
+    this.document = document;
+    this.documentElement = documentElement;
+  }
+  /**
+   * Create Canvg instance from SVG source string or URL.
+   * @param ctx - Rendering context.
+   * @param svg - SVG source string or URL.
+   * @param options - Rendering options.
+   * @returns Canvg instance.
+   */
+
+
+  _createClass__default['default'](Canvg, [{
+    key: "fork",
+
+    /**
+     * Create new Canvg instance with inherited options.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string or URL.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+    value: function fork(ctx, svg) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      return Canvg.from(ctx, svg, _objectSpread(_objectSpread({}, this.options), options));
+    }
+    /**
+     * Create new Canvg instance with inherited options.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+
+  }, {
+    key: "forkString",
+    value: function forkString(ctx, svg) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      return Canvg.fromString(ctx, svg, _objectSpread(_objectSpread({}, this.options), options));
+    }
+    /**
+     * Document is ready promise.
+     * @returns Ready promise.
+     */
+
+  }, {
+    key: "ready",
+    value: function ready() {
+      return this.screen.ready();
+    }
+    /**
+     * Document is ready value.
+     * @returns Is ready or not.
+     */
+
+  }, {
+    key: "isReady",
+    value: function isReady() {
+      return this.screen.isReady();
+    }
+    /**
+     * Render only first frame, ignoring animations and mouse.
+     * @param options - Rendering options.
+     */
+
+  }, {
+    key: "render",
+    value: function () {
+      var _render = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
+        var options,
+            _args = arguments;
+        return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
+          while (1) {
+            switch (_context.prev = _context.next) {
+              case 0:
+                options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
+                this.start(_objectSpread({
+                  enableRedraw: true,
+                  ignoreAnimation: true,
+                  ignoreMouse: true
+                }, options));
+                _context.next = 4;
+                return this.ready();
+
+              case 4:
+                this.stop();
+
+              case 5:
+              case "end":
+                return _context.stop();
+            }
+          }
+        }, _callee, this);
+      }));
+
+      function render() {
+        return _render.apply(this, arguments);
+      }
+
+      return render;
+    }()
+    /**
+     * Start rendering.
+     * @param options - Render options.
+     */
+
+  }, {
+    key: "start",
+    value: function start() {
+      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+      var documentElement = this.documentElement,
+          screen = this.screen,
+          baseOptions = this.options;
+      screen.start(documentElement, _objectSpread(_objectSpread({
+        enableRedraw: true
+      }, baseOptions), options));
+    }
+    /**
+     * Stop rendering.
+     */
+
+  }, {
+    key: "stop",
+    value: function stop() {
+      this.screen.stop();
+    }
+    /**
+     * Resize SVG to fit in given size.
+     * @param width
+     * @param height
+     * @param preserveAspectRatio
+     */
+
+  }, {
+    key: "resize",
+    value: function resize(width) {
+      var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : width;
+      var preserveAspectRatio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+      this.documentElement.resize(width, height, preserveAspectRatio);
+    }
+  }], [{
+    key: "from",
+    value: function () {
+      var _from = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(ctx, svg) {
+        var options,
+            parser,
+            svgDocument,
+            _args2 = arguments;
+        return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
+          while (1) {
+            switch (_context2.prev = _context2.next) {
+              case 0:
+                options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
+                parser = new Parser(options);
+                _context2.next = 4;
+                return parser.parse(svg);
+
+              case 4:
+                svgDocument = _context2.sent;
+                return _context2.abrupt("return", new Canvg(ctx, svgDocument, options));
+
+              case 6:
+              case "end":
+                return _context2.stop();
+            }
+          }
+        }, _callee2);
+      }));
+
+      function from(_x, _x2) {
+        return _from.apply(this, arguments);
+      }
+
+      return from;
+    }()
+    /**
+     * Create Canvg instance from SVG source string.
+     * @param ctx - Rendering context.
+     * @param svg - SVG source string.
+     * @param options - Rendering options.
+     * @returns Canvg instance.
+     */
+
+  }, {
+    key: "fromString",
+    value: function fromString(ctx, svg) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      var parser = new Parser(options);
+      var svgDocument = parser.parseFromString(svg);
+      return new Canvg(ctx, svgDocument, options);
+    }
+  }]);
+
+  return Canvg;
+}();
+
+exports.AElement = AElement;
+exports.AnimateColorElement = AnimateColorElement;
+exports.AnimateElement = AnimateElement;
+exports.AnimateTransformElement = AnimateTransformElement;
+exports.BoundingBox = BoundingBox;
+exports.CB1 = CB1;
+exports.CB2 = CB2;
+exports.CB3 = CB3;
+exports.CB4 = CB4;
+exports.Canvg = Canvg;
+exports.CircleElement = CircleElement;
+exports.ClipPathElement = ClipPathElement;
+exports.DefsElement = DefsElement;
+exports.DescElement = DescElement;
+exports.Document = Document;
+exports.Element = Element;
+exports.EllipseElement = EllipseElement;
+exports.FeColorMatrixElement = FeColorMatrixElement;
+exports.FeCompositeElement = FeCompositeElement;
+exports.FeDropShadowElement = FeDropShadowElement;
+exports.FeGaussianBlurElement = FeGaussianBlurElement;
+exports.FeMorphologyElement = FeMorphologyElement;
+exports.FilterElement = FilterElement;
+exports.Font = Font;
+exports.FontElement = FontElement;
+exports.FontFaceElement = FontFaceElement;
+exports.GElement = GElement;
+exports.GlyphElement = GlyphElement;
+exports.GradientElement = GradientElement;
+exports.ImageElement = ImageElement;
+exports.LineElement = LineElement;
+exports.LinearGradientElement = LinearGradientElement;
+exports.MarkerElement = MarkerElement;
+exports.MaskElement = MaskElement;
+exports.Matrix = Matrix;
+exports.MissingGlyphElement = MissingGlyphElement;
+exports.Mouse = Mouse;
+exports.PSEUDO_ZERO = PSEUDO_ZERO;
+exports.Parser = Parser;
+exports.PathElement = PathElement;
+exports.PathParser = PathParser;
+exports.PatternElement = PatternElement;
+exports.Point = Point;
+exports.PolygonElement = PolygonElement;
+exports.PolylineElement = PolylineElement;
+exports.Property = Property;
+exports.QB1 = QB1;
+exports.QB2 = QB2;
+exports.QB3 = QB3;
+exports.RadialGradientElement = RadialGradientElement;
+exports.RectElement = RectElement;
+exports.RenderedElement = RenderedElement;
+exports.Rotate = Rotate;
+exports.SVGElement = SVGElement;
+exports.SVGFontLoader = SVGFontLoader;
+exports.Scale = Scale;
+exports.Screen = Screen;
+exports.Skew = Skew;
+exports.SkewX = SkewX;
+exports.SkewY = SkewY;
+exports.StopElement = StopElement;
+exports.StyleElement = StyleElement;
+exports.SymbolElement = SymbolElement;
+exports.TRefElement = TRefElement;
+exports.TSpanElement = TSpanElement;
+exports.TextElement = TextElement;
+exports.TextPathElement = TextPathElement;
+exports.TitleElement = TitleElement;
+exports.Transform = Transform;
+exports.Translate = Translate;
+exports.UnknownElement = UnknownElement;
+exports.UseElement = UseElement;
+exports.ViewPort = ViewPort;
+exports.compressSpaces = compressSpaces;
+exports.default = Canvg;
+exports.getSelectorSpecificity = getSelectorSpecificity;
+exports.normalizeAttributeName = normalizeAttributeName;
+exports.normalizeColor = normalizeColor;
+exports.parseExternalUrl = parseExternalUrl;
+exports.presets = index;
+exports.toNumbers = toNumbers;
+exports.trimLeft = trimLeft;
+exports.trimRight = trimRight;
+exports.vectorMagnitude = vectorMagnitude;
+exports.vectorsAngle = vectorsAngle;
+exports.vectorsRatio = vectorsRatio;
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs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 -0,0 +1,3 @@
+export * from './offscreen';
+export * from './node';
+//# sourceMappingURL=index.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/presets/index.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/presets/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/presets/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/presets/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
Index: imaps-frontend/node_modules/canvg/lib/presets/node.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/presets/node.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/presets/node.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,45 @@
+import { DOMParser } from './types';
+/**
+ * `node-canvas` exports.
+ */
+interface ICanvas {
+    createCanvas(width: number, height: number): any;
+    loadImage(src: string): Promise<any>;
+}
+/**
+ * WHATWG-compatible `fetch` function.
+ */
+declare type Fetch = (input: any, config?: any) => Promise<any>;
+interface IConfig {
+    /**
+     * XML/HTML parser from string into DOM Document.
+     */
+    DOMParser: DOMParser;
+    /**
+     * `node-canvas` exports.
+     */
+    canvas: ICanvas;
+    /**
+     * WHATWG-compatible `fetch` function.
+     */
+    fetch: Fetch;
+}
+/**
+ * Options preset for `node-canvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @param config.canvas - `node-canvas` exports.
+ * @param config.fetch - WHATWG-compatible `fetch` function.
+ * @returns Preset object.
+ */
+export declare function node({ DOMParser, canvas, fetch }: IConfig): {
+    window: null;
+    ignoreAnimation: boolean;
+    ignoreMouse: boolean;
+    DOMParser: DOMParser;
+    fetch: Fetch;
+    createCanvas: (width: number, height: number) => any;
+    createImage: (src: string) => Promise<any>;
+};
+export {};
+//# sourceMappingURL=node.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/presets/node.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/presets/node.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/presets/node.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/presets/node.ts"],"names":[],"mappings":"AACA,OAAO,EACN,SAAS,EACT,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,UAAU,OAAO;IAChB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC;IACjD,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,aAAK,KAAK,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAExD,UAAU,OAAO;IAChB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;CACb;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,EACpB,SAAS,EACT,MAAM,EACN,KAAK,EACL,EAAE,OAAO;;;;;;;;EAUT"}
Index: imaps-frontend/node_modules/canvg/lib/presets/offscreen.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/presets/offscreen.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/presets/offscreen.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,23 @@
+import { DOMParser } from './types';
+interface IConfig {
+    /**
+     * XML/HTML parser from string into DOM Document.
+     */
+    DOMParser?: DOMParser;
+}
+/**
+ * Options preset for `OffscreenCanvas`.
+ * @param config - Preset requirements.
+ * @param config.DOMParser - XML/HTML parser from string into DOM Document.
+ * @returns Preset object.
+ */
+export declare function offscreen({ DOMParser: DOMParserFallback }?: IConfig): {
+    window: null;
+    ignoreAnimation: boolean;
+    ignoreMouse: boolean;
+    DOMParser: DOMParser;
+    createCanvas(width: number, height: number): OffscreenCanvas;
+    createImage(url: string): Promise<ImageBitmap>;
+};
+export {};
+//# sourceMappingURL=offscreen.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/presets/offscreen.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/presets/offscreen.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/presets/offscreen.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"offscreen.d.ts","sourceRoot":"","sources":["../../src/presets/offscreen.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,MAAM,SAAS,CAAC;AAEjB,UAAU,OAAO;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACzB,SAAS,EAAE,iBAAiB,EAC5B,GAAE,OAAY;;;;;wBAMO,MAAM,UAAU,MAAM;qBAGnB,MAAM;EAgB9B"}
Index: imaps-frontend/node_modules/canvg/lib/presets/types.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/presets/types.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/presets/types.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,8 @@
+/**
+ * XML/HTML parser from string into DOM Document.
+ */
+export interface DOMParser {
+    prototype: any;
+    new (): any;
+}
+//# sourceMappingURL=types.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/presets/types.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/presets/types.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/presets/types.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/presets/types.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,GAAG,CAAC;CACZ"}
Index: imaps-frontend/node_modules/canvg/lib/types.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/types.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/types.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,2 @@
+export declare type RenderingContext2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
+//# sourceMappingURL=types.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/types.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/types.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/types.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,oBAAY,kBAAkB,GAAG,wBAAwB,GAAG,iCAAiC,CAAC"}
Index: imaps-frontend/node_modules/canvg/lib/umd.js
===================================================================
--- imaps-frontend/node_modules/canvg/lib/umd.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/umd.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,19 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).canvg={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t){var e={exports:{}};return t(e,e.exports),e.exports}var i,o,a=function(t){return t&&t.Math==Math&&t},u=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof e&&e)||function(){return this}()||Function("return this")(),s=function(t,e){try{Object.defineProperty(u,t,{value:e,configurable:!0,writable:!0})}catch(r){u[t]=e}return e},c="__core-js_shared__",l=u[c]||s(c,{}),f=n((function(t){(t.exports=function(t,e){return l[t]||(l[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},p=function(t){return Object(h(t))},v={}.hasOwnProperty,y=Object.hasOwn||function(t,e){return v.call(p(t),e)},d=0,g=Math.random(),m=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++d+g).toString(36)},x=function(t){return"function"==typeof t},b=function(t){return x(t)?t:void 0},w=function(t,e){return arguments.length<2?b(u[t]):u[t]&&u[t][e]},S=w("navigator","userAgent")||"",O=u.process,k=u.Deno,T=O&&O.versions||k&&k.version,A=T&&T.v8;A?o=(i=A.split("."))[0]<4?1:i[0]+i[1]:S&&(!(i=S.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=S.match(/Chrome\/(\d+)/))&&(o=i[1]);var R=o&&+o,P=function(t){try{return!!t()}catch(t){return!0}},E=!!Object.getOwnPropertySymbols&&!P((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&R&&R<41})),C=E&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,M=f("wks"),N=u.Symbol,_=C?N:N&&N.withoutSetter||m,I=function(t){return y(M,t)&&(E||"string"==typeof M[t])||(E&&y(N,t)?M[t]=N[t]:M[t]=_("Symbol."+t)),M[t]},V={};V[I("toStringTag")]="z";var L="[object z]"===String(V),B=!P((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),D=function(t){return"object"==typeof t?null!==t:x(t)},j=u.document,F=D(j)&&D(j.createElement),z=function(t){return F?j.createElement(t):{}},U=!B&&!P((function(){return 7!=Object.defineProperty(z("div"),"a",{get:function(){return 7}}).a})),H=function(t){if(D(t))return t;throw TypeError(String(t)+" is not an object")},X=C?function(t){return"symbol"==typeof t}:function(t){var e=w("Symbol");return x(e)&&Object(t)instanceof e},Y=function(t){try{return String(t)}catch(t){return"Object"}},G=function(t){if(x(t))return t;throw TypeError(Y(t)+" is not a function")},W=function(t,e){var r=t[e];return null==r?void 0:G(r)},q=I("toPrimitive"),$=function(t,e){if(!D(t)||X(t))return t;var r,n=W(t,q);if(n){if(void 0===e&&(e="default"),r=n.call(t,e),!D(r)||X(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&x(r=t.toString)&&!D(n=r.call(t)))return n;if(x(r=t.valueOf)&&!D(n=r.call(t)))return n;if("string"!==e&&x(r=t.toString)&&!D(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}(t,e)},Q=function(t){var e=$(t,"string");return X(e)?e:String(e)},Z=Object.defineProperty,K={f:B?Z:function(t,e,r){if(H(t),e=Q(e),H(r),U)try{return Z(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},J=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},tt=B?function(t,e,r){return K.f(t,e,J(1,r))}:function(t,e,r){return t[e]=r,t},et=Function.toString;x(l.inspectSource)||(l.inspectSource=function(t){return et.call(t)});var rt,nt,it,ot=l.inspectSource,at=u.WeakMap,ut=x(at)&&/native code/.test(ot(at)),st=f("keys"),ct=function(t){return st[t]||(st[t]=m(t))},lt={},ft="Object already initialized",ht=u.WeakMap;if(ut||l.state){var pt=l.state||(l.state=new ht),vt=pt.get,yt=pt.has,dt=pt.set;rt=function(t,e){if(yt.call(pt,t))throw new TypeError(ft);return e.facade=t,dt.call(pt,t,e),e},nt=function(t){return vt.call(pt,t)||{}},it=function(t){return yt.call(pt,t)}}else{var gt=ct("state");lt[gt]=!0,rt=function(t,e){if(y(t,gt))throw new TypeError(ft);return e.facade=t,tt(t,gt,e),e},nt=function(t){return y(t,gt)?t[gt]:{}},it=function(t){return y(t,gt)}}var mt={set:rt,get:nt,has:it,enforce:function(t){return it(t)?nt(t):rt(t,{})},getterFor:function(t){return function(e){var r;if(!D(e)||(r=nt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},xt=Function.prototype,bt=B&&Object.getOwnPropertyDescriptor,wt=y(xt,"name"),St={EXISTS:wt,PROPER:wt&&"something"===function(){}.name,CONFIGURABLE:wt&&(!B||B&&bt(xt,"name").configurable)},Ot=n((function(t){var e=St.CONFIGURABLE,r=mt.get,n=mt.enforce,i=String(String).split("String");(t.exports=function(t,r,o,a){var c,l=!!a&&!!a.unsafe,f=!!a&&!!a.enumerable,h=!!a&&!!a.noTargetGet,p=a&&void 0!==a.name?a.name:r;x(o)&&("Symbol("===String(p).slice(0,7)&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!y(o,"name")||e&&o.name!==p)&&tt(o,"name",p),(c=n(o)).source||(c.source=i.join("string"==typeof p?p:""))),t!==u?(l?!h&&t[r]&&(f=!0):delete t[r],f?t[r]=o:tt(t,r,o)):f?t[r]=o:s(r,o)})(Function.prototype,"toString",(function(){return x(this)&&r(this).source||ot(this)}))})),kt={}.toString,Tt=function(t){return kt.call(t).slice(8,-1)},At=I("toStringTag"),Rt="Arguments"==Tt(function(){return arguments}()),Pt=L?Tt:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),At))?r:Rt?Tt(e):"Object"==(n=Tt(e))&&x(e.callee)?"Arguments":n},Et=L?{}.toString:function(){return"[object "+Pt(this)+"]"};L||Ot(Object.prototype,"toString",Et,{unsafe:!0});var Ct={}.propertyIsEnumerable,Mt=Object.getOwnPropertyDescriptor,Nt={f:Mt&&!Ct.call({1:2},1)?function(t){var e=Mt(this,t);return!!e&&e.enumerable}:Ct},_t="".split,It=P((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==Tt(t)?_t.call(t,""):Object(t)}:Object,Vt=function(t){return It(h(t))},Lt=Object.getOwnPropertyDescriptor,Bt={f:B?Lt:function(t,e){if(t=Vt(t),e=Q(e),U)try{return Lt(t,e)}catch(t){}if(y(t,e))return J(!Nt.f.call(t,e),t[e])}},Dt=Math.ceil,jt=Math.floor,Ft=function(t){var e=+t;return e!=e||0===e?0:(e>0?jt:Dt)(e)},zt=Math.max,Ut=Math.min,Ht=function(t,e){var r=Ft(t);return r<0?zt(r+e,0):Ut(r,e)},Xt=Math.min,Yt=function(t){return t>0?Xt(Ft(t),9007199254740991):0},Gt=function(t){return Yt(t.length)},Wt=function(t){return function(e,r,n){var i,o=Vt(e),a=Gt(o),u=Ht(n,a);if(t&&r!=r){for(;a>u;)if((i=o[u++])!=i)return!0}else for(;a>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},qt={includes:Wt(!0),indexOf:Wt(!1)},$t=qt.indexOf,Qt=function(t,e){var r,n=Vt(t),i=0,o=[];for(r in n)!y(lt,r)&&y(n,r)&&o.push(r);for(;e.length>i;)y(n,r=e[i++])&&(~$t(o,r)||o.push(r));return o},Zt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Kt=Zt.concat("length","prototype"),Jt={f:Object.getOwnPropertyNames||function(t){return Qt(t,Kt)}},te={f:Object.getOwnPropertySymbols},ee=w("Reflect","ownKeys")||function(t){var e=Jt.f(H(t)),r=te.f;return r?e.concat(r(t)):e},re=function(t,e){for(var r=ee(e),n=K.f,i=Bt.f,o=0;o<r.length;o++){var a=r[o];y(t,a)||n(t,a,i(e,a))}},ne=/#|\.prototype\./,ie=function(t,e){var r=ae[oe(t)];return r==se||r!=ue&&(x(e)?P(e):!!e)},oe=ie.normalize=function(t){return String(t).replace(ne,".").toLowerCase()},ae=ie.data={},ue=ie.NATIVE="N",se=ie.POLYFILL="P",ce=ie,le=Bt.f,fe=function(t,e){var r,n,i,o,a,c=t.target,l=t.global,f=t.stat;if(r=l?u:f?u[c]||s(c,{}):(u[c]||{}).prototype)for(n in e){if(o=e[n],i=t.noTargetGet?(a=le(r,n))&&a.value:r[n],!ce(l?n:c+(f?".":"#")+n,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;re(o,i)}(t.sham||i&&i.sham)&&tt(o,"sham",!0),Ot(r,n,o,t)}},he=u.Promise,pe=function(t,e,r){for(var n in e)Ot(t,n,e[n],r);return t},ve=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return H(r),function(t){if("object"==typeof t||x(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),ye=K.f,de=I("toStringTag"),ge=function(t,e,r){t&&!y(t=r?t:t.prototype,de)&&ye(t,de,{configurable:!0,value:e})},me=I("species"),xe=function(t){var e=w(t),r=K.f;B&&e&&!e[me]&&r(e,me,{configurable:!0,get:function(){return this}})},be=function(t,e,r){if(t instanceof e)return t;throw TypeError("Incorrect "+(r?r+" ":"")+"invocation")},we={},Se=I("iterator"),Oe=Array.prototype,ke=function(t){return void 0!==t&&(we.Array===t||Oe[Se]===t)},Te=function(t,e,r){if(G(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}},Ae=I("iterator"),Re=function(t){if(null!=t)return W(t,Ae)||W(t,"@@iterator")||we[Pt(t)]},Pe=function(t,e){var r=arguments.length<2?Re(t):e;if(G(r))return H(r.call(t));throw TypeError(String(t)+" is not iterable")},Ee=function(t,e,r){var n,i;H(t);try{if(!(n=W(t,"return"))){if("throw"===e)throw r;return r}n=n.call(t)}catch(t){i=!0,n=t}if("throw"===e)throw r;if(i)throw n;return H(n),r},Ce=function(t,e){this.stopped=t,this.result=e},Me=function(t,e,r){var n,i,o,a,u,s,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=Te(e,l,1+f+p),y=function(t){return n&&Ee(n,"normal",t),new Ce(!0,t)},d=function(t){return f?(H(t),p?v(t[0],t[1],y):v(t[0],t[1])):p?v(t,y):v(t)};if(h)n=t;else{if(!(i=Re(t)))throw TypeError(String(t)+" is not iterable");if(ke(i)){for(o=0,a=Gt(t);a>o;o++)if((u=d(t[o]))&&u instanceof Ce)return u;return new Ce(!1)}n=Pe(t,i)}for(s=n.next;!(c=s.call(n)).done;){try{u=d(c.value)}catch(t){Ee(n,"throw",t)}if("object"==typeof u&&u&&u instanceof Ce)return u}return new Ce(!1)},Ne=I("iterator"),_e=!1;try{var Ie=0,Ve={next:function(){return{done:!!Ie++}},return:function(){_e=!0}};Ve[Ne]=function(){return this},Array.from(Ve,(function(){throw 2}))}catch(t){}var Le,Be,De,je,Fe=function(t,e){if(!e&&!_e)return!1;var r=!1;try{var n={};n[Ne]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},ze=[],Ue=w("Reflect","construct"),He=/^\s*(?:class|function)\b/,Xe=He.exec,Ye=!He.exec((function(){})),Ge=function(t){if(!x(t))return!1;try{return Ue(Object,ze,t),!0}catch(t){return!1}},We=!Ue||P((function(){var t;return Ge(Ge.call)||!Ge(Object)||!Ge((function(){t=!0}))||t}))?function(t){if(!x(t))return!1;switch(Pt(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Ye||!!Xe.call(He,ot(t))}:Ge,qe=I("species"),$e=function(t,e){var r,n=H(t).constructor;return void 0===n||null==(r=H(n)[qe])?e:function(t){if(We(t))return t;throw TypeError(Y(t)+" is not a constructor")}(r)},Qe=w("document","documentElement"),Ze=/(?:ipad|iphone|ipod).*applewebkit/i.test(S),Ke="process"==Tt(u.process),Je=u.setImmediate,tr=u.clearImmediate,er=u.process,rr=u.MessageChannel,nr=u.Dispatch,ir=0,or={},ar="onreadystatechange";try{Le=u.location}catch(t){}var ur=function(t){if(or.hasOwnProperty(t)){var e=or[t];delete or[t],e()}},sr=function(t){return function(){ur(t)}},cr=function(t){ur(t.data)},lr=function(t){u.postMessage(String(t),Le.protocol+"//"+Le.host)};Je&&tr||(Je=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return or[++ir]=function(){(x(t)?t:Function(t)).apply(void 0,e)},Be(ir),ir},tr=function(t){delete or[t]},Ke?Be=function(t){er.nextTick(sr(t))}:nr&&nr.now?Be=function(t){nr.now(sr(t))}:rr&&!Ze?(je=(De=new rr).port2,De.port1.onmessage=cr,Be=Te(je.postMessage,je,1)):u.addEventListener&&x(u.postMessage)&&!u.importScripts&&Le&&"file:"!==Le.protocol&&!P(lr)?(Be=lr,u.addEventListener("message",cr,!1)):Be=ar in z("script")?function(t){Qe.appendChild(z("script")).onreadystatechange=function(){Qe.removeChild(this),ur(t)}}:function(t){setTimeout(sr(t),0)});var fr,hr,pr,vr,yr,dr,gr,mr,xr={set:Je,clear:tr},br=/ipad|iphone|ipod/i.test(S)&&void 0!==u.Pebble,wr=/web0s(?!.*chrome)/i.test(S),Sr=Bt.f,Or=xr.set,kr=u.MutationObserver||u.WebKitMutationObserver,Tr=u.document,Ar=u.process,Rr=u.Promise,Pr=Sr(u,"queueMicrotask"),Er=Pr&&Pr.value;Er||(fr=function(){var t,e;for(Ke&&(t=Ar.domain)&&t.exit();hr;){e=hr.fn,hr=hr.next;try{e()}catch(t){throw hr?vr():pr=void 0,t}}pr=void 0,t&&t.enter()},Ze||Ke||wr||!kr||!Tr?!br&&Rr&&Rr.resolve?((gr=Rr.resolve(void 0)).constructor=Rr,mr=gr.then,vr=function(){mr.call(gr,fr)}):vr=Ke?function(){Ar.nextTick(fr)}:function(){Or.call(u,fr)}:(yr=!0,dr=Tr.createTextNode(""),new kr(fr).observe(dr,{characterData:!0}),vr=function(){dr.data=yr=!yr}));var Cr,Mr,Nr,_r,Ir=Er||function(t){var e={fn:t,next:void 0};pr&&(pr.next=e),hr||(hr=e,vr()),pr=e},Vr=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=G(e),this.reject=G(r)},Lr={f:function(t){return new Vr(t)}},Br=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Dr="object"==typeof window,jr=xr.set,Fr=I("species"),zr="Promise",Ur=mt.get,Hr=mt.set,Xr=mt.getterFor(zr),Yr=he&&he.prototype,Gr=he,Wr=Yr,qr=u.TypeError,$r=u.document,Qr=u.process,Zr=Lr.f,Kr=Zr,Jr=!!($r&&$r.createEvent&&u.dispatchEvent),tn=x(u.PromiseRejectionEvent),en="unhandledrejection",rn=!1,nn=ce(zr,(function(){var t=ot(Gr),e=t!==String(Gr);if(!e&&66===R)return!0;if(R>=51&&/native code/.test(t))return!1;var r=new Gr((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[Fr]=n,!(rn=r.then((function(){}))instanceof n)||!e&&Dr&&!tn})),on=nn||!Fe((function(t){Gr.all(t).catch((function(){}))})),an=function(t){var e;return!(!D(t)||!x(e=t.then))&&e},un=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;Ir((function(){for(var n=t.value,i=1==t.state,o=0;r.length>o;){var a,u,s,c=r[o++],l=i?c.ok:c.fail,f=c.resolve,h=c.reject,p=c.domain;try{l?(i||(2===t.rejection&&fn(t),t.rejection=1),!0===l?a=n:(p&&p.enter(),a=l(n),p&&(p.exit(),s=!0)),a===c.promise?h(qr("Promise-chain cycle")):(u=an(a))?u.call(a,f,h):f(a)):h(n)}catch(t){p&&!s&&p.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&cn(t)}))}},sn=function(t,e,r){var n,i;Jr?((n=$r.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),u.dispatchEvent(n)):n={promise:e,reason:r},!tn&&(i=u["on"+t])?i(n):t===en&&function(t,e){var r=u.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},cn=function(t){jr.call(u,(function(){var e,r=t.facade,n=t.value;if(ln(t)&&(e=Br((function(){Ke?Qr.emit("unhandledRejection",n,r):sn(en,r,n)})),t.rejection=Ke||ln(t)?2:1,e.error))throw e.value}))},ln=function(t){return 1!==t.rejection&&!t.parent},fn=function(t){jr.call(u,(function(){var e=t.facade;Ke?Qr.emit("rejectionHandled",e):sn("rejectionhandled",e,t.value)}))},hn=function(t,e,r){return function(n){t(e,n,r)}},pn=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,un(t,!0))},vn=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw qr("Promise can't be resolved itself");var n=an(e);n?Ir((function(){var r={done:!1};try{n.call(e,hn(vn,r,t),hn(pn,r,t))}catch(e){pn(r,e,t)}})):(t.value=e,t.state=1,un(t,!1))}catch(e){pn({done:!1},e,t)}}};if(nn&&(Wr=(Gr=function(t){be(this,Gr,zr),G(t),Cr.call(this);var e=Ur(this);try{t(hn(vn,e),hn(pn,e))}catch(t){pn(e,t)}}).prototype,(Cr=function(t){Hr(this,{type:zr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=pe(Wr,{then:function(t,e){var r=Xr(this),n=Zr($e(this,Gr));return n.ok=!x(t)||t,n.fail=x(e)&&e,n.domain=Ke?Qr.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&un(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Mr=function(){var t=new Cr,e=Ur(t);this.promise=t,this.resolve=hn(vn,e),this.reject=hn(pn,e)},Lr.f=Zr=function(t){return t===Gr||t===Nr?new Mr(t):Kr(t)},x(he)&&Yr!==Object.prototype)){_r=Yr.then,rn||(Ot(Yr,"then",(function(t,e){var r=this;return new Gr((function(t,e){_r.call(r,t,e)})).then(t,e)}),{unsafe:!0}),Ot(Yr,"catch",Wr.catch,{unsafe:!0}));try{delete Yr.constructor}catch(t){}ve&&ve(Yr,Wr)}fe({global:!0,wrap:!0,forced:nn},{Promise:Gr}),ge(Gr,zr,!1),xe(zr),Nr=w(zr),fe({target:zr,stat:!0,forced:nn},{reject:function(t){var e=Zr(this);return e.reject.call(void 0,t),e.promise}}),fe({target:zr,stat:!0,forced:nn},{resolve:function(t){return function(t,e){if(H(t),D(e)&&e.constructor===t)return e;var r=Lr.f(t);return(0,r.resolve)(e),r.promise}(this,t)}}),fe({target:zr,stat:!0,forced:on},{all:function(t){var e=this,r=Zr(e),n=r.resolve,i=r.reject,o=Br((function(){var r=G(e.resolve),o=[],a=0,u=1;Me(t,(function(t){var s=a++,c=!1;o.push(void 0),u++,r.call(e,t).then((function(t){c||(c=!0,o[s]=t,--u||n(o))}),i)})),--u||n(o)}));return o.error&&i(o.value),r.promise},race:function(t){var e=this,r=Zr(e),n=r.reject,i=Br((function(){var i=G(e.resolve);Me(t,(function(t){i.call(e,t).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var yn=Bt.f;fe({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var r=yn(H(t),e);return!(r&&!r.configurable)&&delete t[e]}});var dn=n((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.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 c(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),a=new P(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===i)throw o;return C()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=T(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?v:h,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=v,r.method="throw",r.arg=s.arg)}}}(t,r,a),o}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 f="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function d(){}function g(){}function m(){}var x={};s(x,o,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(E([])));w&&w!==r&&n.call(w,o)&&(x=w);var S=m.prototype=d.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(i,o,a,u){var s=l(t[i],t,o);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.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 T(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}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 R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function E(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:C}}function C(){return{value:e,done:!0}}return g.prototype=m,s(S,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},O(k.prototype),s(k.prototype,a,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new k(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(S),s(S,u,"Generator"),s(S,o,(function(){return this})),s(S,"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=E,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},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 r=this;function i(n,i){return u.type="throw",u.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):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),y},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),R(r),y}},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;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})),gn=r(n((function(t){function e(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function u(t){e(a,i,o,u,s,"next",t)}function s(t){e(a,i,o,u,s,"throw",t)}u(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0})));var mn=Object.freeze({__proto__:null,offscreen:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.DOMParser,r={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,createCanvas:function(t,e){return new OffscreenCanvas(t,e)},createImage:function(t){return gn(dn.mark((function e(){var r,n,i;return dn.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return r=e.sent,e.next=5,r.blob();case 5:return n=e.sent,e.next=8,createImageBitmap(n);case 8:return i=e.sent,e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))()}};return"undefined"==typeof DOMParser&&void 0!==e||Reflect.deleteProperty(r,"DOMParser"),r},node:function(t){var e=t.DOMParser,r=t.canvas;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:t.fetch,createCanvas:r.createCanvas,createImage:r.loadImage}}}),xn=Array.isArray||function(t){return"Array"==Tt(t)},bn=I("species"),wn=function(t,e){return new(function(t){var e;return xn(t)&&(e=t.constructor,(We(e)&&(e===Array||xn(e.prototype))||D(e)&&null===(e=e[bn]))&&(e=void 0)),void 0===e?Array:e}(t))(0===e?0:e)},Sn=[].push,On=function(t){var e=1==t,r=2==t,n=3==t,i=4==t,o=6==t,a=7==t,u=5==t||o;return function(s,c,l,f){for(var h,v,y=p(s),d=It(y),g=Te(c,l,3),m=Gt(d),x=0,b=f||wn,w=e?b(s,m):r||a?b(s,0):void 0;m>x;x++)if((u||x in d)&&(v=g(h=d[x],x,y),t))if(e)w[x]=v;else if(v)switch(t){case 3:return!0;case 5:return h;case 6:return x;case 2:Sn.call(w,h)}else switch(t){case 4:return!1;case 7:Sn.call(w,h)}return o?-1:n||i?i:w}},kn={forEach:On(0),map:On(1),filter:On(2),some:On(3),every:On(4),find:On(5),findIndex:On(6),filterReject:On(7)},Tn=I("species"),An=function(t){return R>=51||!P((function(){var e=[];return(e.constructor={})[Tn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Rn=kn.map,Pn=An("map");fe({target:"Array",proto:!0,forced:!Pn},{map:function(t){return Rn(this,t,arguments.length>1?arguments[1]:void 0)}});var En=function(t){if("Symbol"===Pt(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},Cn="\t\n\v\f\r                　\u2028\u2029\ufeff",Mn="["+Cn+"]",Nn=RegExp("^"+Mn+Mn+"*"),_n=RegExp(Mn+Mn+"*$"),In=function(t){return function(e){var r=En(h(e));return 1&t&&(r=r.replace(Nn,"")),2&t&&(r=r.replace(_n,"")),r}},Vn={start:In(1),end:In(2),trim:In(3)},Ln=Vn.trim,Bn=u.parseFloat,Dn=u.Symbol,jn=Dn&&Dn.iterator,Fn=1/Bn(Cn+"-0")!=-1/0||jn&&!P((function(){Bn(Object(jn))}))?function(t){var e=Ln(En(t)),r=Bn(e);return 0===r&&"-"==e.charAt(0)?-0:r}:Bn;fe({global:!0,forced:parseFloat!=Fn},{parseFloat:Fn});var zn,Un=function(){var t=H(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Hn=u.RegExp,Xn={UNSUPPORTED_Y:P((function(){var t=Hn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:P((function(){var t=Hn("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Yn=Object.keys||function(t){return Qt(t,Zt)},Gn=B?Object.defineProperties:function(t,e){H(t);for(var r,n=Yn(e),i=n.length,o=0;i>o;)K.f(t,r=n[o++],e[r]);return t},Wn=ct("IE_PROTO"),qn=function(){},$n=function(t){return"<script>"+t+"</"+"script>"},Qn=function(t){t.write($n("")),t.close();var e=t.parentWindow.Object;return t=null,e},Zn=function(){try{zn=new ActiveXObject("htmlfile")}catch(t){}var t,e;Zn="undefined"!=typeof document?document.domain&&zn?Qn(zn):((e=z("iframe")).style.display="none",Qe.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write($n("document.F=Object")),t.close(),t.F):Qn(zn);for(var r=Zt.length;r--;)delete Zn.prototype[Zt[r]];return Zn()};lt[Wn]=!0;var Kn,Jn,ti=Object.create||function(t,e){var r;return null!==t?(qn.prototype=H(t),r=new qn,qn.prototype=null,r[Wn]=t):r=Zn(),void 0===e?r:Gn(r,e)},ei=u.RegExp,ri=P((function(){var t=ei(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),ni=u.RegExp,ii=P((function(){var t=ni("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),oi=mt.get,ai=RegExp.prototype.exec,ui=f("native-string-replace",String.prototype.replace),si=ai,ci=(Kn=/a/,Jn=/b*/g,ai.call(Kn,"a"),ai.call(Jn,"a"),0!==Kn.lastIndex||0!==Jn.lastIndex),li=Xn.UNSUPPORTED_Y||Xn.BROKEN_CARET,fi=void 0!==/()??/.exec("")[1];(ci||fi||li||ri||ii)&&(si=function(t){var e,r,n,i,o,a,u,s=this,c=oi(s),l=En(t),f=c.raw;if(f)return f.lastIndex=s.lastIndex,e=si.call(f,l),s.lastIndex=f.lastIndex,e;var h=c.groups,p=li&&s.sticky,v=Un.call(s),y=s.source,d=0,g=l;if(p&&(-1===(v=v.replace("y","")).indexOf("g")&&(v+="g"),g=l.slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==l.charAt(s.lastIndex-1))&&(y="(?: "+y+")",g=" "+g,d++),r=new RegExp("^(?:"+y+")",v)),fi&&(r=new RegExp("^"+y+"$(?!\\s)",v)),ci&&(n=s.lastIndex),i=ai.call(p?r:s,g),p?i?(i.input=i.input.slice(d),i[0]=i[0].slice(d),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:ci&&i&&(s.lastIndex=s.global?i.index+i[0].length:n),fi&&i&&i.length>1&&ui.call(i[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&h)for(i.groups=a=ti(null),o=0;o<h.length;o++)a[(u=h[o])[0]]=i[u[1]];return i});var hi=si;fe({target:"RegExp",proto:!0,forced:/./.exec!==hi},{exec:hi});var pi=I("species"),vi=RegExp.prototype,yi=function(t,e,r,n){var i=I(t),o=!P((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),a=o&&!P((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[pi]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return e=!0,null},r[i](""),!e}));if(!o||!a||r){var u=/./[i],s=e(i,""[t],(function(t,e,r,n,i){var a=e.exec;return a===hi||a===vi.exec?o&&!i?{done:!0,value:u.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));Ot(String.prototype,t,s[0]),Ot(vi,i,s[1])}n&&tt(vi[i],"sham",!0)},di=function(t){return function(e,r){var n,i,o=En(h(e)),a=Ft(r),u=o.length;return a<0||a>=u?t?"":void 0:(n=o.charCodeAt(a))<55296||n>56319||a+1===u||(i=o.charCodeAt(a+1))<56320||i>57343?t?o.charAt(a):n:t?o.slice(a,a+2):i-56320+(n-55296<<10)+65536}},gi={codeAt:di(!1),charAt:di(!0)},mi=gi.charAt,xi=function(t,e,r){return e+(r?mi(t,e).length:1)},bi=function(t,e){var r=t.exec;if(x(r)){var n=r.call(t,e);return null!==n&&H(n),n}if("RegExp"===Tt(t))return hi.call(t,e);throw TypeError("RegExp#exec called on incompatible receiver")};yi("match",(function(t,e,r){return[function(e){var r=h(this),n=null==e?void 0:W(e,t);return n?n.call(e,r):new RegExp(e)[t](En(r))},function(t){var n=H(this),i=En(t),o=r(e,n,i);if(o.done)return o.value;if(!n.global)return bi(n,i);var a=n.unicode;n.lastIndex=0;for(var u,s=[],c=0;null!==(u=bi(n,i));){var l=En(u[0]);s[c]=l,""===l&&(n.lastIndex=xi(i,Yt(n.lastIndex),a)),c++}return 0===c?null:s}]}));var wi=Math.floor,Si="".replace,Oi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ki=/\$([$&'`]|\d{1,2})/g,Ti=function(t,e,r,n,i,o){var a=r+t.length,u=n.length,s=ki;return void 0!==i&&(i=p(i),s=Oi),Si.call(o,s,(function(o,s){var c;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":c=i[s.slice(1,-1)];break;default:var l=+s;if(0===l)return o;if(l>u){var f=wi(l/10);return 0===f?o:f<=u?void 0===n[f-1]?s.charAt(1):n[f-1]+s.charAt(1):o}c=n[l-1]}return void 0===c?"":c}))},Ai=I("replace"),Ri=Math.max,Pi=Math.min,Ei="$0"==="a".replace(/./,"$0"),Ci=!!/./[Ai]&&""===/./[Ai]("a","$0");yi("replace",(function(t,e,r){var n=Ci?"$":"$0";return[function(t,r){var n=h(this),i=null==t?void 0:W(t,Ai);return i?i.call(t,n,r):e.call(En(n),t,r)},function(t,i){var o=H(this),a=En(t);if("string"==typeof i&&-1===i.indexOf(n)&&-1===i.indexOf("$<")){var u=r(e,o,a,i);if(u.done)return u.value}var s=x(i);s||(i=En(i));var c=o.global;if(c){var l=o.unicode;o.lastIndex=0}for(var f=[];;){var h=bi(o,a);if(null===h)break;if(f.push(h),!c)break;""===En(h[0])&&(o.lastIndex=xi(a,Yt(o.lastIndex),l))}for(var p,v="",y=0,d=0;d<f.length;d++){h=f[d];for(var g=En(h[0]),m=Ri(Pi(Ft(h.index),a.length),0),b=[],w=1;w<h.length;w++)b.push(void 0===(p=h[w])?p:String(p));var S=h.groups;if(s){var O=[g].concat(b,m,a);void 0!==S&&O.push(S);var k=En(i.apply(void 0,O))}else k=Ti(g,a,m,b,S,i);m>=y&&(v+=a.slice(y,m)+k,y=m+g.length)}return v+a.slice(y)}]}),!!P((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Ei||Ci);var Mi,Ni=I("match"),_i=function(t){var e;return D(t)&&(void 0!==(e=t[Ni])?!!e:"RegExp"==Tt(t))},Ii=function(t){if(_i(t))throw TypeError("The method doesn't accept regular expressions");return t},Vi=I("match"),Li=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Vi]=!1,"/./"[t](e)}catch(t){}}return!1},Bi=Bt.f,Di="".startsWith,ji=Math.min,Fi=Li("startsWith"),zi=!(Fi||(Mi=Bi(String.prototype,"startsWith"),!Mi||Mi.writable));function Ui(t){return t.replace(/(?!\u3000)\s+/gm," ")}function Hi(t){return t.replace(/^[\n \t]+/,"")}function Xi(t){return t.replace(/[\n \t]+$/,"")}function Yi(t){return((t||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[]).map(parseFloat)}fe({target:"String",proto:!0,forced:!zi&&!Fi},{startsWith:function(t){var e=En(h(this));Ii(t);var r=Yt(ji(arguments.length>1?arguments[1]:void 0,e.length)),n=En(t);return Di?Di.call(e,n,r):e.slice(r,r+n.length)===n}});var Gi=/^[A-Z-]+$/;function Wi(t){return Gi.test(t)?t.toLowerCase():t}function qi(t){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t)||[];return e[2]||e[3]||e[4]}function $i(t){if(!t.startsWith("rgb"))return t;var e=3;return t.replace(/\d+(\.\d+)?/g,(function(t,r){return e--&&r?String(Math.round(parseFloat(t))):t}))}var Qi=function(t,e){var r=[][t];return!!r&&P((function(){r.call(null,e||function(){throw 1},1)}))},Zi=[].join,Ki=It!=Object,Ji=Qi("join",",");fe({target:"Array",proto:!0,forced:Ki||!Ji},{join:function(t){return Zi.call(Vt(this),void 0===t?",":t)}});var to=n((function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0})),eo=n((function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(t){u=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw i}}return o}},t.exports.default=t.exports,t.exports.__esModule=!0})),ro=n((function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0})),no=n((function(t){t.exports=function(t,e){if(t){if("string"==typeof t)return ro(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)?ro(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0})),io=n((function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0})),oo=r(n((function(t){t.exports=function(t,e){return to(t)||eo(t,e)||no(t,e)||io()},t.exports.default=t.exports,t.exports.__esModule=!0}))),ao=/(\[[^\]]+\])/g,uo=/(#[^\s+>~.[:]+)/g,so=/(\.[^\s+>~.[:]+)/g,co=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,lo=/(:[\w-]+\([^)]*\))/gi,fo=/(:[^\s+>~.[:]+)/g,ho=/([^\s+>~.[:]+)/g;function po(t,e){var r=e.exec(t);return r?[t.replace(e," "),r.length]:[t,0]}function vo(t){var e=[0,0,0],r=t.replace(/:not\(([^)]*)\)/g,"     $1 ").replace(/{[\s\S]*/gm," "),n=0,i=po(r,ao),o=oo(i,2);r=o[0],n=o[1],e[1]+=n;var a=po(r,uo),u=oo(a,2);r=u[0],n=u[1],e[0]+=n;var s=po(r,so),c=oo(s,2);r=c[0],n=c[1],e[1]+=n;var l=po(r,co),f=oo(l,2);r=f[0],n=f[1],e[2]+=n;var h=po(r,lo),p=oo(h,2);r=p[0],n=p[1],e[1]+=n;var v=po(r,fo),y=oo(v,2);r=y[0],n=y[1],e[1]+=n;var d=po(r=r.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),ho),g=oo(d,2);return r=g[0],n=g[1],e[2]+=n,e.join("")}var yo=1e-8;function go(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function mo(t,e){return(t[0]*e[0]+t[1]*e[1])/(go(t)*go(e))}function xo(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(mo(t,e))}function bo(t){return t*t*t}function wo(t){return 3*t*t*(1-t)}function So(t){return 3*t*(1-t)*(1-t)}function Oo(t){return(1-t)*(1-t)*(1-t)}function ko(t){return t*t}function To(t){return 2*t*(1-t)}function Ao(t){return(1-t)*(1-t)}var Ro=r(n((function(t){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0}))),Po=r(n((function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0}))),Eo=r(n((function(t){function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0}))),Co=function(t,e,r){var n=Q(e);n in t?K.f(t,n,J(0,r)):t[n]=r},Mo=I("isConcatSpreadable"),No=9007199254740991,_o="Maximum allowed index exceeded",Io=R>=51||!P((function(){var t=[];return t[Mo]=!1,t.concat()[0]!==t})),Vo=An("concat"),Lo=function(t){if(!D(t))return!1;var e=t[Mo];return void 0!==e?!!e:xn(t)};fe({target:"Array",proto:!0,forced:!Io||!Vo},{concat:function(t){var e,r,n,i,o,a=p(this),u=wn(a,0),s=0;for(e=-1,n=arguments.length;e<n;e++)if(Lo(o=-1===e?a:arguments[e])){if(s+(i=Gt(o))>No)throw TypeError(_o);for(r=0;r<i;r++,s++)r in o&&Co(u,s,o[r])}else{if(s>=No)throw TypeError(_o);Co(u,s++,o)}return u.length=s,u}});var Bo=kn.every,Do=Qi("every");fe({target:"Array",proto:!0,forced:!Do},{every:function(t){return Bo(this,t,arguments.length>1?arguments[1]:void 0)}});var jo=function(t){return function(e,r,n,i){G(r);var o=p(e),a=It(o),u=Gt(o),s=t?u-1:0,c=t?-1:1;if(n<2)for(;;){if(s in a){i=a[s],s+=c;break}if(s+=c,t?s<0:u<=s)throw TypeError("Reduce of empty array with no initial value")}for(;t?s>=0:u>s;s+=c)s in a&&(i=r(i,a[s],s,o));return i}},Fo={left:jo(!1),right:jo(!0)}.left,zo=Qi("reduce");fe({target:"Array",proto:!0,forced:!zo||!Ke&&R>79&&R<83},{reduce:function(t){return Fo(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Uo=Bt.f,Ho="".endsWith,Xo=Math.min,Yo=Li("endsWith"),Go=!Yo&&!!function(){var t=Uo(String.prototype,"endsWith");return t&&!t.writable}();fe({target:"String",proto:!0,forced:!Go&&!Yo},{endsWith:function(t){var e=En(h(this));Ii(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:Xo(Yt(r),n),o=En(t);return Ho?Ho.call(e,o,i):e.slice(i-o.length,i)===o}});var Wo=Xn.UNSUPPORTED_Y,qo=[].push,$o=Math.min,Qo=4294967295;yi("split",(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=En(h(this)),i=void 0===r?Qo:r>>>0;if(0===i)return[];if(void 0===t)return[n];if(!_i(t))return e.call(n,t,i);for(var o,a,u,s=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,f=new RegExp(t.source,c+"g");(o=hi.call(f,n))&&!((a=f.lastIndex)>l&&(s.push(n.slice(l,o.index)),o.length>1&&o.index<n.length&&qo.apply(s,o.slice(1)),u=o[0].length,l=a,s.length>=i));)f.lastIndex===o.index&&f.lastIndex++;return l===n.length?!u&&f.test("")||s.push(""):s.push(n.slice(l)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var i=h(this),o=null==e?void 0:W(e,t);return o?o.call(e,i,r):n.call(En(i),e,r)},function(t,i){var o=H(this),a=En(t),u=r(n,o,a,i,n!==e);if(u.done)return u.value;var s=$e(o,RegExp),c=o.unicode,l=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Wo?"g":"y"),f=new s(Wo?"^(?:"+o.source+")":o,l),h=void 0===i?Qo:i>>>0;if(0===h)return[];if(0===a.length)return null===bi(f,a)?[a]:[];for(var p=0,v=0,y=[];v<a.length;){f.lastIndex=Wo?0:v;var d,g=bi(f,Wo?a.slice(v):a);if(null===g||(d=$o(Yt(f.lastIndex+(Wo?v:0)),a.length))===p)v=xi(a,v,c);else{if(y.push(a.slice(p,v)),y.length===h)return y;for(var m=1;m<=g.length-1;m++)if(y.push(g[m]),y.length===h)return y;v=p=d}}return y.push(a.slice(p)),y}]}),!!P((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Wo);var Zo="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Ko(){throw new Error("setTimeout has not been defined")}function Jo(){throw new Error("clearTimeout has not been defined")}var ta=Ko,ea=Jo;function ra(t){if(ta===setTimeout)return setTimeout(t,0);if((ta===Ko||!ta)&&setTimeout)return ta=setTimeout,setTimeout(t,0);try{return ta(t,0)}catch(e){try{return ta.call(null,t,0)}catch(e){return ta.call(this,t,0)}}}"function"==typeof Zo.setTimeout&&(ta=setTimeout),"function"==typeof Zo.clearTimeout&&(ea=clearTimeout);var na,ia=[],oa=!1,aa=-1;function ua(){oa&&na&&(oa=!1,na.length?ia=na.concat(ia):aa=-1,ia.length&&sa())}function sa(){if(!oa){var t=ra(ua);oa=!0;for(var e=ia.length;e;){for(na=ia,ia=[];++aa<e;)na&&na[aa].run();aa=-1,e=ia.length}na=null,oa=!1,function(t){if(ea===clearTimeout)return clearTimeout(t);if((ea===Jo||!ea)&&clearTimeout)return ea=clearTimeout,clearTimeout(t);try{ea(t)}catch(e){try{return ea.call(null,t)}catch(e){return ea.call(this,t)}}}(t)}}function ca(t,e){this.fun=t,this.array=e}ca.prototype.run=function(){this.fun.apply(null,this.array)};function la(){}var fa=la,ha=la,pa=la,va=la,ya=la,da=la,ga=la;var ma=Zo.performance||{},xa=ma.now||ma.mozNow||ma.msNow||ma.oNow||ma.webkitNow||function(){return(new Date).getTime()};var ba=new Date;for(var wa={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ia.push(new ca(t,e)),1!==ia.length||oa||ra(sa)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:fa,addListener:ha,once:pa,off:va,removeListener:ya,removeAllListeners:da,emit:ga,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*xa.call(ma),r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r-=t[0],(n-=t[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-ba)/1e3}},Sa=n((function(t){(function(){var e,r,n,i,o,a;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=wa&&wa.hrtime?(t.exports=function(){return(e()-o)/1e6},r=wa.hrtime,i=(e=function(){var t;return 1e9*(t=r())[0]+t[1]})(),a=1e9*wa.uptime(),o=i-a):Date.now?(t.exports=function(){return Date.now()-n},n=Date.now()):(t.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(e)})),Oa="undefined"==typeof window?e:window,ka=["moz","webkit"],Ta="AnimationFrame",Aa=Oa["request"+Ta],Ra=Oa["cancel"+Ta]||Oa["cancelRequest"+Ta],Pa=0;!Aa&&Pa<ka.length;Pa++)Aa=Oa[ka[Pa]+"Request"+Ta],Ra=Oa[ka[Pa]+"Cancel"+Ta]||Oa[ka[Pa]+"CancelRequest"+Ta];if(!Aa||!Ra){var Ea=0,Ca=0,Ma=[];Aa=function(t){if(0===Ma.length){var e=Sa(),r=Math.max(0,16.666666666666668-(e-Ea));Ea=r+e,setTimeout((function(){var t=Ma.slice(0);Ma.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(Ea)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(r))}return Ma.push({handle:++Ca,callback:t,cancelled:!1}),Ca},Ra=function(t){for(var e=0;e<Ma.length;e++)Ma[e].handle===t&&(Ma[e].cancelled=!0)}}var Na=function(t){return Aa.call(Oa,t)};Na.cancel=function(){Ra.apply(Oa,arguments)},Na.polyfill=function(t){t||(t=Oa),t.requestAnimationFrame=Aa,t.cancelAnimationFrame=Ra};var _a=St.EXISTS,Ia=K.f,Va=Function.prototype,La=Va.toString,Ba=/^\s*function ([^ (]*)/;B&&!_a&&Ia(Va,"name",{configurable:!0,get:function(){try{return La.call(this).match(Ba)[1]}catch(t){return""}}});var Da,ja=St.PROPER,Fa=Vn.trim;fe({target:"String",proto:!0,forced:(Da="trim",P((function(){return!!Cn[Da]()||"​
+᠎"!=="​
+᠎"[Da]()||ja&&Cn[Da].name!==Da})))},{trim:function(){return Fa(this)}});var za=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,o=r[n].process,a=i.exec(t);if(a){var u=o(a);this.r=u[0],this.g=u[1],this.b=u[2],u.length>3&&(this.alpha=u[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},this.getHelpXML=function(){for(var t=new Array,n=0;n<r.length;n++)for(var i=r[n].example,o=0;o<i.length;o++)t[t.length]=i[o];for(var a in e)t[t.length]=a;var u=document.createElement("ul");u.setAttribute("id","rgbcolor-examples");for(n=0;n<t.length;n++)try{var s=document.createElement("li"),c=new RGBColor(t[n]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+c.toHex()+"; color:"+c.toHex(),l.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[n]+" -> "+c.toRGB()+" -> "+c.toHex());s.appendChild(l),s.appendChild(f),u.appendChild(s)}catch(t){}return u}},Ua=function(){function t(e,r,n){Po(this,t),this.document=e,this.name=r,this.value=n,this.isNormalizedColor=!1}return Eo(t,[{key:"split",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ",r=this.document,n=this.name;return Ui(this.getString()).trim().split(e).map((function(e){return new t(r,n,e)}))}},{key:"hasValue",value:function(t){var e=this.value;return null!==e&&""!==e&&(t||0!==e)&&void 0!==e}},{key:"isString",value:function(t){var e=this.value,r="string"==typeof e;return r&&t?t.test(e):r}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"getValue",value:function(t){return void 0===t||this.hasValue()?this.value:t}},{key:"getNumber",value:function(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var e=this.value,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}},{key:"getString",value:function(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}},{key:"getColor",value:function(t){var e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=$i(e),this.value=e),e}},{key:"getDpi",value:function(){return 96}},{key:"getRem",value:function(){return this.document.rootEmSize}},{key:"getEm",value:function(){return this.document.emSize}},{key:"getUnits",value:function(){return this.getString().replace(/[0-9.-]/g,"")}},{key:"getPixels",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var r="boolean"==typeof t?[void 0,t]:[t],n=oo(r,2),i=n[0],o=n[1],a=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(a.computeSize("x"),a.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(a.computeSize("x"),a.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*a.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*a.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&o:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*a.computeSize(i);default:var u=this.getNumber();return e&&u<1?u*a.computeSize(i):u}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function(){var t=this.getString(),e=/#([^)'"]+)/.exec(t);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}},{key:"getFillStyleDefinition",value:function(t,e){var r=this.getDefinition();if(!r)return null;if("function"==typeof r.createGradient)return r.createGradient(this.document.ctx,t,e);if("function"==typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var n=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),n.hasValue()&&r.getAttribute("patternTransform",!0).setValue(n.value)}return r.createPattern(this.document.ctx,t,e)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?t.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(e){for(var r=this.getColor(),n=r.length,i=0,o=0;o<n&&(","===r[o]&&i++,3!==i);o++);if(e.hasValue()&&this.isString()&&3!==i){var a=new za(r);a.ok&&(a.alpha=e.getNumber(),r=a.toRGBA())}return new t(this.document,this.name,r)}}],[{key:"empty",value:function(e){return new t(e,"EMPTY","")}}]),t}();Ua.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};var Ha=function(){function t(){Po(this,t),this.viewPorts=[]}return Eo(t,[{key:"clear",value:function(){this.viewPorts=[]}},{key:"setCurrent",value:function(t,e){this.viewPorts.push({width:t,height:e})}},{key:"removeCurrent",value:function(){this.viewPorts.pop()}},{key:"getCurrent",value:function(){var t=this.viewPorts;return t[t.length-1]}},{key:"computeSize",value:function(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}},{key:"width",get:function(){return this.getCurrent().width}},{key:"height",get:function(){return this.getCurrent().height}}]),t}(),Xa=kn.forEach,Ya=Qi("forEach")?[].forEach:function(t){return Xa(this,t,arguments.length>1?arguments[1]:void 0)};fe({target:"Array",proto:!0,forced:[].forEach!=Ya},{forEach:Ya});var Ga={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Wa=z("span").classList,qa=Wa&&Wa.constructor&&Wa.constructor.prototype,$a=qa===Object.prototype?void 0:qa,Qa=function(t){if(t&&t.forEach!==Ya)try{tt(t,"forEach",Ya)}catch(e){t.forEach=Ya}};for(var Za in Ga)Ga[Za]&&Qa(u[Za]&&u[Za].prototype);Qa($a);var Ka=function(){function t(e,r){Po(this,t),this.x=e,this.y=r}return Eo(t,[{key:"angleTo",value:function(t){return Math.atan2(t.y-this.y,t.x-this.x)}},{key:"applyTransform",value:function(t){var e=this.x,r=this.y,n=e*t[0]+r*t[2]+t[4],i=e*t[1]+r*t[3]+t[5];this.x=n,this.y=i}}],[{key:"parse",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Yi(e),i=oo(n,2),o=i[0],a=void 0===o?r:o,u=i[1],s=void 0===u?r:u;return new t(a,s)}},{key:"parseScale",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=Yi(e),i=oo(n,2),o=i[0],a=void 0===o?r:o,u=i[1],s=void 0===u?a:u;return new t(a,s)}},{key:"parsePath",value:function(e){for(var r=Yi(e),n=r.length,i=[],o=0;o<n;o+=2)i.push(new t(r[o],r[o+1]));return i}}]),t}(),Ja=function(){function t(e){Po(this,t),this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}return Eo(t,[{key:"isWorking",value:function(){return this.working}},{key:"start",value:function(){if(!this.working){var t=this.screen,e=this.onClick,r=this.onMouseMove,n=t.ctx.canvas;n.onclick=e,n.onmousemove=r,this.working=!0}}},{key:"stop",value:function(){if(this.working){var t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}}},{key:"hasEvents",value:function(){return this.working&&this.events.length>0}},{key:"runEvents",value:function(){if(this.working){var t=this.screen,e=this.events,r=this.eventElements,n=t.ctx.canvas.style;n&&(n.cursor=""),e.forEach((function(t,e){for(var n=t.run,i=r[e];i;)n(i),i=i.parent})),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach((function(r,i){var o=r.x,a=r.y;!n[i]&&e.isPointInPath&&e.isPointInPath(o,a)&&(n[i]=t)}))}}},{key:"checkBoundingBox",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach((function(r,i){var o=r.x,a=r.y;!n[i]&&e.isPointInBox(o,a)&&(n[i]=t)}))}}},{key:"mapXY",value:function(t,e){for(var r=this.screen,n=r.window,i=r.ctx,o=new Ka(t,e),a=i.canvas;a;)o.x-=a.offsetLeft,o.y-=a.offsetTop,a=a.offsetParent;return n.scrollX&&(o.x+=n.scrollX),n.scrollY&&(o.y+=n.scrollY),o}},{key:"onClick",value:function(t){var e=this.mapXY(t.clientX,t.clientY),r=e.x,n=e.y;this.events.push({type:"onclick",x:r,y:n,run:function(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function(t){var e=this.mapXY(t.clientX,t.clientY),r=e.x,n=e.y;this.events.push({type:"onmousemove",x:r,y:n,run:function(t){t.onMouseMove&&t.onMouseMove()}})}}]),t}(),tu="undefined"!=typeof window?window:null,eu="undefined"!=typeof fetch?fetch.bind(void 0):null,ru=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.fetch,i=void 0===n?eu:n,o=r.window,a=void 0===o?tu:o;Po(this,t),this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new Ha,this.mouse=new Ja(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=a,this.fetch=i}return Eo(t,[{key:"wait",value:function(t){this.waits.push(t)}},{key:"ready",value:function(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function(){if(this.isReadyLock)return!0;var t=this.waits.every((function(t){return t()}));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}},{key:"setDefaults",value:function(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}},{key:"setViewBox",value:function(t){var e=t.document,r=t.ctx,n=t.aspectRatio,i=t.width,o=t.desiredWidth,a=t.height,u=t.desiredHeight,s=t.minX,c=void 0===s?0:s,l=t.minY,f=void 0===l?0:l,h=t.refX,p=t.refY,v=t.clip,y=void 0!==v&&v,d=t.clipX,g=void 0===d?0:d,m=t.clipY,x=void 0===m?0:m,b=Ui(n).replace(/^defer\s/,"").split(" "),w=oo(b,2),S=w[0]||"xMidYMid",O=w[1]||"meet",k=i/o,T=a/u,A=Math.min(k,T),R=Math.max(k,T),P=o,E=u;"meet"===O&&(P*=A,E*=A),"slice"===O&&(P*=R,E*=R);var C=new Ua(e,"refX",h),M=new Ua(e,"refY",p),N=C.hasValue()&&M.hasValue();if(N&&r.translate(-A*C.getPixels("x"),-A*M.getPixels("y")),y){var _=A*g,I=A*x;r.beginPath(),r.moveTo(_,I),r.lineTo(i,I),r.lineTo(i,a),r.lineTo(_,a),r.closePath(),r.clip()}if(!N){var V="meet"===O&&A===T,L="slice"===O&&R===T,B="meet"===O&&A===k,D="slice"===O&&R===k;S.startsWith("xMid")&&(V||L)&&r.translate(i/2-P/2,0),S.endsWith("YMid")&&(B||D)&&r.translate(0,a/2-E/2),S.startsWith("xMax")&&(V||L)&&r.translate(i-P,0),S.endsWith("YMax")&&(B||D)&&r.translate(0,a-E)}switch(!0){case"none"===S:r.scale(k,T);break;case"meet"===O:r.scale(A,A);break;case"slice"===O:r.scale(R,R)}r.translate(-c,-f)}},{key:"start",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.enableRedraw,i=void 0!==n&&n,o=r.ignoreMouse,a=void 0!==o&&o,u=r.ignoreAnimation,s=void 0!==u&&u,c=r.ignoreDimensions,l=void 0!==c&&c,f=r.ignoreClear,h=void 0!==f&&f,p=r.forceRedraw,v=r.scaleWidth,y=r.scaleHeight,d=r.offsetX,g=r.offsetY,m=this.FRAMERATE,x=this.mouse,b=1e3/m;if(this.frameDuration=b,this.readyPromise=new Promise((function(t){e.resolveReady=t})),this.isReady()&&this.render(t,l,h,v,y,d,g),i){var w=Date.now(),S=w,O=0,k=function r(){w=Date.now(),(O=w-S)>=b&&(S=w-O%b,e.shouldUpdate(s,p)&&(e.render(t,l,h,v,y,d,g),x.runEvents())),e.intervalId=Na(r)};a||x.start(),this.intervalId=Na(k)}}},{key:"stop",value:function(){this.intervalId&&(Na.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,e){if(!t){var r=this.frameDuration,n=this.animations.reduce((function(t,e){return e.update(r)||t}),!1);if(n)return!0}return!("function"!=typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}},{key:"render",value:function(t,e,r,n,i,o,a){var u=this.CLIENT_WIDTH,s=this.CLIENT_HEIGHT,c=this.viewPort,l=this.ctx,f=this.isFirstRender,h=l.canvas;c.clear(),h.width&&h.height?c.setCurrent(h.width,h.height):c.setCurrent(u,s);var p=t.getStyle("width"),v=t.getStyle("height");!e&&(f||"number"!=typeof n&&"number"!=typeof i)&&(p.hasValue()&&(h.width=p.getPixels("x"),h.style&&(h.style.width="".concat(h.width,"px"))),v.hasValue()&&(h.height=v.getPixels("y"),h.style&&(h.style.height="".concat(h.height,"px"))));var y=h.clientWidth||h.width,d=h.clientHeight||h.height;if(e&&p.hasValue()&&v.hasValue()&&(y=p.getPixels("x"),d=v.getPixels("y")),c.setCurrent(y,d),"number"==typeof o&&t.getAttribute("x",!0).setValue(o),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"==typeof n||"number"==typeof i){var g=Yi(t.getAttribute("viewBox").getString()),m=0,x=0;if("number"==typeof n){var b=t.getStyle("width");b.hasValue()?m=b.getPixels("x")/n:isNaN(g[2])||(m=g[2]/n)}if("number"==typeof i){var w=t.getStyle("height");w.hasValue()?x=w.getPixels("y")/i:isNaN(g[3])||(x=g[3]/i)}m||(m=x),x||(x=m),t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(i);var S=t.getStyle("transform",!0,!0);S.setValue("".concat(S.getString()," scale(").concat(1/m,", ").concat(1/x,")"))}r||l.clearRect(0,0,y,d),t.render(l),f&&(this.isFirstRender=!1)}}]),t}();ru.defaultWindow=tu,ru.defaultFetch=eu;var nu=ru.defaultFetch,iu="undefined"!=typeof DOMParser?DOMParser:null,ou=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.fetch,n=void 0===r?nu:r,i=e.DOMParser,o=void 0===i?iu:i;Po(this,t),this.fetch=n,this.DOMParser=o}var e,r;return Eo(t,[{key:"parse",value:(r=gn(dn.mark((function t(e){return dn.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.startsWith("<")){t.next=2;break}return t.abrupt("return",this.parseFromString(e));case 2:return t.abrupt("return",this.load(e));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"parseFromString",value:function(t){var e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(r){return this.checkDocument(e.parseFromString(t,"text/xml"))}}},{key:"checkDocument",value:function(t){var e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent);return t}},{key:"load",value:(e=gn(dn.mark((function t(e){var r,n;return dn.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fetch(e);case 2:return r=t.sent,t.next=5,r.text();case 5:return n=t.sent,t.abrupt("return",this.parseFromString(n));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),t}(),au=n((function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,e(r,n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})),uu=r(n((function(t){t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&au(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0}))),su=n((function(t){function e(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})),cu=n((function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0})),lu=r(cu),fu=r(n((function(t){var e=su.default;t.exports=function(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return cu(t)},t.exports.default=t.exports,t.exports.__esModule=!0}))),hu=n((function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})),pu=r(hu),vu=function(t,e,r,n){try{return n?e(H(r)[0],r[1]):e(r)}catch(e){Ee(t,"throw",e)}},yu=!Fe((function(t){Array.from(t)}));fe({target:"Array",stat:!0,forced:yu},{from:function(t){var e=p(t),r=We(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=Te(i,n>2?arguments[2]:void 0,2));var a,u,s,c,l,f,h=Re(e),v=0;if(!h||this==Array&&ke(h))for(a=Gt(e),u=r?new this(a):Array(a);a>v;v++)f=o?i(e[v],v):e[v],Co(u,v,f);else for(l=(c=Pe(e,h)).next,u=r?new this:[];!(s=l.call(c)).done;v++)f=o?vu(c,i,[s.value,v],!0):s.value,Co(u,v,f);return u.length=v,u}});var du=I("unscopables"),gu=Array.prototype;null==gu[du]&&K.f(gu,du,{configurable:!0,value:ti(null)});var mu=function(t){gu[du][t]=!0},xu=qt.includes;fe({target:"Array",proto:!0},{includes:function(t){return xu(this,t,arguments.length>1?arguments[1]:void 0)}}),mu("includes");var bu=qt.indexOf,wu=[].indexOf,Su=!!wu&&1/[1].indexOf(1,-0)<0,Ou=Qi("indexOf");fe({target:"Array",proto:!0,forced:Su||!Ou},{indexOf:function(t){return Su?wu.apply(this,arguments)||0:bu(this,t,arguments.length>1?arguments[1]:void 0)}});var ku=kn.some,Tu=Qi("some");fe({target:"Array",proto:!0,forced:!Tu},{some:function(t){return ku(this,t,arguments.length>1?arguments[1]:void 0)}}),fe({target:"String",proto:!0,forced:!Li("includes")},{includes:function(t){return!!~En(h(this)).indexOf(En(Ii(t)),arguments.length>1?arguments[1]:void 0)}});var Au,Ru,Pu,Eu=!P((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Cu=ct("IE_PROTO"),Mu=Object.prototype,Nu=Eu?Object.getPrototypeOf:function(t){var e=p(t);if(y(e,Cu))return e[Cu];var r=e.constructor;return x(r)&&e instanceof r?r.prototype:e instanceof Object?Mu:null},_u=I("iterator"),Iu=!1;[].keys&&("next"in(Pu=[].keys())?(Ru=Nu(Nu(Pu)))!==Object.prototype&&(Au=Ru):Iu=!0),(null==Au||P((function(){var t={};return Au[_u].call(t)!==t})))&&(Au={}),x(Au[_u])||Ot(Au,_u,(function(){return this}));var Vu={IteratorPrototype:Au,BUGGY_SAFARI_ITERATORS:Iu},Lu=Vu.IteratorPrototype,Bu=function(){return this},Du=St.PROPER,ju=St.CONFIGURABLE,Fu=Vu.IteratorPrototype,zu=Vu.BUGGY_SAFARI_ITERATORS,Uu=I("iterator"),Hu="keys",Xu="values",Yu="entries",Gu=function(){return this},Wu=function(t,e,r,n,i,o,a){!function(t,e,r){var n=e+" Iterator";t.prototype=ti(Lu,{next:J(1,r)}),ge(t,n,!1),we[n]=Bu}(r,e,n);var u,s,c,l=function(t){if(t===i&&y)return y;if(!zu&&t in p)return p[t];switch(t){case Hu:case Xu:case Yu:return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",h=!1,p=t.prototype,v=p[Uu]||p["@@iterator"]||i&&p[i],y=!zu&&v||l(i),d="Array"==e&&p.entries||v;if(d&&(u=Nu(d.call(new t)))!==Object.prototype&&u.next&&(Nu(u)!==Fu&&(ve?ve(u,Fu):x(u[Uu])||Ot(u,Uu,Gu)),ge(u,f,!0)),Du&&i==Xu&&v&&v.name!==Xu&&(ju?tt(p,"name",Xu):(h=!0,y=function(){return v.call(this)})),i)if(s={values:l(Xu),keys:o?y:l(Hu),entries:l(Yu)},a)for(c in s)(zu||h||!(c in p))&&Ot(p,c,s[c]);else fe({target:e,proto:!0,forced:zu||h},s);return p[Uu]!==y&&Ot(p,Uu,y,{name:i}),we[e]=y,s},qu=gi.charAt,$u="String Iterator",Qu=mt.set,Zu=mt.getterFor($u);Wu(String,"String",(function(t){Qu(this,{type:$u,string:En(t),index:0})}),(function(){var t,e=Zu(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=qu(r,n),e.index+=t.length,{value:t,done:!1})}));var Ku=n((function(t){t.exports=function(t){if(Array.isArray(t))return ro(t)},t.exports.default=t.exports,t.exports.__esModule=!0})),Ju=n((function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0})),ts=n((function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0})),es=r(n((function(t){t.exports=function(t){return Ku(t)||Ju(t)||no(t)||ts()},t.exports.default=t.exports,t.exports.__esModule=!0}))),rs=function(){function t(e,r){Po(this,t),this.type="translate",this.point=null,this.point=Ka.parse(r)}return Eo(t,[{key:"apply",value:function(t){var e=this.point,r=e.x,n=e.y;t.translate(r||0,n||0)}},{key:"unapply",value:function(t){var e=this.point,r=e.x,n=e.y;t.translate(-1*r||0,-1*n||0)}},{key:"applyToPoint",value:function(t){var e=this.point,r=e.x,n=e.y;t.applyTransform([1,0,0,1,r||0,n||0])}}]),t}(),ns=function(){function t(e,r,n){Po(this,t),this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=Yi(r);this.angle=new Ua(e,"angle",i[0]),this.originX=n[0],this.originY=n[1],this.cx=i[1]||0,this.cy=i[2]||0}return Eo(t,[{key:"apply",value:function(t){var e=this.cx,r=this.cy,n=this.originX,i=this.originY,o=this.angle,a=e+n.getPixels("x"),u=r+i.getPixels("y");t.translate(a,u),t.rotate(o.getRadians()),t.translate(-a,-u)}},{key:"unapply",value:function(t){var e=this.cx,r=this.cy,n=this.originX,i=this.originY,o=this.angle,a=e+n.getPixels("x"),u=r+i.getPixels("y");t.translate(a,u),t.rotate(-1*o.getRadians()),t.translate(-a,-u)}},{key:"applyToPoint",value:function(t){var e=this.cx,r=this.cy,n=this.angle.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}]),t}(),is=function(){function t(e,r,n){Po(this,t),this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=Ka.parseScale(r);0!==i.x&&0!==i.y||(i.x=yo,i.y=yo),this.scale=i,this.originX=n[0],this.originY=n[1]}return Eo(t,[{key:"apply",value:function(t){var e=this.scale,r=e.x,n=e.y,i=this.originX,o=this.originY,a=i.getPixels("x"),u=o.getPixels("y");t.translate(a,u),t.scale(r,n||r),t.translate(-a,-u)}},{key:"unapply",value:function(t){var e=this.scale,r=e.x,n=e.y,i=this.originX,o=this.originY,a=i.getPixels("x"),u=o.getPixels("y");t.translate(a,u),t.scale(1/r,1/n||r),t.translate(-a,-u)}},{key:"applyToPoint",value:function(t){var e=this.scale,r=e.x,n=e.y;t.applyTransform([r||0,0,0,n||0,0,0])}}]),t}(),os=function(){function t(e,r,n){Po(this,t),this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=Yi(r),this.originX=n[0],this.originY=n[1]}return Eo(t,[{key:"apply",value:function(t){var e=this.originX,r=this.originY,n=this.matrix,i=e.getPixels("x"),o=r.getPixels("y");t.translate(i,o),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),t.translate(-i,-o)}},{key:"unapply",value:function(t){var e=this.originX,r=this.originY,n=this.matrix,i=n[0],o=n[2],a=n[4],u=n[1],s=n[3],c=n[5],l=1/(i*(1*s-0*c)-o*(1*u-0*c)+a*(0*u-0*s)),f=e.getPixels("x"),h=r.getPixels("y");t.translate(f,h),t.transform(l*(1*s-0*c),l*(0*c-1*u),l*(0*a-1*o),l*(1*i-0*a),l*(o*c-a*s),l*(a*u-i*c)),t.translate(-f,-h)}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),t}();function as(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var us=function(t){uu(r,t);var e=as(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="skew",o.angle=null,o.angle=new Ua(t,"angle",n),o}return r}(os);function ss(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var cs=function(t){uu(r,t);var e=ss(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="skewX",o.matrix=[1,0,Math.tan(o.angle.getRadians()),1,0,0],o}return r}(us);function ls(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var fs=function(t){uu(r,t);var e=ls(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="skewY",o.matrix=[1,Math.tan(o.angle.getRadians()),0,1,0,0],o}return r}(us);var hs=function(){function t(e,r,n){var i=this;Po(this,t),this.document=e,this.transforms=[],function(t){return Ui(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}(r).forEach((function(e){if("none"!==e){var r=function(t){var e=t.split("("),r=oo(e,2),n=r[0],i=r[1];return[n.trim(),i.trim().replace(")","")]}(e),o=oo(r,2),a=o[0],u=o[1],s=t.transformTypes[a];void 0!==s&&i.transforms.push(new s(i.document,u,n))}}))}return Eo(t,[{key:"apply",value:function(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].apply(t)}},{key:"unapply",value:function(t){for(var e=this.transforms,r=e.length-1;r>=0;r--)e[r].unapply(t)}},{key:"applyToPoint",value:function(t){for(var e=this.transforms,r=e.length,n=0;n<r;n++)e[n].applyToPoint(t)}}],[{key:"fromElement",value:function(e,r){var n=r.getStyle("transform",!1,!0),i=r.getStyle("transform-origin",!1,!0).split(),o=oo(i,2),a=o[0],u=o[1],s=[a,void 0===u?a:u];return n.hasValue()?new t(e,n.getString(),s):null}}]),t}();hs.transformTypes={translate:rs,rotate:ns,scale:is,matrix:os,skewX:cs,skewY:fs};var ps=function(){function t(e,r){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Po(this,t),this.document=e,this.node=r,this.captureTextNodes=i,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach((function(t){var r=Wi(t.nodeName);n.attributes[r]=new Ua(e,r,t.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var o=this.getAttribute("style").getString().split(";").map((function(t){return t.trim()}));o.forEach((function(t){if(t){var r=t.split(":").map((function(t){return t.trim()})),i=oo(r,2),o=i[0],a=i[1];n.styles[o]=new Ua(e,o,a)}}))}var a=e.definitions,u=this.getAttribute("id");u.hasValue()&&(a[u.getString()]||(a[u.getString()]=this)),Array.from(r.childNodes).forEach((function(t){if(1===t.nodeType)n.addChild(t);else if(i&&(3===t.nodeType||4===t.nodeType)){var r=e.createTextNode(t);r.getText().length>0&&n.addChild(r)}}))}}return Eo(t,[{key:"getAttribute",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[t];if(!r&&e){var n=new Ua(this.document,t,"");return this.attributes[t]=n,n}return r||Ua.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if("href"===t||t.endsWith(":href"))return this.attributes[t];return Ua.empty(this.document)}},{key:"getStyle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.styles[t];if(n)return n;var i=this.getAttribute(t);if(null!=i&&i.hasValue())return this.styles[t]=i,i;if(!r){var o=this.parent;if(o){var a=o.getStyle(t);if(null!=a&&a.hasValue())return a}}if(e){var u=new Ua(this.document,t,"");return this.styles[t]=u,u}return n||Ua.empty(this.document)}},{key:"render",value:function(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&(this.applyEffects(t),r.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function(t){}},{key:"applyEffects",value:function(t){var e=hs.fromElement(this.document,this);e&&e.apply(t);var r=this.getStyle("clip-path",!1,!0);if(r.hasValue()){var n=r.getDefinition();n&&n.apply(t)}}},{key:"clearContext",value:function(t){}},{key:"renderChildren",value:function(t){this.children.forEach((function(e){e.render(t)}))}},{key:"addChild",value:function(e){var r=e instanceof t?e:this.document.createElement(e);r.parent=this,t.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function(t){var e,r=this.node;if("function"==typeof r.matches)return r.matches(t);var n=null===(e=r.getAttribute)||void 0===e?void 0:e.call(r,"class");return!(!n||""===n)&&n.split(" ").some((function(e){return".".concat(e)===t}))}},{key:"addStylesFromStyleDefinition",value:function(){var t=this.document,e=t.styles,r=t.stylesSpecificity;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var i=e[n],o=r[n];if(i)for(var a in i){var u=this.stylesSpecificity[a];void 0===u&&(u="000"),o>=u&&(this.styles[a]=i[a],this.stylesSpecificity[a]=o)}}}},{key:"removeStyles",value:function(t,e){return e.reduce((function(e,r){var n=t.getStyle(r);if(!n.hasValue())return e;var i=n.getString();return n.setValue(""),[].concat(es(e),[[r,i]])}),[])}},{key:"restoreStyles",value:function(t,e){e.forEach((function(e){var r=oo(e,2),n=r[0],i=r[1];t.getStyle(n,!0).setValue(i)}))}},{key:"isFirstChild",value:function(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this))}}]),t}();function vs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}ps.ignoreChildTypes=["title"];var ys=function(t){uu(r,t);var e=vs(r);function r(t,n,i){return Po(this,r),e.call(this,t,n,i)}return r}(ps),ds=[].reverse,gs=[1,2];fe({target:"Array",proto:!0,forced:String(gs)===String(gs.reverse())},{reverse:function(){return xn(this)&&(this.length=this.length),ds.call(this)}});var ms=function(t,e,r){var n,i;return ve&&x(n=e.constructor)&&n!==r&&D(i=n.prototype)&&i!==r.prototype&&ve(t,i),t},xs=1..valueOf,bs=function(t){return xs.call(t)},ws=Jt.f,Ss=Bt.f,Os=K.f,ks=Vn.trim,Ts="Number",As=u.Number,Rs=As.prototype,Ps=function(t){var e=$(t,"number");return"bigint"==typeof e?e:Es(e)},Es=function(t){var e,r,n,i,o,a,u,s,c=$(t,"number");if(X(c))throw TypeError("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(43===(e=(c=ks(c)).charCodeAt(0))||45===e){if(88===(r=c.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(c.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(a=(o=c.slice(2)).length,u=0;u<a;u++)if((s=o.charCodeAt(u))<48||s>i)return NaN;return parseInt(o,n)}return+c};if(ce(Ts,!As(" 0o1")||!As("0b1")||As("+0x1"))){for(var Cs,Ms=function(t){var e=arguments.length<1?0:As(Ps(t)),r=this;return r instanceof Ms&&P((function(){bs(r)}))?ms(Object(e),r,Ms):e},Ns=B?ws(As):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),_s=0;Ns.length>_s;_s++)y(As,Cs=Ns[_s])&&!y(Ms,Cs)&&Os(Ms,Cs,Ss(As,Cs));Ms.prototype=Rs,Rs.constructor=Ms,Ot(u,Ts,Ms)}var Is=n((function(t){t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=hu(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0})),Vs=r(n((function(t){function e(r,n,i){return"undefined"!=typeof Reflect&&Reflect.get?(t.exports=e=Reflect.get,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t,e,r){var n=Is(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},t.exports.default=t.exports,t.exports.__esModule=!0),e(r,n,i||r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})));function Ls(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function Bs(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function Ds(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}var js=function(){function t(e,r,n,i,o,a){Po(this,t);var u=a?"string"==typeof a?t.parse(a):a:{};this.fontFamily=o||u.fontFamily,this.fontSize=i||u.fontSize,this.fontStyle=e||u.fontStyle,this.fontWeight=n||u.fontWeight,this.fontVariant=r||u.fontVariant}return Eo(t,[{key:"toString",value:function(){return[Bs(this.fontStyle),this.fontVariant,Ds(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"==typeof process?t:t.trim().split(",").map(Ls).join(","))].join(" ").trim();var t}}],[{key:"parse",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n="",i="",o="",a="",u="",s=Ui(e).trim().split(" "),c={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return s.forEach((function(e){switch(!0){case!c.fontStyle&&t.styles.includes(e):"inherit"!==e&&(n=e),c.fontStyle=!0;break;case!c.fontVariant&&t.variants.includes(e):"inherit"!==e&&(i=e),c.fontStyle=!0,c.fontVariant=!0;break;case!c.fontWeight&&t.weights.includes(e):"inherit"!==e&&(o=e),c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0;break;case!c.fontSize:if("inherit"!==e){var r=e.split("/"),s=oo(r,1);a=s[0]}c.fontStyle=!0,c.fontVariant=!0,c.fontWeight=!0,c.fontSize=!0;break;default:"inherit"!==e&&(u+=e)}})),new t(n,i,o,a,u,r)}}]),t}();js.styles="normal|italic|oblique|inherit",js.variants="normal|small-caps|inherit",js.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var Fs=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;Po(this,t),this.x1=e,this.y1=r,this.x2=n,this.y2=i,this.addPoint(e,r),this.addPoint(n,i)}return Eo(t,[{key:"addPoint",value:function(t,e){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}},{key:"addX",value:function(t){this.addPoint(t,null)}},{key:"addY",value:function(t){this.addPoint(null,t)}},{key:"addBoundingBox",value:function(t){if(t){var e=t.x1,r=t.y1,n=t.x2,i=t.y2;this.addPoint(e,r),this.addPoint(n,i)}}},{key:"sumCubic",value:function(t,e,r,n,i){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*n+Math.pow(t,3)*i}},{key:"bezierCurveAdd",value:function(t,e,r,n,i){var o=6*e-12*r+6*n,a=-3*e+9*r-9*n+3*i,u=3*r-3*e;if(0!==a){var s=Math.pow(o,2)-4*u*a;if(!(s<0)){var c=(-o+Math.sqrt(s))/(2*a);0<c&&c<1&&(t?this.addX(this.sumCubic(c,e,r,n,i)):this.addY(this.sumCubic(c,e,r,n,i)));var l=(-o-Math.sqrt(s))/(2*a);0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,r,n,i)):this.addY(this.sumCubic(l,e,r,n,i)))}}else{if(0===o)return;var f=-u/o;0<f&&f<1&&(t?this.addX(this.sumCubic(f,e,r,n,i)):this.addY(this.sumCubic(f,e,r,n,i)))}}},{key:"addBezierCurve",value:function(t,e,r,n,i,o,a,u){this.addPoint(t,e),this.addPoint(a,u),this.bezierCurveAdd(!0,t,r,i,a),this.bezierCurveAdd(!1,e,n,o,u)}},{key:"addQuadraticCurve",value:function(t,e,r,n,i,o){var a=t+2/3*(r-t),u=e+2/3*(n-e),s=a+1/3*(i-t),c=u+1/3*(o-e);this.addBezierCurve(t,e,a,s,u,c,i,o)}},{key:"isPointInBox",value:function(t,e){var r=this.x1,n=this.y1,i=this.x2,o=this.y2;return r<=t&&t<=i&&n<=e&&e<=o}},{key:"x",get:function(){return this.x1}},{key:"y",get:function(){return this.y1}},{key:"width",get:function(){return this.x2-this.x1}},{key:"height",get:function(){return this.y2-this.y1}}]),t}();fe({target:"Array",proto:!0},{fill:function(t){for(var e=p(this),r=Gt(e),n=arguments.length,i=Ht(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,a=void 0===o?r:Ht(o,r);a>i;)e[i++]=t;return e}}),mu("fill");
+/*! *****************************************************************************
+	Copyright (c) Microsoft Corporation.
+
+	Permission to use, copy, modify, and/or distribute this software for any
+	purpose with or without fee is hereby granted.
+
+	THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+	REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+	AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+	INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+	LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+	OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+	PERFORMANCE OF THIS SOFTWARE.
+	***************************************************************************** */
+var zs=function(t,e){return(zs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function Us(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}zs(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Hs(t,e){var r=t[0],n=t[1];return[r*Math.cos(e)-n*Math.sin(e),r*Math.sin(e)+n*Math.cos(e)]}function Xs(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if("number"!=typeof t[r])throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var Ys=Math.PI;function Gs(t,e,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var n=t.rX,i=t.rY,o=t.x,a=t.y;n=Math.abs(t.rX),i=Math.abs(t.rY);var u=Hs([(e-o)/2,(r-a)/2],-t.xRot/180*Ys),s=u[0],c=u[1],l=Math.pow(s,2)/Math.pow(n,2)+Math.pow(c,2)/Math.pow(i,2);1<l&&(n*=Math.sqrt(l),i*=Math.sqrt(l)),t.rX=n,t.rY=i;var f=Math.pow(n,2)*Math.pow(c,2)+Math.pow(i,2)*Math.pow(s,2),h=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(i,2)-f)/f)),p=n*c/i*h,v=-i*s/n*h,y=Hs([p,v],t.xRot/180*Ys);t.cX=y[0]+(e+o)/2,t.cY=y[1]+(r+a)/2,t.phi1=Math.atan2((c-v)/i,(s-p)/n),t.phi2=Math.atan2((-c-v)/i,(-s-p)/n),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*Ys),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*Ys),t.phi1*=180/Ys,t.phi2*=180/Ys}function Ws(t,e,r){Xs(t,e,r);var n=t*t+e*e-r*r;if(0>n)return[];if(0===n)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var i=Math.sqrt(n);return[[(t*r+e*i)/(t*t+e*e),(e*r-t*i)/(t*t+e*e)],[(t*r-e*i)/(t*t+e*e),(e*r+t*i)/(t*t+e*e)]]}var qs,$s=Math.PI/180;function Qs(t,e,r){return(1-r)*t+r*e}function Zs(t,e,r,n){return t+Math.cos(n/180*Ys)*e+Math.sin(n/180*Ys)*r}function Ks(t,e,r,n){var i=1e-6,o=e-t,a=r-e,u=3*o+3*(n-r)-6*a,s=6*(a-o),c=3*o;return Math.abs(u)<i?[-c/s]:function(t,e,r){void 0===r&&(r=1e-6);var n=t*t/4-e;if(n<-r)return[];if(n<=r)return[-t/2];var i=Math.sqrt(n);return[-t/2-i,-t/2+i]}(s/u,c/u,i)}function Js(t,e,r,n,i){var o=1-i;return t*(o*o*o)+e*(3*o*o*i)+r*(3*o*i*i)+n*(i*i*i)}!function(t){function e(){return i((function(t,e,r){return t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=r),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=r),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=r),t.relative=!1),t}))}function r(){var t=NaN,e=NaN,r=NaN,n=NaN;return i((function(i,o,a){return i.type&oc.SMOOTH_CURVE_TO&&(i.type=oc.CURVE_TO,t=isNaN(t)?o:t,e=isNaN(e)?a:e,i.x1=i.relative?o-t:2*o-t,i.y1=i.relative?a-e:2*a-e),i.type&oc.CURVE_TO?(t=i.relative?o+i.x2:i.x2,e=i.relative?a+i.y2:i.y2):(t=NaN,e=NaN),i.type&oc.SMOOTH_QUAD_TO&&(i.type=oc.QUAD_TO,r=isNaN(r)?o:r,n=isNaN(n)?a:n,i.x1=i.relative?o-r:2*o-r,i.y1=i.relative?a-n:2*a-n),i.type&oc.QUAD_TO?(r=i.relative?o+i.x1:i.x1,n=i.relative?a+i.y1:i.y1):(r=NaN,n=NaN),i}))}function n(){var t=NaN,e=NaN;return i((function(r,n,i){if(r.type&oc.SMOOTH_QUAD_TO&&(r.type=oc.QUAD_TO,t=isNaN(t)?n:t,e=isNaN(e)?i:e,r.x1=r.relative?n-t:2*n-t,r.y1=r.relative?i-e:2*i-e),r.type&oc.QUAD_TO){t=r.relative?n+r.x1:r.x1,e=r.relative?i+r.y1:r.y1;var o=r.x1,a=r.y1;r.type=oc.CURVE_TO,r.x1=((r.relative?0:n)+2*o)/3,r.y1=((r.relative?0:i)+2*a)/3,r.x2=(r.x+2*o)/3,r.y2=(r.y+2*a)/3}else t=NaN,e=NaN;return r}))}function i(t){var e=0,r=0,n=NaN,i=NaN;return function(o){if(isNaN(n)&&!(o.type&oc.MOVE_TO))throw new Error("path must start with moveto");var a=t(o,e,r,n,i);return o.type&oc.CLOSE_PATH&&(e=n,r=i),void 0!==o.x&&(e=o.relative?e+o.x:o.x),void 0!==o.y&&(r=o.relative?r+o.y:o.y),o.type&oc.MOVE_TO&&(n=e,i=r),a}}function o(t,e,r,n,o,a){return Xs(t,e,r,n,o,a),i((function(i,u,s,c){var l=i.x1,f=i.x2,h=i.relative&&!isNaN(c),p=void 0!==i.x?i.x:h?0:u,v=void 0!==i.y?i.y:h?0:s;function y(t){return t*t}i.type&oc.HORIZ_LINE_TO&&0!==e&&(i.type=oc.LINE_TO,i.y=i.relative?0:s),i.type&oc.VERT_LINE_TO&&0!==r&&(i.type=oc.LINE_TO,i.x=i.relative?0:u),void 0!==i.x&&(i.x=i.x*t+v*r+(h?0:o)),void 0!==i.y&&(i.y=p*e+i.y*n+(h?0:a)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*r+(h?0:o)),void 0!==i.y1&&(i.y1=l*e+i.y1*n+(h?0:a)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*r+(h?0:o)),void 0!==i.y2&&(i.y2=f*e+i.y2*n+(h?0:a));var d=t*n-e*r;if(void 0!==i.xRot&&(1!==t||0!==e||0!==r||1!==n))if(0===d)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=oc.LINE_TO;else{var g=i.xRot*Math.PI/180,m=Math.sin(g),x=Math.cos(g),b=1/y(i.rX),w=1/y(i.rY),S=y(x)*b+y(m)*w,O=2*m*x*(b-w),k=y(m)*b+y(x)*w,T=S*n*n-O*e*n+k*e*e,A=O*(t*n+e*r)-2*(S*r*n+k*t*e),R=S*r*r-O*t*r+k*t*t,P=(Math.atan2(A,T-R)+Math.PI)%Math.PI/2,E=Math.sin(P),C=Math.cos(P);i.rX=Math.abs(d)/Math.sqrt(T*y(C)+A*E*C+R*y(E)),i.rY=Math.abs(d)/Math.sqrt(T*y(E)-A*E*C+R*y(C)),i.xRot=180*P/Math.PI}return void 0!==i.sweepFlag&&0>d&&(i.sweepFlag=+!i.sweepFlag),i}))}t.ROUND=function(t){function e(e){return Math.round(e*t)/t}return void 0===t&&(t=1e13),Xs(t),function(t){return void 0!==t.x1&&(t.x1=e(t.x1)),void 0!==t.y1&&(t.y1=e(t.y1)),void 0!==t.x2&&(t.x2=e(t.x2)),void 0!==t.y2&&(t.y2=e(t.y2)),void 0!==t.x&&(t.x=e(t.x)),void 0!==t.y&&(t.y=e(t.y)),void 0!==t.rX&&(t.rX=e(t.rX)),void 0!==t.rY&&(t.rY=e(t.rY)),t}},t.TO_ABS=e,t.TO_REL=function(){return i((function(t,e,r){return t.relative||(void 0!==t.x1&&(t.x1-=e),void 0!==t.y1&&(t.y1-=r),void 0!==t.x2&&(t.x2-=e),void 0!==t.y2&&(t.y2-=r),void 0!==t.x&&(t.x-=e),void 0!==t.y&&(t.y-=r),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,e,r){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===r&&(r=!0),i((function(n,i,o,a,u){if(isNaN(a)&&!(n.type&oc.MOVE_TO))throw new Error("path must start with moveto");return e&&n.type&oc.HORIZ_LINE_TO&&(n.type=oc.LINE_TO,n.y=n.relative?0:o),r&&n.type&oc.VERT_LINE_TO&&(n.type=oc.LINE_TO,n.x=n.relative?0:i),t&&n.type&oc.CLOSE_PATH&&(n.type=oc.LINE_TO,n.x=n.relative?a-i:a,n.y=n.relative?u-o:u),n.type&oc.ARC&&(0===n.rX||0===n.rY)&&(n.type=oc.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n}))},t.NORMALIZE_ST=r,t.QT_TO_C=n,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),Xs(t);var e=NaN,r=NaN,n=NaN,o=NaN;return i((function(i,a,u,s,c){var l=Math.abs,f=!1,h=0,p=0;if(i.type&oc.SMOOTH_CURVE_TO&&(h=isNaN(e)?0:a-e,p=isNaN(r)?0:u-r),i.type&(oc.CURVE_TO|oc.SMOOTH_CURVE_TO)?(e=i.relative?a+i.x2:i.x2,r=i.relative?u+i.y2:i.y2):(e=NaN,r=NaN),i.type&oc.SMOOTH_QUAD_TO?(n=isNaN(n)?a:2*a-n,o=isNaN(o)?u:2*u-o):i.type&oc.QUAD_TO?(n=i.relative?a+i.x1:i.x1,o=i.relative?u+i.y1:i.y2):(n=NaN,o=NaN),i.type&oc.LINE_COMMANDS||i.type&oc.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&oc.CURVE_TO||i.type&oc.SMOOTH_CURVE_TO||i.type&oc.QUAD_TO||i.type&oc.SMOOTH_QUAD_TO){var v=void 0===i.x?0:i.relative?i.x:i.x-a,y=void 0===i.y?0:i.relative?i.y:i.y-u;h=isNaN(n)?void 0===i.x1?h:i.relative?i.x:i.x1-a:n-a,p=isNaN(o)?void 0===i.y1?p:i.relative?i.y:i.y1-u:o-u;var d=void 0===i.x2?0:i.relative?i.x:i.x2-a,g=void 0===i.y2?0:i.relative?i.y:i.y2-u;l(v)<=t&&l(y)<=t&&l(h)<=t&&l(p)<=t&&l(d)<=t&&l(g)<=t&&(f=!0)}return i.type&oc.CLOSE_PATH&&l(a-s)<=t&&l(u-c)<=t&&(f=!0),f?[]:i}))},t.MATRIX=o,t.ROTATE=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),Xs(t,e,r);var n=Math.sin(t),i=Math.cos(t);return o(i,n,-n,i,e-e*i+r*n,r-e*n-r*i)},t.TRANSLATE=function(t,e){return void 0===e&&(e=0),Xs(t,e),o(1,0,0,1,t,e)},t.SCALE=function(t,e){return void 0===e&&(e=t),Xs(t,e),o(t,0,0,e,0,0)},t.SKEW_X=function(t){return Xs(t),o(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return Xs(t),o(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),Xs(t),o(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),Xs(t),o(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,e,r){return oc.ARC===t.type?function(t,e,r){var n,i,o,a;t.cX||Gs(t,e,r);for(var u=Math.min(t.phi1,t.phi2),s=Math.max(t.phi1,t.phi2)-u,c=Math.ceil(s/90),l=new Array(c),f=e,h=r,p=0;p<c;p++){var v=Qs(t.phi1,t.phi2,p/c),y=Qs(t.phi1,t.phi2,(p+1)/c),d=y-v,g=4/3*Math.tan(d*$s/4),m=[Math.cos(v*$s)-g*Math.sin(v*$s),Math.sin(v*$s)+g*Math.cos(v*$s)],x=m[0],b=m[1],w=[Math.cos(y*$s),Math.sin(y*$s)],S=w[0],O=w[1],k=[S+g*Math.sin(y*$s),O-g*Math.cos(y*$s)],T=k[0],A=k[1];l[p]={relative:t.relative,type:oc.CURVE_TO};var R=function(e,r){var n=Hs([e*t.rX,r*t.rY],t.xRot),i=n[0],o=n[1];return[t.cX+i,t.cY+o]};n=R(x,b),l[p].x1=n[0],l[p].y1=n[1],i=R(T,A),l[p].x2=i[0],l[p].y2=i[1],o=R(S,O),l[p].x=o[0],l[p].y=o[1],t.relative&&(l[p].x1-=f,l[p].y1-=h,l[p].x2-=f,l[p].y2-=h,l[p].x-=f,l[p].y-=h),f=(a=[l[p].x,l[p].y])[0],h=a[1]}return l}(t,t.relative?0:e,t.relative?0:r):t}))},t.ANNOTATE_ARCS=function(){return i((function(t,e,r){return t.relative&&(e=0,r=0),oc.ARC===t.type&&Gs(t,e,r),t}))},t.CLONE=function(){return function(t){var e={};for(var r in t)e[r]=t[r];return e}},t.CALCULATE_BOUNDS=function(){var t=e(),o=n(),a=r(),u=i((function(e,r,n){var i=a(o(t(function(t){var e={};for(var r in t)e[r]=t[r];return e}(e))));function s(t){t>u.maxX&&(u.maxX=t),t<u.minX&&(u.minX=t)}function c(t){t>u.maxY&&(u.maxY=t),t<u.minY&&(u.minY=t)}if(i.type&oc.DRAWING_COMMANDS&&(s(r),c(n)),i.type&oc.HORIZ_LINE_TO&&s(i.x),i.type&oc.VERT_LINE_TO&&c(i.y),i.type&oc.LINE_TO&&(s(i.x),c(i.y)),i.type&oc.CURVE_TO){s(i.x),c(i.y);for(var l=0,f=Ks(r,i.x1,i.x2,i.x);l<f.length;l++)0<(R=f[l])&&1>R&&s(Js(r,i.x1,i.x2,i.x,R));for(var h=0,p=Ks(n,i.y1,i.y2,i.y);h<p.length;h++)0<(R=p[h])&&1>R&&c(Js(n,i.y1,i.y2,i.y,R))}if(i.type&oc.ARC){s(i.x),c(i.y),Gs(i,r,n);for(var v=i.xRot/180*Math.PI,y=Math.cos(v)*i.rX,d=Math.sin(v)*i.rX,g=-Math.sin(v)*i.rY,m=Math.cos(v)*i.rY,x=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],b=x[0],w=x[1],S=function(t){var e=t[0],r=t[1],n=180*Math.atan2(r,e)/Math.PI;return n<b?n+360:n},O=0,k=Ws(g,-y,0).map(S);O<k.length;O++)(R=k[O])>b&&R<w&&s(Zs(i.cX,y,g,R));for(var T=0,A=Ws(m,-d,0).map(S);T<A.length;T++){var R;(R=A[T])>b&&R<w&&c(Zs(i.cY,d,m,R))}}return e}));return u.minX=1/0,u.maxX=-1/0,u.minY=1/0,u.maxY=-1/0,u}}(qs||(qs={}));var tc,ec=function(){function t(){}return t.prototype.round=function(t){return this.transform(qs.ROUND(t))},t.prototype.toAbs=function(){return this.transform(qs.TO_ABS())},t.prototype.toRel=function(){return this.transform(qs.TO_REL())},t.prototype.normalizeHVZ=function(t,e,r){return this.transform(qs.NORMALIZE_HVZ(t,e,r))},t.prototype.normalizeST=function(){return this.transform(qs.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(qs.QT_TO_C())},t.prototype.aToC=function(){return this.transform(qs.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(qs.SANITIZE(t))},t.prototype.translate=function(t,e){return this.transform(qs.TRANSLATE(t,e))},t.prototype.scale=function(t,e){return this.transform(qs.SCALE(t,e))},t.prototype.rotate=function(t,e,r){return this.transform(qs.ROTATE(t,e,r))},t.prototype.matrix=function(t,e,r,n,i,o){return this.transform(qs.MATRIX(t,e,r,n,i,o))},t.prototype.skewX=function(t){return this.transform(qs.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(qs.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(qs.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(qs.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(qs.ANNOTATE_ARCS())},t}(),rc=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},nc=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},ic=function(t){function e(){var e=t.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return Us(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,e){var r=this;void 0===e&&(e=[]);for(var n=function(t){e.push(t),r.curArgs.length=0,r.canParseCommandOrComma=!0},i=0;i<t.length;i++){var o=t[i],a=!(this.curCommandType!==oc.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),u=nc(o)&&("0"===this.curNumber&&"0"===o||a);if(!nc(o)||u)if("e"!==o&&"E"!==o)if("-"!==o&&"+"!==o||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==o||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var s=Number(this.curNumber);if(isNaN(s))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===oc.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>s)throw new SyntaxError('Expected positive number, got "'+s+'" at index "'+i+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"');this.curArgs.push(s),this.curArgs.length===ac[this.curCommandType]&&(oc.HORIZ_LINE_TO===this.curCommandType?n({type:oc.HORIZ_LINE_TO,relative:this.curCommandRelative,x:s}):oc.VERT_LINE_TO===this.curCommandType?n({type:oc.VERT_LINE_TO,relative:this.curCommandRelative,y:s}):this.curCommandType===oc.MOVE_TO||this.curCommandType===oc.LINE_TO||this.curCommandType===oc.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),oc.MOVE_TO===this.curCommandType&&(this.curCommandType=oc.LINE_TO)):this.curCommandType===oc.CURVE_TO?n({type:oc.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===oc.SMOOTH_CURVE_TO?n({type:oc.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===oc.QUAD_TO?n({type:oc.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===oc.ARC&&n({type:oc.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!rc(o))if(","===o&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==o&&"-"!==o&&"."!==o)if(u)this.curNumber=o,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+o+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==o&&"Z"!==o)if("h"===o||"H"===o)this.curCommandType=oc.HORIZ_LINE_TO,this.curCommandRelative="h"===o;else if("v"===o||"V"===o)this.curCommandType=oc.VERT_LINE_TO,this.curCommandRelative="v"===o;else if("m"===o||"M"===o)this.curCommandType=oc.MOVE_TO,this.curCommandRelative="m"===o;else if("l"===o||"L"===o)this.curCommandType=oc.LINE_TO,this.curCommandRelative="l"===o;else if("c"===o||"C"===o)this.curCommandType=oc.CURVE_TO,this.curCommandRelative="c"===o;else if("s"===o||"S"===o)this.curCommandType=oc.SMOOTH_CURVE_TO,this.curCommandRelative="s"===o;else if("q"===o||"Q"===o)this.curCommandType=oc.QUAD_TO,this.curCommandRelative="q"===o;else if("t"===o||"T"===o)this.curCommandType=oc.SMOOTH_QUAD_TO,this.curCommandRelative="t"===o;else{if("a"!==o&&"A"!==o)throw new SyntaxError('Unexpected character "'+o+'" at index '+i+".");this.curCommandType=oc.ARC,this.curCommandRelative="a"===o}else e.push({type:oc.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=o,this.curNumberHasDecimal="."===o}else this.curNumber+=o,this.curNumberHasDecimal=!0;else this.curNumber+=o;else this.curNumber+=o,this.curNumberHasExp=!0;else this.curNumber+=o,this.curNumberHasExpDigits=this.curNumberHasExp}return e},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(e,r){void 0===r&&(r=[]);for(var n=0,i=Object.getPrototypeOf(this).parse.call(this,e);n<i.length;n++){var o=i[n],a=t(o);Array.isArray(a)?r.push.apply(r,a):r.push(a)}return r}}})},e}(ec),oc=function(t){function e(r){var n=t.call(this)||this;return n.commands="string"==typeof r?e.parse(r):r,n}return Us(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=qs.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var e=[],r=0,n=this.commands;r<n.length;r++){var i=t(n[r]);Array.isArray(i)?e.push.apply(e,i):e.push(i)}return this.commands=e,this},e.encode=function(t){return function(t){var e="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(n.type===oc.CLOSE_PATH)e+="z";else if(n.type===oc.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===oc.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===oc.MOVE_TO)e+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===oc.LINE_TO)e+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===oc.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===oc.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===oc.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===oc.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==oc.ARC)throw new Error('Unexpected command type "'+n.type+'" at index '+r+".");e+=(n.relative?"a":"A")+n.rX+" "+n.rY+" "+n.xRot+" "+ +n.lArcFlag+" "+ +n.sweepFlag+" "+n.x+" "+n.y}}return e}(t)},e.parse=function(t){var e=new ic,r=[];return e.parse(t,r),e.finish(r),r},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(ec),ac=((tc={})[oc.MOVE_TO]=2,tc[oc.LINE_TO]=2,tc[oc.HORIZ_LINE_TO]=1,tc[oc.VERT_LINE_TO]=1,tc[oc.CLOSE_PATH]=0,tc[oc.QUAD_TO]=4,tc[oc.SMOOTH_QUAD_TO]=2,tc[oc.CURVE_TO]=6,tc[oc.SMOOTH_CURVE_TO]=4,tc[oc.ARC]=7,tc);function uc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var sc=function(t){uu(r,t);var e=uc(r);function r(t){var n;return Po(this,r),(n=e.call(this,t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,""))).control=null,n.start=null,n.current=null,n.command=null,n.commands=n.commands,n.i=-1,n.previousCommand=null,n.points=[],n.angles=[],n}return Eo(r,[{key:"reset",value:function(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Ka(0,0),this.control=new Ka(0,0),this.current=new Ka(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){return this.i>=this.commands.length-1}},{key:"next",value:function(){var t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}},{key:"getPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y",r=new Ka(this.command[t],this.command[e]);return this.makeAbsolute(r)}},{key:"getAsControlPoint",value:function(t,e){var r=this.getPoint(t,e);return this.control=r,r}},{key:"getAsCurrentPoint",value:function(t,e){var r=this.getPoint(t,e);return this.current=r,r}},{key:"getReflectedControlPoint",value:function(){var t=this.previousCommand.type;if(t!==oc.CURVE_TO&&t!==oc.SMOOTH_CURVE_TO&&t!==oc.QUAD_TO&&t!==oc.SMOOTH_QUAD_TO)return this.current;var e=this.current,r=e.x,n=e.y,i=this.control,o=i.x,a=i.y;return new Ka(2*r-o,2*n-a)}},{key:"makeAbsolute",value:function(t){if(this.command.relative){var e=this.current,r=e.x,n=e.y;t.x+=r,t.y+=n}return t}},{key:"addMarker",value:function(t,e,r){var n=this.points,i=this.angles;r&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=n[n.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}},{key:"addMarkerAngle",value:function(t,e){this.points.push(t),this.angles.push(e)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var t=this.angles,e=t.length,r=0;r<e;r++)if(!t[r])for(var n=r+1;n<e;n++)if(t[n]){t[r]=t[n];break}return t}}]),r}(oc),cc=St.PROPER,lc="toString",fc=RegExp.prototype,hc=fc.toString,pc=P((function(){return"/a/b"!=hc.call({source:"a",flags:"b"})})),vc=cc&&hc.name!=lc;function yc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}(pc||vc)&&Ot(RegExp.prototype,lc,(function(){var t=H(this),e=En(t.source),r=t.flags;return"/"+e+"/"+En(void 0===r&&t instanceof RegExp&&!("flags"in fc)?Un.call(t):r)}),{unsafe:!0});var dc=function(t){uu(r,t);var e=yc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).modifiedEmSizeStack=!1,t}return Eo(r,[{key:"calculateOpacity",value:function(){for(var t=1,e=this;e;){var r=e.getStyle("opacity",!1,!0);r.hasValue(!0)&&(t*=r.getNumber()),e=e.parent}return t}},{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){var r=this.getStyle("fill"),n=this.getStyle("fill-opacity"),i=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(r.isUrlDefinition()){var a=r.getFillStyleDefinition(this,n);a&&(t.fillStyle=a)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());var u=r.getColor();"inherit"!==u&&(t.fillStyle="none"===u?"rgba(0,0,0,0)":u)}if(n.hasValue()){var s=new Ua(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=s}if(i.isUrlDefinition()){var c=i.getFillStyleDefinition(this,o);c&&(t.strokeStyle=c)}else if(i.hasValue()){"currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor());var l=i.getString();"inherit"!==l&&(t.strokeStyle="none"===l?"rgba(0,0,0,0)":l)}if(o.hasValue()){var f=new Ua(this.document,"stroke",t.strokeStyle).addOpacity(o).getString();t.strokeStyle=f}var h=this.getStyle("stroke-width");if(h.hasValue()){var p=h.getPixels();t.lineWidth=p||yo}var v=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),d=this.getStyle("stroke-miterlimit"),g=this.getStyle("stroke-dasharray"),m=this.getStyle("stroke-dashoffset");if(v.hasValue()&&(t.lineCap=v.getString()),y.hasValue()&&(t.lineJoin=y.getString()),d.hasValue()&&(t.miterLimit=d.getNumber()),g.hasValue()&&"none"!==g.getString()){var x=Yi(g.getString());void 0!==t.setLineDash?t.setLineDash(x):void 0!==t.webkitLineDash?t.webkitLineDash=x:void 0===t.mozDash||1===x.length&&0===x[0]||(t.mozDash=x);var b=m.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=b:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=b:void 0!==t.mozDashOffset&&(t.mozDashOffset=b)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var w=this.getStyle("font"),S=this.getStyle("font-style"),O=this.getStyle("font-variant"),k=this.getStyle("font-weight"),T=this.getStyle("font-size"),A=this.getStyle("font-family"),R=new js(S.getString(),O.getString(),k.getString(),T.hasValue()?"".concat(T.getPixels(!0),"px"):"",A.getString(),js.parse(w.getString(),t.font));S.setValue(R.fontStyle),O.setValue(R.fontVariant),k.setValue(R.fontWeight),T.setValue(R.fontSize),A.setValue(R.fontFamily),t.font=R.toString(),T.isPixels()&&(this.document.emSize=T.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}},{key:"clearContext",value:function(t){Vs(pu(r.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),r}(ps);function gc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var mc=function(t){uu(r,t);var e=gc(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="path",o.pathParser=null,o.pathParser=new sc(o.getAttribute("d").getString()),o}return Eo(r,[{key:"path",value:function(t){var e=this.pathParser,r=new Fs;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case sc.MOVE_TO:this.pathM(t,r);break;case sc.LINE_TO:this.pathL(t,r);break;case sc.HORIZ_LINE_TO:this.pathH(t,r);break;case sc.VERT_LINE_TO:this.pathV(t,r);break;case sc.CURVE_TO:this.pathC(t,r);break;case sc.SMOOTH_CURVE_TO:this.pathS(t,r);break;case sc.QUAD_TO:this.pathQ(t,r);break;case sc.SMOOTH_QUAD_TO:this.pathT(t,r);break;case sc.ARC:this.pathA(t,r);break;case sc.CLOSE_PATH:this.pathZ(t,r)}return r}},{key:"getBoundingBox",value:function(t){return this.path()}},{key:"getMarkers",value:function(){var t=this.pathParser,e=t.getMarkerPoints(),r=t.getMarkerAngles();return e.map((function(t,e){return[t,r[e]]}))}},{key:"renderChildren",value:function(t){this.path(t),this.document.screen.mouse.checkPath(this,t);var e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());var r=this.getMarkers();if(r){var n=r.length-1,i=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),a=this.getStyle("marker-end");if(i.isUrlDefinition()){var u=i.getDefinition(),s=oo(r[0],2),c=s[0],l=s[1];u.render(t,c,l)}if(o.isUrlDefinition())for(var f=o.getDefinition(),h=1;h<n;h++){var p=oo(r[h],2),v=p[0],y=p[1];f.render(t,v,y)}if(a.isUrlDefinition()){var d=a.getDefinition(),g=oo(r[n],2),m=g[0],x=g[1];d.render(t,m,x)}}}},{key:"pathM",value:function(t,e){var n=this.pathParser,i=r.pathM(n).point,o=i.x,a=i.y;n.addMarker(i),e.addPoint(o,a),t&&t.moveTo(o,a)}},{key:"pathL",value:function(t,e){var n=this.pathParser,i=r.pathL(n),o=i.current,a=i.point,u=a.x,s=a.y;n.addMarker(a,o),e.addPoint(u,s),t&&t.lineTo(u,s)}},{key:"pathH",value:function(t,e){var n=this.pathParser,i=r.pathH(n),o=i.current,a=i.point,u=a.x,s=a.y;n.addMarker(a,o),e.addPoint(u,s),t&&t.lineTo(u,s)}},{key:"pathV",value:function(t,e){var n=this.pathParser,i=r.pathV(n),o=i.current,a=i.point,u=a.x,s=a.y;n.addMarker(a,o),e.addPoint(u,s),t&&t.lineTo(u,s)}},{key:"pathC",value:function(t,e){var n=this.pathParser,i=r.pathC(n),o=i.current,a=i.point,u=i.controlPoint,s=i.currentPoint;n.addMarker(s,u,a),e.addBezierCurve(o.x,o.y,a.x,a.y,u.x,u.y,s.x,s.y),t&&t.bezierCurveTo(a.x,a.y,u.x,u.y,s.x,s.y)}},{key:"pathS",value:function(t,e){var n=this.pathParser,i=r.pathS(n),o=i.current,a=i.point,u=i.controlPoint,s=i.currentPoint;n.addMarker(s,u,a),e.addBezierCurve(o.x,o.y,a.x,a.y,u.x,u.y,s.x,s.y),t&&t.bezierCurveTo(a.x,a.y,u.x,u.y,s.x,s.y)}},{key:"pathQ",value:function(t,e){var n=this.pathParser,i=r.pathQ(n),o=i.current,a=i.controlPoint,u=i.currentPoint;n.addMarker(u,a,a),e.addQuadraticCurve(o.x,o.y,a.x,a.y,u.x,u.y),t&&t.quadraticCurveTo(a.x,a.y,u.x,u.y)}},{key:"pathT",value:function(t,e){var n=this.pathParser,i=r.pathT(n),o=i.current,a=i.controlPoint,u=i.currentPoint;n.addMarker(u,a,a),e.addQuadraticCurve(o.x,o.y,a.x,a.y,u.x,u.y),t&&t.quadraticCurveTo(a.x,a.y,u.x,u.y)}},{key:"pathA",value:function(t,e){var n=this.pathParser,i=r.pathA(n),o=i.currentPoint,a=i.rX,u=i.rY,s=i.sweepFlag,c=i.xAxisRotation,l=i.centp,f=i.a1,h=i.ad,p=1-s?1:-1,v=f+p*(h/2),y=new Ka(l.x+a*Math.cos(v),l.y+u*Math.sin(v));if(n.addMarkerAngle(y,v-p*Math.PI/2),n.addMarkerAngle(o,v-p*Math.PI),e.addPoint(o.x,o.y),t&&!isNaN(f)&&!isNaN(h)){var d=a>u?a:u,g=a>u?1:a/u,m=a>u?u/a:1;t.translate(l.x,l.y),t.rotate(c),t.scale(g,m),t.arc(0,0,d,f,f+h,Boolean(1-s)),t.scale(1/g,1/m),t.rotate(-c),t.translate(-l.x,-l.y)}}},{key:"pathZ",value:function(t,e){r.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}}],[{key:"pathM",value:function(t){var e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}},{key:"pathL",value:function(t){return{current:t.current,point:t.getAsCurrentPoint()}}},{key:"pathH",value:function(t){var e=t.current,r=t.command,n=new Ka((r.relative?e.x:0)+r.x,e.y);return t.current=n,{current:e,point:n}}},{key:"pathV",value:function(t){var e=t.current,r=t.command,n=new Ka(e.x,(r.relative?e.y:0)+r.y);return t.current=n,{current:e,point:n}}},{key:"pathC",value:function(t){return{current:t.current,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathS",value:function(t){return{current:t.current,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathQ",value:function(t){return{current:t.current,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()}}},{key:"pathT",value:function(t){var e=t.current,r=t.getReflectedControlPoint();return t.control=r,{current:e,controlPoint:r,currentPoint:t.getAsCurrentPoint()}}},{key:"pathA",value:function(t){var e=t.current,r=t.command,n=r.rX,i=r.rY,o=r.xRot,a=r.lArcFlag,u=r.sweepFlag,s=o*(Math.PI/180),c=t.getAsCurrentPoint(),l=new Ka(Math.cos(s)*(e.x-c.x)/2+Math.sin(s)*(e.y-c.y)/2,-Math.sin(s)*(e.x-c.x)/2+Math.cos(s)*(e.y-c.y)/2),f=Math.pow(l.x,2)/Math.pow(n,2)+Math.pow(l.y,2)/Math.pow(i,2);f>1&&(n*=Math.sqrt(f),i*=Math.sqrt(f));var h=(a===u?-1:1)*Math.sqrt((Math.pow(n,2)*Math.pow(i,2)-Math.pow(n,2)*Math.pow(l.y,2)-Math.pow(i,2)*Math.pow(l.x,2))/(Math.pow(n,2)*Math.pow(l.y,2)+Math.pow(i,2)*Math.pow(l.x,2)));isNaN(h)&&(h=0);var p=new Ka(h*n*l.y/i,h*-i*l.x/n),v=new Ka((e.x+c.x)/2+Math.cos(s)*p.x-Math.sin(s)*p.y,(e.y+c.y)/2+Math.sin(s)*p.x+Math.cos(s)*p.y),y=xo([1,0],[(l.x-p.x)/n,(l.y-p.y)/i]),d=[(l.x-p.x)/n,(l.y-p.y)/i],g=[(-l.x-p.x)/n,(-l.y-p.y)/i],m=xo(d,g);return mo(d,g)<=-1&&(m=Math.PI),mo(d,g)>=1&&(m=0),{currentPoint:c,rX:n,rY:i,sweepFlag:u,xAxisRotation:s,centp:v,a1:y,ad:m}}},{key:"pathZ",value:function(t){t.current=t.start}}]),r}(dc);function xc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var bc=function(t){uu(r,t);var e=xc(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="glyph",o.horizAdvX=o.getAttribute("horiz-adv-x").getNumber(),o.unicode=o.getAttribute("unicode").getString(),o.arabicForm=o.getAttribute("arabic-form").getString(),o}return r}(mc);function wc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Sc=function(t){uu(r,t);var e=wc(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,(this instanceof r?this.constructor:void 0)===r||i)).type="text",o.x=0,o.y=0,o.measureCache=-1,o}return Eo(r,[{key:"setContext",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Vs(pu(r.prototype),"setContext",this).call(this,t,e);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(t.textBaseline=n)}},{key:"initializeCoordinates",value:function(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}},{key:"getBoundingBox",value:function(t){var e=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);var r=null;return this.children.forEach((function(n,i){var o=e.getChildBoundingBox(t,e,e,i);r?r.addBoundingBox(o):r=o})),r}},{key:"getFontSize",value:function(){var t=this.document,e=this.parent,r=js.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(r)}},{key:"getTElementBoundingBox",value:function(t){var e=this.getFontSize();return new Fs(this.x,this.y-e,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function(t,e,r){var n=e[r],i=null;if(t.isArabic){var o=e.length,a=e[r-1],u=e[r+1],s="isolated";if((0===r||" "===a)&&r<o-1&&" "!==u&&(s="terminal"),r>0&&" "!==a&&r<o-1&&" "!==u&&(s="medial"),r>0&&" "!==a&&(r===o-1||" "===u)&&(s="initial"),void 0!==t.glyphs[n]){var c=t.glyphs[n];i=c instanceof bc?c:c[s]}}else i=t.glyphs[n];return i||(i=t.missingGlyph),i}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),n=r.indexOf(e),i=r.length-1,o=Ui(e.textContent||"");return 0===n&&(o=Hi(o)),n===i&&(o=Xi(o)),o}},{key:"renderChildren",value:function(t){var e=this;if("text"===this.type){this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach((function(r,n){e.renderChild(t,e,e,n)}));var r=this.document.screen.mouse;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}},{key:"renderTElementChildren",value:function(t){var e=this.document,r=this.parent,n=this.getText(),i=r.getStyle("font-family").getDefinition();if(i)for(var o=i.fontFace.unitsPerEm,a=js.parse(e.ctx.font),u=r.getStyle("font-size").getNumber(a.fontSize),s=r.getStyle("font-style").getString(a.fontStyle),c=u/o,l=i.isRTL?n.split("").reverse().join(""):n,f=Yi(r.getAttribute("dx").getString()),h=l.length,p=0;p<h;p++){var v=this.getGlyph(i,l,p);t.translate(this.x,this.y),t.scale(c,-c);var y=t.lineWidth;t.lineWidth=t.lineWidth*o/u,"italic"===s&&t.transform(1,0,.4,1,0,0),v.render(t),"italic"===s&&t.transform(1,0,-.4,1,0,0),t.lineWidth=y,t.scale(1/c,-1/c),t.translate(-this.x,-this.y),this.x+=u*(v.horizAdvX||i.horizAdvX)/o,void 0===f[p]||isNaN(f[p])||(this.x+=f[p])}else{var d=this.x,g=this.y;t.fillStyle&&t.fillText(n,d,g),t.strokeStyle&&t.strokeText(n,d,g)}}},{key:"applyAnchoring",value:function(){if(!(this.textChunkStart>=this.leafTexts.length)){var t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start"),r=0;r="start"===e?t.x-this.minX:"end"===e?t.x-this.maxX:t.x-(this.minX+this.maxX)/2;for(var n=this.textChunkStart;n<this.leafTexts.length;n++)this.leafTexts[n].x+=r;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}},{key:"adjustChildCoordinatesRecursive",value:function(t){var e=this;this.children.forEach((function(r,n){e.adjustChildCoordinatesRecursiveCore(t,e,e,n)})),this.applyAnchoring()}},{key:"adjustChildCoordinatesRecursiveCore",value:function(t,e,r,n){var i=r.children[n];i.children.length>0?i.children.forEach((function(r,n){e.adjustChildCoordinatesRecursiveCore(t,e,i,n)})):this.adjustChildCoordinates(t,e,r,n)}},{key:"adjustChildCoordinates",value:function(t,e,r,n){var i=r.children[n];if("function"!=typeof i.measureText)return i;t.save(),i.setContext(t,!0);var o=i.getAttribute("x"),a=i.getAttribute("y"),u=i.getAttribute("dx"),s=i.getAttribute("dy"),c=i.getStyle("font-family").getDefinition(),l=Boolean(c)&&c.isRTL;0===n&&(o.hasValue()||o.setValue(i.getInheritedAttribute("x")),a.hasValue()||a.setValue(i.getInheritedAttribute("y")),u.hasValue()||u.setValue(i.getInheritedAttribute("dx")),s.hasValue()||s.setValue(i.getInheritedAttribute("dy")));var f=i.measureText(t);return l&&(e.x-=f),o.hasValue()?(e.applyAnchoring(),i.x=o.getPixels("x"),u.hasValue()&&(i.x+=u.getPixels("x"))):(u.hasValue()&&(e.x+=u.getPixels("x")),i.x=e.x),e.x=i.x,l||(e.x+=f),a.hasValue()?(i.y=a.getPixels("y"),s.hasValue()&&(i.y+=s.getPixels("y"))):(s.hasValue()&&(e.y+=s.getPixels("y")),i.y=e.y),e.y=i.y,e.leafTexts.push(i),e.minX=Math.min(e.minX,i.x,i.x+f),e.maxX=Math.max(e.maxX,i.x,i.x+f),i.clearContext(t),t.restore(),i}},{key:"getChildBoundingBox",value:function(t,e,r,n){var i=r.children[n];if("function"!=typeof i.getBoundingBox)return null;var o=i.getBoundingBox(t);return o?(i.children.forEach((function(r,n){var a=e.getChildBoundingBox(t,e,i,n);o.addBoundingBox(a)})),o):null}},{key:"renderChild",value:function(t,e,r,n){var i=r.children[n];i.render(t),i.children.forEach((function(r,n){e.renderChild(t,e,i,n)}))}},{key:"measureText",value:function(t){var e=this.measureCache;if(~e)return e;var r=this.getText(),n=this.measureTargetText(t,r);return this.measureCache=n,n}},{key:"measureTargetText",value:function(t,e){if(!e.length)return 0;var r=this.parent,n=r.getStyle("font-family").getDefinition();if(n){for(var i=this.getFontSize(),o=n.isRTL?e.split("").reverse().join(""):e,a=Yi(r.getAttribute("dx").getString()),u=o.length,s=0,c=0;c<u;c++){s+=(this.getGlyph(n,o,c).horizAdvX||n.horizAdvX)*i/n.fontFace.unitsPerEm,void 0===a[c]||isNaN(a[c])||(s+=a[c])}return s}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);var l=t.measureText(e).width;return this.clearContext(t),t.restore(),l}},{key:"getInheritedAttribute",value:function(t){for(var e=this;e instanceof r&&e.isFirstChild();){var n=e.parent.getAttribute(t);if(n.hasValue(!0))return n.getValue("0");e=e.parent}return null}}]),r}(dc);function Oc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var kc=function(t){uu(r,t);var e=Oc(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,(this instanceof r?this.constructor:void 0)===r||i)).type="tspan",o.text=o.children.length>0?"":o.getTextFromNode(),o}return Eo(r,[{key:"getText",value:function(){return this.text}}]),r}(Sc);function Tc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Ac=function(t){uu(r,t);var e=Tc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="textNode",t}return r}(kc);function Rc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Pc=function(t){uu(r,t);var e=Rc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="svg",t.root=!1,t}return Eo(r,[{key:"setContext",value:function(t){var e,n=this.document,i=n.screen,o=n.window,a=t.canvas;if(i.setDefaults(t),a.style&&void 0!==t.font&&o&&void 0!==o.getComputedStyle){t.font=o.getComputedStyle(a).getPropertyValue("font");var u=new Ua(n,"fontSize",js.parse(t.font).fontSize);u.hasValue()&&(n.rootEmSize=u.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var s=i.viewPort,c=s.width,l=s.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var f=this.getAttribute("refX"),h=this.getAttribute("refY"),p=this.getAttribute("viewBox"),v=p.hasValue()?Yi(p.getString()):null,y=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden"),d=0,g=0,m=0,x=0;v&&(d=v[0],g=v[1]),this.root||(c=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),"marker"===this.type&&(m=d,x=g,d=0,g=0)),i.viewPort.setCurrent(c,l),!this.node||this.parent&&"foreignObject"!==(null===(e=this.node.parentNode)||void 0===e?void 0:e.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),Vs(pu(r.prototype),"setContext",this).call(this,t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),v&&(c=v[2],l=v[3]),n.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:c,height:i.viewPort.height,desiredHeight:l,minX:d,minY:g,refX:f.getValue(),refY:h.getValue(),clip:y,clipX:m,clipY:x}),v&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(c,l))}},{key:"clearContext",value:function(t){Vs(pu(r.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent()}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.getAttribute("width",!0),i=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),a=this.getAttribute("style"),u=n.getNumber(0),s=i.getNumber(0);if(r)if("string"==typeof r)this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var c=this.getAttribute("preserveAspectRatio");c.hasValue()&&c.setValue(c.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(t),i.setValue(e),o.hasValue()||o.setValue("0 0 ".concat(u||t," ").concat(s||e)),a.hasValue()){var l=this.getStyle("width"),f=this.getStyle("height");l.hasValue()&&l.setValue("".concat(t,"px")),f.hasValue()&&f.setValue("".concat(e,"px"))}}}]),r}(dc);function Ec(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Cc=function(t){uu(r,t);var e=Ec(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="rect",t}return Eo(r,[{key:"path",value:function(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width",!1,!0).getPixels("x"),i=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),a=this.getAttribute("ry"),u=o.getPixels("x"),s=a.getPixels("y");if(o.hasValue()&&!a.hasValue()&&(s=u),a.hasValue()&&!o.hasValue()&&(u=s),u=Math.min(u,n/2),s=Math.min(s,i/2),t){var c=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&n>0&&(t.moveTo(e+u,r),t.lineTo(e+n-u,r),t.bezierCurveTo(e+n-u+c*u,r,e+n,r+s-c*s,e+n,r+s),t.lineTo(e+n,r+i-s),t.bezierCurveTo(e+n,r+i-s+c*s,e+n-u+c*u,r+i,e+n-u,r+i),t.lineTo(e+u,r+i),t.bezierCurveTo(e+u-c*u,r+i,e,r+i-s+c*s,e,r+i-s),t.lineTo(e,r+s),t.bezierCurveTo(e,r+s-c*s,e+u-c*u,r,e+u,r),t.closePath())}return new Fs(e,r,e+n,r+i)}},{key:"getMarkers",value:function(){return null}}]),r}(mc);function Mc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Nc=function(t){uu(r,t);var e=Mc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="circle",t}return Eo(r,[{key:"path",value:function(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return t&&n>0&&(t.beginPath(),t.arc(e,r,n,0,2*Math.PI,!1),t.closePath()),new Fs(e-n,r-n,e+n,r+n)}},{key:"getMarkers",value:function(){return null}}]),r}(mc);function _c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Ic=function(t){uu(r,t);var e=_c(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="ellipse",t}return Eo(r,[{key:"path",value:function(t){var e=(Math.sqrt(2)-1)/3*4,r=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return t&&r>0&&n>0&&(t.beginPath(),t.moveTo(i+r,o),t.bezierCurveTo(i+r,o+e*n,i+e*r,o+n,i,o+n),t.bezierCurveTo(i-e*r,o+n,i-r,o+e*n,i-r,o),t.bezierCurveTo(i-r,o-e*n,i-e*r,o-n,i,o-n),t.bezierCurveTo(i+e*r,o-n,i+r,o-e*n,i+r,o),t.closePath()),new Fs(i-r,o-n,i+r,o+n)}},{key:"getMarkers",value:function(){return null}}]),r}(mc);function Vc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Lc=function(t){uu(r,t);var e=Vc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="line",t}return Eo(r,[{key:"getPoints",value:function(){return[new Ka(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Ka(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(t){var e=this.getPoints(),r=oo(e,2),n=r[0],i=n.x,o=n.y,a=r[1],u=a.x,s=a.y;return t&&(t.beginPath(),t.moveTo(i,o),t.lineTo(u,s)),new Fs(i,o,u,s)}},{key:"getMarkers",value:function(){var t=this.getPoints(),e=oo(t,2),r=e[0],n=e[1],i=r.angleTo(n);return[[r,i],[n,i]]}}]),r}(mc);function Bc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Dc=function(t){uu(r,t);var e=Bc(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="polyline",o.points=[],o.points=Ka.parsePath(o.getAttribute("points").getString()),o}return Eo(r,[{key:"path",value:function(t){var e=this.points,r=oo(e,1)[0],n=r.x,i=r.y,o=new Fs(n,i);return t&&(t.beginPath(),t.moveTo(n,i)),e.forEach((function(e){var r=e.x,n=e.y;o.addPoint(r,n),t&&t.lineTo(r,n)})),o}},{key:"getMarkers",value:function(){var t=this.points,e=t.length-1,r=[];return t.forEach((function(n,i){i!==e&&r.push([n,n.angleTo(t[i+1])])})),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}]),r}(mc);function jc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Fc=function(t){uu(r,t);var e=jc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="polygon",t}return Eo(r,[{key:"path",value:function(t){var e=Vs(pu(r.prototype),"path",this).call(this,t),n=oo(this.points,1)[0],i=n.x,o=n.y;return t&&(t.lineTo(i,o),t.closePath()),e}}]),r}(Dc);function zc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Uc=function(t){uu(r,t);var e=zc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="pattern",t}return Eo(r,[{key:"createPattern",value:function(t,e,r){var n=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),o=new Pc(this.document,null);o.attributes.viewBox=new Ua(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new Ua(this.document,"width","".concat(n,"px")),o.attributes.height=new Ua(this.document,"height","".concat(i,"px")),o.attributes.transform=new Ua(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var a=this.document.createCanvas(n,i),u=a.getContext("2d"),s=this.getAttribute("x"),c=this.getAttribute("y");s.hasValue()&&c.hasValue()&&u.translate(s.getPixels("x",!0),c.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var l=-1;l<=1;l++)for(var f=-1;f<=1;f++)u.save(),o.attributes.x=new Ua(this.document,"x",l*a.width),o.attributes.y=new Ua(this.document,"y",f*a.height),o.render(u),u.restore();return t.createPattern(a,"repeat")}}]),r}(ps);function Hc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Xc=function(t){uu(r,t);var e=Hc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="marker",t}return Eo(r,[{key:"render",value:function(t,e,r){if(e){var n=e.x,i=e.y,o=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(n,i),"auto"===o&&t.rotate(r),"strokeWidth"===a&&t.scale(t.lineWidth,t.lineWidth),t.save();var u=new Pc(this.document,null);u.type=this.type,u.attributes.viewBox=new Ua(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.refX=new Ua(this.document,"refX",this.getAttribute("refX").getValue()),u.attributes.refY=new Ua(this.document,"refY",this.getAttribute("refY").getValue()),u.attributes.width=new Ua(this.document,"width",this.getAttribute("markerWidth").getValue()),u.attributes.height=new Ua(this.document,"height",this.getAttribute("markerHeight").getValue()),u.attributes.overflow=new Ua(this.document,"overflow",this.getAttribute("overflow").getValue()),u.attributes.fill=new Ua(this.document,"fill",this.getAttribute("fill").getColor("black")),u.attributes.stroke=new Ua(this.document,"stroke",this.getAttribute("stroke").getValue("none")),u.children=this.children,u.render(t),t.restore(),"strokeWidth"===a&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===o&&t.rotate(-r),t.translate(-n,-i)}}}]),r}(ps);function Yc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Gc=function(t){uu(r,t);var e=Yc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="defs",t}return Eo(r,[{key:"render",value:function(){}}]),r}(ps);function Wc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var qc=function(t){uu(r,t);var e=Wc(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="g",t}return Eo(r,[{key:"getBoundingBox",value:function(t){var e=new Fs;return this.children.forEach((function(r){e.addBoundingBox(r.getBoundingBox(t))})),e}}]),r}(dc);function $c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Qc=function(t){uu(r,t);var e=$c(r);function r(t,n,i){var o;Po(this,r),(o=e.call(this,t,n,i)).attributesToInherit=["gradientUnits"],o.stops=[];var a=lu(o),u=a.stops;return a.children.forEach((function(t){"stop"===t.type&&u.push(t)})),o}return Eo(r,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(t,e,r){var n=this,i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var o=i.stops,a=this.getGradient(t,e);if(!a)return this.addParentOpacity(r,o[o.length-1].color);if(o.forEach((function(t){a.addColorStop(t.offset,n.addParentOpacity(r,t.color))})),this.getAttribute("gradientTransform").hasValue()){var u=this.document,s=u.screen,c=s.MAX_VIRTUAL_PIXELS,l=s.viewPort,f=oo(l.viewPorts,1)[0],h=new Cc(u,null);h.attributes.x=new Ua(u,"x",-c/3),h.attributes.y=new Ua(u,"y",-c/3),h.attributes.width=new Ua(u,"width",c),h.attributes.height=new Ua(u,"height",c);var p=new qc(u,null);p.attributes.transform=new Ua(u,"transform",this.getAttribute("gradientTransform").getValue()),p.children=[h];var v=new Pc(u,null);v.attributes.x=new Ua(u,"x",0),v.attributes.y=new Ua(u,"y",0),v.attributes.width=new Ua(u,"width",f.width),v.attributes.height=new Ua(u,"height",f.height),v.children=[p];var y=u.createCanvas(f.width,f.height),d=y.getContext("2d");return d.fillStyle=a,v.render(d),d.createPattern(y,"no-repeat")}return a}},{key:"inheritStopContainer",value:function(t){var e=this;this.attributesToInherit.forEach((function(r){!e.getAttribute(r).hasValue()&&t.getAttribute(r).hasValue()&&e.getAttribute(r,!0).setValue(t.getAttribute(r).getValue())}))}},{key:"addParentOpacity",value:function(t,e){return t.hasValue()?new Ua(this.document,"color",e).addOpacity(t).getColor():e}}]),r}(ps);function Zc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Kc=function(t){uu(r,t);var e=Zc(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="linearGradient",o.attributesToInherit.push("x1","y1","x2","y2"),o}return Eo(r,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=r?e.getBoundingBox(t):null;if(r&&!n)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var i=r?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=r?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=r?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),u=r?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===a&&o===u?null:t.createLinearGradient(i,o,a,u)}}]),r}(Qc);function Jc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var tl=function(t){uu(r,t);var e=Jc(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="radialGradient",o.attributesToInherit.push("cx","cy","r","fx","fy","fr"),o}return Eo(r,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=e.getBoundingBox(t);if(r&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var i=r?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=r?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),a=i,u=o;this.getAttribute("fx").hasValue()&&(a=r?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(u=r?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var s=r?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),c=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,u,c,i,o,s)}}]),r}(Qc);function el(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var rl=function(t){uu(r,t);var e=el(r);function r(t,n,i){var o;Po(this,r),(o=e.call(this,t,n,i)).type="stop";var a=Math.max(0,Math.min(1,o.getAttribute("offset").getNumber())),u=o.getStyle("stop-opacity"),s=o.getStyle("stop-color",!0);return""===s.getString()&&s.setValue("#000"),u.hasValue()&&(s=s.addOpacity(u)),o.offset=a,o.color=s.getColor(),o}return r}(ps),nl="Array Iterator",il=mt.set,ol=mt.getterFor(nl),al=Wu(Array,"Array",(function(t,e){il(this,{type:nl,target:Vt(t),index:0,kind:e})}),(function(){var t=ol(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");we.Arguments=we.Array,mu("keys"),mu("values"),mu("entries");var ul=I("iterator"),sl=I("toStringTag"),cl=al.values,ll=function(t,e){if(t){if(t[ul]!==cl)try{tt(t,ul,cl)}catch(e){t[ul]=cl}if(t[sl]||tt(t,sl,e),Ga[e])for(var r in al)if(t[r]!==al[r])try{tt(t,r,al[r])}catch(e){t[r]=al[r]}}};for(var fl in Ga)ll(u[fl]&&u[fl].prototype,fl);function hl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}ll($a,"DOMTokenList");var pl=function(t){uu(r,t);var e=hl(r);function r(t,n,i){var o;Po(this,r),(o=e.call(this,t,n,i)).type="animate",o.duration=0,o.initialValue=null,o.initialUnits="",o.removed=!1,o.frozen=!1,t.screen.animations.push(lu(o)),o.begin=o.getAttribute("begin").getMilliseconds(),o.maxDuration=o.begin+o.getAttribute("dur").getMilliseconds(),o.from=o.getAttribute("from"),o.to=o.getAttribute("to"),o.values=new Ua(t,"values",null);var a=o.getAttribute("values");return a.hasValue()&&o.values.setValue(a.getString().split(";")),o}return Eo(r,[{key:"getProperty",value:function(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}},{key:"calcValue",value:function(){var t=this.initialUnits,e=this.getProgress(),r=e.progress,n=e.from,i=e.to,o=n.getNumber()+(i.getNumber()-n.getNumber())*r;return"%"===t&&(o*=100),"".concat(o).concat(t)}},{key:"update",value:function(t){var e=this.parent,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==n||this.frozen){if("remove"===n&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();return!1}this.duration+=t;var i=!1;if(this.begin<this.duration){var o=this.calcValue(),a=this.getAttribute("type");if(a.hasValue()){var u=a.getString();o="".concat(u,"(").concat(o,")")}r.setValue(o),i=!0}return i}},{key:"getProgress",value:function(){var t=this.document,e=this.values,r={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(e.hasValue()){var n=r.progress*(e.getValue().length-1),i=Math.floor(n),o=Math.ceil(n);r.from=new Ua(t,"from",parseFloat(e.getValue()[i])),r.to=new Ua(t,"to",parseFloat(e.getValue()[o])),r.progress=(n-i)/(o-i)}else r.from=this.from,r.to=this.to;return r}}]),r}(ps);function vl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var yl=function(t){uu(r,t);var e=vl(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="animateColor",t}return Eo(r,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=new za(r.getColor()),o=new za(n.getColor());if(i.ok&&o.ok){var a=i.r+(o.r-i.r)*e,u=i.g+(o.g-i.g)*e,s=i.b+(o.b-i.b)*e;return"rgb(".concat(Math.floor(a),", ").concat(Math.floor(u),", ").concat(Math.floor(s),")")}return this.getAttribute("from").getColor()}}]),r}(pl);function dl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var gl=function(t){uu(r,t);var e=dl(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="animateTransform",t}return Eo(r,[{key:"calcValue",value:function(){var t=this.getProgress(),e=t.progress,r=t.from,n=t.to,i=Yi(r.getString()),o=Yi(n.getString());return i.map((function(t,r){return t+(o[r]-t)*e})).join(" ")}}]),r}(pl);function ml(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return xl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xl(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}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 o,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function xl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var wl=function(t){uu(r,t);var e=bl(r);function r(t,n,i){var o;Po(this,r),(o=e.call(this,t,n,i)).type="font",o.glyphs={},o.horizAdvX=o.getAttribute("horiz-adv-x").getNumber();var a,u=t.definitions,s=ml(lu(o).children);try{for(s.s();!(a=s.n()).done;){var c=a.value;switch(c.type){case"font-face":o.fontFace=c;var l=c.getStyle("font-family");l.hasValue()&&(u[l.getString()]=lu(o));break;case"missing-glyph":o.missingGlyph=c;break;case"glyph":var f=c;f.arabicForm?(o.isRTL=!0,o.isArabic=!0,void 0===o.glyphs[f.unicode]&&(o.glyphs[f.unicode]={}),o.glyphs[f.unicode][f.arabicForm]=f):o.glyphs[f.unicode]=f}}}catch(t){s.e(t)}finally{s.f()}return o}return Eo(r,[{key:"render",value:function(){}}]),r}(ps);function Sl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Ol=function(t){uu(r,t);var e=Sl(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="font-face",o.ascent=o.getAttribute("ascent").getNumber(),o.descent=o.getAttribute("descent").getNumber(),o.unitsPerEm=o.getAttribute("units-per-em").getNumber(),o}return r}(ps);function kl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Tl=function(t){uu(r,t);var e=kl(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="missing-glyph",t.horizAdvX=0,t}return r}(mc);function Al(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Rl=function(t){uu(r,t);var e=Al(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="tref",t}return Eo(r,[{key:"getText",value:function(){var t=this.getHrefAttribute().getDefinition();if(t){var e=t.children[0];if(e)return e.getText()}return""}}]),r}(Sc);function Pl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var El=function(t){uu(r,t);var e=Pl(r);function r(t,n,i){var o;Po(this,r),(o=e.call(this,t,n,i)).type="a";var a=n.childNodes,u=a[0],s=a.length>0&&Array.from(a).every((function(t){return 3===t.nodeType}));return o.hasText=s,o.text=s?o.getTextFromNode(u):"",o}return Eo(r,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(t){if(this.hasText){Vs(pu(r.prototype),"renderChildren",this).call(this,t);var e=this.document,n=this.x,i=this.y,o=e.screen.mouse,a=new Ua(e,"fontSize",js.parse(e.ctx.font).fontSize);o.isWorking()&&o.checkBoundingBox(this,new Fs(n,i-a.getPixels("y"),n+this.measureText(t),i))}else if(this.children.length>0){var u=new qc(this.document,null);u.children=this.children,u.parent=this,u.render(t)}}},{key:"onClick",value:function(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){this.document.ctx.canvas.style.cursor="pointer"}}]),r}(Sc),Cl=Jt.f,Ml={}.toString,Nl="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],_l={f:function(t){return Nl&&"[object Window]"==Ml.call(t)?function(t){try{return Cl(t)}catch(t){return Nl.slice()}}(t):Cl(Vt(t))}},Il=!P((function(){return Object.isExtensible(Object.preventExtensions({}))})),Vl=n((function(t){var e=K.f,r=!1,n=m("meta"),i=0,o=Object.isExtensible||function(){return!0},a=function(t){e(t,n,{value:{objectID:"O"+i++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=Jt.f,e=[].splice,i={};i[n]=1,t(i).length&&(Jt.f=function(r){for(var i=t(r),o=0,a=i.length;o<a;o++)if(i[o]===n){e.call(i,o,1);break}return i},fe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:_l.f}))},fastKey:function(t,e){if(!D(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!y(t,n)){if(!o(t))return"F";if(!e)return"E";a(t)}return t[n].objectID},getWeakData:function(t,e){if(!y(t,n)){if(!o(t))return!0;if(!e)return!1;a(t)}return t[n].weakData},onFreeze:function(t){return Il&&r&&o(t)&&!y(t,n)&&a(t),t}};lt[n]=!0})),Ll=K.f,Bl=Vl.fastKey,Dl=mt.set,jl=mt.getterFor;function Fl(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return zl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zl(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}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 o,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function zl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ul(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ul(Object(r),!0).forEach((function(e){Ro(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ul(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}!function(t,e,r){var n=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),o=n?"set":"add",a=u[t],s=a&&a.prototype,c=a,l={},f=function(t){var e=s[t];Ot(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!D(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return i&&!D(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!D(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(ce(t,!x(a)||!(i||s.forEach&&!P((function(){(new a).entries().next()})))))c=r.getConstructor(e,t,n,o),Vl.enable();else if(ce(t,!0)){var h=new c,p=h[o](i?{}:-0,1)!=h,v=P((function(){h.has(1)})),y=Fe((function(t){new a(t)})),d=!i&&P((function(){for(var t=new a,e=5;e--;)t[o](e,e);return!t.has(-0)}));y||((c=e((function(e,r){be(e,c,t);var i=ms(new a,e,c);return null!=r&&Me(r,i[o],{that:i,AS_ENTRIES:n}),i}))).prototype=s,s.constructor=c),(v||d)&&(f("delete"),f("has"),n&&f("get")),(d||p)&&f(o),i&&s.clear&&delete s.clear}l[t]=c,fe({global:!0,forced:c!=a},l),ge(c,t),i||r.setStrong(c,t,n)}("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,e,r,n){var i=t((function(t,o){be(t,i,e),Dl(t,{type:e,index:ti(null),first:void 0,last:void 0,size:0}),B||(t.size=0),null!=o&&Me(o,t[n],{that:t,AS_ENTRIES:r})})),o=jl(e),a=function(t,e,r){var n,i,a=o(t),s=u(t,e);return s?s.value=r:(a.last=s={index:i=Bl(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),B?a.size++:t.size++,"F"!==i&&(a.index[i]=s)),t},u=function(t,e){var r,n=o(t),i=Bl(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==e)return r};return pe(i.prototype,{clear:function(){for(var t=o(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,B?t.size=0:this.size=0},delete:function(t){var e=this,r=o(e),n=u(e,t);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first==n&&(r.first=i),r.last==n&&(r.last=a),B?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=o(this),n=Te(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),pe(i.prototype,r?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),B&&Ll(i.prototype,"size",{get:function(){return o(this).size}}),i},setStrong:function(t,e,r){var n=e+" Iterator",i=jl(e),o=jl(n);Wu(t,e,(function(t,e){Dl(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),xe(e)}});var Yl=function(t){uu(r,t);var e=Xl(r);function r(t,n,i){var o;Po(this,r),(o=e.call(this,t,n,i)).type="textPath",o.textWidth=0,o.textHeight=0,o.pathLength=-1,o.glyphInfo=null,o.letterSpacingCache=[],o.measuresCache=new Map([["",0]]);var a=o.getHrefAttribute().getDefinition();return o.text=o.getTextFromNode(),o.dataArray=o.parsePathData(a),o}return Eo(r,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(t){var e=this.dataArray;t&&t.beginPath(),e.forEach((function(e){var r=e.type,n=e.points;switch(r){case sc.LINE_TO:t&&t.lineTo(n[0],n[1]);break;case sc.MOVE_TO:t&&t.moveTo(n[0],n[1]);break;case sc.CURVE_TO:t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case sc.QUAD_TO:t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case sc.ARC:var i=oo(n,8),o=i[0],a=i[1],u=i[2],s=i[3],c=i[4],l=i[5],f=i[6],h=i[7],p=u>s?u:s,v=u>s?1:u/s,y=u>s?s/u:1;t&&(t.translate(o,a),t.rotate(f),t.scale(v,y),t.arc(0,0,p,c,c+l,Boolean(1-h)),t.scale(1/v,1/y),t.rotate(-f),t.translate(-o,-a));break;case sc.CLOSE_PATH:t&&t.closePath()}}))}},{key:"renderChildren",value:function(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),n=this.glyphInfo,i=t.fillStyle;"underline"===e&&t.beginPath(),n.forEach((function(n,i){var o=n.p0,a=n.p1,u=n.rotation,s=n.text;t.save(),t.translate(o.x,o.y),t.rotate(u),t.fillStyle&&t.fillText(s,0,0),t.strokeStyle&&t.strokeText(s,0,0),t.restore(),"underline"===e&&(0===i&&t.moveTo(o.x,o.y+r/8),t.lineTo(a.x,a.y+r/5))})),"underline"===e&&(t.lineWidth=r/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore()}},{key:"getLetterSpacingAt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}},{key:"findSegmentToFitChar",value:function(t,e,r,n,i,o,a,u,s){var c=o,l=this.measureText(t,u);" "===u&&"justify"===e&&r<n&&(l+=(n-r)/i),s>-1&&(c+=this.getLetterSpacingAt(s));var f=this.textHeight/20,h=this.getEquidistantPointOnPath(c,f,0),p=this.getEquidistantPointOnPath(c+l,f,0),v={p0:h,p1:p},y=h&&p?Math.atan2(p.y-h.y,p.x-h.x):0;if(a){var d=Math.cos(Math.PI/2+y)*a,g=Math.cos(-y)*a;v.p0=Hl(Hl({},h),{},{x:h.x+d,y:h.y+g}),v.p1=Hl(Hl({},p),{},{x:p.x+d,y:p.y+g})}return{offset:c+=l,segment:v,rotation:y}}},{key:"measureText",value:function(t,e){var r=this.measuresCache,n=e||this.getText();if(r.has(n))return r.get(n);var i=this.measureTargetText(t,n);return r.set(n,i),i}},{key:"setTextData",value:function(t){var e=this;if(!this.glyphInfo){var r=this.getText(),n=r.split(""),i=r.split(" ").length-1,o=this.parent.getAttribute("dx").split().map((function(t){return t.getPixels("x")})),a=this.parent.getAttribute("dy").getPixels("y"),u=this.parent.getStyle("text-anchor").getString("start"),s=this.getStyle("letter-spacing"),c=this.parent.getStyle("letter-spacing"),l=0;s.hasValue()&&"inherit"!==s.getValue()?s.hasValue()&&"initial"!==s.getValue()&&"unset"!==s.getValue()&&(l=s.getPixels()):l=c.getPixels();var f=[],h=r.length;this.letterSpacingCache=f;for(var p=0;p<h;p++)f.push(void 0!==o[p]?o[p]:l);var v=f.reduce((function(t,e,r){return 0===r?0:t+e||0}),0),y=this.measureText(t),d=Math.max(y+v,0);this.textWidth=y,this.textHeight=this.getFontSize(),this.glyphInfo=[];var g=this.getPathLength(),m=this.getStyle("startOffset").getNumber(0)*g,x=0;"middle"!==u&&"center"!==u||(x=-d/2),"end"!==u&&"right"!==u||(x=-d),x+=m,n.forEach((function(r,o){var s=e.findSegmentToFitChar(t,u,d,g,i,x,a,r,o),c=s.offset,l=s.segment,f=s.rotation;x=c,l.p0&&l.p1&&e.glyphInfo.push({text:n[o],p0:l.p0,p1:l.p1,rotation:f})}))}}},{key:"parsePathData",value:function(t){if(this.pathLength=-1,!t)return[];var e=[],r=t.pathParser;for(r.reset();!r.isEnd();){var n=r.current,i=n?n.x:0,o=n?n.y:0,a=r.next(),u=a.type,s=[];switch(a.type){case sc.MOVE_TO:this.pathM(r,s);break;case sc.LINE_TO:u=this.pathL(r,s);break;case sc.HORIZ_LINE_TO:u=this.pathH(r,s);break;case sc.VERT_LINE_TO:u=this.pathV(r,s);break;case sc.CURVE_TO:this.pathC(r,s);break;case sc.SMOOTH_CURVE_TO:u=this.pathS(r,s);break;case sc.QUAD_TO:this.pathQ(r,s);break;case sc.SMOOTH_QUAD_TO:u=this.pathT(r,s);break;case sc.ARC:s=this.pathA(r);break;case sc.CLOSE_PATH:mc.pathZ(r)}a.type!==sc.CLOSE_PATH?e.push({type:u,points:s,start:{x:i,y:o},pathLength:this.calcLength(i,o,u,s)}):e.push({type:sc.CLOSE_PATH,points:[],pathLength:0})}return e}},{key:"pathM",value:function(t,e){var r=mc.pathM(t).point,n=r.x,i=r.y;e.push(n,i)}},{key:"pathL",value:function(t,e){var r=mc.pathL(t).point,n=r.x,i=r.y;return e.push(n,i),sc.LINE_TO}},{key:"pathH",value:function(t,e){var r=mc.pathH(t).point,n=r.x,i=r.y;return e.push(n,i),sc.LINE_TO}},{key:"pathV",value:function(t,e){var r=mc.pathV(t).point,n=r.x,i=r.y;return e.push(n,i),sc.LINE_TO}},{key:"pathC",value:function(t,e){var r=mc.pathC(t),n=r.point,i=r.controlPoint,o=r.currentPoint;e.push(n.x,n.y,i.x,i.y,o.x,o.y)}},{key:"pathS",value:function(t,e){var r=mc.pathS(t),n=r.point,i=r.controlPoint,o=r.currentPoint;return e.push(n.x,n.y,i.x,i.y,o.x,o.y),sc.CURVE_TO}},{key:"pathQ",value:function(t,e){var r=mc.pathQ(t),n=r.controlPoint,i=r.currentPoint;e.push(n.x,n.y,i.x,i.y)}},{key:"pathT",value:function(t,e){var r=mc.pathT(t),n=r.controlPoint,i=r.currentPoint;return e.push(n.x,n.y,i.x,i.y),sc.QUAD_TO}},{key:"pathA",value:function(t){var e=mc.pathA(t),r=e.rX,n=e.rY,i=e.sweepFlag,o=e.xAxisRotation,a=e.centp,u=e.a1,s=e.ad;return 0===i&&s>0&&(s-=2*Math.PI),1===i&&s<0&&(s+=2*Math.PI),[a.x,a.y,r,n,u,s,o,i]}},{key:"calcLength",value:function(t,e,r,n){var i=0,o=null,a=null,u=0;switch(r){case sc.LINE_TO:return this.getLineLength(t,e,n[0],n[1]);case sc.CURVE_TO:for(i=0,o=this.getPointOnCubicBezier(0,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),u=.01;u<=1;u+=.01)a=this.getPointOnCubicBezier(u,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case sc.QUAD_TO:for(i=0,o=this.getPointOnQuadraticBezier(0,t,e,n[0],n[1],n[2],n[3]),u=.01;u<=1;u+=.01)a=this.getPointOnQuadraticBezier(u,t,e,n[0],n[1],n[2],n[3]),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case sc.ARC:i=0;var s=n[4],c=n[5],l=n[4]+c,f=Math.PI/180;if(Math.abs(s-l)<f&&(f=Math.abs(s-l)),o=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],s,0),c<0)for(u=s-f;u>l;u-=f)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(u=s+f;u<l;u+=f)a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],u,0),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return a=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],l,0),i+=this.getLineLength(o.x,o.y,a.x,a.y)}return 0}},{key:"getPointOnLine",value:function(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:r,u=(i-r)/(n-e+yo),s=Math.sqrt(t*t/(1+u*u));n<e&&(s*=-1);var c=u*s,l=null;if(n===e)l={x:o,y:a+c};else if((a-r)/(o-e+yo)===u)l={x:o+s,y:a+c};else{var f=0,h=0,p=this.getLineLength(e,r,n,i);if(p<yo)return null;var v=(o-e)*(n-e)+(a-r)*(i-r);f=e+(v/=p*p)*(n-e),h=r+v*(i-r);var y=this.getLineLength(o,a,f,h),d=Math.sqrt(t*t-y*y);s=Math.sqrt(d*d/(1+u*u)),n<e&&(s*=-1),l={x:f+s,y:h+(c=u*s)}}return l}},{key:"getPointOnPath",value:function(t){var e=this.getPathLength(),r=0,n=null;if(t<-5e-5||t-5e-5>e)return null;var i,o=Fl(this.dataArray);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!a||!(a.pathLength<5e-5||r+a.pathLength+5e-5<t)){var u=t-r,s=0;switch(a.type){case sc.LINE_TO:n=this.getPointOnLine(u,a.start.x,a.start.y,a.points[0],a.points[1],a.start.x,a.start.y);break;case sc.ARC:var c=a.points[4],l=a.points[5],f=a.points[4]+l;if(s=c+u/a.pathLength*l,l<0&&s<f||l>=0&&s>f)break;n=this.getPointOnEllipticalArc(a.points[0],a.points[1],a.points[2],a.points[3],s,a.points[6]);break;case sc.CURVE_TO:(s=u/a.pathLength)>1&&(s=1),n=this.getPointOnCubicBezier(s,a.start.x,a.start.y,a.points[0],a.points[1],a.points[2],a.points[3],a.points[4],a.points[5]);break;case sc.QUAD_TO:(s=u/a.pathLength)>1&&(s=1),n=this.getPointOnQuadraticBezier(s,a.start.x,a.start.y,a.points[0],a.points[1],a.points[2],a.points[3])}if(n)return n;break}r+=a.pathLength}}catch(t){o.e(t)}finally{o.f()}return null}},{key:"getLineLength",value:function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))}},{key:"getPathLength",value:function(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce((function(t,e){return e.pathLength>0?t+e.pathLength:t}),0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(t,e,r,n,i,o,a,u,s){return{x:u*bo(t)+o*wo(t)+n*So(t)+e*Oo(t),y:s*bo(t)+a*wo(t)+i*So(t)+r*Oo(t)}}},{key:"getPointOnQuadraticBezier",value:function(t,e,r,n,i,o,a){return{x:o*ko(t)+n*To(t)+e*Ao(t),y:a*ko(t)+i*To(t)+r*Ao(t)}}},{key:"getPointOnEllipticalArc",value:function(t,e,r,n,i,o){var a=Math.cos(o),u=Math.sin(o),s=r*Math.cos(i),c=n*Math.sin(i);return{x:t+(s*a-c*u),y:e+(s*u+c*a)}}},{key:"buildEquidistantCache",value:function(t,e){var r=this.getPathLength(),n=e||.25,i=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==n){this.equidistantCache={step:i,precision:n,points:[]};for(var o=0,a=0;a<=r;a+=n){var u=this.getPointOnPath(a),s=this.getPointOnPath(a+n);u&&s&&((o+=this.getLineLength(u.x,u.y,s.x,s.y))>=i&&(this.equidistantCache.points.push({x:u.x,y:u.y,distance:a}),o-=i))}}}},{key:"getEquidistantPointOnPath",value:function(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var n=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}]),r}(Sc);function Gl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Wl=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i,ql=function(t){uu(i,t);var e,r,n=Gl(i);function i(t,e,r){var o;Po(this,i),(o=n.call(this,t,e,r)).type="image",o.loaded=!1;var a=o.getHrefAttribute().getString();if(!a)return fu(o);var u=a.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(a);return t.images.push(lu(o)),u?o.loadSvg(a):o.loadImage(a),o.isSvg=u,o}return Eo(i,[{key:"loadImage",value:(r=gn(dn.mark((function t(e){var r;return dn.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.document.createImage(e);case 3:r=t.sent,this.image=r,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error('Error while loading image "'.concat(e,'":'),t.t0);case 10:this.loaded=!0;case 11:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return r.apply(this,arguments)})},{key:"loadSvg",value:(e=gn(dn.mark((function t(e){var r,n,i,o;return dn.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=Wl.exec(e))){t.next=6;break}n=r[5],"base64"===r[4]?this.image=atob(n):this.image=decodeURIComponent(n),t.next=19;break;case 6:return t.prev=6,t.next=9,this.document.fetch(e);case 9:return i=t.sent,t.next=12,i.text();case 12:o=t.sent,this.image=o,t.next=19;break;case 16:t.prev=16,t.t0=t.catch(6),console.error('Error while loading image "'.concat(e,'":'),t.t0);case 19:this.loaded=!0;case 20:case"end":return t.stop()}}),t,this,[[6,16]])}))),function(t){return e.apply(this,arguments)})},{key:"renderChildren",value:function(t){var e=this.document,r=this.image,n=this.loaded,i=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(n&&r&&a&&u){if(t.save(),t.translate(i,o),this.isSvg){var s=e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:u});s.document.documentElement.parent=this,s.render()}else{var c=this.image;e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:c.width,height:u,desiredHeight:c.height}),this.loaded&&(void 0===c.complete||c.complete)&&t.drawImage(c,0,0)}t.restore()}}},{key:"getBoundingBox",value:function(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new Fs(t,e,t+r,e+n)}}]),i}(dc);function $l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Ql=function(t){uu(r,t);var e=$l(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="symbol",t}return Eo(r,[{key:"render",value:function(t){}}]),r}(dc),Zl=function(){function t(e){Po(this,t),this.document=e,this.loaded=!1,e.fonts.push(this)}var e;return Eo(t,[{key:"load",value:(e=gn(dn.mark((function t(e,r){var n,i,o;return dn.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=this.document,t.next=4,n.canvg.parser.load(r);case 4:i=t.sent,o=i.getElementsByTagName("font"),Array.from(o).forEach((function(t){var r=n.createElement(t);n.definitions[e]=r})),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.error('Error while loading font "'.concat(r,'":'),t.t0);case 12:this.loaded=!0;case 13:case"end":return t.stop()}}),t,this,[[0,9]])}))),function(t,r){return e.apply(this,arguments)})}]),t}();function Kl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Jl=function(t){uu(r,t);var e=Kl(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="style",Ui(Array.from(n.childNodes).map((function(t){return t.textContent})).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach((function(e){var r=e.trim();if(r){var n=r.split("{"),i=n[0].split(","),o=n[1].split(";");i.forEach((function(e){var r=e.trim();if(r){var n=t.styles[r]||{};if(o.forEach((function(e){var r=e.indexOf(":"),i=e.substr(0,r).trim(),o=e.substr(r+1,e.length-r).trim();i&&o&&(n[i]=new Ua(t,i,o))})),t.styles[r]=n,t.stylesSpecificity[r]=vo(r),"@font-face"===r){var i=n["font-family"].getString().replace(/"|'/g,"");n.src.getString().split(",").forEach((function(e){if(e.indexOf('format("svg")')>0){var r=qi(e);r&&new Zl(t).load(i,r)}}))}}}))}})),o}return r}(ps);function tf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}Jl.parseExternalUrl=qi;var ef=function(t){uu(r,t);var e=tf(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="use",t}return Eo(r,[{key:"setContext",value:function(t){Vs(pu(r.prototype),"setContext",this).call(this,t);var e=this.getAttribute("x"),n=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),n.hasValue()&&t.translate(0,n.getPixels("y"))}},{key:"path",value:function(t){var e=this.element;e&&e.path(t)}},{key:"renderChildren",value:function(t){var e=this.document,r=this.element;if(r){var n=r;if("symbol"===r.type&&((n=new Pc(e,null)).attributes.viewBox=new Ua(e,"viewBox",r.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new Ua(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new Ua(e,"overflow",r.getAttribute("overflow").getString()),n.children=r.children,r.styles.opacity=new Ua(e,"opacity",this.calculateOpacity())),"svg"===n.type){var i=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);i.hasValue()&&(n.attributes.width=new Ua(e,"width",i.getString())),o.hasValue()&&(n.attributes.height=new Ua(e,"height",o.getString()))}var a=n.parent;n.parent=this,n.render(t),n.parent=a}}},{key:"getBoundingBox",value:function(t){var e=this.element;return e?e.getBoundingBox(t):null}},{key:"elementTransform",value:function(){var t=this.document,e=this.element;return hs.fromElement(t,e)}},{key:"element",get:function(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}]),r}(dc);function rf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}function nf(t,e,r,n,i,o){return t[r*n*4+4*e+o]}function of(t,e,r,n,i,o,a){t[r*n*4+4*e+o]=a}function af(t,e,r){return t[e]*r}function uf(t,e,r,n){return e+Math.cos(t)*r+Math.sin(t)*n}var sf=function(t){uu(r,t);var e=rf(r);function r(t,n,i){var o;Po(this,r),(o=e.call(this,t,n,i)).type="feColorMatrix";var a=Yi(o.getAttribute("values").getString());switch(o.getAttribute("type").getString("matrix")){case"saturate":var u=a[0];a=[.213+.787*u,.715-.715*u,.072-.072*u,0,0,.213-.213*u,.715+.285*u,.072-.072*u,0,0,.213-.213*u,.715-.715*u,.072+.928*u,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var s=a[0]*Math.PI/180;a=[uf(s,.213,.787,-.213),uf(s,.715,-.715,-.715),uf(s,.072,-.072,.928),0,0,uf(s,.213,-.213,.143),uf(s,.715,.285,.14),uf(s,.072,-.072,-.283),0,0,uf(s,.213,-.213,-.787),uf(s,.715,-.715,.715),uf(s,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}return o.matrix=a,o.includeOpacity=o.getAttribute("includeOpacity").hasValue(),o}return Eo(r,[{key:"apply",value:function(t,e,r,n,i){for(var o=this.includeOpacity,a=this.matrix,u=t.getImageData(0,0,n,i),s=0;s<i;s++)for(var c=0;c<n;c++){var l=nf(u.data,c,s,n,0,0),f=nf(u.data,c,s,n,0,1),h=nf(u.data,c,s,n,0,2),p=nf(u.data,c,s,n,0,3),v=af(a,0,l)+af(a,1,f)+af(a,2,h)+af(a,3,p)+af(a,4,1),y=af(a,5,l)+af(a,6,f)+af(a,7,h)+af(a,8,p)+af(a,9,1),d=af(a,10,l)+af(a,11,f)+af(a,12,h)+af(a,13,p)+af(a,14,1),g=af(a,15,l)+af(a,16,f)+af(a,17,h)+af(a,18,p)+af(a,19,1);o&&(v=0,y=0,d=0,g*=p/255),of(u.data,c,s,n,0,0,v),of(u.data,c,s,n,0,1,y),of(u.data,c,s,n,0,2,d),of(u.data,c,s,n,0,3,g)}t.clearRect(0,0,n,i),t.putImageData(u,0,0)}}]),r}(ps);function cf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var lf=function(t){uu(r,t);var e=cf(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="mask",t}return Eo(r,[{key:"apply",value:function(t,e){var n=this.document,i=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(!a&&!u){var s=new Fs;this.children.forEach((function(e){s.addBoundingBox(e.getBoundingBox(t))})),i=Math.floor(s.x1),o=Math.floor(s.y1),a=Math.floor(s.width),u=Math.floor(s.height)}var c=this.removeStyles(e,r.ignoreStyles),l=n.createCanvas(i+a,o+u),f=l.getContext("2d");n.screen.setDefaults(f),this.renderChildren(f),new sf(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(f,0,0,i+a,o+u);var h=n.createCanvas(i+a,o+u),p=h.getContext("2d");n.screen.setDefaults(p),e.render(p),p.globalCompositeOperation="destination-in",p.fillStyle=f.createPattern(l,"no-repeat"),p.fillRect(0,0,i+a,o+u),t.fillStyle=p.createPattern(h,"no-repeat"),t.fillRect(0,0,i+a,o+u),this.restoreStyles(e,c)}},{key:"render",value:function(t){}}]),r}(ps);lf.ignoreStyles=["mask","transform","clip-path"];var ff=w("Reflect","apply"),hf=Function.apply,pf=!P((function(){ff((function(){}))}));function vf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}fe({target:"Reflect",stat:!0,forced:pf},{apply:function(t,e,r){return G(t),H(r),ff?ff(t,e,r):hf.call(t,e,r)}}),fe({target:"Reflect",stat:!0,sham:!Eu},{getPrototypeOf:function(t){return Nu(H(t))}});var yf=function(){},df=function(t){uu(r,t);var e=vf(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="clipPath",t}return Eo(r,[{key:"apply",value:function(t){var e=this.document,r=Reflect.getPrototypeOf(t),n=t.beginPath,i=t.closePath;r&&(r.beginPath=yf,r.closePath=yf),Reflect.apply(n,t,[]),this.children.forEach((function(n){if(void 0!==n.path){var o=void 0!==n.elementTransform?n.elementTransform():null;o||(o=hs.fromElement(e,n)),o&&o.apply(t),n.path(t),r&&(r.closePath=i),o&&o.unapply(t)}})),Reflect.apply(i,t,[]),t.clip(),r&&(r.beginPath=n,r.closePath=i)}},{key:"render",value:function(t){}}]),r}(ps);function gf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var mf=function(t){uu(r,t);var e=gf(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="filter",t}return Eo(r,[{key:"apply",value:function(t,e){var n=this.document,i=this.children,o=e.getBoundingBox(t);if(o){var a=0,u=0;i.forEach((function(t){var e=t.extraFilterDistance||0;a=Math.max(a,e),u=Math.max(u,e)}));var s=Math.floor(o.width),c=Math.floor(o.height),l=s+2*a,f=c+2*u;if(!(l<1||f<1)){var h=Math.floor(o.x),p=Math.floor(o.y),v=this.removeStyles(e,r.ignoreStyles),y=n.createCanvas(l,f),d=y.getContext("2d");n.screen.setDefaults(d),d.translate(-h+a,-p+u),e.render(d),i.forEach((function(t){"function"==typeof t.apply&&t.apply(d,0,0,l,f)})),t.drawImage(y,0,0,l,f,h-a,p-u,l,f),this.restoreStyles(e,v)}}}},{key:"render",value:function(t){}}]),r}(ps);function xf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}mf.ignoreStyles=["filter","transform","clip-path"];var bf=function(t){uu(r,t);var e=xf(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="feDropShadow",o.addStylesFromStyleDefinition(),o}return Eo(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(ps);function wf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Sf=function(t){uu(r,t);var e=wf(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="feMorphology",t}return Eo(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(ps);function Of(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var kf=function(t){uu(r,t);var e=Of(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="feComposite",t}return Eo(r,[{key:"apply",value:function(t,e,r,n,i){}}]),r}(ps);function Tf(t){return(Tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Af=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Rf=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Pf(t,e,r,n,i,o){if(!(isNaN(o)||o<1)){o|=0;var a=function(t,e,r,n,i){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==Tf(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var o=t.getContext("2d");try{return o.getImageData(e,r,n,i)}catch(t){throw new Error("unable to access image data: "+t)}}(t,e,r,n,i);a=function(t,e,r,n,i,o){for(var a,u=t.data,s=2*o+1,c=n-1,l=i-1,f=o+1,h=f*(f+1)/2,p=new Ef,v=p,y=1;y<s;y++)v=v.next=new Ef,y===f&&(a=v);v.next=p;for(var d=null,g=null,m=0,x=0,b=Af[o],w=Rf[o],S=0;S<i;S++){v=p;for(var O=u[x],k=u[x+1],T=u[x+2],A=u[x+3],R=0;R<f;R++)v.r=O,v.g=k,v.b=T,v.a=A,v=v.next;for(var P=0,E=0,C=0,M=0,N=f*O,_=f*k,I=f*T,V=f*A,L=h*O,B=h*k,D=h*T,j=h*A,F=1;F<f;F++){var z=x+((c<F?c:F)<<2),U=u[z],H=u[z+1],X=u[z+2],Y=u[z+3],G=f-F;L+=(v.r=U)*G,B+=(v.g=H)*G,D+=(v.b=X)*G,j+=(v.a=Y)*G,P+=U,E+=H,C+=X,M+=Y,v=v.next}d=p,g=a;for(var W=0;W<n;W++){var q=j*b>>w;if(u[x+3]=q,0!==q){var $=255/q;u[x]=(L*b>>w)*$,u[x+1]=(B*b>>w)*$,u[x+2]=(D*b>>w)*$}else u[x]=u[x+1]=u[x+2]=0;L-=N,B-=_,D-=I,j-=V,N-=d.r,_-=d.g,I-=d.b,V-=d.a;var Q=W+o+1;Q=m+(Q<c?Q:c)<<2,L+=P+=d.r=u[Q],B+=E+=d.g=u[Q+1],D+=C+=d.b=u[Q+2],j+=M+=d.a=u[Q+3],d=d.next;var Z=g,K=Z.r,J=Z.g,tt=Z.b,et=Z.a;N+=K,_+=J,I+=tt,V+=et,P-=K,E-=J,C-=tt,M-=et,g=g.next,x+=4}m+=n}for(var rt=0;rt<n;rt++){var nt=u[x=rt<<2],it=u[x+1],ot=u[x+2],at=u[x+3],ut=f*nt,st=f*it,ct=f*ot,lt=f*at,ft=h*nt,ht=h*it,pt=h*ot,vt=h*at;v=p;for(var yt=0;yt<f;yt++)v.r=nt,v.g=it,v.b=ot,v.a=at,v=v.next;for(var dt=n,gt=0,mt=0,xt=0,bt=0,wt=1;wt<=o;wt++){x=dt+rt<<2;var St=f-wt;ft+=(v.r=nt=u[x])*St,ht+=(v.g=it=u[x+1])*St,pt+=(v.b=ot=u[x+2])*St,vt+=(v.a=at=u[x+3])*St,bt+=nt,gt+=it,mt+=ot,xt+=at,v=v.next,wt<l&&(dt+=n)}x=rt,d=p,g=a;for(var Ot=0;Ot<i;Ot++){var kt=x<<2;u[kt+3]=at=vt*b>>w,at>0?(at=255/at,u[kt]=(ft*b>>w)*at,u[kt+1]=(ht*b>>w)*at,u[kt+2]=(pt*b>>w)*at):u[kt]=u[kt+1]=u[kt+2]=0,ft-=ut,ht-=st,pt-=ct,vt-=lt,ut-=d.r,st-=d.g,ct-=d.b,lt-=d.a,kt=rt+((kt=Ot+f)<l?kt:l)*n<<2,ft+=bt+=d.r=u[kt],ht+=gt+=d.g=u[kt+1],pt+=mt+=d.b=u[kt+2],vt+=xt+=d.a=u[kt+3],d=d.next,ut+=nt=g.r,st+=it=g.g,ct+=ot=g.b,lt+=at=g.a,bt-=nt,gt-=it,mt-=ot,xt-=at,g=g.next,x+=n}}return t}(a,0,0,n,i,o),t.getContext("2d").putImageData(a,e,r)}}var Ef=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function Cf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Mf=function(t){uu(r,t);var e=Cf(r);function r(t,n,i){var o;return Po(this,r),(o=e.call(this,t,n,i)).type="feGaussianBlur",o.blurRadius=Math.floor(o.getAttribute("stdDeviation").getNumber()),o.extraFilterDistance=o.blurRadius,o}return Eo(r,[{key:"apply",value:function(t,e,r,n,i){var o=this.document,a=this.blurRadius,u=o.window?o.window.document.body:null,s=t.canvas;s.id=o.getUniqueId(),u&&(s.style.display="none",u.appendChild(s)),Pf(s,e,r,n,i,a),u&&u.removeChild(s)}}]),r}(ps);function Nf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var _f=function(t){uu(r,t);var e=Nf(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="title",t}return r}(ps);function If(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=pu(t);if(e){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fu(this,r)}}var Vf=function(t){uu(r,t);var e=If(r);function r(){var t;return Po(this,r),(t=e.apply(this,arguments)).type="desc",t}return r}(ps),Lf={svg:Pc,rect:Cc,circle:Nc,ellipse:Ic,line:Lc,polyline:Dc,polygon:Fc,path:mc,pattern:Uc,marker:Xc,defs:Gc,linearGradient:Kc,radialGradient:tl,stop:rl,animate:pl,animateColor:yl,animateTransform:gl,font:wl,"font-face":Ol,"missing-glyph":Tl,glyph:bc,text:Sc,tspan:kc,tref:Rl,a:El,textPath:Yl,image:ql,g:qc,symbol:Ql,style:Jl,use:ef,mask:lf,clipPath:df,filter:mf,feDropShadow:bf,feMorphology:Sf,feComposite:kf,feColorMatrix:sf,feGaussianBlur:Mf,title:_f,desc:Vf};function Bf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Df(){return(Df=gn(dn.mark((function t(e){var r,n,i=arguments;return dn.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]&&i[1],n=document.createElement("img"),r&&(n.crossOrigin="Anonymous"),t.abrupt("return",new Promise((function(t,r){n.onload=function(){t(n)},n.onerror=function(t,e,n,i,o){r(o)},n.src=e})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var jf=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.rootEmSize,i=void 0===n?12:n,o=r.emSize,a=void 0===o?12:o,u=r.createCanvas,s=void 0===u?t.createCanvas:u,c=r.createImage,l=void 0===c?t.createImage:c,f=r.anonymousCrossOrigin;Po(this,t),this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=i,this.emSize=a,this.createCanvas=s,this.createImage=this.bindCreateImage(l,f),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return Eo(t,[{key:"bindCreateImage",value:function(t,e){return"boolean"==typeof e?function(r,n){return t(r,"boolean"==typeof n?n:e)}:t}},{key:"popEmSize",value:function(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function(){return this.images.every((function(t){return t.loaded}))}},{key:"isFontsLoaded",value:function(){return this.fonts.every((function(t){return t.loaded}))}},{key:"createDocumentElement",value:function(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}},{key:"createElement",value:function(e){var r=e.nodeName.replace(/^[^:]+:/,""),n=t.elementTypes[r];return void 0!==n?new n(this,e):new ys(this,e)}},{key:"createTextNode",value:function(t){return new Ac(this,t)}},{key:"setViewBox",value:function(t){this.screen.setViewBox(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bf(Object(r),!0).forEach((function(e){Ro(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({document:this},t))}},{key:"window",get:function(){return this.screen.window}},{key:"fetch",get:function(){return this.screen.fetch}},{key:"ctx",get:function(){return this.screen.ctx}},{key:"emSize",get:function(){var t=this.emSizeStack;return t[t.length-1]},set:function(t){this.emSizeStack.push(t)}}]),t}();function Ff(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ff(Object(r),!0).forEach((function(e){Ro(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ff(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}jf.createCanvas=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,r},jf.createImage=function(t){return Df.apply(this,arguments)},jf.elementTypes=Lf;var Uf=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Po(this,t),this.parser=new ou(n),this.screen=new ru(e,n),this.options=n;var i=new jf(this,n),o=i.createDocumentElement(r);this.document=i,this.documentElement=o}var e,r;return Eo(t,[{key:"fork",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.from(e,r,zf(zf({},this.options),n))}},{key:"forkString",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.fromString(e,r,zf(zf({},this.options),n))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:(r=gn(dn.mark((function t(){var e,r=arguments;return dn.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},this.start(zf({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},e)),t.next=4,this.ready();case 4:this.stop();case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.documentElement,r=this.screen,n=this.options;r.start(e,zf(zf({enableRedraw:!0},n),t))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,r)}}],[{key:"from",value:(e=gn(dn.mark((function e(r,n){var i,o,a,u=arguments;return dn.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>2&&void 0!==u[2]?u[2]:{},o=new ou(i),e.next=4,o.parse(n);case 4:return a=e.sent,e.abrupt("return",new t(r,a,i));case 6:case"end":return e.stop()}}),e)}))),function(t,r){return e.apply(this,arguments)})},{key:"fromString",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new ou(n),o=i.parseFromString(r);return new t(e,o,n)}}]),t}();t.AElement=El,t.AnimateColorElement=yl,t.AnimateElement=pl,t.AnimateTransformElement=gl,t.BoundingBox=Fs,t.CB1=bo,t.CB2=wo,t.CB3=So,t.CB4=Oo,t.Canvg=Uf,t.CircleElement=Nc,t.ClipPathElement=df,t.DefsElement=Gc,t.DescElement=Vf,t.Document=jf,t.Element=ps,t.EllipseElement=Ic,t.FeColorMatrixElement=sf,t.FeCompositeElement=kf,t.FeDropShadowElement=bf,t.FeGaussianBlurElement=Mf,t.FeMorphologyElement=Sf,t.FilterElement=mf,t.Font=js,t.FontElement=wl,t.FontFaceElement=Ol,t.GElement=qc,t.GlyphElement=bc,t.GradientElement=Qc,t.ImageElement=ql,t.LineElement=Lc,t.LinearGradientElement=Kc,t.MarkerElement=Xc,t.MaskElement=lf,t.Matrix=os,t.MissingGlyphElement=Tl,t.Mouse=Ja,t.PSEUDO_ZERO=yo,t.Parser=ou,t.PathElement=mc,t.PathParser=sc,t.PatternElement=Uc,t.Point=Ka,t.PolygonElement=Fc,t.PolylineElement=Dc,t.Property=Ua,t.QB1=ko,t.QB2=To,t.QB3=Ao,t.RadialGradientElement=tl,t.RectElement=Cc,t.RenderedElement=dc,t.Rotate=ns,t.SVGElement=Pc,t.SVGFontLoader=Zl,t.Scale=is,t.Screen=ru,t.Skew=us,t.SkewX=cs,t.SkewY=fs,t.StopElement=rl,t.StyleElement=Jl,t.SymbolElement=Ql,t.TRefElement=Rl,t.TSpanElement=kc,t.TextElement=Sc,t.TextPathElement=Yl,t.TitleElement=_f,t.Transform=hs,t.Translate=rs,t.UnknownElement=ys,t.UseElement=ef,t.ViewPort=Ha,t.compressSpaces=Ui,t.default=Uf,t.getSelectorSpecificity=vo,t.normalizeAttributeName=Wi,t.normalizeColor=$i,t.parseExternalUrl=qi,t.presets=mn,t.toNumbers=Yi,t.trimLeft=Hi,t.trimRight=Xi,t.vectorMagnitude=go,t.vectorsAngle=xo,t.vectorsRatio=mo,Object.defineProperty(t,"__esModule",{value:!0})}));
+//# sourceMappingURL=umd.js.map
Index: imaps-frontend/node_modules/canvg/lib/umd.js.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/umd.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/umd.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"umd.js","sources":["../node_modules/core-js/internals/global.js","../node_modules/core-js/internals/engine-v8-version.js","../node_modules/core-js/internals/set-global.js","../node_modules/core-js/internals/shared-store.js","../node_modules/core-js/internals/shared.js","../node_modules/core-js/internals/require-object-coercible.js","../node_modules/core-js/internals/to-object.js","../node_modules/core-js/internals/has-own-property.js","../node_modules/core-js/internals/uid.js","../node_modules/core-js/internals/is-callable.js","../node_modules/core-js/internals/get-built-in.js","../node_modules/core-js/internals/engine-user-agent.js","../node_modules/core-js/internals/fails.js","../node_modules/core-js/internals/native-symbol.js","../node_modules/core-js/internals/use-symbol-as-uid.js","../node_modules/core-js/internals/well-known-symbol.js","../node_modules/core-js/internals/to-string-tag-support.js","../node_modules/core-js/internals/descriptors.js","../node_modules/core-js/internals/is-object.js","../node_modules/core-js/internals/document-create-element.js","../node_modules/core-js/internals/ie8-dom-define.js","../node_modules/core-js/internals/an-object.js","../node_modules/core-js/internals/is-symbol.js","../node_modules/core-js/internals/try-to-string.js","../node_modules/core-js/internals/a-callable.js","../node_modules/core-js/internals/get-method.js","../node_modules/core-js/internals/to-primitive.js","../node_modules/core-js/internals/ordinary-to-primitive.js","../node_modules/core-js/internals/to-property-key.js","../node_modules/core-js/internals/object-define-property.js","../node_modules/core-js/internals/create-property-descriptor.js","../node_modules/core-js/internals/create-non-enumerable-property.js","../node_modules/core-js/internals/inspect-source.js","../node_modules/core-js/internals/internal-state.js","../node_modules/core-js/internals/native-weak-map.js","../node_modules/core-js/internals/shared-key.js","../node_modules/core-js/internals/hidden-keys.js","../node_modules/core-js/internals/function-name.js","../node_modules/core-js/internals/redefine.js","../node_modules/core-js/internals/classof-raw.js","../node_modules/core-js/internals/classof.js","../node_modules/core-js/internals/object-to-string.js","../node_modules/core-js/modules/es.object.to-string.js","../node_modules/core-js/internals/object-property-is-enumerable.js","../node_modules/core-js/internals/indexed-object.js","../node_modules/core-js/internals/to-indexed-object.js","../node_modules/core-js/internals/object-get-own-property-descriptor.js","../node_modules/core-js/internals/to-integer-or-infinity.js","../node_modules/core-js/internals/to-absolute-index.js","../node_modules/core-js/internals/to-length.js","../node_modules/core-js/internals/length-of-array-like.js","../node_modules/core-js/internals/array-includes.js","../node_modules/core-js/internals/object-keys-internal.js","../node_modules/core-js/internals/enum-bug-keys.js","../node_modules/core-js/internals/object-get-own-property-names.js","../node_modules/core-js/internals/object-get-own-property-symbols.js","../node_modules/core-js/internals/own-keys.js","../node_modules/core-js/internals/copy-constructor-properties.js","../node_modules/core-js/internals/is-forced.js","../node_modules/core-js/internals/export.js","../node_modules/core-js/internals/native-promise-constructor.js","../node_modules/core-js/internals/redefine-all.js","../node_modules/core-js/internals/object-set-prototype-of.js","../node_modules/core-js/internals/a-possible-prototype.js","../node_modules/core-js/internals/set-to-string-tag.js","../node_modules/core-js/internals/set-species.js","../node_modules/core-js/internals/an-instance.js","../node_modules/core-js/internals/iterators.js","../node_modules/core-js/internals/is-array-iterator-method.js","../node_modules/core-js/internals/function-bind-context.js","../node_modules/core-js/internals/get-iterator-method.js","../node_modules/core-js/internals/get-iterator.js","../node_modules/core-js/internals/iterator-close.js","../node_modules/core-js/internals/iterate.js","../node_modules/core-js/internals/check-correctness-of-iteration.js","../node_modules/core-js/internals/task.js","../node_modules/core-js/internals/is-constructor.js","../node_modules/core-js/internals/species-constructor.js","../node_modules/core-js/internals/a-constructor.js","../node_modules/core-js/internals/html.js","../node_modules/core-js/internals/engine-is-ios.js","../node_modules/core-js/internals/engine-is-node.js","../node_modules/core-js/internals/microtask.js","../node_modules/core-js/internals/engine-is-ios-pebble.js","../node_modules/core-js/internals/engine-is-webos-webkit.js","../node_modules/core-js/modules/es.promise.js","../node_modules/core-js/internals/new-promise-capability.js","../node_modules/core-js/internals/perform.js","../node_modules/core-js/internals/engine-is-browser.js","../node_modules/core-js/internals/host-report-errors.js","../node_modules/core-js/internals/promise-resolve.js","../node_modules/core-js/modules/es.reflect.delete-property.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/@babel/runtime/helpers/asyncToGenerator.js","../node_modules/core-js/internals/is-array.js","../node_modules/core-js/internals/array-species-constructor.js","../node_modules/core-js/internals/array-species-create.js","../node_modules/core-js/internals/array-iteration.js","../node_modules/core-js/internals/array-method-has-species-support.js","../node_modules/core-js/modules/es.array.map.js","../node_modules/core-js/internals/to-string.js","../node_modules/core-js/internals/whitespaces.js","../node_modules/core-js/internals/string-trim.js","../node_modules/core-js/internals/number-parse-float.js","../node_modules/core-js/modules/es.parse-float.js","../node_modules/core-js/internals/regexp-flags.js","../node_modules/core-js/internals/object-create.js","../node_modules/core-js/internals/regexp-sticky-helpers.js","../node_modules/core-js/internals/object-keys.js","../node_modules/core-js/internals/object-define-properties.js","../node_modules/core-js/internals/regexp-exec.js","../node_modules/core-js/internals/regexp-unsupported-dot-all.js","../node_modules/core-js/internals/regexp-unsupported-ncg.js","../node_modules/core-js/modules/es.regexp.exec.js","../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","../node_modules/core-js/internals/string-multibyte.js","../node_modules/core-js/internals/advance-string-index.js","../node_modules/core-js/internals/regexp-exec-abstract.js","../node_modules/core-js/modules/es.string.match.js","../node_modules/core-js/internals/get-substitution.js","../node_modules/core-js/modules/es.string.replace.js","../node_modules/core-js/internals/is-regexp.js","../node_modules/core-js/modules/es.string.starts-with.js","../node_modules/core-js/internals/not-a-regexp.js","../node_modules/core-js/internals/correct-is-regexp-logic.js","../node_modules/core-js/internals/array-method-is-strict.js","../node_modules/core-js/modules/es.array.join.js","../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/@babel/runtime/helpers/slicedToArray.js","../node_modules/@babel/runtime/helpers/defineProperty.js","../node_modules/@babel/runtime/helpers/classCallCheck.js","../node_modules/@babel/runtime/helpers/createClass.js","../node_modules/core-js/internals/create-property.js","../node_modules/core-js/modules/es.array.concat.js","../node_modules/core-js/modules/es.array.every.js","../node_modules/core-js/internals/array-reduce.js","../node_modules/core-js/modules/es.array.reduce.js","../node_modules/core-js/modules/es.string.ends-with.js","../node_modules/core-js/modules/es.string.split.js","../node_modules/rollup-plugin-node-globals/src/global.js","../node_modules/process-es6/browser.js","../node_modules/raf/index.js","../node_modules/performance-now/lib/performance-now.js","../node_modules/core-js/modules/es.function.name.js","../node_modules/core-js/internals/string-trim-forced.js","../node_modules/core-js/modules/es.string.trim.js","../node_modules/rgbcolor/index.js","../node_modules/core-js/internals/array-for-each.js","../node_modules/core-js/modules/es.array.for-each.js","../node_modules/core-js/internals/dom-iterables.js","../node_modules/core-js/internals/dom-token-list-prototype.js","../node_modules/core-js/modules/web.dom-collections.for-each.js","../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/inherits.js","../node_modules/@babel/runtime/helpers/typeof.js","../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../node_modules/core-js/internals/call-with-safe-iteration-closing.js","../node_modules/core-js/modules/es.array.from.js","../node_modules/core-js/internals/array-from.js","../node_modules/core-js/internals/add-to-unscopables.js","../node_modules/core-js/modules/es.array.includes.js","../node_modules/core-js/modules/es.array.index-of.js","../node_modules/core-js/modules/es.array.some.js","../node_modules/core-js/modules/es.string.includes.js","../node_modules/core-js/internals/correct-prototype-getter.js","../node_modules/core-js/internals/iterators-core.js","../node_modules/core-js/internals/object-get-prototype-of.js","../node_modules/core-js/internals/create-iterator-constructor.js","../node_modules/core-js/internals/define-iterator.js","../node_modules/core-js/modules/es.string.iterator.js","../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/iterableToArray.js","../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/toConsumableArray.js","../node_modules/core-js/modules/es.array.reverse.js","../node_modules/core-js/internals/inherit-if-required.js","../node_modules/core-js/internals/this-number-value.js","../node_modules/core-js/modules/es.number.constructor.js","../node_modules/@babel/runtime/helpers/superPropBase.js","../node_modules/@babel/runtime/helpers/get.js","../node_modules/core-js/modules/es.array.fill.js","../node_modules/core-js/internals/array-fill.js","../node_modules/svg-pathdata/lib/SVGPathData.module.js","../node_modules/core-js/modules/es.regexp.to-string.js","../node_modules/core-js/modules/es.array.iterator.js","../node_modules/core-js/modules/web.dom-collections.iterator.js","../node_modules/core-js/internals/object-get-own-property-names-external.js","../node_modules/core-js/internals/freezing.js","../node_modules/core-js/internals/internal-metadata.js","../node_modules/core-js/internals/collection-strong.js","../node_modules/core-js/internals/collection.js","../node_modules/core-js/modules/es.map.js","../node_modules/core-js/modules/es.reflect.apply.js","../node_modules/core-js/modules/es.reflect.get-prototype-of.js","../node_modules/stackblur-canvas/dist/stackblur-es.js"],"sourcesContent":["var check = function (it) {\n  return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n  // eslint-disable-next-line es/no-global-this -- safe\n  check(typeof globalThis == 'object' && globalThis) ||\n  check(typeof window == 'object' && window) ||\n  // eslint-disable-next-line no-restricted-globals -- safe\n  check(typeof self == 'object' && self) ||\n  check(typeof global == 'object' && global) ||\n  // eslint-disable-next-line no-new-func -- fallback\n  (function () { return this; })() || Function('return this')();\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n  match = v8.split('.');\n  version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n  match = userAgent.match(/Edge\\/(\\d+)/);\n  if (!match || match[1] >= 74) {\n    match = userAgent.match(/Chrome\\/(\\d+)/);\n    if (match) version = match[1];\n  }\n}\n\nmodule.exports = version && +version;\n","var global = require('../internals/global');\n\nmodule.exports = function (key, value) {\n  try {\n    // eslint-disable-next-line es/no-object-defineproperty -- safe\n    Object.defineProperty(global, key, { value: value, configurable: true, writable: true });\n  } catch (error) {\n    global[key] = value;\n  } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n  return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n  version: '3.18.2',\n  mode: IS_PURE ? 'pure' : 'global',\n  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n  if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n  return it;\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n  return Object(requireObjectCoercible(argument));\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n  return hasOwnProperty.call(toObject(it), key);\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n  return typeof argument === 'function';\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n  return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n  return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","module.exports = function (exec) {\n  try {\n    return !!exec();\n  } catch (error) {\n    return true;\n  }\n};\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n  var symbol = Symbol();\n  // Chrome 38 Symbol has incorrect toString conversion\n  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n  return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n    !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n  && !Symbol.sham\n  && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n  if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n    if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n      WellKnownSymbolsStore[name] = Symbol[name];\n    } else {\n      WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n    }\n  } return WellKnownSymbolsStore[name];\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n  return typeof it === 'object' ? it !== null : isCallable(it);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n  return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n  // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n  return Object.defineProperty(createElement('div'), 'a', {\n    get: function () { return 7; }\n  }).a != 7;\n});\n","var isObject = require('../internals/is-object');\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n  if (isObject(argument)) return argument;\n  throw TypeError(String(argument) + ' is not an object');\n};\n","var isCallable = require('../internals/is-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n  return typeof it == 'symbol';\n} : function (it) {\n  var $Symbol = getBuiltIn('Symbol');\n  return isCallable($Symbol) && Object(it) instanceof $Symbol;\n};\n","module.exports = function (argument) {\n  try {\n    return String(argument);\n  } catch (error) {\n    return 'Object';\n  }\n};\n","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n  if (isCallable(argument)) return argument;\n  throw TypeError(tryToString(argument) + ' is not a function');\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n  var func = V[P];\n  return func == null ? undefined : aCallable(func);\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n  if (!isObject(input) || isSymbol(input)) return input;\n  var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n  var result;\n  if (exoticToPrim) {\n    if (pref === undefined) pref = 'default';\n    result = exoticToPrim.call(input, pref);\n    if (!isObject(result) || isSymbol(result)) return result;\n    throw TypeError(\"Can't convert object to primitive value\");\n  }\n  if (pref === undefined) pref = 'number';\n  return ordinaryToPrimitive(input, pref);\n};\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n  var fn, val;\n  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n  if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;\n  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n  throw TypeError(\"Can't convert object to primitive value\");\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n  var key = toPrimitive(argument, 'string');\n  return isSymbol(key) ? key : String(key);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n  anObject(O);\n  P = toPropertyKey(P);\n  anObject(Attributes);\n  if (IE8_DOM_DEFINE) try {\n    return $defineProperty(O, P, Attributes);\n  } catch (error) { /* empty */ }\n  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n  if ('value' in Attributes) O[P] = Attributes.value;\n  return O;\n};\n","module.exports = function (bitmap, value) {\n  return {\n    enumerable: !(bitmap & 1),\n    configurable: !(bitmap & 2),\n    writable: !(bitmap & 4),\n    value: value\n  };\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n  object[key] = value;\n  return object;\n};\n","var isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n  store.inspectSource = function (it) {\n    return functionToString.call(it);\n  };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n  return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n  return function (it) {\n    var state;\n    if (!isObject(it) || (state = get(it)).type !== TYPE) {\n      throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n    } return state;\n  };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n  var store = shared.state || (shared.state = new WeakMap());\n  var wmget = store.get;\n  var wmhas = store.has;\n  var wmset = store.set;\n  set = function (it, metadata) {\n    if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n    metadata.facade = it;\n    wmset.call(store, it, metadata);\n    return metadata;\n  };\n  get = function (it) {\n    return wmget.call(store, it) || {};\n  };\n  has = function (it) {\n    return wmhas.call(store, it);\n  };\n} else {\n  var STATE = sharedKey('state');\n  hiddenKeys[STATE] = true;\n  set = function (it, metadata) {\n    if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n    metadata.facade = it;\n    createNonEnumerableProperty(it, STATE, metadata);\n    return metadata;\n  };\n  get = function (it) {\n    return hasOwn(it, STATE) ? it[STATE] : {};\n  };\n  has = function (it) {\n    return hasOwn(it, STATE);\n  };\n}\n\nmodule.exports = {\n  set: set,\n  get: get,\n  has: has,\n  enforce: enforce,\n  getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n  return keys[key] || (keys[key] = uid(key));\n};\n","module.exports = {};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n  EXISTS: EXISTS,\n  PROPER: PROPER,\n  CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n  var unsafe = options ? !!options.unsafe : false;\n  var simple = options ? !!options.enumerable : false;\n  var noTargetGet = options ? !!options.noTargetGet : false;\n  var name = options && options.name !== undefined ? options.name : key;\n  var state;\n  if (isCallable(value)) {\n    if (String(name).slice(0, 7) === 'Symbol(') {\n      name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n    }\n    if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n      createNonEnumerableProperty(value, 'name', name);\n    }\n    state = enforceInternalState(value);\n    if (!state.source) {\n      state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n    }\n  }\n  if (O === global) {\n    if (simple) O[key] = value;\n    else setGlobal(key, value);\n    return;\n  } else if (!unsafe) {\n    delete O[key];\n  } else if (!noTargetGet && O[key]) {\n    simple = true;\n  }\n  if (simple) O[key] = value;\n  else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n  return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n  return toString.call(it).slice(8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n  try {\n    return it[key];\n  } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n  var O, tag, result;\n  return it === undefined ? 'Undefined' : it === null ? 'Null'\n    // @@toStringTag case\n    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n    // builtinTag case\n    : CORRECT_ARGUMENTS ? classofRaw(O)\n    // ES3 arguments fallback\n    : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n  return '[object ' + classof(this) + ']';\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar redefine = require('../internals/redefine');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n  redefine(Object.prototype, 'toString', toString, { unsafe: true });\n}\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n  var descriptor = getOwnPropertyDescriptor(this, V);\n  return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n  // eslint-disable-next-line no-prototype-builtins -- safe\n  return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n  return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n  return IndexedObject(requireObjectCoercible(it));\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n  O = toIndexedObject(O);\n  P = toPropertyKey(P);\n  if (IE8_DOM_DEFINE) try {\n    return $getOwnPropertyDescriptor(O, P);\n  } catch (error) { /* empty */ }\n  if (hasOwn(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n  var number = +argument;\n  // eslint-disable-next-line no-self-compare -- safe\n  return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n  var integer = toIntegerOrInfinity(index);\n  return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n  return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n  return toLength(obj.length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n  return function ($this, el, fromIndex) {\n    var O = toIndexedObject($this);\n    var length = lengthOfArrayLike(O);\n    var index = toAbsoluteIndex(fromIndex, length);\n    var value;\n    // Array#includes uses SameValueZero equality algorithm\n    // eslint-disable-next-line no-self-compare -- NaN check\n    if (IS_INCLUDES && el != el) while (length > index) {\n      value = O[index++];\n      // eslint-disable-next-line no-self-compare -- NaN check\n      if (value != value) return true;\n    // Array#indexOf ignores holes, Array#includes - not\n    } else for (;length > index; index++) {\n      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n    } return !IS_INCLUDES && -1;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.includes` method\n  // https://tc39.es/ecma262/#sec-array.prototype.includes\n  includes: createMethod(true),\n  // `Array.prototype.indexOf` method\n  // https://tc39.es/ecma262/#sec-array.prototype.indexof\n  indexOf: createMethod(false)\n};\n","var hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n  var O = toIndexedObject(object);\n  var i = 0;\n  var result = [];\n  var key;\n  for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && result.push(key);\n  // Don't enum bug & hidden keys\n  while (names.length > i) if (hasOwn(O, key = names[i++])) {\n    ~indexOf(result, key) || result.push(key);\n  }\n  return result;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n  'constructor',\n  'hasOwnProperty',\n  'isPrototypeOf',\n  'propertyIsEnumerable',\n  'toLocaleString',\n  'toString',\n  'valueOf'\n];\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n  return internalObjectKeys(O, hiddenKeys);\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n  var keys = getOwnPropertyNamesModule.f(anObject(it));\n  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n  var keys = ownKeys(source);\n  var defineProperty = definePropertyModule.f;\n  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n  for (var i = 0; i < keys.length; i++) {\n    var key = keys[i];\n    if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n  }\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n  var value = data[normalize(feature)];\n  return value == POLYFILL ? true\n    : value == NATIVE ? false\n    : isCallable(detection) ? fails(detection)\n    : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n  return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n  options.target      - name of the target object\n  options.global      - target is the global object\n  options.stat        - export as static methods of target\n  options.proto       - export as prototype methods of target\n  options.real        - real prototype method for the `pure` version\n  options.forced      - export even if the native feature is available\n  options.bind        - bind methods to the target, required for the `pure` version\n  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version\n  options.unsafe      - use the simple assignment of property instead of delete + defineProperty\n  options.sham        - add a flag to not completely full polyfills\n  options.enumerable  - export as enumerable property\n  options.noTargetGet - prevent calling a getter on target\n  options.name        - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n  var TARGET = options.target;\n  var GLOBAL = options.global;\n  var STATIC = options.stat;\n  var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n  if (GLOBAL) {\n    target = global;\n  } else if (STATIC) {\n    target = global[TARGET] || setGlobal(TARGET, {});\n  } else {\n    target = (global[TARGET] || {}).prototype;\n  }\n  if (target) for (key in source) {\n    sourceProperty = source[key];\n    if (options.noTargetGet) {\n      descriptor = getOwnPropertyDescriptor(target, key);\n      targetProperty = descriptor && descriptor.value;\n    } else targetProperty = target[key];\n    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n    // contained in target\n    if (!FORCED && targetProperty !== undefined) {\n      if (typeof sourceProperty === typeof targetProperty) continue;\n      copyConstructorProperties(sourceProperty, targetProperty);\n    }\n    // add a flag to not completely full polyfills\n    if (options.sham || (targetProperty && targetProperty.sham)) {\n      createNonEnumerableProperty(sourceProperty, 'sham', true);\n    }\n    // extend global\n    redefine(target, key, sourceProperty, options);\n  }\n};\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n  for (var key in src) redefine(target, key, src[key], options);\n  return target;\n};\n","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n  var CORRECT_SETTER = false;\n  var test = {};\n  var setter;\n  try {\n    // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n    setter.call(test, []);\n    CORRECT_SETTER = test instanceof Array;\n  } catch (error) { /* empty */ }\n  return function setPrototypeOf(O, proto) {\n    anObject(O);\n    aPossiblePrototype(proto);\n    if (CORRECT_SETTER) setter.call(O, proto);\n    else O.__proto__ = proto;\n    return O;\n  };\n}() : undefined);\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (argument) {\n  if (typeof argument === 'object' || isCallable(argument)) return argument;\n  throw TypeError(\"Can't set \" + String(argument) + ' as a prototype');\n};\n","var defineProperty = require('../internals/object-define-property').f;\nvar hasOwn = require('../internals/has-own-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n  if (it && !hasOwn(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n  }\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n  var defineProperty = definePropertyModule.f;\n\n  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n    defineProperty(Constructor, SPECIES, {\n      configurable: true,\n      get: function () { return this; }\n    });\n  }\n};\n","module.exports = function (it, Constructor, name) {\n  if (it instanceof Constructor) return it;\n  throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n};\n","module.exports = {};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var aCallable = require('../internals/a-callable');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n  aCallable(fn);\n  if (that === undefined) return fn;\n  switch (length) {\n    case 0: return function () {\n      return fn.call(that);\n    };\n    case 1: return function (a) {\n      return fn.call(that, a);\n    };\n    case 2: return function (a, b) {\n      return fn.call(that, a, b);\n    };\n    case 3: return function (a, b, c) {\n      return fn.call(that, a, b, c);\n    };\n  }\n  return function (/* ...args */) {\n    return fn.apply(that, arguments);\n  };\n};\n","var classof = require('../internals/classof');\nvar getMethod = require('../internals/get-method');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n  if (it != undefined) return getMethod(it, ITERATOR)\n    || getMethod(it, '@@iterator')\n    || Iterators[classof(it)];\n};\n","var aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (argument, usingIterator) {\n  var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n  if (aCallable(iteratorMethod)) return anObject(iteratorMethod.call(argument));\n  throw TypeError(String(argument) + ' is not iterable');\n};\n","var anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n  var innerResult, innerError;\n  anObject(iterator);\n  try {\n    innerResult = getMethod(iterator, 'return');\n    if (!innerResult) {\n      if (kind === 'throw') throw value;\n      return value;\n    }\n    innerResult = innerResult.call(iterator);\n  } catch (error) {\n    innerError = true;\n    innerResult = error;\n  }\n  if (kind === 'throw') throw value;\n  if (innerError) throw innerResult;\n  anObject(innerResult);\n  return value;\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar bind = require('../internals/function-bind-context');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n  this.stopped = stopped;\n  this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n  var that = options && options.that;\n  var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n  var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n  var INTERRUPTED = !!(options && options.INTERRUPTED);\n  var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n  var iterator, iterFn, index, length, result, next, step;\n\n  var stop = function (condition) {\n    if (iterator) iteratorClose(iterator, 'normal', condition);\n    return new Result(true, condition);\n  };\n\n  var callFn = function (value) {\n    if (AS_ENTRIES) {\n      anObject(value);\n      return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n    } return INTERRUPTED ? fn(value, stop) : fn(value);\n  };\n\n  if (IS_ITERATOR) {\n    iterator = iterable;\n  } else {\n    iterFn = getIteratorMethod(iterable);\n    if (!iterFn) throw TypeError(String(iterable) + ' is not iterable');\n    // optimisation for array iterators\n    if (isArrayIteratorMethod(iterFn)) {\n      for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n        result = callFn(iterable[index]);\n        if (result && result instanceof Result) return result;\n      } return new Result(false);\n    }\n    iterator = getIterator(iterable, iterFn);\n  }\n\n  next = iterator.next;\n  while (!(step = next.call(iterator)).done) {\n    try {\n      result = callFn(step.value);\n    } catch (error) {\n      iteratorClose(iterator, 'throw', error);\n    }\n    if (typeof result == 'object' && result && result instanceof Result) return result;\n  } return new Result(false);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n  var called = 0;\n  var iteratorWithReturn = {\n    next: function () {\n      return { done: !!called++ };\n    },\n    'return': function () {\n      SAFE_CLOSING = true;\n    }\n  };\n  iteratorWithReturn[ITERATOR] = function () {\n    return this;\n  };\n  // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n  Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n  var ITERATION_SUPPORT = false;\n  try {\n    var object = {};\n    object[ITERATOR] = function () {\n      return {\n        next: function () {\n          return { done: ITERATION_SUPPORT = true };\n        }\n      };\n    };\n    exec(object);\n  } catch (error) { /* empty */ }\n  return ITERATION_SUPPORT;\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\n\ntry {\n  // Deno throws a ReferenceError on `location` access without `--location` flag\n  location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n  // eslint-disable-next-line no-prototype-builtins -- safe\n  if (queue.hasOwnProperty(id)) {\n    var fn = queue[id];\n    delete queue[id];\n    fn();\n  }\n};\n\nvar runner = function (id) {\n  return function () {\n    run(id);\n  };\n};\n\nvar listener = function (event) {\n  run(event.data);\n};\n\nvar post = function (id) {\n  // old engines have not location.origin\n  global.postMessage(String(id), location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n  set = function setImmediate(fn) {\n    var args = [];\n    var argumentsLength = arguments.length;\n    var i = 1;\n    while (argumentsLength > i) args.push(arguments[i++]);\n    queue[++counter] = function () {\n      // eslint-disable-next-line no-new-func -- spec requirement\n      (isCallable(fn) ? fn : Function(fn)).apply(undefined, args);\n    };\n    defer(counter);\n    return counter;\n  };\n  clear = function clearImmediate(id) {\n    delete queue[id];\n  };\n  // Node.js 0.8-\n  if (IS_NODE) {\n    defer = function (id) {\n      process.nextTick(runner(id));\n    };\n  // Sphere (JS game engine) Dispatch API\n  } else if (Dispatch && Dispatch.now) {\n    defer = function (id) {\n      Dispatch.now(runner(id));\n    };\n  // Browsers with MessageChannel, includes WebWorkers\n  // except iOS - https://github.com/zloirock/core-js/issues/624\n  } else if (MessageChannel && !IS_IOS) {\n    channel = new MessageChannel();\n    port = channel.port2;\n    channel.port1.onmessage = listener;\n    defer = bind(port.postMessage, port, 1);\n  // Browsers with postMessage, skip WebWorkers\n  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n  } else if (\n    global.addEventListener &&\n    isCallable(global.postMessage) &&\n    !global.importScripts &&\n    location && location.protocol !== 'file:' &&\n    !fails(post)\n  ) {\n    defer = post;\n    global.addEventListener('message', listener, false);\n  // IE8-\n  } else if (ONREADYSTATECHANGE in createElement('script')) {\n    defer = function (id) {\n      html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n        html.removeChild(this);\n        run(id);\n      };\n    };\n  // Rest old browsers\n  } else {\n    defer = function (id) {\n      setTimeout(runner(id), 0);\n    };\n  }\n}\n\nmodule.exports = {\n  set: set,\n  clear: clear\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = constructorRegExp.exec;\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(function () { /* empty */ });\n\nvar isConstructorModern = function (argument) {\n  if (!isCallable(argument)) return false;\n  try {\n    construct(Object, empty, argument);\n    return true;\n  } catch (error) {\n    return false;\n  }\n};\n\nvar isConstructorLegacy = function (argument) {\n  if (!isCallable(argument)) return false;\n  switch (classof(argument)) {\n    case 'AsyncFunction':\n    case 'GeneratorFunction':\n    case 'AsyncGeneratorFunction': return false;\n    // we can't check .prototype since constructors produced by .bind haven't it\n  } return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n  var called;\n  return isConstructorModern(isConstructorModern.call)\n    || !isConstructorModern(Object)\n    || !isConstructorModern(function () { called = true; })\n    || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n  var C = anObject(O).constructor;\n  var S;\n  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);\n};\n","var isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n  if (isConstructor(argument)) return argument;\n  throw TypeError(tryToString(argument) + ' is not a constructor');\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);\n","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n  flush = function () {\n    var parent, fn;\n    if (IS_NODE && (parent = process.domain)) parent.exit();\n    while (head) {\n      fn = head.fn;\n      head = head.next;\n      try {\n        fn();\n      } catch (error) {\n        if (head) notify();\n        else last = undefined;\n        throw error;\n      }\n    } last = undefined;\n    if (parent) parent.enter();\n  };\n\n  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n  // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n  if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n    toggle = true;\n    node = document.createTextNode('');\n    new MutationObserver(flush).observe(node, { characterData: true });\n    notify = function () {\n      node.data = toggle = !toggle;\n    };\n  // environments with maybe non-completely correct, but existent Promise\n  } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n    // Promise.resolve without an argument throws an error in LG WebOS 2\n    promise = Promise.resolve(undefined);\n    // workaround of WebKit ~ iOS Safari 10.1 bug\n    promise.constructor = Promise;\n    then = promise.then;\n    notify = function () {\n      then.call(promise, flush);\n    };\n  // Node.js without promises\n  } else if (IS_NODE) {\n    notify = function () {\n      process.nextTick(flush);\n    };\n  // for other environments - macrotask based on:\n  // - setImmediate\n  // - MessageChannel\n  // - window.postMessag\n  // - onreadystatechange\n  // - setTimeout\n  } else {\n    notify = function () {\n      // strange IE + webpack dev server bug - use .call(global)\n      macrotask.call(global, flush);\n    };\n  }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n  var task = { fn: fn, next: undefined };\n  if (last) last.next = task;\n  if (!head) {\n    head = task;\n    notify();\n  } last = task;\n};\n","var userAgent = require('../internals/engine-user-agent');\nvar global = require('../internals/global');\n\nmodule.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n  var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n  // We can't detect it synchronously, so just check versions\n  if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n  // We need Promise#finally in the pure version for preventing prototype pollution\n  if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n  // We can't use @@species feature detection in V8 since it causes\n  // deoptimization and performance degradation\n  // https://github.com/zloirock/core-js/issues/679\n  if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n  // Detect correctness of subclassing with @@species support\n  var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n  var FakePromise = function (exec) {\n    exec(function () { /* empty */ }, function () { /* empty */ });\n  };\n  var constructor = promise.constructor = {};\n  constructor[SPECIES] = FakePromise;\n  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n  if (!SUBCLASSING) return true;\n  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n  return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n  PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n  var then;\n  return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar notify = function (state, isReject) {\n  if (state.notified) return;\n  state.notified = true;\n  var chain = state.reactions;\n  microtask(function () {\n    var value = state.value;\n    var ok = state.state == FULFILLED;\n    var index = 0;\n    // variable length - can't use forEach\n    while (chain.length > index) {\n      var reaction = chain[index++];\n      var handler = ok ? reaction.ok : reaction.fail;\n      var resolve = reaction.resolve;\n      var reject = reaction.reject;\n      var domain = reaction.domain;\n      var result, then, exited;\n      try {\n        if (handler) {\n          if (!ok) {\n            if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n            state.rejection = HANDLED;\n          }\n          if (handler === true) result = value;\n          else {\n            if (domain) domain.enter();\n            result = handler(value); // can throw\n            if (domain) {\n              domain.exit();\n              exited = true;\n            }\n          }\n          if (result === reaction.promise) {\n            reject(TypeError('Promise-chain cycle'));\n          } else if (then = isThenable(result)) {\n            then.call(result, resolve, reject);\n          } else resolve(result);\n        } else reject(value);\n      } catch (error) {\n        if (domain && !exited) domain.exit();\n        reject(error);\n      }\n    }\n    state.reactions = [];\n    state.notified = false;\n    if (isReject && !state.rejection) onUnhandled(state);\n  });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n  var event, handler;\n  if (DISPATCH_EVENT) {\n    event = document.createEvent('Event');\n    event.promise = promise;\n    event.reason = reason;\n    event.initEvent(name, false, true);\n    global.dispatchEvent(event);\n  } else event = { promise: promise, reason: reason };\n  if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n  task.call(global, function () {\n    var promise = state.facade;\n    var value = state.value;\n    var IS_UNHANDLED = isUnhandled(state);\n    var result;\n    if (IS_UNHANDLED) {\n      result = perform(function () {\n        if (IS_NODE) {\n          process.emit('unhandledRejection', value, promise);\n        } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n      });\n      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n      state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n      if (result.error) throw result.value;\n    }\n  });\n};\n\nvar isUnhandled = function (state) {\n  return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n  task.call(global, function () {\n    var promise = state.facade;\n    if (IS_NODE) {\n      process.emit('rejectionHandled', promise);\n    } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n  });\n};\n\nvar bind = function (fn, state, unwrap) {\n  return function (value) {\n    fn(state, value, unwrap);\n  };\n};\n\nvar internalReject = function (state, value, unwrap) {\n  if (state.done) return;\n  state.done = true;\n  if (unwrap) state = unwrap;\n  state.value = value;\n  state.state = REJECTED;\n  notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n  if (state.done) return;\n  state.done = true;\n  if (unwrap) state = unwrap;\n  try {\n    if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n    var then = isThenable(value);\n    if (then) {\n      microtask(function () {\n        var wrapper = { done: false };\n        try {\n          then.call(value,\n            bind(internalResolve, wrapper, state),\n            bind(internalReject, wrapper, state)\n          );\n        } catch (error) {\n          internalReject(wrapper, error, state);\n        }\n      });\n    } else {\n      state.value = value;\n      state.state = FULFILLED;\n      notify(state, false);\n    }\n  } catch (error) {\n    internalReject({ done: false }, error, state);\n  }\n};\n\n// constructor polyfill\nif (FORCED) {\n  // 25.4.3.1 Promise(executor)\n  PromiseConstructor = function Promise(executor) {\n    anInstance(this, PromiseConstructor, PROMISE);\n    aCallable(executor);\n    Internal.call(this);\n    var state = getInternalState(this);\n    try {\n      executor(bind(internalResolve, state), bind(internalReject, state));\n    } catch (error) {\n      internalReject(state, error);\n    }\n  };\n  PromiseConstructorPrototype = PromiseConstructor.prototype;\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  Internal = function Promise(executor) {\n    setInternalState(this, {\n      type: PROMISE,\n      done: false,\n      notified: false,\n      parent: false,\n      reactions: [],\n      rejection: false,\n      state: PENDING,\n      value: undefined\n    });\n  };\n  Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n    // `Promise.prototype.then` method\n    // https://tc39.es/ecma262/#sec-promise.prototype.then\n    then: function then(onFulfilled, onRejected) {\n      var state = getInternalPromiseState(this);\n      var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n      reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n      reaction.fail = isCallable(onRejected) && onRejected;\n      reaction.domain = IS_NODE ? process.domain : undefined;\n      state.parent = true;\n      state.reactions.push(reaction);\n      if (state.state != PENDING) notify(state, false);\n      return reaction.promise;\n    },\n    // `Promise.prototype.catch` method\n    // https://tc39.es/ecma262/#sec-promise.prototype.catch\n    'catch': function (onRejected) {\n      return this.then(undefined, onRejected);\n    }\n  });\n  OwnPromiseCapability = function () {\n    var promise = new Internal();\n    var state = getInternalState(promise);\n    this.promise = promise;\n    this.resolve = bind(internalResolve, state);\n    this.reject = bind(internalReject, state);\n  };\n  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n    return C === PromiseConstructor || C === PromiseWrapper\n      ? new OwnPromiseCapability(C)\n      : newGenericPromiseCapability(C);\n  };\n\n  if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {\n    nativeThen = NativePromisePrototype.then;\n\n    if (!SUBCLASSING) {\n      // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n      redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n        var that = this;\n        return new PromiseConstructor(function (resolve, reject) {\n          nativeThen.call(that, resolve, reject);\n        }).then(onFulfilled, onRejected);\n      // https://github.com/zloirock/core-js/issues/640\n      }, { unsafe: true });\n\n      // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n      redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n    }\n\n    // make `.constructor === Promise` work for native promise-based APIs\n    try {\n      delete NativePromisePrototype.constructor;\n    } catch (error) { /* empty */ }\n\n    // make `instanceof Promise` work for native promise-based APIs\n    if (setPrototypeOf) {\n      setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n    }\n  }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n  Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n  // `Promise.reject` method\n  // https://tc39.es/ecma262/#sec-promise.reject\n  reject: function reject(r) {\n    var capability = newPromiseCapability(this);\n    capability.reject.call(undefined, r);\n    return capability.promise;\n  }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n  // `Promise.resolve` method\n  // https://tc39.es/ecma262/#sec-promise.resolve\n  resolve: function resolve(x) {\n    return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n  }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n  // `Promise.all` method\n  // https://tc39.es/ecma262/#sec-promise.all\n  all: function all(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var resolve = capability.resolve;\n    var reject = capability.reject;\n    var result = perform(function () {\n      var $promiseResolve = aCallable(C.resolve);\n      var values = [];\n      var counter = 0;\n      var remaining = 1;\n      iterate(iterable, function (promise) {\n        var index = counter++;\n        var alreadyCalled = false;\n        values.push(undefined);\n        remaining++;\n        $promiseResolve.call(C, promise).then(function (value) {\n          if (alreadyCalled) return;\n          alreadyCalled = true;\n          values[index] = value;\n          --remaining || resolve(values);\n        }, reject);\n      });\n      --remaining || resolve(values);\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  },\n  // `Promise.race` method\n  // https://tc39.es/ecma262/#sec-promise.race\n  race: function race(iterable) {\n    var C = this;\n    var capability = newPromiseCapability(C);\n    var reject = capability.reject;\n    var result = perform(function () {\n      var $promiseResolve = aCallable(C.resolve);\n      iterate(iterable, function (promise) {\n        $promiseResolve.call(C, promise).then(capability.resolve, reject);\n      });\n    });\n    if (result.error) reject(result.value);\n    return capability.promise;\n  }\n});\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar PromiseCapability = function (C) {\n  var resolve, reject;\n  this.promise = new C(function ($$resolve, $$reject) {\n    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n    resolve = $$resolve;\n    reject = $$reject;\n  });\n  this.resolve = aCallable(resolve);\n  this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n  return new PromiseCapability(C);\n};\n","module.exports = function (exec) {\n  try {\n    return { error: false, value: exec() };\n  } catch (error) {\n    return { error: true, value: error };\n  }\n};\n","module.exports = typeof window == 'object';\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n  var console = global.console;\n  if (console && console.error) {\n    arguments.length === 1 ? console.error(a) : console.error(a, b);\n  }\n};\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n  anObject(C);\n  if (isObject(x) && x.constructor === C) return x;\n  var promiseCapability = newPromiseCapability.f(C);\n  var resolve = promiseCapability.resolve;\n  resolve(x);\n  return promiseCapability.promise;\n};\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Reflect.deleteProperty` method\n// https://tc39.es/ecma262/#sec-reflect.deleteproperty\n$({ target: 'Reflect', stat: true }, {\n  deleteProperty: function deleteProperty(target, propertyKey) {\n    var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);\n    return descriptor && !descriptor.configurable ? false : delete target[propertyKey];\n  }\n});\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = GeneratorFunctionPrototype;\n  define(Gp, \"constructor\", GeneratorFunctionPrototype);\n  define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  });\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        // Note: [\"return\"] must be used for ES3 parsing compatibility.\n        if (delegate.iterator[\"return\"]) {\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method = \"return\";\n          context.arg = undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if (context.method === \"throw\") {\n            // If maybeInvokeDelegate(context) changed context.method from\n            // \"return\" to \"throw\", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  define(Gp, iteratorSymbol, function() {\n    return this;\n  });\n\n  define(Gp, \"toString\", function() {\n    return \"[object Generator]\";\n  });\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(object) {\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n  typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, in modern engines\n  // we can explicitly access globalThis. In older engines we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\n\nfunction _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n        args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n\n      _next(undefined);\n    });\n  };\n}\n\nmodule.exports = _asyncToGenerator;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n  return classof(argument) == 'Array';\n};\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n  var C;\n  if (isArray(originalArray)) {\n    C = originalArray.constructor;\n    // cross-realm fallback\n    if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;\n    else if (isObject(C)) {\n      C = C[SPECIES];\n      if (C === null) C = undefined;\n    }\n  } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n  return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n  var IS_MAP = TYPE == 1;\n  var IS_FILTER = TYPE == 2;\n  var IS_SOME = TYPE == 3;\n  var IS_EVERY = TYPE == 4;\n  var IS_FIND_INDEX = TYPE == 6;\n  var IS_FILTER_REJECT = TYPE == 7;\n  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n  return function ($this, callbackfn, that, specificCreate) {\n    var O = toObject($this);\n    var self = IndexedObject(O);\n    var boundFunction = bind(callbackfn, that, 3);\n    var length = lengthOfArrayLike(self);\n    var index = 0;\n    var create = specificCreate || arraySpeciesCreate;\n    var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n    var value, result;\n    for (;length > index; index++) if (NO_HOLES || index in self) {\n      value = self[index];\n      result = boundFunction(value, index, O);\n      if (TYPE) {\n        if (IS_MAP) target[index] = result; // map\n        else if (result) switch (TYPE) {\n          case 3: return true;              // some\n          case 5: return value;             // find\n          case 6: return index;             // findIndex\n          case 2: push.call(target, value); // filter\n        } else switch (TYPE) {\n          case 4: return false;             // every\n          case 7: push.call(target, value); // filterReject\n        }\n      }\n    }\n    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.forEach` method\n  // https://tc39.es/ecma262/#sec-array.prototype.foreach\n  forEach: createMethod(0),\n  // `Array.prototype.map` method\n  // https://tc39.es/ecma262/#sec-array.prototype.map\n  map: createMethod(1),\n  // `Array.prototype.filter` method\n  // https://tc39.es/ecma262/#sec-array.prototype.filter\n  filter: createMethod(2),\n  // `Array.prototype.some` method\n  // https://tc39.es/ecma262/#sec-array.prototype.some\n  some: createMethod(3),\n  // `Array.prototype.every` method\n  // https://tc39.es/ecma262/#sec-array.prototype.every\n  every: createMethod(4),\n  // `Array.prototype.find` method\n  // https://tc39.es/ecma262/#sec-array.prototype.find\n  find: createMethod(5),\n  // `Array.prototype.findIndex` method\n  // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n  findIndex: createMethod(6),\n  // `Array.prototype.filterReject` method\n  // https://github.com/tc39/proposal-array-filtering\n  filterReject: createMethod(7)\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n  // We can't use this feature detection in V8 since it causes\n  // deoptimization and serious performance degradation\n  // https://github.com/zloirock/core-js/issues/677\n  return V8_VERSION >= 51 || !fails(function () {\n    var array = [];\n    var constructor = array.constructor = {};\n    constructor[SPECIES] = function () {\n      return { foo: 1 };\n    };\n    return array[METHOD_NAME](Boolean).foo !== 1;\n  });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n  map: function map(callbackfn /* , thisArg */) {\n    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","var classof = require('../internals/classof');\n\nmodule.exports = function (argument) {\n  if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n  return String(argument);\n};\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n  '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n  return function ($this) {\n    var string = toString(requireObjectCoercible($this));\n    if (TYPE & 1) string = string.replace(ltrim, '');\n    if (TYPE & 2) string = string.replace(rtrim, '');\n    return string;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.{ trimLeft, trimStart }` methods\n  // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n  start: createMethod(1),\n  // `String.prototype.{ trimRight, trimEnd }` methods\n  // https://tc39.es/ecma262/#sec-string.prototype.trimend\n  end: createMethod(2),\n  // `String.prototype.trim` method\n  // https://tc39.es/ecma262/#sec-string.prototype.trim\n  trim: createMethod(3)\n};\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar toString = require('../internals/to-string');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseFloat = global.parseFloat;\nvar Symbol = global.Symbol;\nvar ITERATOR = Symbol && Symbol.iterator;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity\n  // MS Edge 18- broken with boxed symbols\n  || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); }));\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n  var trimmedString = trim(toString(string));\n  var result = $parseFloat(trimmedString);\n  return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n","var $ = require('../internals/export');\nvar $parseFloat = require('../internals/number-parse-float');\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\n$({ global: true, forced: parseFloat != $parseFloat }, {\n  parseFloat: $parseFloat\n});\n","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n  var that = anObject(this);\n  var result = '';\n  if (that.global) result += 'g';\n  if (that.ignoreCase) result += 'i';\n  if (that.multiline) result += 'm';\n  if (that.dotAll) result += 's';\n  if (that.unicode) result += 'u';\n  if (that.sticky) result += 'y';\n  return result;\n};\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n  return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n  activeXDocument.write(scriptTag(''));\n  activeXDocument.close();\n  var temp = activeXDocument.parentWindow.Object;\n  activeXDocument = null; // avoid memory leak\n  return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n  // Thrash, waste and sodomy: IE GC bug\n  var iframe = documentCreateElement('iframe');\n  var JS = 'java' + SCRIPT + ':';\n  var iframeDocument;\n  iframe.style.display = 'none';\n  html.appendChild(iframe);\n  // https://github.com/zloirock/core-js/issues/475\n  iframe.src = String(JS);\n  iframeDocument = iframe.contentWindow.document;\n  iframeDocument.open();\n  iframeDocument.write(scriptTag('document.F=Object'));\n  iframeDocument.close();\n  return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n  try {\n    activeXDocument = new ActiveXObject('htmlfile');\n  } catch (error) { /* ignore */ }\n  NullProtoObject = typeof document != 'undefined'\n    ? document.domain && activeXDocument\n      ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n      : NullProtoObjectViaIFrame()\n    : NullProtoObjectViaActiveX(activeXDocument); // WSH\n  var length = enumBugKeys.length;\n  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n  return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n  var result;\n  if (O !== null) {\n    EmptyConstructor[PROTOTYPE] = anObject(O);\n    result = new EmptyConstructor();\n    EmptyConstructor[PROTOTYPE] = null;\n    // add \"__proto__\" for Object.getPrototypeOf polyfill\n    result[IE_PROTO] = O;\n  } else result = NullProtoObject();\n  return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nexports.UNSUPPORTED_Y = fails(function () {\n  var re = $RegExp('a', 'y');\n  re.lastIndex = 2;\n  return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n  var re = $RegExp('^r', 'gy');\n  re.lastIndex = 2;\n  return re.exec('str') != null;\n});\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n  return internalObjectKeys(O, enumBugKeys);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n  anObject(O);\n  var keys = objectKeys(Properties);\n  var length = keys.length;\n  var index = 0;\n  var key;\n  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n  return O;\n};\n","'use strict';\n/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar toString = require('../internals/to-string');\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n  var re1 = /a/;\n  var re2 = /b*/g;\n  nativeExec.call(re1, 'a');\n  nativeExec.call(re2, 'a');\n  return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nif (PATCH) {\n  // eslint-disable-next-line max-statements -- TODO\n  patchedExec = function exec(string) {\n    var re = this;\n    var state = getInternalState(re);\n    var str = toString(string);\n    var raw = state.raw;\n    var result, reCopy, lastIndex, match, i, object, group;\n\n    if (raw) {\n      raw.lastIndex = re.lastIndex;\n      result = patchedExec.call(raw, str);\n      re.lastIndex = raw.lastIndex;\n      return result;\n    }\n\n    var groups = state.groups;\n    var sticky = UNSUPPORTED_Y && re.sticky;\n    var flags = regexpFlags.call(re);\n    var source = re.source;\n    var charsAdded = 0;\n    var strCopy = str;\n\n    if (sticky) {\n      flags = flags.replace('y', '');\n      if (flags.indexOf('g') === -1) {\n        flags += 'g';\n      }\n\n      strCopy = str.slice(re.lastIndex);\n      // Support anchored sticky behavior.\n      if (re.lastIndex > 0 && (!re.multiline || re.multiline && str.charAt(re.lastIndex - 1) !== '\\n')) {\n        source = '(?: ' + source + ')';\n        strCopy = ' ' + strCopy;\n        charsAdded++;\n      }\n      // ^(? + rx + ) is needed, in combination with some str slicing, to\n      // simulate the 'y' flag.\n      reCopy = new RegExp('^(?:' + source + ')', flags);\n    }\n\n    if (NPCG_INCLUDED) {\n      reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n    }\n    if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n    match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n    if (sticky) {\n      if (match) {\n        match.input = match.input.slice(charsAdded);\n        match[0] = match[0].slice(charsAdded);\n        match.index = re.lastIndex;\n        re.lastIndex += match[0].length;\n      } else re.lastIndex = 0;\n    } else if (UPDATES_LAST_INDEX_WRONG && match) {\n      re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n    }\n    if (NPCG_INCLUDED && match && match.length > 1) {\n      // Fix browsers whose `exec` methods don't consistently return `undefined`\n      // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n      nativeReplace.call(match[0], reCopy, function () {\n        for (i = 1; i < arguments.length - 2; i++) {\n          if (arguments[i] === undefined) match[i] = undefined;\n        }\n      });\n    }\n\n    if (match && groups) {\n      match.groups = object = create(null);\n      for (i = 0; i < groups.length; i++) {\n        group = groups[i];\n        object[group[0]] = match[group[1]];\n      }\n    }\n\n    return match;\n  };\n}\n\nmodule.exports = patchedExec;\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n  var re = $RegExp('.', 's');\n  return !(re.dotAll && re.exec('\\n') && re.flags === 's');\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n  var re = $RegExp('(?<a>b)', 'g');\n  return re.exec('b').groups.a !== 'b' ||\n    'b'.replace(re, '$<a>c') !== 'bc';\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n  exec: exec\n});\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n  var SYMBOL = wellKnownSymbol(KEY);\n\n  var DELEGATES_TO_SYMBOL = !fails(function () {\n    // String methods call symbol-named RegEp methods\n    var O = {};\n    O[SYMBOL] = function () { return 7; };\n    return ''[KEY](O) != 7;\n  });\n\n  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n    // Symbol-named RegExp methods call .exec\n    var execCalled = false;\n    var re = /a/;\n\n    if (KEY === 'split') {\n      // We can't use real regex here since it causes deoptimization\n      // and serious performance degradation in V8\n      // https://github.com/zloirock/core-js/issues/306\n      re = {};\n      // RegExp[@@split] doesn't call the regex's exec method, but first creates\n      // a new one. We need to return the patched regex when creating the new one.\n      re.constructor = {};\n      re.constructor[SPECIES] = function () { return re; };\n      re.flags = '';\n      re[SYMBOL] = /./[SYMBOL];\n    }\n\n    re.exec = function () { execCalled = true; return null; };\n\n    re[SYMBOL]('');\n    return !execCalled;\n  });\n\n  if (\n    !DELEGATES_TO_SYMBOL ||\n    !DELEGATES_TO_EXEC ||\n    FORCED\n  ) {\n    var nativeRegExpMethod = /./[SYMBOL];\n    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n      var $exec = regexp.exec;\n      if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n          // The native String method already delegates to @@method (this\n          // polyfilled function), leasing to infinite recursion.\n          // We avoid it by directly calling the native @@method method.\n          return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n        }\n        return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n      }\n      return { done: false };\n    });\n\n    redefine(String.prototype, KEY, methods[0]);\n    redefine(RegExpPrototype, SYMBOL, methods[1]);\n  }\n\n  if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar createMethod = function (CONVERT_TO_STRING) {\n  return function ($this, pos) {\n    var S = toString(requireObjectCoercible($this));\n    var position = toIntegerOrInfinity(pos);\n    var size = S.length;\n    var first, second;\n    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n    first = S.charCodeAt(position);\n    return first < 0xD800 || first > 0xDBFF || position + 1 === size\n      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n        ? CONVERT_TO_STRING ? S.charAt(position) : first\n        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n  };\n};\n\nmodule.exports = {\n  // `String.prototype.codePointAt` method\n  // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n  codeAt: createMethod(false),\n  // `String.prototype.at` method\n  // https://github.com/mathiasbynens/String.prototype.at\n  charAt: createMethod(true)\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n  return index + (unicode ? charAt(S, index).length : 1);\n};\n","var anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar regexpExec = require('../internals/regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n  var exec = R.exec;\n  if (isCallable(exec)) {\n    var result = exec.call(R, S);\n    if (result !== null) anObject(result);\n    return result;\n  }\n  if (classof(R) === 'RegExp') return regexpExec.call(R, S);\n  throw TypeError('RegExp#exec called on incompatible receiver');\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n  return [\n    // `String.prototype.match` method\n    // https://tc39.es/ecma262/#sec-string.prototype.match\n    function match(regexp) {\n      var O = requireObjectCoercible(this);\n      var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);\n      return matcher ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n    },\n    // `RegExp.prototype[@@match]` method\n    // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n    function (string) {\n      var rx = anObject(this);\n      var S = toString(string);\n      var res = maybeCallNative(nativeMatch, rx, S);\n\n      if (res.done) return res.value;\n\n      if (!rx.global) return regExpExec(rx, S);\n\n      var fullUnicode = rx.unicode;\n      rx.lastIndex = 0;\n      var A = [];\n      var n = 0;\n      var result;\n      while ((result = regExpExec(rx, S)) !== null) {\n        var matchStr = toString(result[0]);\n        A[n] = matchStr;\n        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n        n++;\n      }\n      return n === 0 ? null : A;\n    }\n  ];\n});\n","var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n  var tailPos = position + matched.length;\n  var m = captures.length;\n  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n  if (namedCaptures !== undefined) {\n    namedCaptures = toObject(namedCaptures);\n    symbols = SUBSTITUTION_SYMBOLS;\n  }\n  return replace.call(replacement, symbols, function (match, ch) {\n    var capture;\n    switch (ch.charAt(0)) {\n      case '$': return '$';\n      case '&': return matched;\n      case '`': return str.slice(0, position);\n      case \"'\": return str.slice(tailPos);\n      case '<':\n        capture = namedCaptures[ch.slice(1, -1)];\n        break;\n      default: // \\d\\d?\n        var n = +ch;\n        if (n === 0) return match;\n        if (n > m) {\n          var f = floor(n / 10);\n          if (f === 0) return match;\n          if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n          return match;\n        }\n        capture = captures[n - 1];\n    }\n    return capture === undefined ? '' : capture;\n  });\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getMethod = require('../internals/get-method');\nvar getSubstitution = require('../internals/get-substitution');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar max = Math.max;\nvar min = Math.min;\n\nvar maybeToString = function (it) {\n  return it === undefined ? it : String(it);\n};\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n  // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n  return 'a'.replace(/./, '$0') === '$0';\n})();\n\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n  if (/./[REPLACE]) {\n    return /./[REPLACE]('a', '$0') === '';\n  }\n  return false;\n})();\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n  var re = /./;\n  re.exec = function () {\n    var result = [];\n    result.groups = { a: '7' };\n    return result;\n  };\n  // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive\n  return ''.replace(re, '$<a>') !== '7';\n});\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {\n  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n  return [\n    // `String.prototype.replace` method\n    // https://tc39.es/ecma262/#sec-string.prototype.replace\n    function replace(searchValue, replaceValue) {\n      var O = requireObjectCoercible(this);\n      var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);\n      return replacer\n        ? replacer.call(searchValue, O, replaceValue)\n        : nativeReplace.call(toString(O), searchValue, replaceValue);\n    },\n    // `RegExp.prototype[@@replace]` method\n    // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n    function (string, replaceValue) {\n      var rx = anObject(this);\n      var S = toString(string);\n\n      if (\n        typeof replaceValue === 'string' &&\n        replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1 &&\n        replaceValue.indexOf('$<') === -1\n      ) {\n        var res = maybeCallNative(nativeReplace, rx, S, replaceValue);\n        if (res.done) return res.value;\n      }\n\n      var functionalReplace = isCallable(replaceValue);\n      if (!functionalReplace) replaceValue = toString(replaceValue);\n\n      var global = rx.global;\n      if (global) {\n        var fullUnicode = rx.unicode;\n        rx.lastIndex = 0;\n      }\n      var results = [];\n      while (true) {\n        var result = regExpExec(rx, S);\n        if (result === null) break;\n\n        results.push(result);\n        if (!global) break;\n\n        var matchStr = toString(result[0]);\n        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n      }\n\n      var accumulatedResult = '';\n      var nextSourcePosition = 0;\n      for (var i = 0; i < results.length; i++) {\n        result = results[i];\n\n        var matched = toString(result[0]);\n        var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);\n        var captures = [];\n        // NOTE: This is equivalent to\n        //   captures = result.slice(1).map(maybeToString)\n        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n        // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n        for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n        var namedCaptures = result.groups;\n        if (functionalReplace) {\n          var replacerArgs = [matched].concat(captures, position, S);\n          if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n          var replacement = toString(replaceValue.apply(undefined, replacerArgs));\n        } else {\n          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n        }\n        if (position >= nextSourcePosition) {\n          accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n          nextSourcePosition = position + matched.length;\n        }\n      }\n      return accumulatedResult + S.slice(nextSourcePosition);\n    }\n  ];\n}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n  var isRegExp;\n  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar $startsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n  var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n  return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n  startsWith: function startsWith(searchString /* , position = 0 */) {\n    var that = toString(requireObjectCoercible(this));\n    notARegExp(searchString);\n    var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n    var search = toString(searchString);\n    return $startsWith\n      ? $startsWith.call(that, search, index)\n      : that.slice(index, index + search.length) === search;\n  }\n});\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n  if (isRegExp(it)) {\n    throw TypeError(\"The method doesn't accept regular expressions\");\n  } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n  var regexp = /./;\n  try {\n    '/./'[METHOD_NAME](regexp);\n  } catch (error1) {\n    try {\n      regexp[MATCH] = false;\n      return '/./'[METHOD_NAME](regexp);\n    } catch (error2) { /* empty */ }\n  } return false;\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n  var method = [][METHOD_NAME];\n  return !!method && fails(function () {\n    // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n    method.call(null, argument || function () { throw 1; }, 1);\n  });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = [].join;\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar STRICT_METHOD = arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.es/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {\n  join: function join(separator) {\n    return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n  }\n});\n","function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArrayLimit(arr, i) {\n  var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n  if (_i == null) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n\n  var _s, _e;\n\n  try {\n    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n\n  return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nmodule.exports = _classCallCheck;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nmodule.exports = _createClass;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","'use strict';\nvar toPropertyKey = require('../internals/to-property-key');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n  var propertyKey = toPropertyKey(key);\n  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n  else object[propertyKey] = value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n  var array = [];\n  array[IS_CONCAT_SPREADABLE] = false;\n  return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n  if (!isObject(O)) return false;\n  var spreadable = O[IS_CONCAT_SPREADABLE];\n  return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n  // eslint-disable-next-line no-unused-vars -- required for `.length`\n  concat: function concat(arg) {\n    var O = toObject(this);\n    var A = arraySpeciesCreate(O, 0);\n    var n = 0;\n    var i, k, length, len, E;\n    for (i = -1, length = arguments.length; i < length; i++) {\n      E = i === -1 ? O : arguments[i];\n      if (isConcatSpreadable(E)) {\n        len = lengthOfArrayLike(E);\n        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n      } else {\n        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n        createProperty(A, n++, E);\n      }\n    }\n    A.length = n;\n    return A;\n  }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $every = require('../internals/array-iteration').every;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('every');\n\n// `Array.prototype.every` method\n// https://tc39.es/ecma262/#sec-array.prototype.every\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n  every: function every(callbackfn /* , thisArg */) {\n    return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","var aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n  return function (that, callbackfn, argumentsLength, memo) {\n    aCallable(callbackfn);\n    var O = toObject(that);\n    var self = IndexedObject(O);\n    var length = lengthOfArrayLike(O);\n    var index = IS_RIGHT ? length - 1 : 0;\n    var i = IS_RIGHT ? -1 : 1;\n    if (argumentsLength < 2) while (true) {\n      if (index in self) {\n        memo = self[index];\n        index += i;\n        break;\n      }\n      index += i;\n      if (IS_RIGHT ? index < 0 : length <= index) {\n        throw TypeError('Reduce of empty array with no initial value');\n      }\n    }\n    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n      memo = callbackfn(memo, self[index], index, O);\n    }\n    return memo;\n  };\n};\n\nmodule.exports = {\n  // `Array.prototype.reduce` method\n  // https://tc39.es/ecma262/#sec-array.prototype.reduce\n  left: createMethod(false),\n  // `Array.prototype.reduceRight` method\n  // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n  right: createMethod(true)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {\n  reduce: function reduce(callbackfn /* , initialValue */) {\n    return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-endswith -- safe\nvar $endsWith = ''.endsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n  var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');\n  return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.endsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.endswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n  endsWith: function endsWith(searchString /* , endPosition = @length */) {\n    var that = toString(requireObjectCoercible(this));\n    notARegExp(searchString);\n    var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n    var len = that.length;\n    var end = endPosition === undefined ? len : min(toLength(endPosition), len);\n    var search = toString(searchString);\n    return $endsWith\n      ? $endsWith.call(that, search, end)\n      : that.slice(end - search.length, end) === search;\n  }\n});\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n  // eslint-disable-next-line regexp/no-empty-group -- required for testing\n  var re = /(?:)/;\n  var originalExec = re.exec;\n  re.exec = function () { return originalExec.apply(this, arguments); };\n  var result = 'ab'.split(re);\n  return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n  var internalSplit;\n  if (\n    'abbc'.split(/(b)*/)[1] == 'c' ||\n    // eslint-disable-next-line regexp/no-empty-group -- required for testing\n    'test'.split(/(?:)/, -1).length != 4 ||\n    'ab'.split(/(?:ab)*/).length != 2 ||\n    '.'.split(/(.?)(.?)/).length != 4 ||\n    // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n    '.'.split(/()()/).length > 1 ||\n    ''.split(/.?/).length\n  ) {\n    // based on es5-shim implementation, need to rework it\n    internalSplit = function (separator, limit) {\n      var string = toString(requireObjectCoercible(this));\n      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n      if (lim === 0) return [];\n      if (separator === undefined) return [string];\n      // If `separator` is not a regex, use native split\n      if (!isRegExp(separator)) {\n        return nativeSplit.call(string, separator, lim);\n      }\n      var output = [];\n      var flags = (separator.ignoreCase ? 'i' : '') +\n                  (separator.multiline ? 'm' : '') +\n                  (separator.unicode ? 'u' : '') +\n                  (separator.sticky ? 'y' : '');\n      var lastLastIndex = 0;\n      // Make `global` and avoid `lastIndex` issues by working with a copy\n      var separatorCopy = new RegExp(separator.source, flags + 'g');\n      var match, lastIndex, lastLength;\n      while (match = regexpExec.call(separatorCopy, string)) {\n        lastIndex = separatorCopy.lastIndex;\n        if (lastIndex > lastLastIndex) {\n          output.push(string.slice(lastLastIndex, match.index));\n          if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n          lastLength = match[0].length;\n          lastLastIndex = lastIndex;\n          if (output.length >= lim) break;\n        }\n        if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n      }\n      if (lastLastIndex === string.length) {\n        if (lastLength || !separatorCopy.test('')) output.push('');\n      } else output.push(string.slice(lastLastIndex));\n      return output.length > lim ? output.slice(0, lim) : output;\n    };\n  // Chakra, V8\n  } else if ('0'.split(undefined, 0).length) {\n    internalSplit = function (separator, limit) {\n      return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n    };\n  } else internalSplit = nativeSplit;\n\n  return [\n    // `String.prototype.split` method\n    // https://tc39.es/ecma262/#sec-string.prototype.split\n    function split(separator, limit) {\n      var O = requireObjectCoercible(this);\n      var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);\n      return splitter\n        ? splitter.call(separator, O, limit)\n        : internalSplit.call(toString(O), separator, limit);\n    },\n    // `RegExp.prototype[@@split]` method\n    // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n    //\n    // NOTE: This cannot be properly polyfilled in engines that don't support\n    // the 'y' flag.\n    function (string, limit) {\n      var rx = anObject(this);\n      var S = toString(string);\n      var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n\n      if (res.done) return res.value;\n\n      var C = speciesConstructor(rx, RegExp);\n\n      var unicodeMatching = rx.unicode;\n      var flags = (rx.ignoreCase ? 'i' : '') +\n                  (rx.multiline ? 'm' : '') +\n                  (rx.unicode ? 'u' : '') +\n                  (UNSUPPORTED_Y ? 'g' : 'y');\n\n      // ^(? + rx + ) is needed, in combination with some S slicing, to\n      // simulate the 'y' flag.\n      var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n      var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n      if (lim === 0) return [];\n      if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n      var p = 0;\n      var q = 0;\n      var A = [];\n      while (q < S.length) {\n        splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n        var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);\n        var e;\n        if (\n          z === null ||\n          (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n        ) {\n          q = advanceStringIndex(S, q, unicodeMatching);\n        } else {\n          A.push(S.slice(p, q));\n          if (A.length === lim) return A;\n          for (var i = 1; i <= z.length - 1; i++) {\n            A.push(z[i]);\n            if (A.length === lim) return A;\n          }\n          q = p = e;\n        }\n      }\n      A.push(S.slice(p));\n      return A;\n    }\n  ];\n}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","export default (typeof global !== \"undefined\" ? global :\n            typeof self !== \"undefined\" ? self :\n            typeof window !== \"undefined\" ? window : {});\n","// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n    cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n    cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\nexport function nextTick(fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nexport var title = 'browser';\nexport var platform = 'browser';\nexport var browser = true;\nexport var env = {};\nexport var argv = [];\nexport var version = ''; // empty string to avoid regexp issues\nexport var versions = {};\nexport var release = {};\nexport var config = {};\n\nfunction noop() {}\n\nexport var on = noop;\nexport var addListener = noop;\nexport var once = noop;\nexport var off = noop;\nexport var removeListener = noop;\nexport var removeAllListeners = noop;\nexport var emit = noop;\n\nexport function binding(name) {\n    throw new Error('process.binding is not supported');\n}\n\nexport function cwd () { return '/' }\nexport function chdir (dir) {\n    throw new Error('process.chdir is not supported');\n};\nexport function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {}\nvar performanceNow =\n  performance.now        ||\n  performance.mozNow     ||\n  performance.msNow      ||\n  performance.oNow       ||\n  performance.webkitNow  ||\n  function(){ return (new Date()).getTime() }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nexport function hrtime(previousTimestamp){\n  var clocktime = performanceNow.call(performance)*1e-3\n  var seconds = Math.floor(clocktime)\n  var nanoseconds = Math.floor((clocktime%1)*1e9)\n  if (previousTimestamp) {\n    seconds = seconds - previousTimestamp[0]\n    nanoseconds = nanoseconds - previousTimestamp[1]\n    if (nanoseconds<0) {\n      seconds--\n      nanoseconds += 1e9\n    }\n  }\n  return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nexport function uptime() {\n  var currentTime = new Date();\n  var dif = currentTime - startTime;\n  return dif / 1000;\n}\n\nexport default {\n  nextTick: nextTick,\n  title: title,\n  browser: browser,\n  env: env,\n  argv: argv,\n  version: version,\n  versions: versions,\n  on: on,\n  addListener: addListener,\n  once: once,\n  off: off,\n  removeListener: removeListener,\n  removeAllListeners: removeAllListeners,\n  emit: emit,\n  binding: binding,\n  cwd: cwd,\n  chdir: chdir,\n  umask: umask,\n  hrtime: hrtime,\n  platform: platform,\n  release: release,\n  config: config,\n  uptime: uptime\n};\n","var now = require('performance-now')\n  , root = typeof window === 'undefined' ? global : window\n  , vendors = ['moz', 'webkit']\n  , suffix = 'AnimationFrame'\n  , raf = root['request' + suffix]\n  , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n  raf = root[vendors[i] + 'Request' + suffix]\n  caf = root[vendors[i] + 'Cancel' + suffix]\n      || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n  var last = 0\n    , id = 0\n    , queue = []\n    , frameDuration = 1000 / 60\n\n  raf = function(callback) {\n    if(queue.length === 0) {\n      var _now = now()\n        , next = Math.max(0, frameDuration - (_now - last))\n      last = next + _now\n      setTimeout(function() {\n        var cp = queue.slice(0)\n        // Clear queue here to prevent\n        // callbacks from appending listeners\n        // to the current frame's queue\n        queue.length = 0\n        for(var i = 0; i < cp.length; i++) {\n          if(!cp[i].cancelled) {\n            try{\n              cp[i].callback(last)\n            } catch(e) {\n              setTimeout(function() { throw e }, 0)\n            }\n          }\n        }\n      }, Math.round(next))\n    }\n    queue.push({\n      handle: ++id,\n      callback: callback,\n      cancelled: false\n    })\n    return id\n  }\n\n  caf = function(handle) {\n    for(var i = 0; i < queue.length; i++) {\n      if(queue[i].handle === handle) {\n        queue[i].cancelled = true\n      }\n    }\n  }\n}\n\nmodule.exports = function(fn) {\n  // Wrap in a new function to prevent\n  // `cancel` potentially being assigned\n  // to the native rAF function\n  return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n  caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n  if (!object) {\n    object = root;\n  }\n  object.requestAnimationFrame = raf\n  object.cancelAnimationFrame = caf\n}\n","// Generated by CoffeeScript 1.12.2\n(function() {\n  var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n  if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n    module.exports = function() {\n      return performance.now();\n    };\n  } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n    module.exports = function() {\n      return (getNanoSeconds() - nodeLoadTime) / 1e6;\n    };\n    hrtime = process.hrtime;\n    getNanoSeconds = function() {\n      var hr;\n      hr = hrtime();\n      return hr[0] * 1e9 + hr[1];\n    };\n    moduleLoadTime = getNanoSeconds();\n    upTime = process.uptime() * 1e9;\n    nodeLoadTime = moduleLoadTime - upTime;\n  } else if (Date.now) {\n    module.exports = function() {\n      return Date.now() - loadTime;\n    };\n    loadTime = Date.now();\n  } else {\n    module.exports = function() {\n      return new Date().getTime() - loadTime;\n    };\n    loadTime = new Date().getTime();\n  }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","var DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n  defineProperty(FunctionPrototype, NAME, {\n    configurable: true,\n    get: function () {\n      try {\n        return FunctionPrototypeToString.call(this).match(nameRE)[1];\n      } catch (error) {\n        return '';\n      }\n    }\n  });\n}\n","var PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n  return fails(function () {\n    return !!whitespaces[METHOD_NAME]()\n      || non[METHOD_NAME]() !== non\n      || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);\n  });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n  trim: function trim() {\n    return $trim(this);\n  }\n});\n","/*\n\tBased on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>\n\thttp://www.phpied.com/rgb-color-parser-in-javascript/\n*/\n\nmodule.exports = function(color_string) {\n    this.ok = false;\n    this.alpha = 1.0;\n\n    // strip any leading #\n    if (color_string.charAt(0) == '#') { // remove # if any\n        color_string = color_string.substr(1,6);\n    }\n\n    color_string = color_string.replace(/ /g,'');\n    color_string = color_string.toLowerCase();\n\n    // before getting into regexps, try simple matches\n    // and overwrite the input\n    var simple_colors = {\n        aliceblue: 'f0f8ff',\n        antiquewhite: 'faebd7',\n        aqua: '00ffff',\n        aquamarine: '7fffd4',\n        azure: 'f0ffff',\n        beige: 'f5f5dc',\n        bisque: 'ffe4c4',\n        black: '000000',\n        blanchedalmond: 'ffebcd',\n        blue: '0000ff',\n        blueviolet: '8a2be2',\n        brown: 'a52a2a',\n        burlywood: 'deb887',\n        cadetblue: '5f9ea0',\n        chartreuse: '7fff00',\n        chocolate: 'd2691e',\n        coral: 'ff7f50',\n        cornflowerblue: '6495ed',\n        cornsilk: 'fff8dc',\n        crimson: 'dc143c',\n        cyan: '00ffff',\n        darkblue: '00008b',\n        darkcyan: '008b8b',\n        darkgoldenrod: 'b8860b',\n        darkgray: 'a9a9a9',\n        darkgreen: '006400',\n        darkkhaki: 'bdb76b',\n        darkmagenta: '8b008b',\n        darkolivegreen: '556b2f',\n        darkorange: 'ff8c00',\n        darkorchid: '9932cc',\n        darkred: '8b0000',\n        darksalmon: 'e9967a',\n        darkseagreen: '8fbc8f',\n        darkslateblue: '483d8b',\n        darkslategray: '2f4f4f',\n        darkturquoise: '00ced1',\n        darkviolet: '9400d3',\n        deeppink: 'ff1493',\n        deepskyblue: '00bfff',\n        dimgray: '696969',\n        dodgerblue: '1e90ff',\n        feldspar: 'd19275',\n        firebrick: 'b22222',\n        floralwhite: 'fffaf0',\n        forestgreen: '228b22',\n        fuchsia: 'ff00ff',\n        gainsboro: 'dcdcdc',\n        ghostwhite: 'f8f8ff',\n        gold: 'ffd700',\n        goldenrod: 'daa520',\n        gray: '808080',\n        green: '008000',\n        greenyellow: 'adff2f',\n        honeydew: 'f0fff0',\n        hotpink: 'ff69b4',\n        indianred : 'cd5c5c',\n        indigo : '4b0082',\n        ivory: 'fffff0',\n        khaki: 'f0e68c',\n        lavender: 'e6e6fa',\n        lavenderblush: 'fff0f5',\n        lawngreen: '7cfc00',\n        lemonchiffon: 'fffacd',\n        lightblue: 'add8e6',\n        lightcoral: 'f08080',\n        lightcyan: 'e0ffff',\n        lightgoldenrodyellow: 'fafad2',\n        lightgrey: 'd3d3d3',\n        lightgreen: '90ee90',\n        lightpink: 'ffb6c1',\n        lightsalmon: 'ffa07a',\n        lightseagreen: '20b2aa',\n        lightskyblue: '87cefa',\n        lightslateblue: '8470ff',\n        lightslategray: '778899',\n        lightsteelblue: 'b0c4de',\n        lightyellow: 'ffffe0',\n        lime: '00ff00',\n        limegreen: '32cd32',\n        linen: 'faf0e6',\n        magenta: 'ff00ff',\n        maroon: '800000',\n        mediumaquamarine: '66cdaa',\n        mediumblue: '0000cd',\n        mediumorchid: 'ba55d3',\n        mediumpurple: '9370d8',\n        mediumseagreen: '3cb371',\n        mediumslateblue: '7b68ee',\n        mediumspringgreen: '00fa9a',\n        mediumturquoise: '48d1cc',\n        mediumvioletred: 'c71585',\n        midnightblue: '191970',\n        mintcream: 'f5fffa',\n        mistyrose: 'ffe4e1',\n        moccasin: 'ffe4b5',\n        navajowhite: 'ffdead',\n        navy: '000080',\n        oldlace: 'fdf5e6',\n        olive: '808000',\n        olivedrab: '6b8e23',\n        orange: 'ffa500',\n        orangered: 'ff4500',\n        orchid: 'da70d6',\n        palegoldenrod: 'eee8aa',\n        palegreen: '98fb98',\n        paleturquoise: 'afeeee',\n        palevioletred: 'd87093',\n        papayawhip: 'ffefd5',\n        peachpuff: 'ffdab9',\n        peru: 'cd853f',\n        pink: 'ffc0cb',\n        plum: 'dda0dd',\n        powderblue: 'b0e0e6',\n        purple: '800080',\n        rebeccapurple: '663399',\n        red: 'ff0000',\n        rosybrown: 'bc8f8f',\n        royalblue: '4169e1',\n        saddlebrown: '8b4513',\n        salmon: 'fa8072',\n        sandybrown: 'f4a460',\n        seagreen: '2e8b57',\n        seashell: 'fff5ee',\n        sienna: 'a0522d',\n        silver: 'c0c0c0',\n        skyblue: '87ceeb',\n        slateblue: '6a5acd',\n        slategray: '708090',\n        snow: 'fffafa',\n        springgreen: '00ff7f',\n        steelblue: '4682b4',\n        tan: 'd2b48c',\n        teal: '008080',\n        thistle: 'd8bfd8',\n        tomato: 'ff6347',\n        turquoise: '40e0d0',\n        violet: 'ee82ee',\n        violetred: 'd02090',\n        wheat: 'f5deb3',\n        white: 'ffffff',\n        whitesmoke: 'f5f5f5',\n        yellow: 'ffff00',\n        yellowgreen: '9acd32'\n    };\n    color_string = simple_colors[color_string] || color_string;\n    // emd of simple type-in colors\n\n    // array of color definition objects\n    var color_defs = [\n        {\n            re: /^rgba\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*((?:\\d?\\.)?\\d)\\)$/,\n            example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],\n            process: function (bits){\n                return [\n                    parseInt(bits[1]),\n                    parseInt(bits[2]),\n                    parseInt(bits[3]),\n                    parseFloat(bits[4])\n                ];\n            }\n        },\n        {\n            re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n            example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n            process: function (bits){\n                return [\n                    parseInt(bits[1]),\n                    parseInt(bits[2]),\n                    parseInt(bits[3])\n                ];\n            }\n        },\n        {\n            re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n            example: ['#00ff00', '336699'],\n            process: function (bits){\n                return [\n                    parseInt(bits[1], 16),\n                    parseInt(bits[2], 16),\n                    parseInt(bits[3], 16)\n                ];\n            }\n        },\n        {\n            re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n            example: ['#fb0', 'f0f'],\n            process: function (bits){\n                return [\n                    parseInt(bits[1] + bits[1], 16),\n                    parseInt(bits[2] + bits[2], 16),\n                    parseInt(bits[3] + bits[3], 16)\n                ];\n            }\n        }\n    ];\n\n    // search through the definitions to find a match\n    for (var i = 0; i < color_defs.length; i++) {\n        var re = color_defs[i].re;\n        var processor = color_defs[i].process;\n        var bits = re.exec(color_string);\n        if (bits) {\n            var channels = processor(bits);\n            this.r = channels[0];\n            this.g = channels[1];\n            this.b = channels[2];\n            if (channels.length > 3) {\n                this.alpha = channels[3];\n            }\n            this.ok = true;\n        }\n\n    }\n\n    // validate/cleanup values\n    this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n    this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n    this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n    this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);\n\n    // some getters\n    this.toRGB = function () {\n        return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\n    }\n    this.toRGBA = function () {\n        return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';\n    }\n    this.toHex = function () {\n        var r = this.r.toString(16);\n        var g = this.g.toString(16);\n        var b = this.b.toString(16);\n        if (r.length == 1) r = '0' + r;\n        if (g.length == 1) g = '0' + g;\n        if (b.length == 1) b = '0' + b;\n        return '#' + r + g + b;\n    }\n\n    // help\n    this.getHelpXML = function () {\n\n        var examples = new Array();\n        // add regexps\n        for (var i = 0; i < color_defs.length; i++) {\n            var example = color_defs[i].example;\n            for (var j = 0; j < example.length; j++) {\n                examples[examples.length] = example[j];\n            }\n        }\n        // add type-in colors\n        for (var sc in simple_colors) {\n            examples[examples.length] = sc;\n        }\n\n        var xml = document.createElement('ul');\n        xml.setAttribute('id', 'rgbcolor-examples');\n        for (var i = 0; i < examples.length; i++) {\n            try {\n                var list_item = document.createElement('li');\n                var list_color = new RGBColor(examples[i]);\n                var example_div = document.createElement('div');\n                example_div.style.cssText =\n                        'margin: 3px; '\n                        + 'border: 1px solid black; '\n                        + 'background:' + list_color.toHex() + '; '\n                        + 'color:' + list_color.toHex()\n                ;\n                example_div.appendChild(document.createTextNode('test'));\n                var list_item_value = document.createTextNode(\n                    ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\n                );\n                list_item.appendChild(example_div);\n                list_item.appendChild(list_item_value);\n                xml.appendChild(list_item);\n\n            } catch(e){}\n        }\n        return xml;\n\n    }\n\n}\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","'use strict';\nvar $ = require('../internals/export');\nvar forEach = require('../internals/array-for-each');\n\n// `Array.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n  forEach: forEach\n});\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n  CSSRuleList: 0,\n  CSSStyleDeclaration: 0,\n  CSSValueList: 0,\n  ClientRectList: 0,\n  DOMRectList: 0,\n  DOMStringList: 0,\n  DOMTokenList: 1,\n  DataTransferItemList: 0,\n  FileList: 0,\n  HTMLAllCollection: 0,\n  HTMLCollection: 0,\n  HTMLFormElement: 0,\n  HTMLSelectElement: 0,\n  MediaList: 0,\n  MimeTypeArray: 0,\n  NamedNodeMap: 0,\n  NodeList: 1,\n  PaintRequestList: 0,\n  Plugin: 0,\n  PluginArray: 0,\n  SVGLengthList: 0,\n  SVGNumberList: 0,\n  SVGPathSegList: 0,\n  SVGPointList: 0,\n  SVGStringList: 0,\n  SVGTransformList: 0,\n  SourceBufferList: 0,\n  StyleSheetList: 0,\n  TextTrackCueList: 0,\n  TextTrackList: 0,\n  TouchList: 0\n};\n","// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar handlePrototype = function (CollectionPrototype) {\n  // some Chrome versions have non-configurable methods on DOMTokenList\n  if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n    createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n  } catch (error) {\n    CollectionPrototype.forEach = forEach;\n  }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n  if (DOMIterables[COLLECTION_NAME]) {\n    handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n  }\n}\n\nhandlePrototype(DOMTokenListPrototype);\n","function _setPrototypeOf(o, p) {\n  module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    module.exports = _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  } else {\n    module.exports = _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  }\n\n  return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nmodule.exports = _assertThisInitialized;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _typeof = require(\"@babel/runtime/helpers/typeof\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n\n  return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _getPrototypeOf(o) {\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var anObject = require('../internals/an-object');\nvar iteratorClose = require('../internals/iterator-close');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n  try {\n    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n  } catch (error) {\n    iteratorClose(iterator, 'throw', error);\n  }\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n  // eslint-disable-next-line es/no-array-from -- required for testing\n  Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n  from: from\n});\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n  var O = toObject(arrayLike);\n  var IS_CONSTRUCTOR = isConstructor(this);\n  var argumentsLength = arguments.length;\n  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n  var mapping = mapfn !== undefined;\n  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n  var iteratorMethod = getIteratorMethod(O);\n  var index = 0;\n  var length, result, step, iterator, next, value;\n  // if the target is not iterable or it's an array with the default iterator - use a simple case\n  if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {\n    iterator = getIterator(O, iteratorMethod);\n    next = iterator.next;\n    result = IS_CONSTRUCTOR ? new this() : [];\n    for (;!(step = next.call(iterator)).done; index++) {\n      value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n      createProperty(result, index, value);\n    }\n  } else {\n    length = lengthOfArrayLike(O);\n    result = IS_CONSTRUCTOR ? new this(length) : Array(length);\n    for (;length > index; index++) {\n      value = mapping ? mapfn(O[index], index) : O[index];\n      createProperty(result, index, value);\n    }\n  }\n  result.length = index;\n  return result;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n    configurable: true,\n    value: create(null)\n  });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n  ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n  includes: function includes(el /* , fromIndex = 0 */) {\n    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","'use strict';\n/* eslint-disable es/no-array-prototype-indexof -- required for testing */\nvar $ = require('../internals/export');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {\n  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n    return NEGATIVE_ZERO\n      // convert -0 to +0\n      ? nativeIndexOf.apply(this, arguments) || 0\n      : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $some = require('../internals/array-iteration').some;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\n\n// `Array.prototype.some` method\n// https://tc39.es/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n  some: function some(callbackfn /* , thisArg */) {\n    return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n  includes: function includes(searchString /* , position = 0 */) {\n    return !!~toString(requireObjectCoercible(this))\n      .indexOf(toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : undefined);\n  }\n});\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  function F() { /* empty */ }\n  F.prototype.constructor = null;\n  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n  return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n  arrayIterator = [].keys();\n  // Safari 8 has buggy iterators w/o `next`\n  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n  else {\n    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n  }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n  var test = {};\n  // FF44- legacy iterators case\n  return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n  redefine(IteratorPrototype, ITERATOR, function () {\n    return this;\n  });\n}\n\nmodule.exports = {\n  IteratorPrototype: IteratorPrototype,\n  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","var hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n  var object = toObject(O);\n  if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n  var constructor = object.constructor;\n  if (isCallable(constructor) && object instanceof constructor) {\n    return constructor.prototype;\n  } return object instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n  var TO_STRING_TAG = NAME + ' Iterator';\n  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n  Iterators[TO_STRING_TAG] = returnThis;\n  return IteratorConstructor;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n  createIteratorConstructor(IteratorConstructor, NAME, next);\n\n  var getIterationMethod = function (KIND) {\n    if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n    switch (KIND) {\n      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n    } return function () { return new IteratorConstructor(this); };\n  };\n\n  var TO_STRING_TAG = NAME + ' Iterator';\n  var INCORRECT_VALUES_NAME = false;\n  var IterablePrototype = Iterable.prototype;\n  var nativeIterator = IterablePrototype[ITERATOR]\n    || IterablePrototype['@@iterator']\n    || DEFAULT && IterablePrototype[DEFAULT];\n  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n  var CurrentIteratorPrototype, methods, KEY;\n\n  // fix native\n  if (anyNativeIterator) {\n    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n    if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n        if (setPrototypeOf) {\n          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n        } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n          redefine(CurrentIteratorPrototype, ITERATOR, returnThis);\n        }\n      }\n      // Set @@toStringTag to native iterators\n      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n    }\n  }\n\n  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n  if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n    if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n      createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n    } else {\n      INCORRECT_VALUES_NAME = true;\n      defaultIterator = function values() { return nativeIterator.call(this); };\n    }\n  }\n\n  // export additional methods\n  if (DEFAULT) {\n    methods = {\n      values: getIterationMethod(VALUES),\n      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n      entries: getIterationMethod(ENTRIES)\n    };\n    if (FORCED) for (KEY in methods) {\n      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n        redefine(IterablePrototype, KEY, methods[KEY]);\n      }\n    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n  }\n\n  // define iterator\n  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n    redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n  }\n  Iterators[NAME] = defaultIterator;\n\n  return methods;\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n  setInternalState(this, {\n    type: STRING_ITERATOR,\n    string: toString(iterated),\n    index: 0\n  });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n  var state = getInternalState(this);\n  var string = state.string;\n  var index = state.index;\n  var point;\n  if (index >= string.length) return { value: undefined, done: true };\n  point = charAt(string, index);\n  state.index += point.length;\n  return { value: point, done: false };\n});\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\n\nvar nativeReverse = [].reverse;\nvar test = [1, 2];\n\n// `Array.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n  reverse: function reverse() {\n    // eslint-disable-next-line no-self-assign -- dirty hack\n    if (isArray(this)) this.length = this.length;\n    return nativeReverse.call(this);\n  }\n});\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n  var NewTarget, NewTargetPrototype;\n  if (\n    // it can work only with native `setPrototypeOf`\n    setPrototypeOf &&\n    // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n    isCallable(NewTarget = dummy.constructor) &&\n    NewTarget !== Wrapper &&\n    isObject(NewTargetPrototype = NewTarget.prototype) &&\n    NewTargetPrototype !== Wrapper.prototype\n  ) setPrototypeOf($this, NewTargetPrototype);\n  return $this;\n};\n","var valueOf = 1.0.valueOf;\n\n// `thisNumberValue` abstract operation\n// https://tc39.es/ecma262/#sec-thisnumbervalue\nmodule.exports = function (value) {\n  return valueOf.call(value);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar hasOwn = require('../internals/has-own-property');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar isSymbol = require('../internals/is-symbol');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar thisNumberValue = require('../internals/this-number-value');\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// `ToNumeric` abstract operation\n// https://tc39.es/ecma262/#sec-tonumeric\nvar toNumeric = function (value) {\n  var primValue = toPrimitive(value, 'number');\n  return typeof primValue === 'bigint' ? primValue : toNumber(primValue);\n};\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n  var it = toPrimitive(argument, 'number');\n  var first, third, radix, maxCode, digits, length, index, code;\n  if (isSymbol(it)) throw TypeError('Cannot convert a Symbol value to a number');\n  if (typeof it == 'string' && it.length > 2) {\n    it = trim(it);\n    first = it.charCodeAt(0);\n    if (first === 43 || first === 45) {\n      third = it.charCodeAt(2);\n      if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n    } else if (first === 48) {\n      switch (it.charCodeAt(1)) {\n        case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n        case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n        default: return +it;\n      }\n      digits = it.slice(2);\n      length = digits.length;\n      for (index = 0; index < length; index++) {\n        code = digits.charCodeAt(index);\n        // parseInt parses a string to a first unavailable symbol\n        // but ToNumber should return NaN if a string contains unavailable symbols\n        if (code < 48 || code > maxCode) return NaN;\n      } return parseInt(digits, radix);\n    }\n  } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n  var NumberWrapper = function Number(value) {\n    var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));\n    var dummy = this;\n    // check on 1..constructor(foo) case\n    return dummy instanceof NumberWrapper && fails(function () { thisNumberValue(dummy); })\n      ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n;\n  };\n  for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n    // ES3:\n    'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n    // ES2015 (in case, if modules with ES2015 Number statics required before):\n    'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +\n    // ESNext\n    'fromString,range'\n  ).split(','), j = 0, key; keys.length > j; j++) {\n    if (hasOwn(NativeNumber, key = keys[j]) && !hasOwn(NumberWrapper, key)) {\n      defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n    }\n  }\n  NumberWrapper.prototype = NumberPrototype;\n  NumberPrototype.constructor = NumberWrapper;\n  redefine(global, NUMBER, NumberWrapper);\n}\n","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n    object = getPrototypeOf(object);\n    if (object === null) break;\n  }\n\n  return object;\n}\n\nmodule.exports = _superPropBase;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var superPropBase = require(\"./superPropBase.js\");\n\nfunction _get(target, property, receiver) {\n  if (typeof Reflect !== \"undefined\" && Reflect.get) {\n    module.exports = _get = Reflect.get;\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  } else {\n    module.exports = _get = function _get(target, property, receiver) {\n      var base = superPropBase(target, property);\n      if (!base) return;\n      var desc = Object.getOwnPropertyDescriptor(base, property);\n\n      if (desc.get) {\n        return desc.get.call(receiver);\n      }\n\n      return desc.value;\n    };\n\n    module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n  }\n\n  return _get(target, property, receiver || target);\n}\n\nmodule.exports = _get;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var $ = require('../internals/export');\nvar fill = require('../internals/array-fill');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.fill` method\n// https://tc39.es/ecma262/#sec-array.prototype.fill\n$({ target: 'Array', proto: true }, {\n  fill: fill\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('fill');\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n  var O = toObject(this);\n  var length = lengthOfArrayLike(O);\n  var argumentsLength = arguments.length;\n  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n  var end = argumentsLength > 2 ? arguments[2] : undefined;\n  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n  while (endPos > index) O[index++] = value;\n  return O;\n};\n","/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nvar t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(r,e)};function r(r,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function i(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function e(t){var r=\"\";Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.type===_.CLOSE_PATH)r+=\"z\";else if(i.type===_.HORIZ_LINE_TO)r+=(i.relative?\"h\":\"H\")+i.x;else if(i.type===_.VERT_LINE_TO)r+=(i.relative?\"v\":\"V\")+i.y;else if(i.type===_.MOVE_TO)r+=(i.relative?\"m\":\"M\")+i.x+\" \"+i.y;else if(i.type===_.LINE_TO)r+=(i.relative?\"l\":\"L\")+i.x+\" \"+i.y;else if(i.type===_.CURVE_TO)r+=(i.relative?\"c\":\"C\")+i.x1+\" \"+i.y1+\" \"+i.x2+\" \"+i.y2+\" \"+i.x+\" \"+i.y;else if(i.type===_.SMOOTH_CURVE_TO)r+=(i.relative?\"s\":\"S\")+i.x2+\" \"+i.y2+\" \"+i.x+\" \"+i.y;else if(i.type===_.QUAD_TO)r+=(i.relative?\"q\":\"Q\")+i.x1+\" \"+i.y1+\" \"+i.x+\" \"+i.y;else if(i.type===_.SMOOTH_QUAD_TO)r+=(i.relative?\"t\":\"T\")+i.x+\" \"+i.y;else{if(i.type!==_.ARC)throw new Error('Unexpected command type \"'+i.type+'\" at index '+e+\".\");r+=(i.relative?\"a\":\"A\")+i.rX+\" \"+i.rY+\" \"+i.xRot+\" \"+ +i.lArcFlag+\" \"+ +i.sweepFlag+\" \"+i.x+\" \"+i.y}}return r}function i(t,r){var e=t[0],i=t[1];return[e*Math.cos(r)-i*Math.sin(r),e*Math.sin(r)+i*Math.cos(r)]}function a(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0;e<t.length;e++)if(\"number\"!=typeof t[e])throw new Error(\"assertNumbers arguments[\"+e+\"] is not a number. \"+typeof t[e]+\" == typeof \"+t[e]);return!0}var n=Math.PI;function o(t,r,e){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var a=t.rX,o=t.rY,s=t.x,u=t.y;a=Math.abs(t.rX),o=Math.abs(t.rY);var h=i([(r-s)/2,(e-u)/2],-t.xRot/180*n),c=h[0],y=h[1],p=Math.pow(c,2)/Math.pow(a,2)+Math.pow(y,2)/Math.pow(o,2);1<p&&(a*=Math.sqrt(p),o*=Math.sqrt(p)),t.rX=a,t.rY=o;var m=Math.pow(a,2)*Math.pow(y,2)+Math.pow(o,2)*Math.pow(c,2),O=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(a,2)*Math.pow(o,2)-m)/m)),l=a*y/o*O,T=-o*c/a*O,v=i([l,T],t.xRot/180*n);t.cX=v[0]+(r+s)/2,t.cY=v[1]+(e+u)/2,t.phi1=Math.atan2((y-T)/o,(c-l)/a),t.phi2=Math.atan2((-y-T)/o,(-c-l)/a),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*n),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*n),t.phi1*=180/n,t.phi2*=180/n}function s(t,r,e){a(t,r,e);var i=t*t+r*r-e*e;if(0>i)return[];if(0===i)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var n=Math.sqrt(i);return[[(t*e+r*n)/(t*t+r*r),(r*e-t*n)/(t*t+r*r)],[(t*e-r*n)/(t*t+r*r),(r*e+t*n)/(t*t+r*r)]]}var u,h=Math.PI/180;function c(t,r,e){return(1-e)*t+e*r}function y(t,r,e,i){return t+Math.cos(i/180*n)*r+Math.sin(i/180*n)*e}function p(t,r,e,i){var a=1e-6,n=r-t,o=e-r,s=3*n+3*(i-e)-6*o,u=6*(o-n),h=3*n;return Math.abs(s)<a?[-h/u]:function(t,r,e){void 0===e&&(e=1e-6);var i=t*t/4-r;if(i<-e)return[];if(i<=e)return[-t/2];var a=Math.sqrt(i);return[-t/2-a,-t/2+a]}(u/s,h/s,a)}function m(t,r,e,i,a){var n=1-a;return t*(n*n*n)+r*(3*n*n*a)+e*(3*n*a*a)+i*(a*a*a)}!function(t){function r(){return u((function(t,r,e){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=e),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=e),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=e),t.relative=!1),t}))}function e(){var t=NaN,r=NaN,e=NaN,i=NaN;return u((function(a,n,o){return a.type&_.SMOOTH_CURVE_TO&&(a.type=_.CURVE_TO,t=isNaN(t)?n:t,r=isNaN(r)?o:r,a.x1=a.relative?n-t:2*n-t,a.y1=a.relative?o-r:2*o-r),a.type&_.CURVE_TO?(t=a.relative?n+a.x2:a.x2,r=a.relative?o+a.y2:a.y2):(t=NaN,r=NaN),a.type&_.SMOOTH_QUAD_TO&&(a.type=_.QUAD_TO,e=isNaN(e)?n:e,i=isNaN(i)?o:i,a.x1=a.relative?n-e:2*n-e,a.y1=a.relative?o-i:2*o-i),a.type&_.QUAD_TO?(e=a.relative?n+a.x1:a.x1,i=a.relative?o+a.y1:a.y1):(e=NaN,i=NaN),a}))}function n(){var t=NaN,r=NaN;return u((function(e,i,a){if(e.type&_.SMOOTH_QUAD_TO&&(e.type=_.QUAD_TO,t=isNaN(t)?i:t,r=isNaN(r)?a:r,e.x1=e.relative?i-t:2*i-t,e.y1=e.relative?a-r:2*a-r),e.type&_.QUAD_TO){t=e.relative?i+e.x1:e.x1,r=e.relative?a+e.y1:e.y1;var n=e.x1,o=e.y1;e.type=_.CURVE_TO,e.x1=((e.relative?0:i)+2*n)/3,e.y1=((e.relative?0:a)+2*o)/3,e.x2=(e.x+2*n)/3,e.y2=(e.y+2*o)/3}else t=NaN,r=NaN;return e}))}function u(t){var r=0,e=0,i=NaN,a=NaN;return function(n){if(isNaN(i)&&!(n.type&_.MOVE_TO))throw new Error(\"path must start with moveto\");var o=t(n,r,e,i,a);return n.type&_.CLOSE_PATH&&(r=i,e=a),void 0!==n.x&&(r=n.relative?r+n.x:n.x),void 0!==n.y&&(e=n.relative?e+n.y:n.y),n.type&_.MOVE_TO&&(i=r,a=e),o}}function O(t,r,e,i,n,o){return a(t,r,e,i,n,o),u((function(a,s,u,h){var c=a.x1,y=a.x2,p=a.relative&&!isNaN(h),m=void 0!==a.x?a.x:p?0:s,O=void 0!==a.y?a.y:p?0:u;function l(t){return t*t}a.type&_.HORIZ_LINE_TO&&0!==r&&(a.type=_.LINE_TO,a.y=a.relative?0:u),a.type&_.VERT_LINE_TO&&0!==e&&(a.type=_.LINE_TO,a.x=a.relative?0:s),void 0!==a.x&&(a.x=a.x*t+O*e+(p?0:n)),void 0!==a.y&&(a.y=m*r+a.y*i+(p?0:o)),void 0!==a.x1&&(a.x1=a.x1*t+a.y1*e+(p?0:n)),void 0!==a.y1&&(a.y1=c*r+a.y1*i+(p?0:o)),void 0!==a.x2&&(a.x2=a.x2*t+a.y2*e+(p?0:n)),void 0!==a.y2&&(a.y2=y*r+a.y2*i+(p?0:o));var T=t*i-r*e;if(void 0!==a.xRot&&(1!==t||0!==r||0!==e||1!==i))if(0===T)delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag,a.type=_.LINE_TO;else{var v=a.xRot*Math.PI/180,f=Math.sin(v),N=Math.cos(v),x=1/l(a.rX),d=1/l(a.rY),E=l(N)*x+l(f)*d,A=2*f*N*(x-d),C=l(f)*x+l(N)*d,M=E*i*i-A*r*i+C*r*r,R=A*(t*i+r*e)-2*(E*e*i+C*t*r),g=E*e*e-A*t*e+C*t*t,I=(Math.atan2(R,M-g)+Math.PI)%Math.PI/2,S=Math.sin(I),L=Math.cos(I);a.rX=Math.abs(T)/Math.sqrt(M*l(L)+R*S*L+g*l(S)),a.rY=Math.abs(T)/Math.sqrt(M*l(S)-R*S*L+g*l(L)),a.xRot=180*I/Math.PI}return void 0!==a.sweepFlag&&0>T&&(a.sweepFlag=+!a.sweepFlag),a}))}function l(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),a(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return u((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),u((function(i,a,n,o,s){if(isNaN(o)&&!(i.type&_.MOVE_TO))throw new Error(\"path must start with moveto\");return r&&i.type&_.HORIZ_LINE_TO&&(i.type=_.LINE_TO,i.y=i.relative?0:n),e&&i.type&_.VERT_LINE_TO&&(i.type=_.LINE_TO,i.x=i.relative?0:a),t&&i.type&_.CLOSE_PATH&&(i.type=_.LINE_TO,i.x=i.relative?o-a:o,i.y=i.relative?s-n:s),i.type&_.ARC&&(0===i.rX||0===i.rY)&&(i.type=_.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),i}))},t.NORMALIZE_ST=e,t.QT_TO_C=n,t.INFO=u,t.SANITIZE=function(t){void 0===t&&(t=0),a(t);var r=NaN,e=NaN,i=NaN,n=NaN;return u((function(a,o,s,u,h){var c=Math.abs,y=!1,p=0,m=0;if(a.type&_.SMOOTH_CURVE_TO&&(p=isNaN(r)?0:o-r,m=isNaN(e)?0:s-e),a.type&(_.CURVE_TO|_.SMOOTH_CURVE_TO)?(r=a.relative?o+a.x2:a.x2,e=a.relative?s+a.y2:a.y2):(r=NaN,e=NaN),a.type&_.SMOOTH_QUAD_TO?(i=isNaN(i)?o:2*o-i,n=isNaN(n)?s:2*s-n):a.type&_.QUAD_TO?(i=a.relative?o+a.x1:a.x1,n=a.relative?s+a.y1:a.y2):(i=NaN,n=NaN),a.type&_.LINE_COMMANDS||a.type&_.ARC&&(0===a.rX||0===a.rY||!a.lArcFlag)||a.type&_.CURVE_TO||a.type&_.SMOOTH_CURVE_TO||a.type&_.QUAD_TO||a.type&_.SMOOTH_QUAD_TO){var O=void 0===a.x?0:a.relative?a.x:a.x-o,l=void 0===a.y?0:a.relative?a.y:a.y-s;p=isNaN(i)?void 0===a.x1?p:a.relative?a.x:a.x1-o:i-o,m=isNaN(n)?void 0===a.y1?m:a.relative?a.y:a.y1-s:n-s;var T=void 0===a.x2?0:a.relative?a.x:a.x2-o,v=void 0===a.y2?0:a.relative?a.y:a.y2-s;c(O)<=t&&c(l)<=t&&c(p)<=t&&c(m)<=t&&c(T)<=t&&c(v)<=t&&(y=!0)}return a.type&_.CLOSE_PATH&&c(o-u)<=t&&c(s-h)<=t&&(y=!0),y?[]:a}))},t.MATRIX=O,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),a(t,r,e);var i=Math.sin(t),n=Math.cos(t);return O(n,i,-i,n,r-r*n+e*i,e-r*i-e*n)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),a(t,r),O(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),a(t,r),O(t,0,0,r,0,0)},t.SKEW_X=function(t){return a(t),O(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return a(t),O(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),O(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),O(1,0,0,-1,0,t)},t.A_TO_C=function(){return u((function(t,r,e){return _.ARC===t.type?function(t,r,e){var a,n,s,u;t.cX||o(t,r,e);for(var y=Math.min(t.phi1,t.phi2),p=Math.max(t.phi1,t.phi2)-y,m=Math.ceil(p/90),O=new Array(m),l=r,T=e,v=0;v<m;v++){var f=c(t.phi1,t.phi2,v/m),N=c(t.phi1,t.phi2,(v+1)/m),x=N-f,d=4/3*Math.tan(x*h/4),E=[Math.cos(f*h)-d*Math.sin(f*h),Math.sin(f*h)+d*Math.cos(f*h)],A=E[0],C=E[1],M=[Math.cos(N*h),Math.sin(N*h)],R=M[0],g=M[1],I=[R+d*Math.sin(N*h),g-d*Math.cos(N*h)],S=I[0],L=I[1];O[v]={relative:t.relative,type:_.CURVE_TO};var H=function(r,e){var a=i([r*t.rX,e*t.rY],t.xRot),n=a[0],o=a[1];return[t.cX+n,t.cY+o]};a=H(A,C),O[v].x1=a[0],O[v].y1=a[1],n=H(S,L),O[v].x2=n[0],O[v].y2=n[1],s=H(R,g),O[v].x=s[0],O[v].y=s[1],t.relative&&(O[v].x1-=l,O[v].y1-=T,O[v].x2-=l,O[v].y2-=T,O[v].x-=l,O[v].y-=T),l=(u=[O[v].x,O[v].y])[0],T=u[1]}return O}(t,t.relative?0:r,t.relative?0:e):t}))},t.ANNOTATE_ARCS=function(){return u((function(t,r,e){return t.relative&&(r=0,e=0),_.ARC===t.type&&o(t,r,e),t}))},t.CLONE=l,t.CALCULATE_BOUNDS=function(){var t=function(t){var r={};for(var e in t)r[e]=t[e];return r},i=r(),a=n(),h=e(),c=u((function(r,e,n){var u=h(a(i(t(r))));function O(t){t>c.maxX&&(c.maxX=t),t<c.minX&&(c.minX=t)}function l(t){t>c.maxY&&(c.maxY=t),t<c.minY&&(c.minY=t)}if(u.type&_.DRAWING_COMMANDS&&(O(e),l(n)),u.type&_.HORIZ_LINE_TO&&O(u.x),u.type&_.VERT_LINE_TO&&l(u.y),u.type&_.LINE_TO&&(O(u.x),l(u.y)),u.type&_.CURVE_TO){O(u.x),l(u.y);for(var T=0,v=p(e,u.x1,u.x2,u.x);T<v.length;T++){0<(w=v[T])&&1>w&&O(m(e,u.x1,u.x2,u.x,w))}for(var f=0,N=p(n,u.y1,u.y2,u.y);f<N.length;f++){0<(w=N[f])&&1>w&&l(m(n,u.y1,u.y2,u.y,w))}}if(u.type&_.ARC){O(u.x),l(u.y),o(u,e,n);for(var x=u.xRot/180*Math.PI,d=Math.cos(x)*u.rX,E=Math.sin(x)*u.rX,A=-Math.sin(x)*u.rY,C=Math.cos(x)*u.rY,M=u.phi1<u.phi2?[u.phi1,u.phi2]:-180>u.phi2?[u.phi2+360,u.phi1+360]:[u.phi2,u.phi1],R=M[0],g=M[1],I=function(t){var r=t[0],e=t[1],i=180*Math.atan2(e,r)/Math.PI;return i<R?i+360:i},S=0,L=s(A,-d,0).map(I);S<L.length;S++){(w=L[S])>R&&w<g&&O(y(u.cX,d,A,w))}for(var H=0,U=s(C,-E,0).map(I);H<U.length;H++){var w;(w=U[H])>R&&w<g&&l(y(u.cY,E,C,w))}}return r}));return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}}(u||(u={}));var O,l=function(){function t(){}return t.prototype.round=function(t){return this.transform(u.ROUND(t))},t.prototype.toAbs=function(){return this.transform(u.TO_ABS())},t.prototype.toRel=function(){return this.transform(u.TO_REL())},t.prototype.normalizeHVZ=function(t,r,e){return this.transform(u.NORMALIZE_HVZ(t,r,e))},t.prototype.normalizeST=function(){return this.transform(u.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(u.QT_TO_C())},t.prototype.aToC=function(){return this.transform(u.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(u.SANITIZE(t))},t.prototype.translate=function(t,r){return this.transform(u.TRANSLATE(t,r))},t.prototype.scale=function(t,r){return this.transform(u.SCALE(t,r))},t.prototype.rotate=function(t,r,e){return this.transform(u.ROTATE(t,r,e))},t.prototype.matrix=function(t,r,e,i,a,n){return this.transform(u.MATRIX(t,r,e,i,a,n))},t.prototype.skewX=function(t){return this.transform(u.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(u.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(u.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(u.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(u.ANNOTATE_ARCS())},t}(),T=function(t){return\" \"===t||\"\\t\"===t||\"\\r\"===t||\"\\n\"===t},v=function(t){return\"0\".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<=\"9\".charCodeAt(0)},f=function(t){function e(){var r=t.call(this)||this;return r.curNumber=\"\",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return r(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(\" \",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError(\"Unterminated command at the path end.\");return t},e.prototype.parse=function(t,r){var e=this;void 0===r&&(r=[]);for(var i=function(t){r.push(t),e.curArgs.length=0,e.canParseCommandOrComma=!0},a=0;a<t.length;a++){var n=t[a],o=!(this.curCommandType!==_.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||\"0\"!==this.curNumber&&\"1\"!==this.curNumber),s=v(n)&&(\"0\"===this.curNumber&&\"0\"===n||o);if(!v(n)||s)if(\"e\"!==n&&\"E\"!==n)if(\"-\"!==n&&\"+\"!==n||!this.curNumberHasExp||this.curNumberHasExpDigits)if(\".\"!==n||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&-1!==this.curCommandType){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError(\"Invalid number ending at \"+a);if(this.curCommandType===_.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>u)throw new SyntaxError('Expected positive number, got \"'+u+'\" at index \"'+a+'\"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&\"0\"!==this.curNumber&&\"1\"!==this.curNumber)throw new SyntaxError('Expected a flag, got \"'+this.curNumber+'\" at index \"'+a+'\"');this.curArgs.push(u),this.curArgs.length===N[this.curCommandType]&&(_.HORIZ_LINE_TO===this.curCommandType?i({type:_.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):_.VERT_LINE_TO===this.curCommandType?i({type:_.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===_.MOVE_TO||this.curCommandType===_.LINE_TO||this.curCommandType===_.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),_.MOVE_TO===this.curCommandType&&(this.curCommandType=_.LINE_TO)):this.curCommandType===_.CURVE_TO?i({type:_.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===_.SMOOTH_CURVE_TO?i({type:_.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===_.QUAD_TO?i({type:_.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===_.ARC&&i({type:_.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber=\"\",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!T(n))if(\",\"===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(\"+\"!==n&&\"-\"!==n&&\".\"!==n)if(s)this.curNumber=n,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError(\"Unterminated command at index \"+a+\".\");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+a+\". Command cannot follow comma\");if(this.canParseCommandOrComma=!1,\"z\"!==n&&\"Z\"!==n)if(\"h\"===n||\"H\"===n)this.curCommandType=_.HORIZ_LINE_TO,this.curCommandRelative=\"h\"===n;else if(\"v\"===n||\"V\"===n)this.curCommandType=_.VERT_LINE_TO,this.curCommandRelative=\"v\"===n;else if(\"m\"===n||\"M\"===n)this.curCommandType=_.MOVE_TO,this.curCommandRelative=\"m\"===n;else if(\"l\"===n||\"L\"===n)this.curCommandType=_.LINE_TO,this.curCommandRelative=\"l\"===n;else if(\"c\"===n||\"C\"===n)this.curCommandType=_.CURVE_TO,this.curCommandRelative=\"c\"===n;else if(\"s\"===n||\"S\"===n)this.curCommandType=_.SMOOTH_CURVE_TO,this.curCommandRelative=\"s\"===n;else if(\"q\"===n||\"Q\"===n)this.curCommandType=_.QUAD_TO,this.curCommandRelative=\"q\"===n;else if(\"t\"===n||\"T\"===n)this.curCommandType=_.SMOOTH_QUAD_TO,this.curCommandRelative=\"t\"===n;else{if(\"a\"!==n&&\"A\"!==n)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+a+\".\");this.curCommandType=_.ARC,this.curCommandRelative=\"a\"===n}else r.push({type:_.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal=\".\"===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0;else this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp}return r},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var i=0,a=Object.getPrototypeOf(this).parse.call(this,r);i<a.length;i++){var n=a[i],o=t(n);Array.isArray(o)?e.push.apply(e,o):e.push(o)}return e}}})},e}(l),_=function(t){function i(r){var e=t.call(this)||this;return e.commands=\"string\"==typeof r?i.parse(r):r,e}return r(i,t),i.prototype.encode=function(){return i.encode(this.commands)},i.prototype.getBounds=function(){var t=u.CALCULATE_BOUNDS();return this.transform(t),t},i.prototype.transform=function(t){for(var r=[],e=0,i=this.commands;e<i.length;e++){var a=t(i[e]);Array.isArray(a)?r.push.apply(r,a):r.push(a)}return this.commands=r,this},i.encode=function(t){return e(t)},i.parse=function(t){var r=new f,e=[];return r.parse(t,e),r.finish(e),e},i.CLOSE_PATH=1,i.MOVE_TO=2,i.HORIZ_LINE_TO=4,i.VERT_LINE_TO=8,i.LINE_TO=16,i.CURVE_TO=32,i.SMOOTH_CURVE_TO=64,i.QUAD_TO=128,i.SMOOTH_QUAD_TO=256,i.ARC=512,i.LINE_COMMANDS=i.LINE_TO|i.HORIZ_LINE_TO|i.VERT_LINE_TO,i.DRAWING_COMMANDS=i.HORIZ_LINE_TO|i.VERT_LINE_TO|i.LINE_TO|i.CURVE_TO|i.SMOOTH_CURVE_TO|i.QUAD_TO|i.SMOOTH_QUAD_TO|i.ARC,i}(l),N=((O={})[_.MOVE_TO]=2,O[_.LINE_TO]=2,O[_.HORIZ_LINE_TO]=1,O[_.VERT_LINE_TO]=1,O[_.CLOSE_PATH]=0,O[_.QUAD_TO]=4,O[_.SMOOTH_QUAD_TO]=2,O[_.CURVE_TO]=6,O[_.SMOOTH_CURVE_TO]=4,O[_.ARC]=7,O);export{N as COMMAND_ARG_COUNTS,_ as SVGPathData,f as SVGPathDataParser,u as SVGPathDataTransformer,e as encodeSVGPath};\n//# sourceMappingURL=SVGPathData.module.js.map\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n  redefine(RegExp.prototype, TO_STRING, function toString() {\n    var R = anObject(this);\n    var p = $toString(R.source);\n    var rf = R.flags;\n    var f = $toString(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n    return '/' + p + '/' + f;\n  }, { unsafe: true });\n}\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n  setInternalState(this, {\n    type: ARRAY_ITERATOR,\n    target: toIndexedObject(iterated), // target\n    index: 0,                          // next index\n    kind: kind                         // kind\n  });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n  var state = getInternalState(this);\n  var target = state.target;\n  var kind = state.kind;\n  var index = state.index++;\n  if (!target || index >= target.length) {\n    state.target = undefined;\n    return { value: undefined, done: true };\n  }\n  if (kind == 'keys') return { value: index, done: false };\n  if (kind == 'values') return { value: target[index], done: false };\n  return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n  if (CollectionPrototype) {\n    // some Chrome versions have non-configurable methods on DOMTokenList\n    if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n      createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n    } catch (error) {\n      CollectionPrototype[ITERATOR] = ArrayValues;\n    }\n    if (!CollectionPrototype[TO_STRING_TAG]) {\n      createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n    }\n    if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n      // some Chrome versions have non-configurable methods on DOMTokenList\n      if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n        createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n      } catch (error) {\n        CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n      }\n    }\n  }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n  handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n","/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n  ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n  try {\n    return $getOwnPropertyNames(it);\n  } catch (error) {\n    return windowNames.slice();\n  }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n  return windowNames && toString.call(it) == '[object Window]'\n    ? getWindowNames(it)\n    : $getOwnPropertyNames(toIndexedObject(it));\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n  // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n  return Object.isExtensible(Object.preventExtensions({}));\n});\n","var $ = require('../internals/export');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternalModule = require('../internals/object-get-own-property-names-external');\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar REQUIRED = false;\nvar METADATA = uid('meta');\nvar id = 0;\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = Object.isExtensible || function () {\n  return true;\n};\n\nvar setMetadata = function (it) {\n  defineProperty(it, METADATA, { value: {\n    objectID: 'O' + id++, // object ID\n    weakData: {}          // weak collections IDs\n  } });\n};\n\nvar fastKey = function (it, create) {\n  // return a primitive with prefix\n  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n  if (!hasOwn(it, METADATA)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return 'F';\n    // not necessary to add metadata\n    if (!create) return 'E';\n    // add missing metadata\n    setMetadata(it);\n  // return object ID\n  } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n  if (!hasOwn(it, METADATA)) {\n    // can't set metadata to uncaught frozen object\n    if (!isExtensible(it)) return true;\n    // not necessary to add metadata\n    if (!create) return false;\n    // add missing metadata\n    setMetadata(it);\n  // return the store of weak collections IDs\n  } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n  if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);\n  return it;\n};\n\nvar enable = function () {\n  meta.enable = function () { /* empty */ };\n  REQUIRED = true;\n  var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n  var splice = [].splice;\n  var test = {};\n  test[METADATA] = 1;\n\n  // prevent exposing of metadata key\n  if (getOwnPropertyNames(test).length) {\n    getOwnPropertyNamesModule.f = function (it) {\n      var result = getOwnPropertyNames(it);\n      for (var i = 0, length = result.length; i < length; i++) {\n        if (result[i] === METADATA) {\n          splice.call(result, i, 1);\n          break;\n        }\n      } return result;\n    };\n\n    $({ target: 'Object', stat: true, forced: true }, {\n      getOwnPropertyNames: getOwnPropertyNamesExternalModule.f\n    });\n  }\n};\n\nvar meta = module.exports = {\n  enable: enable,\n  fastKey: fastKey,\n  getWeakData: getWeakData,\n  onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar create = require('../internals/object-create');\nvar redefineAll = require('../internals/redefine-all');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/define-iterator');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n  getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n    var C = wrapper(function (that, iterable) {\n      anInstance(that, C, CONSTRUCTOR_NAME);\n      setInternalState(that, {\n        type: CONSTRUCTOR_NAME,\n        index: create(null),\n        first: undefined,\n        last: undefined,\n        size: 0\n      });\n      if (!DESCRIPTORS) that.size = 0;\n      if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n    });\n\n    var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n    var define = function (that, key, value) {\n      var state = getInternalState(that);\n      var entry = getEntry(that, key);\n      var previous, index;\n      // change existing entry\n      if (entry) {\n        entry.value = value;\n      // create new entry\n      } else {\n        state.last = entry = {\n          index: index = fastKey(key, true),\n          key: key,\n          value: value,\n          previous: previous = state.last,\n          next: undefined,\n          removed: false\n        };\n        if (!state.first) state.first = entry;\n        if (previous) previous.next = entry;\n        if (DESCRIPTORS) state.size++;\n        else that.size++;\n        // add to index\n        if (index !== 'F') state.index[index] = entry;\n      } return that;\n    };\n\n    var getEntry = function (that, key) {\n      var state = getInternalState(that);\n      // fast case\n      var index = fastKey(key);\n      var entry;\n      if (index !== 'F') return state.index[index];\n      // frozen object case\n      for (entry = state.first; entry; entry = entry.next) {\n        if (entry.key == key) return entry;\n      }\n    };\n\n    redefineAll(C.prototype, {\n      // `{ Map, Set }.prototype.clear()` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.clear\n      // https://tc39.es/ecma262/#sec-set.prototype.clear\n      clear: function clear() {\n        var that = this;\n        var state = getInternalState(that);\n        var data = state.index;\n        var entry = state.first;\n        while (entry) {\n          entry.removed = true;\n          if (entry.previous) entry.previous = entry.previous.next = undefined;\n          delete data[entry.index];\n          entry = entry.next;\n        }\n        state.first = state.last = undefined;\n        if (DESCRIPTORS) state.size = 0;\n        else that.size = 0;\n      },\n      // `{ Map, Set }.prototype.delete(key)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.delete\n      // https://tc39.es/ecma262/#sec-set.prototype.delete\n      'delete': function (key) {\n        var that = this;\n        var state = getInternalState(that);\n        var entry = getEntry(that, key);\n        if (entry) {\n          var next = entry.next;\n          var prev = entry.previous;\n          delete state.index[entry.index];\n          entry.removed = true;\n          if (prev) prev.next = next;\n          if (next) next.previous = prev;\n          if (state.first == entry) state.first = next;\n          if (state.last == entry) state.last = prev;\n          if (DESCRIPTORS) state.size--;\n          else that.size--;\n        } return !!entry;\n      },\n      // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.foreach\n      // https://tc39.es/ecma262/#sec-set.prototype.foreach\n      forEach: function forEach(callbackfn /* , that = undefined */) {\n        var state = getInternalState(this);\n        var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n        var entry;\n        while (entry = entry ? entry.next : state.first) {\n          boundFunction(entry.value, entry.key, this);\n          // revert to the last existing entry\n          while (entry && entry.removed) entry = entry.previous;\n        }\n      },\n      // `{ Map, Set}.prototype.has(key)` methods\n      // https://tc39.es/ecma262/#sec-map.prototype.has\n      // https://tc39.es/ecma262/#sec-set.prototype.has\n      has: function has(key) {\n        return !!getEntry(this, key);\n      }\n    });\n\n    redefineAll(C.prototype, IS_MAP ? {\n      // `Map.prototype.get(key)` method\n      // https://tc39.es/ecma262/#sec-map.prototype.get\n      get: function get(key) {\n        var entry = getEntry(this, key);\n        return entry && entry.value;\n      },\n      // `Map.prototype.set(key, value)` method\n      // https://tc39.es/ecma262/#sec-map.prototype.set\n      set: function set(key, value) {\n        return define(this, key === 0 ? 0 : key, value);\n      }\n    } : {\n      // `Set.prototype.add(value)` method\n      // https://tc39.es/ecma262/#sec-set.prototype.add\n      add: function add(value) {\n        return define(this, value = value === 0 ? 0 : value, value);\n      }\n    });\n    if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n      get: function () {\n        return getInternalState(this).size;\n      }\n    });\n    return C;\n  },\n  setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n    var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n    var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n    var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n    // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n    // https://tc39.es/ecma262/#sec-map.prototype.entries\n    // https://tc39.es/ecma262/#sec-map.prototype.keys\n    // https://tc39.es/ecma262/#sec-map.prototype.values\n    // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n    // https://tc39.es/ecma262/#sec-set.prototype.entries\n    // https://tc39.es/ecma262/#sec-set.prototype.keys\n    // https://tc39.es/ecma262/#sec-set.prototype.values\n    // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n    defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n      setInternalState(this, {\n        type: ITERATOR_NAME,\n        target: iterated,\n        state: getInternalCollectionState(iterated),\n        kind: kind,\n        last: undefined\n      });\n    }, function () {\n      var state = getInternalIteratorState(this);\n      var kind = state.kind;\n      var entry = state.last;\n      // revert to the last existing entry\n      while (entry && entry.removed) entry = entry.previous;\n      // get next entry\n      if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n        // or finish the iteration\n        state.target = undefined;\n        return { value: undefined, done: true };\n      }\n      // return step by kind\n      if (kind == 'keys') return { value: entry.key, done: false };\n      if (kind == 'values') return { value: entry.value, done: false };\n      return { value: [entry.key, entry.value], done: false };\n    }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n    // `{ Map, Set }.prototype[@@species]` accessors\n    // https://tc39.es/ecma262/#sec-get-map-@@species\n    // https://tc39.es/ecma262/#sec-get-set-@@species\n    setSpecies(CONSTRUCTOR_NAME);\n  }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n  var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n  var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n  var ADDER = IS_MAP ? 'set' : 'add';\n  var NativeConstructor = global[CONSTRUCTOR_NAME];\n  var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n  var Constructor = NativeConstructor;\n  var exported = {};\n\n  var fixMethod = function (KEY) {\n    var nativeMethod = NativePrototype[KEY];\n    redefine(NativePrototype, KEY,\n      KEY == 'add' ? function add(value) {\n        nativeMethod.call(this, value === 0 ? 0 : value);\n        return this;\n      } : KEY == 'delete' ? function (key) {\n        return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n      } : KEY == 'get' ? function get(key) {\n        return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n      } : KEY == 'has' ? function has(key) {\n        return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n      } : function set(key, value) {\n        nativeMethod.call(this, key === 0 ? 0 : key, value);\n        return this;\n      }\n    );\n  };\n\n  var REPLACE = isForced(\n    CONSTRUCTOR_NAME,\n    !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n      new NativeConstructor().entries().next();\n    }))\n  );\n\n  if (REPLACE) {\n    // create collection constructor\n    Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n    InternalMetadataModule.enable();\n  } else if (isForced(CONSTRUCTOR_NAME, true)) {\n    var instance = new Constructor();\n    // early implementations not supports chaining\n    var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n    // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n    var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n    // most early implementations doesn't supports iterables, most modern - not close it correctly\n    // eslint-disable-next-line no-new -- required for testing\n    var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n    // for early implementations -0 and +0 not the same\n    var BUGGY_ZERO = !IS_WEAK && fails(function () {\n      // V8 ~ Chromium 42- fails only with 5+ elements\n      var $instance = new NativeConstructor();\n      var index = 5;\n      while (index--) $instance[ADDER](index, index);\n      return !$instance.has(-0);\n    });\n\n    if (!ACCEPT_ITERABLES) {\n      Constructor = wrapper(function (dummy, iterable) {\n        anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n        var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n        if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n        return that;\n      });\n      Constructor.prototype = NativePrototype;\n      NativePrototype.constructor = Constructor;\n    }\n\n    if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n      fixMethod('delete');\n      fixMethod('has');\n      IS_MAP && fixMethod('get');\n    }\n\n    if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n    // weak collections should not contains .clear method\n    if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n  }\n\n  exported[CONSTRUCTOR_NAME] = Constructor;\n  $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n  setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n  if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n  return Constructor;\n};\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.es/ecma262/#sec-map-objects\nmodule.exports = collection('Map', function (init) {\n  return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\n\nvar nativeApply = getBuiltIn('Reflect', 'apply');\nvar functionApply = Function.apply;\n\n// MS Edge argumentsList argument is optional\nvar OPTIONAL_ARGUMENTS_LIST = !fails(function () {\n  nativeApply(function () { /* empty */ });\n});\n\n// `Reflect.apply` method\n// https://tc39.es/ecma262/#sec-reflect.apply\n$({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {\n  apply: function apply(target, thisArgument, argumentsList) {\n    aCallable(target);\n    anObject(argumentsList);\n    return nativeApply\n      ? nativeApply(target, thisArgument, argumentsList)\n      : functionApply.call(target, thisArgument, argumentsList);\n  }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar objectGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\n// `Reflect.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-reflect.getprototypeof\n$({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {\n  getPrototypeOf: function getPrototypeOf(target) {\n    return objectGetPrototypeOf(anObject(target));\n  }\n});\n","function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\n/* eslint-disable no-bitwise -- used for calculations */\n\n/* eslint-disable unicorn/prefer-query-selector -- aiming at\n  backward-compatibility */\n\n/**\n* StackBlur - a fast almost Gaussian Blur For Canvas\n*\n* In case you find this class useful - especially in commercial projects -\n* I am not totally unhappy for a small donation to my PayPal account\n* mario@quasimondo.de\n*\n* Or support me on flattr:\n* {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.\n*\n* @module StackBlur\n* @author Mario Klingemann\n* Contact: mario@quasimondo.com\n* Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}\n* Twitter: @quasimondo\n*\n* @copyright (c) 2010 Mario Klingemann\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\nvar mulTable = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];\nvar shgTable = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];\n/**\n * @param {string|HTMLImageElement} img\n * @param {string|HTMLCanvasElement} canvas\n * @param {Float} radius\n * @param {boolean} blurAlphaChannel\n * @param {boolean} useOffsetWidth\n * @returns {undefined}\n */\n\nfunction processImage(img, canvas, radius, blurAlphaChannel, useOffsetWidth) {\n  if (typeof img === 'string') {\n    img = document.getElementById(img);\n  }\n\n  if (!img || !('naturalWidth' in img)) {\n    return;\n  }\n\n  var dimensionType = useOffsetWidth ? 'offset' : 'natural';\n  var w = img[dimensionType + 'Width'];\n  var h = img[dimensionType + 'Height'];\n\n  if (typeof canvas === 'string') {\n    canvas = document.getElementById(canvas);\n  }\n\n  if (!canvas || !('getContext' in canvas)) {\n    return;\n  }\n\n  canvas.style.width = w + 'px';\n  canvas.style.height = h + 'px';\n  canvas.width = w;\n  canvas.height = h;\n  var context = canvas.getContext('2d');\n  context.clearRect(0, 0, w, h);\n  context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);\n\n  if (isNaN(radius) || radius < 1) {\n    return;\n  }\n\n  if (blurAlphaChannel) {\n    processCanvasRGBA(canvas, 0, 0, w, h, radius);\n  } else {\n    processCanvasRGB(canvas, 0, 0, w, h, radius);\n  }\n}\n/**\n * @param {string|HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @throws {Error|TypeError}\n * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}\n */\n\n\nfunction getImageDataFromCanvas(canvas, topX, topY, width, height) {\n  if (typeof canvas === 'string') {\n    canvas = document.getElementById(canvas);\n  }\n\n  if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {\n    throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');\n  }\n\n  var context = canvas.getContext('2d');\n\n  try {\n    return context.getImageData(topX, topY, width, height);\n  } catch (e) {\n    throw new Error('unable to access image data: ' + e);\n  }\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGBA(canvas, topX, topY, width, height, radius) {\n  if (isNaN(radius) || radius < 1) {\n    return;\n  }\n\n  radius |= 0;\n  var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n  imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);\n  canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGBA(imageData, topX, topY, width, height, radius) {\n  var pixels = imageData.data;\n  var div = 2 * radius + 1; // const w4 = width << 2;\n\n  var widthMinus1 = width - 1;\n  var heightMinus1 = height - 1;\n  var radiusPlus1 = radius + 1;\n  var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n  var stackStart = new BlurStack();\n  var stack = stackStart;\n  var stackEnd;\n\n  for (var i = 1; i < div; i++) {\n    stack = stack.next = new BlurStack();\n\n    if (i === radiusPlus1) {\n      stackEnd = stack;\n    }\n  }\n\n  stack.next = stackStart;\n  var stackIn = null,\n      stackOut = null,\n      yw = 0,\n      yi = 0;\n  var mulSum = mulTable[radius];\n  var shgSum = shgTable[radius];\n\n  for (var y = 0; y < height; y++) {\n    stack = stackStart;\n    var pr = pixels[yi],\n        pg = pixels[yi + 1],\n        pb = pixels[yi + 2],\n        pa = pixels[yi + 3];\n\n    for (var _i = 0; _i < radiusPlus1; _i++) {\n      stack.r = pr;\n      stack.g = pg;\n      stack.b = pb;\n      stack.a = pa;\n      stack = stack.next;\n    }\n\n    var rInSum = 0,\n        gInSum = 0,\n        bInSum = 0,\n        aInSum = 0,\n        rOutSum = radiusPlus1 * pr,\n        gOutSum = radiusPlus1 * pg,\n        bOutSum = radiusPlus1 * pb,\n        aOutSum = radiusPlus1 * pa,\n        rSum = sumFactor * pr,\n        gSum = sumFactor * pg,\n        bSum = sumFactor * pb,\n        aSum = sumFactor * pa;\n\n    for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {\n      var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);\n      var r = pixels[p],\n          g = pixels[p + 1],\n          b = pixels[p + 2],\n          a = pixels[p + 3];\n      var rbs = radiusPlus1 - _i2;\n      rSum += (stack.r = r) * rbs;\n      gSum += (stack.g = g) * rbs;\n      bSum += (stack.b = b) * rbs;\n      aSum += (stack.a = a) * rbs;\n      rInSum += r;\n      gInSum += g;\n      bInSum += b;\n      aInSum += a;\n      stack = stack.next;\n    }\n\n    stackIn = stackStart;\n    stackOut = stackEnd;\n\n    for (var x = 0; x < width; x++) {\n      var paInitial = aSum * mulSum >> shgSum;\n      pixels[yi + 3] = paInitial;\n\n      if (paInitial !== 0) {\n        var _a2 = 255 / paInitial;\n\n        pixels[yi] = (rSum * mulSum >> shgSum) * _a2;\n        pixels[yi + 1] = (gSum * mulSum >> shgSum) * _a2;\n        pixels[yi + 2] = (bSum * mulSum >> shgSum) * _a2;\n      } else {\n        pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n      }\n\n      rSum -= rOutSum;\n      gSum -= gOutSum;\n      bSum -= bOutSum;\n      aSum -= aOutSum;\n      rOutSum -= stackIn.r;\n      gOutSum -= stackIn.g;\n      bOutSum -= stackIn.b;\n      aOutSum -= stackIn.a;\n\n      var _p = x + radius + 1;\n\n      _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;\n      rInSum += stackIn.r = pixels[_p];\n      gInSum += stackIn.g = pixels[_p + 1];\n      bInSum += stackIn.b = pixels[_p + 2];\n      aInSum += stackIn.a = pixels[_p + 3];\n      rSum += rInSum;\n      gSum += gInSum;\n      bSum += bInSum;\n      aSum += aInSum;\n      stackIn = stackIn.next;\n      var _stackOut = stackOut,\n          _r = _stackOut.r,\n          _g = _stackOut.g,\n          _b = _stackOut.b,\n          _a = _stackOut.a;\n      rOutSum += _r;\n      gOutSum += _g;\n      bOutSum += _b;\n      aOutSum += _a;\n      rInSum -= _r;\n      gInSum -= _g;\n      bInSum -= _b;\n      aInSum -= _a;\n      stackOut = stackOut.next;\n      yi += 4;\n    }\n\n    yw += width;\n  }\n\n  for (var _x = 0; _x < width; _x++) {\n    yi = _x << 2;\n\n    var _pr = pixels[yi],\n        _pg = pixels[yi + 1],\n        _pb = pixels[yi + 2],\n        _pa = pixels[yi + 3],\n        _rOutSum = radiusPlus1 * _pr,\n        _gOutSum = radiusPlus1 * _pg,\n        _bOutSum = radiusPlus1 * _pb,\n        _aOutSum = radiusPlus1 * _pa,\n        _rSum = sumFactor * _pr,\n        _gSum = sumFactor * _pg,\n        _bSum = sumFactor * _pb,\n        _aSum = sumFactor * _pa;\n\n    stack = stackStart;\n\n    for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {\n      stack.r = _pr;\n      stack.g = _pg;\n      stack.b = _pb;\n      stack.a = _pa;\n      stack = stack.next;\n    }\n\n    var yp = width;\n    var _gInSum = 0,\n        _bInSum = 0,\n        _aInSum = 0,\n        _rInSum = 0;\n\n    for (var _i4 = 1; _i4 <= radius; _i4++) {\n      yi = yp + _x << 2;\n\n      var _rbs = radiusPlus1 - _i4;\n\n      _rSum += (stack.r = _pr = pixels[yi]) * _rbs;\n      _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;\n      _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;\n      _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;\n      _rInSum += _pr;\n      _gInSum += _pg;\n      _bInSum += _pb;\n      _aInSum += _pa;\n      stack = stack.next;\n\n      if (_i4 < heightMinus1) {\n        yp += width;\n      }\n    }\n\n    yi = _x;\n    stackIn = stackStart;\n    stackOut = stackEnd;\n\n    for (var _y = 0; _y < height; _y++) {\n      var _p2 = yi << 2;\n\n      pixels[_p2 + 3] = _pa = _aSum * mulSum >> shgSum;\n\n      if (_pa > 0) {\n        _pa = 255 / _pa;\n        pixels[_p2] = (_rSum * mulSum >> shgSum) * _pa;\n        pixels[_p2 + 1] = (_gSum * mulSum >> shgSum) * _pa;\n        pixels[_p2 + 2] = (_bSum * mulSum >> shgSum) * _pa;\n      } else {\n        pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;\n      }\n\n      _rSum -= _rOutSum;\n      _gSum -= _gOutSum;\n      _bSum -= _bOutSum;\n      _aSum -= _aOutSum;\n      _rOutSum -= stackIn.r;\n      _gOutSum -= stackIn.g;\n      _bOutSum -= stackIn.b;\n      _aOutSum -= stackIn.a;\n      _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;\n      _rSum += _rInSum += stackIn.r = pixels[_p2];\n      _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];\n      _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];\n      _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];\n      stackIn = stackIn.next;\n      _rOutSum += _pr = stackOut.r;\n      _gOutSum += _pg = stackOut.g;\n      _bOutSum += _pb = stackOut.b;\n      _aOutSum += _pa = stackOut.a;\n      _rInSum -= _pr;\n      _gInSum -= _pg;\n      _bInSum -= _pb;\n      _aInSum -= _pa;\n      stackOut = stackOut.next;\n      yi += width;\n    }\n  }\n\n  return imageData;\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGB(canvas, topX, topY, width, height, radius) {\n  if (isNaN(radius) || radius < 1) {\n    return;\n  }\n\n  radius |= 0;\n  var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n  imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);\n  canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGB(imageData, topX, topY, width, height, radius) {\n  var pixels = imageData.data;\n  var div = 2 * radius + 1; // const w4 = width << 2;\n\n  var widthMinus1 = width - 1;\n  var heightMinus1 = height - 1;\n  var radiusPlus1 = radius + 1;\n  var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n  var stackStart = new BlurStack();\n  var stack = stackStart;\n  var stackEnd;\n\n  for (var i = 1; i < div; i++) {\n    stack = stack.next = new BlurStack();\n\n    if (i === radiusPlus1) {\n      stackEnd = stack;\n    }\n  }\n\n  stack.next = stackStart;\n  var stackIn = null;\n  var stackOut = null;\n  var mulSum = mulTable[radius];\n  var shgSum = shgTable[radius];\n  var p, rbs;\n  var yw = 0,\n      yi = 0;\n\n  for (var y = 0; y < height; y++) {\n    var pr = pixels[yi],\n        pg = pixels[yi + 1],\n        pb = pixels[yi + 2],\n        rOutSum = radiusPlus1 * pr,\n        gOutSum = radiusPlus1 * pg,\n        bOutSum = radiusPlus1 * pb,\n        rSum = sumFactor * pr,\n        gSum = sumFactor * pg,\n        bSum = sumFactor * pb;\n    stack = stackStart;\n\n    for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {\n      stack.r = pr;\n      stack.g = pg;\n      stack.b = pb;\n      stack = stack.next;\n    }\n\n    var rInSum = 0,\n        gInSum = 0,\n        bInSum = 0;\n\n    for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {\n      p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);\n      rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);\n      gSum += (stack.g = pg = pixels[p + 1]) * rbs;\n      bSum += (stack.b = pb = pixels[p + 2]) * rbs;\n      rInSum += pr;\n      gInSum += pg;\n      bInSum += pb;\n      stack = stack.next;\n    }\n\n    stackIn = stackStart;\n    stackOut = stackEnd;\n\n    for (var x = 0; x < width; x++) {\n      pixels[yi] = rSum * mulSum >> shgSum;\n      pixels[yi + 1] = gSum * mulSum >> shgSum;\n      pixels[yi + 2] = bSum * mulSum >> shgSum;\n      rSum -= rOutSum;\n      gSum -= gOutSum;\n      bSum -= bOutSum;\n      rOutSum -= stackIn.r;\n      gOutSum -= stackIn.g;\n      bOutSum -= stackIn.b;\n      p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;\n      rInSum += stackIn.r = pixels[p];\n      gInSum += stackIn.g = pixels[p + 1];\n      bInSum += stackIn.b = pixels[p + 2];\n      rSum += rInSum;\n      gSum += gInSum;\n      bSum += bInSum;\n      stackIn = stackIn.next;\n      rOutSum += pr = stackOut.r;\n      gOutSum += pg = stackOut.g;\n      bOutSum += pb = stackOut.b;\n      rInSum -= pr;\n      gInSum -= pg;\n      bInSum -= pb;\n      stackOut = stackOut.next;\n      yi += 4;\n    }\n\n    yw += width;\n  }\n\n  for (var _x2 = 0; _x2 < width; _x2++) {\n    yi = _x2 << 2;\n\n    var _pr2 = pixels[yi],\n        _pg2 = pixels[yi + 1],\n        _pb2 = pixels[yi + 2],\n        _rOutSum2 = radiusPlus1 * _pr2,\n        _gOutSum2 = radiusPlus1 * _pg2,\n        _bOutSum2 = radiusPlus1 * _pb2,\n        _rSum2 = sumFactor * _pr2,\n        _gSum2 = sumFactor * _pg2,\n        _bSum2 = sumFactor * _pb2;\n\n    stack = stackStart;\n\n    for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {\n      stack.r = _pr2;\n      stack.g = _pg2;\n      stack.b = _pb2;\n      stack = stack.next;\n    }\n\n    var _rInSum2 = 0,\n        _gInSum2 = 0,\n        _bInSum2 = 0;\n\n    for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {\n      yi = yp + _x2 << 2;\n      _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);\n      _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;\n      _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;\n      _rInSum2 += _pr2;\n      _gInSum2 += _pg2;\n      _bInSum2 += _pb2;\n      stack = stack.next;\n\n      if (_i8 < heightMinus1) {\n        yp += width;\n      }\n    }\n\n    yi = _x2;\n    stackIn = stackStart;\n    stackOut = stackEnd;\n\n    for (var _y2 = 0; _y2 < height; _y2++) {\n      p = yi << 2;\n      pixels[p] = _rSum2 * mulSum >> shgSum;\n      pixels[p + 1] = _gSum2 * mulSum >> shgSum;\n      pixels[p + 2] = _bSum2 * mulSum >> shgSum;\n      _rSum2 -= _rOutSum2;\n      _gSum2 -= _gOutSum2;\n      _bSum2 -= _bOutSum2;\n      _rOutSum2 -= stackIn.r;\n      _gOutSum2 -= stackIn.g;\n      _bOutSum2 -= stackIn.b;\n      p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;\n      _rSum2 += _rInSum2 += stackIn.r = pixels[p];\n      _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];\n      _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];\n      stackIn = stackIn.next;\n      _rOutSum2 += _pr2 = stackOut.r;\n      _gOutSum2 += _pg2 = stackOut.g;\n      _bOutSum2 += _pb2 = stackOut.b;\n      _rInSum2 -= _pr2;\n      _gInSum2 -= _pg2;\n      _bInSum2 -= _pb2;\n      stackOut = stackOut.next;\n      yi += width;\n    }\n  }\n\n  return imageData;\n}\n/**\n *\n */\n\n\nvar BlurStack =\n/**\n * Set properties.\n */\nfunction BlurStack() {\n  _classCallCheck(this, BlurStack);\n\n  this.r = 0;\n  this.g = 0;\n  this.b = 0;\n  this.a = 0;\n  this.next = null;\n};\n\nexport { BlurStack, processCanvasRGB as canvasRGB, processCanvasRGBA as canvasRGBA, processImage as image, processImageDataRGB as imageDataRGB, processImageDataRGBA as imageDataRGBA };\n"],"names":["match","version","check","it","Math","globalThis","window","self","global","this","Function","key","value","Object","defineProperty","configurable","writable","error","SHARED","setGlobal","module","store","undefined","push","mode","copyright","TypeError","argument","requireObjectCoercible","hasOwnProperty","hasOwn","call","toObject","id","postfix","random","String","toString","aFunction","isCallable","namespace","method","arguments","length","getBuiltIn","process","Deno","versions","v8","split","userAgent","exec","getOwnPropertySymbols","fails","symbol","Symbol","sham","V8_VERSION","NATIVE_SYMBOL","iterator","WellKnownSymbolsStore","shared","createWellKnownSymbol","USE_SYMBOL_AS_UID","withoutSetter","uid","name","test","wellKnownSymbol","get","document","EXISTS","isObject","createElement","DESCRIPTORS","a","$Symbol","tryToString","V","P","func","aCallable","TO_PRIMITIVE","input","pref","isSymbol","result","exoticToPrim","getMethod","fn","val","valueOf","ordinaryToPrimitive","toPrimitive","$defineProperty","O","Attributes","anObject","toPropertyKey","IE8_DOM_DEFINE","bitmap","enumerable","object","definePropertyModule","f","createPropertyDescriptor","functionToString","inspectSource","set","has","WeakMap","keys","OBJECT_ALREADY_INITIALIZED","NATIVE_WEAK_MAP","state","wmget","wmhas","wmset","metadata","facade","STATE","sharedKey","hiddenKeys","createNonEnumerableProperty","enforce","getterFor","TYPE","type","FunctionPrototype","prototype","getDescriptor","getOwnPropertyDescriptor","PROPER","CONFIGURABLE","CONFIGURABLE_FUNCTION_NAME","require$$0","getInternalState","InternalStateModule","enforceInternalState","TEMPLATE","options","unsafe","simple","noTargetGet","slice","replace","source","join","TO_STRING_TAG","CORRECT_ARGUMENTS","classofRaw","TO_STRING_TAG_SUPPORT","tag","tryGet","callee","classof","redefine","$propertyIsEnumerable","propertyIsEnumerable","descriptor","IndexedObject","$getOwnPropertyDescriptor","toIndexedObject","propertyIsEnumerableModule","ceil","floor","number","max","min","index","integer","toIntegerOrInfinity","obj","toLength","createMethod","IS_INCLUDES","$this","el","fromIndex","lengthOfArrayLike","toAbsoluteIndex","includes","indexOf","names","i","enumBugKeys","concat","getOwnPropertyNames","internalObjectKeys","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","target","ownKeys","getOwnPropertyDescriptorModule","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","toLowerCase","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","forced","copyConstructorProperties","Promise","src","setPrototypeOf","setter","CORRECT_SETTER","Array","proto","aPossiblePrototype","__proto__","TAG","SPECIES","CONSTRUCTOR_NAME","Constructor","ITERATOR","ArrayPrototype","Iterators","that","b","c","apply","usingIterator","iteratorMethod","getIteratorMethod","kind","innerResult","innerError","Result","stopped","iterable","unboundFunction","iterFn","next","step","AS_ENTRIES","IS_ITERATOR","INTERRUPTED","bind","stop","condition","iteratorClose","callFn","isArrayIteratorMethod","getIterator","done","SAFE_CLOSING","called","iteratorWithReturn","from","location","defer","channel","port","SKIP_CLOSING","ITERATION_SUPPORT","empty","construct","constructorRegExp","INCORRECT_TO_STRING","isConstructorModern","defaultConstructor","S","C","constructor","isConstructor","aConstructor","setImmediate","clear","clearImmediate","MessageChannel","Dispatch","counter","queue","ONREADYSTATECHANGE","run","runner","listener","event","post","postMessage","protocol","host","args","argumentsLength","IS_NODE","nextTick","now","IS_IOS","port2","port1","onmessage","addEventListener","importScripts","html","appendChild","removeChild","setTimeout","flush","head","last","notify","toggle","node","promise","then","Pebble","macrotask","require$$1","MutationObserver","WebKitMutationObserver","queueMicrotaskDescriptor","queueMicrotask","parent","domain","exit","enter","IS_WEBOS_WEBKIT","IS_IOS_PEBBLE","resolve","createTextNode","observe","characterData","Internal","OwnPromiseCapability","PromiseWrapper","nativeThen","task","PromiseCapability","reject","$$resolve","$$reject","PROMISE","setInternalState","getInternalPromiseState","NativePromisePrototype","NativePromise","PromiseConstructor","PromiseConstructorPrototype","newPromiseCapability","newPromiseCapabilityModule","newGenericPromiseCapability","DISPATCH_EVENT","createEvent","dispatchEvent","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","UNHANDLED_REJECTION","SUBCLASSING","FORCED","PROMISE_CONSTRUCTOR_SOURCE","GLOBAL_CORE_JS_PROMISE","FakePromise","IS_BROWSER","INCORRECT_ITERATION","checkCorrectnessOfIteration","all","isThenable","isReject","notified","chain","reactions","microtask","ok","exited","reaction","handler","fail","rejection","onHandleUnhandled","onUnhandled","reason","initEvent","console","hostReportErrors","isUnhandled","perform","emit","unwrap","internalReject","internalResolve","wrapper","executor","anInstance","redefineAll","onFulfilled","onRejected","speciesConstructor","wrap","setToStringTag","setSpecies","r","capability","x","promiseCapability","promiseResolve","$promiseResolve","values","remaining","iterate","alreadyCalled","race","deleteProperty","propertyKey","runtime","exports","Op","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","err","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","GenStateSuspendedStart","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","info","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","async","iter","reverse","pop","skipTempReset","prev","charAt","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","asyncGeneratorStep","gen","_next","_throw","isArray","originalArray","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","IS_FILTER_REJECT","NO_HOLES","callbackfn","specificCreate","boundFunction","arraySpeciesCreate","map","filter","some","every","find","findIndex","filterReject","METHOD_NAME","array","foo","Boolean","$map","HAS_SPECIES_SUPPORT","arrayMethodHasSpeciesSupport","whitespace","whitespaces","ltrim","RegExp","rtrim","start","end","trim","$parseFloat","parseFloat","Infinity","trimmedString","activeXDocument","ignoreCase","multiline","dotAll","unicode","sticky","$RegExp","re","lastIndex","defineProperties","Properties","objectKeys","IE_PROTO","EmptyConstructor","scriptTag","content","LT","NullProtoObjectViaActiveX","write","close","temp","parentWindow","NullProtoObject","ActiveXObject","iframeDocument","iframe","documentCreateElement","style","display","contentWindow","open","F","re1","re2","flags","groups","nativeExec","nativeReplace","patchedExec","UPDATES_LAST_INDEX_WRONG","UNSUPPORTED_Y","stickyHelpers","BROKEN_CARET","NPCG_INCLUDED","UNSUPPORTED_DOT_ALL","UNSUPPORTED_NCG","reCopy","group","str","raw","regexpFlags","charsAdded","strCopy","RegExpPrototype","KEY","SHAM","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","methods","nativeMethod","regexp","arg2","forceStringMethod","$exec","regexpExec","CONVERT_TO_STRING","pos","first","second","position","size","charCodeAt","codeAt","R","MATCH","nativeMatch","maybeCallNative","matcher","rx","res","regExpExec","fullUnicode","A","n","matchStr","advanceStringIndex","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","matched","captures","namedCaptures","tailPos","m","symbols","ch","capture","REPLACE","REPLACE_KEEPS_$0","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","_","UNSAFE_SUBSTITUTE","searchValue","replaceValue","replacer","functionalReplace","results","accumulatedResult","nextSourcePosition","j","replacerArgs","getSubstitution","isRegExp","error1","error2","$startsWith","startsWith","CORRECT_IS_REGEXP_LOGIC","correctIsRegExpLogic","MDN_POLYFILL_BUG","searchString","notARegExp","search","nativeJoin","ES3_STRINGS","STRICT_METHOD","arrayMethodIsStrict","separator","arr","_i","_s","_e","_arr","_n","_d","len","arr2","o","minLen","arrayLikeToArray","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","instance","_defineProperties","props","protoProps","staticProps","IS_CONCAT_SPREADABLE","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_INDEX_EXCEEDED","IS_CONCAT_SPREADABLE_SUPPORT","SPECIES_SUPPORT","isConcatSpreadable","spreadable","k","E","createProperty","$every","IS_RIGHT","memo","$reduce","left","right","CHROME_VERSION","reduce","$endsWith","endsWith","endPosition","arrayPush","MAX_UINT32","SPLIT","nativeSplit","internalSplit","limit","lim","lastLength","output","lastLastIndex","separatorCopy","splitter","unicodeMatching","callRegExpExec","p","q","e","z","originalExec","defaultSetTimout","defaultClearTimeout","cachedSetTimeout","cachedClearTimeout","runTimeout","fun","clearTimeout","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","marker","runClearTimeout","Item","noop","on","addListener","once","off","removeListener","removeAllListeners","performance","performanceNow","mozNow","msNow","oNow","webkitNow","Date","getTime","startTime","title","browser","env","argv","binding","cwd","chdir","dir","umask","hrtime","previousTimestamp","clocktime","seconds","nanoseconds","platform","release","config","uptime","hr","root","vendors","suffix","raf","caf","callback","_now","cp","cancelled","round","requestAnimationFrame","cancelAnimationFrame","FUNCTION_NAME_EXISTS","FunctionPrototypeToString","nameRE","PROPER_FUNCTION_NAME","$trim","color_string","alpha","substr","simple_colors","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","color_defs","example","bits","parseInt","processor","channels","g","toRGB","toRGBA","toHex","getHelpXML","examples","sc","xml","setAttribute","list_item","list_color","RGBColor","example_div","cssText","list_item_value","$forEach","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","classList","DOMTokenListPrototype","handlePrototype","CollectionPrototype","COLLECTION_NAME","DOMIterables","_setPrototypeOf","subClass","superClass","_typeof","ReferenceError","assertThisInitialized","_getPrototypeOf","ENTRIES","arrayLike","IS_CONSTRUCTOR","mapfn","mapping","callWithSafeIterationClosing","UNSCOPABLES","$includes","addToUnscopables","$indexOf","nativeIndexOf","NEGATIVE_ZERO","searchElement","$some","PrototypeOfArrayIteratorPrototype","arrayIterator","ObjectPrototype","CORRECT_PROTOTYPE_GETTER","BUGGY_SAFARI_ITERATORS","returnThis","FunctionName","IteratorsCore","KEYS","VALUES","Iterable","NAME","IteratorConstructor","DEFAULT","IS_SET","createIteratorConstructor","CurrentIteratorPrototype","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","entries","$","STRING_ITERATOR","defineIterator","iterated","point","arrayWithoutHoles","iterableToArray","nonIterableSpread","nativeReverse","dummy","Wrapper","NewTarget","NewTargetPrototype","require$$2","require$$3","NUMBER","NativeNumber","NumberPrototype","toNumeric","primValue","toNumber","third","radix","maxCode","digits","code","NaN","NumberWrapper","thisNumberValue","inheritIfRequired","property","_get","receiver","Reflect","base","superPropBase","desc","fill","endPos","extendStatics","d","__extends","__","TO_STRING","nativeToString","NOT_GENERIC","INCORRECT_NAME","$toString","rf","ARRAY_ITERATOR","Arguments","ArrayValues","ArrayIteratorMethods","$getOwnPropertyNames","windowNames","getWindowNames","isExtensible","preventExtensions","REQUIRED","METADATA","setMetadata","objectID","weakData","meta","enable","splice","getOwnPropertyNamesExternalModule","fastKey","getWeakData","onFreeze","FREEZING","internalStateGetterFor","common","IS_WEAK","ADDER","NativeConstructor","NativePrototype","exported","fixMethod","getConstructor","InternalMetadataModule","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","setStrong","collection","init","previous","getEntry","removed","add","ITERATOR_NAME","getInternalCollectionState","getInternalIteratorState","nativeApply","functionApply","OPTIONAL_ARGUMENTS_LIST","thisArgument","argumentsList","objectGetPrototypeOf","mulTable","shgTable","processCanvasRGBA","canvas","topX","topY","width","height","radius","imageData","getElementById","getContext","getImageData","getImageDataFromCanvas","stackEnd","pixels","div","widthMinus1","heightMinus1","radiusPlus1","sumFactor","stackStart","BlurStack","stack","stackIn","stackOut","yw","yi","mulSum","shgSum","y","pr","pg","pb","pa","rInSum","gInSum","bInSum","aInSum","rOutSum","gOutSum","bOutSum","aOutSum","rSum","gSum","bSum","aSum","_i2","rbs","paInitial","_a2","_p","_stackOut","_r","_g","_b","_a","_x","_pr","_pg","_pb","_pa","_rOutSum","_gOutSum","_bOutSum","_aOutSum","_rSum","_gSum","_bSum","_aSum","_i3","yp","_gInSum","_bInSum","_aInSum","_rInSum","_i4","_rbs","_y","_p2","processImageDataRGBA","putImageData","_classCallCheck"],"mappings":"uiBAAA,ICOIA,EAAOC,EDPPC,EAAQ,SAAUC,UACbA,GAAMA,EAAGC,MAAQA,MAAQD,KAMhCD,EAA2B,iBAAdG,YAA0BA,aACvCH,EAAuB,iBAAVI,QAAsBA,SAEnCJ,EAAqB,iBAARK,MAAoBA,OACjCL,EAAuB,iBAAVM,GAAsBA,IAElC,kBAAqBC,KAArB,IAAmCC,SAAS,cAATA,KEXrB,SAAUC,EAAKC,OAG5BC,OAAOC,eAAeN,EAAQG,EAAK,CAAEC,MAAOA,EAAOG,cAAc,EAAMC,UAAU,IACjF,MAAOC,GACPT,EAAOG,GAAOC,SACPA,GCLPM,EAAS,uBACDV,EAAOU,IAAWC,EAAUD,EAAQ,sBCD/CE,UAAiB,SAAUT,EAAKC,UACxBS,EAAMV,KAASU,EAAMV,QAAiBW,IAAVV,EAAsBA,EAAQ,MAChE,WAAY,IAAIW,KAAK,CACtBtB,QAAS,SACTuB,KAAyB,SACzBC,UAAW,8CCNI,SAAUtB,MACfmB,MAANnB,EAAiB,MAAMuB,UAAU,wBAA0BvB,UACxDA,KCAQ,SAAUwB,UAClBd,OAAOe,EAAuBD,KCHnCE,EAAiB,GAAGA,iBAIPhB,OAAOiB,QAAU,SAAgB3B,EAAIQ,UAC7CkB,EAAeE,KAAKC,EAAS7B,GAAKQ,ICPvCsB,EAAK,EACLC,EAAU9B,KAAK+B,WAEF,SAAUxB,SAClB,UAAYyB,YAAed,IAARX,EAAoB,GAAKA,GAAO,QAAUs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EAASp8B,EAC3B4+B,IAAYJ,GAAMpC,EAAS9lC,EAC3BgpC,IAAWjB,GACXc,IAAWb,GACXc,IAAWb,GACXc,IAAWb,GACXpC,EAAWA,EAASt7B,KACpBw7B,GAAMrB,UAIHG,EAnPKuE,CAAqBvE,EAAWL,EAAMC,EAAMC,EAAOC,EAAQC,GACvEL,EAAOQ,WAAW,MAAMsE,aAAaxE,EAAWL,EAAMC,IAocxD,IAAIiB,GAIJ,SAASA,KA3lBT,SAAyB1e,EAAU5d,QAC3B4d,aAAoB5d,SAClB,IAAItM,UAAU,qCA0lBtBwsC,CAAgBztC,KAAM6pC,QAEjBrxB,EAAI,OACJsjB,EAAI,OACJluB,EAAI,OACJ1J,EAAI,OACJwK,KAAO"}
Index: imaps-frontend/node_modules/canvg/lib/util/debug.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/debug.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/debug.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,33 @@
+import { RenderingContext2D } from '../types';
+/**
+ * Wrap rendering context to log every action.
+ * @param ctx - Rendering context.
+ * @returns Proxy logger.
+ */
+export declare function ctxLogger(ctx: RenderingContext2D): RenderingContext2D;
+/**
+ * Draw point.
+ * @param ctx - Rendering context.
+ * @param x - Point x.
+ * @param y - Point y
+ * @param radius - Point radius.
+ */
+export declare function point(ctx: RenderingContext2D, x?: number, y?: number, radius?: number): void;
+/**
+ * Draw triangle to vizualize angle.
+ * @param ctx - Rendering context.
+ * @param x - Angle x.
+ * @param y - Angle y.
+ * @param size - Triangle size.
+ */
+export declare function angle(ctx: RenderingContext2D, x?: number, y?: number, size?: number): void;
+/**
+ * Draw triangle to vizualize angle.
+ * @param ctx - Rendering context.
+ * @param x - Angle x.
+ * @param y - Angle y.
+ * @param width
+ * @param height
+ */
+export declare function box(ctx: RenderingContext2D, x: number, y: number, width: number, height: number): void;
+//# sourceMappingURL=debug.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/util/debug.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/debug.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/debug.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/util/debug.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,kBAAkB,sBA6BhD;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,kBAAkB,EAAE,CAAC,SAAI,EAAE,CAAC,SAAI,EAAE,MAAM,SAAK,QAMvE;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,kBAAkB,EAAE,CAAC,SAAI,EAAE,CAAC,SAAI,EAAE,IAAI,SAAK,QASrE;AAED;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,kBAAkB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAU/F"}
Index: imaps-frontend/node_modules/canvg/lib/util/index.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,4 @@
+export * from './string';
+export * from './styles';
+export * from './math';
+//# sourceMappingURL=index.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/util/index.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/index.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
Index: imaps-frontend/node_modules/canvg/lib/util/math.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/math.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/math.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,29 @@
+export declare const PSEUDO_ZERO = 1e-8;
+/**
+ * Vector magnitude.
+ * @param v
+ * @returns Number result.
+ */
+export declare function vectorMagnitude(v: number[]): number;
+/**
+ * Ratio between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+export declare function vectorsRatio(u: number[], v: number[]): number;
+/**
+ * Angle between two vectors.
+ * @param u
+ * @param v
+ * @returns Number result.
+ */
+export declare function vectorsAngle(u: number[], v: number[]): number;
+export declare function CB1(t: number): number;
+export declare function CB2(t: number): number;
+export declare function CB3(t: number): number;
+export declare function CB4(t: number): number;
+export declare function QB1(t: number): number;
+export declare function QB2(t: number): number;
+export declare function QB3(t: number): number;
+//# sourceMappingURL=math.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/util/math.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/math.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/math.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/util/math.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,OAAY,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,UAE1C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,UAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,UAEpD;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B"}
Index: imaps-frontend/node_modules/canvg/lib/util/string.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/string.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/string.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,43 @@
+/**
+ * HTML-safe compress white-spaces.
+ * @param str - String to compress.
+ * @returns String.
+ */
+export declare function compressSpaces(str: string): string;
+/**
+ * HTML-safe left trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+export declare function trimLeft(str: string): string;
+/**
+ * HTML-safe right trim.
+ * @param str - String to trim.
+ * @returns String.
+ */
+export declare function trimRight(str: string): string;
+/**
+ * String to numbers array.
+ * @param str - Numbers string.
+ * @returns Numbers array.
+ */
+export declare function toNumbers(str: string): number[];
+/**
+ * Normalize attribute name.
+ * @param name - Attribute name.
+ * @returns Normalized attribute name.
+ */
+export declare function normalizeAttributeName(name: string): string;
+/**
+ * Parse external URL.
+ * @param url - CSS url string.
+ * @returns Parsed URL.
+ */
+export declare function parseExternalUrl(url: string): string;
+/**
+ * Transform floats to integers in rgb colors.
+ * @param color - Color to normalize.
+ * @returns Normalized color.
+ */
+export declare function normalizeColor(color: string): string;
+//# sourceMappingURL=string.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/util/string.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/string.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/string.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/util/string.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,UAEzC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAEnC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,UAEpC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,YAIpC;AAKD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,UAMlD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQpD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,UAc3C"}
Index: imaps-frontend/node_modules/canvg/lib/util/styles.d.ts
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/styles.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/styles.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,7 @@
+/**
+ * Measure selector specificity.
+ * @param selector - Selector to measure.
+ * @returns Specificity.
+ */
+export declare function getSelectorSpecificity(selector: string): string;
+//# sourceMappingURL=styles.d.ts.map
Index: imaps-frontend/node_modules/canvg/lib/util/styles.d.ts.map
===================================================================
--- imaps-frontend/node_modules/canvg/lib/util/styles.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/lib/util/styles.d.ts.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/util/styles.ts"],"names":[],"mappings":"AA0BA;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,UAiCtD"}
Index: imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/LICENSE
===================================================================
--- imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/LICENSE	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/LICENSE	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2014-present, Facebook, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
Index: imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/README.md
===================================================================
--- imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/README.md	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/README.md	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,31 @@
+# regenerator-runtime
+
+Standalone runtime for
+[Regenerator](https://github.com/facebook/regenerator)-compiled generator
+and `async` functions.
+
+To import the runtime as a module (recommended), either of the following
+import styles will work:
+```js
+// CommonJS
+const regeneratorRuntime = require("regenerator-runtime");
+
+// ECMAScript 2015
+import regeneratorRuntime from "regenerator-runtime";
+```
+
+To ensure that `regeneratorRuntime` is defined globally, either of the
+following styles will work:
+```js
+// CommonJS
+require("regenerator-runtime/runtime");
+
+// ECMAScript 2015
+import "regenerator-runtime/runtime.js";
+```
+
+To get the absolute file system path of `runtime.js`, evaluate the
+following expression:
+```js
+require("regenerator-runtime/path").path
+```
Index: imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/package.json
===================================================================
--- imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/package.json	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/package.json	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,47 @@
+{
+  "_from": "regenerator-runtime@^0.13.7",
+  "_id": "regenerator-runtime@0.13.11",
+  "_inBundle": false,
+  "_integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
+  "_location": "/canvg/regenerator-runtime",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "regenerator-runtime@^0.13.7",
+    "name": "regenerator-runtime",
+    "escapedName": "regenerator-runtime",
+    "rawSpec": "^0.13.7",
+    "saveSpec": null,
+    "fetchSpec": "^0.13.7"
+  },
+  "_requiredBy": [
+    "/canvg"
+  ],
+  "_resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
+  "_shasum": "f6dca3e7ceec20590d07ada785636a90cdca17f9",
+  "_spec": "regenerator-runtime@^0.13.7",
+  "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/canvg",
+  "author": {
+    "name": "Ben Newman",
+    "email": "bn@cs.stanford.edu"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "Runtime for Regenerator-compiled generator and async functions.",
+  "keywords": [
+    "regenerator",
+    "runtime",
+    "generator",
+    "async"
+  ],
+  "license": "MIT",
+  "main": "runtime.js",
+  "name": "regenerator-runtime",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/facebook/regenerator/tree/main/packages/runtime"
+  },
+  "sideEffects": true,
+  "version": "0.13.11"
+}
Index: imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/path.js
===================================================================
--- imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/path.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/path.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,11 @@
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+exports.path = require("path").join(
+  __dirname,
+  "runtime.js"
+);
Index: imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/runtime.js
===================================================================
--- imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/runtime.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/node_modules/regenerator-runtime/runtime.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,761 @@
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+var runtime = (function (exports) {
+  "use strict";
+
+  var Op = Object.prototype;
+  var hasOwn = Op.hasOwnProperty;
+  var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };
+  var undefined; // More compressible than void 0.
+  var $Symbol = typeof Symbol === "function" ? Symbol : {};
+  var iteratorSymbol = $Symbol.iterator || "@@iterator";
+  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
+  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
+
+  function define(obj, key, value) {
+    Object.defineProperty(obj, key, {
+      value: value,
+      enumerable: true,
+      configurable: true,
+      writable: true
+    });
+    return obj[key];
+  }
+  try {
+    // IE 8 has a broken Object.defineProperty that only works on DOM objects.
+    define({}, "");
+  } catch (err) {
+    define = function(obj, key, value) {
+      return obj[key] = value;
+    };
+  }
+
+  function wrap(innerFn, outerFn, self, tryLocsList) {
+    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
+    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
+    var generator = Object.create(protoGenerator.prototype);
+    var context = new Context(tryLocsList || []);
+
+    // The ._invoke method unifies the implementations of the .next,
+    // .throw, and .return methods.
+    defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) });
+
+    return generator;
+  }
+  exports.wrap = wrap;
+
+  // Try/catch helper to minimize deoptimizations. Returns a completion
+  // record like context.tryEntries[i].completion. This interface could
+  // have been (and was previously) designed to take a closure to be
+  // invoked without arguments, but in all the cases we care about we
+  // already have an existing method we want to call, so there's no need
+  // to create a new function object. We can even get away with assuming
+  // the method takes exactly one argument, since that happens to be true
+  // in every case, so we don't have to touch the arguments object. The
+  // only additional allocation required is the completion record, which
+  // has a stable shape and so hopefully should be cheap to allocate.
+  function tryCatch(fn, obj, arg) {
+    try {
+      return { type: "normal", arg: fn.call(obj, arg) };
+    } catch (err) {
+      return { type: "throw", arg: err };
+    }
+  }
+
+  var GenStateSuspendedStart = "suspendedStart";
+  var GenStateSuspendedYield = "suspendedYield";
+  var GenStateExecuting = "executing";
+  var GenStateCompleted = "completed";
+
+  // Returning this object from the innerFn has the same effect as
+  // breaking out of the dispatch switch statement.
+  var ContinueSentinel = {};
+
+  // Dummy constructor functions that we use as the .constructor and
+  // .constructor.prototype properties for functions that return Generator
+  // objects. For full spec compliance, you may wish to configure your
+  // minifier not to mangle the names of these two functions.
+  function Generator() {}
+  function GeneratorFunction() {}
+  function GeneratorFunctionPrototype() {}
+
+  // This is a polyfill for %IteratorPrototype% for environments that
+  // don't natively support it.
+  var IteratorPrototype = {};
+  define(IteratorPrototype, iteratorSymbol, function () {
+    return this;
+  });
+
+  var getProto = Object.getPrototypeOf;
+  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
+  if (NativeIteratorPrototype &&
+      NativeIteratorPrototype !== Op &&
+      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
+    // This environment has a native %IteratorPrototype%; use it instead
+    // of the polyfill.
+    IteratorPrototype = NativeIteratorPrototype;
+  }
+
+  var Gp = GeneratorFunctionPrototype.prototype =
+    Generator.prototype = Object.create(IteratorPrototype);
+  GeneratorFunction.prototype = GeneratorFunctionPrototype;
+  defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: true });
+  defineProperty(
+    GeneratorFunctionPrototype,
+    "constructor",
+    { value: GeneratorFunction, configurable: true }
+  );
+  GeneratorFunction.displayName = define(
+    GeneratorFunctionPrototype,
+    toStringTagSymbol,
+    "GeneratorFunction"
+  );
+
+  // Helper for defining the .next, .throw, and .return methods of the
+  // Iterator interface in terms of a single ._invoke method.
+  function defineIteratorMethods(prototype) {
+    ["next", "throw", "return"].forEach(function(method) {
+      define(prototype, method, function(arg) {
+        return this._invoke(method, arg);
+      });
+    });
+  }
+
+  exports.isGeneratorFunction = function(genFun) {
+    var ctor = typeof genFun === "function" && genFun.constructor;
+    return ctor
+      ? ctor === GeneratorFunction ||
+        // For the native GeneratorFunction constructor, the best we can
+        // do is to check its .name property.
+        (ctor.displayName || ctor.name) === "GeneratorFunction"
+      : false;
+  };
+
+  exports.mark = function(genFun) {
+    if (Object.setPrototypeOf) {
+      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+    } else {
+      genFun.__proto__ = GeneratorFunctionPrototype;
+      define(genFun, toStringTagSymbol, "GeneratorFunction");
+    }
+    genFun.prototype = Object.create(Gp);
+    return genFun;
+  };
+
+  // Within the body of any async function, `await x` is transformed to
+  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+  // `hasOwn.call(value, "__await")` to determine if the yielded value is
+  // meant to be awaited.
+  exports.awrap = function(arg) {
+    return { __await: arg };
+  };
+
+  function AsyncIterator(generator, PromiseImpl) {
+    function invoke(method, arg, resolve, reject) {
+      var record = tryCatch(generator[method], generator, arg);
+      if (record.type === "throw") {
+        reject(record.arg);
+      } else {
+        var result = record.arg;
+        var value = result.value;
+        if (value &&
+            typeof value === "object" &&
+            hasOwn.call(value, "__await")) {
+          return PromiseImpl.resolve(value.__await).then(function(value) {
+            invoke("next", value, resolve, reject);
+          }, function(err) {
+            invoke("throw", err, resolve, reject);
+          });
+        }
+
+        return PromiseImpl.resolve(value).then(function(unwrapped) {
+          // When a yielded Promise is resolved, its final value becomes
+          // the .value of the Promise<{value,done}> result for the
+          // current iteration.
+          result.value = unwrapped;
+          resolve(result);
+        }, function(error) {
+          // If a rejected Promise was yielded, throw the rejection back
+          // into the async generator function so it can be handled there.
+          return invoke("throw", error, resolve, reject);
+        });
+      }
+    }
+
+    var previousPromise;
+
+    function enqueue(method, arg) {
+      function callInvokeWithMethodAndArg() {
+        return new PromiseImpl(function(resolve, reject) {
+          invoke(method, arg, resolve, reject);
+        });
+      }
+
+      return previousPromise =
+        // If enqueue has been called before, then we want to wait until
+        // all previous Promises have been resolved before calling invoke,
+        // so that results are always delivered in the correct order. If
+        // enqueue has not been called before, then it is important to
+        // call invoke immediately, without waiting on a callback to fire,
+        // so that the async generator function has the opportunity to do
+        // any necessary setup in a predictable way. This predictability
+        // is why the Promise constructor synchronously invokes its
+        // executor callback, and why async functions synchronously
+        // execute code before the first await. Since we implement simple
+        // async functions in terms of async generators, it is especially
+        // important to get this right, even though it requires care.
+        previousPromise ? previousPromise.then(
+          callInvokeWithMethodAndArg,
+          // Avoid propagating failures to Promises returned by later
+          // invocations of the iterator.
+          callInvokeWithMethodAndArg
+        ) : callInvokeWithMethodAndArg();
+    }
+
+    // Define the unified helper method that is used to implement .next,
+    // .throw, and .return (see defineIteratorMethods).
+    defineProperty(this, "_invoke", { value: enqueue });
+  }
+
+  defineIteratorMethods(AsyncIterator.prototype);
+  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
+    return this;
+  });
+  exports.AsyncIterator = AsyncIterator;
+
+  // Note that simple async functions are implemented on top of
+  // AsyncIterator objects; they just return a Promise for the value of
+  // the final result produced by the iterator.
+  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
+    if (PromiseImpl === void 0) PromiseImpl = Promise;
+
+    var iter = new AsyncIterator(
+      wrap(innerFn, outerFn, self, tryLocsList),
+      PromiseImpl
+    );
+
+    return exports.isGeneratorFunction(outerFn)
+      ? iter // If outerFn is a generator, return the full iterator.
+      : iter.next().then(function(result) {
+          return result.done ? result.value : iter.next();
+        });
+  };
+
+  function makeInvokeMethod(innerFn, self, context) {
+    var state = GenStateSuspendedStart;
+
+    return function invoke(method, arg) {
+      if (state === GenStateExecuting) {
+        throw new Error("Generator is already running");
+      }
+
+      if (state === GenStateCompleted) {
+        if (method === "throw") {
+          throw arg;
+        }
+
+        // Be forgiving, per 25.3.3.3.3 of the spec:
+        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+        return doneResult();
+      }
+
+      context.method = method;
+      context.arg = arg;
+
+      while (true) {
+        var delegate = context.delegate;
+        if (delegate) {
+          var delegateResult = maybeInvokeDelegate(delegate, context);
+          if (delegateResult) {
+            if (delegateResult === ContinueSentinel) continue;
+            return delegateResult;
+          }
+        }
+
+        if (context.method === "next") {
+          // Setting context._sent for legacy support of Babel's
+          // function.sent implementation.
+          context.sent = context._sent = context.arg;
+
+        } else if (context.method === "throw") {
+          if (state === GenStateSuspendedStart) {
+            state = GenStateCompleted;
+            throw context.arg;
+          }
+
+          context.dispatchException(context.arg);
+
+        } else if (context.method === "return") {
+          context.abrupt("return", context.arg);
+        }
+
+        state = GenStateExecuting;
+
+        var record = tryCatch(innerFn, self, context);
+        if (record.type === "normal") {
+          // If an exception is thrown from innerFn, we leave state ===
+          // GenStateExecuting and loop back for another invocation.
+          state = context.done
+            ? GenStateCompleted
+            : GenStateSuspendedYield;
+
+          if (record.arg === ContinueSentinel) {
+            continue;
+          }
+
+          return {
+            value: record.arg,
+            done: context.done
+          };
+
+        } else if (record.type === "throw") {
+          state = GenStateCompleted;
+          // Dispatch the exception by looping back around to the
+          // context.dispatchException(context.arg) call above.
+          context.method = "throw";
+          context.arg = record.arg;
+        }
+      }
+    };
+  }
+
+  // Call delegate.iterator[context.method](context.arg) and handle the
+  // result, either by returning a { value, done } result from the
+  // delegate iterator, or by modifying context.method and context.arg,
+  // setting context.delegate to null, and returning the ContinueSentinel.
+  function maybeInvokeDelegate(delegate, context) {
+    var methodName = context.method;
+    var method = delegate.iterator[methodName];
+    if (method === undefined) {
+      // A .throw or .return when the delegate iterator has no .throw
+      // method, or a missing .next mehtod, always terminate the
+      // yield* loop.
+      context.delegate = null;
+
+      // Note: ["return"] must be used for ES3 parsing compatibility.
+      if (methodName === "throw" && delegate.iterator["return"]) {
+        // If the delegate iterator has a return method, give it a
+        // chance to clean up.
+        context.method = "return";
+        context.arg = undefined;
+        maybeInvokeDelegate(delegate, context);
+
+        if (context.method === "throw") {
+          // If maybeInvokeDelegate(context) changed context.method from
+          // "return" to "throw", let that override the TypeError below.
+          return ContinueSentinel;
+        }
+      }
+      if (methodName !== "return") {
+        context.method = "throw";
+        context.arg = new TypeError(
+          "The iterator does not provide a '" + methodName + "' method");
+      }
+
+      return ContinueSentinel;
+    }
+
+    var record = tryCatch(method, delegate.iterator, context.arg);
+
+    if (record.type === "throw") {
+      context.method = "throw";
+      context.arg = record.arg;
+      context.delegate = null;
+      return ContinueSentinel;
+    }
+
+    var info = record.arg;
+
+    if (! info) {
+      context.method = "throw";
+      context.arg = new TypeError("iterator result is not an object");
+      context.delegate = null;
+      return ContinueSentinel;
+    }
+
+    if (info.done) {
+      // Assign the result of the finished delegate to the temporary
+      // variable specified by delegate.resultName (see delegateYield).
+      context[delegate.resultName] = info.value;
+
+      // Resume execution at the desired location (see delegateYield).
+      context.next = delegate.nextLoc;
+
+      // If context.method was "throw" but the delegate handled the
+      // exception, let the outer generator proceed normally. If
+      // context.method was "next", forget context.arg since it has been
+      // "consumed" by the delegate iterator. If context.method was
+      // "return", allow the original .return call to continue in the
+      // outer generator.
+      if (context.method !== "return") {
+        context.method = "next";
+        context.arg = undefined;
+      }
+
+    } else {
+      // Re-yield the result returned by the delegate method.
+      return info;
+    }
+
+    // The delegate iterator is finished, so forget it and continue with
+    // the outer generator.
+    context.delegate = null;
+    return ContinueSentinel;
+  }
+
+  // Define Generator.prototype.{next,throw,return} in terms of the
+  // unified ._invoke helper method.
+  defineIteratorMethods(Gp);
+
+  define(Gp, toStringTagSymbol, "Generator");
+
+  // A Generator should always return itself as the iterator object when the
+  // @@iterator function is called on it. Some browsers' implementations of the
+  // iterator prototype chain incorrectly implement this, causing the Generator
+  // object to not be returned from this call. This ensures that doesn't happen.
+  // See https://github.com/facebook/regenerator/issues/274 for more details.
+  define(Gp, iteratorSymbol, function() {
+    return this;
+  });
+
+  define(Gp, "toString", function() {
+    return "[object Generator]";
+  });
+
+  function pushTryEntry(locs) {
+    var entry = { tryLoc: locs[0] };
+
+    if (1 in locs) {
+      entry.catchLoc = locs[1];
+    }
+
+    if (2 in locs) {
+      entry.finallyLoc = locs[2];
+      entry.afterLoc = locs[3];
+    }
+
+    this.tryEntries.push(entry);
+  }
+
+  function resetTryEntry(entry) {
+    var record = entry.completion || {};
+    record.type = "normal";
+    delete record.arg;
+    entry.completion = record;
+  }
+
+  function Context(tryLocsList) {
+    // The root entry object (effectively a try statement without a catch
+    // or a finally block) gives us a place to store values thrown from
+    // locations where there is no enclosing try statement.
+    this.tryEntries = [{ tryLoc: "root" }];
+    tryLocsList.forEach(pushTryEntry, this);
+    this.reset(true);
+  }
+
+  exports.keys = function(val) {
+    var object = Object(val);
+    var keys = [];
+    for (var key in object) {
+      keys.push(key);
+    }
+    keys.reverse();
+
+    // Rather than returning an object with a next method, we keep
+    // things simple and return the next function itself.
+    return function next() {
+      while (keys.length) {
+        var key = keys.pop();
+        if (key in object) {
+          next.value = key;
+          next.done = false;
+          return next;
+        }
+      }
+
+      // To avoid creating an additional object, we just hang the .value
+      // and .done properties off the next function object itself. This
+      // also ensures that the minifier will not anonymize the function.
+      next.done = true;
+      return next;
+    };
+  };
+
+  function values(iterable) {
+    if (iterable) {
+      var iteratorMethod = iterable[iteratorSymbol];
+      if (iteratorMethod) {
+        return iteratorMethod.call(iterable);
+      }
+
+      if (typeof iterable.next === "function") {
+        return iterable;
+      }
+
+      if (!isNaN(iterable.length)) {
+        var i = -1, next = function next() {
+          while (++i < iterable.length) {
+            if (hasOwn.call(iterable, i)) {
+              next.value = iterable[i];
+              next.done = false;
+              return next;
+            }
+          }
+
+          next.value = undefined;
+          next.done = true;
+
+          return next;
+        };
+
+        return next.next = next;
+      }
+    }
+
+    // Return an iterator with no values.
+    return { next: doneResult };
+  }
+  exports.values = values;
+
+  function doneResult() {
+    return { value: undefined, done: true };
+  }
+
+  Context.prototype = {
+    constructor: Context,
+
+    reset: function(skipTempReset) {
+      this.prev = 0;
+      this.next = 0;
+      // Resetting context._sent for legacy support of Babel's
+      // function.sent implementation.
+      this.sent = this._sent = undefined;
+      this.done = false;
+      this.delegate = null;
+
+      this.method = "next";
+      this.arg = undefined;
+
+      this.tryEntries.forEach(resetTryEntry);
+
+      if (!skipTempReset) {
+        for (var name in this) {
+          // Not sure about the optimal order of these conditions:
+          if (name.charAt(0) === "t" &&
+              hasOwn.call(this, name) &&
+              !isNaN(+name.slice(1))) {
+            this[name] = undefined;
+          }
+        }
+      }
+    },
+
+    stop: function() {
+      this.done = true;
+
+      var rootEntry = this.tryEntries[0];
+      var rootRecord = rootEntry.completion;
+      if (rootRecord.type === "throw") {
+        throw rootRecord.arg;
+      }
+
+      return this.rval;
+    },
+
+    dispatchException: function(exception) {
+      if (this.done) {
+        throw exception;
+      }
+
+      var context = this;
+      function handle(loc, caught) {
+        record.type = "throw";
+        record.arg = exception;
+        context.next = loc;
+
+        if (caught) {
+          // If the dispatched exception was caught by a catch block,
+          // then let that catch block handle the exception normally.
+          context.method = "next";
+          context.arg = undefined;
+        }
+
+        return !! caught;
+      }
+
+      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+        var entry = this.tryEntries[i];
+        var record = entry.completion;
+
+        if (entry.tryLoc === "root") {
+          // Exception thrown outside of any try block that could handle
+          // it, so set the completion value of the entire function to
+          // throw the exception.
+          return handle("end");
+        }
+
+        if (entry.tryLoc <= this.prev) {
+          var hasCatch = hasOwn.call(entry, "catchLoc");
+          var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+          if (hasCatch && hasFinally) {
+            if (this.prev < entry.catchLoc) {
+              return handle(entry.catchLoc, true);
+            } else if (this.prev < entry.finallyLoc) {
+              return handle(entry.finallyLoc);
+            }
+
+          } else if (hasCatch) {
+            if (this.prev < entry.catchLoc) {
+              return handle(entry.catchLoc, true);
+            }
+
+          } else if (hasFinally) {
+            if (this.prev < entry.finallyLoc) {
+              return handle(entry.finallyLoc);
+            }
+
+          } else {
+            throw new Error("try statement without catch or finally");
+          }
+        }
+      }
+    },
+
+    abrupt: function(type, arg) {
+      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+        var entry = this.tryEntries[i];
+        if (entry.tryLoc <= this.prev &&
+            hasOwn.call(entry, "finallyLoc") &&
+            this.prev < entry.finallyLoc) {
+          var finallyEntry = entry;
+          break;
+        }
+      }
+
+      if (finallyEntry &&
+          (type === "break" ||
+           type === "continue") &&
+          finallyEntry.tryLoc <= arg &&
+          arg <= finallyEntry.finallyLoc) {
+        // Ignore the finally entry if control is not jumping to a
+        // location outside the try/catch block.
+        finallyEntry = null;
+      }
+
+      var record = finallyEntry ? finallyEntry.completion : {};
+      record.type = type;
+      record.arg = arg;
+
+      if (finallyEntry) {
+        this.method = "next";
+        this.next = finallyEntry.finallyLoc;
+        return ContinueSentinel;
+      }
+
+      return this.complete(record);
+    },
+
+    complete: function(record, afterLoc) {
+      if (record.type === "throw") {
+        throw record.arg;
+      }
+
+      if (record.type === "break" ||
+          record.type === "continue") {
+        this.next = record.arg;
+      } else if (record.type === "return") {
+        this.rval = this.arg = record.arg;
+        this.method = "return";
+        this.next = "end";
+      } else if (record.type === "normal" && afterLoc) {
+        this.next = afterLoc;
+      }
+
+      return ContinueSentinel;
+    },
+
+    finish: function(finallyLoc) {
+      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+        var entry = this.tryEntries[i];
+        if (entry.finallyLoc === finallyLoc) {
+          this.complete(entry.completion, entry.afterLoc);
+          resetTryEntry(entry);
+          return ContinueSentinel;
+        }
+      }
+    },
+
+    "catch": function(tryLoc) {
+      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+        var entry = this.tryEntries[i];
+        if (entry.tryLoc === tryLoc) {
+          var record = entry.completion;
+          if (record.type === "throw") {
+            var thrown = record.arg;
+            resetTryEntry(entry);
+          }
+          return thrown;
+        }
+      }
+
+      // The context.catch method must only be called with a location
+      // argument that corresponds to a known catch block.
+      throw new Error("illegal catch attempt");
+    },
+
+    delegateYield: function(iterable, resultName, nextLoc) {
+      this.delegate = {
+        iterator: values(iterable),
+        resultName: resultName,
+        nextLoc: nextLoc
+      };
+
+      if (this.method === "next") {
+        // Deliberately forget the last sent value so that we don't
+        // accidentally pass it on to the delegate.
+        this.arg = undefined;
+      }
+
+      return ContinueSentinel;
+    }
+  };
+
+  // Regardless of whether this script is executing as a CommonJS module
+  // or not, return the runtime object so that we can declare the variable
+  // regeneratorRuntime in the outer scope, which allows this module to be
+  // injected easily by `bin/regenerator --include-runtime script.js`.
+  return exports;
+
+}(
+  // If this script is executing as a CommonJS module, use module.exports
+  // as the regeneratorRuntime namespace. Otherwise create a new empty
+  // object. Either way, the resulting object will be used to initialize
+  // the regeneratorRuntime variable at the top of this file.
+  typeof module === "object" ? module.exports : {}
+));
+
+try {
+  regeneratorRuntime = runtime;
+} catch (accidentalStrictMode) {
+  // This module should not be running in strict mode, so the above
+  // assignment should always work unless something is misconfigured. Just
+  // in case runtime.js accidentally runs in strict mode, in modern engines
+  // we can explicitly access globalThis. In older engines we can escape
+  // strict mode using a global Function call. This could conceivably fail
+  // if a Content Security Policy forbids using Function, but in that case
+  // the proper solution is to fix the accidental strict mode problem. If
+  // you've misconfigured your bundler to force strict mode and applied a
+  // CSP to forbid Function, and you're not willing to fix either of those
+  // problems, please detail your unique predicament in a GitHub issue.
+  if (typeof globalThis === "object") {
+    globalThis.regeneratorRuntime = runtime;
+  } else {
+    Function("r", "regeneratorRuntime = r")(runtime);
+  }
+}
Index: imaps-frontend/node_modules/canvg/package.json
===================================================================
--- imaps-frontend/node_modules/canvg/package.json	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/canvg/package.json	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,86 @@
+{
+  "_from": "canvg@3.0.10",
+  "_id": "canvg@3.0.10",
+  "_inBundle": false,
+  "_integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
+  "_location": "/canvg",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "version",
+    "registry": true,
+    "raw": "canvg@3.0.10",
+    "name": "canvg",
+    "escapedName": "canvg",
+    "rawSpec": "3.0.10",
+    "saveSpec": null,
+    "fetchSpec": "3.0.10"
+  },
+  "_requiredBy": [
+    "/jspdf"
+  ],
+  "_resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
+  "_shasum": "8e52a2d088b6ffa23ac78970b2a9eebfae0ef4b3",
+  "_spec": "canvg@3.0.10",
+  "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/jspdf",
+  "authors": [
+    {
+      "name": "Gabe Lerner",
+      "email": "gabelerner@gmail.com"
+    },
+    {
+      "name": "Brett Zamir"
+    },
+    {
+      "name": "Dan Green",
+      "url": "https://twitter.com/dangreen58"
+    }
+  ],
+  "bugs": {
+    "url": "https://github.com/canvg/canvg/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "@babel/runtime": "^7.12.5",
+    "@types/raf": "^3.4.0",
+    "core-js": "^3.8.3",
+    "raf": "^3.4.1",
+    "regenerator-runtime": "^0.13.7",
+    "rgbcolor": "^1.0.1",
+    "stackblur-canvas": "^2.0.0",
+    "svg-pathdata": "^6.0.3"
+  },
+  "deprecated": false,
+  "description": "JavaScript SVG parser and renderer on Canvas.",
+  "engines": {
+    "node": ">=10.0.0"
+  },
+  "exports": {
+    "require": "./lib/index.cjs",
+    "import": "./lib/index.es.js"
+  },
+  "files": [
+    "lib"
+  ],
+  "homepage": "https://github.com/canvg/canvg#readme",
+  "keywords": [
+    "javascript",
+    "client",
+    "browser",
+    "svg",
+    "canvas"
+  ],
+  "license": "MIT",
+  "main": "lib/index.cjs",
+  "module": "lib/index.es.js",
+  "name": "canvg",
+  "raw": "lib/index.babel.js",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/canvg/canvg.git"
+  },
+  "sideEffects": false,
+  "type": "module",
+  "types": "lib/index.d.ts",
+  "umd": "lib/umd.js",
+  "version": "3.0.10"
+}
