@antv/g-svg
Version:
A renderer implemented by SVG
35 lines • 52.6 kB
JavaScript
/*!
* @antv/g-svg
* @description A renderer implemented by SVG
* @version 2.0.42
* @date 7/30/2025, 1:37:37 PM
* @author AntVis
* @docs https://g.antv.antgroup.com/
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.SVG={}),t.window.G)}(this,function(t,e){"use strict";function n(t){return n="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},n(t)}function r(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function i(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function s(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t,e,n){return e=c(e),s(t,u()?Reflect.construct(e,n||[],c(t).constructor):e.apply(t,n))}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function d(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}
/*!
* @antv/g-plugin-dom-interaction
* @description A G plugin
* @version 2.1.27
* @date 7/30/2025, 1:35:38 PM
* @author AntVis
* @docs https://g.antv.antgroup.com/
*/var p=function(){function t(){a(this,t)}return o(t,[{key:"apply",value:function(e,n){var r=this,i=e.renderingService,o=e.renderingContext,a=e.config;this.context=e;var c=o.root.ownerDocument.defaultView,u=function(t){i.hooks.pointerMove.call(t)},s=function(t){i.hooks.pointerUp.call(t)},l=function(t){i.hooks.pointerDown.call(t)},f=function(t){i.hooks.pointerOver.call(t)},d=function(t){i.hooks.pointerOut.call(t)},p=function(t){i.hooks.pointerCancel.call(t)},h=function(t){i.hooks.pointerWheel.call(t)},v=function(t){i.hooks.click.call(t)};i.hooks.init.tap(t.tag,function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="none",t.style.msTouchAction="none"):c.supportsPointerEvents&&(t.style.touchAction="none"),c.supportsPointerEvents?function(t){n.globalThis.document.addEventListener("pointermove",u,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("pointerleave",d,!0),t.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",s,!0),n.globalThis.addEventListener("pointercancel",p,!0)}(t):function(t){n.globalThis.document.addEventListener("mousemove",u,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("mouseout",d,!0),t.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",s,!0)}(t),c.supportsTouchEvents&&function(t){t.addEventListener("touchstart",l,!0),t.addEventListener("touchend",s,!0),t.addEventListener("touchmove",u,!0),t.addEventListener("touchcancel",p,!0)}(t),a.useNativeClickEvent&&t.addEventListener("click",v,!0),t.addEventListener("wheel",h,{passive:!0,capture:!0})}),i.hooks.destroy.tap(t.tag,function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):c.supportsPointerEvents&&(t.style.touchAction=""),c.supportsPointerEvents?function(t){n.globalThis.document.removeEventListener("pointermove",u,!0),t.removeEventListener("pointerdown",l,!0),t.removeEventListener("pointerleave",d,!0),t.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",s,!0),n.globalThis.removeEventListener("pointercancel",p,!0)}(t):function(t){n.globalThis.document.removeEventListener("mousemove",u,!0),t.removeEventListener("mousedown",l,!0),t.removeEventListener("mouseout",d,!0),t.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",s,!0)}(t),c.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",l,!0),t.removeEventListener("touchend",s,!0),t.removeEventListener("touchmove",u,!0),t.removeEventListener("touchcancel",p,!0)}(t),a.useNativeClickEvent&&t.removeEventListener("click",v,!0),t.removeEventListener("wheel",h,!0)})}}])}();p.tag="DOMInteraction";var h=function(t){function e(){var t;a(this,e);for(var n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=l(this,e,[].concat(r))).name="dom-interaction",t}return d(e,t),o(e,[{key:"init",value:function(){this.addRenderingPlugin(new p)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(e.AbstractRendererPlugin),v=Object.freeze({__proto__:null,Plugin:h});function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);e>n;n++)r[n]=t[n];return r}function y(t,e){if(t){if("string"==typeof t)return m(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function g(t,e){this.v=t,this.k=e}function b(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}b=function(t,e,n,r){function o(e,n){b(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},b(t,e,n,r)}function E(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=Object.create((r&&r.prototype instanceof c?r:c).prototype);return b(u,"_invoke",function(n,r,i){var o,c,u,s=0,l=i||[],f=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,c=0,u=t,d.n=n,a}};function p(n,r){for(c=n,u=r,e=0;!f&&s&&!i&&l.length>e;e++){var i,o=l[e],p=d.p,h=o[2];n>3?(i=h===r)&&(u=o[(c=o[4])?5:(c=3,3)],o[4]=o[5]=t):p>=o[0]&&((i=2>n&&o[1]>p)?(c=0,d.v=r,d.n=o[1]):h>p&&(i=3>n||o[0]>r||r>h)&&(o[4]=n,o[5]=r,d.n=h,c=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),c=l,u=h;(e=2>c?t:u)||!f;){o||(c?3>c?(c>1&&(d.n=-1),p(c,u)):d.n=u:d.v=u);try{if(s=2,o){if(c||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,2>c&&(c=0)}else 1===c&&(e=o.return)&&e.call(o),2>c&&(u=TypeError("The iterator does not provide a '"+i+"' method"),c=1);o=t}else if((e=(f=0>d.n)?u:n.call(r,d))!==a)break}catch(e){o=t,c=1,u=e}finally{s=1}}return{value:e,done:f}}}(n,i,o),!0),u}var a={};function c(){}function u(){}function s(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(b(e={},r,function(){return this}),e),f=s.prototype=c.prototype=Object.create(l);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,b(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=s,b(f,"constructor",s),b(s,"constructor",u),u.displayName="GeneratorFunction",b(s,i,"GeneratorFunction"),b(f),b(f,i,"Generator"),b(f,r,function(){return this}),b(f,"toString",function(){return"[object Generator]"}),(E=function(){return{w:o,m:d}})()}function A(t,e){function n(r,i,o,a){try{var c=t[r](i),u=c.value;return u instanceof g?e.resolve(u.v).then(function(t){n("next",t,o,a)},function(t){n("throw",t,o,a)}):e.resolve(u).then(function(t){c.value=t,o(c)},function(t){return n("throw",t,o,a)})}catch(t){a(t)}}var r;this.next||(b(A.prototype),b(A.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),b(this,"_invoke",function(t,i,o){function a(){return new e(function(e,r){n(t,o,e,r)})}return r=r?r.then(a,a):a()},!0)}function S(t,e,n,r,i){return new A(E().w(t,e,n,r),i||Promise)}function x(t,e,n,r,i){var o=S(t,e,n,r,i);return o.next().then(function(t){return t.done?t.value:o.next()})}function O(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function t(){for(;n.length;)if((r=n.pop())in e)return t.value=r,t.done=!1,t;return t.done=!0,t}}function k(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}throw new TypeError(n(t)+" is not iterable")}function w(){var t=E(),e=t.m(w),n=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function r(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===n||"GeneratorFunction"===(e.displayName||e.name))}var i={throw:1,return:2,break:3,continue:3};function o(t){var e,n;return function(r){e||(e={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(t,e){return n(r.a,i[t],e)},delegateYield:function(t,i,o){return e.resultName=i,n(r.d,k(t),o)},finish:function(t){return n(r.f,t)}},n=function(t,n,i){r.p=e.prev,r.n=e.next;try{return t(n,i)}finally{e.next=r.n}}),e.resultName&&(e[e.resultName]=r.v,e.resultName=void 0),e.sent=r.v,e.next=r.n;try{return t.call(this,e)}finally{r.p=e.prev,r.n=e.next}}}return(w=function(){return{wrap:function(e,n,r,i){return t.w(o(e),n,r,i&&i.reverse())},isGeneratorFunction:r,mark:t.m,awrap:function(t,e){return new g(t,e)},AsyncIterator:A,async:function(t,e,n,i,a){return(r(e)?S:x)(o(t),e,n,i,a)},keys:O,values:k}})()}function C(t,e,n,r,i,o,a){try{var c=t[o](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,i)}function T(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){C(o,r,i,a,c,"next",t)}function c(t){C(o,r,i,a,c,"throw",t)}a(void 0)})}}
/*!
* @antv/g-plugin-svg-picker
* @description A G plugin for picking in SVG
* @version 2.0.42
* @date 7/30/2025, 1:37:06 PM
* @author AntVis
* @docs https://g.antv.antgroup.com/
*/var P=function(){function t(){a(this,t)}return o(t,[{key:"apply",value:function(e,n){var r=this,i=e.config.document,o=e.renderingService,a=e.svgElementMap;o.hooks.pick.tapPromise(t.tag,function(){var t=T(w().mark(function t(e){return w().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(a,i,e));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),o.hooks.pickSync.tap(t.tag,function(t){return r.pick(a,i,t)})}},{key:"pick",value:function(t,e,n){var r=n.topmost,i=n.position,o=i.clientX,a=i.clientY;try{var c,u=[],s=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=y(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return t.length>r?{done:!1,value:t[r++]}:{done:!0}},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,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}((e||document).elementsFromPoint(o,a));try{for(s.s();!(c=s.n()).done;){var l=c.value;if(l.shadowRoot&&l.shadowRoot!==e)return this.pick(t,l.shadowRoot,n);var f=t.get(l);if(f&&f.isInteractive()&&(u.push(f),r))return n.picked=u,n}}catch(t){s.e(t)}finally{s.f()}n.picked=u}catch(t){n.picked=[]}return n}}])}();P.tag="SVGPicker";var G=function(t){function e(){var t;a(this,e);for(var n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];return(t=l(this,e,[].concat(r))).name="svg-picker",t}return d(e,t),o(e,[{key:"init",value:function(){this.addRenderingPlugin(new P)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(e.AbstractRendererPlugin),L=Object.freeze({__proto__:null,Plugin:G});function M(t){return null==t}function D(t){return"string"==typeof t}var N=function(t,e,n){return e>t?e:t>n?n:t},j="undefined"!=typeof Float32Array?Float32Array:Array;function R(){var t=new j(16);return j!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function V(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],c=e[5],u=e[6],s=e[7],l=e[8],f=e[9],d=e[10],p=e[11],h=e[12],v=e[13],m=e[14],y=e[15],g=n*c-r*a,b=n*u-i*a,E=n*s-o*a,A=r*u-i*c,S=r*s-o*c,x=i*s-o*u,O=l*v-f*h,k=l*m-d*h,w=l*y-p*h,C=f*m-d*v,T=f*y-p*v,P=d*y-p*m,G=g*P-b*T+E*C+A*w-S*k+x*O;return G?(t[0]=(c*P-u*T+s*C)*(G=1/G),t[1]=(i*T-r*P-o*C)*G,t[2]=(v*x-m*S+y*A)*G,t[3]=(d*S-f*x-p*A)*G,t[4]=(u*w-a*P-s*k)*G,t[5]=(n*P-i*w+o*k)*G,t[6]=(m*E-h*x-y*b)*G,t[7]=(l*x-d*E+p*b)*G,t[8]=(a*T-c*w+s*O)*G,t[9]=(r*w-n*T-o*O)*G,t[10]=(h*S-v*E+y*g)*G,t[11]=(f*E-l*S-p*g)*G,t[12]=(c*k-a*C-u*O)*G,t[13]=(n*C-r*k+i*O)*G,t[14]=(v*b-h*A-m*g)*G,t[15]=(l*A-f*b+d*g)*G,t):null}function $(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,c=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(c.push(r.value),c.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(t,e)||y(t,e)||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.")}()}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach(function(e){$(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}
/*!
* @antv/g-plugin-svg-renderer
* @description A G plugin of renderer implementation with SVG
* @version 2.2.24
* @date 7/30/2025, 1:36:09 PM
* @author AntVis
* @docs https://g.antv.antgroup.com/
*/Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var H=o(function t(){a(this,t)});function F(t,e){var n=e.src,r=void 0===n?"":n,i=e.x,o=e.y,a=void 0===o?0:o,c=e.width,u=e.height;if(t.setAttribute("x","".concat(void 0===i?0:i)),t.setAttribute("y","".concat(a)),D(r))t.setAttribute("href",r);else if(r instanceof Image)c||t.setAttribute("width","".concat(r.width)),u||t.setAttribute("height","".concat(r.height)),t.setAttribute("href",r.src);else if(r instanceof HTMLElement&&D(r.nodeName)&&"CANVAS"===r.nodeName.toUpperCase())t.setAttribute("href",r.toDataURL());else if(r instanceof ImageData){var s=document.createElement("canvas");s.setAttribute("width","".concat(r.width)),s.setAttribute("height","".concat(r.height));var l=s.getContext("2d");l&&(l.putImageData(r,0,0),c||t.setAttribute("width","".concat(r.width)),u||t.setAttribute("height","".concat(r.height)),t.setAttribute("href",s.toDataURL()))}}function B(t,n){var r=n.x1,i=n.y1,o=n.x2,a=n.y2,c=n.markerStart,u=n.markerEnd,s=n.markerStartOffset,l=n.markerEndOffset,f=0,d=0,p=0,h=0,v=0;c&&e.isDisplayObject(c)&&s&&(f=Math.cos(v=Math.atan2(a-i,o-r))*(s||0),d=Math.sin(v)*(s||0)),u&&e.isDisplayObject(u)&&l&&(p=Math.cos(v=Math.atan2(i-a,r-o))*(l||0),h=Math.sin(v)*(l||0)),t.setAttribute("x1","".concat(r+f)),t.setAttribute("y1","".concat(i+d)),t.setAttribute("x2","".concat(o+p)),t.setAttribute("y2","".concat(a+h))}function W(t,n){var r=n.d,i=n.markerStart,o=n.markerEnd,a=n.markerStartOffset,c=n.markerEndOffset,u=0,s=0,l=0,f=0,d=0;if(i&&e.isDisplayObject(i)&&a){var p=U(i.parentNode.getStartTangent(),2),h=p[0],v=p[1];u=Math.cos(d=Math.atan2(h[1]-v[1],h[0]-v[0]))*(a||0),s=Math.sin(d)*(a||0)}if(o&&e.isDisplayObject(o)&&c){var m=U(o.parentNode.getEndTangent(),2),y=m[0],g=m[1];l=Math.cos(d=Math.atan2(y[1]-g[1],y[0]-g[0]))*(c||0),f=Math.sin(d)*(c||0)}t.setAttribute("d",e.translatePathToString(r.absolutePath,u,s,l,f))}function z(t,n){var r=n.points.points,i=n.markerStart,o=n.markerStartOffset,a=n.markerEnd,c=n.markerEndOffset,u=r.length;if(r&&u>=2){var s=0,l=0,f=0,d=0,p=0;i&&e.isDisplayObject(i)&&o&&(s=Math.cos(p=Math.atan2(r[1][1]-r[0][1],r[1][0]-r[0][0]))*(o||0),l=Math.sin(p)*(o||0)),a&&e.isDisplayObject(a)&&c&&(f=Math.cos(p=Math.atan2(r[u-2][1]-r[u-1][1],r[u-2][0]-r[u-1][0]))*(c||0),d=Math.sin(p)*(c||0)),t.setAttribute("points",r.map(function(t,e){var n=0,r=0;return 0===e?(n=s,r=l):e===u-1&&(n=f,r=d),"".concat(t[0]+n,",").concat(t[1]+r)}).join(" "))}}function X(t,e){var n=e.radius,r=e.x,i=void 0===r?0:r,o=e.y,a=void 0===o?0:o,c=e.width,u=e.height;if(isFinite(c)&&isFinite(u)){var s="";if(n&&n.some(function(t){return 0!==t})){var l=U(n.map(function(t){return N(t,0,Math.min(Math.abs(c)/2,Math.abs(u)/2))}),4),f=l[0],d=l[1],p=l[2],h=l[3],v=c>0?1:-1,m=u>0?1:-1,y=v+m!==0?1:0;s=[["M ".concat(v*f+i,",").concat(a)],["l ".concat(c-v*(f+d),",0")],["a ".concat(d,",").concat(d,",0,0,").concat(y,",").concat(v*d,",").concat(m*d)],["l 0,".concat(u-m*(d+p))],["a ".concat(p,",").concat(p,",0,0,").concat(y,",").concat(-v*p,",").concat(m*p)],["l ".concat(v*(p+h)-c,",0")],["a ".concat(h,",").concat(h,",0,0,").concat(y,",").concat(-v*h,",").concat(-m*h)],["l 0,".concat(m*(h+f)-u)],["a ".concat(f,",").concat(f,",0,0,").concat(y,",").concat(v*f,",").concat(-m*f)],["z"]].join(" ")}else s="M ".concat(i,",").concat(a," l ").concat(c,",0 l 0,").concat(u," l").concat(-c," 0 z");t.setAttribute("d",s)}}function Y(t,e){return(e||document).createElementNS("http://www.w3.org/2000/svg",t)}H.tag="c-svg-element";var q="g-filter-";function Q(t,e,n,r,i){var o=q+n.entity,a=e.querySelectorAll("[name=".concat(o,"]"));if(a.length&&a.forEach(function(t){e.removeChild(t)}),0===i.length)null==r||r.removeAttribute("filter");else{var c=i.map(function(n,r){var i=n.name,a=n.params,c=Y("filter",t);return c.setAttribute("filterUnits","userSpaceOnUse"),"blur"===i?function(t,e,n){var r=Y("feGaussianBlur",t);r.setAttribute("in","SourceGraphic"),r.setAttribute("stdDeviation","".concat(n[0].value)),e.appendChild(r)}(t,c,a):"brightness"===i?function(t,e,n){var r=Z(n[0]);J(t,e,{type:"linear",slope:r,intercept:0})}(t,c,a):"drop-shadow"===i?function(t,e,n){var r=n[0].value,i=n[1].value,o=n[2].value,a=n[3].formatted,c=Y("feGaussianBlur",t);c.setAttribute("in","SourceAlpha"),c.setAttribute("stdDeviation","".concat(o)),e.appendChild(c);var u=Y("feOffset",t);u.setAttribute("dx","".concat(r)),u.setAttribute("dy","".concat(i)),u.setAttribute("result","offsetblur"),e.appendChild(u);var s=Y("feFlood",t);s.setAttribute("flood-color",a),e.appendChild(s);var l=Y("feComposite",t);l.setAttribute("in2","offsetblur"),l.setAttribute("operator","in"),e.appendChild(l);var f=Y("feMerge",t);e.appendChild(f);var d=Y("feMergeNode",t),p=Y("feMergeNode",t);p.setAttribute("in","SourceGraphic"),f.appendChild(d),f.appendChild(p)}(t,c,a):"contrast"===i?function(t,e,n){var r=Z(n[0]);J(t,e,{type:"linear",slope:r,intercept:-.5*r+.5})}(t,c,a):"grayscale"===i?function(t,e,n){var r=Z(n[0]);K(t,e,[.2126+.7874*(1-r),.7152-.7152*(1-r),.0722-.0722*(1-r),0,0,.2126-.2126*(1-r),.7152+.2848*(1-r),.0722-.0722*(1-r),0,0,.2126-.2126*(1-r),.7152-.7152*(1-r),.0722+.9278*(1-r),0,0,0,0,0,1,0])}(t,c,a):"sepia"===i?function(t,e,n){var r=Z(n[0]);K(t,e,[.393+.607*(1-r),.769-.769*(1-r),.189-.189*(1-r),0,0,.349-.349*(1-r),.686+.314*(1-r),.168-.168*(1-r),0,0,.272-.272*(1-r),.534-.534*(1-r),.131+.869*(1-r),0,0,0,0,0,1,0])}(t,c,a):"saturate"===i?function(t,e,n){var r=Z(n[0]),i=Y("feColorMatrix",t);i.setAttribute("type","saturate"),i.setAttribute("values","".concat(r)),e.appendChild(i)}(t,c,a):"hue-rotate"===i?function(t,e,n){var r=Y("feColorMatrix",t);r.setAttribute("type","hueRotate"),r.setAttribute("values","".concat(n[0].value)),e.appendChild(r)}(t,c,a):"invert"===i&&function(t,e,n){var r=Z(n[0]);J(t,e,{type:"table",tableValues:"".concat(r," ").concat(1-r)})}(t,c,a),c.id="".concat(o,"-").concat(r),c.setAttribute("name",o),e.appendChild(c),c.id});setTimeout(function(){null==r||r.setAttribute("filter",c.map(function(t){return"url(#".concat(t,")")}).join(" "))})}}function Z(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function J(t,e,n){var r=n.type,i=n.slope,o=n.intercept,a=n.tableValues,c=Y("feComponentTransfer",t);[Y("feFuncR",t),Y("feFuncG",t),Y("feFuncB",t)].forEach(function(t){t.setAttribute("type",r),"table"===r?t.setAttribute("tableValues","".concat(a)):(t.setAttribute("slope","".concat(i)),t.setAttribute("intercept","".concat(o))),c.appendChild(t)}),e.appendChild(c)}function K(t,e,n){var r=Y("feColorMatrix",t);r.setAttribute("type","matrix"),r.setAttribute("values",n.join(" ")),e.appendChild(r)}var tt={},et=0;function nt(t,n,r,i,o,a,c,u){if(!o)return"";if(!e.isCSSRGB(o)){if(e.isPattern(o)){var s=function(t,n,r,i,o,a){var c=rt(i),u=n.querySelector("#".concat(c));if(!u){var s=i.image,l="";if(D(s)?l=s:e.isBrowser&&(s instanceof HTMLImageElement?l=s.src:s instanceof HTMLCanvasElement&&(l=s.toDataURL())),l){var f=Y("image",t);f.setAttribute("href",l);var d=o();l.match(/^data:/i)||(d.crossOrigin="Anonymous",f.setAttribute("crossorigin","anonymous")),d.src=l;var p=function(){var e=it(t,n,r,i,c,d.width,d.height);n.appendChild(e),e.appendChild(f),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("width","".concat(d.width)),f.setAttribute("height","".concat(d.height))};d.complete?p():d.onload=p}if("rect"===s.nodeName){var h=s.parsedStyle,v=it(t,n,s,i,c,h.width,h.height);s.forEach(function(e){a.createSVGDom(t,e,null);var n=e.elementSVG,r=e.getLocalTransform();a.applyTransform(n.$groupEl,r)}),v.appendChild(s.elementSVG.$groupEl)}}return c}(t,n,r,o,c,u);return i.style[a]="url(#".concat(s,")"),s}if(1===o.length){var l=ot(t,r,n,i,o[0]);return null==i||i.setAttribute(a,"url(#".concat(l,")")),l}var f=function(t,e,n,r,i){var o="".concat(q+e.entity,"-gradient"),a=n.querySelector("#".concat(o));a||((a=Y("filter",t)).setAttribute("filterUnits","userSpaceOnUse"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.id=o,n.appendChild(a));var c=0;i.forEach(function(i,u){var s=ot(t,e,n,r,i),l="".concat(s,"_rect"),f=Y("rect",t);f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("width","100%"),f.setAttribute("height","100%"),f.setAttribute("fill","url(#".concat(s,")")),f.id=l,n.appendChild(f);var d=Y("feImage",t);if(d.setAttribute("href","#".concat(l)),d.setAttribute("result","".concat(o,"-").concat(u)),a.appendChild(d),u>0){var p=Y("feBlend",t);p.setAttribute("in",1===u?"".concat(o,"-").concat(u-1):"".concat(o,"-blended-").concat(c-1)),p.setAttribute("in2","".concat(o,"-").concat(u)),p.setAttribute("result","".concat(o,"-blended-").concat(c++)),p.setAttribute("mode","multiply"),a.appendChild(p)}});var u=Y("feComposite",t);return u.setAttribute("in","".concat(o,"-blended-").concat(c)),u.setAttribute("in2","SourceGraphic"),u.setAttribute("operator","in"),a.appendChild(u),o}(t,r,n,i,o);return null==i||i.setAttribute("filter","url(#".concat(f,")")),null==i||i.setAttribute("fill","black"),f}return"currentColor"===r.style[a]?null==i||i.setAttribute(a,"currentColor"):null==i||i.setAttribute(a,o.isNone?"none":""+o),""}function rt(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="";if(e.isCSSGradientValue(t)){var i=t.type;if(i===e.GradientType.LinearGradient||i===e.GradientType.RadialGradient){var o=_(_({},t.value),n),a=o.x,c=o.y,u=o.width,s=o.height,l=o.steps,f=o.angle,d=o.cx,p=o.cy,h=o.size;r="gradient-".concat(o.type,"-").concat((null==a?void 0:""+a)||0,"-").concat((null==c?void 0:""+c)||0,"-").concat((null==f?void 0:""+f)||0,"-").concat((null==d?void 0:""+d)||0,"-").concat((null==p?void 0:""+p)||0,"-").concat((null==h?void 0:""+h)||0,"-").concat(u,"-").concat(s,"-").concat(l.map(function(t){var e=t.color;return"".concat(t.offset).concat(e)}).join("-"))}}else e.isPattern(t)&&(r=D(t.image)?"pattern-".concat(t.image,"-").concat(t.repetition):"rect"===t.image.nodeName?"pattern-rect-".concat(t.image.entity):"pattern-".concat(et));return r&&(tt[r]||(tt[r]="".concat("g-pattern-").concat(et++))),tt[r]}function it(t,n,r,i,o,a,c){var u=i.repetition,s=i.transform,l=Y("pattern",t);s&&l.setAttribute("patternTransform",function(t){return e.parseTransform(t).map(function(t){var e=t.t,n=t.d;if("translate"===e)return"translate(".concat(n[0].value," ").concat(n[1].value,")");if("translateX"===e)return"translate(".concat(n[0].value," 0)");if("translateY"===e)return"translate(0 ".concat(n[0].value,")");if("rotate"===e)return"rotate(".concat(n[0].value,")");if("scale"===e){var r=(null==n?void 0:n.map(function(t){return t.value}))||[1,1];return"scale(".concat(r[0],", ").concat(r[1],")")}if("scaleX"===e){var i=(null==n?void 0:n.map(function(t){return t.value}))||[1];return"scale(".concat(i[0],", 1)")}if("scaleY"===e){var o=(null==n?void 0:n.map(function(t){return t.value}))||[1];return"scale(1, ".concat(o[0],")")}if("skew"===e){var a=(null==n?void 0:n.map(function(t){return t.value}))||[0,0];return"skewX(".concat(a[0],") skewY(").concat(a[1],")")}if("skewZ"===e){var c=(null==n?void 0:n.map(function(t){return t.value}))||[0];return"skewX(".concat(c[0],")")}if("skewY"===e){var u=(null==n?void 0:n.map(function(t){return t.value}))||[0];return"skewY(".concat(u[0],")")}if("matrix"===e){var s=U(n.map(function(t){return t.value}),6),l=s[1],f=s[2],d=s[3],p=s[4],h=s[5];return"matrix(".concat(s[0]," ").concat(l," ").concat(f," ").concat(d," ").concat(p," ").concat(h,")")}return null}).filter(function(t){return null!==t}).join(" ")}(s)),l.setAttribute("patternUnits","userSpaceOnUse"),l.id=o,n.appendChild(l);var f=r.getGeometryBounds(),d=f.halfExtents,p=f.min;l.setAttribute("x","".concat(p[0])),l.setAttribute("y","".concat(p[1]));var h=a,v=c;return"repeat-x"===u?v=2*d[1]:"repeat-y"===u?h=2*d[0]:"no-repeat"===u&&(h=2*d[0],v=2*d[1]),l.setAttribute("width","".concat(h)),l.setAttribute("height","".concat(v)),l}function ot(t,n,r,i,o){var a=n.getGeometryBounds(),c=a&&2*a.halfExtents[0]||0,u=a&&2*a.halfExtents[1]||0,s=a&&a.min||[0,0],l=rt(o,{x:s[0],y:s[1],width:c,height:u}),f=r.querySelector("#".concat(l));if(!f){(f=Y(o.type===e.GradientType.LinearGradient?"linearGradient":"radialGradient",t)).setAttribute("gradientUnits","userSpaceOnUse");var d="";o.value.steps.sort(function(t,e){return t.offset.value-e.offset.value}).forEach(function(t){var e=t.color;d+='<stop offset="'.concat(t.offset.value/100,'" stop-color="').concat(e,'"></stop>')}),f.innerHTML=d,f.id=l,r.appendChild(f)}if(o.type===e.GradientType.LinearGradient){var p=e.computeLinearGradient([s[0],s[1]],c,u,o.value.angle),h=p.y1,v=p.x2,m=p.y2;f.setAttribute("x1","".concat(p.x1)),f.setAttribute("y1","".concat(h)),f.setAttribute("x2","".concat(v)),f.setAttribute("y2","".concat(m))}else{var y=o.value,g=e.computeRadialGradient([s[0],s[1]],c,u,y.cx,y.cy,y.size),b=g.y,E=g.r;f.setAttribute("cx","".concat(g.x)),f.setAttribute("cy","".concat(b)),f.setAttribute("r","".concat(E))}return l}var at=/url\("?#(.*)\)/,ct=function(){return o(function t(e){a(this,t),this.gradientCache={},this.context=e},[{key:"getDefElement",value:function(){return this.$def}},{key:"init",value:function(){var t=this.context.config.document,e=this.context.contextService.getContext();this.$def=Y("defs",t),e.appendChild(this.$def)}},{key:"clear",value:function(t){var e=this;Object.keys(this.gradientCache).forEach(function(n){e.clearUnusedDefElement(e.gradientCache,n,t)})}},{key:"clearUnusedDefElement",value:function(t,e,n){if(t[e]&&1===t[e].size&&t[e].has(n)){var r=this.$def.querySelector("#".concat(e));r&&this.$def.removeChild(r)}}},{key:"createOrUpdateGradientAndPattern",value:function(t,n,r,i,o){var a=this.context.config,c=a.document,u=a.createImage;if(n){var s=(e.isPattern(r)?n.style[i]:n.getAttribute(i)||"").match(at);s&&s.length>1&&this.clearUnusedDefElement(this.gradientCache,s[1].replace('"',""),t.entity);var l=nt(c||document,this.$def,t,n,r,i,u,o);l&&(this.gradientCache[l]||(this.gradientCache[l]=new Set),this.gradientCache[l].add(t.entity))}}},{key:"createOrUpdateShadow",value:function(t,e,n){!function(t,e,n,r,i){var o=n.parsedStyle,a=o.shadowType,c=void 0===a?"outer":a,u=o.shadowBlur,s=o.shadowColor,l=o.shadowOffsetX,f=o.shadowOffsetY,d=!M(s)&&u>0,p="g-filter-dropshadow-"+n.entity,h=e.querySelector("#".concat(p));if(h&&(h.getAttribute("data-type")===c&&d||(h.remove(),h=null)),d){if(null==r||r.setAttribute("filter","url(#".concat(p,")")),!h){if((h=Y("filter",t)).setAttribute("data-type",c),"outer"===c){var v=Y("feDropShadow",t);v.setAttribute("dx","".concat((l||0)/2)),v.setAttribute("dy","".concat((f||0)/2)),v.setAttribute("stdDeviation","".concat((u||0)/4)),v.setAttribute("flood-color",""+s),h.appendChild(v)}else if("inner"===c){var m=Y("feComponentTransfer",t);m.setAttribute("in","SourceAlpha");var y=Y("feFuncA",t);y.setAttribute("type","table"),y.setAttribute("tableValues","1 0"),m.appendChild(y),h.appendChild(m);var g=Y("feGaussianBlur",t);g.setAttribute("stdDeviation","".concat((u||0)/4)),h.appendChild(g);var b=Y("feOffset",t);b.setAttribute("dx","".concat((l||0)/2)),b.setAttribute("dy","".concat((f||0)/2)),b.setAttribute("result","offsetblur"),h.appendChild(b);var E=Y("feFlood",t);E.setAttribute("flood-color",""+s),E.setAttribute("result","color"),h.appendChild(E);var A=Y("feComposite",t);A.setAttribute("in2","offsetblur"),A.setAttribute("operator","in"),h.appendChild(A);var S=Y("feComposite",t);S.setAttribute("in2","SourceAlpha"),S.setAttribute("operator","in"),h.appendChild(S);var x=Y("feMerge",t);h.appendChild(x);var O=Y("feMergeNode",t);O.setAttribute("in","SourceGraphic");var k=Y("feMergeNode",t);x.appendChild(O),x.appendChild(k)}return h.id=p,h.setAttribute("filterUnits","userSpaceOnUse"),void e.appendChild(h)}if("inner"===c){var w=h.children[1],C=h.children[2];"shadowColor"===i?h.children[3].setAttribute("flood-color",""+s):"shadowBlur"===i?w.setAttribute("stdDeviation","".concat((u||0)/4)):"shadowOffsetX"===i?C.setAttribute("dx","".concat((l||0)/2)):"shadowOffsetY"===i&&C.setAttribute("dy","".concat((f||0)/2))}else if("outer"===c){var T=h.children[0];"shadowColor"===i?T.setAttribute("flood-color",""+s):"shadowBlur"===i?T.setAttribute("stdDeviation","".concat((u||0)/4)):"shadowOffsetX"===i?T.setAttribute("dx","".concat((l||0)/2)):"shadowOffsetY"===i&&T.setAttribute("dy","".concat((f||0)/2))}}else null==r||r.removeAttribute("filter")}(this.context.config.document||document,this.$def,t,e,n)}},{key:"createOrUpdateFilter",value:function(t,e,n){Q(this.context.config.document||document,this.$def,t,e,n)}}])}();function ut(t){return t.toFixed(6).replace(".000000","")}function st(t){return t.replace(/[&|<|>|"|']/g,function(t){return"&"===t?"&":"<"===t?"<":">"===t?">":'"'===t?""":"'"})}var lt={opacity:"opacity",fillStyle:"fill",fill:"fill",fillRule:"fill-rule",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",textPath:"text-path",r:"r",cx:"cx",cy:"cy",rx:"rx",ry:"ry",x:"x",y:"y",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML",textAlign:"text-anchor",pointerEvents:"pointer-events"},ft={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},dt={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",fillRule:"nonzero",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit",pointerEvents:"auto",transform:"matrix(1,0,0,1,0,0)"},pt="g-svg",ht="clip-path-",vt="text-path-",mt=function(){function t(e,n,r){a(this,t),this.svgElementMap=new WeakMap,this.renderQueue=[],this.dirtyAttributes=new WeakMap,this.pendingReorderQueue=new Set,this.clipPathUseMap=new WeakMap,this.pluginOptions=e,this.defElementManager=n,this.context=r}return o(t,[{key:"apply",value:function(n){var r=this,i=n.renderingService,o=n.renderingContext;this.context=n,this.context.svgElementMap=this.svgElementMap;var a=o.root.ownerDocument.defaultView,c=this.context.config.document,u=function(t){var e=t.target;if(r.clipPathUseMap.get(e)){var n=r.defElementManager.getDefElement().querySelector("#".concat(r.getId(e)));n&&n.remove()}r.createSVGDom(c,e,r.$camera)},s=function(t){var e=t.target;r.defElementManager.clear(e.entity),r.clipPathUseMap.delete(e),r.removeSVGDom(e)},l=function(t){var e,n=t.parentNode,i=null===(e=t.parentNode)||void 0===e||null===(e=e.elementSVG)||void 0===e?void 0:e.$groupEl,o=((null==n?void 0:n.children)||[]).slice();i&&r.reorderChildren(c,i,o)},f=function(t){l(t.target)},d=function(t){var e=t.target;if(e.elementSVG){var n=t.attrName,i=r.dirtyAttributes.get(e);i||(r.dirtyAttributes.set(e,[]),i=r.dirtyAttributes.get(e)),i.push(n)}},p=function(t){var n=t.target;(n.nodeName===e.Shape.FRAGMENT?n.childNodes:[n]).forEach(function(t){var n,i=null===(n=t.elementSVG)||void 0===n?void 0:n.$el,o=t.parsedStyle,a=o.fill,c=o.stroke,u=o.clipPath;if(a&&!e.isCSSRGB(a)&&r.defElementManager.createOrUpdateGradientAndPattern(t,i,a,"fill",r),c&&!e.isCSSRGB(c)&&r.defElementManager.createOrUpdateGradientAndPattern(t,i,c,"stroke",r),u){var s=V(R(),t.getWorldTransform()),l="".concat(ht+u.entity,"-").concat(t.entity),f=r.defElementManager.getDefElement().querySelector("#".concat(l));f&&r.applyTransform(f,s)}})};i.hooks.init.tap(t.tag,function(){var t=r.context.config,n=t.background,i=t.document;r.defElementManager.init();var o=r.context.contextService.getContext();n&&(o.style.background=n),o.setAttribute("color-interpolation-filters","sRGB"),r.$camera=Y("g",i),r.$camera.id="".concat(pt,"-camera"),r.applyTransform(r.$camera,r.context.camera.getOrthoMatrix()),o.appendChild(r.$camera),a.addEventListener(e.ElementEvent.MOUNTED,u),a.addEventListener(e.ElementEvent.UNMOUNTED,s),a.addEventListener(e.ElementEvent.REPARENT,f),a.addEventListener(e.ElementEvent.ATTR_MODIFIED,d),a.addEventListener(e.ElementEvent.BOUNDS_CHANGED,p)}),i.hooks.destroy.tap(t.tag,function(){a.removeEventListener(e.ElementEvent.MOUNTED,u),a.removeEventListener(e.ElementEvent.UNMOUNTED,s),a.removeEventListener(e.ElementEvent.REPARENT,f),a.removeEventListener(e.ElementEvent.ATTR_MODIFIED,d),a.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,p),et=0,tt={}}),i.hooks.render.tap(t.tag,function(t){r.renderQueue.push(t)}),i.hooks.beginFrame.tap(t.tag,function(){var t=r.context.config.document;r.pendingReorderQueue.size&&(r.pendingReorderQueue.forEach(function(e){var n,i=((null==e?void 0:e.children)||[]).slice(),o=null==e||null===(n=e.elementSVG)||void 0===n?void 0:n.$groupEl;o&&r.reorderChildren(t||c,o,i||[])}),r.pendingReorderQueue.clear())}),i.hooks.endFrame.tap(t.tag,function(){o.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&r.applyTransform(r.$camera,r.context.camera.getOrthoMatrix()),r.renderQueue.forEach(function(t){var e,n,i=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,o=null===(n=t.elementSVG)||void 0===n?void 0:n.$groupEl;if(i&&o){var a=t.getLocalTransform();r.applyTransform(o,a);var c=r.clipPathUseMap.get(t);c&&c.length&&c.forEach(function(e){r.applyTransform(e,t.getWorldTransform())}),t.renderable.dirty=!1}var u=r.dirtyAttributes.get(t);u&&(u.forEach(function(e){"zIndex"===e?l(t):"increasedLineWidthForHitTesting"===e&&r.createOrUpdateHitArea(t,i,o),r.updateAttribute(t,[e])}),r.dirtyAttributes.delete(t))}),r.renderQueue=[]})}},{key:"getId",value:function(t){return t.id||"".concat(pt,"-").concat(t.entity)}},{key:"reorderChildren",value:function(t,e,n){if(n.sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}),n.length){var r=(t||document).createDocumentFragment();n.forEach(function(t){if(t.isConnected){var e=t.elementSVG.$groupEl;e&&r.appendChild(e)}}),e.appendChild(r)}}},{key:"applyTransform",value:function(t,e){var n="matrix(".concat(ut(e[0]),",").concat(ut(e[1]),",").concat(ut(e[4]),",").concat(ut(e[5]),",").concat(ut(e[12]),",").concat(ut(e[13]),")");n!==t.getAttribute("transform")&&t.setAttribute("transform",n),n===dt.transform&&t.removeAttribute("transform")}},{key:"applyAttributes",value:function(t){var n=t.elementSVG,r=null==n?void 0:n.$el;if(r&&(null==n?void 0:n.$groupEl)){var i=t.nodeName,o=t.attributes;i!==e.Shape.HTML&&r.setAttribute("fill","none"),i===e.Shape.IMAGE&&r.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(o))}}},{key:"updateAttribute",value:function(t,n){var r=this,i=this.context.config.document,o=t.elementSVG,a=o.$el,c=o.$hitTestingEl,u=t.parsedStyle,s=t.nodeName;n.some(function(e){return r.context.SVGElementLifeCycleContribution.shouldUpdateElementAttribute(t,e)})&&a&&[a,c].forEach(function(e){e&&r.context.SVGElementLifeCycleContribution.updateElementAttribute(t,e,r.svgElementMap)}),n.forEach(function(n){var o,l,f=lt[n],d=u[n],p=!M(d)&&""+d,h=(null===(o=ft[n])||void 0===o?void 0:o[p])||p,v=u[n],m=f&&!(null===(l=e.propertyMetadataCache[n])||void 0===l||!l.inh);if(s===e.Shape.HTML)"fill"===n?a.style.background=""+v:"stroke"===n?(a.style["border-color"]=""+v,a.style["border-style"]="solid"):"lineWidth"===n?a.style["border-width"]="".concat(v||0,"px"):"lineDash"===n?a.style["border-style"]="dashed":"innerHTML"===n?r.createOrUpdateInnerHTML(i,a,v):"width"===n||"height"===n||"class"===n||"x"===n||"y"===n?a.setAttribute(n,""+v):M(t.style[n])||""===t.style[n]||(a.style[n]=t.style[n]);else{if(!f||(s===e.Shape.GROUP||t.isCustomElement)&&(m||"fill"===f||"stroke"===f))return;"fill"===n||"stroke"===n?r.defElementManager.createOrUpdateGradientAndPattern(t,a,v,f,r):"clipPath"===n?r.createOrUpdateClipOrTextPath(i,v,t):"textPath"===n?r.createOrUpdateClipOrTextPath(i,v,t,!0):"shadowType"===n||"shadowColor"===n||"shadowBlur"===n||"shadowOffsetX"===n||"shadowOffsetY"===n?r.defElementManager.createOrUpdateShadow(t,a,n):"filter"===n?r.defElementManager.createOrUpdateFilter(t,a,v):M(d)||[a,c].forEach(function(t){t&&f&&("unset"!==p&&p!==dt[n]?t.setAttribute(f,h):t.removeAttribute(f))})}})}},{key:"createSVGDom",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];n.elementSVG=new H;var o=n.elementSVG,a=this.context.SVGElementLifeCycleContribution.createElement(n,this.svgElementMap);if(a){var c,u;n.nodeName===e.Shape.HTML&&(n.parsedStyle.$el=a),this.pluginOptions.outputSVGElementId&&(a.id=this.getId(n)),this.pluginOptions.outputSVGElementName&&n.name&&a.setAttribute("name",n.name),!a.hasAttribute("data-wrapgroup")&&"g"===a.nodeName||i?u=a:(u=Y("g",t)).appendChild(a),o.$el=a,o.$groupEl=u,this.applyAttributes(n),this.createOrUpdateHitArea(n,a,u);var s=r||n.parentNode&&(null===(c=n.parentNode.elementSVG)||void 0===c?void 0:c.$groupEl);s&&(s.appendChild(u),this.pendingReorderQueue.add(n.parentNode))}}},{key:"removeSVGDom",value:function(t){var e,n=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;n&&n.parentNode&&(n.parentNode.removeChild(n),this.context.SVGElementLifeCycleContribution.destroyElement(t,n))}},{key:"createOrUpdateHitArea",value:function(t,e,n){var r=t.elementSVG,i=r.$hitTestingEl,o=Number(t.parsedStyle.increasedLineWidthForHitTesting);if(o){if(!i){i=e.cloneNode(),["filter"].forEach(function(t){i.removeAttribute(t)});var a="none"!==e.getAttribute("fill");i.setAttribute("fill",a?"transparent":"none"),i.setAttribute("stroke","transparent"),n.appendChild(i),r.$hitTestingEl=i,this.svgElementMap.set(i,t)}i.setAttribute("stroke-width","".concat(o+t.parsedStyle.lineWidth))}else i&&(n.removeChild(i),r.$hitTestingEl=null)}},{key:"createOrUpdateInnerHTML",value:function(t,e,n){var r=(t||document).createElement("div");"string"==typeof n?r.innerHTML=n:r.appendChild(n),e.innerHTML="",e.appendChild(r)}},{key:"createOrUpdateClipOrTextPath",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=n.elementSVG.$groupEl,o=r?"g":"clipPath",a=r?"text-path":"clip-path";if(e){var c="".concat((r?vt:ht)+e.entity,"-").concat(n.entity),u=this.defElementManager.getDefElement();if(!u.querySelector("#".concat(c))){var s;if(r)this.createSVGDom(t,e,null,!0),s=e.elementSVG.$el;else{if(!e.isConnected)u.querySelector("#".concat(this.getId(e)))||this.createSVGDom(t,e,u,!0);s=Y(o,t);var l=Y("use",t);l.setAttribute("href","#".concat(e.elementSVG.$el.id)),s.appendChild(l);var f=this.clipPathUseMap.get(e);f||(this.clipPathUseMap.set(e,[]),f=this.clipPathUseMap.get(e)),f.push(l),this.applyTransform(l,e.getWorldTransform());var d=V(R(),n.getWorldTransform());this.applyTransform(s,d)}this.pluginOptions.outputSVGElementId&&(s.id=c),u.appendChild(s)}this.applyAttributes(e),r||i.setAttribute(a,"url(#".concat(c,")"))}else r||i.removeAttribute(a)}}])}();mt.tag="SVGRenderer";var yt,gt={top:"hanging",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"};function bt(t,e,n,r){n.getBounds();var i=e.lineWidth,o=void 0===i?1:i,a=e.x,c=void 0===a?0:a,u=e.y,s=void 0===u?0:u,l=e.dx,f=void 0===l?0:l,d=e.dy,p=void 0===d?0:d,h=e.textPath,v=e.textPathSide,m=void 0===v?"left":v,y=e.textPathStartOffset,g=void 0===y?0:y,b=e.textDecorationLine,E=void 0===b?"":b,A=e.textDecorationColor,S=void 0===A?"":A,x=e.textDecorationStyle,O=void 0===x?"":x,k=e.metrics,w=e.textBaseline,C=void 0===w?"alphabetic":w;"alphabetic"===C&&(C="bottom"),t.setAttribute("dominant-baseline",gt[C]),t.setAttribute("paint-order","stroke");var T=k.lines,P=k.lineHeight,G=k.height,L=T.length,M="transform:translate(".concat(f,"px, ").concat(p,"px);");if(E&&"none"!==E&&(M+="text-decoration:".concat(E," ").concat(O," ").concat(S,";")),M&&t.setAttribute("style",M),0!==c&&t.setAttribute("x","".concat(c)),0!==s&&t.setAttribute("y","".concat(s)),1===L){var D=st(T[0]);if(t.setAttribute("dx","".concat(o/2)),"bottom"===C||"top"===C?(t.setAttribute("dominant-baseline",gt.middle),t.setAttribute("dy","bottom"===C?"-".concat(G/2,"px"):"".concat(G/2,"px"))):t.setAttribute("dy","0px"),h){t.innerHTML="";var N=Y("textPath",t.ownerDocument);N.setAttribute("href","#".concat(vt+h.entity)),"left"!==m&&N.setAttribute("side",m),0!==g&&N.setAttribute("startOffset","".concat(g)),N.innerHTML=D,t.appendChild(N)}else t.innerHTML=D}else t.innerHTML=T.map(function(t,e){var n=o/2,r=0;return 0===e?"middle"===C?r=P/2-G/2:"top"===C||"hanging"===C?r=0:"bottom"!==C&&"ideographic"!==C||(r=-P*(L-1)):r=P,"<tspan x=".concat(c,' dx="').concat(n,'" dy="').concat(r,'">').concat(st(t),"</tspan>")}).join("")}var Et=($($($($($($($($($($(yt={},e.Shape.RECT,"path"),e.Shape.CIRCLE,"circle"),e.Shape.ELLIPSE,"ellipse"),e.Shape.IMAGE,"image"),e.Shape.GROUP,"g"),e.Shape.LINE,"line"),e.Shape.POLYLINE,"polyline"),e.Shape.POLYGON,"polygon"),e.Shape.TEXT,"text"),e.Shape.PATH,"path"),$(yt,e.Shape.HTML,"foreignObject")),At=$($($($($($($($($({},e.Shape.CIRCLE,["cx","cy","r"]),e.Shape.ELLIPSE,["cx","cy","rx","ry"]),e.Shape.RECT,["x","y","width","height","radius"]),e.Shape.IMAGE,["x","y","src","width","height"]),e.Shape.LINE,["x1","y1","x2","y2","markerStart","markerEnd","markerStartOffset","markerEndOffset"]),e.Shape.POLYLINE,["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"]),e.Shape.POLYGON,["points","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"]),e.Shape.PATH,["d","markerStart","markerEnd","markerMid","markerStartOffset","markerEndOffset"]),e.Shape.TEXT,["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","maxLines","leading","textBaseline","textAlign","textTransform","textOverflow","textPath","textPathSide","textPathStartOffset","textDecorationLine","textDecorationColor","textDecorationStyle","dx","dy"]),St=function(){return o(function t(e,n){a(this,t),this.context=e,this.runtime=n},[{key:"createElement",value:function(t,e){var n=Y(Et[t.nodeName]||"g",this.context.config.document||document);return e.set(n,t),n}},{key:"destroyElement",value:function(t,e){}},{key:"shouldUpdateElementAttribute",value:function(t,e){return(At[t.nodeName]||[]).indexOf(e)>-1}},{key:"updateElementAttribute",value:function(t){var n=t.elementSVG.$el,r=t.parsedStyle;switch(t.nodeName){case e.Shape.IMAGE:F(n,r);break;case e.Shape.RECT:X(n,r);break;case e.Shape.LINE:B(n,r);break;case e.Shape.POLYGON:case e.Shape.POLYLINE:z(n,r);break;case e.Shape.PATH:W(n,r);break;case e.Shape.TEXT:bt(n,r,t)}}}])}(),xt=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,e),(t=l(this,e)).name="svg-renderer",t.options=n,t}return d(e,t),o(e,[{key:"init",value:function(t){var e=this.options,n=e.outputSVGElementId,r=e.outputSVGElementName,i=new ct(this.context),o=new St(this.context,t);this.context.defaultElementLifeCycleContribution=o,this.context.SVGElementLifeCycleContribution=o;var a={outputSVGElementId:!!M(n)||!!n,outputSVGElementName:!!M(r)||!!r};this.addRenderingPlugin(new mt(a,i,this.context))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultElementLifeCycleContribution,delete this.context.SVGElementLifeCycleContribution}}])}(e.AbstractRendererPlugin),Ot=Object.freeze({__proto__:null,CLIP_PATH_PREFIX:ht,DEFAULT_VALUE_MAP:dt,DefaultElementLifeCycleContribution:St,ElementSVG:H,G_SVG_PREFIX:pt,Plugin:xt,SHAPE2TAGS:Et,SHAPE_UPDATE_DEPS:At,SVGRendererPlugin:mt,SVG_ATTR_MAP:lt,TEXT_PATH_PREFIX:vt,createSVGElement:Y,updateImageElementAttribute:F,updateLineElementAttribute:B,updatePathElementAttribute:W,updatePolylineElementAttribute:z,updateRectElementAttribute:X,updateTextElementAttribute:bt});function kt(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;o.length>r;r++)-1===e.indexOf(n=o[r])&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var wt=["offset","composite","computedOffset","easing"],Ct=["offset","composite","computedOffset","easing","transformOrigin"],Tt=["offset","composite","computedOffset","easing","transformOrigin"],Pt=["offset","composite","computedOffset","easing","transformOrigin"],Gt=function(){return o(function t(e){a(this,t),this.context=e,this.canvasConfig=e.config},[{key:"init",value:function(){var t=this.canvasConfig,e=t.container,n=t.document,r=t.devicePixelRatio;if(this.$container=D(e)?(n||document).getElementById(e):e,this.$container){this.$container.style.position||(this.$container.style.position="relative");var i=Y("svg",n);i.setAttribute("width","".concat(this.canvasConfig.width)),i.setAttribute("height","".concat(this.canvasConfig.height)),this.$container.appendChild(i),this.$namespace=i}this.dpr=r}},{key:"getDomElement",value:function(){return this.$namespace}},{key:"getContext",value:function(){return this.$namespace}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)}},{key:"resize",value:function(t,e){this.$namespace&&(this.$namespace.setAttribute("width","".concat(t)),this.$namespace.setAttribute("height","".concat(e)))}},{key:"applyCursorStyle",value:function(t){this.$container&&(this.$container.style.cursor=t)}},{key:"generateCSSText",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=r.duration,a=r.easing,c=r.delay,u=r.direction,s=r.iterations,l=r.fill;return"@keyframes ".concat(t,"{").concat(n.map(function(t){var e=t.computedOffset,n=kt(t,wt),r=Object.keys(n).map(function(t){return"".concat(t,":").concat(i[t]||"").concat(n[t],";")}).join("");return"".concat(100*e,"%{").concat(r,"}")}).join(""),"}")+"".concat(e," {animation: ").concat(t," ").concat(o,"ms ").concat(a," ").concat(c,"ms ").concat(s===1/0?"infinite":s," ").concat(u," ").concat(l,";}")}},{key:"toDataUR