@antv/g-svg 2.0.14 → 2.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,34 +1,34 @@
1
1
  /*!
2
2
  * @antv/g-svg
3
3
  * @description A renderer implemented by SVG
4
- * @version 2.0.14
5
- * @date 10/23/2024, 7:15:43 AM
4
+ * @version 2.0.15
5
+ * @date 10/23/2024, 11:16:36 AM
6
6
  * @author AntVis
7
7
  * @docs https://g.antv.antgroup.com/
8
8
  */
9
- !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";
9
+ !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)}
10
10
  /*!
11
11
  * @antv/g-plugin-dom-interaction
12
12
  * @description A G plugin
13
- * @version 2.1.1
14
- * @date 10/23/2024, 7:13:54 AM
13
+ * @version 2.1.2
14
+ * @date 10/23/2024, 11:14:44 AM
15
15
  * @author AntVis
16
16
  * @docs https://g.antv.antgroup.com/
17
- */class r{apply(t,e){var n=t.renderingService,i=t.renderingContext,a=t.config;this.context=t;var o=i.root.ownerDocument.defaultView,c=t=>{n.hooks.pointerMove.call(t)},s=t=>{n.hooks.pointerUp.call(t)},l=t=>{n.hooks.pointerDown.call(t)},u=t=>{n.hooks.pointerOver.call(t)},d=t=>{n.hooks.pointerOut.call(t)},h=t=>{n.hooks.pointerCancel.call(t)},p=t=>{n.hooks.pointerWheel.call(t)},f=t=>{n.hooks.click.call(t)};n.hooks.init.tap(r.tag,(()=>{var t=this.context.contextService.getDomElement();e.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="none",t.style.msTouchAction="none"):o.supportsPointerEvents&&(t.style.touchAction="none"),o.supportsPointerEvents?(t=>{e.globalThis.document.addEventListener("pointermove",c,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("pointerleave",d,!0),t.addEventListener("pointerover",u,!0),e.globalThis.addEventListener("pointerup",s,!0),e.globalThis.addEventListener("pointercancel",h,!0)})(t):(t=>{e.globalThis.document.addEventListener("mousemove",c,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("mouseout",d,!0),t.addEventListener("mouseover",u,!0),e.globalThis.addEventListener("mouseup",s,!0)})(t),o.supportsTouchEvents&&(t=>{t.addEventListener("touchstart",l,!0),t.addEventListener("touchend",s,!0),t.addEventListener("touchmove",c,!0),t.addEventListener("touchcancel",h,!0)})(t),a.useNativeClickEvent&&t.addEventListener("click",f,!0),t.addEventListener("wheel",p,{passive:!0,capture:!0})})),n.hooks.destroy.tap(r.tag,(()=>{var t=this.context.contextService.getDomElement();e.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):o.supportsPointerEvents&&(t.style.touchAction=""),o.supportsPointerEvents?(t=>{e.globalThis.document.removeEventListener("pointermove",c,!0),t.removeEventListener("pointerdown",l,!0),t.removeEventListener("pointerleave",d,!0),t.removeEventListener("pointerover",u,!0),e.globalThis.removeEventListener("pointerup",s,!0),e.globalThis.removeEventListener("pointercancel",h,!0)})(t):(t=>{e.globalThis.document.removeEventListener("mousemove",c,!0),t.removeEventListener("mousedown",l,!0),t.removeEventListener("mouseout",d,!0),t.removeEventListener("mouseover",u,!0),e.globalThis.removeEventListener("mouseup",s,!0)})(t),o.supportsTouchEvents&&(t=>{t.removeEventListener("touchstart",l,!0),t.removeEventListener("touchend",s,!0),t.removeEventListener("touchmove",c,!0),t.removeEventListener("touchcancel",h,!0)})(t),a.useNativeClickEvent&&t.removeEventListener("click",f,!0),t.removeEventListener("wheel",p,!0)}))}}r.tag="DOMInteraction";let n=class extends e.AbstractRendererPlugin{constructor(){super(...arguments),this.name="dom-interaction"}init(){this.addRenderingPlugin(new r)}destroy(){this.removeAllRenderingPlugins()}};var i=Object.freeze({__proto__:null,Plugin:n});function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);e>r;r++)n[r]=t[r];return n}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.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)?a(t,e):void 0}}function c(t){return c="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},c(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function d(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var a=Object.create((e&&e.prototype instanceof b?e:b).prototype),o=new M(n||[]);return i(a,"_invoke",{value:k(t,r,o)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var f="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function E(){}function A(){}var S={};d(S,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(D([])));w&&w!==r&&n.call(w,o)&&(S=w);var C=A.prototype=b.prototype=Object.create(S);function O(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(i,a,o,s){var l=p(t[i],t,a);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==c(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(d).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function k(e,r,n){var i=f;return function(a,o){if(i===m)throw Error("Generator is already running");if(i===g){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var c=n.delegate;if(c){var s=T(c,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var l=p(e,r,n);if("normal"===l.type){if(i=n.done?g:v,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=g,n.method="throw",n.arg=l.arg)}}}function T(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=p(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(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 G(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(c(e)+" is not iterable")}return E.prototype=A,i(C,"constructor",{value:A,configurable:!0}),i(A,"constructor",{value:E,configurable:!0}),E.displayName=d(A,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===E||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,d(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(L.prototype),d(L.prototype,l,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new L(h(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},O(C),d(C,u,"Generator"),d(C,o,(function(){return this})),d(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(G),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return c.type="throw",c.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],c=o.completion;if("root"===o.tryLoc)return i("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(o.catchLoc>this.prev)return i(o.catchLoc,!0);if(o.finallyLoc>this.prev)return i(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return i(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var a=i;break}}a&&("break"===t||"continue"===t)&&e>=a.tryLoc&&a.finallyLoc>=e&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},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),G(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;G(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function l(t,e,r,n,i,a,o){try{var c=t[a](o),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){l(a,n,i,o,c,"next",t)}function c(t){l(a,n,i,o,c,"throw",t)}o(void 0)}))}}
17
+ */var h=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)},h=function(t){i.hooks.pointerCancel.call(t)},p=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",h,!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",h,!0)}(t),a.useNativeClickEvent&&t.addEventListener("click",v,!0),t.addEventListener("wheel",p,{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",h,!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",h,!0)}(t),a.useNativeClickEvent&&t.removeEventListener("click",v,!0),t.removeEventListener("wheel",p,!0)}))}}])}();h.tag="DOMInteraction";var p=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 h)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(e.AbstractRendererPlugin),v=Object.freeze({__proto__:null,Plugin:p});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(){g=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=Object.create((e&&e.prototype instanceof b?e:b).prototype),a=new M(r||[]);return o(i,"_invoke",{value:L(t,n,a)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",y={};function b(){}function E(){}function A(){}var S={};l(S,c,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(D([])));x&&x!==r&&i.call(x,c)&&(S=x);var O=A.prototype=b.prototype=Object.create(S);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,a,c,u){var s=d(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function L(e,n,r){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var c=r.delegate;if(c){var u=T(c,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(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var s=d(e,n,r);if("normal"===s.type){if(i=r.done?m:p,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=m,r.method="throw",r.arg=s.arg)}}}function T(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(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 G(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=A,o(O,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:E,configurable:!0}),E.displayName=l(A,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===E||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,l(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},k(C.prototype),l(C.prototype,u,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new C(f(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(O),l(O,s,"Generator"),l(O,c,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=D,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(G),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return c.type="throw",c.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(this.prev>=a.tryLoc){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(a.catchLoc>this.prev)return r(a.catchLoc,!0);if(a.finallyLoc>this.prev)return r(a.finallyLoc)}else if(u){if(a.catchLoc>this.prev)return r(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(a.finallyLoc>this.prev)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(this.prev>=r.tryLoc&&i.call(r,"finallyLoc")&&r.finallyLoc>this.prev){var o=r;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),G(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;G(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function b(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 E(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){b(o,r,i,a,c,"next",t)}function c(t){b(o,r,i,a,c,"throw",t)}a(void 0)}))}}
18
18
  /*!
19
19
  * @antv/g-plugin-svg-picker
20
20
  * @description A G plugin for picking in SVG
21
- * @version 2.0.14
22
- * @date 10/23/2024, 7:15:14 AM
21
+ * @version 2.0.15
22
+ * @date 10/23/2024, 11:16:07 AM
23
23
  * @author AntVis
24
24
  * @docs https://g.antv.antgroup.com/
25
- */class d{apply(t,e){var r=this,n=t.config.document,i=t.renderingService,a=t.svgElementMap;i.hooks.pick.tapPromise(d.tag,function(){var t=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(a,n,e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),i.hooks.pickSync.tap(d.tag,(t=>this.pick(a,n,t)))}pick(t,e,r){var n=r.topmost,i=r.position,a=i.clientX,c=i.clientY;try{var s,l=[],u=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=o(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return t.length>n?{done:!1,value:t[n++]}:{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 a,c=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){s=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(s)throw a}}}}((e||document).elementsFromPoint(a,c));try{for(u.s();!(s=u.n()).done;){var d=s.value;if(d.shadowRoot&&d.shadowRoot!==e)return this.pick(t,d.shadowRoot,r);var h=t.get(d);if(h&&h.isInteractive()&&(l.push(h),n))return r.picked=l,r}}catch(t){u.e(t)}finally{u.f()}r.picked=l}catch(t){r.picked=[]}return r}}d.tag="SVGPicker";let h=class extends e.AbstractRendererPlugin{constructor(){super(...arguments),this.name="svg-picker"}init(){this.addRenderingPlugin(new d)}destroy(){this.removeAllRenderingPlugins()}};var p=Object.freeze({__proto__:null,Plugin:h}),f=function(t){return null==t},v={}.toString,m=function(t,e){return v.call(t)==="[object "+e+"]"},g=function(t){return m(t,"String")},y=function(t,e,r){return e>t?e:t>r?r:t},b="undefined"!=typeof Float32Array?Float32Array:Array;function E(){var t=new b(16);return b!=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 A(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],c=e[5],s=e[6],l=e[7],u=e[8],d=e[9],h=e[10],p=e[11],f=e[12],v=e[13],m=e[14],g=e[15],y=r*c-n*o,b=r*s-i*o,E=r*l-a*o,A=n*s-i*c,S=n*l-a*c,x=i*l-a*s,w=u*v-d*f,C=u*m-h*f,O=u*g-p*f,L=d*m-h*v,k=d*g-p*v,T=h*g-p*m,P=y*T-b*k+E*L+A*O-S*C+x*w;return P?(t[0]=(c*T-s*k+l*L)*(P=1/P),t[1]=(i*k-n*T-a*L)*P,t[2]=(v*x-m*S+g*A)*P,t[3]=(h*S-d*x-p*A)*P,t[4]=(s*O-o*T-l*C)*P,t[5]=(r*T-i*O+a*C)*P,t[6]=(m*E-f*x-g*b)*P,t[7]=(u*x-h*E+p*b)*P,t[8]=(o*k-c*O+l*w)*P,t[9]=(n*O-r*k-a*w)*P,t[10]=(f*S-v*E+g*y)*P,t[11]=(d*E-u*S-p*y)*P,t[12]=(c*C-o*L-s*w)*P,t[13]=(r*L-n*C+i*w)*P,t[14]=(v*b-f*A-m*y)*P,t[15]=(u*A-d*b+h*y)*P,t):null}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);s=!0);}catch(t){l=!0,i=t}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return c}}(t,e)||o(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 x(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}function w(t,e,r){return(e=x(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C(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 O(t){for(var e=1;arguments.length>e;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach((function(e){w(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}
25
+ */var A=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=E(g().mark((function t(e){return g().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}}])}();A.tag="SVGPicker";var S=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 A)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(e.AbstractRendererPlugin),w=Object.freeze({__proto__:null,Plugin:S}),x=function(t){return null==t},O={}.toString,k=function(t,e){return O.call(t)==="[object "+e+"]"},C=function(t){return k(t,"String")},L=function(t,e,n){return e>t?e:t>n?n:t},T="undefined"!=typeof Float32Array?Float32Array:Array;function P(){var t=new T(16);return T!=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 G(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],h=e[11],p=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,w=i*s-o*u,x=l*v-f*p,O=l*m-d*p,k=l*y-h*p,C=f*m-d*v,L=f*y-h*v,T=d*y-h*m,P=g*T-b*L+E*C+A*k-S*O+w*x;return P?(t[0]=(c*T-u*L+s*C)*(P=1/P),t[1]=(i*L-r*T-o*C)*P,t[2]=(v*w-m*S+y*A)*P,t[3]=(d*S-f*w-h*A)*P,t[4]=(u*k-a*T-s*O)*P,t[5]=(n*T-i*k+o*O)*P,t[6]=(m*E-p*w-y*b)*P,t[7]=(l*w-d*E+h*b)*P,t[8]=(a*L-c*k+s*x)*P,t[9]=(r*k-n*L-o*x)*P,t[10]=(p*S-v*E+y*g)*P,t[11]=(f*E-l*S-h*g)*P,t[12]=(c*O-a*C-u*x)*P,t[13]=(n*C-r*O+i*x)*P,t[14]=(v*b-p*A-m*g)*P,t[15]=(l*A-f*b+d*g)*P,t):null}function M(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 D(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 j(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 N(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){M(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}
26
26
  /*!
27
27
  * @antv/g-plugin-svg-renderer
28
28
  * @description A G plugin of renderer implementation with SVG
29
- * @version 2.1.1
30
- * @date 10/23/2024, 7:14:23 AM
29
+ * @version 2.1.2
30
+ * @date 10/23/2024, 11:15:13 AM
31
31
  * @author AntVis
32
32
  * @docs https://g.antv.antgroup.com/
33
- */Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});class L{}function k(t,e){var r=e.src,n=void 0===r?"":r,i=e.x,a=e.y,o=void 0===a?0:a,c=e.width,s=e.height;if(t.setAttribute("x","".concat(void 0===i?0:i)),t.setAttribute("y","".concat(o)),g(n))t.setAttribute("href",n);else if(n instanceof Image)c||t.setAttribute("width","".concat(n.width)),s||t.setAttribute("height","".concat(n.height)),t.setAttribute("href",n.src);else if(n instanceof HTMLElement&&g(n.nodeName)&&"CANVAS"===n.nodeName.toUpperCase())t.setAttribute("href",n.toDataURL());else if(n instanceof ImageData){var l=document.createElement("canvas");l.setAttribute("width","".concat(n.width)),l.setAttribute("height","".concat(n.height));var u=l.getContext("2d");u&&(u.putImageData(n,0,0),c||t.setAttribute("width","".concat(n.width)),s||t.setAttribute("height","".concat(n.height)),t.setAttribute("href",l.toDataURL()))}}function T(t,r){var n=r.x1,i=r.y1,a=r.x2,o=r.y2,c=r.markerStart,s=r.markerEnd,l=r.markerStartOffset,u=r.markerEndOffset,d=0,h=0,p=0,f=0,v=0;c&&e.isDisplayObject(c)&&l&&(d=Math.cos(v=Math.atan2(o-i,a-n))*(l||0),h=Math.sin(v)*(l||0)),s&&e.isDisplayObject(s)&&u&&(p=Math.cos(v=Math.atan2(i-o,n-a))*(u||0),f=Math.sin(v)*(u||0)),t.setAttribute("x1","".concat(n+d)),t.setAttribute("y1","".concat(i+h)),t.setAttribute("x2","".concat(a+p)),t.setAttribute("y2","".concat(o+f))}function P(t,r){var n=r.d,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,c=r.markerEndOffset,s=0,l=0,u=0,d=0,h=0;if(i&&e.isDisplayObject(i)&&o){var p=S(i.parentNode.getStartTangent(),2),f=p[0],v=p[1];s=Math.cos(h=Math.atan2(f[1]-v[1],f[0]-v[0]))*(o||0),l=Math.sin(h)*(o||0)}if(a&&e.isDisplayObject(a)&&c){var m=S(a.parentNode.getEndTangent(),2),g=m[0],y=m[1];u=Math.cos(h=Math.atan2(g[1]-y[1],g[0]-y[0]))*(c||0),d=Math.sin(h)*(c||0)}t.setAttribute("d",e.translatePathToString(n.absolutePath,s,l,u,d))}function G(t,r){var n=r.points.points,i=r.markerStart,a=r.markerStartOffset,o=r.markerEnd,c=r.markerEndOffset,s=n.length;if(n&&s>=2){var l=0,u=0,d=0,h=0,p=0;i&&e.isDisplayObject(i)&&a&&(l=Math.cos(p=Math.atan2(n[1][1]-n[0][1],n[1][0]-n[0][0]))*(a||0),u=Math.sin(p)*(a||0)),o&&e.isDisplayObject(o)&&c&&(d=Math.cos(p=Math.atan2(n[s-2][1]-n[s-1][1],n[s-2][0]-n[s-1][0]))*(c||0),h=Math.sin(p)*(c||0)),t.setAttribute("points",n.map(((t,e)=>{var r=0,n=0;return 0===e?(r=l,n=u):e===s-1&&(r=d,n=h),"".concat(t[0]+r,",").concat(t[1]+n)})).join(" "))}}function M(t,e){var r=e.radius,n=e.x,i=void 0===n?0:n,a=e.y,o=void 0===a?0:a,c=e.width,s=e.height;if(isFinite(c)&&isFinite(s)){var l="";if(r&&r.some((t=>0!==t))){var u=S(r.map((t=>y(t,0,Math.min(Math.abs(c)/2,Math.abs(s)/2)))),4),d=u[0],h=u[1],p=u[2],f=u[3],v=c>0?1:-1,m=s>0?1:-1,g=v+m!==0?1:0;l=[["M ".concat(v*d+i,",").concat(o)],["l ".concat(c-v*(d+h),",0")],["a ".concat(h,",").concat(h,",0,0,").concat(g,",").concat(v*h,",").concat(m*h)],["l 0,".concat(s-m*(h+p))],["a ".concat(p,",").concat(p,",0,0,").concat(g,",").concat(-v*p,",").concat(m*p)],["l ".concat(v*(p+f)-c,",0")],["a ".concat(f,",").concat(f,",0,0,").concat(g,",").concat(-v*f,",").concat(-m*f)],["l 0,".concat(m*(f+d)-s)],["a ".concat(d,",").concat(d,",0,0,").concat(g,",").concat(v*d,",").concat(-m*d)],["z"]].join(" ")}else l="M ".concat(i,",").concat(o," l ").concat(c,",0 l 0,").concat(s," l").concat(-c," 0 z");t.setAttribute("d",l)}}function D(t,e){return(e||document).createElementNS("http://www.w3.org/2000/svg",t)}L.tag="c-svg-element";var N="g-filter-";function R(t,e,r,n,i){var a=N+r.entity,o=e.querySelectorAll("[name=".concat(a,"]"));if(o.length&&o.forEach((t=>{e.removeChild(t)})),0===i.length)null==n||n.removeAttribute("filter");else{var c=i.map(((r,n)=>{var i=r.name,o=r.params,c=D("filter",t);return c.setAttribute("filterUnits","userSpaceOnUse"),"blur"===i?function(t,e,r){var n=D("feGaussianBlur",t);n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation","".concat(r[0].value)),e.appendChild(n)}(t,c,o):"brightness"===i?function(t,e,r){var n=V(r[0]);j(t,e,{type:"linear",slope:n,intercept:0})}(t,c,o):"drop-shadow"===i?function(t,e,r){var n=r[0].value,i=r[1].value,a=r[2].value,o=r[3].formatted,c=D("feGaussianBlur",t);c.setAttribute("in","SourceAlpha"),c.setAttribute("stdDeviation","".concat(a)),e.appendChild(c);var s=D("feOffset",t);s.setAttribute("dx","".concat(n)),s.setAttribute("dy","".concat(i)),s.setAttribute("result","offsetblur"),e.appendChild(s);var l=D("feFlood",t);l.setAttribute("flood-color",o),e.appendChild(l);var u=D("feComposite",t);u.setAttribute("in2","offsetblur"),u.setAttribute("operator","in"),e.appendChild(u);var d=D("feMerge",t);e.appendChild(d);var h=D("feMergeNode",t),p=D("feMergeNode",t);p.setAttribute("in","SourceGraphic"),d.appendChild(h),d.appendChild(p)}(t,c,o):"contrast"===i?function(t,e,r){var n=V(r[0]);j(t,e,{type:"linear",slope:n,intercept:-.5*n+.5})}(t,c,o):"grayscale"===i?function(t,e,r){var n=V(r[0]);$(t,e,[.2126+.7874*(1-n),.7152-.7152*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152+.2848*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152-.7152*(1-n),.0722+.9278*(1-n),0,0,0,0,0,1,0])}(t,c,o):"sepia"===i?function(t,e,r){var n=V(r[0]);$(t,e,[.393+.607*(1-n),.769-.769*(1-n),.189-.189*(1-n),0,0,.349-.349*(1-n),.686+.314*(1-n),.168-.168*(1-n),0,0,.272-.272*(1-n),.534-.534*(1-n),.131+.869*(1-n),0,0,0,0,0,1,0])}(t,c,o):"saturate"===i?function(t,e,r){var n=V(r[0]),i=D("feColorMatrix",t);i.setAttribute("type","saturate"),i.setAttribute("values","".concat(n)),e.appendChild(i)}(t,c,o):"hue-rotate"===i?function(t,e,r){var n=D("feColorMatrix",t);n.setAttribute("type","hueRotate"),n.setAttribute("values","".concat(r[0].value)),e.appendChild(n)}(t,c,o):"invert"===i&&function(t,e,r){var n=V(r[0]);j(t,e,{type:"table",tableValues:"".concat(n," ").concat(1-n)})}(t,c,o),c.id="".concat(a,"-").concat(n),c.setAttribute("name",a),e.appendChild(c),c.id}));setTimeout((()=>{null==n||n.setAttribute("filter",c.map((t=>"url(#".concat(t,")"))).join(" "))}))}}function V(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function j(t,e,r){var n=r.type,i=r.slope,a=r.intercept,o=r.tableValues,c=D("feComponentTransfer",t);[D("feFuncR",t),D("feFuncG",t),D("feFuncB",t)].forEach((t=>{t.setAttribute("type",n),"table"===n?t.setAttribute("tableValues","".concat(o)):(t.setAttribute("slope","".concat(i)),t.setAttribute("intercept","".concat(a))),c.appendChild(t)})),e.appendChild(c)}function $(t,e,r){var n=D("feColorMatrix",t);n.setAttribute("type","matrix"),n.setAttribute("values",r.join(" ")),e.appendChild(n)}var U="g-pattern-",I={},_=0;function H(t,r,n,i,a,o,c,s){if(!a)return"";if(!e.isCSSRGB(a)){if(e.isPattern(a)){var l=function(t,r,n,i,a,o){var c=F(i),s=r.querySelector("#".concat(c));if(!s){var l=i.image,u="";if(g(l)?u=l:e.isBrowser&&(l instanceof HTMLImageElement?u=l.src:l instanceof HTMLCanvasElement&&(u=l.toDataURL())),u){var d,h=D("image",t);h.setAttribute("href",u),a?d=a(u):e.isBrowser&&(d=new window.Image),u.match(/^data:/i)||(d.crossOrigin="Anonymous",h.setAttribute("crossorigin","anonymous")),d.src=u;var p=function(){var e=B(t,r,n,i,c,d.width,d.height);r.appendChild(e),e.appendChild(h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width","".concat(d.width)),h.setAttribute("height","".concat(d.height))};d.complete?p():d.onload=p}if("rect"===l.nodeName){var f=l.parsedStyle,v=B(t,r,l,i,c,f.width,f.height);l.forEach((e=>{o.createSVGDom(t,e,null);var r=e.elementSVG,n=e.getLocalTransform();o.applyTransform(r.$groupEl,n)})),v.appendChild(l.elementSVG.$groupEl)}}return c}(t,r,n,a,c,s);return i.style[o]="url(#".concat(l,")"),l}if(1===a.length){var u=W(t,n,r,i,a[0]);return null==i||i.setAttribute(o,"url(#".concat(u,")")),u}var d=function(t,e,r,n,i){var a="".concat(N+e.entity,"-gradient"),o=r.querySelector("#".concat(a));o||((o=D("filter",t)).setAttribute("filterUnits","userSpaceOnUse"),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.id=a,r.appendChild(o));var c=0;i.forEach(((i,s)=>{var l=W(t,e,r,n,i),u="".concat(l,"_rect"),d=D("rect",t);d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.setAttribute("fill","url(#".concat(l,")")),d.id=u,r.appendChild(d);var h=D("feImage",t);if(h.setAttribute("href","#".concat(u)),h.setAttribute("result","".concat(a,"-").concat(s)),o.appendChild(h),s>0){var p=D("feBlend",t);p.setAttribute("in",1===s?"".concat(a,"-").concat(s-1):"".concat(a,"-blended-").concat(c-1)),p.setAttribute("in2","".concat(a,"-").concat(s)),p.setAttribute("result","".concat(a,"-blended-").concat(c++)),p.setAttribute("mode","multiply"),o.appendChild(p)}}));var s=D("feComposite",t);return s.setAttribute("in","".concat(a,"-blended-").concat(c)),s.setAttribute("in2","SourceGraphic"),s.setAttribute("operator","in"),o.appendChild(s),a}(t,n,r,i,a);return null==i||i.setAttribute("filter","url(#".concat(d,")")),null==i||i.setAttribute("fill","black"),d}return"currentColor"===n.style[o]?null==i||i.setAttribute(o,"currentColor"):null==i||i.setAttribute(o,a.isNone?"none":""+a),""}function F(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="";if(e.isCSSGradientValue(t)){var i=t.type;if(i===e.GradientType.LinearGradient||i===e.GradientType.RadialGradient){var a=O(O({},t.value),r),o=a.x,c=a.y,s=a.width,l=a.height,u=a.steps,d=a.angle,h=a.cx,p=a.cy,f=a.size;n="gradient-".concat(a.type,"-").concat((null==o?void 0:""+o)||0,"-").concat((null==c?void 0:""+c)||0,"-").concat((null==d?void 0:""+d)||0,"-").concat((null==h?void 0:""+h)||0,"-").concat((null==p?void 0:""+p)||0,"-").concat((null==f?void 0:""+f)||0,"-").concat(s,"-").concat(l,"-").concat(u.map((t=>{var e=t.color;return"".concat(t.offset).concat(e)})).join("-"))}}else e.isPattern(t)&&(n=g(t.image)?"pattern-".concat(t.image,"-").concat(t.repetition):"rect"===t.image.nodeName?"pattern-rect-".concat(t.image.entity):"pattern-".concat(_));return n&&(I[n]||(I[n]="".concat(U).concat(_++))),I[n]}function B(t,r,n,i,a,o,c){var s=i.repetition,l=i.transform,u=D("pattern",t);l&&u.setAttribute("patternTransform",function(t){return e.parseTransform(t).map((t=>{var e=t.t,r=t.d;if("translate"===e)return"translate(".concat(r[0].value," ").concat(r[1].value,")");if("translateX"===e)return"translate(".concat(r[0].value," 0)");if("translateY"===e)return"translate(0 ".concat(r[0].value,")");if("rotate"===e)return"rotate(".concat(r[0].value,")");if("scale"===e){var n=(null==r?void 0:r.map((t=>t.value)))||[1,1];return"scale(".concat(n[0],", ").concat(n[1],")")}if("scaleX"===e){var i=(null==r?void 0:r.map((t=>t.value)))||[1];return"scale(".concat(i[0],", 1)")}if("scaleY"===e){var a=(null==r?void 0:r.map((t=>t.value)))||[1];return"scale(1, ".concat(a[0],")")}if("skew"===e){var o=(null==r?void 0:r.map((t=>t.value)))||[0,0];return"skewX(".concat(o[0],") skewY(").concat(o[1],")")}if("skewZ"===e){var c=(null==r?void 0:r.map((t=>t.value)))||[0];return"skewX(".concat(c[0],")")}if("skewY"===e){var s=(null==r?void 0:r.map((t=>t.value)))||[0];return"skewY(".concat(s[0],")")}if("matrix"===e){var l=S(r.map((t=>t.value)),6),u=l[1],d=l[2],h=l[3],p=l[4],f=l[5];return"matrix(".concat(l[0]," ").concat(u," ").concat(d," ").concat(h," ").concat(p," ").concat(f,")")}return null})).filter((t=>null!==t)).join(" ")}(l)),u.setAttribute("patternUnits","userSpaceOnUse"),u.id=a,r.appendChild(u);var d=n.getGeometryBounds(),h=d.halfExtents,p=d.min;u.setAttribute("x","".concat(p[0])),u.setAttribute("y","".concat(p[1]));var f=o,v=c;return"repeat-x"===s?v=2*h[1]:"repeat-y"===s?f=2*h[0]:"no-repeat"===s&&(f=2*h[0],v=2*h[1]),u.setAttribute("width","".concat(f)),u.setAttribute("height","".concat(v)),u}function W(t,r,n,i,a){var o=r.getGeometryBounds(),c=o&&2*o.halfExtents[0]||0,s=o&&2*o.halfExtents[1]||0,l=o&&o.min||[0,0],u=F(a,{x:l[0],y:l[1],width:c,height:s}),d=n.querySelector("#".concat(u));if(!d){(d=D(a.type===e.GradientType.LinearGradient?"linearGradient":"radialGradient",t)).setAttribute("gradientUnits","userSpaceOnUse");var h="";a.value.steps.sort(((t,e)=>t.offset.value-e.offset.value)).forEach((t=>{var e=t.color;h+='<stop offset="'.concat(t.offset.value/100,'" stop-color="').concat(e,'"></stop>')})),d.innerHTML=h,d.id=u,n.appendChild(d)}if(a.type===e.GradientType.LinearGradient){var p=e.computeLinearGradient([l[0],l[1]],c,s,a.value.angle),f=p.y1,v=p.x2,m=p.y2;d.setAttribute("x1","".concat(p.x1)),d.setAttribute("y1","".concat(f)),d.setAttribute("x2","".concat(v)),d.setAttribute("y2","".concat(m))}else{var g=a.value,y=e.computeRadialGradient([l[0],l[1]],c,s,g.cx,g.cy,g.size),b=y.y,E=y.r;d.setAttribute("cx","".concat(y.x)),d.setAttribute("cy","".concat(b)),d.setAttribute("r","".concat(E))}return u}var Y=/url\("?#(.*)\)/;class z{constructor(t){this.gradientCache={},this.context=t}getDefElement(){return this.$def}init(){var t=this.context.config.document,e=this.context.contextService.getContext();this.$def=D("defs",t),e.appendChild(this.$def)}clear(t){Object.keys(this.gradientCache).forEach((e=>{this.clearUnusedDefElement(this.gradientCache,e,t)}))}clearUnusedDefElement(t,e,r){if(t[e]&&1===t[e].size&&t[e].has(r)){var n=this.$def.querySelector("#".concat(e));n&&this.$def.removeChild(n)}}createOrUpdateGradientAndPattern(t,r,n,i,a){var o=this.context.config,c=o.document,s=o.createImage;if(r){var l=(e.isPattern(n)?r.style[i]:r.getAttribute(i)||"").match(Y);l&&l.length>1&&this.clearUnusedDefElement(this.gradientCache,l[1].replace('"',""),t.entity);var u=H(c||document,this.$def,t,r,n,i,s,a);u&&(this.gradientCache[u]||(this.gradientCache[u]=new Set),this.gradientCache[u].add(t.entity))}}createOrUpdateShadow(t,e,r){!function(t,e,r,n,i){var a=r.parsedStyle,o=a.shadowType,c=void 0===o?"outer":o,s=a.shadowBlur,l=a.shadowColor,u=a.shadowOffsetX,d=a.shadowOffsetY,h=!f(l)&&s>0,p="g-filter-dropshadow-"+r.entity,v=e.querySelector("#".concat(p));if(v&&(v.getAttribute("data-type")===c&&h||(v.remove(),v=null)),h){if(null==n||n.setAttribute("filter","url(#".concat(p,")")),!v){if((v=D("filter",t)).setAttribute("data-type",c),"outer"===c){var m=D("feDropShadow",t);m.setAttribute("dx","".concat((u||0)/2)),m.setAttribute("dy","".concat((d||0)/2)),m.setAttribute("stdDeviation","".concat((s||0)/4)),m.setAttribute("flood-color",""+l),v.appendChild(m)}else if("inner"===c){var g=D("feComponentTransfer",t);g.setAttribute("in","SourceAlpha");var y=D("feFuncA",t);y.setAttribute("type","table"),y.setAttribute("tableValues","1 0"),g.appendChild(y),v.appendChild(g);var b=D("feGaussianBlur",t);b.setAttribute("stdDeviation","".concat((s||0)/4)),v.appendChild(b);var E=D("feOffset",t);E.setAttribute("dx","".concat((u||0)/2)),E.setAttribute("dy","".concat((d||0)/2)),E.setAttribute("result","offsetblur"),v.appendChild(E);var A=D("feFlood",t);A.setAttribute("flood-color",""+l),A.setAttribute("result","color"),v.appendChild(A);var S=D("feComposite",t);S.setAttribute("in2","offsetblur"),S.setAttribute("operator","in"),v.appendChild(S);var x=D("feComposite",t);x.setAttribute("in2","SourceAlpha"),x.setAttribute("operator","in"),v.appendChild(x);var w=D("feMerge",t);v.appendChild(w);var C=D("feMergeNode",t);C.setAttribute("in","SourceGraphic");var O=D("feMergeNode",t);w.appendChild(C),w.appendChild(O)}return v.id=p,v.setAttribute("filterUnits","userSpaceOnUse"),void e.appendChild(v)}if("inner"===c){var L=v.children[1],k=v.children[2];"shadowColor"===i?v.children[3].setAttribute("flood-color",""+l):"shadowBlur"===i?L.setAttribute("stdDeviation","".concat((s||0)/4)):"shadowOffsetX"===i?k.setAttribute("dx","".concat((u||0)/2)):"shadowOffsetY"===i&&k.setAttribute("dy","".concat((d||0)/2))}else if("outer"===c){var T=v.children[0];"shadowColor"===i?T.setAttribute("flood-color",""+l):"shadowBlur"===i?T.setAttribute("stdDeviation","".concat((s||0)/4)):"shadowOffsetX"===i?T.setAttribute("dx","".concat((u||0)/2)):"shadowOffsetY"===i&&T.setAttribute("dy","".concat((d||0)/2))}}else null==n||n.removeAttribute("filter")}(this.context.config.document||document,this.$def,t,e,r)}createOrUpdateFilter(t,e,r){R(this.context.config.document||document,this.$def,t,e,r)}}function X(t){return t.toFixed(6).replace(".000000","")}function q(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&amp;":"<"===t?"&lt;":">"===t?"&gt;":'"'===t?"&quot;":"&apos;"}))}var Q={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"},Z={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},J={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)"},K="g-svg",tt="clip-path-",et="text-path-";class rt{constructor(t,e,r){this.svgElementMap=new WeakMap,this.renderQueue=[],this.dirtyAttributes=new WeakMap,this.pendingReorderQueue=new Set,this.clipPathUseMap=new WeakMap,this.pluginOptions=t,this.defElementManager=e,this.context=r}apply(t){var r=t.renderingService,n=t.renderingContext;this.context=t,this.context.svgElementMap=this.svgElementMap;var i=n.root.ownerDocument.defaultView,a=this.context.config.document,o=t=>{var e=t.target;if(this.clipPathUseMap.get(e)){var r=this.defElementManager.getDefElement().querySelector("#".concat(this.getId(e)));r&&r.remove()}this.createSVGDom(a,e,this.$camera)},c=t=>{var e=t.target;this.defElementManager.clear(e.entity),this.clipPathUseMap.delete(e),this.removeSVGDom(e)},s=t=>{var e,r=t.parentNode,n=null===(e=t.parentNode)||void 0===e||null===(e=e.elementSVG)||void 0===e?void 0:e.$groupEl,i=((null==r?void 0:r.children)||[]).slice();n&&this.reorderChildren(a,n,i)},l=t=>{s(t.target)},u=t=>{var e=t.target;if(e.elementSVG){var r=t.attrName,n=this.dirtyAttributes.get(e);n||(this.dirtyAttributes.set(e,[]),n=this.dirtyAttributes.get(e)),n.push(r)}},d=t=>{var r=t.target;(r.nodeName===e.Shape.FRAGMENT?r.childNodes:[r]).forEach((t=>{var r,n=null===(r=t.elementSVG)||void 0===r?void 0:r.$el,i=t.parsedStyle,a=i.fill,o=i.stroke,c=i.clipPath;if(a&&!e.isCSSRGB(a)&&this.defElementManager.createOrUpdateGradientAndPattern(t,n,a,"fill",this),o&&!e.isCSSRGB(o)&&this.defElementManager.createOrUpdateGradientAndPattern(t,n,o,"stroke",this),c){var s=A(E(),t.getWorldTransform()),l="".concat(tt+c.entity,"-").concat(t.entity),u=this.defElementManager.getDefElement().querySelector("#".concat(l));u&&this.applyTransform(u,s)}}))};r.hooks.init.tap(rt.tag,(()=>{var t=this.context.config,r=t.background,n=t.document;this.defElementManager.init();var a=this.context.contextService.getContext();r&&(a.style.background=r),a.setAttribute("color-interpolation-filters","sRGB"),this.$camera=D("g",n),this.$camera.id="".concat(K,"-camera"),this.applyTransform(this.$camera,this.context.camera.getOrthoMatrix()),a.appendChild(this.$camera),i.addEventListener(e.ElementEvent.MOUNTED,o),i.addEventListener(e.ElementEvent.UNMOUNTED,c),i.addEventListener(e.ElementEvent.REPARENT,l),i.addEventListener(e.ElementEvent.ATTR_MODIFIED,u),i.addEventListener(e.ElementEvent.BOUNDS_CHANGED,d)})),r.hooks.destroy.tap(rt.tag,(()=>{i.removeEventListener(e.ElementEvent.MOUNTED,o),i.removeEventListener(e.ElementEvent.UNMOUNTED,c),i.removeEventListener(e.ElementEvent.REPARENT,l),i.removeEventListener(e.ElementEvent.ATTR_MODIFIED,u),i.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,d),_=0,I={}})),r.hooks.render.tap(rt.tag,(t=>{this.renderQueue.push(t)})),r.hooks.beginFrame.tap(rt.tag,(()=>{var t=this.context.config.document;this.pendingReorderQueue.size&&(this.pendingReorderQueue.forEach((e=>{var r,n=((null==e?void 0:e.children)||[]).slice(),i=null==e||null===(r=e.elementSVG)||void 0===r?void 0:r.$groupEl;i&&this.reorderChildren(t||a,i,n||[])})),this.pendingReorderQueue.clear())})),r.hooks.endFrame.tap(rt.tag,(()=>{n.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&this.applyTransform(this.$camera,this.context.camera.getOrthoMatrix()),this.renderQueue.forEach((t=>{var e,r,n=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,i=null===(r=t.elementSVG)||void 0===r?void 0:r.$groupEl;if(n&&i){var a=t.getLocalTransform();this.applyTransform(i,a);var o=this.clipPathUseMap.get(t);o&&o.length&&o.forEach((e=>{this.applyTransform(e,t.getWorldTransform())})),t.renderable.dirty=!1}var c=this.dirtyAttributes.get(t);c&&(c.forEach((e=>{"zIndex"===e?s(t):"increasedLineWidthForHitTesting"===e&&this.createOrUpdateHitArea(t,n,i),this.updateAttribute(t,[e])})),this.dirtyAttributes.delete(t))})),this.renderQueue=[]}))}getId(t){return t.id||"".concat(K,"-").concat(t.entity)}reorderChildren(t,e,r){if(r.sort(((t,e)=>t.sortable.renderOrder-e.sortable.renderOrder)),r.length){var n=(t||document).createDocumentFragment();r.forEach((t=>{if(t.isConnected){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)}})),e.appendChild(n)}}applyTransform(t,e){var r="matrix(".concat(X(e[0]),",").concat(X(e[1]),",").concat(X(e[4]),",").concat(X(e[5]),",").concat(X(e[12]),",").concat(X(e[13]),")");r!==t.getAttribute("transform")&&t.setAttribute("transform",r),r===J.transform&&t.removeAttribute("transform")}applyAttributes(t){var r=t.elementSVG,n=null==r?void 0:r.$el;if(n&&(null==r?void 0:r.$groupEl)){var i=t.nodeName,a=t.attributes;i!==e.Shape.HTML&&n.setAttribute("fill","none"),i===e.Shape.IMAGE&&n.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(a))}}updateAttribute(t,r){var n=this.context.config.document,i=t.elementSVG,a=i.$el,o=i.$hitTestingEl,c=t.parsedStyle,s=t.nodeName;r.some((e=>this.context.SVGElementLifeCycleContribution.shouldUpdateElementAttribute(t,e)))&&a&&[a,o].forEach((e=>{e&&this.context.SVGElementLifeCycleContribution.updateElementAttribute(t,e,this.svgElementMap)})),r.forEach((r=>{var i,l,u=Q[r],d=c[r],h=!f(d)&&""+d,p=(null===(i=Z[r])||void 0===i?void 0:i[h])||h,v=c[r],m=u&&!(null===(l=e.propertyMetadataCache[r])||void 0===l||!l.inh);if(s===e.Shape.HTML)"fill"===r?a.style.background=""+v:"stroke"===r?(a.style["border-color"]=""+v,a.style["border-style"]="solid"):"lineWidth"===r?a.style["border-width"]="".concat(v||0,"px"):"lineDash"===r?a.style["border-style"]="dashed":"innerHTML"===r?this.createOrUpdateInnerHTML(n,a,v):"width"===r||"height"===r||"class"===r?a.setAttribute(r,""+v):f(t.style[r])||""===t.style[r]||(a.style[r]=t.style[r]);else{if(!u||(s===e.Shape.GROUP||t.isCustomElement)&&(m||"fill"===u||"stroke"===u))return;"fill"===r||"stroke"===r?this.defElementManager.createOrUpdateGradientAndPattern(t,a,v,u,this):"clipPath"===r?this.createOrUpdateClipOrTextPath(n,v,t):"textPath"===r?this.createOrUpdateClipOrTextPath(n,v,t,!0):"shadowType"===r||"shadowColor"===r||"shadowBlur"===r||"shadowOffsetX"===r||"shadowOffsetY"===r?this.defElementManager.createOrUpdateShadow(t,a,r):"filter"===r?this.defElementManager.createOrUpdateFilter(t,a,v):f(d)||[a,o].forEach((t=>{t&&u&&("unset"!==h&&h!==J[r]?t.setAttribute(u,p):t.removeAttribute(u))}))}}))}createSVGDom(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];r.elementSVG=new L;var a=r.elementSVG,o=this.context.SVGElementLifeCycleContribution.createElement(r,this.svgElementMap);if(o){var c,s;r.nodeName===e.Shape.HTML&&(r.parsedStyle.$el=o),this.pluginOptions.outputSVGElementId&&(o.id=this.getId(r)),this.pluginOptions.outputSVGElementName&&r.name&&o.setAttribute("name",r.name),!o.hasAttribute("data-wrapgroup")&&"g"===o.nodeName||i?s=o:(s=D("g",t)).appendChild(o),a.$el=o,a.$groupEl=s,this.applyAttributes(r),this.createOrUpdateHitArea(r,o,s);var l=n||r.parentNode&&(null===(c=r.parentNode.elementSVG)||void 0===c?void 0:c.$groupEl);l&&(l.appendChild(s),this.pendingReorderQueue.add(r.parentNode))}}removeSVGDom(t){var e,r=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;r&&r.parentNode&&(r.parentNode.removeChild(r),this.context.SVGElementLifeCycleContribution.destroyElement(t,r))}createOrUpdateHitArea(t,e,r){var n=t.elementSVG,i=n.$hitTestingEl,a=Number(t.parsedStyle.increasedLineWidthForHitTesting);if(a){if(!i){i=e.cloneNode(),["filter"].forEach((t=>{i.removeAttribute(t)}));var o="none"!==e.getAttribute("fill");i.setAttribute("fill",o?"transparent":"none"),i.setAttribute("stroke","transparent"),r.appendChild(i),n.$hitTestingEl=i,this.svgElementMap.set(i,t)}i.setAttribute("stroke-width","".concat(a+t.parsedStyle.lineWidth))}else i&&(r.removeChild(i),n.$hitTestingEl=null)}createOrUpdateInnerHTML(t,e,r){var n=(t||document).createElement("div");"string"==typeof r?n.innerHTML=r:n.appendChild(r),e.innerHTML="",e.appendChild(n)}createOrUpdateClipOrTextPath(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=r.elementSVG.$groupEl,a=n?"g":"clipPath",o=n?"text-path":"clip-path";if(e){var c="".concat((n?et:tt)+e.entity,"-").concat(r.entity),s=this.defElementManager.getDefElement();if(!s.querySelector("#".concat(c))){var l;if(n)this.createSVGDom(t,e,null,!0),l=e.elementSVG.$el;else{if(!e.isConnected)s.querySelector("#".concat(this.getId(e)))||this.createSVGDom(t,e,s,!0);l=D(a,t);var u=D("use",t);u.setAttribute("href","#".concat(e.elementSVG.$el.id)),l.appendChild(u);var d=this.clipPathUseMap.get(e);d||(this.clipPathUseMap.set(e,[]),d=this.clipPathUseMap.get(e)),d.push(u),this.applyTransform(u,e.getWorldTransform());var h=A(E(),r.getWorldTransform());this.applyTransform(l,h)}this.pluginOptions.outputSVGElementId&&(l.id=c),s.appendChild(l)}this.applyAttributes(e),n||i.setAttribute(o,"url(#".concat(c,")"))}else n||i.removeAttribute(o)}}rt.tag="SVGRenderer";var nt={top:"hanging",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"};function it(t,e,r,n){r.getBounds();var i=e.lineWidth,a=void 0===i?1:i,o=e.x,c=void 0===o?0:o,s=e.y,l=void 0===s?0:s,u=e.dx,d=void 0===u?0:u,h=e.dy,p=void 0===h?0:h,f=e.textPath,v=e.textPathSide,m=void 0===v?"left":v,g=e.textPathStartOffset,y=void 0===g?0:g,b=e.textDecorationLine,E=void 0===b?"":b,A=e.textDecorationColor,S=void 0===A?"":A,x=e.textDecorationStyle,w=void 0===x?"":x,C=e.metrics,O=e.textBaseline,L=void 0===O?"alphabetic":O;"alphabetic"===L&&(L="bottom"),t.setAttribute("dominant-baseline",nt[L]),t.setAttribute("paint-order","stroke");var k=C.lines,T=C.lineHeight,P=C.height,G=k.length,M="";if(0===d&&0===p||(M+="transform:translate(".concat(d,"px, ").concat(p,"px);")),E&&"none"!==E&&(M+="text-decoration:".concat(E," ").concat(w," ").concat(S,";")),M&&t.setAttribute("style",M),0!==c&&t.setAttribute("x","".concat(c)),0!==l&&t.setAttribute("y","".concat(l)),1===G){var N=q(k[0]);if(t.setAttribute("dx","".concat(a/2)),"bottom"!==L&&"top"!==L||(t.setAttribute("dominant-baseline",nt.middle),t.setAttribute("dy","bottom"===L?"-".concat(P/2,"px"):"".concat(P/2,"px"))),f){t.innerHTML="";var R=D("textPath",t.ownerDocument);R.setAttribute("href","#".concat(et+f.entity)),"left"!==m&&R.setAttribute("side",m),0!==y&&R.setAttribute("startOffset","".concat(y)),R.innerHTML=N,t.appendChild(R)}else t.innerHTML=N}else t.innerHTML=k.map(((t,e)=>{var r=a/2,n=0;return 0===e?"middle"===L?n=T/2-P/2:"top"===L||"hanging"===L?n=0:"bottom"!==L&&"ideographic"!==L||(n=-T*(G-1)):n=T,"<tspan x=".concat(c,' dx="').concat(r,'" dy="').concat(n,'">').concat(q(t),"</tspan>")})).join("")}var at={[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",[e.Shape.HTML]:"foreignObject"},ot={[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"]};class ct{constructor(t,e){this.context=t,this.runtime=e}createElement(t,e){var r=D(at[t.nodeName]||"g",this.context.config.document||document);return e.set(r,t),r}destroyElement(t,e){}shouldUpdateElementAttribute(t,e){return(ot[t.nodeName]||[]).indexOf(e)>-1}updateElementAttribute(t){var r=t.elementSVG.$el,n=t.parsedStyle;switch(t.nodeName){case e.Shape.IMAGE:k(r,n);break;case e.Shape.RECT:M(r,n);break;case e.Shape.LINE:T(r,n);break;case e.Shape.POLYGON:case e.Shape.POLYLINE:G(r,n);break;case e.Shape.PATH:P(r,n);break;case e.Shape.TEXT:it(r,n,t)}}}class st extends e.AbstractRendererPlugin{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.name="svg-renderer",this.options=t}init(t){var e=this.options,r=e.outputSVGElementId,n=e.outputSVGElementName,i=new z(this.context),a=new ct(this.context,t);this.context.defaultElementLifeCycleContribution=a,this.context.SVGElementLifeCycleContribution=a;var o={outputSVGElementId:!!f(r)||!!r,outputSVGElementName:!!f(n)||!!n};this.addRenderingPlugin(new rt(o,i,this.context))}destroy(){this.removeAllRenderingPlugins(),delete this.context.defaultElementLifeCycleContribution,delete this.context.SVGElementLifeCycleContribution}}var lt=Object.freeze({__proto__:null,CLIP_PATH_PREFIX:tt,DEFAULT_VALUE_MAP:J,DefaultElementLifeCycleContribution:ct,ElementSVG:L,G_SVG_PREFIX:K,Plugin:st,SHAPE2TAGS:at,SHAPE_UPDATE_DEPS:ot,SVGRendererPlugin:rt,SVG_ATTR_MAP:Q,TEXT_PATH_PREFIX:et,createSVGElement:D,updateImageElementAttribute:k,updateLineElementAttribute:T,updatePathElementAttribute:P,updatePolylineElementAttribute:G,updateRectElementAttribute:M,updateTextElementAttribute:it});function ut(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;a.length>n;n++)e.includes(r=a[n])||{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var dt=["offset","composite","computedOffset","easing"],ht=["offset","composite","computedOffset","easing","transformOrigin"],pt=["offset","composite","computedOffset","easing","transformOrigin"],ft=["offset","composite","computedOffset","easing","transformOrigin"];class vt{constructor(t){this.context=t,this.canvasConfig=t.config}init(){var t=this.canvasConfig,r=t.container,n=t.document,i=t.devicePixelRatio;if(this.$container=g(r)?(n||document).getElementById(r):r,this.$container){this.$container.style.position||(this.$container.style.position="relative");var a=D("svg",n);a.setAttribute("width","".concat(this.canvasConfig.width)),a.setAttribute("height","".concat(this.canvasConfig.height)),this.$container.appendChild(a),this.$namespace=a}var o=i||e.isBrowser&&window.devicePixelRatio||1;this.dpr=o=1>o?1:Math.ceil(o)}getDomElement(){return this.$namespace}getContext(){return this.$namespace}getDPR(){return this.dpr}getBoundingClientRect(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()}destroy(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)}resize(t,e){this.$namespace&&(this.$namespace.setAttribute("width","".concat(t)),this.$namespace.setAttribute("height","".concat(e)))}applyCursorStyle(t){this.$container&&(this.$container.style.cursor=t)}generateCSSText(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=n.duration,o=n.easing,c=n.delay,s=n.direction,l=n.iterations,u=n.fill;return"@keyframes ".concat(t,"{").concat(r.map((t=>{var e=t.computedOffset,r=ut(t,dt),n=Object.keys(r).map((t=>"".concat(t,":").concat(i[t]||"").concat(r[t],";"))).join("");return"".concat(100*e,"%{").concat(n,"}")})).join(""),"}")+"".concat(e," {animation: ").concat(t," ").concat(a,"ms ").concat(o," ").concat(c,"ms ").concat(l===1/0?"infinite":l," ").concat(s," ").concat(u,";}")}toDataURL(){var t=this;return u(s().mark((function r(){var n,i,a,o,c,l;return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.$namespace.cloneNode(!0),i=t.canvasConfig.document,a=0,o=null,t.context.renderingContext.root.forEach((r=>{var c=r.getAnimations();if(c.length){o||(o=(i||document).createElement("style"),n.appendChild(o));var s=r.elementSVG,l="#".concat(s.$el.id),u="#".concat(s.$groupEl.id),d="",h="";c.forEach((r=>{var n=r.effect.getKeyframes();if(n.length){var i=[],o=[],c=n[0],p=ut(c,ht);if(Object.keys(p).forEach((t=>{var r;"transform"===t&&o.push(t),!(null===(r=e.propertyMetadataCache[t])||void 0===r||!r.inh)?o.push(t):"transform"!==t&&i.push(t)})),o.length){var f=n.map((t=>{var e=t.offset,r=t.composite,n=t.computedOffset,i=t.easing,a=ut(t,pt),c={offset:e,composite:r,computedOffset:n,easing:i};return Object.keys(a).forEach((e=>{o.includes(e)&&(c[e]=t[e])})),c}));h+=t.generateCSSText("a".concat(a++),u,f,r.effect.getComputedTiming(),{transform:s.$groupEl.getAttribute("transform")})}if(i.length){var v=n.map((t=>{var e=t.offset,r=t.composite,n=t.computedOffset,a=t.easing,o=ut(t,ft),c={offset:e,composite:r,computedOffset:n,easing:a};return Object.keys(o).forEach((e=>{i.includes(e)&&(c[e]=t[e])})),c}));d+=t.generateCSSText("a".concat(a++),l,v,r.effect.getComputedTiming())}}})),o.textContent+=d+h}})),c=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),(l=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",c)).replaceChild(n,l.documentElement),r.abrupt("return","data:image/svg+xml;charset=utf8,".concat(encodeURIComponent((new XMLSerializer).serializeToString(l))));case 10:case"end":return r.stop()}}),r)})))()}}class mt extends e.AbstractRendererPlugin{constructor(){super(...arguments),this.name="svg-context-register"}init(){this.context.ContextService=vt}destroy(){delete this.context.ContextService}}t.DomInteraction=i,t.Renderer=class extends e.AbstractRenderer{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(t),this.registerPlugin(new mt),this.registerPlugin(new st({outputSVGElementId:t.outputSVGElementId})),this.registerPlugin(new n),this.registerPlugin(new h)}},t.SVGPicker=p,t.SVGRenderer=lt}));
33
+ */Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var R=o((function t(){a(this,t)}));function V(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)),C(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&&C(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 $(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,h=0,p=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&&(h=Math.cos(v=Math.atan2(i-a,r-o))*(l||0),p=Math.sin(v)*(l||0)),t.setAttribute("x1","".concat(r+f)),t.setAttribute("y1","".concat(i+d)),t.setAttribute("x2","".concat(o+h)),t.setAttribute("y2","".concat(a+p))}function U(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 h=D(i.parentNode.getStartTangent(),2),p=h[0],v=h[1];u=Math.cos(d=Math.atan2(p[1]-v[1],p[0]-v[0]))*(a||0),s=Math.sin(d)*(a||0)}if(o&&e.isDisplayObject(o)&&c){var m=D(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 I(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,h=0;i&&e.isDisplayObject(i)&&o&&(s=Math.cos(h=Math.atan2(r[1][1]-r[0][1],r[1][0]-r[0][0]))*(o||0),l=Math.sin(h)*(o||0)),a&&e.isDisplayObject(a)&&c&&(f=Math.cos(h=Math.atan2(r[u-2][1]-r[u-1][1],r[u-2][0]-r[u-1][0]))*(c||0),d=Math.sin(h)*(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 _(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=D(n.map((function(t){return L(t,0,Math.min(Math.abs(c)/2,Math.abs(u)/2))})),4),f=l[0],d=l[1],h=l[2],p=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+h))],["a ".concat(h,",").concat(h,",0,0,").concat(y,",").concat(-v*h,",").concat(m*h)],["l ".concat(v*(h+p)-c,",0")],["a ".concat(p,",").concat(p,",0,0,").concat(y,",").concat(-v*p,",").concat(-m*p)],["l 0,".concat(m*(p+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 H(t,e){return(e||document).createElementNS("http://www.w3.org/2000/svg",t)}R.tag="c-svg-element";var F="g-filter-";function B(t,e,n,r,i){var o=F+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=H("filter",t);return c.setAttribute("filterUnits","userSpaceOnUse"),"blur"===i?function(t,e,n){var r=H("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=W(n[0]);Y(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=H("feGaussianBlur",t);c.setAttribute("in","SourceAlpha"),c.setAttribute("stdDeviation","".concat(o)),e.appendChild(c);var u=H("feOffset",t);u.setAttribute("dx","".concat(r)),u.setAttribute("dy","".concat(i)),u.setAttribute("result","offsetblur"),e.appendChild(u);var s=H("feFlood",t);s.setAttribute("flood-color",a),e.appendChild(s);var l=H("feComposite",t);l.setAttribute("in2","offsetblur"),l.setAttribute("operator","in"),e.appendChild(l);var f=H("feMerge",t);e.appendChild(f);var d=H("feMergeNode",t),h=H("feMergeNode",t);h.setAttribute("in","SourceGraphic"),f.appendChild(d),f.appendChild(h)}(t,c,a):"contrast"===i?function(t,e,n){var r=W(n[0]);Y(t,e,{type:"linear",slope:r,intercept:-.5*r+.5})}(t,c,a):"grayscale"===i?function(t,e,n){var r=W(n[0]);z(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=W(n[0]);z(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=W(n[0]),i=H("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=H("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=W(n[0]);Y(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 W(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function Y(t,e,n){var r=n.type,i=n.slope,o=n.intercept,a=n.tableValues,c=H("feComponentTransfer",t);[H("feFuncR",t),H("feFuncG",t),H("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 z(t,e,n){var r=H("feColorMatrix",t);r.setAttribute("type","matrix"),r.setAttribute("values",n.join(" ")),e.appendChild(r)}var X="g-pattern-",q={},Q=0;function Z(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=J(i),u=n.querySelector("#".concat(c));if(!u){var s=i.image,l="";if(C(s)?l=s:e.isBrowser&&(s instanceof HTMLImageElement?l=s.src:s instanceof HTMLCanvasElement&&(l=s.toDataURL())),l){var f,d=H("image",t);d.setAttribute("href",l),o?f=o(l):e.isBrowser&&(f=new window.Image),l.match(/^data:/i)||(f.crossOrigin="Anonymous",d.setAttribute("crossorigin","anonymous")),f.src=l;var h=function(){var e=K(t,n,r,i,c,f.width,f.height);n.appendChild(e),e.appendChild(d),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width","".concat(f.width)),d.setAttribute("height","".concat(f.height))};f.complete?h():f.onload=h}if("rect"===s.nodeName){var p=s.parsedStyle,v=K(t,n,s,i,c,p.width,p.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=tt(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(F+e.entity,"-gradient"),a=n.querySelector("#".concat(o));a||((a=H("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=tt(t,e,n,r,i),l="".concat(s,"_rect"),f=H("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=H("feImage",t);if(d.setAttribute("href","#".concat(l)),d.setAttribute("result","".concat(o,"-").concat(u)),a.appendChild(d),u>0){var h=H("feBlend",t);h.setAttribute("in",1===u?"".concat(o,"-").concat(u-1):"".concat(o,"-blended-").concat(c-1)),h.setAttribute("in2","".concat(o,"-").concat(u)),h.setAttribute("result","".concat(o,"-blended-").concat(c++)),h.setAttribute("mode","multiply"),a.appendChild(h)}}));var u=H("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 J(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=N(N({},t.value),n),a=o.x,c=o.y,u=o.width,s=o.height,l=o.steps,f=o.angle,d=o.cx,h=o.cy,p=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==h?void 0:""+h)||0,"-").concat((null==p?void 0:""+p)||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=C(t.image)?"pattern-".concat(t.image,"-").concat(t.repetition):"rect"===t.image.nodeName?"pattern-rect-".concat(t.image.entity):"pattern-".concat(Q));return r&&(q[r]||(q[r]="".concat(X).concat(Q++))),q[r]}function K(t,n,r,i,o,a,c){var u=i.repetition,s=i.transform,l=H("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=D(n.map((function(t){return t.value})),6),l=s[1],f=s[2],d=s[3],h=s[4],p=s[5];return"matrix(".concat(s[0]," ").concat(l," ").concat(f," ").concat(d," ").concat(h," ").concat(p,")")}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,h=f.min;l.setAttribute("x","".concat(h[0])),l.setAttribute("y","".concat(h[1]));var p=a,v=c;return"repeat-x"===u?v=2*d[1]:"repeat-y"===u?p=2*d[0]:"no-repeat"===u&&(p=2*d[0],v=2*d[1]),l.setAttribute("width","".concat(p)),l.setAttribute("height","".concat(v)),l}function tt(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=J(o,{x:s[0],y:s[1],width:c,height:u}),f=r.querySelector("#".concat(l));if(!f){(f=H(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 h=e.computeLinearGradient([s[0],s[1]],c,u,o.value.angle),p=h.y1,v=h.x2,m=h.y2;f.setAttribute("x1","".concat(h.x1)),f.setAttribute("y1","".concat(p)),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 et=/url\("?#(.*)\)/,nt=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=H("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(et);s&&s.length>1&&this.clearUnusedDefElement(this.gradientCache,s[1].replace('"',""),t.entity);var l=Z(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=!x(s)&&u>0,h="g-filter-dropshadow-"+n.entity,p=e.querySelector("#".concat(h));if(p&&(p.getAttribute("data-type")===c&&d||(p.remove(),p=null)),d){if(null==r||r.setAttribute("filter","url(#".concat(h,")")),!p){if((p=H("filter",t)).setAttribute("data-type",c),"outer"===c){var v=H("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),p.appendChild(v)}else if("inner"===c){var m=H("feComponentTransfer",t);m.setAttribute("in","SourceAlpha");var y=H("feFuncA",t);y.setAttribute("type","table"),y.setAttribute("tableValues","1 0"),m.appendChild(y),p.appendChild(m);var g=H("feGaussianBlur",t);g.setAttribute("stdDeviation","".concat((u||0)/4)),p.appendChild(g);var b=H("feOffset",t);b.setAttribute("dx","".concat((l||0)/2)),b.setAttribute("dy","".concat((f||0)/2)),b.setAttribute("result","offsetblur"),p.appendChild(b);var E=H("feFlood",t);E.setAttribute("flood-color",""+s),E.setAttribute("result","color"),p.appendChild(E);var A=H("feComposite",t);A.setAttribute("in2","offsetblur"),A.setAttribute("operator","in"),p.appendChild(A);var S=H("feComposite",t);S.setAttribute("in2","SourceAlpha"),S.setAttribute("operator","in"),p.appendChild(S);var w=H("feMerge",t);p.appendChild(w);var O=H("feMergeNode",t);O.setAttribute("in","SourceGraphic");var k=H("feMergeNode",t);w.appendChild(O),w.appendChild(k)}return p.id=h,p.setAttribute("filterUnits","userSpaceOnUse"),void e.appendChild(p)}if("inner"===c){var C=p.children[1],L=p.children[2];"shadowColor"===i?p.children[3].setAttribute("flood-color",""+s):"shadowBlur"===i?C.setAttribute("stdDeviation","".concat((u||0)/4)):"shadowOffsetX"===i?L.setAttribute("dx","".concat((l||0)/2)):"shadowOffsetY"===i&&L.setAttribute("dy","".concat((f||0)/2))}else if("outer"===c){var T=p.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){B(this.context.config.document||document,this.$def,t,e,n)}}])}();function rt(t){return t.toFixed(6).replace(".000000","")}function it(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&amp;":"<"===t?"&lt;":">"===t?"&gt;":'"'===t?"&quot;":"&apos;"}))}var ot={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"},at={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},ct={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)"},ut="g-svg",st="clip-path-",lt="text-path-",ft=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)}},h=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=G(P(),t.getWorldTransform()),l="".concat(st+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=H("g",i),r.$camera.id="".concat(ut,"-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,h)})),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,h),Q=0,q={}})),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(ut,"-").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(rt(e[0]),",").concat(rt(e[1]),",").concat(rt(e[4]),",").concat(rt(e[5]),",").concat(rt(e[12]),",").concat(rt(e[13]),")");n!==t.getAttribute("transform")&&t.setAttribute("transform",n),n===ct.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=ot[n],d=u[n],h=!x(d)&&""+d,p=(null===(o=at[n])||void 0===o?void 0:o[h])||h,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?a.setAttribute(n,""+v):x(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):x(d)||[a,c].forEach((function(t){t&&f&&("unset"!==h&&h!==ct[n]?t.setAttribute(f,p):t.removeAttribute(f))}))}}))}},{key:"createSVGDom",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];n.elementSVG=new R;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=H("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?lt:st)+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=H(o,t);var l=H("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=G(P(),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)}}])}();ft.tag="SVGRenderer";var dt,ht={top:"hanging",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"};function pt(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,h=void 0===d?0:d,p=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,w=e.textDecorationStyle,x=void 0===w?"":w,O=e.metrics,k=e.textBaseline,C=void 0===k?"alphabetic":k;"alphabetic"===C&&(C="bottom"),t.setAttribute("dominant-baseline",ht[C]),t.setAttribute("paint-order","stroke");var L=O.lines,T=O.lineHeight,P=O.height,G=L.length,M="";if(0===f&&0===h||(M+="transform:translate(".concat(f,"px, ").concat(h,"px);")),E&&"none"!==E&&(M+="text-decoration:".concat(E," ").concat(x," ").concat(S,";")),M&&t.setAttribute("style",M),0!==c&&t.setAttribute("x","".concat(c)),0!==s&&t.setAttribute("y","".concat(s)),1===G){var D=it(L[0]);if(t.setAttribute("dx","".concat(o/2)),"bottom"!==C&&"top"!==C||(t.setAttribute("dominant-baseline",ht.middle),t.setAttribute("dy","bottom"===C?"-".concat(P/2,"px"):"".concat(P/2,"px"))),p){t.innerHTML="";var j=H("textPath",t.ownerDocument);j.setAttribute("href","#".concat(lt+p.entity)),"left"!==m&&j.setAttribute("side",m),0!==g&&j.setAttribute("startOffset","".concat(g)),j.innerHTML=D,t.appendChild(j)}else t.innerHTML=D}else t.innerHTML=L.map((function(t,e){var n=o/2,r=0;return 0===e?"middle"===C?r=T/2-P/2:"top"===C||"hanging"===C?r=0:"bottom"!==C&&"ideographic"!==C||(r=-T*(G-1)):r=T,"<tspan x=".concat(c,' dx="').concat(n,'" dy="').concat(r,'">').concat(it(t),"</tspan>")})).join("")}var vt=(M(M(M(M(M(M(M(M(M(M(dt={},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"),M(dt,e.Shape.HTML,"foreignObject")),mt=M(M(M(M(M(M(M(M(M({},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"]),yt=function(){return o((function t(e,n){a(this,t),this.context=e,this.runtime=n}),[{key:"createElement",value:function(t,e){var n=H(vt[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(mt[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:V(n,r);break;case e.Shape.RECT:_(n,r);break;case e.Shape.LINE:$(n,r);break;case e.Shape.POLYGON:case e.Shape.POLYLINE:I(n,r);break;case e.Shape.PATH:U(n,r);break;case e.Shape.TEXT:pt(n,r,t)}}}])}(),gt=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 nt(this.context),o=new yt(this.context,t);this.context.defaultElementLifeCycleContribution=o,this.context.SVGElementLifeCycleContribution=o;var a={outputSVGElementId:!!x(n)||!!n,outputSVGElementName:!!x(r)||!!r};this.addRenderingPlugin(new ft(a,i,this.context))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultElementLifeCycleContribution,delete this.context.SVGElementLifeCycleContribution}}])}(e.AbstractRendererPlugin),bt=Object.freeze({__proto__:null,CLIP_PATH_PREFIX:st,DEFAULT_VALUE_MAP:ct,DefaultElementLifeCycleContribution:yt,ElementSVG:R,G_SVG_PREFIX:ut,Plugin:gt,SHAPE2TAGS:vt,SHAPE_UPDATE_DEPS:mt,SVGRendererPlugin:ft,SVG_ATTR_MAP:ot,TEXT_PATH_PREFIX:lt,createSVGElement:H,updateImageElementAttribute:V,updateLineElementAttribute:$,updatePathElementAttribute:U,updatePolylineElementAttribute:I,updateRectElementAttribute:_,updateTextElementAttribute:pt});function Et(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(e.includes(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++)e.includes(n=o[r])||{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var At=["offset","composite","computedOffset","easing"],St=["offset","composite","computedOffset","easing","transformOrigin"],wt=["offset","composite","computedOffset","easing","transformOrigin"],xt=["offset","composite","computedOffset","easing","transformOrigin"],Ot=function(){return o((function t(e){a(this,t),this.context=e,this.canvasConfig=e.config}),[{key:"init",value:function(){var t=this.canvasConfig,n=t.container,r=t.document,i=t.devicePixelRatio;if(this.$container=C(n)?(r||document).getElementById(n):n,this.$container){this.$container.style.position||(this.$container.style.position="relative");var o=H("svg",r);o.setAttribute("width","".concat(this.canvasConfig.width)),o.setAttribute("height","".concat(this.canvasConfig.height)),this.$container.appendChild(o),this.$namespace=o}var a=i||e.isBrowser&&window.devicePixelRatio||1;this.dpr=a=1>a?1:Math.ceil(a)}},{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=Et(t,At),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:"toDataURL",value:(t=E(g().mark((function t(){var n,r,i,o,a,c,u=this;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.$namespace.cloneNode(!0),r=this.canvasConfig.document,i=0,o=null,this.context.renderingContext.root.forEach((function(t){var a=t.getAnimations();if(a.length){o||(o=(r||document).createElement("style"),n.appendChild(o));var c=t.elementSVG,s="#".concat(c.$el.id),l="#".concat(c.$groupEl.id),f="",d="";a.forEach((function(t){var n=t.effect.getKeyframes();if(n.length){var r=[],o=[],a=n[0],h=Et(a,St);if(Object.keys(h).forEach((function(t){var n;"transform"===t&&o.push(t),null!==(n=e.propertyMetadataCache[t])&&void 0!==n&&n.inh?o.push(t):"transform"!==t&&r.push(t)})),o.length){var p=n.map((function(t){var e=t.offset,n=t.composite,r=t.computedOffset,i=t.easing,a=Et(t,wt),c={offset:e,composite:n,computedOffset:r,easing:i};return Object.keys(a).forEach((function(e){o.includes(e)&&(c[e]=t[e])})),c}));d+=u.generateCSSText("a".concat(i++),l,p,t.effect.getComputedTiming(),{transform:c.$groupEl.getAttribute("transform")})}if(r.length){var v=n.map((function(t){var e=t.offset,n=t.composite,i=t.computedOffset,o=t.easing,a=Et(t,xt),c={offset:e,composite:n,computedOffset:i,easing:o};return Object.keys(a).forEach((function(e){r.includes(e)&&(c[e]=t[e])})),c}));f+=u.generateCSSText("a".concat(i++),s,v,t.effect.getComputedTiming())}}})),o.textContent+=f+d}})),a=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),(c=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",a)).replaceChild(n,c.documentElement),t.abrupt("return","data:image/svg+xml;charset=utf8,".concat(encodeURIComponent((new XMLSerializer).serializeToString(c))));case 10:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}]);var t}(),kt=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-context-register",t}return d(e,t),o(e,[{key:"init",value:function(){this.context.ContextService=Ot}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(e.AbstractRendererPlugin),Ct=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,e),(t=l(this,e,[n])).registerPlugin(new kt),t.registerPlugin(new gt({outputSVGElementId:n.outputSVGElementId})),t.registerPlugin(new p),t.registerPlugin(new S),t}return d(e,t),o(e)}(e.AbstractRenderer);t.DomInteraction=v,t.Renderer=Ct,t.SVGPicker=w,t.SVGRenderer=bt}));
34
34
  //# sourceMappingURL=index.umd.min.js.map